/**
* Bundle builder 2.2.4/5c718c1
* Created at Sun Oct 13 2024 12:29:06 GMT+0000 (Coordinated Universal Time)
* -------------------
* Kaltura Player lib
* kaltura-ovp-player v3.17.26
* playkit-kaltura-cuepoints v3.0.14
* playkit-kava v0.18.0
* playkit-navigation v2.1.11
* playkit-transcript v3.5.27
* playkit-ui-managers v1.6.0
* playkit-visibility v1.2.0
* playkit-vr v1.4.1
* playkit-youtube v1.3.0
*/
/*! For license information please see kaltura-ovp-player.js.LICENSE.txt */
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.KalturaPlayer=t():e.KalturaPlayer=t()}(self,(()=>(()=>{var e={129:(module,e,t)=>{"use strict";t.d(e,{Z:()=>o});var n=t(864),r=t.n(n),i=t(352),a=t.n(i)()(r());a.push([module.id,".kaltura-player-container {\n  width: 100%;\n  height: 100%;\n  position: relative;\n  background-color: #000;\n  outline: none;\n  -webkit-touch-callout: none;\n  -webkit-user-select: none;\n  -moz-user-select: none;\n  -ms-user-select: none;\n  user-select: none;\n  -webkit-tap-highlight-color: transparent;\n}\n","",{version:3,sources:["webpack://./assets/style.css"],names:[],mappings:"AAAA;EACE,WAAW;EACX,YAAY;EACZ,kBAAkB;EAClB,sBAAsB;EACtB,aAAa;EACb,2BAA2B;EAC3B,yBAAyB;EACzB,sBAAsB;EACtB,qBAAqB;EACrB,iBAAiB;EACjB,wCAAwC;AAC1C",sourcesContent:[".kaltura-player-container {\n  width: 100%;\n  height: 100%;\n  position: relative;\n  background-color: #000;\n  outline: none;\n  -webkit-touch-callout: none;\n  -webkit-user-select: none;\n  -moz-user-select: none;\n  -ms-user-select: none;\n  user-select: none;\n  -webkit-tap-highlight-color: transparent;\n}\n"],sourceRoot:""}]);const o=a},644:(module,e,t)=>{var n,r;self,module.exports=(n=t(75),r=t(150),function(){var e={774:function(e,t,n){"use strict";var r=n(537),i=n.n(r),a=n(645),o=n.n(a)()(i());o.push([e.id,".shaka-text-container {\n  position: absolute;\n  left: 0;\n  right: 0;\n  top: 0;\n  bottom: 0;\n  pointer-events: none;\n  width: 100%;\n  min-width: 48px;\n  transition: bottom cubic-bezier(0.4, 0, 0.6, 1) 0.1s;\n  transition-delay: 0s;\n  font-size: 20px;\n  line-height: 1.4;\n  color: #fff;\n  font-family: Roboto-Regular, Roboto, sans-serif, TengwarTelcontar;\n}\n.shaka-text-container span.shaka-text-wrapper {\n  display: inline;\n  background: 0 0;\n  text-align: center;\n}\n\n:fullscreen .shaka-text-container {\n  font-size: 4.4vmin;\n}\n\n:-webkit-full-screen .shaka-text-container {\n  font-size: 4.4vmin;\n}\n\n:-moz-full-screen .shaka-text-container {\n  font-size: 4.4vmin;\n}\n\n:-ms-fullscreen .shaka-text-container {\n  font-size: 4.4vmin;\n}\n","",{version:3,sources:["webpack://./src/assets/style.css"],names:[],mappings:"AAAA;EACE,kBAAkB;EAClB,OAAO;EACP,QAAQ;EACR,MAAM;EACN,SAAS;EACT,oBAAoB;EACpB,WAAW;EACX,eAAe;EACf,oDAAoD;EACpD,oBAAoB;EACpB,eAAe;EACf,gBAAgB;EAChB,WAAW;EACX,iEAAiE;AACnE;AACA;EACE,eAAe;EACf,eAAe;EACf,kBAAkB;AACpB;;AAEA;EACE,kBAAkB;AACpB;;AAEA;EACE,kBAAkB;AACpB;;AAEA;EACE,kBAAkB;AACpB;;AAEA;EACE,kBAAkB;AACpB",sourcesContent:[".shaka-text-container {\n  position: absolute;\n  left: 0;\n  right: 0;\n  top: 0;\n  bottom: 0;\n  pointer-events: none;\n  width: 100%;\n  min-width: 48px;\n  transition: bottom cubic-bezier(0.4, 0, 0.6, 1) 0.1s;\n  transition-delay: 0s;\n  font-size: 20px;\n  line-height: 1.4;\n  color: #fff;\n  font-family: Roboto-Regular, Roboto, sans-serif, TengwarTelcontar;\n}\n.shaka-text-container span.shaka-text-wrapper {\n  display: inline;\n  background: 0 0;\n  text-align: center;\n}\n\n:fullscreen .shaka-text-container {\n  font-size: 4.4vmin;\n}\n\n:-webkit-full-screen .shaka-text-container {\n  font-size: 4.4vmin;\n}\n\n:-moz-full-screen .shaka-text-container {\n  font-size: 4.4vmin;\n}\n\n:-ms-fullscreen .shaka-text-container {\n  font-size: 4.4vmin;\n}\n"],sourceRoot:""}]),t.Z=o},645:function(e){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,r,i,a){"string"==typeof e&&(e=[[null,e,void 0]]);var o={};if(r)for(var s=0;s<this.length;s++){var l=this[s][0];null!=l&&(o[l]=!0)}for(var u=0;u<e.length;u++){var c=[].concat(e[u]);r&&o[c[0]]||(void 0!==a&&(void 0===c[5]||(c[1]="@layer".concat(c[5].length>0?" ".concat(c[5]):""," {").concat(c[1],"}")),c[5]=a),n&&(c[2]?(c[1]="@media ".concat(c[2]," {").concat(c[1],"}"),c[2]=n):c[2]=n),i&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=i):c[4]="".concat(i)),t.push(c))}},t}},537:function(e){"use strict";e.exports=function(e){var t=e[1],n=e[3];if(!n)return t;if("function"==typeof btoa){var r=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),i="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(r),a="/*# ".concat(i," */");return[t].concat([a]).join("\n")}return[t].join("\n")}},379:function(e){"use strict";var t=[];function n(e){for(var n=-1,r=0;r<t.length;r++)if(t[r].identifier===e){n=r;break}return n}function r(e,r){for(var a={},o=[],s=0;s<e.length;s++){var l=e[s],u=r.base?l[0]+r.base:l[0],c=a[u]||0,d="".concat(u," ").concat(c);a[u]=c+1;var p=n(d),f={css:l[1],media:l[2],sourceMap:l[3],supports:l[4],layer:l[5]};if(-1!==p)t[p].references++,t[p].updater(f);else{var h=i(f,r);r.byIndex=s,t.splice(s,0,{identifier:d,updater:h,references:1})}o.push(d)}return o}function i(e,t){var n=t.domAPI(t);return n.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;n.update(e=t)}else n.remove()}}e.exports=function(e,i){var a=r(e=e||[],i=i||{});return function(e){e=e||[];for(var o=0;o<a.length;o++){var s=n(a[o]);t[s].references--}for(var l=r(e,i),u=0;u<a.length;u++){var c=n(a[u]);0===t[c].references&&(t[c].updater(),t.splice(c,1))}a=l}}},569:function(e){"use strict";var t={};e.exports=function(e,n){var r=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},216:function(e){"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},565:function(e,t,n){"use strict";e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},795:function(e){"use strict";e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var r="";n.supports&&(r+="@supports (".concat(n.supports,") {")),n.media&&(r+="@media ".concat(n.media," {"));var i=void 0!==n.layer;i&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,i&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}");var a=n.sourceMap;a&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(a))))," */")),t.styleTagTransform(r,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},589:function(e){"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},952:function(e){"use strict";e.exports=n},475:function(e){"use strict";e.exports=r},61:function(e,t,n){var r=n(698).default;function i(){"use strict";e.exports=i=function(){return n},e.exports.__esModule=!0,e.exports.default=e.exports;var t,n={},a=Object.prototype,o=a.hasOwnProperty,s=Object.defineProperty||function(e,t,n){e[t]=n.value},l="function"==typeof Symbol?Symbol:{},u=l.iterator||"@@iterator",c=l.asyncIterator||"@@asyncIterator",d=l.toStringTag||"@@toStringTag";function p(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{p({},"")}catch(t){p=function(e,t,n){return e[t]=n}}function f(e,t,n,r){var i=t&&t.prototype instanceof k?t:k,a=Object.create(i.prototype),o=new O(r||[]);return s(a,"_invoke",{value:P(e,n,o)}),a}function h(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}n.wrap=f;var y="suspendedStart",g="suspendedYield",v="executing",m="completed",b={};function k(){}function E(){}function _(){}var T={};p(T,u,(function(){return this}));var A=Object.getPrototypeOf,S=A&&A(A(L([])));S&&S!==a&&o.call(S,u)&&(T=S);var w=_.prototype=k.prototype=Object.create(T);function C(e){["next","throw","return"].forEach((function(t){p(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){function n(i,a,s,l){var u=h(e[i],e,a);if("throw"!==u.type){var c=u.arg,d=c.value;return d&&"object"==r(d)&&o.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,s,l)}),(function(e){n("throw",e,s,l)})):t.resolve(d).then((function(e){c.value=e,s(c)}),(function(e){return n("throw",e,s,l)}))}l(u.arg)}var i;s(this,"_invoke",{value:function(e,r){function a(){return new t((function(t,i){n(e,r,t,i)}))}return i=i?i.then(a,a):a()}})}function P(e,n,r){var i=y;return function(a,o){if(i===v)throw new Error("Generator is already running");if(i===m){if("throw"===a)throw o;return{value:t,done:!0}}for(r.method=a,r.arg=o;;){var s=r.delegate;if(s){var l=R(s,r);if(l){if(l===b)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===y)throw i=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=v;var u=h(e,n,r);if("normal"===u.type){if(i=r.done?m:g,u.arg===b)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(i=m,r.method="throw",r.arg=u.arg)}}}function R(e,n){var r=n.method,i=e.iterator[r];if(i===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,R(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),b;var a=h(i,e.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,b;var o=a.arg;return o?o.done?(n[e.resultName]=o.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,b):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,b)}function I(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function D(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function O(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(I,this),this.reset(!0)}function L(e){if(e||""===e){var n=e[u];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,a=function n(){for(;++i<e.length;)if(o.call(e,i))return n.value=e[i],n.done=!1,n;return n.value=t,n.done=!0,n};return a.next=a}}throw new TypeError(r(e)+" is not iterable")}return E.prototype=_,s(w,"constructor",{value:_,configurable:!0}),s(_,"constructor",{value:E,configurable:!0}),E.displayName=p(_,d,"GeneratorFunction"),n.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===E||"GeneratorFunction"===(t.displayName||t.name))},n.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,_):(e.__proto__=_,p(e,d,"GeneratorFunction")),e.prototype=Object.create(w),e},n.awrap=function(e){return{__await:e}},C(x.prototype),p(x.prototype,c,(function(){return this})),n.AsyncIterator=x,n.async=function(e,t,r,i,a){void 0===a&&(a=Promise);var o=new x(f(e,t,r,i),a);return n.isGeneratorFunction(t)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},C(w),p(w,d,"Generator"),p(w,u,(function(){return this})),p(w,"toString",(function(){return"[object Generator]"})),n.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},n.values=L,O.prototype={constructor:O,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(D),!e)for(var n in this)"t"===n.charAt(0)&&o.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function r(r,i){return s.type="throw",s.arg=e,n.next=r,i&&(n.method="next",n.arg=t),!!i}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var l=o.call(a,"catchLoc"),u=o.call(a,"finallyLoc");if(l&&u){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&o.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,b):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),b},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),D(n),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;D(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:L(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),b}},n}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports},698:function(e){function t(n){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},687:function(e,t,n){var r=n(61)();e.exports=r;try{regeneratorRuntime=r}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}}},t={};function i(n){var r=t[n];if(void 0!==r)return r.exports;var a=t[n]={id:n,exports:{}};return e[n](a,a.exports,i),a.exports}i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,{a:t}),t},i.d=function(e,t){for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.nc=void 0;var a={};return function(){"use strict";i.r(a),i.d(a,{NAME:function(){return se},VERSION:function(){return oe},default:function(){return le}});var e=i(952);function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function n(e,n){if(e){if("string"==typeof e)return t(e,n);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?t(e,n):void 0}}function r(e){return function(e){if(Array.isArray(e))return t(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||n(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t,n,r,i,a,o){try{var s=e[a](o),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,i)}function s(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var a=e.apply(t,n);function s(e){o(a,r,i,s,l,"next",e)}function l(e){o(a,r,i,s,l,"throw",e)}s(void 0)}))}}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u(e)}function c(e){var t=function(e,t){if("object"!=u(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=u(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==u(t)?t:String(t)}function d(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,c(r.key),r)}}function p(e,t,n){return t&&d(e.prototype,t),n&&d(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function f(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function h(e){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},h(e)}function y(){return y="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=h(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},y.apply(this,arguments)}function g(e,t){return g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},g(e,t)}function v(e,t,n){return(t=c(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var m,b,k=i(687),E=i.n(k),_=i(475),T=i.n(_),A=(m=function(){function t(){l(this,t)}return p(t,null,[{key:"isConfigured",value:function(t,n){return e.DrmScheme.WIDEVINE===n.keySystem&&!!t.find((function(e){return e.scheme===n.keySystem}))}},{key:"canPlayDrm",value:function(n){return t._logger.debug("Can play DRM scheme of: "+e.DrmScheme.WIDEVINE),!!n.find((function(t){return t.scheme===e.DrmScheme.WIDEVINE}))}},{key:"setDrmPlayback",value:function(n,r){t._logger.debug("Sets drm playback");var i=e.Env.browser.name,a=r.find((function(t){return t.scheme===e.DrmScheme.WIDEVINE}));a&&(n.drm={servers:v({},e.DrmScheme.WIDEVINE,a.licenseUrl),advanced:{}},"Chrome"===i&&(n.drm.advanced=v({},e.DrmScheme.WIDEVINE,{videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"})))}}]),t}(),v(m,"_logger",(0,e.getLogger)("Widevine")),m),S=(b=function(){function t(){l(this,t)}return p(t,null,[{key:"isConfigured",value:function(t,n){return e.DrmScheme.PLAYREADY===n.keySystem&&!!t.find((function(e){return e.scheme===n.keySystem}))}},{key:"canPlayDrm",value:function(n){return t._logger.debug("Can play DRM scheme of: "+e.DrmScheme.PLAYREADY),!!n.find((function(t){return t.scheme===e.DrmScheme.PLAYREADY}))}},{key:"setDrmPlayback",value:function(n,r){t._logger.debug("Sets drm playback");var i=r.find((function(t){return t.scheme===e.DrmScheme.PLAYREADY}));i&&(n.drm={servers:v({},e.DrmScheme.PLAYREADY,i.licenseUrl)})}}]),t}(),v(b,"_logger",(0,e.getLogger)("PlayReady")),b),w=JSON.parse('{"shakaConfig":{"streaming":{"ignoreTextStreamFailures":true,"bufferingGoal":60,"alwaysStreamText":true},"abr":{"enabled":true,"restrictions":{}}},"forceRedirectExternalStreams":false,"trackEmsgEvents":true,"switchDynamicToStatic":false,"stallDetectionThreshold":3}'),C=i(379),x=i.n(C),P=i(795),R=i.n(P),I=i(569),D=i.n(I),O=i(565),L=i.n(O),M=i(216),N=i.n(M),U=i(589),B=i.n(U),F=i(774),j={};j.styleTagTransform=B(),j.setAttributes=L(),j.insert=D().bind(null,"head"),j.domAPI=R(),j.insertStyleElement=N(),x()(F.Z,j),F.Z&&F.Z.locals&&F.Z.locals;var H=function(){function e(t){l(this,e),this._media=K.parseAttr(t,G.AttributeTypes.MEDIA),this._startNumber=K.parseAttr(t,G.AttributeTypes.START_NUMBER,K.parseInt,1),this._duration=K.parseAttr(t,G.AttributeTypes.DURATION,K.parseFloat),this._timescale=K.parseAttr(t,G.AttributeTypes.TIMESCALE,K.parsePositiveInt,1),this._presentationTimeOffset=K.parseAttr(t,G.AttributeTypes.PRESENTATION_TIME_OFFSET,K.parseInt,0),this._endNumber=K.parseAttr(t,G.AttributeTypes.END_NUMBER,K.parsePositiveInt)}return p(e,[{key:"media",get:function(){return this._media}},{key:"startNumber",get:function(){return this._startNumber}},{key:"duration",get:function(){return this._duration}},{key:"timescale",get:function(){return this._timescale}},{key:"presentationTimeOffset",get:function(){return this._presentationTimeOffset}},{key:"endNumber",get:function(){return this._endNumber}}]),e}();v(H,"MediaTemplateType",{REPRESENTATION:"$RepresentationID$",NUMBER:"$Number$",BANDWIDTH:"$Bandwidth$",TIME:"$Time$"});var V=function(e,t){var n=t.id,r=t.index,i=t.bitrate,a=t.time,o=e.match(/\$([a-zA-Z]+)\$/g),s=function(e,t,n){return n?e.replace(t,n):e};return o&&o.forEach((function(t){switch(t){case H.MediaTemplateType.REPRESENTATION:e=s(e,t,n);break;case H.MediaTemplateType.NUMBER:e=s(e,t,r);break;case H.MediaTemplateType.BANDWIDTH:e=s(e,t,i);break;case H.MediaTemplateType.TIME:e=s(e,t,a)}})),e},G={TagTypes:{BASE_URL:"BaseURL",SEGMENT_TEMPLATE:"SegmentTemplate",REPRESENTATION:"Representation",ESSENTIAL_PROPERTY:"EssentialProperty",ADAPTATION_SET:"AdaptationSet"},AttributeTypes:{BASE_URL:"BaseURL",ID:"id",CONTENT_TYPE:"contentType",MIME_TYPE:"mimeType",MEDIA:"media",DURATION:"duration",START_NUMBER:"startNumber",TIMESCALE:"timescale",PRESENTATION_TIME_OFFSET:"presentationTimeOffset",END_NUMBER:"endNumber",BANDWIDTH:"bandwidth",WIDTH:"width",HEIGHT:"height",SCHEME_ID_URI:"schemeIdUri",VALUE:"value"}},K={parseXml:function(e){return(new DOMParser).parseFromString(e,"text/xml")},parseAttr:function(e,t,n,r){var i=null,a=e.getAttribute(t);return null!==a&&(i=n?n(a):a),null===i?r:i},findElements:function(e,t){return e.getElementsByTagName(t)},findChild:function(e,t){var n=this.findChildren(e,t);return 1!==n.length?null:n[0]},findChildren:function(e,t){return Array.from(e.childNodes).filter((function(e){return e instanceof Element&&e.tagName===t}))},parseInt:function(e){var t=Number(e);return t%1==0?t:null},parsePositiveInt:function(e){var t=Number(e);return t%1==0&&t>0?t:null},parseFloat:function(e){var t=Number(e);return isNaN(t)?null:t}},z=function(){function e(t){l(this,e),this._schemeIdUri=K.parseAttr(t,G.AttributeTypes.SCHEME_ID_URI),this._value=K.parseAttr(t,G.AttributeTypes.VALUE)}return p(e,[{key:"schemeIdUri",get:function(){return this._schemeIdUri}},{key:"value",get:function(){return this._value}}]),e}(),W=function(){function e(t){l(this,e),this._id=K.parseAttr(t,G.AttributeTypes.ID),this._bandwidth=K.parseAttr(t,G.AttributeTypes.BANDWIDTH,parseInt),this._width=K.parseAttr(t,G.AttributeTypes.WIDTH,parseInt),this._height=K.parseAttr(t,G.AttributeTypes.HEIGHT,parseInt);var n=K.findChild(t,G.TagTypes.ESSENTIAL_PROPERTY);n&&(this._essentialProperty=new z(n))}return p(e,[{key:"bandwidth",get:function(){return this._bandwidth}},{key:"id",get:function(){return this._id}},{key:"width",get:function(){return this._width}},{key:"height",get:function(){return this._height}},{key:"essentialProperty",get:function(){return this._essentialProperty}}]),e}(),Y=function(){function e(t){l(this,e),this._id=K.parseAttr(t,G.AttributeTypes.ID),this._mimeType=K.parseAttr(t,G.AttributeTypes.MIME_TYPE),this._contentType=K.parseAttr(t,G.AttributeTypes.CONTENT_TYPE),this._representations=Array.from(K.findChildren(t,G.TagTypes.REPRESENTATION)).map((function(e){return new W(e)}));var n=K.findChild(t,G.TagTypes.SEGMENT_TEMPLATE);n&&(this._segmentTemplate=new H(n));var r=K.findChild(t,G.TagTypes.ESSENTIAL_PROPERTY);r&&(this._essentialProperty=new z(r))}return p(e,[{key:"id",get:function(){return this._id}},{key:"mimeType",get:function(){return this._mimeType}},{key:"contentType",get:function(){return this._contentType}},{key:"segmentTemplate",get:function(){return this._segmentTemplate}},{key:"essentialProperty",get:function(){return this._essentialProperty}},{key:"representations",get:function(){return this._representations}}]),e}();v(Y,"ContentType",{VIDEO:"video",AUDIO:"audio",TEXT:"text",IMAGE:"image"});var Z,q=function(){function t(n){var r,i,a=this;l(this,t),v(this,"_logger",(0,e.getLogger)("DashManifestParser")),v(this,"_parseAdaptionSets",(function(){var e=K.findElements(a._xmlDoc,G.TagTypes.BASE_URL);e&&e.length>0&&e[0].innerHTML&&(a._baseURL=e[0].textContent);var t=K.findElements(a._xmlDoc,G.TagTypes.ADAPTATION_SET),n=Array.from(t).filter((function(e){return K.parseAttr(e,G.AttributeTypes.CONTENT_TYPE)===Y.ContentType.IMAGE}));n.length>0?(a._adaptationSets=n.map((function(e){return new Y(e)})),a._logger.debug("Found image adaptation set",a._adaptationSets)):a._logger.debug("No image adaptations were found in manifest")})),this._logger.debug("Initialize manifest parser"),this._adaptationSets=[],(r=n instanceof ArrayBuffer?(i=n,TextDecoder?(new TextDecoder).decode(new Uint8Array(i)):null):n)&&(this._xmlDoc=K.parseXml(r))}return p(t,[{key:"parseManifest",value:function(){try{this._logger.debug("Start parsing dash manifest"),this._parseAdaptionSets(),this._logger.debug("Manifest parsing finished successfully")}catch(e){this._logger.warn("Manifest parsing failed",e)}}},{key:"getBaseUrl",value:function(){return this._baseURL||""}},{key:"getImageSet",value:function(){return this._adaptationSets.find((function(e){return e.contentType===Y.ContentType.IMAGE}))}},{key:"hasImageSet",value:function(){return!!this.getImageSet()}},{key:"adaptationSets",get:function(){return this._adaptationSets}}],[{key:"isValid",value:function(){return!(!window.TextEncoder||!window.TextDecoder)}}]),t}(),X=function(){function t(r,i,a){var o=this;l(this,t),v(this,"_tracks",[]),v(this,"_parseTracks",(function(t,r,i){var a=t.representations,s=t.segmentTemplate,l=t.essentialProperty;a.forEach((function(t,a){var u,c,d=t.id,p=t.bandwidth,f=t.width,h=t.height,y=s,g=y.startNumber,v=y.duration,m=y.media,b=y.timescale,k=y.presentationTimeOffset,E=o._getEssentialValue(l,t),_=(c=2,function(e){if(Array.isArray(e))return e}(u=o._getDimensions(E))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a,o,s=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){u=!0,i=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}(u,c)||n(u,c)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),T=_[0],A=_[1];o._tracks.push(new e.ImageTrack({id:d,index:a,active:!1,width:f,height:h,duration:v,rows:T,cols:A,url:o._buildTemplateUrl(m,d,r,i),customData:{bitrate:p,startNumber:g,timescale:b,presentationTimeOffset:k}}))}))})),v(this,"_getDimensions",(function(e){var t=1,n=1;if(e.includes("x")){var r=e.split("x");n=parseInt(r[0]),t=parseInt(r[1])}return[t,n]})),v(this,"_getEssentialValue",(function(e,t){return e?e.value:t.essentialProperty?t.essentialProperty.value:""})),v(this,"_buildTemplateUrl",(function(e,t,n,r){var i=n.split("/").pop(),a=n.replace(i,"");(r=r.replace(/^\.\/|^\./,"")).length>0&&!r.endsWith("/")&&(r+="/");var o="".concat(a).concat(r).concat(e);return V(o,{id:t})})),v(this,"_buildUrlFromTemplate",(function(e,t){return V(e.url,{index:t,time:(t-1)*e.duration*e.customData.timescale,bitrate:e.customData.bitrate})})),this._parseTracks(r,i,a),this._tracks.length>0&&(this._tracks.sort((function(e,t){return e.customData.bitrate-t.customData.bitrate})),this.selectTrack(this._tracks[this._tracks.length-1]))}return p(t,[{key:"selectTrack",value:function(e){this._tracks.forEach((function(t){return t.index===e.index?t.active=!0:t.active=!1}))}},{key:"getTracks",value:function(){return this._tracks}},{key:"getActiveTrack",value:function(){return this._tracks.find((function(e){return e.active}))}},{key:"getThumbnail",value:function(t){var n=this.getActiveTrack(),r=n.duration,i=n.rows,a=n.cols,o=n.sliceWidth,s=n.sliceHeight,l=n.customData,u=Math.floor(t/r)+l.startNumber,c=t%r,d=Math.floor(c*i*a/r);return new e.ThumbnailInfo({width:Math.floor(o),height:Math.floor(s),x:Math.floor(d%a)*o,y:Math.floor(d/a)*s,url:this._buildUrlFromTemplate(n,u)})}}]),t}(),Q=["startTime","endTime","id"];function $(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return J(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?J(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}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 a,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function J(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var ee="error",te="adaptation",ne="buffering",re="drmsessionupdate",ie="emsg",ae=function(t){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&g(e,t)}(m,t);var n,i,a,o,c,d=(o=m,c=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=h(o);if(c){var n=h(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===u(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return f(e)}(this,e)});function m(t,n){var r,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return l(this,m),v(f(r=d.call(this,t,n,i)),"_shakaLib",T()),v(f(r),"_adapterEventsBindings",v(v(v(v(v(v(v({},ee,(function(e){return r._onError(e)})),te,(function(){return r._onAdaptation()})),ne,(function(e){return r._onBuffering(e)})),re,(function(){return r._onDrmSessionUpdate()})),ie,(function(e){return r._onEmsg(e)})),e.EventType.WAITING,(function(){return r._onWaiting()})),e.EventType.PLAYING,(function(){return r._onPlaying()}))),v(f(r),"_buffering",!1),v(f(r),"_waitingSent",!1),v(f(r),"_playingSent",!1),v(f(r),"_videoSizeUpdateTimer",null),v(f(r),"_stallInterval",null),v(f(r),"VIDEO_ERROR_CODE",3016),v(f(r),"_lastTimeDetach",NaN),v(f(r),"_requestFilterError",!1),v(f(r),"_responseFilterError",!1),v(f(r),"_isDestroyInProgress",!1),v(f(r),"_errorCounter",{}),v(f(r),"_isStartOver",!0),v(f(r),"_seekRangeStart",0),v(f(r),"_isLive",!1),v(f(r),"_isStaticLive",!1),v(f(r),"_selectedVideoTrack",null),m._logger.debug("Creating adapter. Shaka version: "+T().Player.version),r._config=e.Utils.Object.mergeDeep({},w,r._config),r._init(),r}return p(m,[{key:"applyTextTrackStyles",value:function(e,t,n){e.insertRule("#".concat(n," .").concat(m.textContainerClass," { align-items: ").concat({left:"flex-start",center:"center",right:"flex-end"}[t.textAlign],"!important; }"),0),e.insertRule("#".concat(n," .").concat(m.textContainerClass," > * { ").concat(t.toCSS()," }"),0)}},{key:"setMaxBitrate",value:function(e){this._hasLowerOrEqualBitrate(e)&&this._shaka.configure({abr:{restrictions:{maxBandwidth:e}}})}},{key:"_getSortedTracks",value:function(){return this._shaka.getVariantTracks().map((function(e){return{id:e.id,bandwidth:e.bandwidth,active:e.active}})).sort((function(e,t){return e.bandwidth-t.bandwidth}))}},{key:"_hasLowerOrEqualBitrate",value:function(e){return this._getSortedTracks()[0].bandwidth<=e}},{key:"_init",value:function(){T().polyfill.installAll(),this._shaka=new(T().Player),this._config.useShakaTextTrackDisplay&&this._shaka.setVideoContainer(e.Utils.Dom.getElementBySelector(".playkit-subtitles")),this._maybeSetFilters(),this._maybeSetDrmConfig(),this._maybeBreakStalls(),this._shaka.configure(this._config.shakaConfig),this._addBindings()}},{key:"_clearStallInterval",value:function(){this._stallInterval&&(clearInterval(this._stallInterval),this._stallInterval=null)}},{key:"_stallHandler",value:function(){var e=this;this._clearStallInterval();var t=function(){return Date.now()/1e3},n=t(),r=this._videoElement.currentTime;this._stallInterval=window.setInterval((function(){t()-n>e._config.stallDetectionThreshold&&!e._videoElement.paused&&(r===e._videoElement.currentTime&&(m._logger.debug("stall found, break the stall"),e._videoElement.currentTime=parseFloat(e._videoElement.currentTime.toFixed(1))+.1),e._clearStallInterval()),r=e._videoElement.currentTime}),500)}},{key:"_maybeBreakStalls",value:function(){var t=this;this._config.forceBreakStall&&this._eventManager.listen(this._videoElement,e.EventType.SEEKING,(function(){return t._stallHandler()}))}},{key:"_maybeGetRedirectedUrl",value:function(t){var n=this._config.forceRedirectExternalStreams,r=this._config.redirectExternalStreamsTimeout,i=this._config.redirectExternalStreamsHandler;return new Promise((function(a){if(!n)return a(t);e.Utils.Http.jsonp(t,i,{timeout:r}).then((function(e){a(e)})).catch((function(){return a(t)}))}))}},{key:"_maybeSetFilters",value:function(){var t,n,r=this;"function"==typeof e.Utils.Object.getPropertyPath(this._config,"network.requestFilter")&&(m._logger.debug("Register request filter"),null===(t=this._shaka.getNetworkingEngine())||void 0===t||t.registerRequestFilter((function(t,n){if(Object.values(e.RequestType).includes(t)){var i,a={url:n.uris[0],body:n.body,headers:n.headers};try{i=r._config.network.requestFilter(t,a)}catch(e){i=Promise.reject(e)}return(i=i||Promise.resolve(a)).then((function(e){n.uris=[e.url],n.headers=e.headers,"boolean"==typeof e.withCredentials&&(n.allowCrossSiteCredentials=e.withCredentials),"POST"===n.method?n.body=e.body:e.body&&m._logger.warn("Request with ".concat(n.method," method cannot have body"))})).catch((function(e){throw r._requestFilterError=!0,e}))}}))),"function"==typeof e.Utils.Object.getPropertyPath(this._config,"network.responseFilter")&&(m._logger.debug("Register response filter"),null===(n=this._shaka.getNetworkingEngine())||void 0===n||n.registerResponseFilter((function(t,n){if(Object.values(e.RequestType).includes(t)){var i,a=n.uri,o=n.data,s=n.headers,l={url:a,originalUrl:r._sourceObj.url,data:o,headers:s};try{i=r._config.network.responseFilter(t,l)}catch(e){i=Promise.reject(e)}return(i=i||Promise.resolve(l)).then((function(e){n.data=e.data})).catch((function(e){throw r._responseFilterError=!0,e}))}})))}},{key:"_maybeSetDrmConfig",value:function(){if(this._sourceObj&&this._sourceObj.drmData){var t,n={},r=$(m._availableDrmProtocol);try{for(r.s();!(t=r.n()).done;)t.value.setDrmPlayback(n,this._sourceObj.drmData),this._config.shakaConfig.drm&&e.Utils.Object.mergeDeep(n.drm,this._config.shakaConfig.drm),e.Utils.Object.mergeDeep(this._config.shakaConfig,n)}catch(e){r.e(e)}finally{r.f()}}}},{key:"_maybeCapLevelToPlayerSize",value:function(){var e=this;if(this._config.capLevelToPlayerSize){var t=function(){return{minHeight:0,maxHeight:e._videoHeight,minWidth:0,maxWidth:e._videoWidth,minBitrate:0,maxBitrate:1/0}};this._clearVideoUpdateTimer(),this._videoSizeUpdateTimer=window.setInterval((function(){return e._updateRestriction(t())}),1e3),this._updateRestriction(t())}}},{key:"_maybeApplyAbrRestrictions",value:function(){this._config.capLevelToPlayerSize||(this._clearVideoUpdateTimer(),e.Utils.Object.hasPropertyPath(this._config,"abr.restrictions")&&this._updateRestriction(this._config.abr.restrictions))}},{key:"_updateRestriction",value:function(e){var t=this._getRestrictionShakaConfig(e);this._shaka.configure({abr:{restrictions:t}})}},{key:"_getRestrictionShakaConfig",value:function(e){var t=this,n=function(e){var n=t._getVideoTracks();return Math.min.apply(null,n.map((function(t){return t[e]})))},r={};if(e){var i=e.maxHeight,a=e.maxWidth,o=e.maxBitrate,s=e.minHeight,l=e.minWidth,u=e.minBitrate,c=Math.max(s,0),d=Math.max(i,n("height"));d>=c?(r.minHeight=c,r.maxHeight=d):m._logger.warn("Invalid maxHeight restriction, maxHeight must be greater than minHeight",s,i);var p=Math.max(l,0),f=Math.max(a,n("width"));f>=p?(r.minWidth=p,r.maxWidth=f):m._logger.warn("Invalid maxWidth restriction, maxWidth must be greater than minWidth",l,a);var h=Math.max(u,0),y=Math.max(o,n("bandwidth"));y>=h?(r.minBandwidth=h,r.maxBandwidth=y):m._logger.warn("Invalid maxBitrate restriction, maxBitrate must be greater than minBitrate",u,o)}return r}},{key:"attachMediaSource",value:function(){this._shaka||(this._videoElement&&this._videoElement.src&&(e.Utils.Dom.setAttribute(this._videoElement,"src",""),e.Utils.Dom.removeAttribute(this._videoElement,"src")),this._init())}},{key:"detachMediaSource",value:function(){var e=this;return this._shaka?(0===Math.floor(this.duration-this.currentTime)?this._lastTimeDetach=0:this.currentTime>0&&(this._lastTimeDetach=this.currentTime),this._reset().then((function(){e._shaka=null,e._loadPromise=void 0}))):Promise.resolve()}},{key:"_clearVideoUpdateTimer",value:function(){this._videoSizeUpdateTimer&&(clearInterval(this._videoSizeUpdateTimer),this._videoSizeUpdateTimer=null)}},{key:"_videoWidth",get:function(){var e,t=this._videoElement;return t&&(e=t.width||t.clientWidth||t.offsetWidth,e*=this._contentScaleFactor),e}},{key:"_videoHeight",get:function(){var e,t=this._videoElement;return t&&(e=t.height||t.clientHeight||t.offsetHeight,e*=this._contentScaleFactor),e}},{key:"_contentScaleFactor",get:function(){var e=1;try{e=window.devicePixelRatio}catch(e){m._logger.debug("failed reading devicePixelRatio, assume 1")}return e}},{key:"_addBindings",value:function(){var t,n=this;this._eventManager.listen(this._shaka,te,this._adapterEventsBindings.adaptation),this._eventManager.listen(this._shaka,ee,this._adapterEventsBindings.error),this._eventManager.listen(this._shaka,re,this._adapterEventsBindings.drmsessionupdate),this._eventManager.listen(this._videoElement,e.EventType.WAITING,this._adapterEventsBindings.waiting),this._eventManager.listen(this._videoElement,e.EventType.PLAYING,this._adapterEventsBindings.playing),this._eventManager.listen(this._videoElement,e.EventType.LOADED_DATA,(function(){return n._onLoadedData()})),this._eventManager.listenOnce(this._videoElement,e.EventType.PLAYING,(function(){n._eventManager.listen(n._shaka,ne,n._adapterEventsBindings.buffering)})),this._config.trackEmsgEvents&&this._eventManager.listen(this._shaka,ie,this._adapterEventsBindings.emsg),null===(t=this._shaka.getNetworkingEngine())||void 0===t||t.registerResponseFilter((function(t,r){switch(t){case T().net.NetworkingEngine.RequestType.SEGMENT:n._trigger(e.EventType.FRAG_LOADED,{miliSeconds:r.timeMs,bytes:r.data.byteLength,url:r.uri}),n.isLive()&&n._dispatchNativeEvent(e.EventType.DURATION_CHANGE);break;case T().net.NetworkingEngine.RequestType.MANIFEST:n._parseManifest(r.data),n._playbackActualUri=r.uri,n._trigger(e.EventType.MANIFEST_LOADED,{miliSeconds:r.timeMs}),setTimeout((function(){var e,t;n._isLive=n._isLive||(null===(e=n._shaka)||void 0===e?void 0:e.isLive()),!n._isLive||null!==(t=n._shaka)&&void 0!==t&&t.isLive()||n._isStaticLive||!n._config.switchDynamicToStatic||(n._sourceObj.url=r.uri,n._switchFromDynamicToStatic())}))}}))}},{key:"_onLoadedData",value:function(){var e=this;this._setLowLatencyMode();var t=this.getSegmentDuration();this._seekRangeStart=this._shaka.seekRange().start,this._startOverTimeout=window.setTimeout((function(){e._shaka.seekRange().start-e._seekRangeStart>=t&&(e._isStartOver=!1)}),1e3*(t+1))}},{key:"_switchFromDynamicToStatic",value:(a=s(E().mark((function t(){var n,r,i;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return m._logger.info("Switching from dynamic manifest to static"),this._dispatchNativeEvent(e.EventType.WAITING),n=this._videoElement.currentTime-this._seekRangeStart,r=this.isAdaptiveBitrateEnabled(),i=this._videoElement.paused,t.next=7,this.detachMediaSource();case 7:return this._isStaticLive=!0,this._isLive=!0,this.attachMediaSource(),t.next=12,this.load();case 12:this._videoElement.currentTime=n,i||this._videoElement.play(),r?this._onAdaptation():this._selectedVideoTrack&&this.selectVideoTrack(this._selectedVideoTrack);case 15:case"end":return t.stop()}}),t,this)}))),function(){return a.apply(this,arguments)})},{key:"_setLowLatencyMode",value:function(){this._shaka.configure({streaming:{lowLatencyMode:"boolean"==typeof this._config.lowLatencyMode?this._config.lowLatencyMode:this.isLive()}})}},{key:"_parseManifest",value:function(e){!this._manifestParser&&q.isValid()&&(m._logger.debug("Creating parser for the first time"),this._manifestParser=new q(e),this._manifestParser.parseManifest())}},{key:"load",value:(i=s(E().mark((function t(n){var r=this;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this._loadPromise){t.next=5;break}return t.next=3,this._removeMediaKeys();case 3:this._shaka.attach(this._videoElement),this._loadPromise=new Promise((function(t,i){if(r._sourceObj&&r._sourceObj.url){r._trigger(e.EventType.ABR_MODE_CHANGED,{mode:r.isAdaptiveBitrateEnabled()?"auto":"manual"});var a="number"==typeof n&&n>-1?n:void 0;a=isNaN(r._lastTimeDetach)?a:r._lastTimeDetach,r._lastTimeDetach=NaN,r._maybeGetRedirectedUrl(r._sourceObj.url).then((function(e){return r._shaka.load(e,a)})).then((function(){var e={tracks:r._getParsedTracks()};r._maybeCapLevelToPlayerSize(),m._logger.debug("The source has been loaded successfully"),t(e)})).catch((function(t){i(new e.Error(r._isDestroyInProgress?e.Error.Severity.RECOVERABLE:t.severity,t.category,t.code,t.data))}))}}));case 5:return t.abrupt("return",this._loadPromise);case 6:case"end":return t.stop()}}),t,this)}))),function(e){return i.apply(this,arguments)})},{key:"destroy",value:function(){var e=this;return this._isDestroyInProgress=!0,new Promise((function(t,n){y(h(m.prototype),"destroy",e).call(e).then((function(){m._logger.debug("destroy"),e._loadPromise=void 0,e._adapterEventsBindings={},e._reset().then((function(n){e._isDestroyInProgress=!1,t(n)})).catch((function(t){e._isDestroyInProgress=!1,n(t)}))}))}))}},{key:"getThumbnail",value:function(e){return this._thumbnailController?this._thumbnailController.getThumbnail(e):null}},{key:"_reset",value:function(){return this._buffering=!1,this._waitingSent=!1,this._playingSent=!1,this._isLive=!1,this._isStaticLive=!1,this._requestFilterError=!1,this._responseFilterError=!1,this._manifestParser=null,this._thumbnailController=null,this._errorCounter={},this._clearStallInterval(),this._clearVideoUpdateTimer(),clearTimeout(this._startOverTimeout),this._eventManager&&this._eventManager.removeAll(),this._shaka?this._shaka.destroy():Promise.resolve()}},{key:"_removeMediaKeys",value:(n=s(E().mark((function e(){return E().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._videoElement||!this._videoElement.mediaKeys){e.next=16;break}return e.prev=1,m._logger.debug("Removing mediaKeys from the video element"),e.next=5,this._videoElement.setMediaKeys(null);case 5:m._logger.debug("mediaKeys removed"),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(1),m._logger.warn("mediaKeys not cleared");case 11:return e.prev=11,e.abrupt("return",Promise.resolve());case 14:e.next=17;break;case 16:return e.abrupt("return",Promise.resolve());case 17:case"end":return e.stop()}}),e,this,[[1,8,11,14]])}))),function(){return n.apply(this,arguments)})},{key:"_getVideoTracks",value:function(){var e=this._shaka.getVariantTracks(),t=this._getActiveTrack();return e.filter((function(e){return e.audioId===t.audioId}))}},{key:"_getActiveTrack",value:function(){return this._shaka.getVariantTracks().find((function(e){return e.active}))}},{key:"_getAudioTracks",value:function(){var e=this._shaka.getVariantTracks(),t=this._shaka.getAudioLanguagesAndRoles();return t.forEach((function(t){var n=e.filter((function(e){return e.language===t.language})),r=n.map((function(e){return e.id})).join("_"),i=n.some((function(e){return e.active}));t.id=r,t.label=n[0].label,t.active=i})),t}},{key:"_getParsedTracks",value:function(){if(this._shaka){var e=this._getParsedVideoTracks(),t=this._getParsedAudioTracks(),n=this._getParsedTextTracks(),i=this._getParsedImageTracks();return[].concat(r(e),r(t),r(n),r(i))}return[]}},{key:"_getParsedVideoTracks",value:function(){var t=this._getVideoTracks(),n=[];if(t)for(var r=0;r<t.length;r++){var i={id:t[r].id,bandwidth:t[r].videoBandwidth||t[r].bandwidth,width:t[r].width,height:t[r].height,active:t[r].active,index:r};n.push(new e.VideoTrack(i))}return n}},{key:"_getParsedAudioTracks",value:function(){var t=this._getAudioTracks(),n=[];if(t)for(var r=0;r<t.length;r++){var i={id:t[r].id,active:t[r].active,label:t[r].label,language:t[r].language,index:r};n.push(new e.AudioTrack(i))}return n}},{key:"_getParsedTextTracks",value:function(){var t,n=[],r=$(this._shaka.getTextTracks());try{for(r.s();!(t=r.n()).done;){var i=t.value,a=i.kind?i.kind+"s":"";a=""===a&&this._config.useShakaTextTrackDisplay?"captions":a;var o={id:i.id,kind:a,active:!1,default:i.primary,label:i.label,language:i.language};n.push(new e.TextTrack(o))}}catch(e){r.e(e)}finally{r.f()}return n}},{key:"_getParsedImageTracks",value:function(){var e,t,n=null===(e=this._manifestParser)||void 0===e?void 0:e.getImageSet(),r=(null===(t=this._manifestParser)||void 0===t?void 0:t.getBaseUrl())||"";return n?(this._thumbnailController=new X(n,this._playbackActualUri,r),this._thumbnailController.getTracks()):[]}},{key:"selectVideoTrack",value:function(t){if(this._shaka){var n=this._getVideoTracks();if(t instanceof e.VideoTrack&&n){var r=n[t.index];r&&(this.isAdaptiveBitrateEnabled()&&(this._shaka.configure({abr:{enabled:!1}}),this._trigger(e.EventType.ABR_MODE_CHANGED,{mode:"manual"})),r.active||(this._selectedVideoTrack=t,this._shaka.selectVariantTrack(n[t.index],!0),this._onTrackChanged(t)))}}}},{key:"selectAudioTrack",value:function(t){this._shaka&&t instanceof e.AudioTrack&&!t.active&&(this._shaka.selectAudioLanguage(t.language),this._onTrackChanged(t))}},{key:"selectTextTrack",value:function(t){this._shaka&&t instanceof e.TextTrack&&!t.active&&("subtitles"===t.kind||"captions"===t.kind)&&(this._shaka.setTextTrackVisibility(this._config.textTrackVisibile),this._shaka.selectTextLanguage(t.language),this._onTrackChanged(t))}},{key:"selectImageTrack",value:function(t){this._shaka&&this._thumbnailController&&t instanceof e.ImageTrack&&!t.active&&(this._thumbnailController.selectTrack(t),this._onTrackChanged(t))}},{key:"hideTextTrack",value:function(){this._shaka&&this._shaka.setTextTrackVisibility(!1)}},{key:"enableAdaptiveBitrate",value:function(){this._shaka&&!this.isAdaptiveBitrateEnabled()&&(this._trigger(e.EventType.ABR_MODE_CHANGED,{mode:"auto"}),this._shaka.configure({abr:{enabled:!0}}))}},{key:"isAdaptiveBitrateEnabled",value:function(){return!!this._shaka&&this._shaka.getConfiguration().abr.enabled}},{key:"applyABRRestriction",value:function(t){if(e.Utils.Object.createPropertyPath(this._config,"abr.restrictions",t),this._maybeApplyAbrRestrictions(),!this.isAdaptiveBitrateEnabled()){var n=this._getParsedVideoTracks(),r=(0,e.filterTracksByRestriction)(n,this._config.abr.restrictions);r.length&&(r.find((function(e){return e.active}))||this.selectVideoTrack(r[0]))}}},{key:"_getLiveEdge",value:function(){return this._shaka?this._shaka.seekRange().end:NaN}},{key:"seekToLiveEdge",value:function(){this._shaka&&this._videoElement.readyState>0&&(this._videoElement.currentTime=this._getLiveEdge())}},{key:"isLive",value:function(){var e;return(null===(e=this._shaka)||void 0===e?void 0:e.isLive())||this._isLive}},{key:"liveDuration",get:function(){return this._getLiveEdge()}},{key:"getSegmentDuration",value:function(){return this._shaka?this._shaka.getStats().maxSegmentDuration:0}},{key:"_onAdaptation",value:function(){var e=this._getParsedVideoTracks().find((function(e){return e.active}));this._onTrackChanged(e)}},{key:"_onError",value:function(t){if(t&&t.detail){var n=t.detail;if(n.code===this.VIDEO_ERROR_CODE)return;(this._requestFilterError||this._responseFilterError)&&n.data[0]instanceof T().util.Error&&(n=n.data[0],this._requestFilterError?this._requestFilterError=!1:this._responseFilterError=!1),n.severity=this._shouldErrorChangeSeverity(n.code)?e.Error.Severity.CRITICAL:n.severity,this._trigger(e.EventType.ERROR,new e.Error(n.severity,n.category,n.code,n.data)),m._logger.error(n),n.severity===e.Error.Severity.CRITICAL&&this.destroy()}}},{key:"_shouldErrorChangeSeverity",value:function(e){var t=function(){return Date.now()/1e3};return e in this._errorCounter?(this._errorCounter[e].count+=1,this._errorCounter[e].count>3?(delete this._errorCounter[e],!0):t()-this._errorCounter[e].timeStamp>30&&(this._errorCounter[e].timeStamp=t(),this._errorCounter[e].count=1,!1)):(this._errorCounter[e]={count:1,timeStamp:t()},!1)}},{key:"_onBuffering",value:function(t){t.buffering?this._waitingSent||(this._dispatchNativeEvent(e.EventType.WAITING),this._buffering=!0):(this._buffering=!1,this._videoElement.paused||this._playingSent||this._dispatchNativeEvent(e.EventType.PLAYING))}},{key:"_dispatchNativeEvent",value:function(e){var t;"function"==typeof window.Event?t=new Event(e):(t=document.createEvent("Event")).initEvent(e,!0,!0),this._videoElement.dispatchEvent(t)}},{key:"_onDrmSessionUpdate",value:function(){var t;this._trigger(e.EventType.DRM_LICENSE_LOADED,{licenseTime:this._shaka.getStats().licenseTime,scheme:null===(t=this._shaka.drmInfo())||void 0===t?void 0:t.keySystem})}},{key:"_onEmsg",value:function(t){var n=t.detail,r=t.type,i=Array.from(this._videoElement.textTracks).find((function(e){return e.label===r}));i||(i=this._videoElement.addTextTrack(e.TextTrack.KIND.METADATA,r));var a=n.startTime,o=n.endTime,s=n.id,l=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(n,Q),u=new e.TimedMetadata(a,o,s,e.TimedMetadata.TYPE.EMSG,l),c=(0,e.createTextTrackCue)(u);i.addCue(c),this._trigger(e.EventType.TIMED_METADATA_ADDED,{cues:[u]})}},{key:"_onWaiting",value:function(){this._waitingSent=!0,this._playingSent=!1}},{key:"_onPlaying",value:function(){this._playingSent=!0,this._waitingSent=!1,this._buffering&&this._dispatchNativeEvent(e.EventType.WAITING)}},{key:"getStartTimeOfDvrWindow",value:function(){return this.isLive()&&this._shaka?(this._isStartOver?this._seekRangeStart:this._shaka.seekRange().start)+this._shaka.getConfiguration().streaming.safeSeekOffset:0}},{key:"targetBuffer",get:function(){var e=NaN;return this._shaka?(e=this.isLive()?this._getLiveEdge()-this._videoElement.currentTime:this._videoElement.duration-this._videoElement.currentTime,e=Math.min(e,this._shaka.getConfiguration().streaming.bufferingGoal+this._shaka.getStats().maxSegmentDuration)):NaN}},{key:"getDrmInfo",value:function(){var e=this._shaka.drmInfo();if(e){var t=e.licenseServerUri,n=e.keySystem,r=e.serverCertificateUri,i={licenseUrl:t,scheme:n};return r&&(i.certificate=r),i}return null}}],[{key:"createAdapter",value:function(t,n,r){var i=e.Utils.Object.copyDeep(w);if(e.Utils.Object.hasPropertyPath(r,"text.useNativeTextTrack")&&(i.textTrackVisibile=e.Utils.Object.getPropertyPath(r,"text.useNativeTextTrack")),e.Utils.Object.hasPropertyPath(r,"text.useShakaTextTrackDisplay")&&(i.useShakaTextTrackDisplay=e.Utils.Object.getPropertyPath(r,"text.useShakaTextTrackDisplay"),i.textTrackVisibile=i.textTrackVisibile||i.useShakaTextTrackDisplay),e.Utils.Object.hasPropertyPath(r,"streaming")){var a=r.streaming;"boolean"==typeof a.forceBreakStall&&(i.forceBreakStall=a.forceBreakStall),"number"==typeof a.stallDetectionThreshold&&(i.stallDetectionThreshold=Math.max(2,a.stallDetectionThreshold)),"boolean"==typeof a.lowLatencyMode&&(i.lowLatencyMode=a.lowLatencyMode),"boolean"==typeof a.trackEmsgEvents&&(i.trackEmsgEvents=a.trackEmsgEvents),"boolean"==typeof a.switchDynamicToStatic&&(i.switchDynamicToStatic=a.switchDynamicToStatic)}if(e.Utils.Object.hasPropertyPath(r,"sources.options")){var o=r.sources.options;i.forceRedirectExternalStreams=o.forceRedirectExternalStreams,i.redirectExternalStreamsHandler=o.redirectExternalStreamsHandler,i.redirectExternalStreamsTimeout=o.redirectExternalStreamsTimeout}if(e.Utils.Object.hasPropertyPath(r,"abr")){var s=r.abr;"boolean"==typeof s.enabled&&(i.shakaConfig.abr.enabled=s.enabled),"boolean"==typeof s.capLevelToPlayerSize&&(i.capLevelToPlayerSize=s.capLevelToPlayerSize),s.defaultBandwidthEstimate&&(i.shakaConfig.abr.defaultBandwidthEstimate=s.defaultBandwidthEstimate),s.restrictions&&e.Utils.Object.createPropertyPath(i,"abr.restrictions",s.restrictions)}return e.Utils.Object.hasPropertyPath(r,"playback.options.html5.dash")&&(e.Utils.Object.mergeDeep(i.shakaConfig,r.playback.options.html5.dash),e.Utils.Object.hasPropertyPath(i.shakaConfig,"manifest.dash.defaultPresentationDelay")&&(i.shakaConfig.manifest.defaultPresentationDelay=i.shakaConfig.manifest.dash.defaultPresentationDelay,delete i.shakaConfig.manifest.dash.defaultPresentationDelay)),i.network=r.network,new this(t,n,i)}},{key:"canPlayType",value:function(e){var t="string"==typeof e&&e.toLowerCase()===m._dashMimeType&&m.isMSESupported();return m._logger.debug("canPlayType result for mimeType: "+e+" is "+t.toString()),t}},{key:"canPlayDrm",value:function(e,t){m._availableDrmProtocol=[];var n,r=$(m._drmProtocols);try{for(r.s();!(n=r.n()).done;){var i=n.value;if(i.isConfigured(e,t)){m._availableDrmProtocol.push(i);break}}}catch(e){r.e(e)}finally{r.f()}if(!m._availableDrmProtocol.length){var a,o=$(m._drmProtocols);try{for(o.s();!(a=o.n()).done;){var s=a.value;s.canPlayDrm(e)&&m._availableDrmProtocol.push(s)}}catch(e){o.e(e)}finally{o.f()}}return!!m._availableDrmProtocol.length}},{key:"isSupported",value:function(){var e=T().Player.isBrowserSupported();return m._logger.debug("isSupported:"+e),e}}]),m}(e.BaseMediaSourceAdapter);Z=ae,v(ae,"id","DashAdapter"),v(ae,"_logger",e.BaseMediaSourceAdapter.getLogger(Z.id)),v(ae,"textContainerClass","shaka-text-container"),v(ae,"_dashMimeType","application/dash+xml"),v(ae,"_drmProtocols",[A,S]),v(ae,"_availableDrmProtocol",[]);var oe="1.37.1",se="@playkit-js/playkit-js-dash",le=ae;ae.isSupported()&&(0,e.registerMediaSourceAdapter)(ae)}(),a}())},305:(module,e,t)=>{var n,r;self,module.exports=(n=t(75),r=t(718),function(){"use strict";var e={952:function(e){e.exports=n},85:function(e){e.exports=r}},t={};function i(n){var r=t[n];if(void 0!==r)return r.exports;var a=t[n]={exports:{}};return e[n](a,a.exports,i),a.exports}i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,{a:t}),t},i.d=function(e,t){for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};return function(){i.r(a),i.d(a,{NAME:function(){return P},VERSION:function(){return x},default:function(){return R}});var e=i(952);function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function n(e,n){if(e){if("string"==typeof e)return t(e,n);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?t(e,n):void 0}}function r(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a,o,s=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){u=!0,i=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}(e,t)||n(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function l(e){var t=function(e,t){if("object"!==s(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==s(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===s(t)?t:String(t)}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,l(r.key),r)}}function c(e,t,n){return t&&u(e.prototype,t),n&&u(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function d(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function p(e){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},p(e)}function f(){return f="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=p(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},f.apply(this,arguments)}function h(e,t){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},h(e,t)}function y(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&h(e,t)}function g(e,t){if(t&&("object"===s(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return d(e)}function v(e,t,n){return(t=l(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var m,b,k=i(85),E=i.n(k),_=JSON.parse('{"recoverDecodingErrorDelay":3000,"recoverSwapAudioCodecDelay":3000,"abr":{"enabled":true,"restrictions":{}},"hlsConfig":{"fragLoadingMaxRetry":4,"maxMaxBufferLength":60},"network":{}}'),T=(v(v(v(v(v(v(v(v(v(v(m={},E().ErrorDetails.MANIFEST_LOAD_ERROR,{category:e.Error.Category.MANIFEST,code:e.Error.Code.HTTP_ERROR}),E().ErrorDetails.MANIFEST_LOAD_TIMEOUT,{category:e.Error.Category.MANIFEST,code:e.Error.Code.TIMEOUT}),E().ErrorDetails.MANIFEST_PARSING_ERROR,{category:e.Error.Category.MANIFEST,code:e.Error.Code.HLSJS_CANNOT_PARSE}),E().ErrorDetails.LEVEL_LOAD_ERROR,{category:e.Error.Category.NETWORK,code:e.Error.Code.HTTP_ERROR}),E().ErrorDetails.LEVEL_LOAD_TIMEOUT,{category:e.Error.Category.NETWORK,code:e.Error.Code.TIMEOUT}),E().ErrorDetails.LEVEL_SWITCH_ERROR,{category:e.Error.Category.PLAYER,code:e.Error.Code.BITRATE_SWITCH_ISSUE}),E().ErrorDetails.FRAG_LOAD_ERROR,{category:e.Error.Category.NETWORK,code:e.Error.Code.HTTP_ERROR}),E().ErrorDetails.FRAG_LOAD_TIMEOUT,{category:e.Error.Category.NETWORK,code:e.Error.Code.TIMEOUT}),E().ErrorDetails.FRAG_PARSING_ERROR,{category:e.Error.Category.MEDIA,code:e.Error.Code.HLS_FRAG_PARSING_ERROR}),E().ErrorDetails.BUFFER_APPEND_ERROR,{category:e.Error.Category.MEDIA,code:e.Error.Code.HLS_BUFFER_APPEND_ISSUE}),v(v(m,E().ErrorDetails.BUFFER_APPENDING_ERROR,{category:e.Error.Category.MEDIA,code:e.Error.Code.HLS_BUFFER_APPENDING_ISSUE}),E().ErrorDetails.BUFFER_STALLED_ERROR,{category:e.Error.Category.MEDIA,code:e.Error.Code.HLS_BUFFER_STALLED_ERROR})),A=function(e){y(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=p(t);if(n){var i=p(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return g(this,e)});function i(e){var t;return o(this,i),t=r.call(this,e),e&&e.readystatechange&&(t.readystatechange=e.readystatechange),t}return c(i,[{key:"loadInternal",value:function(){var e,t=this,n=this.context;e=this.loader=new XMLHttpRequest;var r=this.stats;r.tfirst=0,r.loaded=0;var i,a=this.xhrSetup;try{if(a)try{i=a(e,n.url,n)}catch(t){e.open("GET",n.url,!0),i=a(e,n.url,n)}e.readyState||e.open("GET",n.url,!0)}catch(e){i=Promise.reject(e)}(i=i||Promise.resolve()).then((function(){n.rangeEnd&&e.setRequestHeader("Range","bytes="+n.rangeStart+"-"+(n.rangeEnd-1)),e.onreadystatechange=t.readystatechange.bind(t),e.onprogress=t.loadprogress.bind(t),e.responseType=n.responseType,t.requestTimeout=window.setTimeout(t.loadtimeout.bind(t),t.config.timeout),e.send()})).catch((function(r){t.callbacks.onError({code:e.status,text:r.message},n,e)}))}}]),i}(E().DefaultConfig.loader),S=function(t){y(a,t);var n,r,i=(n=a,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=p(n);if(r){var i=p(this).constructor;e=Reflect.construct(t,arguments,i)}else e=t.apply(this,arguments);return g(this,e)});function a(t){var n;o(this,a);var r=(n=i.call(this,t)).load.bind(d(n)),s=a.redirectExternalStreamsHandler;return n.load=function(t,n,i){var o=t.url;"manifest"===t.type?e.Utils.Http.jsonp(o,s,{timeout:a.redirectExternalStreamsTimeout}).then((function(e){t.url=e,r(t,n,i)})).catch((function(){return r(t,n,i)})):r(t,n,i)},n}return c(a)}(A);function w(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}v(S,"redirectExternalStreamsHandler",(function(e,t){return t}));var C=function(i){y(u,i);var a,s,l=(a=u,s=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=p(a);if(s){var n=p(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return g(this,e)});function u(t,n,r){var i;return o(this,u),v(d(i=l.call(this,t,n,r)),"_hlsjsLib",E()),v(d(i),"_triedReloadWithRedirect",!1),v(d(i),"_playerTracks",[]),v(d(i),"_startTime",0),v(d(i),"_requestFilterError",!1),v(d(i),"_responseFilterError",!1),v(d(i),"_nativeTextTracksMap",{}),v(d(i),"_lastLoadedFragSN",-1),v(d(i),"_sameFragSNLoadedCount",0),v(d(i),"_waitForSubtitleLoad",!0),v(d(i),"_adapterEventsBindings",v(v(v(v(v(v(v(v(v({},E().Events.ERROR,(function(e,t){return i._onError(t)})),E().Events.MANIFEST_LOADED,(function(e,t){return i._onManifestLoaded(t)})),E().Events.LEVEL_SWITCHED,(function(e,t){return i._onLevelSwitched(e,t)})),E().Events.AUDIO_TRACK_SWITCHED,(function(e,t){return i._onAudioTrackSwitched(e,t)})),E().Events.FPS_DROP,(function(e,t){return i._onFpsDrop(t)})),E().Events.FRAG_PARSING_METADATA,(function(e,t){return i._onFragParsingMetadata(t)})),E().Events.FRAG_LOADED,(function(e,t){return i._onFragLoaded(t)})),E().Events.MEDIA_ATTACHED,(function(){return i._onMediaAttached()})),E().Events.LEVEL_LOADED,(function(e,t){return i._onLevelLoaded(e,t)}))),v(d(i),"_onLevelLoaded",(function(t,n){if(i.isLive()){var r=n.details.endSN;if(i._lastLoadedFragSN===r){if(i._sameFragSNLoadedCount++,u._logger.debug("Same frag SN. Count is: ".concat(i._sameFragSNLoadedCount,", Max is: ").concat(i._config.network.maxStaleLevelReloads)),i._sameFragSNLoadedCount>=i._config.network.maxStaleLevelReloads){u._logger.error("Same frag loading reached max count");var a=new e.Error(e.Error.Severity.CRITICAL,e.Error.Category.NETWORK,e.Error.Code.LIVE_MANIFEST_REFRESH_ERROR,{fragSN:r});return i._trigger(e.EventType.ERROR,a),i.destroy()}u._logger.debug("Last frag SN is: ".concat(r))}else i._sameFragSNLoadedCount=0;i._lastLoadedFragSN=r}})),u._logger.debug("Creating adapter. Hls version: "+E().version),i._config=e.Utils.Object.mergeDeep({},_,i._config),i._init(),i}return c(u,[{key:"_init",value:function(){this._config.forceRedirectExternalStreams&&(this._config.hlsConfig.pLoader=S),this._maybeSetFilters(),this._hls=new(E())(this._config.hlsConfig),this._capabilities.fpsControl=!0,this._hls.subtitleDisplay=this._config.subtitleDisplay,this._addBindings()}},{key:"_maybeSetFilters",value:function(){var r=this;if("function"==typeof e.Utils.Object.getPropertyPath(this._config,"network.requestFilter")&&(u._logger.debug("Register request filter"),e.Utils.Object.mergeDeep(this._config.hlsConfig,{loader:A,xhrSetup:function(i,a,o){var s,l={url:a,body:null,headers:{}};try{"manifest"===o.type&&(s=r._config.network.requestFilter(e.RequestType.MANIFEST,l)),o.frag&&"subtitle"!==o.frag.type&&(s=r._config.network.requestFilter(e.RequestType.SEGMENT,l))}catch(e){s=Promise.reject(e)}return(s=s||Promise.resolve(l)).then((function(e){o.url=e.url,i.open("GET",e.url,!0),Object.entries(e.headers).forEach((function(e){var r;i.setRequestHeader.apply(i,function(e){if(Array.isArray(e))return t(e)}(r=e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||n(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())})),"boolean"==typeof e.withCredentials&&(i.withCredentials=e.withCredentials)})).catch((function(e){throw r._requestFilterError=!0,e}))}})),"function"==typeof e.Utils.Object.getPropertyPath(this._config,"network.responseFilter")){var i=this;u._logger.debug("Register response filter"),e.Utils.Object.mergeDeep(this._config.hlsConfig,{loader:A,readystatechange:function(t){var n=this,r=t.currentTarget,a=r.readyState,o=this.stats,s=this.context,l=this.config;if(!o.aborted&&a>=2){window.clearTimeout(this.requestTimeout);var c=o.loading;if(0===c.first&&(c.first=Math.max(performance.now(),c.start)),4===a){var d=r.status;if(d>=200&&d<300){var p,f;c.end=Math.max(o.tfirst,performance.now()),f="arraybuffer"===s.responseType?(p=r.response).byteLength:(p=r.responseText).length,o.loaded=o.total=f;var h,y={url:r.responseURL,originalUrl:s.url,data:p,headers:e.Utils.Http.convertHeadersToDictionary(r.getAllResponseHeaders())};try{"manifest"===s.type&&(h=i._config.network.responseFilter(e.RequestType.MANIFEST,y)),s.frag&&"subtitle"!==s.frag.type&&(h=i._config.network.responseFilter(e.RequestType.SEGMENT,y))}catch(e){h=Promise.reject(e)}return(h=h||Promise.resolve(y)).then((function(e){n.callbacks.onSuccess(e,o,s,r)})).catch((function(e){i._responseFilterError=!0,n.callbacks.onError({code:d,text:e.message},s,r)}))}o.retry>=l.maxRetry||d>=400&&d<499?(u._logger.error("".concat(d," while loading ").concat(s.url)),this.callbacks.onError({code:d,text:r.statusText},s,r)):(u._logger.warn("".concat(d," while loading ").concat(s.url,", retrying in ").concat(this.retryDelay,"...")),this.destroy(),this.retryTimeout=window.setTimeout(this.loadInternal.bind(this),this.retryDelay),this.retryDelay=Math.min(2*this.retryDelay,l.maxRetryDelay),o.retry++)}else this.requestTimeout=window.setTimeout(this.loadtimeout.bind(this),l.timeout)}}})}}},{key:"_addBindings",value:function(){var e=this;this._mediaAttachedPromise=new Promise((function(t){return e._onMediaAttached=t}));for(var t=0,n=Object.entries(this._adapterEventsBindings);t<n.length;t++){var i=r(n[t],2),a=i[0],o=i[1];this._hls.on(a,o)}this._onRecoveredCallback=function(){return e._onRecovered()},this._onAddTrack=this._onAddTrack.bind(this),this._eventManager.listen(this._videoElement,"addtrack",this._onAddTrack),this._videoElement.textTracks.onaddtrack=this._onAddTrack}},{key:"_onFpsDrop",value:function(t){this._trigger(e.EventType.FPS_DROP,t)}},{key:"_onFragParsingMetadata",value:function(t){var n;this._trigger("hlsFragParsingMetadata",t);var r=Array.from(null===(n=this._videoElement)||void 0===n?void 0:n.textTracks).find((function(e){return"id3"===e.label})),i=Array.from((null==r?void 0:r.cues)||[]),a=[];null==t||t.samples.forEach((function(t){var n=e.Utils.binarySearch(i,(function(e){return e.startTime-t.pts}));if(n){var r=(0,e.createTimedMetadata)(n);a.push(r)}})),a.length&&this._trigger(e.EventType.TIMED_METADATA_ADDED,{cues:a})}},{key:"_onAddTrack",value:function(t){if(!this._hls.subtitleTracks.length){var n=this._parseCEATextTrack(t.track);n&&(u._logger.debug("A CEA 608/708 caption has been found",n),this._playerTracks.push(n),this._trigger(e.EventType.TRACKS_CHANGED,{tracks:this._playerTracks}))}}},{key:"attachMediaSource",value:function(){this._hls||(this._videoElement&&this._videoElement.src&&(e.Utils.Dom.setAttribute(this._videoElement,"src",""),e.Utils.Dom.removeAttribute(this._videoElement,"src")),this._init())}},{key:"detachMediaSource",value:function(){var t;this._hls&&(0===Math.floor(this.duration-this.currentTime)?this._config.hlsConfig.startPosition=0:this.currentTime>0&&(this._config.hlsConfig.startPosition=this.currentTime),this._reset(),null===(t=this._loadPromiseHandlers)||void 0===t||t.reject(new e.Error(e.Error.Severity.CRITICAL,e.Error.Category.PLAYER,e.Error.Code.HLS_FATAL_MEDIA_ERROR,"media detached while loading")),this._loadPromiseHandlers=null,this._loadPromise=void 0,this._hls=null)}},{key:"handleMediaError",value:function(e){return e.code===e.MEDIA_ERR_DECODE&&(u._logger.debug("The video playback was aborted due to a corruption problem or because the video used features your browser did not support.",e.message),this._handleMediaError(E().ErrorDetails.MANIFEST_INCOMPATIBLE_CODECS_ERROR))}},{key:"load",value:function(e){var t=this;return this._loadPromise||(this._startTime=e,this._loadPromise=new Promise((function(e,n){t._loadPromiseHandlers={resolve:e,reject:n},t._loadInternal()}))),this._loadPromise}},{key:"_loadInternal",value:function(){var t;this._hls&&this._sourceObj&&this._sourceObj.url?(this._hls.loadSource(this._sourceObj.url),this._hls.attachMedia(this._videoElement),this._trigger(e.EventType.ABR_MODE_CHANGED,{mode:this.isAdaptiveBitrateEnabled()?"auto":"manual"})):null===(t=this._loadPromiseHandlers)||void 0===t||t.reject(new e.Error(e.Error.Severity.CRITICAL,e.Error.Category.PLAYER,e.Error.Code.HLS_FATAL_MEDIA_ERROR,"no url provided"))}},{key:"_reloadWithDirectManifest",value:function(){this._triedReloadWithRedirect=!0,this._reset(),this._config.hlsConfig.pLoader=S,this._hls=new(E())(this._config.hlsConfig),this._addBindings(),this._loadInternal()}},{key:"destroy",value:function(){var t=this;return new Promise((function(n,r){f(p(u.prototype),"destroy",t).call(t).then((function(){var r;u._logger.debug("destroy"),t._playerTracks=[],t._nativeTextTracksMap={},t._sameFragSNLoadedCount=0,t._lastLoadedFragSN=-1,null===(r=t._loadPromiseHandlers)||void 0===r||r.reject(new e.Error(e.Error.Severity.CRITICAL,e.Error.Category.PLAYER,e.Error.Code.HLS_FATAL_MEDIA_ERROR,"The adapter has been destroyed while loading")),t._loadPromiseHandlers=null,t._loadPromise=void 0,t._reset(),n()}),(function(){return r()}))}))}},{key:"_reset",value:function(){this._removeBindings(),this._requestFilterError=!1,this._responseFilterError=!1,this._hls.detachMedia(),this._hls.destroy()}},{key:"_parseTracks",value:function(){var e=this._parseAudioTracks(this._hls.audioTracks||[]),t=this._parseVideoTracks(this._hls.levels||[]),n=this._parseTextTracks(this._hls.subtitleTracks||[]);return e.concat(t).concat(n)}},{key:"_parseAudioTracks",value:function(t){for(var n=[],r=0;r<t.length;r++){var i={id:t[r].id,active:this._hls.audioTrack===t[r].id,label:t[r].name,language:t[r].lang,index:r};n.push(new e.AudioTrack(i))}return n}},{key:"_parseVideoTracks",value:function(t){for(var n=[],r=0;r<t.length;r++){var i={active:this._hls.startLevel===r,bandwidth:t[r].bitrate,width:t[r].width,height:t[r].height,language:"",index:r};n.push(new e.VideoTrack(i))}return n}},{key:"_parseTextTracks",value:function(t){var n,r=[],i=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return w(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?w(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}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 a,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}(t);try{for(i.s();!(n=i.n()).done;){var a=n.value,o={id:a.id,active:!1,default:a.default,label:a.name,kind:a.type.toLowerCase(),language:a.lang};r.push(new e.TextTrack(o))}}catch(e){i.e(e)}finally{i.f()}return r}},{key:"_parseCEATextTrack",value:function(t){var n=null;if("captions"===t.kind){var r={id:t.id,active:"showing"===t.mode,label:t.label,kind:t.kind,language:t.language};n=new e.TextTrack(r),this._nativeTextTracksMap[n.index]=t}return n}},{key:"selectAudioTrack",value:function(t){t instanceof e.AudioTrack&&!t.active&&this._hls.audioTracks&&(this._hls.audioTrack=t.id)}},{key:"selectVideoTrack",value:function(t){t instanceof e.VideoTrack&&(!t.active||this.isAdaptiveBitrateEnabled())&&this._hls.levels&&(this.isAdaptiveBitrateEnabled()&&this._trigger(e.EventType.ABR_MODE_CHANGED,{mode:"manual"}),this._hls.currentLevel=t.index)}},{key:"selectTextTrack",value:function(t){t instanceof e.TextTrack&&!t.active&&this._hls&&(this._hls.subtitleTracks.length?(this._hls.subtitleTrack=t.id,this._notifyTrackChanged(t)):this._selectNativeTextTrack(t))}},{key:"_selectNativeTextTrack",value:function(e){var t=this._nativeTextTracksMap[e.index];t&&(this.disableNativeTextTracks(),t.mode=this._config.subtitleDisplay?"showing":"hidden",this._notifyTrackChanged(e))}},{key:"_notifyTrackChanged",value:function(e){this._onTrackChanged(e)}},{key:"_onSubtitleFragProcessed",value:function(){this._hls.subtitleTrack=-1,this._waitForSubtitleLoad=!1,this._hls.off(E().Events.SUBTITLE_FRAG_PROCESSED,this._onSubtitleFragProcessed,this._hls)}},{key:"hideTextTrack",value:function(){this._hls&&(this._hls.subtitleTracks.length?this._waitForSubtitleLoad?this._hls.on(E().Events.SUBTITLE_FRAG_PROCESSED,this._onSubtitleFragProcessed,this._hls):this._hls.subtitleTrack=-1:this.disableNativeTextTracks())}},{key:"enableAdaptiveBitrate",value:function(){this.isAdaptiveBitrateEnabled()||(this._trigger(e.EventType.ABR_MODE_CHANGED,{mode:"auto"}),this._hls.nextLevel=-1)}},{key:"isAdaptiveBitrateEnabled",value:function(){return!!this._hls&&this._hls.autoLevelEnabled}},{key:"applyABRRestriction",value:function(t){e.Utils.Object.createPropertyPath(this._config,"abr.restrictions",t),this._hls.capLevelToPlayerSize||this._maybeApplyAbrRestrictions(t)}},{key:"_getLevelDetails",value:function(){var e=this._hls.levels[this._hls.currentLevel]||this._hls.levels[this._hls.nextLevel]||this._hls.levels[this._hls.nextAutoLevel]||this._hls.levels[this._hls.nextLoadLevel];return e&&e.details?e.details:{}}},{key:"_getLiveEdge",value:function(){try{var e;return(e=this._hls.liveSyncPosition?this._hls.liveSyncPosition:this._hls.config.liveSyncDuration?this._videoElement.duration-this._hls.config.liveSyncDuration:this._videoElement.duration-this._hls.config.liveSyncDurationCount*this._getLevelDetails().targetduration)>0?e:this._videoElement.duration}catch(e){return u._logger.debug("Live edge calculation failed, fall back to duration"),this._videoElement.duration}}},{key:"seekToLiveEdge",value:function(){try{this._videoElement.currentTime=this._getLiveEdge()}catch(e){return}}},{key:"getSegmentDuration",value:function(){var t=e.Utils.Object.getPropertyPath(this._hls,"streamController.fragCurrent");return t?t.duration:0}},{key:"liveDuration",get:function(){return this._getLiveEdge()+this.getSegmentDuration()}},{key:"isLive",value:function(){try{return!!this._getLevelDetails().live}catch(e){return!1}}},{key:"_onManifestLoaded",value:function(t){var n=this;u._logger.debug("The source has been loaded successfully"),this._hls.config.autoStartLoad||this._hls.startLoad(this._startTime),this._playerTracks=this._parseTracks(),this._config.abr.enabled||(this._hls.currentLevel=0),this._mediaAttachedPromise.then((function(){var e;null===(e=n._loadPromiseHandlers)||void 0===e||e.resolve({tracks:n._playerTracks}),n._loadPromiseHandlers=null}));var r=t.stats.loading,i=r.end-r.start;this._trigger(e.EventType.MANIFEST_LOADED,{miliSeconds:i})}},{key:"_maybeApplyAbrRestrictions",value:function(t){var n=this._playerTracks.filter((function(t){return t instanceof e.VideoTrack})),r=(0,e.filterTracksByRestriction)(n,t);if(r.length){var i=r[0],a=r.pop();this._hls.config.minAutoBitrate=i.bandwidth,this._hls.autoLevelCapping=a.index;var o=r.some((function(e){return e.active}));this.isAdaptiveBitrateEnabled()||o||this.selectVideoTrack(i)}else u._logger.warn("Invalid restrictions, there are not tracks within the restriction range")}},{key:"_onLevelSwitched",value:function(t,n){var r=this._playerTracks.find((function(t){return t instanceof e.VideoTrack&&t.index===n.level}));this._onTrackChanged(r)}},{key:"_onAudioTrackSwitched",value:function(t,n){var r=this._playerTracks.find((function(t){return t instanceof e.AudioTrack&&t.id===n.id}));this._onTrackChanged(r),this._handleWaitingUponAudioTrackSwitch()}},{key:"_handleWaitingUponAudioTrackSwitch",value:function(){var t=this;["IE","Edge"].includes(e.Env.browser.name)&&this._eventManager.listenOnce(this._videoElement,e.EventType.TIME_UPDATE,(function(){t._trigger(e.EventType.PLAYING)}))}},{key:"_getErrorDataObject",value:function(e){var t={};switch(t.name=e.details,t.name){case E().ErrorDetails.MANIFEST_LOAD_ERROR:case E().ErrorDetails.LEVEL_LOAD_ERROR:case E().ErrorDetails.AUDIO_TRACK_LOAD_ERROR:t.url=e.url,t.responseCode=e.response?e.response.code:null;break;case E().ErrorDetails.MANIFEST_LOAD_TIMEOUT:case E().ErrorDetails.LEVEL_LOAD_TIMEOUT:case E().ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:t.url=e.url;break;case E().ErrorDetails.MANIFEST_PARSING_ERROR:t.url=e.url,t.reason=e.reason;break;case E().ErrorDetails.LEVEL_SWITCH_ERROR:t.level=e.level,t.reason=e.reason;break;case E().ErrorDetails.FRAG_LOAD_ERROR:t.fragUrl=e.frag?e.frag.url:null,t.responseCode=e.response?e.response.code:null;break;case E().ErrorDetails.FRAG_LOAD_TIMEOUT:t.fragUrl=e.frag?e.frag.url:null;break;case E().ErrorDetails.FRAG_DECRYPT_ERROR:case E().ErrorDetails.FRAG_PARSING_ERROR:t.reason=e.reason;break;case E().ErrorDetails.KEY_LOAD_ERROR:t.fragDecryptedDataUri=e.frag&&e.frag.decryptdata?e.frag.decryptdata.uri:null,t.responseCode=e.response?e.response.code:null;break;case E().ErrorDetails.KEY_LOAD_TIMEOUT:t.fragDecryptedDataUri=e.frag&&e.frag.decryptdata?e.frag.decryptdata.uri:null;break;case E().ErrorDetails.BUFFER_ADD_CODEC_ERROR:t.mimeType=e.mimeType,t.errorMsg=e.err?e.err.message:null;break;case E().ErrorDetails.BUFFER_STALLED_ERROR:t.buffer=e.buffer}return(this._requestFilterError||this._responseFilterError)&&(t.reason=e.response.text),t}},{key:"_onError",value:function(t){var n=t.type,r=t.details,i=t.fatal,a=this._getErrorDataObject(t);if(i){var o,s;switch(n){case E().ErrorTypes.NETWORK_ERROR:var l;l=this._requestFilterError?e.Error.Code.REQUEST_FILTER_ERROR:this._responseFilterError?e.Error.Code.RESPONSE_FILTER_ERROR:e.Error.Code.HTTP_ERROR,![E().ErrorDetails.MANIFEST_LOAD_ERROR,E().ErrorDetails.MANIFEST_LOAD_TIMEOUT].includes(r)||this._triedReloadWithRedirect||this._config.forceRedirectExternalStreams||this._requestFilterError||this._responseFilterError?o=new e.Error(e.Error.Severity.CRITICAL,e.Error.Category.NETWORK,l,a):(o=new e.Error(e.Error.Severity.RECOVERABLE,e.Error.Category.NETWORK,l,a),this._reloadWithDirectManifest());break;case E().ErrorTypes.MEDIA_ERROR:o=this._handleMediaError(r)?new e.Error(e.Error.Severity.RECOVERABLE,e.Error.Category.MEDIA,e.Error.Code.HLS_FATAL_MEDIA_ERROR,a):new e.Error(e.Error.Severity.CRITICAL,e.Error.Category.MEDIA,e.Error.Code.HLS_FATAL_MEDIA_ERROR,a);break;default:o=new e.Error(e.Error.Severity.CRITICAL,e.Error.Category.PLAYER,e.Error.Code.HLS_FATAL_MEDIA_ERROR,a)}this._trigger(e.EventType.ERROR,o),o&&o.severity===e.Error.Severity.CRITICAL&&(this._loadPromiseHandlers&&(null===(s=this._loadPromiseHandlers)||void 0===s||s.reject(o),this._loadPromiseHandlers=null,this._loadPromise=void 0),this.destroy())}else{var c=this._requestFilterError||this._responseFilterError?{category:e.Error.Category.NETWORK,code:this._requestFilterError?e.Error.Code.REQUEST_FILTER_ERROR:e.Error.Code.RESPONSE_FILTER_ERROR}:T[r]||{category:0,code:0},d=c.category,p=c.code;u._logger.warn(new e.Error(e.Error.Severity.RECOVERABLE,d,p,a))}this._requestFilterError=!1,this._responseFilterError=!1}},{key:"_handleMediaError",value:function(t){u._logger.error("_handleMediaError mediaErrorName:",t);var n=performance.now(),r=!0;return t===E().ErrorDetails.MANIFEST_INCOMPATIBLE_CODECS_ERROR?(u._logger.error("recover aborted due to: MANIFEST_INCOMPATIBLE_CODECS_ERROR"),r=!1):this._checkTimeDeltaHasPassed(n,this._recoverDecodingErrorDate,this._config.recoverDecodingErrorDelay)?(this._eventManager.listen(this._videoElement,e.EventType.LOADED_METADATA,this._onRecoveredCallback),u._logger.debug("try to recover using: _recoverDecodingError()"),this._recoverDecodingError()):this._checkTimeDeltaHasPassed(n,this._recoverSwapAudioCodecDate,this._config.recoverSwapAudioCodecDelay)?(this._eventManager.listen(this._videoElement,e.EventType.LOADED_METADATA,this._onRecoveredCallback),u._logger.debug("try to recover using: _recoverSwapAudioCodec()"),this._recoverSwapAudioCodec()):(u._logger.error("cannot recover, last media error recovery failed error: ",t),r=!1),r}},{key:"_onRecovered",value:function(){this._trigger(e.EventType.MEDIA_RECOVERED),this._videoElement.removeEventListener(e.EventType.LOADED_METADATA,this._onRecoveredCallback)}},{key:"_checkTimeDeltaHasPassed",value:function(e,t,n){return!t||e-t>n}},{key:"_recoverDecodingError",value:function(){this._recoverDecodingErrorDate=performance.now(),u._logger.warn("try to recover media Error"),this._hls.recoverMediaError()}},{key:"_recoverSwapAudioCodec",value:function(){this._recoverSwapAudioCodecDate=performance.now(),u._logger.warn("try to swap Audio Codec and recover media Error"),this._hls.swapAudioCodec(),this._hls.recoverMediaError()}},{key:"_removeBindings",value:function(){for(var e=0,t=Object.entries(this._adapterEventsBindings);e<t.length;e++){var n=r(t[e],2),i=n[0],a=n[1];this._hls.off(i,a)}this._hls.off(E().Events.SUBTITLE_FRAG_PROCESSED,this._onSubtitleFragProcessed,this._hls),this._videoElement.textTracks.onaddtrack=null,this._onRecoveredCallback=null,this._eventManager&&this._eventManager.removeAll()}},{key:"getStartTimeOfDvrWindow",value:function(){if(!this.isLive())return 0;try{var e=this._hls.levels[this._hls.nextLoadLevel].details,t=e.fragments,n=t.length,r=t[0].start+t[0].duration,i=t[n-1].start+t[n-1].duration,a=void 0!==this._hls.config.liveMaxLatencyDuration?this._hls.config.liveMaxLatencyDuration:this._hls.config.liveMaxLatencyDurationCount*e.targetduration;return Math.max(r-this._hls.config.maxFragLookUpTolerance,i-a)}catch(e){return u._logger.debug("Unable obtain the start of DVR window"),0}}},{key:"_onFragLoaded",value:function(t){if(e.Utils.Object.hasPropertyPath(t,"frag.stats.loading")){var n=t.frag.stats,r=n.loading.end-n.loading.start;this._trigger(e.EventType.FRAG_LOADED,{miliSeconds:r,bytes:n.loaded,url:t.frag.url})}}},{key:"targetBuffer",get:function(){var e=NaN;return this._hls?(e=this.isLive()?this._getLiveTargetBuffer()-(this._videoElement.currentTime-this._getLiveEdge()):this._videoElement.duration-this._videoElement.currentTime,e=Math.min(e,this._hls.config.maxMaxBufferLength+this._getLevelDetails().targetduration)):NaN}},{key:"_getLiveTargetBuffer",value:function(){return this._hls.config.liveSyncDuration?this._hls.config.liveSyncDuration:this._hls.config.liveSyncDurationCount*this._getLevelDetails().targetduration}}],[{key:"createAdapter",value:function(t,n,r){var i=e.Utils.Object.copyDeep(_);if(e.Utils.Object.hasPropertyPath(r,"sources.options")){var a=r.sources.options;i.forceRedirectExternalStreams=a.forceRedirectExternalStreams,i.redirectExternalStreamsHandler=a.redirectExternalStreamsHandler,i.redirectExternalStreamsTimeout=a.redirectExternalStreamsTimeout,S.redirectExternalStreamsHandler=i.redirectExternalStreamsHandler,S.redirectExternalStreamsTimeout=i.redirectExternalStreamsTimeout}if(e.Utils.Object.hasPropertyPath(r,"sources.startTime")&&e.Utils.Object.getPropertyPath(r,"sources.startTime")>-1&&(i.hlsConfig.startPosition=r.sources.startTime),e.Utils.Object.hasPropertyPath(r,"text.useNativeTextTrack")&&(i.subtitleDisplay=e.Utils.Object.getPropertyPath(r,"text.useNativeTextTrack")),e.Utils.Object.hasPropertyPath(r,"abr.fpsDroppedFramesInterval")&&(i.hlsConfig.fpsDroppedFramesInterval=r.abr.fpsDroppedFramesInterval),e.Utils.Object.hasPropertyPath(r,"abr.fpsDroppedMonitoringThreshold")&&(i.hlsConfig.fpsDroppedMonitoringThreshold=r.abr.fpsDroppedMonitoringThreshold),e.Utils.Object.hasPropertyPath(r,"abr.capLevelOnFPSDrop")&&(u._logger.debug("capLevelOnFPSDrop = ",r.abr.capLevelOnFPSDrop),i.hlsConfig.capLevelOnFPSDrop=r.abr.capLevelOnFPSDrop),e.Utils.Object.hasPropertyPath(r,"text")&&(i.hlsConfig.enableCEA708Captions=r.text.enableCEA708Captions,i.hlsConfig.captionsTextTrack1Label=r.text.captionsTextTrack1Label,i.hlsConfig.captionsTextTrack1LanguageCode=r.text.captionsTextTrack1LanguageCode,i.hlsConfig.captionsTextTrack2Label=r.text.captionsTextTrack2Label,i.hlsConfig.captionsTextTrack2LanguageCode=r.text.captionsTextTrack2LanguageCode),e.Utils.Object.hasPropertyPath(r,"abr")){var o=r.abr;"boolean"==typeof o.enabled&&(i.abr.enabled=o.enabled),"boolean"==typeof o.capLevelToPlayerSize&&(i.hlsConfig.capLevelToPlayerSize=o.capLevelToPlayerSize),o.defaultBandwidthEstimate&&(i.hlsConfig.abrEwmaDefaultEstimate=o.defaultBandwidthEstimate),o.restrictions&&e.Utils.Object.createPropertyPath(i,"abr.restrictions",o.restrictions)}return e.Utils.Object.hasPropertyPath(r,"streaming.lowLatencyMode")&&(i.hlsConfig.lowLatencyMode=e.Utils.Object.getPropertyPath(r,"streaming.lowLatencyMode")),e.Utils.Object.hasPropertyPath(r,"playback.options.html5.hls")&&e.Utils.Object.mergeDeep(i.hlsConfig,r.playback.options.html5.hls),i.network=r.network,new this(t,n,i)}},{key:"canPlayType",value:function(e){var t="string"==typeof e&&u._hlsMimeTypes.includes(e.toLowerCase())&&u.isMSESupported();return u._logger.debug("canPlayType result for mimeType:"+e+" is "+t.toString()),t}},{key:"canPlayDrm",value:function(){return u._logger.warn("canPlayDrm result is false"),!1}},{key:"isSupported",value:function(){var e=E().isSupported();return u._logger.debug("isSupported:"+e),e}}]),u}(e.BaseMediaSourceAdapter);b=C,v(C,"id","HlsAdapter"),v(C,"_logger",e.BaseMediaSourceAdapter.getLogger(b.id)),v(C,"_hlsMimeTypes",["application/x-mpegurl","application/vnd.apple.mpegurl","audio/mpegurl","audio/x-mpegurl","video/x-mpegurl","video/mpegurl","application/mpegurl"]);var x="1.32.13",P="@playkit-js/playkit-js-hls",R=C;C.isSupported()&&(0,e.registerMediaSourceAdapter)(C)}(),a}())},859:module=>{self,module.exports=function(){"use strict";var e={d:function(t,n){for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r:function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{NAME:function(){return Pe},Provider:function(){return xe},ProviderParser:function(){return ae},RequestBuilder:function(){return se},ResponseTypes:function(){return n},VERSION:function(){return Re}});var n={};function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function a(e){var t=function(e,t){if("object"!==i(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===i(t)?t:String(t)}function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,a(r.key),r)}}function s(e,t,n){return t&&o(e.prototype,t),n&&o(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function l(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function u(e,t){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},u(e,t)}function c(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&u(e,t)}function d(e,t){if(t&&("object"===i(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return l(e)}function p(e){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},p(e)}function f(e,t,n){return(t=a(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}e.r(n),e.d(n,{BaseServiceResult:function(){return E},KalturaAccessControlMessage:function(){return L},KalturaAccessControlModifyRequestHostRegexAction:function(){return w},KalturaBaseEntryListResponse:function(){return A},KalturaBumper:function(){return P},KalturaDrmPlaybackPluginData:function(){return C},KalturaFlavorAsset:function(){return R},KalturaMediaEntries:function(){return I},KalturaMediaEntry:function(){return T},KalturaMetadata:function(){return D},KalturaMetadataListResponse:function(){return O},KalturaPlaybackContext:function(){return M},KalturaPlaybackSource:function(){return x},KalturaPlaylist:function(){return N},KalturaRuleAction:function(){return S},KalturaUIConfResponse:function(){return U},KalturaUserEntry:function(){return B},KalturaUserEntryListResponse:function(){return F}});var h={get:function(){return{VERSION:"",DEBUG:{value:"",name:""},ERROR:{value:"",name:""},INFO:{value:"",name:""},OFF:{value:"",name:""},TIME:{value:"",name:""},TRACE:{value:"",name:""},WARN:{value:"",name:""},createDefaultHandler:function(){},debug:function(){},enabledFor:function(){},error:function(){},get:function(){},getLevel:function(){},info:function(){},log:function(){},setHandler:function(){},setLevel:function(){},time:function(){},timeEnd:function(){},trace:function(){},useDefaults:function(){},warn:function(){}}}},y={};function g(e){return h.get(e)}var v=g,m=function e(t){var n;return Array.isArray(t)?(n=t.length>0?t.slice(0):[]).forEach((function(t,r){("object"===i(t)||Array.isArray(t)&&t.length>0)&&(n[r]=e(t))})):"object"===i(t)?(n=Object.assign({},t),Object.keys(n).forEach((function(t){("object"===i(n[t])||Array.isArray(n[t])&&n[t].length>0)&&(n[t]=e(n[t]))}))):n=t,n},b={serviceUrl:"https://cdnapisec.kaltura.com/api_v3",cdnUrl:"https://cdnapisec.kaltura.com",serviceParams:{apiVersion:"3.3.0",format:1},useApiCaptions:!0,loadThumbnailWithKs:!1,replaceHostOnlyManifestUrls:!1},k=function(){function e(){r(this,e)}return s(e,null,[{key:"set",value:function(e){e&&Object.assign(b,e)}},{key:"get",value:function(){return m(b)}}]),e}(),E=s((function e(t){r(this,e),f(this,"hasError",!1),"KalturaAPIException"===t.objectType?(this.hasError=!0,this.error=new _(t.code,t.message)):t.error&&"KalturaAPIException"===t.error.objectType?(this.hasError=!0,this.error=new _(t.error.code,t.error.message)):this.data=t})),_=s((function e(t,n){r(this,e),this.code=t,this.message=n})),T=s((function e(t){r(this,e),this.id=t.id,this.referenceId=t.referenceId,this.externalSourceType=t.externalSourceType,this.name=t.name,this.description=t.description,this.dataUrl=t.dataUrl,this.type=t.type,this.entryType=t.mediaType,this.flavorParamsIds=t.flavorParamsIds,this.duration=t.duration,this.poster=t.thumbnailUrl,this.rawThumbnailUrl=t.thumbnailUrl,this.status=t.status,this.dvrStatus=t.dvrStatus,this.tags=t.tags,this.createdAt=t.createdAt,this.updatedAt=t.updatedAt,this.creatorId=t.creatorId,this.endDate=t.endDate,this.plays=t.plays,this.views=t.views,this.downloadUrl=t.downloadUrl}));f(T,"EntryType",{AUTOMATIC:{value:-1},EXTERNAL_MEDIA:{value:"externalMedia.externalMedia"},MEDIA_CLIP:{value:1},MIX:{value:2},PLAYLIST:{value:5},DATA:{value:6},LIVE_STREAM:{value:7},LIVE_CHANNEL:{value:8},DOCUMENT:{value:10}}),f(T,"MediaType",{VIDEO:{value:1},IMAGE:{value:2},AUDIO:{value:5},LIVE_STREAM_FLASH:{value:201},LIVE_STREAM_WINDOWS_MEDIA:{value:202},LIVE_STREAM_REAL_MEDIA:{value:203},LIVE_STREAM_QUICK_TIME:{value:204}}),f(T,"EntryStatus",{ERROR_IMPORTING:-2,ERROR_CONVERTING:-1,SCAN_FAILURE:"virusScan.ScanFailure",IMPORT:0,INFECTED:"virusScan.Infected",PRECONVERT:1,READY:2,DELETED:3,PENDING:4,MODERATE:5,BLOCKED:6,NO_CONTENT:7}),f(T,"EntryModerationStatus",{PENDING_MODERATION:1,APPROVED:2,REJECTED:3,FLAGGED_FOR_REVIEW:4,MODERATE:5,AUTO_APPROVED:6});var A=function(e){c(a,e);var t,n,i=(t=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=p(t);if(n){var i=p(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return d(this,e)});function a(e){var t;return r(this,a),(t=i.call(this,e)).hasError||(t.totalCount=e.totalCount,t.totalCount>0&&(t.entries=[],e.objects.map((function(e){return t.entries.push(new T(e))})))),t}return s(a)}(E),S=s((function e(t){r(this,e),this.type=t.type}));f(S,"Type",{DRM_POLICY:"drm.DRM_POLICY",BLOCK:1,PREVIEW:2,LIMIT_FLAVORS:3,ADD_TO_STORAGE:4,LIMIT_DELIVERY_PROFILES:5,SERVE_FROM_REMOTE_SERVER:6,REQUEST_HOST_REGEX:7,LIMIT_THUMBNAIL_CAPTURE:8});var w=function(e){c(a,e);var t,n,i=(t=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=p(t);if(n){var i=p(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return d(this,e)});function a(e){var t;return r(this,a),(t=i.call(this,e)).pattern=e.pattern,t.replacement=e.replacement,t.replacmenServerNodeId=e.replacmenServerNodeId,t.checkAliveTimeoutMs=e.checkAliveTimeoutMs,t}return s(a)}(S),C=s((function e(t){r(this,e),this.scheme=t.scheme,this.licenseURL=t.licenseURL,this.certificate=t.certificate}));f(C,"Scheme",{"drm.PLAYREADY_CENC":"com.microsoft.playready","drm.WIDEVINE_CENC":"com.widevine.alpha","fairplay.FAIRPLAY":"com.apple.fairplay",WIDEVINE_CENC:"com.widevine.alpha",PLAYREADY_CENC:"com.microsoft.playready",FAIRPLAY:"com.apple.fairplay"});var x=function(){function e(t){var n=this;r(this,e),f(this,"drm",[]),this.format=t.format,this.deliveryProfileId=t.deliveryProfileId,this.url=t.url,this.protocols=t.protocols,this.flavorIds=t.flavorIds,t.drm&&t.drm.map((function(e){return n.drm.push(new C(e))}))}return s(e,[{key:"hasDrmData",value:function(){return this.drm&&this.drm.length>0}},{key:"hasFlavorIds",value:function(){return!!this.flavorIds&&this.flavorIds.length>0}},{key:"getProtocol",value:function(e){var t="";if(this.protocols&&this.protocols.length>0)this.protocols.split(",").forEach((function(n){n===e&&(t=n)}));else if("http"===e)return e;return t}}]),e}(),P=s((function e(t){r(this,e),this.entryId=t.entryId,this.clickThroughUrl=t.url,this.sources=t.sources?t.sources.map((function(e){return new x(e)})):[]})),R=s((function e(t){r(this,e),this.id=t.id,this.flavorParamsId=t.flavorParamsId,this.fileExt=t.fileExt,this.bitrate=t.bitrate,this.width=t.width,this.height=t.height,this.id=t.id,this.frameRate=t.frameRate,this.isOriginal=t.isOriginal,this.isWeb=t.isWeb,this.containerFormat=t.containerFormat,this.videoCodecId=t.videoCodecId,this.status=t.status,this.language=t.language,this.label=t.label}));f(R,"Status",{ERROR:-1,QUEUED:0,CONVERTING:1,READY:2,DELETED:3,NOT_APPLICABLE:4,TEMP:5,WAIT_FOR_CONVERT:6,IMPORTING:7,VALIDATING:8,EXPORTING:9});var I=function(e){c(a,e);var t,n,i=(t=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=p(t);if(n){var i=p(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return d(this,e)});function a(e){var t;return r(this,a),(t=i.call(this,e)).hasError||(t.entries=[],e.map((function(e){return t.entries.push(new T(e))}))),t}return s(a)}(E),D=s((function e(t){r(this,e),this.id=t.id,this.metadataProfileId=t.metadataProfileId,this.metadataProfileVersion=t.metadataProfileVersion,this.metadataProfileId=t.metadataProfileId,this.metadataObjectType=t.metadataObjectType,this.objectId=t.objectId,this.version=t.version,this.created=new Date(0),this.created.setUTCSeconds(t.createdAt),this.updated=new Date(0),this.updated.setUTCSeconds(t.updatedAt),this.status=t.status,this.xml=t.xml}));f(D,"ObjectType",{AD_CUE_POINT:"adCuePointMetadata.AdCuePoint",ANNOTATION:"annotationMetadata.Annotation",CODE_CUE_POINT:"codeCuePointMetadata.CodeCuePoint",THUMB_CUE_POINT:"thumbCuePointMetadata.thumbCuePoint",ENTRY:1,CATEGORY:2,USER:3,PARTNER:4,DYNAMIC_OBJECT:5}),f(D,"Status",{VALID:1,INVALID:2,DELETED:3});var O=function(e){c(a,e);var t,n,i=(t=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=p(t);if(n){var i=p(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return d(this,e)});function a(e){var t;return r(this,a),(t=i.call(this,e)).hasError||(t.totalCount=e.totalCount,t.totalCount>0&&(t.metas=[],e.objects.map((function(e){return t.metas.push(new D(e))})))),t}return s(a)}(E),L=s((function e(t){r(this,e),this.message=t.message,this.code=t.code})),M=function(e){c(a,e);var t,n,i=(t=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=p(t);if(n){var i=p(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return d(this,e)});function a(e){var t;if(r(this,a),f(l(t=i.call(this,e)),"sources",[]),f(l(t),"actions",[]),f(l(t),"messages",[]),f(l(t),"flavorAssets",[]),f(l(t),"bumperData",[]),!t.hasError){var n=e.messages;n&&n.map((function(e){return t.messages.push(new L(e))}));var o=e.actions;o&&o.map((function(e){e.type===S.Type.REQUEST_HOST_REGEX?t.actions.push(new w(e)):t.actions.push(new S(e))}));var s=e.sources;s&&s.map((function(e){return t.sources.push(new x(e))}));var u=e.flavorAssets;u&&u.map((function(e){return t.flavorAssets.push(new R(e))}));var c=e.bumperData;c&&c.map((function(e){return t.bumperData.push(new P(e))}))}return t}return s(a,[{key:"hasBlockAction",value:function(){return void 0!==this.getBlockAction()}},{key:"getBlockAction",value:function(){return this.actions.find((function(e){return e.type===S.Type.BLOCK}))}},{key:"getErrorMessages",value:function(){return this.messages}},{key:"getRequestHostRegexAction",value:function(){var e=this.actions.find((function(e){return e.type===S.Type.REQUEST_HOST_REGEX}));if(e instanceof w)return e}}]),a}(E),N=s((function e(t){r(this,e),this.id=t.id,this.name=t.name,this.description=t.description,this.poster=t.thumbnailUrl})),U=function(e){c(a,e);var t,n,i=(t=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=p(t);if(n){var i=p(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return d(this,e)});function a(e){var t;return r(this,a),(t=i.call(this,e)).hasError||(t.name=e.name,t.description=e.description,t.objTypeAsString=e.objTypeAsString,t.width=e.width,t.height=e.height,t.htmlParams=e.htmlParams,t.swfUrl=e.swfUrl,t.confFilePath=e.confFilePath,t.confFile=e.confFile,t.confFileFeatures=e.confFileFeatures,t.config=e.config,t.confVars=e.confVars,t.useCdn=e.useCdn,t.tags=e.tags,t.swfUrlVersion=e.swfUrlVersion,t.created=new Date(0),t.created.setUTCSeconds(e.createdAt),t.updated=new Date(0),t.updated.setUTCSeconds(e.updatedAt),t.html5Url=e.description,t.version=e.description,t.partnerTags=e.description,t.objType=e.description,t.creationMode=e.description),t}return s(a)}(E);f(U,"Type",{PLAYER:1,CONTRIBUTION_WIZARD:2,SIMPLE_EDITOR:3,ADVANCED_EDITOR:4,PLAYLIST:5,APP_STUDIO:6,KRECORD:7,PLAYER_V3:8,KMC_ACCOUNT:9,KMC_ANALYTICS:10,KMC_CONTENT:11,KMC_DASHBOARD:12,KMC_LOGIN:13,PLAYER_SL:14,CLIENTSIDE_ENCODER:15,KMC_GENERAL:16,KMC_ROLES_AND_PERMISSIONS:17,CLIPPER:18,KSR:19,KUPLOAD:20,WEBCASTING:21}),f(U,"CreationMode",{WIZARD:2,ADVANCED:3});var B=s((function e(t){r(this,e),this.playlistLastEntryId=t.playlistLastEntryId,this.entryId=t.entryId,this.id=t.id,this.userId=t.userId,this.partnerId=t.partnerId,this.status=t.status,this.createdAt=t.createdAt,this.updatedAt=t.updatedAt})),F=function(e){c(a,e);var t,n,i=(t=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=p(t);if(n){var i=p(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return d(this,e)});function a(e){var t;return r(this,a),(t=i.call(this,e)).hasError||(t.totalCount=e.totalCount,t.entries=[],t.totalCount>0&&e.objects.map((function(e){return t.entries.push(new B(e))}))),t}return s(a)}(E),j=function(){function e(){r(this,e)}return s(e,null,[{key:"build",value:function(e){var t=k.get(),n=t.serviceUrl.substr(0,t.serviceUrl.lastIndexOf("/")),r=e.partnerId,i=e.entryId,a=e.ks,o=e.uiConfId,s=e.format,l=e.protocol,u=e.extension,c=e.flavorIds;if(!n||isNaN(Number.parseInt(r))||!i||!s||!l)return"";var d=n;return n.endsWith("/")||(d+="/"),d+="p/"+r+"/sp/"+r+"00/playManifest/entryId/"+i+"/protocol/"+l+"/format/"+s,c?d+="/flavorIds/"+c:o&&(d+="/uiConfId/"+o),""!==a&&(d+="/ks/"+a),""!==u&&(d+="/a."+u),o&&""!==c&&(d+="?uiConfId="+o),d}}]),e}(),H=function(){function e(){r(this,e)}return s(e,null,[{key:"xmlToJson",value:function(e){var t={};if(1===e.nodeType){if(e.attributes.length>0){t["@attributes"]={};for(var n=0;n<e.attributes.length;n++){var r=e.attributes.item(n);t["@attributes"][r.nodeName]=r.nodeValue}}}else 3===e.nodeType&&(t=e.nodeValue);if(e.hasChildNodes())for(var i=0;i<e.childNodes.length;i++){var a=e.childNodes.item(i),o=a.nodeName;if(void 0===t[o])t[o]=this.xmlToJson(a);else{if(void 0===t[o].push){var s=t[o];t[o]=[],t[o].push(s)}t[o].push(this.xmlToJson(a))}}return t}}]),e}(),V={DASH:{name:"dash",mimeType:"application/dash+xml",pathExt:"mpd"},HLS:{name:"hls",mimeType:"application/x-mpegURL",pathExt:"m3u8"},WVM:{name:"wvm",mimeType:"video/wvm",pathExt:"wvm"},MP4:{name:"mp4",mimeType:"video/mp4",pathExt:"mp4"},MP3:{name:"mp3",mimeType:"audio/mpeg",pathExt:"mp3"}},G=new Map([["mpegdash",V.DASH],["applehttp",V.HLS],["url",V.MP4]]);function K(e){var t=G.get(e);return!!t&&t.name===V.MP4.name}var z=function(){function e(){r(this,e),this.progressive=[],this.dash=[],this.hls=[],this.image=[],this.document=[]}return s(e,[{key:"map",value:function(e,t){if(t)switch(t.name){case V.MP4.name:this.progressive.push(e);break;case V.DASH.name:this.dash.push(e);break;case V.HLS.name:this.hls.push(e)}}},{key:"toJSON",value:function(){var e={progressive:[],dash:[],hls:[],image:[],document:[]};return this.progressive.forEach((function(t){return e.progressive.push(t.toJSON())})),this.hls.forEach((function(t){return e.hls.push(t.toJSON())})),this.dash.forEach((function(t){return e.dash.push(t.toJSON())})),e.image=this.image,e.document=this.document,e}}]),e}(),W=function(){function e(){r(this,e),this.metadata=new Map,this.sources=new z,this.type=e.Type.UNKNOWN}return s(e,[{key:"toJSON",value:function(){return{id:this.id,name:this.name,sources:this.sources.toJSON(),duration:this.duration,dvrStatus:this.dvrStatus,status:this.status,metadata:this.metadata,type:this.type,poster:this.poster,assetReferenceType:this.assetReferenceType,downloadUrl:this.downloadUrl,rawThumbnailUrl:this.rawThumbnailUrl}}}]),e}();f(W,"Type",{VOD:"Vod",LIVE:"Live",IMAGE:"Image",AUDIO:"Audio",UNKNOWN:"Unknown",DOCUMENT:"Document"}),f(W,"DvrStatus",{ON:1,OFF:0});var Y=function(){function e(t,n,i){r(this,e),this.licenseUrl=t,this.scheme=n,i&&(this.certificate=i)}return s(e,[{key:"toJSON",value:function(){var e={licenseUrl:this.licenseUrl,scheme:this.scheme};return this.certificate&&(e.certificate=this.certificate),e}}]),e}(),Z=function(){function e(){r(this,e)}return s(e,[{key:"toJSON",value:function(){var e={id:this.id,url:this.url,mimetype:this.mimetype};return this.bandwidth&&(e.bandwidth=this.bandwidth),this.width&&(e.width=this.width),this.height&&(e.height=this.height),this.label&&(e.label=this.label),this.drmData&&this.drmData.length>0&&(e.drmData=[],this.drmData.forEach((function(t){Array.isArray(e.drmData)&&e.drmData.push(t.toJSON())}))),e}}]),e}(),q=s((function e(){r(this,e),this.items=[]})),X=s((function e(){r(this,e),this.items=[]})),Q=s((function e(t){r(this,e),this.url=t.url,this.clickThroughUrl=t.clickThroughUrl})),$={SRT:"1",DFXP:"2",WEBVTT:"3",CAP:"4"},J={3:"vtt",1:"srt"},ee=function(){function e(){r(this,e)}return s(e,null,[{key:"createConfig",value:function(e,t){return e.map((function(e){var n=e.url,r=J[e.format];return[$.DFXP,$.CAP].includes(e.format)&&(n=e.webVttUrl,r=J[$.WEBVTT]),n=ie(n,t),{default:!!e.isDefault,type:r,language:e.languageCode,label:e.label,url:n}}))}}]),e}(),te=function(){function e(t){r(this,e),this.id=t.id,this.url=e.extractBaseThumbnailUrl(t.dataUrl),this.mimetype=""}return s(e,null,[{key:"extractBaseThumbnailUrl",value:function(e){return e.match(".+entry_id/[a-zA-Z0-9_]+/")[0].slice(0,-1)}}]),e}(),ne=s((function e(t){r(this,e),this.id=t.id,this.url=t.downloadUrl,this.thumbnailUrl=t.poster,this.mimetype=""})),re=function(){function e(){r(this,e)}return s(e,null,[{key:"getMediaEntry",value:function(t,n,r,i){var a=new W,o=i.entry,s=i.playBackContextResult,l=i.metadataListResult,u=s.sources;return a.sources=e._getParsedSources(u,t,n,r,o,s),e._fillBaseData(a,o,l,s),a.type!==W.Type.LIVE&&k.get().useApiCaptions&&s.data.playbackCaptions&&(a.sources.captions=ee.createConfig(s.data.playbackCaptions,t)),a}},{key:"addKsToUrl",value:function(e,t){var n;return t?(n=-1!==e.split("?")[0].replace(/^.*[\\/]/,"").indexOf(".")?-1===e.indexOf("?")?"?ks=":"&ks=":"/ks/",e+n+t):e}},{key:"getPlaylist",value:function(t){var n=new q,r=t.playlistData,i=t.playlistItems.entries,a=t.playlistUserEntries.entries;return n.id=r.id,n.name=r.name,n.description=r.description,n.poster=r.poster,n.playlistLastEntryId=a.map((function(e){return e.playlistLastEntryId}))[0],i.forEach((function(t){var r=new W;e._fillBaseData(r,t),n.items.push(r)})),n}},{key:"getEntryList",value:function(t){var n=new X;return t.playlistItems.entries.forEach((function(t){var r=new W;e._fillBaseData(r,t),n.items.push(r)})),n}},{key:"getBumper",value:function(t,n,r){var i=t.playBackContextResult,a=i.bumperData[0];if(a){var o=(a&&a.sources).find((function(e){return K(e.format)}));if(o){var s=e._parseProgressiveSources(o,i,n,r,0,a.entryId);if(s[0])return new Q({url:s[0].url,clickThroughUrl:a.clickThroughUrl})}}}},{key:"_fillBaseData",value:function(t,n,r,i){if(t.poster=n.poster,t.rawThumbnailUrl=n.rawThumbnailUrl,t.id=n.id,t.duration=n.duration,t.downloadUrl=n.downloadUrl||"",t.metadata=e._parseMetadata(r),t.metadata.description=n.description||"",t.metadata.entryId=n.id||"",t.metadata.name=n.name||"",n.createdAt&&(t.metadata.createdAt=n.createdAt),n.updatedAt&&(t.metadata.updatedAt=n.updatedAt),n.creatorId&&(t.metadata.creatorId=n.creatorId),n.endDate&&(t.metadata.endDate=n.endDate),n.views&&(t.metadata.views=n.views),n.plays&&(t.metadata.plays=n.plays),t.metadata.tags=n.tags||"",t.status=n.status,t.type=e._getEntryType(n.entryType,n.type),t.type===W.Type.LIVE&&(t.dvrStatus=n.dvrStatus),i&&i.flavorAssets[0]&&i.flavorAssets[0].width&&i.flavorAssets[0].height){var a=i.flavorAssets[0],o=a.height,s=a.width;t.metadata.aspectRatio=+Number(s/o).toFixed(2)}return t}},{key:"_getEntryType",value:function(e,t){var n=W.Type.UNKNOWN;switch(e){case T.MediaType.IMAGE.value:n=W.Type.IMAGE;break;case T.MediaType.AUDIO.value:n=W.Type.AUDIO;break;default:switch(t){case T.EntryType.MEDIA_CLIP.value:n=W.Type.VOD;break;case T.EntryType.LIVE_STREAM.value:case T.EntryType.LIVE_CHANNEL.value:n=W.Type.LIVE;break;case T.EntryType.DOCUMENT.value:n=W.Type.DOCUMENT;break;default:n=W.Type.UNKNOWN}}return n}},{key:"_getParsedSources",value:function(t,n,r,i,a,o){var s,l,u=new z;return a.type===T.EntryType.EXTERNAL_MEDIA.value?((l=new Z).mimetype="video/youtube",l.url=a.referenceId,l.id=a.id+"_youtube",u.progressive.push(l)):a.entryType===T.MediaType.IMAGE.value?u.image.push(new te(a)):a.type===T.EntryType.DOCUMENT.value?u.document.push(new ne(a)):t&&t.length>0&&(t.filter((function(e){return!K(e.format)})).forEach((function(t){var s=e._parseAdaptiveSource(t,o,n,r,i,a.id);if(s){var l=G.get(t.format);u.map(s,l)}})),s=t.find((function(t){return K(t.format)&&""!==t.getProtocol(e._getBaseProtocol())})),u.progressive=e._parseProgressiveSources(s,o,n,r,i,a.id)),u}},{key:"_parseAdaptiveSource",value:function(t,n,r,i,a,o){var s=new Z;if(t){var l="",u=G.get(t.format),c=t.getProtocol(e._getBaseProtocol()),d=t.deliveryProfileId,p=t.format,f="";if(u&&(f=u.pathExt,s.mimetype=u.mimeType),t.hasFlavorIds()?(!f&&n.flavorAssets&&n.flavorAssets.length>0&&(f=n.flavorAssets[0].fileExt),l=j.build({entryId:o,flavorIds:t.flavorIds,format:p,ks:r,partnerId:i,uiConfId:a,extension:f,protocol:c})):l=e.addKsToUrl(t.url,r),!l){var h="failed to create play url from source, discarding source: (".concat(o,"_").concat(d,"), ").concat(p);return e._logger.warn(h),null}if(s.url=l,s.id=o+"_"+d+","+p,t.hasDrmData()){var y=[];t.drm.forEach((function(e){y.push(new Y(e.licenseURL,C.Scheme[e.scheme],e.certificate))})),s.drmData=y}}return s}},{key:"_parseProgressiveSources",value:function(t,n,r,i,a,o){var s=[],l=[];if(t){var u=t.getProtocol(e._getBaseProtocol()),c=t.format,d=t.deliveryProfileId,p=d+","+c;n.flavorAssets.map((function(t){var n=new Z;n.id=t.id+p,n.mimetype="mp3"===t.fileExt?"audio/mp3":"video/mp4",n.height=t.height,n.width=t.width,n.bandwidth=1024*t.bitrate,n.label=t.label||t.language;var f=j.build({entryId:o,flavorIds:t.id,format:c,ks:r,partnerId:i,uiConfId:a,extension:t.fileExt,protocol:u});if(""===f)return e._logger.warn("failed to create play url from source, discarding source: (".concat(o,"_").concat(d,"), ").concat(c,".")),null;n.url=f,t.height&&t.width?s.push(n):l.push(n)}))}return l.length&&!s.length?l:s}},{key:"_parseMetadata",value:function(e){var t={};return e&&e.metas&&e.metas.length>0&&e.metas.forEach((function(e){if(e.xml){var n=new DOMParser;e.xml=e.xml.replace(/\r?\n|\r/g,""),e.xml=e.xml.replace(/>\s*/g,">"),e.xml=e.xml.replace(/>\s*/g,">");var r=n.parseFromString(e.xml,"text/xml"),i=H.xmlToJson(r);Object.keys(i.metadata).forEach((function(e){t[e]=i.metadata[e]["#text"]}))}})),t}},{key:"_getBaseProtocol",value:function(){var e=k.get(),t=/^https?:/.exec(e.cdnUrl),n=t?t[0]:document.location.protocol;return"string"==typeof n?n.slice(0,-1):"https"}},{key:"hasBlockAction",value:function(e){return e.playBackContextResult.hasBlockAction()}},{key:"getBlockAction",value:function(e){return e.playBackContextResult.getBlockAction()}},{key:"getErrorMessages",value:function(e){return e.playBackContextResult.getErrorMessages()}}]),e}();f(re,"_logger",v("OVPProviderParser"));var ie=re.addKsToUrl,ae=re,oe=s((function e(t,n,i){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};r(this,e),this.severity=t,this.category=n,this.code=i,this.data=a,e._logger.error("Category:".concat(n," | Code:").concat(i," |"),a)}));f(oe,"Severity",{RECOVERABLE:1,CRITICAL:2}),f(oe,"Category",{NETWORK:1,SERVICE:2,PROVIDER:3}),f(oe,"Code",{UNSUPPORTED_SCHEME:1e3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,BAD_SERVER_RESPONSE:1005,MULTIREQUEST_API_ERROR:1006,API_RESPONSE_MISMATCH:1007,ERROR:2e3,BLOCK_ACTION:2001,MEDIA_STATUS_NOT_READY:2002,MISSING_MANDATORY_PARAMS:3e3,MISSING_PLAY_SOURCE:3001,METHOD_NOT_IMPLEMENTED:3002}),f(oe,"_logger",v("Error"));var se=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Map;r(this,e),f(this,"retryConfig",{async:!0,timeout:0,maxAttempts:4}),f(this,"_attemptCounter",1),this.headers=t}return s(e,[{key:"getUrl",value:function(e){return e+"/service/"+this.service+(this.action?"/action/"+this.action:"")}},{key:"doHttpRequest",value:function(){var e=this,t=new Promise((function(t,n){e._requestPromise={resolve:t,reject:n}}));return this.url||this._requestPromise.reject(new oe(oe.Severity.CRITICAL,oe.Category.NETWORK,oe.Code.MALFORMED_DATA_URI,{url:this.url})),this._createXHR(),t}},{key:"_createXHR",value:function(){var e=this,t=new XMLHttpRequest;t.onreadystatechange=function(){if(4===t.readyState&&200===t.status)try{var n=JSON.parse(t.responseText);return e.responseHeaders=e._getResponseHeaders(t),e._requestPromise.resolve(n)}catch(n){e._requestPromise.reject(e._createError(t,oe.Code.BAD_SERVER_RESPONSE,{text:t.responseText}))}},t.open(this.method,this.url,this.retryConfig.async),this.retryConfig.async&&this.retryConfig.timeout&&(t.timeout=this.retryConfig.timeout);var n=performance.now();t.ontimeout=function(){e._handleError(t,oe.Code.TIMEOUT,{timeout:(performance.now()-n)/1e3,statusText:t.statusText})},t.onerror=t.onabort=function(){e._handleError(t,oe.Code.HTTP_ERROR,{text:t.responseText,statusText:t.statusText})},this.headers.forEach((function(e,n){t.setRequestHeader(n,e)})),t.send(this.params)}},{key:"_getResponseHeaders",value:function(e){return e.getAllResponseHeaders().split("\n").filter((function(e){return 0===e.toLowerCase().indexOf("x-")}))}},{key:"_handleError",value:function(e,t,n){var r=this._createError(e,t,n);if(e.onreadystatechange=function(){},e.onerror=function(){},e.ontimeout=function(){},e.onabort=function(){},!(this.retryConfig.maxAttempts&&this._attemptCounter<this.retryConfig.maxAttempts))return this._requestPromise.reject(r);this._attemptCounter++,this._createXHR()}},{key:"_createError",value:function(e,t,n){return Object.assign(n,{url:this.url,headers:this._getResponseHeaders(e),attempt:this._attemptCounter}),new oe(oe.Severity.CRITICAL,oe.Category.NETWORK,t,n)}}]),e}(),le=function(e){c(a,e);var t,n,i=(t=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=p(t);if(n){var i=p(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return d(this,e)});function a(){var e;r(this,a);for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return f(l(e=i.call.apply(i,[this].concat(n))),"requests",[]),e}return s(a,[{key:"add",value:function(e){this.requests.push(e);var t={},n={service:e.service,action:e.action};return Object.assign(t,f({},this.requests.length,Object.assign(n,e.params))),Object.assign(t,this.params),this.params=t,this}},{key:"execute",value:function(e){var t=this;return new Promise((function(n,r){try{t.params=JSON.stringify(t.params)}catch(e){a._logger.error("".concat(e.message)),r(new oe(oe.Severity.CRITICAL,oe.Category.PROVIDER,oe.Code.FAILED_PARSING_REQUEST,{error:e,params:t.params}))}t.doHttpRequest().then((function(i){var a=new ue(i,e);a.success?n({headers:t.responseHeaders,response:a}):r(new oe(oe.Severity.CRITICAL,oe.Category.NETWORK,oe.Code.MULTIREQUEST_API_ERROR,{url:t.url,headers:t.responseHeaders,results:a.results}))}),(function(e){r(e)}))}))}}]),a}(se);f(le,"_logger",v("MultiRequestBuilder"));var ue=s((function e(t){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];r(this,e),f(this,"results",[]);var i=t.result?t.result:t,a=(Array.isArray(i)?i:[i]).map((function(e){return new E(e)})),o=a.filter((function(e){return e.hasError}));o.forEach((function(t){e._logger.error("Service returned an error with error code: ".concat(t.error.code," and message: ").concat(t.error.message,"."))})),this.results=a,n&&o.length||o.length===this.results.length?this.success=!1:(this.results=this.results.filter((function(e){return!e.hasError})),this.success=!0)}));f(ue,"_logger",v("MultiRequestResult"));var ce=function(){function e(){r(this,e)}return s(e,null,[{key:"getMultiRequest",value:function(e,t,n){var r=k.get(),i=r.serviceParams;Object.assign(i,{ks:t,clientTag:"html5:v"+e}),n&&Object.assign(i,{partnerId:n});var a=new Map;a.set("Content-Type","application/json");var o=new le(a);return o.method="POST",o.service="multirequest",o.url=o.getUrl(r.serviceUrl),o.params=i,o}}]),e}(),de=s((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};r(this,e),this.type=t.type||e.Type.INCLUDE_FIELDS,this.fields=t.fields||"id,referenceId,name,description,thumbnailUrl,dataUrl,duration,msDuration,flavorParamsIds,mediaType,type,tags,dvrStatus,externalSourceType,status,createdAt,updatedAt,endDate,plays,views,downloadUrl,creatorId"}));f(de,"Type",{INCLUDE_FIELDS:1,EXCLUDE_FIELDS:2});var pe="baseEntry",fe=function(e){c(a,e);var t,n,i=(t=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=p(t);if(n){var i=p(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return d(this,e)});function a(){return r(this,a),i.apply(this,arguments)}return s(a,null,[{key:"getPlaybackContext",value:function(e,t,n,r){var i=new Map;i.set("Content-Type","application/json");var a=new se(i);a.service=pe,a.action="getPlaybackContext",a.method="POST",a.url=a.getUrl(e),a.tag="baseEntry-getPlaybackContext";var o={objectType:"KalturaContextDataParams",flavorTags:"all"};return r&&(o.referrer=r),a.params={entryId:n,ks:t,contextDataParams:o},a}},{key:"list",value:function(e,t,n,r,i){var o=new Map;o.set("Content-Type","application/json");var s=new se(o);return s.service=pe,s.action="list",s.method="POST",s.url=s.getUrl(e),s.tag="list",s.params=a.getEntryListReqParams(n,t,r,i),s}},{key:"getEntryListReqParams",value:function(e,t,n,r){var i={};return e?i=n?{redirectFromEntryId:e}:{idEqual:e}:r&&(i={objectType:"KalturaBaseEntryFilter",referenceIdEqual:r}),{ks:t,filter:i,responseProfile:new de}}}]),a}(ce),he=function(e){c(a,e);var t,n,i=(t=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=p(t);if(n){var i=p(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return d(this,e)});function a(){return r(this,a),i.apply(this,arguments)}return s(a,null,[{key:"list",value:function(e,t,n){var r=new Map;r.set("Content-Type","application/json");var i=new se(r);i.service="metadata_metadata",i.action="list",i.method="POST",i.url=i.getUrl(e),i.tag="metadata_metadata-list";var a={objectType:"KalturaMetadataFilter",objectIdEqual:n,metadataObjectTypeEqual:"1"};return i.params={filter:a,ks:t},i}}]),a}(ce),ye=function(){function e(t){r(this,e),f(this,"_response",{}),this.requests=this.buildRequests(t),this._entryId=t.entryId,this._referenceId=t.referenceId}return s(e,[{key:"requests",get:function(){return this._requests},set:function(e){this._requests=e}},{key:"response",get:function(){return this._response},set:function(e){var t=new A(e[0].data);this._response.entry=t.entries[0],this._response.playBackContextResult=new M(e[1].data),this._response.metadataListResult=new O(e[2].data)}},{key:"buildRequests",value:function(e){var t=k.get(),n=[];n.push(fe.list(t.serviceUrl,e.ks,e.entryId,e.redirectFromEntryId,e.referenceId));var r="{1:result:ks}"===e.ks?"{2:result:objects:0:id}":"{1:result:objects:0:id}";return n.push(fe.getPlaybackContext(t.serviceUrl,e.ks,r,e.referrer)),n.push(he.list(t.serviceUrl,e.ks,r)),n}},{key:"isValid",value:function(){return!(!this._entryId&&!this._referenceId)}}],[{key:"id",get:function(){return"media"}}]),e}(),ge=function(e){c(a,e);var t,n,i=(t=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=p(t);if(n){var i=p(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return d(this,e)});function a(){return r(this,a),i.apply(this,arguments)}return s(a,null,[{key:"anonymousSession",value:function(e,t){var n=new Map;n.set("Content-Type","application/json");var r=new se(n);return r.service="session",r.action="startWidgetSession",r.method="POST",r.url=r.getUrl(e),r.tag="session-startWidget",r.params={widgetId:t},r}}]),a}(ce),ve=function(){function e(t){r(this,e),f(this,"_response",{}),this.requests=this.buildRequests(t),this._widgetId=t.widgetId}return s(e,[{key:"requests",get:function(){return this._requests},set:function(e){this._requests=e}},{key:"response",get:function(){return this._response.ks},set:function(e){this._response.ks=e[0].data.ks}},{key:"buildRequests",value:function(e){var t=k.get(),n=[];return n.push(ge.anonymousSession(t.serviceUrl,e.widgetId)),n}},{key:"isValid",value:function(){return!!this._widgetId}}],[{key:"id",get:function(){return"session"}}]),e}(),me=function(e){c(a,e);var t,n,i=(t=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=p(t);if(n){var i=p(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return d(this,e)});function a(e,t){var n,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",s=arguments.length>3?arguments[3]:void 0;return r(this,a),(n=i.call(this,s))._multiRequest=ce.getMultiRequest(e,o,t),n}return s(a)}(function(){function e(t){r(this,e),f(this,"_loadersResponseMap",new Map),f(this,"_loaders",new Map),this._networkRetryConfig=t}return s(e,[{key:"add",value:function(e,t,n){var r=this,i=new e(t);if(i.isValid()){this._loaders.set(e.id,i);var a=this._multiRequest.requests.length,o=i.requests;this._multiRequest.retryConfig=this._networkRetryConfig,o.forEach((function(e){e.params=e.params||{},e.params.ks=e.params.ks||n,r._multiRequest.add(e)}));var s=Array.from(new Array(o.length),(function(e,t){return t+a}));this._loadersResponseMap.set(e.id,s)}}},{key:"fetchData",value:function(e){var t=this;return new Promise((function(n,r){t._multiRequest.execute(e).then((function(e){t._multiResponse=e.response,t.prepareData(e.response).success?n(t._loaders):r(new oe(oe.Severity.CRITICAL,oe.Category.NETWORK,oe.Code.API_RESPONSE_MISMATCH,{headers:e.headers}))}),(function(e){r(e)}))}))}},{key:"prepareData",value:function(e){var t=this;return this._loaders.forEach((function(n,r){var i=t._loadersResponseMap.get(r);try{i&&i.length>0&&(n.response=e.results.slice(i[0],i[i.length-1]+1))}catch(e){return{success:!1,error:e}}})),{success:!0,data:this._loaders}}}]),e}()),be="playlist",ke=function(e){c(a,e);var t,n,i=(t=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=p(t);if(n){var i=p(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return d(this,e)});function a(){return r(this,a),i.apply(this,arguments)}return s(a,null,[{key:"execute",value:function(e,t,n){var r=new Map;r.set("Content-Type","application/json");var i=new se(r);return i.service=be,i.action="execute",i.method="POST",i.url=i.getUrl(e),i.tag="".concat(be,"-execute"),i.params={ks:t,id:n,responseProfile:new de},i}},{key:"get",value:function(e,t,n){var r=new Map;r.set("Content-Type","application/json");var i=new se(r);return i.service=be,i.action="get",i.method="POST",i.url=i.getUrl(e),i.tag="".concat(be,"-get"),i.params={ks:t,id:n,responseProfile:{fields:"id,name,description,thumbnailUrl",type:1}},i}},{key:"getLastEntryId",value:function(e,t,n){var r=new Map;r.set("Content-Type","application/json");var i=new se(r);return i.service="userEntry",i.action="list",i.method="POST",i.url=i.getUrl(e),i.tag="userEntry-list",i.params={ks:t,filter:{objectType:"KalturaViewHistoryUserEntry",entryIdEqual:n,userIdEqualCurrent:1},responseProfile:{fields:"playlistLastEntryId",type:1}},i}}]),a}(ce),Ee=function(){function e(t){r(this,e),f(this,"_response",{}),this.requests=this.buildRequests(t),this._playlistId=t.playlistId}return s(e,[{key:"requests",get:function(){return this._requests},set:function(e){this._requests=e}},{key:"response",get:function(){return this._response},set:function(e){this._response.playlistData=new N(e[0].data),this._response.playlistItems=new I(e[1].data),this._response.playlistUserEntries=new F(e[2].data)}},{key:"buildRequests",value:function(e){var t=k.get(),n=[];return n.push(ke.get(t.serviceUrl,e.ks,e.playlistId)),n.push(ke.execute(t.serviceUrl,e.ks,e.playlistId)),n.push(ke.getLastEntryId(t.serviceUrl,e.ks,e.playlistId)),n}},{key:"isValid",value:function(){return!!this._playlistId}}],[{key:"id",get:function(){return"playlist"}}]),e}(),_e=function(){function e(t,n){r(this,e),f(this,"_networkRetryConfig",{async:!0,timeout:0,maxAttempts:4}),function(e){e&&"function"==typeof e.getLogger&&(h.get=e.getLogger),e&&e.LogLevel&&(y=e.LogLevel)}(t.logger),this._partnerId=t.partnerId,this._widgetId=t.widgetId,this._uiConfId=t.uiConfId,this._isAnonymous=!t.ks,this._ks=t.ks||"",this._playerVersion=n,this._referrer=t.referrer}return s(e,[{key:"partnerId",get:function(){return this._partnerId}},{key:"widgetId",get:function(){return this._widgetId||this.defaultWidgetId}},{key:"defaultWidgetId",get:function(){return"_"+this._partnerId}},{key:"uiConfId",get:function(){return this._uiConfId}},{key:"ks",get:function(){return this._ks},set:function(e){this._ks=e}},{key:"playerVersion",get:function(){return this._playerVersion}},{key:"isAnonymous",get:function(){return this._isAnonymous}},{key:"getMediaConfig",value:function(e){return Promise.reject(new oe(oe.Severity.CRITICAL,oe.Category.PROVIDER,oe.Code.METHOD_NOT_IMPLEMENTED,{message:"getMediaConfig method must be implement by the derived class"}))}},{key:"getPlaylistConfig",value:function(e){return Promise.reject(new oe(oe.Severity.CRITICAL,oe.Category.PROVIDER,oe.Code.METHOD_NOT_IMPLEMENTED,{message:"The provider does not support loading playlist by id"}))}},{key:"getEntryListConfig",value:function(e){return Promise.reject(new oe(oe.Severity.CRITICAL,oe.Category.PROVIDER,oe.Code.METHOD_NOT_IMPLEMENTED,{message:"The provider does not support loading entry list"}))}},{key:"_verifyHasSources",value:function(e){if(0===e.hls.concat(e.dash,e.progressive,e.image,e.document).length)throw new oe(oe.Severity.CRITICAL,oe.Category.SERVICE,oe.Code.MISSING_PLAY_SOURCE,{action:"",messages:"No play source for entry id: ".concat(e.id)})}},{key:"LogLevel",get:function(){return y}},{key:"getLogLevel",value:function(e){return function(e){return g(e).getLevel()}(e)}},{key:"setLogLevel",value:function(e,t){!function(e,t){g(t).setLevel(e)}(e,t)}}]),e}(),Te=function(){function e(t){r(this,e),f(this,"_response",{playlistItems:{entries:[]}}),this.requests=this.buildRequests(t),this._entries=t.entries}return s(e,[{key:"requests",get:function(){return this._requests},set:function(e){this._requests=e}},{key:"response",get:function(){return this._response},set:function(e){var t,n=this;e.forEach((function(e){t=new A(e.data),n._response.playlistItems.entries.push(t.entries[0])}))}},{key:"buildRequests",value:function(e){var t=k.get(),n=[];return e.entries.forEach((function(r){n.push(fe.list(t.serviceUrl,e.ks,r.entryId||r,e.redirectFromEntryId,r.referenceId))})),n}},{key:"isValid",value:function(){return!(!this._entries||!this._entries.length)}}],[{key:"id",get:function(){return"entry_list"}}]),e}();function Ae(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Se(e){return function(e){if(Array.isArray(e))return Ae(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Ae(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ae(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var we=function(){function e(){r(this,e)}return s(e,null,[{key:"_applyRegexAction",value:function(e,t){if(e){var n=new RegExp(e.pattern,"i");if(t.match(n))return t.replace(n,e.replacement+"/")}return t}},{key:"_pingECDNAndReplaceHostUrls",value:function(t,n,r){return new Promise((function(i){var a=r+"/api_v3/service/system/action/ping/format/1",o=new XMLHttpRequest;o.open("GET",a),o.timeout=n.checkAliveTimeoutMs,o.onreadystatechange=function(){4===o.readyState&&(200===o.status&&e._replaceHostUrls(t,n),i(t))},o.ontimeout=function(){e._logger.warn("Got timeout while pinging the ECDN url. the ping url: ".concat(a)),i(t)},o.send()}))}},{key:"handleRegexAction",value:function(t,n){return new Promise((function(r){var i=k.get().cdnUrl,a=e._extractRegexActionFromData(n),o=e._getRegExp(a);i&&a&&o&&i.match(o)?a.checkAliveTimeoutMs>0?(e._logger.debug("executing ping request..."),e._pingECDNAndReplaceHostUrls(t,a,i.replace(o,a.replacement)).then(r)):(e._replaceHostUrls(t,a),r(t)):(e._logger.debug("exiting handleRegexAction - not applying regex action."),r(t))}))}},{key:"_replaceHostUrls",value:function(t,n){e._logger.debug("Starting to modify urls...");var r=t.sources,i=r.hls,a=r.dash,o=r.progressive,s=r.image;[].concat(Se(i),Se(a),Se(o),Se(s)).forEach((function(t){return t.url=e._applyRegexAction(n,t.url)})),k.get().replaceHostOnlyManifestUrls||(e._logger.debug("replaceHostOnlyManifestUrls flag is off - modifying captions and poster URLs"),r.captions&&r.captions.forEach((function(t){return t.url=e._applyRegexAction(n,t.url)})),"string"==typeof r.poster&&(r.poster=e._applyRegexAction(n,r.poster))),e._logger.debug("Finished modifying urls")}},{key:"_extractRegexActionFromData",value:function(e){var t;return null===(t=e.get(ye.id))||void 0===t||null===(t=t.response)||void 0===t?void 0:t.playBackContextResult.getRequestHostRegexAction()}},{key:"_getRegExp",value:function(e){if(e&&e.pattern&&e.replacement)return new RegExp(e.pattern,"i")}}]),e}();f(we,"_logger",v("RegexActionHandler"));var Ce=we,xe=function(e){c(a,e);var t,n,i=(t=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=p(t);if(n){var i=p(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return d(this,e)});function a(e,t){var n;return r(this,a),f(l(n=i.call(this,e,t)),"_filterOptionsConfig",{redirectFromEntryId:!0}),n._logger=v("OVPProvider"),k.set(e.env),n._setFilterOptionsConfig(e.filterOptions),n._networkRetryConfig=Object.assign(n._networkRetryConfig,e.networkRetryParameters),n}return s(a,[{key:"env",get:function(){return k.get()}},{key:"getMediaConfig",value:function(e){var t=this;return e.ks&&(this.ks=e.ks,this._isAnonymous=!1),this.widgetId!==this.defaultWidgetId&&(this._isAnonymous=!1),this._dataLoader=new me(this.playerVersion,this.partnerId,this.ks,this._networkRetryConfig),new Promise((function(n,r){var i=e.entryId,a=e.referenceId;if(i||a){var o=t.ks;o||(o="{1:result:ks}",t._dataLoader.add(ve,{widgetId:t.widgetId}));var s=t._getEntryRedirectFilter(e);return t._dataLoader.add(ye,{entryId:i,ks:o,redirectFromEntryId:s,referenceId:a,referrer:t._referrer}),t._dataLoader.fetchData().then((function(e){try{var i=t._parseDataFromResponse(e);Ce.handleRegexAction(i,e).then(n)}catch(e){r(e)}}),(function(e){r(e)}))}r(new oe(oe.Severity.CRITICAL,oe.Category.PROVIDER,oe.Code.MISSING_MANDATORY_PARAMS,{message:"missing entry id"}))}))}},{key:"doRequest",value:function(e,t,n){var r=this,i=t||this.ks,a=new me(this.playerVersion,this.partnerId,i,this._networkRetryConfig);return new Promise((function(t,o){return i||a.add(ve,{widgetId:r.widgetId}),e.forEach((function(e){a.add(e.loader,e.params,i||"{1:result:ks}")})),a.fetchData(n).then((function(e){try{t(e)}catch(e){o(e)}}),(function(e){o(e)}))}))}},{key:"_getEntryRedirectFilter",value:function(e){return"boolean"==typeof e.redirectFromEntryId?e.redirectFromEntryId:"boolean"!=typeof this._filterOptionsConfig.redirectFromEntryId||this._filterOptionsConfig.redirectFromEntryId}},{key:"_setFilterOptionsConfig",value:function(e){e&&"boolean"==typeof e.redirectFromEntryId&&(this._filterOptionsConfig.redirectFromEntryId=e.redirectFromEntryId)}},{key:"_parseDataFromResponse",value:function(e){this._logger.debug("Data parsing started");var t={session:{isAnonymous:this._isAnonymous,partnerId:this.partnerId},sources:this._getDefaultSourcesObject(),plugins:{}};if(this.uiConfId&&(t.session.uiConfId=this.uiConfId),e){if(e.has(ve.id)){var n=e.get(ve.id);n&&n.response&&(t.session.ks=n.response,this.widgetId!==this.defaultWidgetId&&(this.ks=t.session.ks))}else t.session.ks=this.ks;if(e.has(ye.id)){var r=e.get(ye.id);if(r&&r.response){var i=r.response;if(ae.hasBlockAction(i))throw new oe(oe.Severity.CRITICAL,oe.Category.SERVICE,oe.Code.BLOCK_ACTION,{action:ae.getBlockAction(i),messages:ae.getErrorMessages(i)});var a=ae.getMediaEntry(this.isAnonymous?"":this.ks,this.partnerId,this.uiConfId,i);Object.assign(t.sources,this._getSourcesObject(a)),this._verifyMediaStatus(a),this._verifyHasSources(t.sources);var o=ae.getBumper(i,this.isAnonymous?"":this.ks,this.partnerId);o&&Object.assign(t.plugins,{bumper:o})}}}return this._logger.debug("Data parsing finished",t),t}},{key:"_verifyMediaStatus",value:function(e){if([T.EntryStatus.IMPORT,T.EntryStatus.PRECONVERT].includes(e.status))throw new oe(oe.Severity.CRITICAL,oe.Category.SERVICE,oe.Code.MEDIA_STATUS_NOT_READY,{messages:"Status of entry id ".concat(e.id," is ").concat(e.status," and is still being imported or converted"),data:{status}})}},{key:"getPlaylistConfig",value:function(e){var t=this;return e.ks&&(this.ks=e.ks,this._isAnonymous=!1),this.widgetId!==this.defaultWidgetId&&(this._isAnonymous=!1),this._dataLoader=new me(this.playerVersion,this.partnerId,this.ks,this._networkRetryConfig),new Promise((function(n,r){var i=e.playlistId;if(i){var a=t.ks;a||(a="{1:result:ks}",t._dataLoader.add(ve,{widgetId:t.widgetId})),t._dataLoader.add(Ee,{playlistId:i,ks:a}),t._dataLoader.fetchData().then((function(e){n(t._parsePlaylistDataFromResponse(e))}),(function(e){r(e)}))}else r({success:!1,data:"Missing mandatory parameter"})}))}},{key:"_parsePlaylistDataFromResponse",value:function(e){var t=this;this._logger.debug("Data parsing started");var n=this._getPlaylistObject();if(e&&e.has(Ee.id)){var r=e.get(Ee.id);if(r&&r.response){var i=ae.getPlaylist(r.response);n.id=i.id,n.poster=i.poster,n.metadata.name=i.name,n.metadata.description=i.description,n.playlistLastEntryId=i.playlistLastEntryId,i.items.forEach((function(e){return n.items.push({sources:t._getSourcesObject(e)})}))}}return this._logger.debug("Data parsing finished",n),n}},{key:"getEntryListConfig",value:function(e){var t=this;return e.ks&&(this.ks=e.ks,this._isAnonymous=!1),this.widgetId!==this.defaultWidgetId&&(this._isAnonymous=!1),this._dataLoader=new me(this.playerVersion,this.partnerId,this.ks,this._networkRetryConfig),new Promise((function(n,r){var i=e.entries;if(i&&i.length){var a=t.ks;a||(a="{1:result:ks}",t._dataLoader.add(ve,{widgetId:t.widgetId}));var o=t._getEntryRedirectFilter(e);t._dataLoader.add(Te,{entries:i,ks:a,redirectFromEntryId:o}),t._dataLoader.fetchData(!1).then((function(e){n(t._parseEntryListDataFromResponse(e))}),(function(e){r(e)}))}else r({success:!1,data:"Missing mandatory parameter"})}))}},{key:"_parseEntryListDataFromResponse",value:function(e){var t=this;this._logger.debug("Data parsing started");var n=this._getPlaylistObject();if(e&&e.has(Te.id)){var r=e.get(Te.id);r&&r.response&&ae.getEntryList(r.response).items.forEach((function(e){return n.items.push({sources:t._getSourcesObject(e)})}))}return this._logger.debug("Data parsing finished",n),n}},{key:"_getPlaylistObject",value:function(){return{id:"",metadata:{name:"",description:""},poster:"",playlistLastEntryId:"",items:[]}}},{key:"_getDefaultSourcesObject",value:function(){return{hls:[],dash:[],progressive:[],image:[],document:[],id:"",duration:0,type:W.Type.UNKNOWN,poster:"",rawThumbnailUrl:"",dvr:!1,vr:null,metadata:{name:"",description:"",tags:""}}}},{key:"_getSourcesObject",value:function(e){var t=this._getDefaultSourcesObject(),n=e.sources.toJSON();return t.hls=n.hls,t.dash=n.dash,t.progressive=n.progressive,t.image=n.image,t.document=n.document,t.id=e.id,t.duration=e.duration,t.type=e.type,t.dvr=!!e.dvrStatus,t.poster=e.poster,t.rawThumbnailUrl=e.rawThumbnailUrl,t.downloadUrl=e.downloadUrl,e.sources.captions&&(t.captions=e.sources.captions),e.metadata&&"string"==typeof e.metadata.tags&&e.metadata.tags.split(", ").includes("360")&&(t.vr={}),Object.assign(t.metadata,e.metadata),t}}]),a}(_e),Pe="@playkit-js/playkit-js-providers-ovp",Re="2.40.8";return t}()},79:(module,e,t)=>{var n;self,module.exports=(n=t(75),function(){var e={228:function(e){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}},858:function(e){e.exports=function(e){if(Array.isArray(e))return e}},646:function(e,t,n){var r=n(228);e.exports=function(e){if(Array.isArray(e))return r(e)}},506:function(e){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},575:function(e){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},913:function(e){function t(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}e.exports=function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}},713:function(e){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},154:function(e){function t(){return e.exports=t=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},t.apply(this,arguments)}e.exports=t},754:function(e){function t(n){return e.exports=t=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},t(n)}e.exports=t},205:function(e,t,n){var r=n(489);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}},860:function(e){e.exports=function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}},884:function(e){e.exports=function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}}},521:function(e){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},206:function(e){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},479:function(e,t,n){var r=n(316);e.exports=function(e,t){if(null==e)return{};var n,i,a=r(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)n=o[i],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}},316:function(e){e.exports=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}},585:function(e,t,n){var r=n(8),i=n(506);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?i(e):t}},489:function(e){function t(n,r){return e.exports=t=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},t(n,r)}e.exports=t},38:function(e,t,n){var r=n(858),i=n(884),a=n(379),o=n(521);e.exports=function(e,t){return r(e)||i(e,t)||a(e,t)||o()}},319:function(e,t,n){var r=n(646),i=n(860),a=n(379),o=n(206);e.exports=function(e){return r(e)||i(e)||a(e)||o()}},8:function(e){function t(n){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=t=function(e){return typeof e}:e.exports=t=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(n)}e.exports=t},379:function(e,t,n){var r=n(228);e.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}},944:function(e,t,n){(t=n(645)(!1)).push([e.id,".playkit-player{--playkit-primary-hsl-hue: 214deg;--playkit-secondary-hsl-hue: 40deg;--playkit-success-hsl-hue: 135deg;--playkit-danger-hsl-hue: 354deg;--playkit-warning-hsl-hue: 21deg;--playkit-primary-hsl-saturation: 100%;--playkit-secondary-hsl-saturation: 100%;--playkit-success-hsl-saturation: 57%;--playkit-danger-hsl-saturation: 76%;--playkit-warning-hsl-saturation: 81%;--playkit-primary-hsl-lightness: 49%;--playkit-secondary-hsl-lightness: 50%;--playkit-success-hsl-lightness: 30%;--playkit-danger-hsl-lightness: 51%;--playkit-warning-hsl-lightness: 53%;--playkit-primary-color: hsl(var(--playkit-primary-hsl-hue) var(--playkit-primary-hsl-saturation) var(--playkit-primary-hsl-lightness));--playkit-primary-darker-color: hsl( var(--playkit-primary-hsl-hue) var(--playkit-primary-hsl-saturation) calc(var(--playkit-primary-hsl-lightness) - 15%) );--playkit-primary-brighter-color: hsl( var(--playkit-primary-hsl-hue) var(--playkit-primary-hsl-saturation) calc(var(--playkit-primary-hsl-lightness) + 15%) );--playkit-primary-text-contrast-color: #ffffff;--playkit-secondary-color: hsl(var(--playkit-secondary-hsl-hue) var(--playkit-secondary-hsl-saturation) var(--playkit-secondary-hsl-lightness));--playkit-secondary-darker-color: hsl( var(--playkit-secondary-hsl-hue) var(--playkit-secondary-hsl-saturation) calc(var(--playkit-secondary-hsl-lightness) - 15%) );--playkit-secondary-brighter-color: hsl( var(--playkit-secondary-hsl-hue) var(--playkit-secondary-hsl-saturation) calc(var(--playkit-secondary-hsl-lightness) + 15%) );--playkit-secondary-text-contrast-color: #ffffff;--playkit-success-color: hsl(var(--playkit-success-hsl-hue) var(--playkit-success-hsl-saturation) var(--playkit-success-hsl-lightness));--playkit-success-darker-color: hsl( var(--playkit-success-hsl-hue) var(--playkit-success-hsl-saturation) calc(var(--playkit-success-hsl-lightness) - 15%) );--playkit-success-brighter-color: hsl( var(--playkit-success-hsl-hue) var(--playkit-success-hsl-saturation) calc(var(--playkit-success-hsl-lightness) + 15%) );--playkit-success-text-contrast-color: #ffffff;--playkit-danger-color: hsl(var(--playkit-danger-hsl-hue) var(--playkit-danger-hsl-saturation) var(--playkit-danger-hsl-lightness));--playkit-danger-darker-color: hsl( var(--playkit-danger-hsl-hue) var(--playkit-danger-hsl-saturation) calc(var(--playkit-danger-hsl-lightness) - 15%) );--playkit-danger-brighter-color: hsl( var(--playkit-danger-hsl-hue) var(--playkit-danger-hsl-saturation) calc(var(--playkit-danger-hsl-lightness) + 15%) );--playkit-danger-text-contrast-color: #ffffff;--playkit-warning-color: hsl(var(--playkit-warning-hsl-hue) var(--playkit-warning-hsl-saturation) var(--playkit-warning-hsl-lightness));--playkit-warning-darker-color: hsl( var(--playkit-warning-hsl-hue) var(--playkit-warning-hsl-saturation) calc(var(--playkit-warning-hsl-lightness) - 15%) );--playkit-warning-brighter-color: hsl( var(--playkit-warning-hsl-hue) var(--playkit-warning-hsl-saturation) calc(var(--playkit-warning-hsl-lightness) + 15%) );--playkit-warning-text-contrast-color: #ffffff;--playkit-tone-1-color: #ffffff;--playkit-tone-2-color: #cccccc;--playkit-tone-3-color: #999999;--playkit-tone-4-color: #666666;--playkit-tone-5-color: #525252;--playkit-tone-6-color: #383838;--playkit-tone-7-color: #212121;--playkit-tone-8-color: #000000;--playkit-tone-1-color-rgb: 255, 255, 255;--playkit-tone-2-color-rgb: 204, 204, 204;--playkit-tone-3-color-rgb: 153, 153, 153;--playkit-tone-4-color-rgb: 102, 102, 102;--playkit-tone-5-color-rgb: 82, 82, 82;--playkit-tone-6-color-rgb: 56, 56, 56;--playkit-tone-7-color-rgb: 33, 33, 33;--playkit-tone-8-color-rgb: 0, 0, 0;--playkit-live-color: #e12437;--playkit-player-background-color: #000000;--playkit-tab-focus-color: var(--playkit-primary-color);--playkit-tooltip-background-color: var(--playkit-tone-1-color);--playkit-tooltip-color: var(--playkit-tone-7-color);--playkit-ads-color: var(--playkit-secondary-color);--playkit-background-color: #121212;--playkit-elevated-color: #333333;--playkit-paper-color: #242424;--playkit-protection-color: #222222}.playkit-row{display:block}.playkit-row:after{content:\"\";clear:both;display:block}.playkit-d-inline-block{display:inline-block}.playkit-mobile-hidden-select{display:block;opacity:0;position:absolute;top:0;left:0px;width:100%;height:100%}.playkit-font-size-base,.playkit-ad-notice{font-size:15px}.playkit-player .playkit-form-group{margin:10px 0;position:relative;max-width:100%}.playkit-player .playkit-form-group.playkit-has-error .playkit-form-control{border-color:var(--playkit-danger-color)}.playkit-player .playkit-form-group.playkit-has-error .playkit-form-control:focus{border-color:#fff}.playkit-player .playkit-form-group.playkit-has-icon .playkit-form-control{padding-left:34px}.playkit-player .playkit-form-group .playkit-icon{position:absolute;top:2px;left:2px;width:32px;height:32px;fill:rgba(255,255,255,.4)}.playkit-player .playkit-form-control{height:32px;width:100%;min-width:72px;border:2px solid rgba(255,255,255,.2);border-radius:4px;background-color:rgba(0,0,0,.4);font-size:15px;line-height:18px;color:#fff;padding:8px 10px;text-overflow:ellipsis}.playkit-player .playkit-form-control::-webkit-input-placeholder{color:rgba(255,255,255,.6)}.playkit-player .playkit-form-control:focus{background-color:#fff;border-color:#fff;color:var(--playkit-tone-7-color)}.playkit-player .playkit-form-control:focus::-webkit-input-placeholder{color:var(--playkit-tone-2-color)}.playkit-player .playkit-form-control:focus+.playkit-icon{fill:var(--playkit-tone-3-color)}.playkit-player textarea.playkit-form-control{min-height:72px}.playkit-player select{font-size:15px;color:#fff;-webkit-appearance:none;border:0;background:url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23FFFFFF' viewBox='0 0 1024 1024'><path d='M301.255 338.745c-24.994-24.994-65.516-24.994-90.51 0s-24.994 65.516 0 90.51l256 256c24.994 24.994 65.516 24.994 90.51 0l256-256c24.994-24.994 24.994-65.516 0-90.51s-65.516-24.994-90.51 0l-210.745 210.745-210.745-210.745z' /></svg>\") no-repeat;background-size:16px;background-position:100% center;background-repeat:no-repeat;padding-right:24px}.playkit-checkbox{font-size:15px;position:relative}.playkit-checkbox input{display:none}.playkit-checkbox label:before{height:16px;width:16px;border:1px solid rgba(255,255,255,.2);border-radius:4px;background-color:rgba(0,0,0,.4);margin-right:8px;display:inline-block;content:\"\";vertical-align:middle}.playkit-checkbox input:checked+label:before{content:\"✔\";text-align:center;font-size:14px}.playkit-form-group-row{font-size:15px;margin:24px 0}.playkit-form-group-row:after{clear:both;content:\" \";display:block}.playkit-form-group-row label{float:left;color:rgba(244,244,244,.8)}.playkit-form-group-row .playkit-dropdown{float:right}.playkit-btn{text-decoration:none;height:36px;border-radius:18px;color:#fff;line-height:36px;font-weight:bold;cursor:pointer;display:inline-block;padding:0 24px}.playkit-btn.playkit-btn-block{display:block}.playkit-btn.playkit-btn-dark-transparent{background-color:rgba(0,0,0,.5);border:2px solid rgba(255,255,255,.2);line-height:32px}.playkit-btn.playkit-btn-dark-transparent:hover{color:#fff;border:2px solid rgba(255,255,255,.4)}.playkit-btn.playkit-btn-branded{background-color:var(--playkit-primary-color)}.playkit-btn.playkit-btn-branded:hover{color:#fff}.playkit-btn-rounded{height:36px;width:36px;min-width:36px;min-height:36px;border-radius:18px;background-color:rgba(0,0,0,.4);display:inline-block;padding:2px}.playkit-player button:focus{outline:none}.playkit-btn-borderless{display:flex;flex-direction:row;justify-content:center;align-items:center;border-radius:4px;border:none;padding:8px 12px 8px 8px;width:82px;height:40px;background-color:rgba(0,0,0,0);cursor:pointer}.playkit-btn-borderless.playkit-only-icon{padding:4px;width:40px;height:40px}.playkit-btn-borderless.playkit-only-label{padding:8px;width:50px;height:40px}.playkit-btn-borderless i{width:32px;height:32px}.playkit-btn-borderless label{color:var(--playkit-tone-1-color)}.playkit-btn-borderless:hover{background-color:var(--playkit-tone-5-color)}.playkit-btn-translucent{background-color:rgba(0,0,0,.6)}.playkit-btn-translucent:hover{background-color:rgba(0,0,0,.7)}.playkit-player.playkit-size-sm .playkit-btn-borderless,.playkit-player.playkit-size-xs .playkit-btn-borderless{height:32px}.playkit-player.playkit-size-sm .playkit-btn-borderless i,.playkit-player.playkit-size-xs .playkit-btn-borderless i{width:24px;height:24px}.playkit-player.playkit-size-sm .playkit-btn-borderless.playkit-only-icon,.playkit-player.playkit-size-xs .playkit-btn-borderless.playkit-only-icon{padding:4px;width:32px;height:32px}.playkit-player.playkit-size-sm .playkit-btn-borderless.playkit-only-label,.playkit-player.playkit-size-xs .playkit-btn-borderless.playkit-only-label{padding:8px;width:50px;height:32px}.playkit-icon{display:inline-block;font-size:0;width:100%;height:100%;margin:0 auto;background-size:cover;background-repeat:no-repeat;background-position:50% 50%;filter:drop-shadow(0px 0px 2px rgba(0, 0, 0, 0.7))}.playkit-badge-icon:after{content:\"\";position:absolute;height:16px;width:16px;background-size:cover;background-repeat:no-repeat;background-position:50% 50%}.playkit-player{--playkit-icon-vr-stereo-full-url: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23006bff' d='M12 16C12 17.3807 10.8807 18.5 9.5 18.5C8.11929 18.5 7 17.3807 7 16C7 14.6193 8.11929 13.5 9.5 13.5C10.8807 13.5 12 14.6193 12 16Z'/%3E%3Cpath fill='%23006bff' d='M22.5 18.5C23.8807 18.5 25 17.3807 25 16C25 14.6193 23.8807 13.5 22.5 13.5C21.1193 13.5 20 14.6193 20 16C20 17.3807 21.1193 18.5 22.5 18.5Z'/%3E%3Cpath fill='%23006bff' fill-rule='evenodd' clip-rule='evenodd' d='M27 7H5C3.34315 7 2 8.34315 2 10V22C2 23.6569 3.34315 25 5 25H11.8676C12.9214 25 13.8979 24.4471 14.4401 23.5435L16 20.9437L17.5599 23.5435C18.1021 24.4471 19.0786 25 20.1324 25H27C28.6569 25 30 23.6569 30 22V10C30 8.34315 28.6569 7 27 7ZM4 10C4 9.44772 4.44772 9 5 9H27C27.5523 9 28 9.44772 28 10V22C28 22.5523 27.5523 23 27 23H20.1324C19.7811 23 19.4556 22.8157 19.2749 22.5145L17.715 19.9147C17.1467 18.9675 15.9182 18.6604 14.971 19.2287C14.6895 19.3976 14.4539 19.6332 14.285 19.9147L12.7251 22.5145C12.5444 22.8157 12.2189 23 11.8676 23H5C4.44772 23 4 22.5523 4 22V10Z'/%3E%3C/svg%3E\");--playkit-icon-chromecast-url: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23006bff' d='M160 704v96h96c0-53.12-42.88-96-96-96zM160 576v64c88.32 0 160 71.68 160 160h64c0-123.84-100.16-224-224-224zM736 352h-448v52.16c126.72 40.96 226.88 141.12 267.84 267.84h180.16v-320zM160 448v64c159.040 0 288 128.96 288 288h64c0-194.56-157.76-352-352-352zM800 224h-576c-35.2 0-64 28.8-64 64v96h64v-96h576v448h-224v64h224c35.2 0 64-28.8 64-64v-448c0-35.2-28.8-64-64-64z'%3E%3C/path%3E%3C/svg%3E\");--playkit-icon-quality-HD-active-url: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 16 16' width='16' height='16' fill-rule='nonzero'%3E%3Cpath fill='%23006bff' d='M13.9932 4C14.5492 4 15 4.45304 15 4.99703V11.003C15 11.5536 14.5501 12 13.9932 12H2.00685C1.45078 12 1 11.547 1 11.003V4.99703C1 4.44639 1.44995 4 2.00685 4H13.9932Z' fill-rule='evenodd' clip-rule='evenodd'/%3E%3Cpath fill='textColor' d='M3.74623 5H2.00684V11H3.74623L3.74602 8.56941H5.97529L5.976 11H7.70614V5H5.976L5.97529 7.32457H3.74602L3.74623 5Z'/%3E%3Cpath fill='textColor' d='M10.8565 5H8.66374V11H10.8842L11.1456 10.9922C11.5739 10.966 11.9652 10.8745 12.3197 10.7176L12.4987 10.6312L12.6935 10.52C13.0708 10.2858 13.3744 9.98155 13.6044 9.60714C13.8344 9.23273 13.9658 8.81089 13.9986 8.34161L14.0068 8.10302V7.9011L13.9986 7.66146C13.9658 7.19033 13.8344 6.76815 13.6044 6.39492C13.3361 5.95948 12.9652 5.61813 12.4918 5.37088C12.086 5.15895 11.6276 5.03784 11.1164 5.00757L10.8565 5ZM10.8565 6.24902C11.1618 6.24902 11.417 6.30946 11.6221 6.43034C11.8272 6.55122 11.9814 6.73323 12.0847 6.97636C12.1674 7.17086 12.217 7.40537 12.2335 7.67988L12.2397 7.89325V8.10342L12.2334 8.31837C12.2166 8.59485 12.1663 8.83089 12.0824 9.0265C11.9776 9.271 11.8249 9.45369 11.6244 9.57457C11.4641 9.67128 11.2741 9.7293 11.0545 9.74864L10.8843 9.75589L10.4026 9.75641V6.24977L10.8565 6.24902Z' fill-rule='evenodd' clip-rule='evenodd'/%3E%3C/svg%3E\");--playkit-icon-quality-4K-active-url: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 16 16' width='16' height='16' fill-rule='nonzero'%3E%3Cpath fill='%23006bff' d='M13.9932 4C14.5492 4 15 4.45304 15 4.99703V11.003C15 11.5536 14.5501 12 13.9932 12H2.00685C1.45078 12 1 11.547 1 11.003V4.99703C1 4.44639 1.44995 4 2.00685 4H13.9932Z' fill-rule='evenodd' clip-rule='evenodd'/%3E%3Cpath fill='textColor' fill-rule='evenodd' clip-rule='evenodd' d='M6.52118 5H4.77854L4.77781 5.01382L2 8.80769L2.10649 9.76786L4.77781 9.76867L4.77854 11H6.52118L6.52064 9.76867L7.19403 9.76786V8.5728L6.52064 8.57363L6.52118 5ZM4.77781 7.01953V8.5741L3.65067 8.57327L4.69625 7.13921L4.77781 7.01953Z'/%3E%3Cpath fill='textColor' d='M9.81283 5H7.99274V11H9.81283L9.81198 9.5062L10.4712 8.88589L11.8314 11H13.9806L11.6857 7.663L14 5H11.7588L10.355 6.78434L9.81198 7.5229L9.81283 5Z'/%3E%3C/svg%3E\");--playkit-icon-quality-8K-active-url: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 16 16' width='16' height='16' fill-rule='nonzero'%3E%3Cpath fill='%23006bff' d='M13.9932 4C14.5492 4 15 4.45304 15 4.99703V11.003C15 11.5536 14.5501 12 13.9932 12H2.00685C1.45078 12 1 11.547 1 11.003V4.99703C1 4.44639 1.44995 4 2.00685 4H13.9932Z' fill-rule='evenodd' clip-rule='evenodd'/%3E%3Cpath fill='textColor' d='M4.5 5C4.04427 5 3.639 5.06279 3.28418 5.18838C2.92936 5.31396 2.65104 5.49967 2.44922 5.74549C2.2474 5.99132 2.14648 6.29459 2.14648 6.65531C2.14648 6.96259 2.24821 7.23113 2.45166 7.46092C2.58729 7.61412 2.75693 7.74445 2.96056 7.85193L3.07973 7.90981L3.04818 7.92134L2.87891 8.00067C2.71615 8.08484 2.57292 8.18353 2.44922 8.29676L2.33203 8.41483L2.24394 8.52321C2.08131 8.74602 2 9.00515 2 9.3006C2 9.67735 2.10986 9.99132 2.32959 10.2425C2.54932 10.4937 2.8488 10.6827 3.22803 10.8096C3.60726 10.9365 4.03613 11 4.51465 11C4.99642 11 5.42367 10.9365 5.79639 10.8096C6.16911 10.6827 6.46289 10.4937 6.67773 10.2425C6.89258 9.99132 7 9.67735 7 9.3006C7 8.95591 6.89176 8.66065 6.67529 8.41483L6.56041 8.29676C6.39837 8.14579 6.20089 8.02065 5.96796 7.92134L5.94 7.911L6.06141 7.85193L6.20532 7.76703C6.29701 7.70758 6.3802 7.64241 6.45489 7.57153L6.56055 7.46092L6.65156 7.3428C6.78945 7.14054 6.8584 6.91138 6.8584 6.65531C6.8584 6.29459 6.7583 5.99132 6.55811 5.74549C6.35791 5.49967 6.08122 5.31396 5.72803 5.18838C5.37484 5.06279 4.9655 5 4.5 5ZM4.5 6.16211C4.63672 6.16211 4.74902 6.18549 4.83691 6.23225C4.9248 6.27901 4.99072 6.34514 5.03467 6.43065C5.07861 6.51615 5.10059 6.62036 5.10059 6.74327C5.10059 6.86351 5.08024 6.96972 5.03955 7.06191C4.99886 7.15409 4.93538 7.22624 4.84912 7.27834C4.76286 7.33045 4.65137 7.3565 4.51465 7.3565C4.37793 7.3565 4.26481 7.33045 4.17529 7.27834C4.08577 7.22624 4.01986 7.15409 3.97754 7.06191C3.93522 6.96972 3.91406 6.86351 3.91406 6.74327C3.91406 6.62036 3.93522 6.51615 3.97754 6.43065C4.01986 6.34514 4.08496 6.27901 4.17285 6.23225C4.26074 6.18549 4.36979 6.16211 4.5 6.16211ZM4.50488 8.51882C4.65462 8.51882 4.78402 8.54354 4.89307 8.59297C5.00212 8.6424 5.08675 8.71522 5.14697 8.81141C5.20719 8.9076 5.2373 9.02784 5.2373 9.17213C5.2373 9.3084 5.20801 9.42597 5.14941 9.52484C5.09082 9.6237 5.007 9.70052 4.89795 9.7553C4.7889 9.81007 4.66113 9.83746 4.51465 9.83746C4.36491 9.83746 4.23389 9.81007 4.12158 9.7553C4.00928 9.70052 3.9222 9.6237 3.86035 9.52484C3.7985 9.42597 3.76758 9.3084 3.76758 9.17213C3.76758 9.02784 3.7985 8.9076 3.86035 8.81141C3.9222 8.71522 4.00846 8.6424 4.11914 8.59297C4.22982 8.54354 4.3584 8.51882 4.50488 8.51882Z' fill-rule='evenodd' clip-rule='evenodd'/%3E%3Cpath fill='textColor' d='M9.81789 5H8V11H9.81789L9.81771 9.5062L10.4752 8.88673L11.834 11H13.9807L11.6891 7.663L14 5H11.7615L10.3594 6.78434L9.81771 7.5229L9.81789 5Z'/%3E%3C/svg%3E\")}.playkit-icon-maximize{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M800 269.255v114.745c0 17.673 14.327 32 32 32s32-14.327 32-32v-192c0-17.673-14.327-32-32-32h-192c-17.673 0-32 14.327-32 32s14.327 32 32 32h114.745l-137.373 137.373c-12.497 12.497-12.497 32.758 0 45.255s32.758 12.497 45.255 0l137.373-137.373z' /%3E %3Cpath fill='%23fff' d='M224 754.745v-114.745c0-17.673-14.327-32-32-32s-32 14.327-32 32v192c0 17.673 14.327 32 32 32h192c17.673 0 32-14.327 32-32s-14.327-32-32-32h-114.745l137.373-137.373c12.497-12.497 12.497-32.758 0-45.255s-32.758-12.497-45.255 0l-137.373 137.373z' /%3E%3C/svg%3E\")}.playkit-icon-minimize{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M672 306.745v-114.745c0-17.673-14.327-32-32-32s-32 14.327-32 32v192c0 17.673 14.327 32 32 32h192c17.673 0 32-14.327 32-32s-14.327-32-32-32h-114.745l137.373-137.373c12.497-12.497 12.497-32.758 0-45.255s-32.758-12.497-45.255 0l-137.373 137.373z' /%3E%3Cpath fill='%23fff' d='M352 717.255v114.745c0 17.673 14.327 32 32 32s32-14.327 32-32v-192c0-17.673-14.327-32-32-32h-192c-17.673 0-32 14.327-32 32s14.327 32 32 32h114.745l-137.373 137.373c-12.497 12.497-12.497 32.758 0 45.255s32.758 12.497 45.255 0l137.373-137.373z' /%3E%3C/svg%3E\")}.playkit-icon-play{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M796.806 461.202c44.919 28.075 44.739 73.706 0 101.668l-459.472 287.171c-44.919 28.075-81.334 7.915-81.334-45.305v-585.4c0-53.096 36.595-73.266 81.334-45.305l459.472 287.171z' /%3E%3C/svg%3E\")}.playkit-icon-pause{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M256 287.843c0-35.259 28.407-63.843 64-63.843 35.346 0 64 28.564 64 63.843v448.314c0 35.259-28.407 63.843-64 63.843-35.346 0-64-28.564-64-63.843v-448.314zM640 287.843c0-35.259 28.407-63.843 64-63.843 35.346 0 64 28.564 64 63.843v448.314c0 35.259-28.407 63.843-64 63.843-35.346 0-64-28.564-64-63.843v-448.314z' /%3E%3C/svg%3E\")}.playkit-icon-volume-base{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M128 416v192h96v-192h-96zM64 383.853c0-17.592 14.012-31.853 32.094-31.853h159.813c17.725 0 32.094 14.581 32.094 31.853v256.295c0 17.592-14.012 31.853-32.094 31.853h-159.813c-17.725 0-32.094-14.581-32.094-31.853v-256.295z' /%3E%3Cpath fill='%23fff' d='M288 634.342l160 88.889v-422.462l-160 88.889v244.684zM224 352l231.787-128.771c31.046-17.248 56.213-2.487 56.213 32.476v512.589c0 35.184-25.054 49.786-56.213 32.476l-231.787-128.771v-320z' /%3E%3C/svg%3E\")}.playkit-icon-volume-waves{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M802.017 837.177c82.359-86.627 129.183-201.774 129.183-324.26 0-123.976-47.976-240.409-132.127-327.329-12.293-12.697-32.552-13.025-45.249-0.732s-13.025 32.552-0.732 45.249c72.692 75.084 114.109 175.597 114.109 282.812 0 105.928-40.422 205.331-111.566 280.162-12.177 12.808-11.666 33.063 1.143 45.24s33.063 11.666 45.24-1.143z' /%3E%3Cpath fill='%23fff' d='M667.436 743.221c67.761-60.884 107.273-147.888 107.273-241.233 0-87.318-34.552-169.203-94.836-229.446-12.501-12.493-32.762-12.486-45.255 0.015s-12.486 32.762 0.015 45.255c48.375 48.342 76.075 113.989 76.075 184.176 0 75.021-31.679 144.776-86.048 193.627-13.146 11.812-14.227 32.044-2.416 45.19s32.044 14.227 45.19 2.416z' /%3E%3C/svg%3E\")}.playkit-icon-volume-wave{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M667.436 743.221c67.761-60.884 107.273-147.888 107.273-241.233 0-87.318-34.552-169.203-94.836-229.446-12.501-12.493-32.762-12.486-45.255 0.015s-12.486 32.762 0.015 45.255c48.375 48.342 76.075 113.989 76.075 184.176 0 75.021-31.679 144.776-86.048 193.627-13.146 11.812-14.227 32.044-2.416 45.19s32.044 14.227 45.19 2.416z'/%3E%3C/svg%3E\")}.playkit-icon-volume-mute{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M768 466.745l-67.986-67.986c-12.213-12.213-32.654-12.393-45.151 0.104-12.584 12.584-12.543 32.711-0.104 45.151l67.986 67.986-67.986 67.986c-12.213 12.213-12.393 32.654 0.104 45.151 12.584 12.584 32.711 12.543 45.151 0.104l67.986-67.986 67.986 67.986c12.213 12.213 32.654 12.393 45.151-0.104 12.584-12.584 12.543-32.711 0.104-45.151l-67.986-67.986 67.986-67.986c12.213-12.213 12.393-32.654-0.104-45.151-12.584-12.584-32.711-12.543-45.151-0.104l-67.986 67.986z' /%3E%3C/svg%3E\")}.playkit-icon-close{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M573.162 512l214.269-214.269c16.772-16.772 16.688-44.071-0.202-60.96-17.007-17.007-44.182-16.98-60.96-0.202l-214.269 214.269-214.269-214.269c-16.772-16.772-44.071-16.688-60.96 0.202-17.007 17.007-16.98 44.182-0.202 60.96l214.269 214.269-214.269 214.269c-16.772 16.772-16.688 44.071 0.202 60.96 17.007 17.007 44.182 16.98 60.96 0.202l214.269-214.269 214.269 214.269c16.772 16.772 44.071 16.688 60.96-0.202 17.007-17.007 16.98-44.182 0.202-60.96l-214.269-214.269z' /%3E%3C/svg%3E\")}.playkit-icon-settings{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M803.451 546.033c2.552-22.107 2.552-44.408 0.246-64.81-1.084-6.208-6.499-10.721-12.535-10.671-30.286 0.533-57.727-17.773-68.866-45.941s-3.64-60.291 18.795-80.593c3.935-3.569 4.416-9.583 0.92-13.959-13.595-17.35-29.146-33.073-46.311-46.83-4.23-3.38-10.359-2.886-14.783 1.966-14.421 14.721-34.212 22.938-54.434 22.761-9.009 0.041-17.942-1.652-26.865-5.212-28.414-11.992-46.226-40.546-44.49-71.542 0.335-5.319-3.547-9.972-8.785-10.588-21.926-2.538-44.068-2.595-65.961-0.176-5.349 0.6-9.341 5.207-9.175 10.514 1.027 30.384-16.802 58.251-45.764 70.431-8.238 3.138-16.993 4.701-25.207 4.609-20.599 0.206-40.395-7.982-55.482-23.363-2.014-2.187-4.849-3.435-7.553-3.445-2.441 0.015-4.811 0.83-6.513 2.139-17.541 13.798-33.455 29.547-47.262 46.729-3.418 4.337-2.922 10.575 0.97 14.162 22.816 20.692 30.19 53.479 17.807 83.351-13.035 27.396-41.135 44.394-71.446 43.222-5.112-0.197-9.499 3.606-10.086 9.179-2.673 22.023-2.673 44.289-0.212 64.867 1.080 6.27 6.559 10.824 13.309 10.737l2.225 0.006c28.935 0.604 54.726 18.391 65.634 45.374 11.22 28.205 3.921 60.407-18.565 81.204-3.866 3.509-4.341 9.418-0.895 13.742 13.545 17.354 29.027 33.106 46.042 46.867 4.303 3.449 10.547 2.954 14.986-1.907 14.414-14.76 34.226-23.001 54.43-22.82 9.070-0.052 18.063 1.668 27.041 5.299 28.19 12.071 45.891 40.41 44.347 71.468-0.342 5.312 3.536 9.962 8.802 10.578 21.915 2.548 44.049 2.605 65.929 0.176 5.364-0.604 9.364-5.227 9.191-10.598-0.997-30.358 16.84-58.183 45.452-70.201 8.263-3.256 17.070-4.908 25.521-4.865 20.676-0.206 40.533 8.070 55.398 23.38 2.039 2.195 4.898 3.446 7.673 3.455 2.268-0.011 4.468-0.776 6.321-2.228 17.625-13.724 33.599-29.444 47.415-46.611 3.426-4.348 2.928-10.6-0.863-14.097-22.358-20.082-30.057-51.85-19.372-79.939s37.55-46.71 67.745-46.857h5.229c5.12-0.026 9.413-3.875 9.996-8.962zM861.733 552.735c-3.961 34.572-33.157 60.748-68.129 60.926h-5.235c-5.803 0.028-10.991 3.624-13.054 9.048s-0.577 11.558 4.020 15.69c26.602 24.519 29.853 65.381 7.275 94.034-16.847 20.934-36.063 39.845-57.197 56.302-12.034 9.427-26.861 14.584-42.368 14.658-19.254-0.051-37.623-8.090-50.269-21.718-3.221-3.315-7.66-5.165-12.712-5.118-1.425-0.007-2.839 0.258-3.554 0.532-5.581 2.346-9.136 7.892-8.937 13.966 1.152 35.958-25.509 66.771-61.307 70.804-26.332 2.923-52.909 2.854-79.246-0.208-36.286-4.245-62.897-36.157-60.576-72.186 0.304-6.123-3.235-11.788-8.302-13.964-1.328-0.536-2.748-0.808-4.606-0.8-4.651-0.041-9.118 1.817-11.635 4.367-24.544 27.036-65.886 30.311-94.481 7.394-20.587-16.65-39.207-35.595-55.308-56.226-22.552-28.277-19.261-69.208 7.317-93.334 4.474-4.138 5.939-10.604 3.748-16.115-2.052-5.076-6.932-8.442-11.794-8.55-36.436 0.464-66.759-24.741-72.949-60.89-3.243-26.718-3.243-53.731-0.055-79.964 3.744-35.827 34.642-62.605 70.642-61.219 6.877 0.266 13.251-3.59 15.584-8.401 2.309-5.59 0.861-12.028-3.789-16.247-26.603-24.51-29.856-65.368-7.293-93.994 16.767-20.868 35.856-39.76 57.129-56.491 12.099-9.322 26.921-14.42 42.463-14.513 19.308 0.059 37.717 8.166 50.145 21.684 3.263 3.322 7.737 5.172 12.994 5.126 1.471 0.015 2.933-0.245 3.363-0.39 5.601-2.359 9.165-7.93 8.957-14.077-1.126-35.941 25.542-66.721 61.322-70.731 26.322-2.909 52.889-2.84 79.251 0.212 36.244 4.265 62.828 36.125 60.546 72.343-0.339 6.047 3.159 11.654 8.186 13.782 1.381 0.55 2.855 0.829 4.726 0.823 4.663 0.040 9.142-1.819 11.615-4.312 24.439-26.99 65.656-30.312 94.137-7.557 20.721 16.607 39.456 35.549 55.655 56.225 22.667 28.35 19.38 69.439-7.531 93.846-4.33 3.918-5.776 10.112-3.628 15.542s7.438 8.96 13.543 8.854c34.999-0.298 65.076 24.766 71.337 60.925 3.065 26.552 3.065 53.368 0 79.92zM511.956 589.951c43.215-0.108 78.137-35.17 78.072-78.385 0-31.732-19.132-60.334-48.461-72.448s-63.068-5.35-85.461 17.133c-22.393 22.483-29.022 56.249-16.791 85.529s40.909 48.298 72.641 48.171zM512.146 648.617c-55.438 0.221-105.58-33.029-126.965-84.224s-9.796-110.233 29.358-149.543c39.153-39.31 98.144-51.136 149.424-29.956s84.731 71.189 84.732 126.627c0.114 75.549-60.999 136.907-136.548 137.096z' /%3E%3C/svg%3E\")}.playkit-icon-check{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M342.481 563.894c-12.577-12.416-32.838-12.285-45.254 0.292s-12.285 32.838 0.292 45.254l118.857 117.333c13.275 13.105 34.901 12.123 46.933-2.131l297.143-352c11.4-13.505 9.694-33.694-3.811-45.094s-33.694-9.694-45.094 3.811l-274.828 325.566-94.238-93.030z' /%3E%3C/svg%3E\")}.playkit-icon-check-active{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M342.481 563.894c-12.577-12.416-32.838-12.285-45.254 0.292s-12.285 32.838 0.292 45.254l118.857 117.333c13.275 13.105 34.901 12.123 46.933-2.131l297.143-352c11.4-13.505 9.694-33.694-3.811-45.094s-33.694-9.694-45.094 3.811l-274.828 325.566-94.238-93.030z' /%3E%3C/svg%3E\")}.playkit-icon-language{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M512 800c159.058 0 288-128.942 288-288s-128.942-288-288-288c-159.058 0-288 128.942-288 288s128.942 288 288 288zM512 864c-194.404 0-352-157.596-352-352s157.596-352 352-352c194.404 0 352 157.596 352 352s-157.596 352-352 352z' /%3E%3Cpath fill='%23fff' d='M441.231 173.324c-76.632 84.62-121.231 207.208-121.231 338.676 0 134.304 46.556 259.282 126.083 343.936l46.646-43.82c-68.041-72.429-108.728-181.651-108.728-300.116 0-116.001 39.001-223.203 104.669-295.716l-47.438-42.96z' /%3E%3Cpath fill='%23fff' d='M584.297 173.324c76.632 84.62 121.231 207.208 121.231 338.676 0 134.304-46.556 259.282-126.083 343.936l-46.646-43.82c68.041-72.429 108.728-181.651 108.728-300.116 0-116.001-39.001-223.203-104.669-295.716l47.438-42.96z' /%3E%3Cpath fill='%23fff' d='M840.432 419.786c-81.65-22.637-200.551-35.786-328.432-35.786-128.056 0-247.103 13.185-328.758 35.876l17.136 61.663c75.47-20.972 188.938-33.539 311.622-33.539 122.521 0 235.854 12.533 311.334 33.459l17.099-61.674z' /%3E%3Cpath fill='%23fff' d='M840.432 605.754c-81.65 22.637-200.551 35.786-328.432 35.786-128.056 0-247.103-13.185-328.758-35.876l17.136-61.663c75.47 20.972 188.938 33.539 311.622 33.539 122.521 0 235.854-12.533 311.334-33.459l17.099 61.674z' /%3E%3Cpath fill='%23fff' d='M480 192h64v640h-64v-640z' /%3E%3C/svg%3E\")}.playkit-icon-quality{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M159.904 192h288.234c17.277 0 31.862 14.323 31.862 31.992 0 17.792-14.261 31.993-31.853 31.994l-288.147 0.014v544.174c-0.017-0.18 704-0.174 704-0.174v-128.006c0-17.795 14.327-31.994 32-31.994 17.796 0 32 14.34 32 32.029v128.145c0 35.25-28.639 63.826-63.904 63.826h-704.192c-35.293 0-63.904-28.875-63.904-63.826v-544.348c0-35.25 28.639-63.826 63.904-63.826zM501.818 378.182c108.449 0 196.364-87.915 196.364-196.364 0-29.091 43.636-29.091 43.636 0 0 108.449 87.915 196.364 196.364 196.364 29.091 0 29.091 43.636 0 43.636-108.449 0-196.364 87.915-196.364 196.364 0 29.091-43.636 29.091-43.636 0 0-108.449-87.915-196.364-196.364-196.364-29.091 0-29.091-43.636 0-43.636z' /%3E%3C/svg%3E\")}.playkit-icon-captions{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M160 771.213c-0.017-0.172 704-0.166 704-0.166v-518.261c0.017 0.172-704 0.166-704 0.166v518.261zM96 252.787c0-33.572 28.639-60.787 63.904-60.787h704.192c35.293 0 63.904 27.5 63.904 60.787v518.427c0 33.572-28.639 60.787-63.904 60.787h-704.192c-35.293 0-63.904-27.5-63.904-60.787v-518.427z' /%3E%3Cpath fill='%23fff' d='M490.583 568.655c0 7.729-2.311 15.987-6.933 24.777s-11.668 17.162-21.14 25.118c-9.471 7.956-21.405 14.358-35.801 19.208s-30.611 7.274-48.644 7.274c-38.34 0-68.268-11.176-89.787-33.528s-32.278-52.319-32.278-89.901c0-25.459 4.925-47.962 14.775-67.511s24.095-34.665 42.734-45.348c18.639-10.684 40.916-16.025 66.829-16.025 16.063 0 30.8 2.349 44.212 7.047s24.777 10.759 34.096 18.185c9.32 7.425 16.442 15.343 21.367 23.754s7.388 16.253 7.388 23.527c0 7.425-2.766 13.714-8.297 18.867s-12.237 7.729-20.117 7.729c-5.152 0-9.433-1.326-12.843-3.978s-7.236-6.933-11.479-12.843c-7.577-11.517-15.495-20.155-23.754-25.913s-18.753-8.638-31.482-8.638c-18.336 0-33.111 7.16-44.325 21.481s-16.821 33.907-16.821 58.759c0 11.669 1.44 22.39 4.319 32.164s7.047 18.109 12.502 25.004c5.455 6.895 12.047 12.123 19.776 15.684s16.215 5.342 25.459 5.342c12.426 0 23.072-2.879 31.937-8.638s16.707-14.548 23.527-26.368c3.789-6.971 7.88-12.426 12.275-16.366s9.774-5.91 16.139-5.91c7.577 0 13.866 2.879 18.867 8.638s7.501 11.896 7.501 18.412zM767.219 568.655c0 7.729-2.311 15.987-6.933 24.777s-11.668 17.162-21.14 25.118c-9.471 7.956-21.405 14.358-35.801 19.208s-30.611 7.274-48.644 7.274c-38.34 0-68.268-11.176-89.787-33.528s-32.278-52.319-32.278-89.901c0-25.459 4.925-47.962 14.775-67.511s24.095-34.665 42.734-45.348c18.639-10.684 40.916-16.025 66.829-16.025 16.063 0 30.8 2.349 44.212 7.047s24.777 10.759 34.096 18.185c9.32 7.425 16.442 15.343 21.367 23.754s7.388 16.253 7.388 23.527c0 7.425-2.766 13.714-8.297 18.867s-12.237 7.729-20.117 7.729c-5.152 0-9.433-1.326-12.843-3.978s-7.236-6.933-11.479-12.843c-7.577-11.517-15.495-20.155-23.754-25.913s-18.753-8.638-31.482-8.638c-18.336 0-33.111 7.16-44.325 21.481s-16.821 33.907-16.821 58.759c0 11.669 1.44 22.39 4.319 32.164s7.047 18.109 12.502 25.004c5.455 6.895 12.047 12.123 19.776 15.684s16.215 5.342 25.459 5.342c12.426 0 23.072-2.879 31.937-8.638s16.707-14.548 23.527-26.368c3.789-6.971 7.88-12.426 12.275-16.366s9.774-5.91 16.139-5.91c7.577 0 13.866 2.879 18.867 8.638s7.501 11.896 7.501 18.412z' /%3E%3C/svg%3E\")}.playkit-icon-speed{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M512 832c35.346 0 64-28.654 64-64s-28.654-64-64-64c-35.346 0-64 28.654-64 64s28.654 64 64 64zM480.239 643.971c-0.158-1.272-0.239-2.566-0.239-3.876v-192.19c0-17.621 14.204-31.905 32-31.905 17.673 0 32 14.497 32 31.905v192.19c0 1.313-0.079 2.607-0.232 3.878 55.325 14.128 96.232 64.301 96.232 124.027 0 70.692-57.308 128-128 128s-128-57.308-128-128c0-59.729 40.91-109.903 96.239-124.029zM928 576c0 17.673-14.327 32-32 32s-32-14.327-32-32c0-194.404-157.596-352-352-352s-352 157.596-352 352c0 17.673-14.327 32-32 32s-32-14.327-32-32c0-229.75 186.25-416 416-416s416 186.25 416 416z' /%3E%3C/svg%3E\")}.playkit-icon-speed-down{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M512 800c35.346 0 64-28.654 64-64s-28.654-64-64-64c-35.346 0-64 28.654-64 64s28.654 64 64 64zM401.852 670.758c-1.056-0.826-2.077-1.728-3.055-2.706l-113.005-113.005c-12.533-12.533-12.65-32.737-0.066-45.321 12.497-12.497 32.536-12.719 45.321 0.066l113.005 113.005c0.976 0.976 1.876 1.998 2.701 3.059 19.106-11.343 41.416-17.855 65.248-17.855 70.692 0 128 57.308 128 128s-57.308 128-128 128c-70.692 0-128-57.308-128-128 0-23.829 6.511-46.137 17.852-65.242zM928 576c0 17.673-14.327 32-32 32s-32-14.327-32-32c0-194.404-157.596-352-352-352s-352 157.596-352 352c0 17.673-14.327 32-32 32s-32-14.327-32-32c0-229.75 186.25-416 416-416s416 186.25 416 416z'/%3E%3C/svg%3E\")}.playkit-icon-speed-up{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M512 800c35.346 0 64-28.654 64-64s-28.654-64-64-64c-35.346 0-64 28.654-64 64s28.654 64 64 64zM546.516 612.708c0.524-1.23 1.129-2.446 1.819-3.64l79.906-138.402c8.862-15.35 28.348-20.692 43.76-11.794 15.305 8.837 20.707 28.135 11.666 43.794l-79.906 138.402c-0.693 1.201-1.451 2.34-2.268 3.416 23.761 23.238 38.508 55.655 38.508 91.516 0 70.692-57.308 128-128 128s-128-57.308-128-128c0-70.692 57.308-128 128-128 11.959 0 23.535 1.64 34.516 4.708zM928 576c0 17.673-14.327 32-32 32s-32-14.327-32-32c0-194.404-157.596-352-352-352s-352 157.596-352 352c0 17.673-14.327 32-32 32s-32-14.327-32-32c0-229.75 186.25-416 416-416s416 186.25 416 416z'/%3E%3C/svg%3E\")}.playkit-icon-audio{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M768 625.124v-354.531l-352 135.385v330.022c0 70.692-57.308 128-128 128s-128-57.308-128-128c0-70.692 57.308-128 128-128 23.314 0 45.173 6.233 64 17.124v-241.124c0-13.241 8.155-25.114 20.513-29.867l416-160c20.96-8.062 43.487 7.41 43.487 29.867v512c0 70.692-57.308 128-128 128s-128-57.308-128-128c0-70.692 57.308-128 128-128 23.314 0 45.173 6.233 64 17.124zM288 800c35.346 0 64-28.654 64-64s-28.654-64-64-64c-35.346 0-64 28.654-64 64s28.654 64 64 64zM704 800c35.346 0 64-28.654 64-64s-28.654-64-64-64c-35.346 0-64 28.654-64 64s28.654 64 64 64z' /%3E%3C/svg%3E\")}.playkit-icon-arrow-down{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M301.255 338.745c-24.994-24.994-65.516-24.994-90.51 0s-24.994 65.516 0 90.51l256 256c24.994 24.994 65.516 24.994 90.51 0l256-256c24.994-24.994 24.994-65.516 0-90.51s-65.516-24.994-90.51 0l-210.745 210.745-210.745-210.745z' /%3E%3C/svg%3E\")}.playkit-icon-start-over{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M255.271 339.053c94.182-126.513 270.298-165.203 410.222-84.418 150.758 87.040 202.411 279.813 115.371 430.571s-279.813 202.411-430.571 115.371c-61.424-35.463-107.948-89.4-134.169-153.673-7.677-18.818-29.156-27.85-47.974-20.173s-27.85 29.156-20.173 47.974c32.339 79.269 89.818 145.906 165.517 189.611 185.96 107.364 423.747 43.649 531.111-142.311s43.649-423.747-142.311-531.111c-172.433-99.554-389.428-52.014-505.682 103.69l-27.226-78.49c-6.66-19.202-27.626-29.368-46.828-22.708s-29.368 27.626-22.708 46.828l52.434 151.164c5.36 15.452 20.275 25.513 36.61 24.694l159.799-8.011c20.299-1.018 35.929-18.298 34.911-38.596s-18.298-35.929-38.596-34.911l-89.738 4.499z' /%3E%3C/svg%3E\")}.playkit-icon-seek-end{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M742.494 323.053c-94.182-126.513-270.298-165.203-410.222-84.418-150.758 87.040-202.411 279.813-115.371 430.571s279.813 202.411 430.571 115.371c61.424-35.463 107.948-89.4 134.169-153.673 7.677-18.818 29.156-27.85 47.974-20.173s27.85 29.156 20.173 47.974c-32.339 79.269-89.818 145.906-165.517 189.611-185.96 107.364-423.747 43.649-531.111-142.311s-43.649-423.747 142.311-531.111c172.433-99.554 389.428-52.014 505.682 103.69l27.226-78.49c6.66-19.202 27.626-29.368 46.828-22.708s29.368 27.626 22.708 46.828l-52.434 151.164c-5.36 15.452-20.275 25.513-36.61 24.694l-159.799-8.011c-20.299-1.018-35.929-18.298-34.911-38.596s18.298-35.929 38.596-34.911l89.738 4.499z'/%3E%3C/svg%3E\")}.playkit-icon-rewind{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' opacity='0.5' d='M258.471 323.053c94.182-126.513 270.298-165.203 410.222-84.418 150.758 87.040 202.411 279.813 115.371 430.571s-279.813 202.411-430.571 115.371c-61.424-35.463-107.948-89.4-134.169-153.673-7.677-18.818-29.156-27.85-47.974-20.173s-27.85 29.156-20.173 47.974c32.339 79.269 89.818 145.906 165.517 189.611 185.96 107.364 423.747 43.649 531.111-142.311s43.649-423.747-142.311-531.111c-172.433-99.554-389.428-52.014-505.682 103.69l-27.226-78.49c-6.66-19.202-27.626-29.368-46.828-22.708s-29.368 27.626-22.708 46.828l52.434 151.164c5.36 15.452 20.275 25.513 36.61 24.694l159.799-8.011c20.299-1.018 35.929-18.298 34.911-38.596s-18.298-35.929-38.596-34.911l-89.738 4.499z'%3E%3C/path%3E%3Cpath fill='%23fff' d='M816.068 431.974c-20.553-78.699-71.369-149.456-147.375-193.338-139.923-80.785-316.040-42.095-410.222 84.418l89.738-4.499c20.299-1.018 37.579 14.613 38.596 34.911s-14.613 37.579-34.911 38.596l-159.799 8.011c-16.335 0.819-31.25-9.242-36.61-24.694l-52.434-151.164c-6.66-19.202 3.506-40.167 22.708-46.828s40.167 3.506 46.828 22.708l27.226 78.49c116.254-155.703 333.248-203.244 505.682-103.69 91.184 52.645 152.976 136.648 179.618 230.523l-69.044 26.555z'%3E%3C/path%3E%3C/svg%3E\")}.playkit-icon-rewind-10{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M258.471 323.053c94.182-126.513 270.298-165.203 410.222-84.418 150.758 87.040 202.411 279.813 115.371 430.571s-279.813 202.411-430.571 115.371c-61.424-35.463-107.948-89.4-134.169-153.673-7.677-18.818-29.156-27.85-47.974-20.173s-27.85 29.156-20.173 47.974c32.339 79.269 89.818 145.906 165.517 189.611 185.96 107.364 423.747 43.649 531.111-142.311s43.649-423.747-142.311-531.111c-172.433-99.554-389.428-52.014-505.682 103.69l-27.226-78.49c-6.66-19.202-27.626-29.368-46.828-22.708s-29.368 27.626-22.708 46.828l52.434 151.164c5.36 15.452 20.275 25.513 36.61 24.694l159.799-8.011c20.299-1.018 35.929-18.298 34.911-38.596s-18.298-35.929-38.596-34.911l-89.738 4.499z'%3E%3C/path%3E%3Cpath fill='%23fff' d='M413.327 636.083h67.358v-252.083h-48.527c-2.173 7.358-4.949 13.589-8.329 18.693s-7.726 9.139-13.037 12.106c-5.311 2.967-11.709 5.103-19.193 6.409s-16.417 1.958-26.798 1.958v41.302h48.527v171.616zM596.807 554.192c0 17.803 1.569 29.849 4.708 36.139s8.208 9.435 15.21 9.435c7.001 0 12.071-3.145 15.21-9.435s4.708-18.336 4.708-36.139v-83.316c0-17.803-1.569-29.849-4.708-36.139s-8.208-9.435-15.21-9.435c-7.001 0-12.071 3.145-15.21 9.435s-4.708 18.336-4.708 36.139v83.316zM529.449 512.534c0-25.398 1.75-46.405 5.251-63.021s8.812-29.789 15.934-39.522c7.122-9.732 16.176-16.497 27.16-20.295s23.962-5.697 38.93-5.697c14.969 0 27.945 1.899 38.93 5.697s20.038 10.563 27.16 20.295c7.122 9.732 12.433 22.906 15.934 39.522s5.251 37.622 5.251 63.021c0 25.636-1.75 46.702-5.251 63.199s-8.812 29.552-15.934 39.166c-7.122 9.613-16.176 16.2-27.16 19.761s-23.962 5.341-38.93 5.341c-14.969 0-27.945-1.78-38.93-5.341s-20.038-10.147-27.16-19.761c-7.122-9.613-12.433-22.668-15.934-39.166s-5.251-37.563-5.251-63.199z'%3E%3C/path%3E%3C/svg%3E\")}.playkit-icon-forward{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' opacity='0.5' d='M765.529 323.053c-94.182-126.513-270.298-165.203-410.222-84.418-150.758 87.040-202.411 279.813-115.371 430.571s279.813 202.411 430.571 115.371c61.424-35.463 107.948-89.4 134.169-153.673 7.677-18.818 29.156-27.85 47.974-20.173s27.85 29.156 20.173 47.974c-32.339 79.269-89.818 145.906-165.517 189.611-185.96 107.364-423.747 43.649-531.111-142.311s-43.649-423.747 142.311-531.111c172.433-99.554 389.428-52.014 505.682 103.69l27.226-78.49c6.66-19.202 27.626-29.368 46.828-22.708s29.368 27.626 22.708 46.828l-52.434 151.164c-5.36 15.452-20.275 25.513-36.61 24.694l-159.799-8.011c-20.299-1.018-35.929-18.298-34.911-38.596s18.298-35.929 38.596-34.911l89.738 4.499z'%3E%3C/path%3E%3Cpath fill='%23fff' d='M207.932 431.974c20.553-78.699 71.369-149.456 147.375-193.338 139.923-80.785 316.040-42.095 410.222 84.418l-89.738-4.499c-20.299-1.018-37.579 14.613-38.596 34.911s14.613 37.579 34.911 38.596l159.799 8.011c16.335 0.819 31.25-9.242 36.61-24.694l52.434-151.164c6.66-19.202-3.506-40.167-22.708-46.828s-40.167 3.506-46.828 22.708l-27.226 78.49c-116.254-155.703-333.248-203.244-505.682-103.69-91.184 52.645-152.976 136.648-179.618 230.523l69.044 26.555z'%3E%3C/path%3E%3C/svg%3E\")}.playkit-icon-forward-10{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M765.529 323.053c-94.182-126.513-270.298-165.203-410.222-84.418-150.758 87.040-202.411 279.813-115.371 430.571s279.813 202.411 430.571 115.371c61.424-35.463 107.948-89.4 134.169-153.673 7.677-18.818 29.156-27.85 47.974-20.173s27.85 29.156 20.173 47.974c-32.339 79.269-89.818 145.906-165.517 189.611-185.96 107.364-423.747 43.649-531.111-142.311s-43.649-423.747 142.311-531.111c172.433-99.554 389.428-52.014 505.682 103.69l27.226-78.49c6.66-19.202 27.626-29.368 46.828-22.708s29.368 27.626 22.708 46.828l-52.434 151.164c-5.36 15.452-20.275 25.513-36.61 24.694l-159.799-8.011c-20.299-1.018-35.929-18.298-34.911-38.596s18.298-35.929 38.596-34.911l89.738 4.499z'%3E%3C/path%3E%3Cpath fill='%23fff' d='M365.327 636.083h67.358v-252.083h-48.527c-2.173 7.358-4.949 13.589-8.329 18.693s-7.726 9.139-13.037 12.106c-5.311 2.967-11.709 5.103-19.193 6.409s-16.417 1.958-26.798 1.958v41.302h48.527v171.616zM548.807 554.192c0 17.803 1.569 29.849 4.708 36.139s8.208 9.435 15.21 9.435c7.001 0 12.071-3.145 15.21-9.435s4.708-18.336 4.708-36.139v-83.316c0-17.803-1.569-29.849-4.708-36.139s-8.208-9.435-15.21-9.435c-7.001 0-12.071 3.145-15.21 9.435s-4.708 18.336-4.708 36.139v83.316zM481.449 512.534c0-25.398 1.75-46.405 5.251-63.021s8.812-29.789 15.934-39.522c7.122-9.732 16.176-16.497 27.16-20.295s23.962-5.697 38.93-5.697c14.969 0 27.945 1.899 38.93 5.697s20.038 10.563 27.16 20.295c7.122 9.732 12.433 22.906 15.934 39.522s5.251 37.622 5.251 63.021c0 25.636-1.75 46.702-5.251 63.199s-8.812 29.552-15.934 39.166c-7.122 9.613-16.176 16.2-27.16 19.761s-23.962 5.341-38.93 5.341c-14.969 0-27.945-1.78-38.93-5.341s-20.038-10.147-27.16-19.761c-7.122-9.613-12.433-22.668-15.934-39.166s-5.251-37.563-5.251-63.199z'%3E%3C/path%3E%3C/svg%3E\")}.playkit-icon-vr-stereo{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 32 32' width='32' height='32' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M25 16C25 17.3807 23.8807 18.5 22.5 18.5C21.1193 18.5 20 17.3807 20 16C20 14.6193 21.1193 13.5 22.5 13.5C23.8807 13.5 25 14.6193 25 16Z'/%3E%3Cpath fill='%23fff' fill-rule='evenodd' clip-rule='evenodd' d='M29.6097 6.79267C30.0475 6.45594 30.1293 5.82809 29.7926 5.39034C29.4559 4.95258 28.828 4.87069 28.3903 5.20743L2.39028 25.2074C1.95252 25.5442 1.87063 26.172 2.20736 26.6098C2.5441 27.0475 3.17195 27.1294 3.6097 26.7927L5.94017 25H11.8676C12.9214 25 13.8979 24.4471 14.4401 23.5435L16 20.9437L17.5599 23.5435C18.1021 24.4471 19.0786 25 20.1324 25H27C28.6569 25 30 23.6569 30 22V10C30 8.96373 29.4746 8.05017 28.6756 7.5112L29.6097 6.79267ZM26.7402 9L8.54017 23H11.8676C12.2189 23 12.5444 22.8157 12.7251 22.5145L14.285 19.9147C14.4539 19.6332 14.6895 19.3976 14.971 19.2287C15.9182 18.6604 17.1467 18.9675 17.715 19.9147L19.2749 22.5145C19.4556 22.8157 19.7811 23 20.1324 23H27C27.5523 23 28 22.5523 28 22V10C28 9.44772 27.5523 9 27 9H26.7402Z'/%3E%3Cpath fill='%23fff' d='M5 7H22.7795L20.1795 9H5C4.44772 9 4 9.44772 4 10V21.4458L2.13197 22.8827C2.04618 22.6036 2 22.3072 2 22V10C2 8.34315 3.34315 7 5 7Z'/%3E%3Cpath fill='%23fff' d='M11.9163 15.3563C11.6324 14.2875 10.6582 13.5 9.5 13.5C8.11929 13.5 7 14.6193 7 16C7 16.9287 7.50642 17.7392 8.25819 18.1703L11.9163 15.3563Z'/%3E%3C/svg%3E\")}.playkit-icon-vr-stereo-full{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 32 32' width='32' height='32' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M12 16C12 17.3807 10.8807 18.5 9.5 18.5C8.11929 18.5 7 17.3807 7 16C7 14.6193 8.11929 13.5 9.5 13.5C10.8807 13.5 12 14.6193 12 16Z'/%3E%3Cpath fill='%23fff' d='M22.5 18.5C23.8807 18.5 25 17.3807 25 16C25 14.6193 23.8807 13.5 22.5 13.5C21.1193 13.5 20 14.6193 20 16C20 17.3807 21.1193 18.5 22.5 18.5Z'/%3E%3Cpath fill='%23fff' fill-rule='evenodd' clip-rule='evenodd' d='M27 7H5C3.34315 7 2 8.34315 2 10V22C2 23.6569 3.34315 25 5 25H11.8676C12.9214 25 13.8979 24.4471 14.4401 23.5435L16 20.9437L17.5599 23.5435C18.1021 24.4471 19.0786 25 20.1324 25H27C28.6569 25 30 23.6569 30 22V10C30 8.34315 28.6569 7 27 7ZM4 10C4 9.44772 4.44772 9 5 9H27C27.5523 9 28 9.44772 28 10V22C28 22.5523 27.5523 23 27 23H20.1324C19.7811 23 19.4556 22.8157 19.2749 22.5145L17.715 19.9147C17.1467 18.9675 15.9182 18.6604 14.971 19.2287C14.6895 19.3976 14.4539 19.6332 14.285 19.9147L12.7251 22.5145C12.5444 22.8157 12.2189 23 11.8676 23H5C4.44772 23 4 22.5523 4 22V10Z'/%3E%3C/svg%3E\")}.playkit-icon-chromecast{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M160 704v96h96c0-53.12-42.88-96-96-96zM160 576v64c88.32 0 160 71.68 160 160h64c0-123.84-100.16-224-224-224zM736 352h-448v52.16c126.72 40.96 226.88 141.12 267.84 267.84h180.16v-320zM160 448v64c159.040 0 288 128.96 288 288h64c0-194.56-157.76-352-352-352zM800 224h-576c-35.2 0-64 28.8-64 64v96h64v-96h576v448h-224v64h224c35.2 0 64-28.8 64-64v-448c0-35.2-28.8-64-64-64z'%3E%3C/path%3E%3C/svg%3E\")}.playkit-icon-chromecast-brand{background-image:var(--playkit-icon-chromecast-url)}.playkit-icon-next{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M640 549.333l-264.982 154.573c-30.386 17.725-55.018 3.388-55.018-32.094v-319.625c0-35.45 24.605-49.835 55.018-32.094l264.982 154.573v-154.448c0-17.794 14.204-32.219 32-32.219 17.673 0 32 14.398 32 32.219v383.562c0 17.794-14.204 32.219-32 32.219-17.673 0-32-14.398-32-32.219v-154.448z'%3E%3C/path%3E%3C/svg%3E\")}.playkit-icon-prev{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M384 549.333l264.982 154.573c30.386 17.725 55.018 3.388 55.018-32.094v-319.625c0-35.45-24.605-49.835-55.018-32.094l-264.982 154.573v-154.448c0-17.794-14.204-32.219-32-32.219-17.673 0-32 14.398-32 32.219v383.562c0 17.794 14.204 32.219 32 32.219 17.673 0 32-14.398 32-32.219v-154.448z'%3E%3C/path%3E%3C/svg%3E\")}.playkit-icon-picture-in-picture-start{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M224 256c-17.673 0-32 14.327-32 32v448c0 17.673 14.327 32 32 32h576c17.673 0 32-14.327 32-32v-448c0-17.673-14.327-32-32-32h-576zM224 192h576c53.019 0 96 42.981 96 96v448c0 53.019-42.981 96-96 96h-576c-53.019 0-96-42.981-96-96v-448c0-53.019 42.981-96 96-96z'%3E%3C/path%3E%3Cpath fill='%23fff' d='M544 512h192c17.673 0 32 14.327 32 32v128c0 17.673-14.327 32-32 32h-192c-17.673 0-32-14.327-32-32v-128c0-17.673 14.327-32 32-32z'%3E%3C/path%3E%3C/svg%3E\")}.playkit-icon-picture-in-picture-stop{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M800 192c51.126 0 92.917 39.965 95.837 90.359l0.163 5.641v448c0 51.126-39.965 92.917-90.359 95.837l-5.641 0.163h-576c-51.126 0-92.917-39.965-95.837-90.359l-0.163-5.641v-64c0-17.673 14.327-32 32-32 16.411 0 29.936 12.353 31.785 28.268l0.215 3.732v64c0 16.411 12.353 29.936 28.268 31.785l3.732 0.215h576c16.411 0 29.936-12.353 31.785-28.268l0.215-3.732v-448c0-16.411-12.353-29.936-28.268-31.785l-3.732-0.215h-192c-17.673 0-32-14.327-32-32 0-16.411 12.353-29.936 28.268-31.785l3.732-0.215h192z'%3E%3C/path%3E%3Cpath fill='%23fff' d='M416 192c17.673 0 32 14.327 32 32 0 16.411-12.353 29.936-28.268 31.785l-3.732 0.215-178.752-0.032 202.711 202.736c12.497 12.497 12.497 32.758 0 45.255-11.535 11.535-29.687 12.423-42.24 2.662l-3.015-2.662-202.704-202.679v178.72c0 16.411-12.353 29.936-28.268 31.785l-3.732 0.215c-16.411 0-29.936-12.353-31.785-28.268l-0.215-3.732v-256l0.005-0.588c0.014-0.757 0.054-1.514 0.122-2.268l-0.127 2.856c0-1.62 0.12-3.212 0.353-4.767 0.083-0.544 0.182-1.101 0.295-1.656 0.141-0.705 0.307-1.399 0.495-2.084 0.14-0.5 0.288-0.992 0.449-1.482 0.204-0.629 0.434-1.262 0.684-1.885 0.227-0.568 0.466-1.121 0.722-1.669 0.311-0.661 0.644-1.314 0.998-1.954 0.212-0.388 0.439-0.779 0.676-1.166 0.503-0.818 1.040-1.614 1.61-2.382 0.174-0.238 0.351-0.47 0.532-0.7 1.588-2.021 3.42-3.854 5.45-5.446l-2.891 2.563c1.133-1.133 2.329-2.163 3.578-3.090 0.774-0.571 1.569-1.108 2.389-1.609 0.386-0.239 0.777-0.466 1.171-0.685 0.633-0.348 1.285-0.681 1.951-0.993 0.544-0.255 1.098-0.495 1.656-0.718 0.632-0.253 1.265-0.483 1.907-0.694 0.476-0.154 0.969-0.302 1.464-0.438 0.69-0.192 1.384-0.359 2.086-0.502 0.557-0.111 1.115-0.209 1.674-0.293 0.327-0.051 0.672-0.097 1.019-0.137l0.876-0.088c0.755-0.067 1.511-0.108 2.268-0.122l0.588-0.005h256z'%3E%3C/path%3E%3C/svg%3E\")}.playkit-icon-advanced-audio-description{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 32 32' width='32' height='32' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M24.5517 12.666H23.6342C24.67 13.5857 25.2672 14.8454 25.2672 16.1541C25.2672 17.3159 24.7998 18.4262 23.9718 19.3072H24.8517C25.5874 18.403 26 17.2953 26 16.1541C26 14.8686 25.4749 13.6321 24.5517 12.666Z'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M29.6097 6.79267C30.0475 6.45594 30.1293 5.82809 29.7926 5.39034C29.4559 4.95258 28.828 4.87069 28.3903 5.20743L2.39028 25.2074C1.95252 25.5442 1.87063 26.172 2.20736 26.6098C2.5441 27.0475 3.17195 27.1294 3.6097 26.7927L4.67285 25.9749C4.77836 25.9914 4.88663 26 4.997 26H27.003C28.105 26 29 25.1495 29 24.1004V7.89958C29 7.70242 28.9679 7.51176 28.9083 7.33221L29.6097 6.79267ZM27 8.80013L21.9744 12.666H22.6752C23.5984 13.6321 24.1235 14.8686 24.1235 16.1541C24.1235 17.2953 23.7109 18.403 22.9695 19.3072H22.0953C22.9233 18.4262 23.3907 17.3159 23.3907 16.1541C23.3907 14.8877 22.8315 13.6673 21.8569 12.7564L21.2576 13.2174C21.8933 14.0825 22.2412 15.1019 22.2412 16.1541C22.2412 17.2953 21.8344 18.403 21.093 19.3072H20.2188C21.041 18.4262 21.5084 17.3159 21.5084 16.1541C21.5084 15.2579 21.2311 14.3848 20.7237 13.628L19.7255 14.3959C20.0176 14.8723 20.1836 15.42 20.1836 16.0032C20.1836 17.8374 18.5103 19.3289 16.4532 19.3289V19.3315H14.1654V18.6729L13.3945 19.2659V19.3327H13.3077L7.1129 24.0979C12.6219 24.0951 27 24.0952 27 24.0952V8.80013ZM15.732 17.4679V17.7781H16.2513C17.3505 17.7781 18.2362 16.9821 18.2362 16.0032C18.2362 15.859 18.2169 15.7188 18.1804 15.5844L15.732 17.4679Z' fill='%23fff'/%3E%3Cpath fill='%23fff' d='M4.997 6H24.0795L21.6053 7.90324C15.0918 7.90485 5 7.90476 5 7.90476V20.6766L3 22.215V7.89958C3 6.85047 3.89498 6 4.997 6Z'/%3E%3Cpath fill='%23fff' d='M14.1654 12.6723H15.4055L14.1654 13.6263V12.6723Z'/%3E%3Cpath fill='%23fff' d='M13.3945 12.6709V14.2193L11.7717 15.4676V14.678L10.4942 16.4502L6.74704 19.3327H6L11.3547 12.6709H13.3945Z'/%3E%3C/svg%3E\")}.playkit-icon-advanced-audio-description-active{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 32 32' width='32' height='32' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M24.5517 12.666H23.6342C24.67 13.5857 25.2672 14.8454 25.2672 16.1541C25.2672 17.3159 24.7998 18.4262 23.9718 19.3072H24.8517C25.5874 18.403 26 17.2953 26 16.1541C26 14.8686 25.4749 13.6321 24.5517 12.666Z'/%3E%3Cpath fill='%23fff' fill-rule='evenodd' clip-rule='evenodd' d='M13.3945 19.3327H11.7615V18.4517H9.02645L8.3975 19.3327H6L11.3547 12.6709H13.3945V19.3327ZM10.0522 17.0635H11.7717V14.678L10.0522 17.0635Z'/%3E%3Cpath fill='%23fff' fill-rule='evenodd' clip-rule='evenodd' d='M20.1836 16.0032C20.1836 17.8374 18.5103 19.3289 16.4532 19.3289V19.3315H14.1654V12.6723H16.4705C18.5276 12.6723 20.1836 14.1613 20.1836 16.0032ZM16.2513 14.2308C17.3505 14.2308 18.2362 15.0268 18.2362 16.0032C18.2362 16.9821 17.3505 17.7781 16.2513 17.7781H15.732V14.2308H16.2513Z'/%3E%3Cpath fill='%23fff' d='M21.7577 12.666H22.6752C23.5984 13.6321 24.1235 14.8686 24.1235 16.1541C24.1235 17.2953 23.7109 18.403 22.9695 19.3072H22.0953C22.9233 18.4262 23.3907 17.3159 23.3907 16.1541C23.3907 14.8454 22.7935 13.5857 21.7577 12.666Z'/%3E%3Cpath fill='%23fff' d='M20.7929 12.666H19.8812C20.917 13.5857 21.5084 14.8454 21.5084 16.1541C21.5084 17.3159 21.041 18.4262 20.2188 19.3072H21.093C21.8344 18.403 22.2412 17.2953 22.2412 16.1541C22.2412 14.8686 21.7219 13.6321 20.7929 12.666Z'/%3E%3Cpath fill='%23fff' fill-rule='evenodd' clip-rule='evenodd' d='M4.997 6C3.89498 6 3 6.85047 3 7.89958V24.1004C3 25.1406 3.89409 26 4.997 26H27.003C28.105 26 29 25.1495 29 24.1004V7.89958C29 6.85938 28.1059 6 27.003 6H4.997ZM27 24.0952C27 24.0952 4.99946 24.0951 5 24.1004V7.90476C5 7.90476 27.0005 7.90495 27 7.89958V24.0952Z'/%3E%3C/svg%3E\")}.playkit-icon-quality-hd:after{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 16 16' width='16' height='16' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M13.9931545,4 C14.5492199,4 15,4.45303631 15,4.99703014 L15,11.0029699 C15,11.5536144 14.5500512,12 13.9931545,12 L2.00684547,12 C1.45078007,12 1,11.5469637 1,11.0029699 L1,4.99703014 C1,4.4463856 1.44994876,4 2.00684547,4 L13.9931545,4 Z M3.73939861,5 L2,5 L2,11 L3.73939861,11 L3.73918396,8.56940659 L5.96845644,8.56940659 L5.9691596,11 L7.69930609,11 L7.69930609,5 L5.9691596,5 L5.96845644,7.32457143 L3.73918396,7.32457143 L3.73939861,5 Z M10.849653,5 L8.65690054,5 L8.65690054,11 L10.8774094,11 L11.1387878,10.9921562 C11.5670397,10.9660102 11.9583976,10.8744992 12.3128614,10.7176232 L12.3128614,10.7176232 L12.4919044,10.6311813 L12.686671,10.5199596 C13.0639309,10.2858264 13.3675515,9.98155416 13.5975328,9.60714286 C13.827514,9.23273155 13.9589319,8.81088809 13.9917864,8.34161247 L13.9917864,8.34161247 L14,8.10302198 L14,7.9010989 L13.9917864,7.66145717 C13.9589319,7.19033135 13.827514,6.76815149 13.5975328,6.39491758 C13.3292213,5.95947802 12.9583655,5.61813187 12.4849653,5.37087912 C12.0791937,5.15894819 11.6207417,5.03784481 11.1096093,5.00756896 L11.1096093,5.00756896 L10.849653,5 Z M10.849653,6.24862637 C11.154973,6.24862637 11.4101773,6.30906593 11.615266,6.42994505 C11.8203547,6.55082418 11.9745567,6.73282967 12.077872,6.97596154 C12.1605243,7.17046703 12.2101157,7.40497253 12.2266461,7.67947802 L12.2266461,7.67947802 L12.232845,7.89285714 L12.232845,8.10302198 L12.2265536,8.31796703 C12.2097764,8.59445055 12.1594449,8.83049451 12.075559,9.0260989 C11.9707016,9.2706044 11.8180416,9.4532967 11.617579,9.57417582 C11.4572089,9.67087912 11.2672321,9.7289011 11.0476484,9.74824176 L11.0476484,9.74824176 L10.8774094,9.75549451 L10.3957366,9.75600879 L10.3957366,6.24937143 Z'%3E%3C/path%3E%3C/svg%3E\")}.playkit-icon-quality-hd-active:after{background-image:var(--playkit-icon-quality-HD-active-url)}.playkit-icon-quality-4k:after{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 16 16' width='16' height='16' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M13.9931545,4 C14.5492199,4 15,4.45303631 15,4.99703014 L15,11.0029699 C15,11.5536144 14.5500512,12 13.9931545,12 L2.00684547,12 C1.45078007,12 1,11.5469637 1,11.0029699 L1,4.99703014 C1,4.4463856 1.44994876,4 2.00684547,4 L13.9931545,4 Z M6.52117789,5 L4.77853973,5 L4.7778117,5.01381978 L2,8.80769231 L2.10649455,9.76785714 L4.7778117,9.76866813 L4.77853973,11 L6.52117789,11 L6.52063574,9.76866813 L7.19402985,9.76785714 L7.19402985,8.5728022 L6.52063574,8.57362637 L6.52117789,5 Z M9.81282775,5 L7.99273901,5 L7.99273901,11 L9.81282775,11 L9.8119758,9.5061978 L10.4712352,8.88589011 L11.8313836,11 L13.9806374,11 L11.6856603,7.6629978 L14,5 L11.7587737,5 L10.3549818,6.78434066 L9.8119758,7.5229011 L9.81282775,5 Z M4.7778117,7.01905934 L4.7778117,8.57362637 L3.65066559,8.5728022 L4.69624849,7.13873626 L4.7778117,7.01905934 Z'%3E%3C/path%3E%3C/svg%3E\")}.playkit-icon-quality-4k-active:after{background-image:var(--playkit-icon-quality-4K-active-url)}.playkit-icon-quality-8k:after{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 16 16' width='16' height='16' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M13.9931545,4 C14.5492199,4 15,4.45303631 15,4.99703014 L15,11.0029699 C15,11.5536144 14.5500512,12 13.9931545,12 L2.00684547,12 C1.45078007,12 1,11.5469637 1,11.0029699 L1,4.99703014 C1,4.4463856 1.44994876,4 2.00684547,4 L13.9931545,4 Z M4.5,5 C4.04427083,5 3.6389974,5.06279225 3.28417969,5.18837675 C2.92936198,5.31396126 2.65104167,5.499666 2.44921875,5.74549098 C2.24739583,5.99131597 2.14648438,6.29458918 2.14648438,6.65531062 C2.14648438,6.96259185 2.24820964,7.23112892 2.45166016,7.46092184 C2.58729384,7.61411712 2.75692636,7.74445187 2.96055773,7.85192607 L2.96055773,7.85192607 L3.07972656,7.90981323 L3.04817708,7.92134269 L2.87890625,8.000668 C2.71614583,8.08483634 2.57291667,8.18353373 2.44921875,8.29676019 L2.44921875,8.29676019 L2.33203125,8.41482966 L2.24394133,8.52320968 C2.08131378,8.74602266 2,9.00515316 2,9.3006012 C2,9.67735471 2.10986328,9.99131597 2.32958984,10.242485 C2.54931641,10.493654 2.84879557,10.6826987 3.22802734,10.8096192 C3.60725911,10.9365397 4.03613281,11 4.51464844,11 C4.99641927,11 5.42366536,10.9365397 5.79638672,10.8096192 C6.16910807,10.6826987 6.46289063,10.493654 6.67773438,10.242485 C6.89257813,9.99131597 7,9.67735471 7,9.3006012 C7,8.95591182 6.89176432,8.66065464 6.67529297,8.41482966 L6.67529297,8.41482966 L6.56041124,8.29676019 C6.3983742,8.14579158 6.20089157,8.02065242 5.96796332,7.92134269 L5.96796332,7.92134269 L5.94,7.911 L6.06141493,7.85192607 L6.20532227,7.76703407 C6.29701063,7.70758183 6.38019929,7.64241446 6.45488824,7.57153195 L6.45488824,7.57153195 L6.56054688,7.46092184 L6.65155707,7.3427967 C6.78945132,7.14054034 6.85839844,6.91137831 6.85839844,6.65531062 C6.85839844,6.29458918 6.75830078,5.99131597 6.55810547,5.74549098 C6.35791016,5.499666 6.08121745,5.31396126 5.72802734,5.18837675 C5.37483724,5.06279225 4.96549479,5 4.5,5 Z M9.8178888,5 L8,5 L8,11 L9.8178888,11 L9.81771088,9.5061978 L10.4751832,8.88673407 L11.8340048,11 L13.9806608,11 L11.6891307,7.6629978 L14,5 L11.7614827,5 L10.3593876,6.78434066 L9.81771088,7.5229011 L9.8178888,5 Z M4.50488281,8.51903808 C4.6546224,8.51903808 4.78401693,8.54375418 4.89306641,8.59318637 C5.00211589,8.64261857 5.0867513,8.71543086 5.14697266,8.81162325 C5.20719401,8.90781563 5.23730469,9.02805611 5.23730469,9.17234469 C5.23730469,9.30861723 5.20800781,9.4261857 5.14941406,9.5250501 C5.09082031,9.6239145 5.0069987,9.7007348 4.89794922,9.75551102 C4.78889974,9.81028724 4.66113281,9.83767535 4.51464844,9.83767535 C4.36490885,9.83767535 4.23388672,9.81028724 4.12158203,9.75551102 C4.00927734,9.7007348 3.92220052,9.6239145 3.86035156,9.5250501 C3.7985026,9.4261857 3.76757812,9.30861723 3.76757812,9.17234469 C3.76757812,9.02805611 3.7985026,8.90781563 3.86035156,8.81162325 C3.92220052,8.71543086 4.00846354,8.64261857 4.11914062,8.59318637 C4.22981771,8.54375418 4.35839844,8.51903808 4.50488281,8.51903808 Z M4.5,6.16232465 C4.63671875,6.16232465 4.74902344,6.18570474 4.83691406,6.23246493 C4.92480469,6.27922512 4.99072266,6.34535738 5.03466797,6.43086172 C5.07861328,6.51636607 5.10058594,6.62057448 5.10058594,6.74348697 C5.10058594,6.86372745 5.08024089,6.96993988 5.03955078,7.06212425 C4.99886068,7.15430862 4.93538411,7.22645291 4.84912109,7.27855711 C4.76285807,7.33066132 4.65136719,7.35671343 4.51464844,7.35671343 C4.37792969,7.35671343 4.2648112,7.33066132 4.17529297,7.27855711 C4.08577474,7.22645291 4.01985677,7.15430862 3.97753906,7.06212425 C3.93522135,6.96993988 3.9140625,6.86372745 3.9140625,6.74348697 C3.9140625,6.62057448 3.93522135,6.51636607 3.97753906,6.43086172 C4.01985677,6.34535738 4.08496094,6.27922512 4.17285156,6.23246493 C4.26074219,6.18570474 4.36979167,6.16232465 4.5,6.16232465 Z'%3E%3C/path%3E%3C/svg%3E\")}.playkit-icon-quality-8k-active:after{background-image:var(--playkit-icon-quality-8K-active-url)}.playkit-icon-closed-captions-on{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 32 32' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M15.114 18.545c0.144-0.275 0.217-0.533 0.217-0.774 0-0.204-0.078-0.395-0.234-0.575s-0.353-0.27-0.59-0.27c-0.199 0-0.367 0.061-0.504 0.185s-0.265 0.294-0.384 0.511c-0.213 0.369-0.458 0.644-0.735 0.824s-0.61 0.27-0.998 0.27c-0.289 0-0.554-0.056-0.796-0.167s-0.447-0.275-0.618-0.49c-0.171-0.215-0.301-0.476-0.391-0.781s-0.135-0.64-0.135-1.005c0-0.777 0.175-1.389 0.526-1.836s0.812-0.671 1.385-0.671c0.398 0 0.726 0.090 0.984 0.27s0.505 0.45 0.742 0.81c0.133 0.185 0.252 0.318 0.359 0.401s0.24 0.124 0.401 0.124c0.246 0 0.456-0.081 0.629-0.242s0.259-0.357 0.259-0.59c0-0.227-0.077-0.472-0.231-0.735s-0.377-0.51-0.668-0.742c-0.291-0.232-0.646-0.421-1.066-0.568s-0.88-0.22-1.382-0.22c-0.81 0-1.506 0.167-2.088 0.501s-1.028 0.806-1.335 1.417-0.462 1.314-0.462 2.11c0 1.174 0.336 2.111 1.009 2.809s1.608 1.048 2.806 1.048c0.564 0 1.070-0.076 1.52-0.227s0.823-0.352 1.119-0.6c0.296-0.249 0.516-0.51 0.661-0.785z'%3E%3C/path%3E %3Cpath fill='%23fff' d='M23.759 18.545c0.145-0.275 0.217-0.533 0.217-0.774 0-0.204-0.078-0.395-0.234-0.575s-0.353-0.27-0.59-0.27c-0.199 0-0.367 0.061-0.504 0.185s-0.265 0.294-0.384 0.511c-0.213 0.369-0.458 0.644-0.735 0.824s-0.61 0.27-0.998 0.27c-0.289 0-0.554-0.056-0.796-0.167s-0.448-0.275-0.618-0.49c-0.17-0.215-0.301-0.476-0.391-0.781s-0.135-0.64-0.135-1.005c0-0.777 0.175-1.389 0.526-1.836s0.812-0.671 1.385-0.671c0.398 0 0.726 0.090 0.984 0.27s0.506 0.45 0.742 0.81c0.133 0.185 0.252 0.318 0.359 0.401s0.24 0.124 0.401 0.124c0.246 0 0.456-0.081 0.629-0.242s0.259-0.357 0.259-0.59c0-0.227-0.077-0.472-0.231-0.735s-0.377-0.51-0.668-0.742c-0.291-0.232-0.646-0.421-1.066-0.568s-0.88-0.22-1.382-0.22c-0.81 0-1.506 0.167-2.088 0.501s-1.028 0.806-1.335 1.417-0.462 1.314-0.462 2.11c0 1.174 0.336 2.111 1.009 2.809s1.608 1.048 2.806 1.048c0.564 0 1.070-0.076 1.52-0.227s0.823-0.352 1.119-0.6 0.516-0.51 0.661-0.785z'%3E%3C/path%3E %3Cpath fill='%23fff' d='M3 7.9c0-1.049 0.895-1.9 1.997-1.9h22.006c1.103 0 1.997 0.859 1.997 1.9v16.201c0 1.049-0.895 1.9-1.997 1.9h-22.006c-1.103 0-1.997-0.859-1.997-1.9v-16.201zM5 24.1c-0.001-0.005 22-0.005 22-0.005v-16.196c0 0.005-22 0.005-22 0.005v16.196z'%3E%3C/path%3E%3C/svg%3E\")}.playkit-icon-closed-captions-off{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 32 32' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M30.133 6.838l-1.143 0.863c0.007 0.065 0.011 0.131 0.011 0.198v16.201c0 1.049-0.895 1.9-1.997 1.9h-22.006c-0.080 0-0.159-0.005-0.236-0.013l-1.128 0.851c-0.463 0.349-1.121 0.257-1.471-0.206s-0.257-1.121 0.206-1.471l26.5-20c0.463-0.349 1.121-0.257 1.471 0.206s0.257 1.121-0.206 1.471zM27 9.202l-4.619 3.486c0.222 0.109 0.421 0.233 0.596 0.373 0.291 0.232 0.514 0.479 0.668 0.742s0.231 0.508 0.231 0.735c0 0.232-0.086 0.429-0.259 0.59s-0.382 0.242-0.629 0.242c-0.161 0-0.295-0.041-0.401-0.124s-0.226-0.217-0.359-0.401c-0.237-0.36-0.484-0.63-0.742-0.81-0.164-0.114-0.357-0.193-0.578-0.234l-2.249 1.697c-0.045 0.237-0.068 0.495-0.068 0.774 0 0.365 0.045 0.7 0.135 1.005s0.22 0.566 0.391 0.781c0.171 0.215 0.377 0.379 0.618 0.49s0.507 0.167 0.796 0.167c0.388 0 0.721-0.090 0.998-0.27s0.522-0.455 0.735-0.824c0.118-0.218 0.246-0.388 0.384-0.511s0.305-0.185 0.504-0.185c0.237 0 0.433 0.090 0.59 0.27s0.234 0.372 0.234 0.575c0 0.241-0.072 0.5-0.217 0.774s-0.365 0.536-0.661 0.785-0.669 0.449-1.119 0.6c-0.45 0.152-0.957 0.227-1.52 0.227-1.198 0-2.133-0.349-2.806-1.048-0.536-0.557-0.858-1.265-0.967-2.123l-1.382 1.043c-0.033 0.165-0.096 0.337-0.19 0.516-0.145 0.275-0.365 0.536-0.661 0.785s-0.669 0.449-1.119 0.6c-0.246 0.083-0.508 0.143-0.788 0.18l-5.283 3.987c5.615-0.003 19.737-0.003 19.737-0.003v-14.893z'%3E%3C/path%3E %3Cpath fill='%23fff' d='M4.997 6h19.546l-2.492 1.903c-6.487 0.002-17.051 0.002-17.051 0.002v13.019l-2 1.527v-14.551c0-1.049 0.895-1.9 1.997-1.9z'%3E%3C/path%3E %3Cpath fill='%23fff' d='M12.841 14.034c0.179 0.125 0.353 0.293 0.521 0.504l1.399-1.068c-0.121-0.141-0.264-0.277-0.428-0.409-0.291-0.232-0.646-0.421-1.066-0.568s-0.88-0.22-1.382-0.22c-0.81 0-1.506 0.167-2.088 0.501s-1.028 0.806-1.335 1.417-0.462 1.314-0.462 2.11c0 0.77 0.144 1.437 0.433 2.002l1.598-1.22c-0.056-0.252-0.085-0.522-0.085-0.81 0-0.777 0.175-1.389 0.526-1.836s0.812-0.671 1.385-0.671c0.398 0 0.726 0.090 0.984 0.27z'%3E%3C/path%3E%3C/svg%3E\")}@keyframes playkit-openDropmenu{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}.playkit-dropdown{position:relative;font-size:15px}.playkit-dropdown .playkit-label-badge{position:relative}.playkit-dropdown .playkit-label-badge:after{top:-5px;right:-18px}.playkit-dropdown.playkit-active .playkit-dropdown-menu{display:block;opacity:1}.playkit-dropdown.playkit-active .playkit-dropdown-button .playkit-icon-arrow-down{transform:rotate(180deg)}.playkit-dropdown .playkit-dropdown-button{font-weight:bold;line-height:18px;color:#fff;cursor:pointer;padding-left:20px;display:flex}.playkit-dropdown .playkit-dropdown-button .playkit-icon{width:16px;height:16px;vertical-align:middle;margin-left:6px;transition:150ms transform;will-change:transform}.playkit-dropdown .playkit-dropdown-button>.playkit-label-badge.playkit-badge-icon{margin-right:13px}.playkit-dropdown-menu{display:block;opacity:1;position:absolute;background-color:#333;box-shadow:0 2px 8px 0 rgba(0,0,0,.3);border-radius:4px;padding:8px 0;z-index:5;animation:playkit-openDropmenu 100ms ease-out forwards;max-height:220px;overflow-y:auto;font-size:15px;text-align:left;font-weight:normal}.playkit-dropdown-menu.playkit-top{margin-bottom:10px;bottom:100%}.playkit-dropdown-menu.playkit-bottom{margin-top:10px;top:100%}.playkit-dropdown-menu.playkit-right{left:0}.playkit-dropdown-menu.playkit-left{right:0}.playkit-dropdown-menu.playkit-stick-bottom{bottom:-95px;margin:5px 0}.playkit-dropdown-menu .playkit-dropdown-menu-item{display:flex;justify-content:space-between;align-items:center;padding:4px 12px;margin:4px;white-space:nowrap;min-height:30px;cursor:pointer;border-radius:4px}.playkit-dropdown-menu .playkit-dropdown-menu-item:hover,.playkit-dropdown-menu .playkit-dropdown-menu-item:focus{background-color:var(--playkit-tone-6-color);color:#fff}.playkit-dropdown-menu .playkit-dropdown-menu-item.playkit-active .playkit-menu-icon-container{opacity:1}.playkit-dropdown-menu .playkit-dropdown-menu-item .playkit-icon-check-active{display:inline-block;margin-left:16px;vertical-align:middle;width:24px;height:24px}.playkit-dropdown-menu .playkit-dropdown-menu-item .playkit-menu-icon-container{opacity:0}.playkit-dropdown-menu .playkit-dropdown-menu-item>.playkit-label-badge.playkit-badge-icon{margin-right:5px}.playkit-player .playkit-control-button{width:32px;height:32px;border-radius:4px;background:rgba(0,0,0,0);display:inline-block;opacity:.8;border:none;padding:0;cursor:pointer}.playkit-player .playkit-control-button.playkit-button-badge{position:relative}.playkit-player .playkit-control-button.playkit-button-badge:after{top:-4px;right:-1px}.playkit-player .playkit-control-button i{width:32px;height:32px}.playkit-player .playkit-control-button.playkit-active{opacity:1}.playkit-player .playkit-control-button:disabled{opacity:.4;cursor:default}.playkit-player .playkit-control-button.playkit-control-button-rounded{width:36px;height:36px;padding:2px}.playkit-player:not(.playkit-touch) .playkit-control-button:not(:disabled):hover{opacity:1}.playkit-player:not(.playkit-touch) .playkit-control-button:not(:disabled).playkit-control-button-rounded:hover{background-color:rgba(0,0,0,.4);border-radius:18px}.playkit-player .playkit-control-button-container{display:inline-block;position:relative;vertical-align:top}.playkit-player.playkit-touch .playkit-player .playkit-control-button-container{position:static}.playkit-player.playkit-touch .playkit-control-button{position:relative}.playkit-player.playkit-state-idle .playkit-no-idle-control{display:none}.playkit-rotate{-moz-animation:playkit-spin .3s 1 linear;-o-animation:playkit-spin .3s 1 linear;-webkit-animation:playkit-spin .3s 1 linear;animation:playkit-spin .3s 1 linear}.playkit-reverse-rotate{-moz-animation:playkit-reverse-spin .3s 1 linear;-o-animation:playkit-reverse-spin .3s 1 linear;-webkit-animation:playkit-reverse-spin .3s 1 linear;animation:playkit-reverse-spin .3s 1 linear}@-webkit-keyframes playkit-spin{0%{-webkit-transform:rotate(359deg)}100%{-webkit-transform:rotate(0deg)}}@-moz-keyframes playkit-spin{0%{-moz-transform:rotate(359deg)}100%{-moz-transform:rotate(0deg)}}@-o-keyframes playkit-spin{0%{-o-transform:rotate(359deg)}100%{-o-transform:rotate(0deg)}}@-ms-keyframes playkit-spin{0%{-ms-transform:rotate(359deg)}100%{-ms-transform:rotate(0deg)}}@keyframes playkit-spin{0%{transform:rotate(359deg)}100%{transform:rotate(0deg)}}@-webkit-keyframes playkit-reverse-spin{0%{transform:rotate(0deg)}100%{transform:rotate(359deg)}}@-moz-keyframes playkit-reverse-spin{0%{transform:rotate(0deg)}100%{transform:rotate(359deg)}}@-o-keyframes playkit-reverse-spin{0%{transform:rotate(0deg)}100%{transform:rotate(359deg)}}@-ms-keyframes playkit-reverse-spin{0%{transform:rotate(0deg)}100%{transform:rotate(359deg)}}@keyframes playkit-reverse-spin{0%{transform:rotate(0deg)}100%{transform:rotate(359deg)}}.playkit-upper-bar-icon{width:36px;height:36px;border-radius:4px;padding:2px;cursor:pointer;color:var(--playkit-tone-1-color);display:flex;align-items:center;justify-content:center;opacity:.8;border:none;background-color:rgba(0,0,0,0);margin:0 4px}.playkit-upper-bar-icon:hover{background-color:var(--playkit-tone-4-color);opacity:1}.playkit-upper-bar-icon:active{background-color:var(--playkit-tone-6-color);opacity:1}.playkit-upper-bar-icon:disabled{opacity:.4}.playkit-player a{font-size:15px;line-height:18px;cursor:pointer;--primary-hover-color: hsl(var(--playkit-primary-hsl-hue) var(--playkit-hsl-saturation) calc(var(--playkit-hsl-lightness) - 10%))}.playkit-player a:hover{color:var(--primary-hover-color)}.playkit-player a:active{opacity:.7}.playkit-emptyUrl a{cursor:auto;pointer-events:none}.playkit-player{overflow:hidden;user-select:none;width:100%;height:100%;position:relative;outline:none;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:rgba(0,0,0,0);cursor:none;font-family:Lato,Helvetica Neue,Segoe UI,sans-serif}.playkit-player:-webkit-full-screen{width:100%;height:100%;max-width:none}.playkit-player *{box-sizing:border-box;outline:none}.playkit-player ::selection{background-color:rgba(0,0,0,.1)}.playkit-player video{width:100%;left:0}.playkit-player video::-webkit-media-controls-panel-container,.playkit-player video::-webkit-media-controls{display:none !important;-webkit-appearance:none}.playkit-player video::-webkit-media-controls-start-playback-button{display:none !important;-webkit-appearance:none}.playkit-player .playkit-player-gui{overflow:hidden;font-size:0}.playkit-player .playkit-player-gui label{margin-bottom:0}.playkit-player .overlay-portal{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none}.playkit-player.playkit-overlay-active .overlay-portal{z-index:11;pointer-events:initial}.playkit-player.playkit-nav *:focus{outline:1px solid var(--playkit-tab-focus-color) !important;box-shadow:0 0 0 1px #fff !important;outline-offset:2px}.playkit-player [id^=\"playkit-ads-container\"]{transition:transform 100ms}.playkit-player [id^=\"playkit-ads-container\"][data-adtype=\"overlay\"]{z-index:1}.playkit-player:not(.playkit-ad-break).playkit-metadata-loaded.playkit-hover [id^=\"playkit-ads-container\"],.playkit-player:not(.playkit-ad-break).playkit-metadata-loaded.playkit-state-paused [id^=\"playkit-ads-container\"],.playkit-player:not(.playkit-ad-break).playkit-metadata-loaded.playkit-state-idle [id^=\"playkit-ads-container\"]{transform:translateY(-60px);-webkit-transform:translateY(-60px);-ms-transform:translateY(-60px)}.playkit-player.playkit-pre-playback,.playkit-player.playkit-casting,.playkit-player.playkit-metadata-loaded.playkit-hover,.playkit-player.playkit-state-paused,.playkit-player.playkit-state-idle,.playkit-player.playkit-ad-break,.playkit-player.playkit-menu-active,.playkit-player.playkit-overlay-active{cursor:auto}.playkit-player video::-webkit-media-text-track-container{max-height:none}.playkit-player.playkit-iOS video::-webkit-media-text-track-container{position:absolute;top:0;bottom:0;left:0;right:0}.playkit-player.playkit-state-paused video::-webkit-media-text-track-container,.playkit-player.playkit-state-idle video::-webkit-media-text-track-container,.playkit-player.playkit-hover video::-webkit-media-text-track-container{padding:0 0 50px 0}.playkit-player.playkit-state-paused.playkit-Safari video::-webkit-media-text-track-container,.playkit-player.playkit-state-paused.playkit-iOS video::-webkit-media-text-track-container,.playkit-player.playkit-state-idle.playkit-Safari video::-webkit-media-text-track-container,.playkit-player.playkit-state-idle.playkit-iOS video::-webkit-media-text-track-container,.playkit-player.playkit-hover.playkit-Safari video::-webkit-media-text-track-container,.playkit-player.playkit-hover.playkit-iOS video::-webkit-media-text-track-container{padding:initial;max-height:calc(100% - 50px)}.playkit-player.playkit-state-paused.playkit-fullscreen.playkit-iOS video::-webkit-media-text-track-display,.playkit-player.playkit-state-idle.playkit-fullscreen.playkit-iOS video::-webkit-media-text-track-display,.playkit-player.playkit-hover.playkit-fullscreen.playkit-iOS video::-webkit-media-text-track-display{transform:translateY(-50px);-webkit-transform:translateY(-50px);-ms-transform:translateY(-50px)}.playkit-player.playkit-fullscreen.playkit-iOS video::-webkit-media-text-track-container{max-height:none}.playkit-player.playkit-overlay-active .playkit-subtitles{visibility:hidden}.playkit-player .playkit-subtitles{top:50px;transform:translateY(0px);-webkit-transform:translateY(0px);-ms-transform:translateY(0px);transition:ease-in 100ms}.playkit-player:not(.playkit-overlay-active).playkit-state-paused .playkit-subtitles,.playkit-player:not(.playkit-overlay-active).playkit-state-idle .playkit-subtitles,.playkit-player:not(.playkit-overlay-active).playkit-hover .playkit-subtitles{transform:translateY(-50px);-webkit-transform:translateY(-50px);-ms-transform:translateY(-50px)}.playkit-player:not(.playkit-overlay-active).playkit-fullscreen.playkit-iOS .playkit-subtitles{transform:translateY(0px);-webkit-transform:translateY(0px);-ms-transform:translateY(0px)}.playkit-video-player{position:absolute;top:0;left:0;width:100%;height:100%;background:var(--playkit-player-background-color);transition:all 500ms;transition-property:left,right,bottom,top,width,height;display:flex}.playkit-overlay-active .playkit-video-player{filter:blur(16px)}@keyframes playkit-openOverlay{from{opacity:0}to{opacity:1}}.playkit-overlay{position:absolute;width:100%;height:100%;display:none;opacity:0;animation:playkit-openOverlay 100ms ease-in-out forwards;z-index:11}.playkit-overlay.playkit-active{display:block;opacity:1}.playkit-overlay .playkit-overlay-contents{position:absolute;top:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,.7);z-index:4;text-align:center;color:#fff;padding:60px 20px 30px 20px;overflow-y:auto}.playkit-overlay .playkit-title{font-size:24px;font-weight:bold;line-height:29px;margin-bottom:60px;margin-top:0px}.playkit-overlay .playkit-close-overlay{position:absolute;top:48px;right:48px;z-index:5;cursor:pointer}.playkit-overlay .playkit-close-overlay .playkit-icon-close{width:24px;height:24px}.playkit-overlay .playkit-overlay-screen{display:none}.playkit-overlay .playkit-overlay-screen.playkit-active{display:block}.playkit-player.playkit-size-md .playkit-overlay .playkit-overlay-contents{padding:36px 20px}.playkit-player.playkit-size-md .playkit-overlay .playkit-close-overlay{top:38px}.playkit-player.playkit-size-md .playkit-overlay .playkit-title{margin-bottom:24px;margin-top:0px}.playkit-player.playkit-size-sm .playkit-overlay .playkit-overlay-contents,.playkit-player.playkit-size-xs .playkit-overlay .playkit-overlay-contents{padding:16px 24px}.playkit-player.playkit-size-sm .playkit-overlay .playkit-close-overlay,.playkit-player.playkit-size-xs .playkit-overlay .playkit-close-overlay{top:15px;right:24px}.playkit-player.playkit-size-sm .playkit-overlay .playkit-title,.playkit-player.playkit-size-xs .playkit-overlay .playkit-title{font-size:20px;line-height:19px;margin-bottom:24px;margin-top:0px}@keyframes playkit-openSmartContainer{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}@keyframes playkit-closeSmartContainer{from{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(10px)}}.playkit-player:not(.playkit-touch) .playkit-smart-container{background-color:#222;box-shadow:0 2px 8px 0 rgba(0,0,0,.3);border-radius:4px;position:absolute;right:0px;min-width:193px;font-size:15px;z-index:10;display:block;animation:playkit-openSmartContainer 100ms ease-out forwards}.playkit-player:not(.playkit-touch) .playkit-smart-container.playkit-leaving{animation:playkit-closeSmartContainer 100ms ease-out forwards}.playkit-player:not(.playkit-touch) .playkit-smart-container.playkit-top{bottom:100%;margin-bottom:6px}.playkit-player:not(.playkit-touch) .playkit-smart-container.playkit-top:before{display:block;content:\" \";position:absolute;bottom:-6px;left:0;width:100%;height:6px}.playkit-player:not(.playkit-touch) .playkit-smart-container.playkit-bottom{top:100%;margin-top:6px}.playkit-player:not(.playkit-touch) .playkit-smart-container.playkit-right{left:0px}.playkit-player:not(.playkit-touch) .playkit-smart-container.playkit-left{right:0px}.playkit-player:not(.playkit-touch) .playkit-smart-container .playkit-smart-container-item{margin:16px;color:rgba(244,244,244,.8);white-space:nowrap;display:flex;justify-content:space-between}.playkit-player:not(.playkit-touch) .playkit-smart-container .playkit-smart-container-item.playkit-select-menu-item label .playkit-label-icon{display:none}.playkit-player:not(.playkit-touch) .playkit-smart-container .playkit-smart-container-item.playkit-select-menu-item .playkit-dropdown,.playkit-player:not(.playkit-touch) .playkit-smart-container .playkit-smart-container-item.playkit-select-menu-item select{align-self:flex-end}.playkit-player:not(.playkit-touch) .playkit-smart-container .playkit-smart-container-item.playkit-select-menu-item .playkit-dropdown span:not(.playkit-badge-icon){overflow:hidden;text-overflow:ellipsis;vertical-align:middle}.playkit-player:not(.playkit-touch) .playkit-smart-container .playkit-smart-container-item.playkit-select-menu-item select{text-align-last:right}.playkit-player.playkit-touch .playkit-smart-container-item,.playkit-player.playkit-size-sm .playkit-smart-container-item,.playkit-player.playkit-size-xs .playkit-smart-container-item{width:300px;max-width:100%;margin:16px auto;color:rgba(244,244,244,.8);white-space:nowrap;text-align:left;display:flex;justify-content:space-between}.playkit-player.playkit-touch .playkit-smart-container-item.playkit-select-menu-item label,.playkit-player.playkit-size-sm .playkit-smart-container-item.playkit-select-menu-item label,.playkit-player.playkit-size-xs .playkit-smart-container-item.playkit-select-menu-item label{font-size:16px;color:rgba(255,255,255,.8);margin-right:20px}.playkit-player.playkit-touch .playkit-smart-container-item.playkit-select-menu-item label .playkit-label-icon,.playkit-player.playkit-size-sm .playkit-smart-container-item.playkit-select-menu-item label .playkit-label-icon,.playkit-player.playkit-size-xs .playkit-smart-container-item.playkit-select-menu-item label .playkit-label-icon{width:24px;height:24px;display:inline-block;vertical-align:middle;margin-right:16px}.playkit-player.playkit-touch .playkit-smart-container-item.playkit-select-menu-item .playkit-dropdown,.playkit-player.playkit-touch .playkit-smart-container-item.playkit-select-menu-item select,.playkit-player.playkit-size-sm .playkit-smart-container-item.playkit-select-menu-item .playkit-dropdown,.playkit-player.playkit-size-sm .playkit-smart-container-item.playkit-select-menu-item select,.playkit-player.playkit-size-xs .playkit-smart-container-item.playkit-select-menu-item .playkit-dropdown,.playkit-player.playkit-size-xs .playkit-smart-container-item.playkit-select-menu-item select{align-self:flex-end}.playkit-player.playkit-touch .playkit-smart-container-item.playkit-select-menu-item select,.playkit-player.playkit-size-sm .playkit-smart-container-item.playkit-select-menu-item select,.playkit-player.playkit-size-xs .playkit-smart-container-item.playkit-select-menu-item select{text-align-last:right;min-width:1px;line-height:24px}.playkit-player.playkit-touch.playkit-Windows select option,.playkit-player.playkit-size-sm.playkit-Windows select option,.playkit-player.playkit-size-xs.playkit-Windows select option{color:#000;background-color:#fff}.playkit-overlay.playkit-cvaa-overlay .playkit-sample{border:2px solid rgba(255,255,255,.2);border-radius:4px;font-size:16px;font-weight:bold;line-height:36px;text-align:center;padding:0 31px;display:inline-block;margin:0 12px;position:relative}.playkit-overlay.playkit-cvaa-overlay .playkit-sample:not(.playkit-custom){cursor:pointer}.playkit-overlay.playkit-cvaa-overlay .playkit-sample.playkit-black-bg{background-color:#000}.playkit-overlay.playkit-cvaa-overlay .playkit-sample.playkit-yellow-text{color:#faff00}.playkit-overlay.playkit-cvaa-overlay .playkit-sample .playkit-active-tick{height:16px;width:16px;border-radius:8px;background-color:var(--playkit-primary-color);position:absolute;top:-5px;right:-5px}.playkit-overlay.playkit-cvaa-overlay .playkit-sample .playkit-active-tick .playkit-icon{vertical-align:top}.playkit-overlay.playkit-cvaa-overlay .playkit-sample span{font-size:16px !important;line-height:1;vertical-align:middle}.playkit-overlay.playkit-cvaa-overlay .playkit-button-save-cvaa{margin-top:50px;height:40px;width:400px;max-width:100%;border:2px solid rgba(255,255,255,.2);border-radius:4px;font-size:16px;font-weight:bold;line-height:38px;text-align:center;display:inline-block;color:#fff;text-decoration:none;cursor:pointer}.playkit-overlay.playkit-cvaa-overlay .playkit-custom-captions-applied{margin-top:50px}.playkit-overlay.playkit-cvaa-overlay .playkit-custom-captions-applied a{color:var(--playkit-primary-brighter-color)}.playkit-overlay.playkit-cvaa-overlay .playkit-custom-caption-form{width:300px;max-width:100%;margin:0 auto}.playkit-overlay.playkit-cvaa-overlay .playkit-custom-caption-form a{color:#fff;line-height:36px;text-decoration:none}.playkit-overlay.playkit-cvaa-overlay .playkit-custom-caption-form a:hover,.playkit-overlay.playkit-cvaa-overlay .playkit-custom-caption-form a:focus{text-decoration:underline}.playkit-overlay.playkit-cvaa-overlay .playkit-custom-caption-form .playkit-slider{float:right;width:100px;margin-top:5px}.playkit-overlay.playkit-cvaa-overlay .playkit-preview-container{width:100%;text-align:center;font-size:16px}.playkit-player.playkit-size-sm .playkit-overlay.playkit-cvaa-overlay .playkit-sample{width:30%;margin:2.33%;padding:0}.playkit-player.playkit-size-sm .playkit-overlay.playkit-cvaa-overlay .playkit-sample:first-child{margin-left:0}.playkit-player.playkit-size-sm .playkit-overlay.playkit-cvaa-overlay .playkit-sample:last-child{margin-right:0}.playkit-player.playkit-size-sm .playkit-overlay.playkit-cvaa-overlay .playkit-sample.playkit-custom{width:auto;padding:0 10px}.playkit-player.playkit-size-sm .playkit-overlay.playkit-cvaa-overlay .playkit-button-save-cvaa,.playkit-player.playkit-size-sm .playkit-overlay.playkit-cvaa-overlay .playkit-custom-captions-applied{margin-top:20px}.playkit-font-size,.playkit-font-alignment,.playkit-font-color,.playkit-font-family,.playkit-font-style,.playkit-font-opacity,.playkit-background-color,.playkit-background-opacity{background:initial}.playkit-loading-backdrop{position:absolute;top:50%;left:50%;transition:100ms opacity;opacity:0;z-index:5}.playkit-loading-backdrop.playkit-show{opacity:1}.playkit-loading-backdrop.playkit-show .playkit-spinner-container{display:block}.playkit-loading-backdrop .playkit-spinner-container{display:none;position:absolute;top:50%;left:50%;transform:translate3d(-50%, -50%, 0)}.playkit-control-button-container.playkit-control-play-pause .playkit-control-button{transition:400ms transform}.playkit-control-button-container.playkit-control-play-pause .playkit-control-button .playkit-icon-pause{transition:400ms opacity;opacity:0;display:none}.playkit-control-button-container.playkit-control-play-pause .playkit-control-button .playkit-icon-play{transition:400ms opacity;opacity:1;display:block}.playkit-control-button-container.playkit-control-play-pause .playkit-control-button.playkit-is-playing{transform:rotate(360deg)}.playkit-control-button-container.playkit-control-play-pause .playkit-control-button.playkit-is-playing .playkit-icon-pause{opacity:1;display:block}.playkit-control-button-container.playkit-control-play-pause .playkit-control-button.playkit-is-playing .playkit-icon-play{opacity:0;display:none}.playkit-control-button-container.playkit-control-volume,.playkit-control-button-container.playkit-volume-control{display:inline-block !important}.playkit-control-button-container.playkit-control-volume.playkit-hover .playkit-volume-control-bar,.playkit-control-button-container.playkit-volume-control.playkit-hover .playkit-volume-control-bar{display:block !important;opacity:1;height:112px;padding:6px}.playkit-control-button-container.playkit-control-volume.playkit-hover .playkit-volume-control-bar:before,.playkit-control-button-container.playkit-volume-control.playkit-hover .playkit-volume-control-bar:before{height:14px}.playkit-control-button-container.playkit-control-volume.playkit-is-muted .playkit-icon-volume-waves,.playkit-control-button-container.playkit-volume-control.playkit-is-muted .playkit-icon-volume-waves{opacity:0;-webkit-transform:translateX(-5px);-ms-transform:translateX(-5px);transform:translateX(-5px)}.playkit-control-button-container.playkit-control-volume.playkit-is-muted .playkit-icon-volume-mute,.playkit-control-button-container.playkit-volume-control.playkit-is-muted .playkit-icon-volume-mute{opacity:1;-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}.playkit-control-button-container.playkit-control-volume.playkit-dragging-active .playkit-volume-control-bar,.playkit-control-button-container.playkit-volume-control.playkit-dragging-active .playkit-volume-control-bar{display:block !important;opacity:1;height:112px;padding:6px}.playkit-control-button-container.playkit-control-volume.playkit-dragging-active .playkit-volume-control-bar:before,.playkit-control-button-container.playkit-volume-control.playkit-dragging-active .playkit-volume-control-bar:before{height:14px}.playkit-control-button-container.playkit-control-volume .playkit-icon-volume-waves,.playkit-control-button-container.playkit-volume-control .playkit-icon-volume-waves{-webkit-transform:translateX(0px);-ms-transform:translateX(0px);transform:translateX(0px)}.playkit-control-button-container.playkit-control-volume .playkit-icon-volume-mute,.playkit-control-button-container.playkit-volume-control .playkit-icon-volume-mute{opacity:1;-webkit-transform:scale(0);-ms-transform:scale(0);transform:scale(0)}.playkit-control-button-container.playkit-control-volume .playkit-icon-volume-waves,.playkit-control-button-container.playkit-control-volume .playkit-icon-volume-mute,.playkit-control-button-container.playkit-volume-control .playkit-icon-volume-waves,.playkit-control-button-container.playkit-volume-control .playkit-icon-volume-mute{transition:300ms transform,300ms opacity}.playkit-control-button-container.playkit-control-volume i,.playkit-control-button-container.playkit-volume-control i{position:absolute;top:0;left:0}.playkit-volume-control-bar{position:absolute;z-index:2;bottom:38px;left:0;height:0px;width:34px;border-radius:4px;box-shadow:0 2px 8px 0 rgba(0,0,0,.3);background-color:#333;padding:0px;opacity:0}.playkit-volume-control-bar:before{position:absolute;width:34px;height:0px;bottom:-8px;left:0;content:\" \";display:block}.playkit-volume-control-bar .playkit-bar{background-color:#424242;height:100%;position:relative;cursor:pointer}.playkit-volume-control-bar .playkit-progress{position:absolute;bottom:0;left:0;width:100%;border-radius:0 0 2px 2px;background-color:var(--playkit-tone-1-color)}.playkit-player.playkit-smart-container-open .playkit-control-button-container.playkit-control-volume.playkit-hover .playkit-control-volume-bar,.playkit-player.playkit-smart-container-open .playkit-control-button-container.playkit-volume-control.playkit-hover .playkit-control-volume-bar{display:none !important}.playkit-size-ty .playkit-control-button-container.playkit-control-volume.playkit-hover .playkit-control-volume-bar,.playkit-size-ty .playkit-control-button-container.playkit-volume-control.playkit-hover .playkit-control-volume-bar{display:none !important}.playkit-touch .playkit-control-button-container.playkit-control-volume.playkit-hover .playkit-control-volume-bar,.playkit-touch .playkit-control-button-container.playkit-volume-control.playkit-hover .playkit-control-volume-bar{display:none !important}.playkit-player .playkit-control-button-container.playkit-control-fullscreen .playkit-control-button{transition:100ms transform;transform:scale(1)}.playkit-player .playkit-control-button-container.playkit-control-fullscreen .playkit-control-button .playkit-icon-minimize{display:none}.playkit-player .playkit-control-button-container.playkit-control-fullscreen .playkit-control-button.playkit-is-fullscreen .playkit-icon-maximize{display:none}.playkit-player .playkit-control-button-container.playkit-control-fullscreen .playkit-control-button.playkit-is-fullscreen .playkit-icon-minimize{display:block}.playkit-player:not(.playkit-touch) .playkit-control-button-container.playkit-control-fullscreen .playkit-control-button:hover{transform:scale(1.1)}.playkit-player .playkit-seek-bar{padding:12px 0 12px 0;cursor:pointer;position:relative;z-index:1}.playkit-player .playkit-seek-bar:hover .playkit-time-preview,.playkit-player .playkit-seek-bar:hover .playkit-frame-preview:not(.playkit-hide-frame-preview),.playkit-player .playkit-seek-bar.playkit-hover .playkit-time-preview,.playkit-player .playkit-seek-bar.playkit-hover .playkit-frame-preview:not(.playkit-hide-frame-preview){display:block}.playkit-player .playkit-seek-bar:hover .playkit-progress-bar .playkit-scrubber,.playkit-player .playkit-seek-bar.playkit-hover .playkit-progress-bar .playkit-scrubber{transform:scale(1)}.playkit-player .playkit-seek-bar:hover .playkit-progress-bar .playkit-virtual-progress,.playkit-player .playkit-seek-bar.playkit-hover .playkit-progress-bar .playkit-virtual-progress{display:block}.playkit-player .playkit-seek-bar.playkit-ad-break{cursor:initial}.playkit-player .playkit-seek-bar .playkit-progress-bar{width:100%;height:4px;background-color:rgba(255,255,255,.3);border-radius:2px;position:absolute;transition:height 200ms ease,transform 200ms ease}.playkit-player .playkit-seek-bar .playkit-progress-bar.playkit-chapters{background-color:rgba(0,0,0,0)}.playkit-player .playkit-seek-bar .playkit-progress-bar.playkit-chapters .playkit-virtual-progress-indicator{height:8px;transform:translateY(-2px)}.playkit-player .playkit-seek-bar .playkit-progress-bar .playkit-virtual-progress{display:none}.playkit-player .playkit-seek-bar .playkit-progress-bar .playkit-virtual-progress{position:absolute;top:0;left:0;height:100%;border-radius:inherit}.playkit-player .playkit-seek-bar .playkit-progress-bar .playkit-virtual-progress-indicator{width:1px;height:100%;background-color:var(--playkit-tone-1-color);float:right}.playkit-player .playkit-seek-bar .playkit-progress-bar .playkit-scrubber{position:absolute;cursor:pointer;display:block;top:-6px;left:-6px;border-radius:8px;height:16px;width:16px;background-color:var(--playkit-tone-1-color);box-shadow:0 0 31px 0 rgba(0,0,0,.3);transform:scale(0);transition:100ms transform;z-index:1;pointer-events:none}.playkit-player .playkit-seek-bar .playkit-progress-bar .playkit-scrubber:active{opacity:1;cursor:grabbing}.playkit-player .playkit-seek-bar .playkit-frame-preview{position:absolute;bottom:20px;left:0}.playkit-player .playkit-seek-bar .playkit-time-preview{position:absolute;bottom:26px;left:0;height:22px;min-width:48px;padding:0 3px;text-align:center;border-radius:3px;background-color:rgba(0,0,0,.7);font-size:13px;font-weight:bold;line-height:22px;color:#fff;z-index:1;pointer-events:none}.playkit-player .playkit-seek-bar .playkit-time-preview,.playkit-player .playkit-seek-bar .playkit-frame-preview{display:none}.playkit-player .playkit-seek-bar .playkit-non-sticky:hover{display:none}.playkit-player:not(.playkit-touch):not(.playkit-size-ty) .playkit-seek-bar:hover .playkit-progress-bar:not(.playkit-chapters),.playkit-player:not(.playkit-touch):not(.playkit-size-ty) .playkit-seek-bar.playkit-hover .playkit-progress-bar:not(.playkit-chapters){height:8px;border-radius:4px;transform:translateY(-2px)}.playkit-player:not(.playkit-touch):not(.playkit-size-ty) .playkit-seek-bar:hover .playkit-progress-bar:not(.playkit-chapters) .playkit-scrubber,.playkit-player:not(.playkit-touch):not(.playkit-size-ty) .playkit-seek-bar.playkit-hover .playkit-progress-bar:not(.playkit-chapters) .playkit-scrubber{top:-4px}.playkit-player.playkit-touch .playkit-seek-bar .playkit-progress-bar .playkit-virtual-progress,.playkit-player.playkit-touch .playkit-seek-bar .playkit-progress-bar .playkit-time-preview,.playkit-player.playkit-touch .playkit-seek-bar .playkit-progress-bar .playkit-frame-preview{display:none}.playkit-player.playkit-size-ty .playkit-seek-bar{padding:12px 0;cursor:pointer;position:relative;float:left;width:calc(100% - 45px);margin:1px 0}.playkit-player.playkit-size-ty .playkit-seek-bar .playkit-frame-preview{display:none}.playkit-player.playkit-size-ty .playkit-seek-bar .playkit-time-preview{bottom:16px}.playkit-player .playkit-seek-bar.playkit-ad-break{cursor:initial}.playkit-player .playkit-seek-bar.playkit-ad-break .playkit-progress-bar .playkit-progress{background-color:var(--playkit-ads-color)}.playkit-player .playkit-seek-bar.playkit-live .playkit-progress-bar .playkit-progress{background-color:var(--playkit-live-color)}.playkit-player .playkit-seek-bar .playkit-progress-bar .playkit-progress{position:absolute;top:0;left:0;height:100%;border-radius:inherit;background-color:var(--playkit-primary-color)}.playkit-player .playkit-seek-bar .playkit-progress-bar .playkit-buffered{position:absolute;top:0;left:0;height:100%;border-radius:inherit;background-color:rgba(255,255,255,.3)}.playkit-frame-preview .playkit-frame-preview-img-container{border:2px solid rgba(255,255,255,.2);border-radius:4px}.playkit-frame-preview .playkit-frame-preview-img-container .playkit-frame-preview-img{background-size:auto 100% !important;width:100%;height:100%;position:relative}.playkit-player .playkit-time-display{display:inline-block;line-height:32px;vertical-align:top;font-size:14px;padding:0 23px;font-weight:bold;filter:drop-shadow(0px 0px 2px rgba(0, 0, 0, 0.7))}.playkit-touch .playkit-time-display{padding-left:0}.playkit-player.playkit-size-md .playkit-time-display,.playkit-player.playkit-size-sm .playkit-time-display,.playkit-player.playkit-size-xs .playkit-time-display{padding:0 12px}.playkit-player .playkit-video-playing-title{font-size:15px;font-weight:bold;line-height:18px;padding:6px 0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.playkit-player .playkit-bottom-bar{background:linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.8) 100%);color:#fff;height:auto;width:100%;margin-top:auto;bottom:0;left:0;z-index:1;pointer-events:auto;position:absolute;padding:0;opacity:0;max-height:60px;transition:100ms opacity ease-in-out,0ms padding linear 100ms}.playkit-player .playkit-bottom-bar.playkit-hide{display:none}.playkit-player .playkit-bottom-bar .playkit-controls-container{display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:space-between;width:100%;position:relative;z-index:1}.playkit-player .playkit-bottom-bar .playkit-controls-container .playkit-left-controls{flex-shrink:0;text-align:left;pointer-events:none}.playkit-player .playkit-bottom-bar .playkit-controls-container .playkit-left-controls .playkit-control-button-container:first-child{margin-left:0px}.playkit-player .playkit-bottom-bar .playkit-controls-container .playkit-right-controls{display:flex;flex-wrap:nowrap;flex-grow:0;text-align:left;pointer-events:none}.playkit-player .playkit-bottom-bar .playkit-controls-container .playkit-right-controls .playkit-control-button-container:last-child{margin-right:0px}.playkit-player .playkit-bottom-bar .playkit-bottom-bar-area{position:relative;pointer-events:none}.playkit-player .playkit-bottom-bar .playkit-bottom-bar-area .playkit-time-display{padding:0;position:absolute;bottom:20px;font-size:12px;line-height:normal;font-weight:400}.playkit-player .playkit-bottom-bar .playkit-control-button-container{margin:0 6px}.playkit-player.playkit-size-ty .playkit-controls-container{display:block}.playkit-player.playkit-size-ty .playkit-controls-container .playkit-left-controls{display:none}.playkit-player.playkit-size-ty .playkit-controls-container .playkit-right-controls{display:block;float:right}.playkit-player.playkit-size-ty .playkit-control-button-container{display:none;margin:0}.playkit-player.playkit-size-xs .playkit-control-button-container:not(.playkit-upper-bar-icon),.playkit-player.playkit-size-sm .playkit-control-button-container:not(.playkit-upper-bar-icon){margin:0 3px}.playkit-player.playkit-casting:not(.playkit-overlay-active) .playkit-bottom-bar,.playkit-player.playkit-metadata-loaded.playkit-hover:not(.playkit-overlay-active) .playkit-bottom-bar,.playkit-player.playkit-state-paused:not(.playkit-overlay-active) .playkit-bottom-bar,.playkit-player.playkit-state-idle:not(.playkit-overlay-active) .playkit-bottom-bar,.playkit-player.playkit-ad-break:not(.playkit-overlay-active) .playkit-bottom-bar,.playkit-player.playkit-menu-active:not(.playkit-overlay-active) .playkit-bottom-bar{position:relative;opacity:1;padding:0 16px 4px;transition:100ms opacity ease-in-out}.playkit-player.playkit-size-sm .playkit-playback-controls+.playkit-time-display,.playkit-player.playkit-size-xs .playkit-playback-controls+.playkit-time-display{padding-left:0}.playkit-player.playkit-size-sm .playkit-bottom-bar{padding:0 8px 4px}.playkit-player .playkit-bottom-bar .playkit-left-controls>*,.playkit-player .playkit-bottom-bar .playkit-right-controls>*,.playkit-player .playkit-bottom-bar .playkit-bottom-bar-area>*{pointer-events:auto}.playkit-player .playkit-top-bar{background:linear-gradient(180deg, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 100%);color:#fff;visibility:hidden;position:relative;height:auto;min-height:60px;max-height:60px;margin-top:-60px;transition:100ms visibility ease-in-out,100ms margin-top ease-in-out,100ms min-height ease-in-out;width:100%;top:0;left:0;z-index:2;pointer-events:auto}.playkit-player .playkit-top-bar .playkit-top-bar-area{position:absolute;top:0;left:0;height:calc(100% - 28px);width:calc(100% - 32px);margin:14px 16px;pointer-events:none}.playkit-player .playkit-top-bar .playkit-top-bar-area:empty{margin:0;height:0;width:0}.playkit-player .playkit-top-bar.playkit-disabled{pointer-events:none}.playkit-player .playkit-top-bar.playkit-hide{display:none}.playkit-player .playkit-top-bar .playkit-left-controls{float:left;text-align:left;min-width:0;margin:14px 0 14px 16px;pointer-events:none}.playkit-player .playkit-top-bar .playkit-left-controls:empty{margin:0}.playkit-player .playkit-top-bar .playkit-right-controls{float:right;text-align:left;margin:14px 16px 14px 0;pointer-events:none}.playkit-player .playkit-top-bar .playkit-right-controls:empty{margin:0}.playkit-player .playkit-top-bar .playkit-right-controls .playkit-control-button-container:not(.playkit-upper-bar-icon){margin:0 6px}.playkit-player .playkit-top-bar .playkit-right-controls .playkit-control-button-container:not(.playkit-upper-bar-icon):last-child{margin-right:0}.playkit-player.playkit-casting:not(.playkit-overlay-active) .playkit-top-bar,.playkit-player.playkit-metadata-loaded.playkit-hover:not(.playkit-overlay-active) .playkit-top-bar,.playkit-player.playkit-state-paused:not(.playkit-overlay-active) .playkit-top-bar,.playkit-player.playkit-state-idle:not(.playkit-overlay-active) .playkit-top-bar,.playkit-player.playkit-ad-break:not(.playkit-overlay-active) .playkit-top-bar,.playkit-player.playkit-menu-active:not(.playkit-overlay-active) .playkit-top-bar{visibility:visible;margin-top:0;min-height:16px}.playkit-player .playkit-top-bar .playkit-left-controls>*,.playkit-player .playkit-top-bar .playkit-right-controls>*,.playkit-player .playkit-top-bar .playkit-top-bar-area>*{pointer-events:auto}.playkit-player .playkit-top-bar:has(.playkit-left-controls:empty+.playkit-right-controls:empty){visibility:hidden}.playkit-player.playkit-size-sm .playkit-top-bar .playkit-left-controls{margin:14px 0 14px 8px}.playkit-player.playkit-size-sm .playkit-top-bar .playkit-left-controls:empty{margin:0}.playkit-player.playkit-size-sm .playkit-top-bar .playkit-right-controls{margin:14px 8px 14px 0}.playkit-player.playkit-size-sm .playkit-top-bar .playkit-right-controls:empty{margin:0}.playkit-player.playkit-size-sm .playkit-top-bar .playkit-top-bar-area{width:calc(100% - 16px);margin:14px 8px}.playkit-player.playkit-size-sm .playkit-top-bar .playkit-top-bar-area:empty{margin:0}@keyframes playkit-overlayActionIconIn{0%{opacity:0;transform:scale(0)}10%{opacity:.1;transform:scale(0.1)}20%{opacity:.3;transform:scale(0.2)}30%{opacity:.5;transform:scale(0.3)}40%{opacity:.7;transform:scale(0.4)}50%{opacity:.9;transform:scale(0.5)}60%{opacity:.9;transform:scale(0.5)}70%{opacity:.9;transform:scale(0.5)}75%{opacity:.9;transform:scale(0.5)}80%{opacity:1;transform:scale(0.5)}85%{opacity:1;transform:scale(0.5)}90%{opacity:1;transform:scale(0.5)}93%{opacity:.7;transform:scale(0.5)}95%{opacity:.5;transform:scale(0.5)}98%{opacity:.2;transform:scale(0.5)}100%{opacity:0;transform:scale(0.5)}}.playkit-overlay-action .playkit-icon{width:144px;height:144px;position:absolute;top:50%;left:50%;margin:-72px 0 0 -72px;opacity:0}.playkit-player:not(.playkit-touch):not(.playkit-size-sm) .playkit-overlay-action.playkit-in .playkit-icon{animation:playkit-overlayActionIconIn 300ms linear forwards}.playkit-pre-playback-play-overlay{position:absolute;top:0;left:0;width:100%;height:100%}.playkit-pre-playback-play-overlay .playkit-pre-playback-play-button{z-index:2;position:absolute;top:50%;left:50%;height:108px;width:108px;border:2px solid rgba(255,255,255,.2);background-color:rgba(0,0,0,.5);transform:translate(-50%, -50%);-webkit-transform:translate(-50%, -50%);-ms-transform:translate(-50%, -50%);border-radius:54px;padding:20px;cursor:pointer}.playkit-pre-playback-play-overlay .playkit-pre-playback-play-button:hover{border:2px solid rgba(255,255,255,.4)}.playkit-pre-playback-play-overlay .playkit-pre-playback-play-button:active{opacity:.7;transform:scale(1) translate(-50%, -50%)}.playkit-pre-playback .playkit-bottom-bar,.playkit-pre-playback .playkit-top-bar{opacity:0;display:none}.playkit-player.playkit-size-ty .playkit-pre-playback-play-button{width:75px;height:75px;padding:12px}.playkit-player.playkit-size-xs .playkit-pre-playback-play-button{width:85px;height:85px;padding:15px}.playkit-player.playkit-overlay-active .playkit-gui-area .playkit-pre-playback-play-overlay{opacity:0;visibility:hidden}.playkit-player .playkit-btn-skip-ad{font-weight:lighter;position:absolute;bottom:60px;right:16px;line-height:36px}.playkit-player .playkit-skip-ad{color:#fff;font-size:20px;font-weight:lighter;line-height:24px;text-shadow:0 0 6px rgba(0,0,0,.6);position:absolute;bottom:66px;right:16px}.playkit-row{display:block}.playkit-row:after{content:\"\";clear:both;display:block}.playkit-d-inline-block{display:inline-block}.playkit-mobile-hidden-select{display:block;opacity:0;position:absolute;top:0;left:0px;width:100%;height:100%}.playkit-font-size-base,.playkit-ad-notice{font-size:15px}.playkit-ad-notice{pointer-events:none}.playkit-live-tag{display:inline-block;background-color:var(--playkit-live-color);color:#fff;border-radius:4px;padding:3px 4px;margin:5px 10px;text-transform:uppercase;font-size:15px;cursor:default}.playkit-live-tag.playkit-non-live-playhead{background-color:#666;cursor:pointer}.playkit-player.playkit-size-sm .playkit-live-tag{margin-left:0}.playkit-interactive-area .playkit-unmute-button-container{top:0;left:0}.playkit-unmute-button-container{display:inline-block;position:absolute;top:16px;left:16px;z-index:15}.playkit-unmute-button-container a{color:#fff}.playkit-unmute-button-container.playkit-show-icon-only .playkit-btn.playkit-unmute-button{max-width:64px}.playkit-unmute-button-container.playkit-show-icon-only .playkit-btn.playkit-unmute-button span{transform:translateX(10px);opacity:0}.playkit-btn.playkit-unmute-button{font-size:15px;max-width:200px;transition:max-width 200ms;padding:0 16px;white-space:nowrap}.playkit-btn.playkit-unmute-button span{transform:translateX(0px);opacity:1;transition:transform 100ms,opacity 100ms;display:inline-block;color:#fff}.playkit-btn.playkit-unmute-button.playkit-has-top-bar{transition:100ms transform}.playkit-unmute-icon-container{width:32px;height:32px;display:inline-block;vertical-align:top;position:relative;margin-right:3px}.playkit-unmute-icon-container i{position:absolute;top:0;left:0}.playkit-player.playkit-hover .playkit-unmute-button-container.playkit-has-top-bar,.playkit-player.playkit-state-paused .playkit-unmute-button-container.playkit-has-top-bar,.playkit-player.playkit-state-idle .playkit-unmute-button-container.playkit-has-top-bar,.playkit-player.playkit-menu-active .playkit-unmute-button-container.playkit-has-top-bar{transform:translateY(32px)}.playkit-overlay.playkit-error-overlay{background-color:var(--playkit-tone-7-color);font-size:0em}.playkit-custom-error-slate .playkit-overlay.playkit-error-overlay .playkit-overlay-contents{padding:0}.playkit-error-overlay{position:relative;display:flex;justify-content:center;align-items:center;flex-direction:column;height:100%;background-size:cover;background-repeat:no-repeat;background-position:center center}.playkit-error-overlay .playkit-copy-url-row{display:flex;align-items:center;margin-bottom:16px}.playkit-error-overlay .playkit-headline{color:var(--playkit-tone-1-color);margin-bottom:16px}.playkit-error-overlay .playkit-headline .playkit-error-title{font-weight:700;font-size:20px;font-style:normal;line-height:22px;margin:0 0 4px 0;text-shadow:0px 4px 4px rgba(0,0,0,.25)}.playkit-error-overlay .playkit-headline .playkit-error-message{font-weight:400;font-size:16px;font-style:normal;line-height:22px}.playkit-error-overlay .playkit-error-session{font-size:14px;color:var(--playkit-tone-1-color);font-style:normal;font-weight:400;line-height:18px;user-select:text;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;max-width:310px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-shadow:0px 4px 4px rgba(0,0,0,.25)}.playkit-error-overlay .playkit-retry-btn{height:32px;width:auto;min-width:120px;padding:0 8px;border-radius:4px;color:var(--playkit-tone-1-color);border:none;font-size:14px;font-weight:700;font-style:normal;line-height:normal;cursor:pointer}.playkit-error-overlay .playkit-error-text{height:0px;visibility:hidden}.playkit-link-options-container{width:auto}.playkit-link-options-container .playkit-copy-url-row .playkit-input-copy-url{margin:0}.playkit-link-options-container .playkit-copy-url-row .playkit-btn-copy-url{margin-left:8px;height:32px;width:32px}.playkit-link-options-container .playkit-copy-url-row .playkit-btn-copy-url .playkit-icon{height:24px;width:24px;margin-top:-3px}.playkit-slider{height:8px;border-radius:4px;background-color:rgba(255,255,255,.2)}.playkit-slider .playkit-progress{background-color:var(--playkit-primary-color);height:8px;border-radius:4px;position:relative}.playkit-slider .playkit-progress .playkit-handle{height:12px;width:12px;border-radius:5px;background-color:#fff;box-shadow:0 2px 8px 0 rgba(0,0,0,.3);position:absolute;right:0;top:0px;transform:translate3d(6px, -2px, 0);cursor:pointer}.playkit-player .playkit-learn-more{font-weight:lighter}.playkit-player .playkit-control-button-container.playkit-control-fullscreen .playkit-control-button{transition:100ms transform;transform:scale(1)}.playkit-player .playkit-control-button-container.playkit-control-fullscreen .playkit-control-button .playkit-icon-minimize{display:none}.playkit-player .playkit-control-button-container.playkit-control-fullscreen .playkit-control-button.playkit-is-fullscreen .playkit-icon-maximize{display:none}.playkit-player .playkit-control-button-container.playkit-control-fullscreen .playkit-control-button.playkit-is-fullscreen .playkit-icon-minimize{display:block}.playkit-player:not(.playkit-touch) .playkit-control-button-container.playkit-control-fullscreen .playkit-control-button:hover{transform:scale(1.1)}.playkit-player .playkit-watermark{position:absolute;transition:visibility 0s 1s,opacity 1s linear,transform ease-out 100ms}.playkit-player .playkit-watermark.playkit-hide-watermark{visibility:hidden;opacity:0}.playkit-player .playkit-watermark.playkit-top{top:0}.playkit-player .playkit-watermark.playkit-bottom{bottom:0}.playkit-player .playkit-watermark.playkit-right{right:0}.playkit-player .playkit-watermark.playkit-left{left:0}.playkit-control-button-container.playkit-control-vr-stereo .playkit-control-button .playkit-icon-vr-stereo-full{display:none}.playkit-control-button-container.playkit-control-vr-stereo .playkit-control-button.playkit-vr-stereo-mode .playkit-icon-vr-stereo{display:none}.playkit-control-button-container.playkit-control-vr-stereo .playkit-control-button.playkit-vr-stereo-mode .playkit-icon-vr-stereo-full{display:block}.playkit-control-button-container.playkit-control-closed-captions .playkit-control-button .playkit-icon-closed-captions-on{display:none}.playkit-control-button-container.playkit-control-closed-captions .playkit-control-button.playkit-cc-on .playkit-icon-closed-captions-off{display:none}.playkit-control-button-container.playkit-control-closed-captions .playkit-control-button.playkit-cc-on .playkit-icon-closed-captions-on{display:block}.playkit-player .playkit-cast-button{display:block;width:32px;height:32px;background-color:rgba(255,255,255,0);border:none;cursor:pointer;--connected-color: var(--playkit-tone-2-color);--disconnected-color: var(--playkit-tone-2-color)}.playkit-player .playkit-cast-button:hover{--connected-color: #ffffffff;--disconnected-color: #ffffffff}.playkit-player .playkit-cast-button.playkit-cast-button-active{--connected-color: rgba(1, 172, 205, 0.8)}.playkit-player .playkit-cast-button.playkit-cast-button-active:hover{--connected-color: var(--playkit-primary-color)}.playkit-player .playkit-cast-overlay{position:absolute;top:0;left:0;width:100%;height:100%}.playkit-player .playkit-cast-overlay .playkit-cast-poster{all:inherit;background-size:contain;background:#000 no-repeat center center}.playkit-player .playkit-cast-overlay .playkit-cast-poster.playkit-has-poster{background-color:#000}.playkit-player .playkit-cast-overlay .playkit-cast-black-cover{all:inherit;background:linear-gradient(to top, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0) 72%, rgba(0, 0, 0, 0) 100%)}.playkit-player .playkit-cast-box .playkit-cast-icon{position:absolute;bottom:0;left:46px;height:128px}.playkit-player .playkit-cast-box .playkit-cast-icon .playkit-icon{width:30px;height:22px;color:rgba(255,255,255,.6);opacity:.6}.playkit-player .playkit-cast-box .playkit-cast-connecting-spinner{height:21px;width:21px;-webkit-animation:playkit-spin .9s infinite linear;border:3px solid rgba(255,255,255,.4);border-top-color:rgba(255,255,255,.8);border-radius:100%}.playkit-player .playkit-cast-box .playkit-cast-text{position:absolute;bottom:0;left:89px;height:128px;font-weight:lighter}.playkit-player .playkit-cast-box .playkit-cast-text .playkit-cast-status{display:inline-block;margin-top:3px;font-size:16px;color:rgba(255,255,255,.6);float:left;font-weight:inherit}.playkit-player .playkit-cast-box .playkit-cast-text .playkit-cast-device{left:0;display:inline-block;font-weight:inherit;font-size:25px;color:#fff;line-height:40px}@keyframes playkit-castOnTVAnimation{0%{opacity:0;transform:rotateY(70deg)}33%{opacity:.3;transform:rotateY(50deg)}66%{opacity:.6;transform:rotateY(30deg)}100%{opacity:1;transform:rotateY(0)}}.playkit-player .playkit-cast-on-tv-button-container{position:absolute;top:0;left:0;width:100%;height:100%;opacity:0}.playkit-player .playkit-cast-on-tv-button-container span{font-weight:lighter;color:#fff}.playkit-player .playkit-cast-on-tv-button-container.playkit-show-cast-on-tv{animation:playkit-castOnTVAnimation 300ms linear forwards}.playkit-player .playkit-btn.playkit-cast-on-tv-button{font-size:15px;max-width:200px;transition:max-width 200ms;padding:0 16px;white-space:nowrap;position:absolute;bottom:0;transform:translate(-50%, -50%);left:50%}.playkit-player .playkit-btn.playkit-cast-on-tv-button span{transform:translateX(0px);opacity:1;transition:transform 100ms,opacity 100ms;display:inline-block}.playkit-player .playkit-cast-on-tv-icon-container{width:32px;height:32px;display:inline-block;vertical-align:top;position:relative;margin-right:3px}.playkit-player .playkit-cast-on-tv-icon-container i{position:absolute;top:0;left:0}.playkit-control-button-container.playkit-control-playlist-button .playkit-poster-preview{position:absolute;bottom:35px;width:280px;height:72px;display:flex;border-radius:4px;box-shadow:0px 0px 0px 1px rgba(0,0,0,.2),0px 8px 60px -16px rgba(0,0,0,.2);opacity:0;transition:400ms opacity;pointer-events:none}.playkit-control-button-container.playkit-control-playlist-button .playkit-poster-preview:hover{opacity:0 !important}.playkit-control-button-container.playkit-control-playlist-button .playkit-poster-preview .playkit-poster-preview-img{width:128px;height:inherit;border-radius:4px 0 0 4px;background-size:contain;background-repeat:round}.playkit-control-button-container.playkit-control-playlist-button .playkit-poster-preview .playkit-poster-preview-text{width:152px;height:inherit;padding:8px;background-color:rgba(0,0,0,.7);border-radius:0 4px 4px 0}.playkit-control-button-container.playkit-control-playlist-button .playkit-poster-preview .playkit-poster-preview-text .playkit-poster-preview-text-title{font-size:14px;font-weight:400;margin-bottom:3px;opacity:.7}.playkit-control-button-container.playkit-control-playlist-button .playkit-poster-preview .playkit-poster-preview-text .playkit-poster-preview-text-name{font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:400}.playkit-control-button-container.playkit-control-playlist-button:hover .playkit-poster-preview{opacity:1}.playkit-icon-picture-in-picture-stop{display:none}.playkit-is-in-picture-in-picture .playkit-icon-picture-in-picture-start{display:none}.playkit-is-in-picture-in-picture .playkit-icon-picture-in-picture-stop{display:block}.playkit-player-gui>.playkit-playback-controls,.playkit-center-playback-controls{display:none;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);-webkit-transform:translate(-50%, -50%);-ms-transform:translate(-50%, -50%);white-space:nowrap;z-index:1}.playkit-bottom-bar .playkit-playback-controls{display:inline}.playkit-player.playkit-size-sm.playkit-state-idle .playkit-control-playlist-button,.playkit-player.playkit-size-xs.playkit-state-idle .playkit-control-playlist-button,.playkit-player.playkit-touch.playkit-state-idle .playkit-control-playlist-button{display:none}.playkit-player.playkit-size-sm:not(.playkit-state-idle) .playkit-bottom-bar .playkit-playback-controls,.playkit-player.playkit-size-xs:not(.playkit-state-idle) .playkit-bottom-bar .playkit-playback-controls,.playkit-player.playkit-touch:not(.playkit-state-idle) .playkit-bottom-bar .playkit-playback-controls{display:none}.playkit-player.playkit-size-sm:not(.playkit-state-idle).playkit-hover .playkit-player-gui>.playkit-playback-controls,.playkit-player.playkit-size-sm:not(.playkit-state-idle).playkit-hover .playkit-center-playback-controls,.playkit-player.playkit-size-xs:not(.playkit-state-idle).playkit-hover .playkit-player-gui>.playkit-playback-controls,.playkit-player.playkit-size-xs:not(.playkit-state-idle).playkit-hover .playkit-center-playback-controls,.playkit-player.playkit-touch:not(.playkit-state-idle).playkit-hover .playkit-player-gui>.playkit-playback-controls,.playkit-player.playkit-touch:not(.playkit-state-idle).playkit-hover .playkit-center-playback-controls{display:block}.playkit-player.playkit-size-sm:not(.playkit-state-idle).playkit-hover .playkit-player-gui>.playkit-playback-controls .playkit-control-button,.playkit-player.playkit-size-sm:not(.playkit-state-idle).playkit-hover .playkit-center-playback-controls .playkit-control-button,.playkit-player.playkit-size-xs:not(.playkit-state-idle).playkit-hover .playkit-player-gui>.playkit-playback-controls .playkit-control-button,.playkit-player.playkit-size-xs:not(.playkit-state-idle).playkit-hover .playkit-center-playback-controls .playkit-control-button,.playkit-player.playkit-touch:not(.playkit-state-idle).playkit-hover .playkit-player-gui>.playkit-playback-controls .playkit-control-button,.playkit-player.playkit-touch:not(.playkit-state-idle).playkit-hover .playkit-center-playback-controls .playkit-control-button{width:auto;height:auto;padding:0 16px;-webkit-filter:drop-shadow(0px 0px 8px rgba(0, 0, 0, 0.5));filter:drop-shadow(0px 0px 8px rgba(0, 0, 0, 0.5))}.playkit-player.playkit-size-sm:not(.playkit-state-idle).playkit-hover .playkit-player-gui>.playkit-playback-controls .playkit-icon,.playkit-player.playkit-size-sm:not(.playkit-state-idle).playkit-hover .playkit-center-playback-controls .playkit-icon,.playkit-player.playkit-size-xs:not(.playkit-state-idle).playkit-hover .playkit-player-gui>.playkit-playback-controls .playkit-icon,.playkit-player.playkit-size-xs:not(.playkit-state-idle).playkit-hover .playkit-center-playback-controls .playkit-icon,.playkit-player.playkit-touch:not(.playkit-state-idle).playkit-hover .playkit-player-gui>.playkit-playback-controls .playkit-icon,.playkit-player.playkit-touch:not(.playkit-state-idle).playkit-hover .playkit-center-playback-controls .playkit-icon{width:64px;height:64px}.playkit-player.playkit-overlay-active .playkit-gui-area .playkit-playback-controls{opacity:0;visibility:hidden}@keyframes playkit-slideIn{0%{right:-160px}100%{right:0}}.playkit-player .playkit-playlist-countdown{display:flex;height:72px;position:absolute;right:0;bottom:0;border-radius:4px;transition:opacity 400ms,bottom 300ms;cursor:pointer;box-shadow:0px 0px 0px 1px rgba(0,0,0,.2),0px 8px 60px -16px rgba(0,0,0,.2)}.playkit-player .playkit-playlist-countdown.playkit-slideIn{right:-160px;animation:playkit-slideIn 500ms 500ms forwards}.playkit-player .playkit-playlist-countdown.playkit-hidden{pointer-events:none;opacity:0}.playkit-player .playkit-playlist-countdown.playkit-hidden .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background{width:0}.playkit-player .playkit-playlist-countdown.playkit-hidden .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content{opacity:0}.playkit-player .playkit-playlist-countdown.playkit-canceled{bottom:-50px;opacity:0}.playkit-player .playkit-playlist-countdown:hover .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background{background-color:#000}.playkit-player .playkit-playlist-countdown .playkit-playlist-countdown-poster{width:128px;height:inherit;border-radius:4px 0 0 4px;background-size:contain;background-repeat:round}.playkit-player .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder{width:152px;height:inherit}.playkit-player .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background{width:inherit;border-radius:0 4px 3px 0;background-color:rgba(0,0,0,.7);height:inherit;transition:width 500ms 1000ms}.playkit-player .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content{width:inherit;transition:opacity 300ms 1200ms}.playkit-player .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content .playkit-playlist-countdown-text{width:100%;padding:10px;font-size:14px;font-weight:400;text-align:left;color:#fff;float:left;line-height:initial}.playkit-player .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content .playkit-playlist-countdown-text .playkit-playlist-countdown-text-title{margin-bottom:12px;opacity:.7}.playkit-player .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content .playkit-playlist-countdown-text .playkit-playlist-countdown-text-title .playkit-playlist-countdown-time-left{display:inline;margin-left:4px}.playkit-player .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content .playkit-playlist-countdown-text .playkit-playlist-countdown-text-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.playkit-player .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content .playkit-playlist-countdown-cancel{position:absolute;top:5px;right:5px;width:24px;height:24px}.playkit-player .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content .playkit-playlist-countdown-cancel *{width:inherit;height:inherit}.playkit-player.playkit-size-md .playkit-playlist-countdown{height:54px}.playkit-player.playkit-size-md .playkit-playlist-countdown .playkit-playlist-countdown-poster{width:96px}.playkit-player.playkit-size-md .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder{width:152px}.playkit-player.playkit-size-md .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content .playkit-playlist-countdown-text{padding:8px}.playkit-player.playkit-size-md .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content .playkit-playlist-countdown-text .playkit-playlist-countdown-text-title{margin-bottom:4px}.playkit-player.playkit-size-md .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content .playkit-playlist-countdown-cancel{top:3px;right:3px}.playkit-player.playkit-size-sm .playkit-playlist-countdown,.playkit-player.playkit-size-xs .playkit-playlist-countdown,.playkit-player.playkit-size-ty .playkit-playlist-countdown{z-index:1;height:36px;margin:8px}.playkit-player.playkit-size-sm .playkit-playlist-countdown .playkit-playlist-countdown-poster,.playkit-player.playkit-size-xs .playkit-playlist-countdown .playkit-playlist-countdown-poster,.playkit-player.playkit-size-ty .playkit-playlist-countdown .playkit-playlist-countdown-poster{display:none}.playkit-player.playkit-size-sm .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder,.playkit-player.playkit-size-xs .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder,.playkit-player.playkit-size-ty .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder{width:108px}.playkit-player.playkit-size-sm .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background,.playkit-player.playkit-size-xs .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background,.playkit-player.playkit-size-ty .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background{transition:width 500ms;border-radius:2px}.playkit-player.playkit-size-sm .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content .playkit-playlist-countdown-text,.playkit-player.playkit-size-xs .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content .playkit-playlist-countdown-text,.playkit-player.playkit-size-ty .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content .playkit-playlist-countdown-text{width:90%;padding:3px 0 0 4px}.playkit-player.playkit-size-sm .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content .playkit-playlist-countdown-text .playkit-playlist-countdown-text-title,.playkit-player.playkit-size-xs .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content .playkit-playlist-countdown-text .playkit-playlist-countdown-text-title,.playkit-player.playkit-size-ty .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content .playkit-playlist-countdown-text .playkit-playlist-countdown-text-title{font-size:12px;margin-bottom:0}.playkit-player.playkit-size-sm .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content .playkit-playlist-countdown-text .playkit-playlist-countdown-text-name,.playkit-player.playkit-size-xs .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content .playkit-playlist-countdown-text .playkit-playlist-countdown-text-name,.playkit-player.playkit-size-ty .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content .playkit-playlist-countdown-text .playkit-playlist-countdown-text-name{font-size:12px;font-weight:400}.playkit-player.playkit-size-sm .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content .playkit-playlist-countdown-cancel,.playkit-player.playkit-size-xs .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content .playkit-playlist-countdown-cancel,.playkit-player.playkit-size-ty .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content .playkit-playlist-countdown-cancel{top:0;right:0}.playkit-player.playkit-state-idle .playkit-playlist-next-screen-overlay{position:absolute;width:100%;height:100%;background-color:rgba(0,0,0,.5)}.playkit-player.playkit-state-idle .playkit-playlist-next-screen-overlay .playkit-playlist-next-screen-content{position:relative;top:50%;transform:translateY(-50%)}.playkit-player.playkit-state-idle .playkit-playlist-next-screen-overlay .playkit-playlist-next-screen-content .playkit-playlist-next-screen-text{position:absolute;width:100%;top:-90px;font-size:15px;color:#fff;padding:4px 8px 12px 8px;text-align:center}.playkit-player.playkit-state-idle .playkit-playlist-next-screen-overlay .playkit-playlist-next-screen-content .playkit-playlist-next-screen-text .playkit-playlist-next-screen-text-title{padding:4px;font-weight:100}.playkit-player.playkit-state-idle .playkit-playlist-next-screen-overlay .playkit-playlist-next-screen-content .playkit-playlist-next-screen-text .playkit-playlist-next-screen-text-name{padding:16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.playkit-player.playkit-state-idle .playkit-playlist-next-screen-overlay .playkit-playlist-next-screen-content .playkit-playlist-next-screen-poster-placeholder{position:relative;margin:auto;width:384px}.playkit-player.playkit-state-idle .playkit-playlist-next-screen-overlay .playkit-playlist-next-screen-content .playkit-playlist-next-screen-poster-placeholder .playkit-playlist-next-screen-poster-aspect-ratio{width:100%;padding-top:56%}.playkit-player.playkit-state-idle .playkit-playlist-next-screen-overlay .playkit-playlist-next-screen-content .playkit-playlist-next-screen-poster-placeholder .playkit-playlist-next-screen-poster-aspect-ratio .playkit-playlist-next-screen-poster{position:absolute;top:0;left:0;bottom:0;right:0;border:2px solid rgba(255,255,255,.2);border-radius:4px;cursor:pointer}.playkit-player.playkit-state-idle .playkit-playlist-next-screen-overlay .playkit-playlist-next-screen-content .playkit-playlist-next-screen-poster-placeholder .playkit-playlist-next-screen-poster-aspect-ratio .playkit-playlist-next-screen-poster .playkit-playlist-next-screen-poster-img{height:100%;border-radius:3px;background-size:contain;background-repeat:round}.playkit-player.playkit-state-idle .playkit-playlist-next-screen-overlay .playkit-playlist-next-screen-content .playkit-playlist-next-screen-poster-placeholder .playkit-playlist-next-screen-poster-aspect-ratio .playkit-playlist-next-screen-poster .playkit-icon{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:64px;height:64px}.playkit-player.playkit-state-idle.playkit-size-lg .playkit-playlist-next-screen-content .playkit-playlist-next-screen-poster-placeholder{width:37.5%}.playkit-player.playkit-state-idle.playkit-size-md .playkit-playlist-next-screen-content .playkit-playlist-next-screen-text{top:-58px}.playkit-player.playkit-state-idle.playkit-size-md .playkit-playlist-next-screen-content .playkit-playlist-next-screen-text .playkit-playlist-next-screen-text-name{padding:0}.playkit-player.playkit-state-idle.playkit-size-md .playkit-playlist-next-screen-content .playkit-playlist-next-screen-poster-placeholder{width:42%}.playkit-player.playkit-state-idle.playkit-size-sm .playkit-playlist-next-screen-content .playkit-playlist-next-screen-poster-placeholder,.playkit-player.playkit-state-idle.playkit-size-xs .playkit-playlist-next-screen-content .playkit-playlist-next-screen-poster-placeholder,.playkit-player.playkit-state-idle.playkit-size-ty .playkit-playlist-next-screen-content .playkit-playlist-next-screen-poster-placeholder{width:32px}.playkit-player.playkit-state-idle.playkit-size-sm .playkit-playlist-next-screen-content .playkit-playlist-next-screen-poster-placeholder .playkit-playlist-next-screen-poster-aspect-ratio .playkit-playlist-next-screen-poster,.playkit-player.playkit-state-idle.playkit-size-xs .playkit-playlist-next-screen-content .playkit-playlist-next-screen-poster-placeholder .playkit-playlist-next-screen-poster-aspect-ratio .playkit-playlist-next-screen-poster,.playkit-player.playkit-state-idle.playkit-size-ty .playkit-playlist-next-screen-content .playkit-playlist-next-screen-poster-placeholder .playkit-playlist-next-screen-poster-aspect-ratio .playkit-playlist-next-screen-poster{border:0}.playkit-player.playkit-state-idle.playkit-size-sm .playkit-playlist-next-screen-content .playkit-playlist-next-screen-poster-placeholder .playkit-playlist-next-screen-poster-aspect-ratio .playkit-playlist-next-screen-poster .playkit-playlist-next-screen-poster-img,.playkit-player.playkit-state-idle.playkit-size-xs .playkit-playlist-next-screen-content .playkit-playlist-next-screen-poster-placeholder .playkit-playlist-next-screen-poster-aspect-ratio .playkit-playlist-next-screen-poster .playkit-playlist-next-screen-poster-img,.playkit-player.playkit-state-idle.playkit-size-ty .playkit-playlist-next-screen-content .playkit-playlist-next-screen-poster-placeholder .playkit-playlist-next-screen-poster-aspect-ratio .playkit-playlist-next-screen-poster .playkit-playlist-next-screen-poster-img{display:none}.playkit-player.playkit-state-idle.playkit-size-sm .playkit-playlist-next-screen-content .playkit-playlist-next-screen-poster-placeholder .playkit-playlist-next-screen-poster-aspect-ratio .playkit-playlist-next-screen-poster .playkit-icon,.playkit-player.playkit-state-idle.playkit-size-xs .playkit-playlist-next-screen-content .playkit-playlist-next-screen-poster-placeholder .playkit-playlist-next-screen-poster-aspect-ratio .playkit-playlist-next-screen-poster .playkit-icon,.playkit-player.playkit-state-idle.playkit-size-ty .playkit-playlist-next-screen-content .playkit-playlist-next-screen-poster-placeholder .playkit-playlist-next-screen-poster-aspect-ratio .playkit-playlist-next-screen-poster .playkit-icon{width:32px;height:32px}.playkit-picture-in-picture-overlay{position:absolute;top:0;left:0;width:100%;height:100%;display:flex;align-items:center;justify-content:center}.playkit-picture-in-picture-overlay .playkit-picture-in-picture-poster{all:inherit;background-size:contain;background:#000 no-repeat center center}.playkit-picture-in-picture-overlay .playkit-picture-in-picture-poster.playkit-has-poster{background-color:#000}.playkit-picture-in-picture-overlay .playkit-picture-in-picture-poster .playkit-dark-layer{background-color:rgba(0,0,0,.4);position:absolute;top:0;left:0;width:100%;height:100%}.playkit-picture-in-picture-overlay .playkit-picture-in-picture-control{position:absolute;display:flex;flex-direction:column;height:100%}.playkit-picture-in-picture-overlay .playkit-picture-in-picture-control::after{content:\"\";flex:3}.playkit-picture-in-picture-overlay .playkit-picture-in-picture-control::before{content:\"\";flex:1}.playkit-picture-in-picture-overlay .playkit-picture-in-picture-text{color:var(--playkit-tone-1-color);font-size:18px;white-space:nowrap;overflow:hidden}.playkit-picture-in-picture-overlay .playkit-picture-in-picture-button{height:36px;width:120px;border:2px solid var(--playkit-tone-6-color);border-radius:18px;background-color:var(--playkit-tone-7-color);color:var(--playkit-tone-1-color);font-size:15px;font-weight:bold;line-height:30px;cursor:pointer;margin-top:20px;align-self:center}.playkit-picture-in-picture-overlay .playkit-picture-in-picture-button:hover{background-color:var(--playkit-tone-6-color)}.playkit-copy-url-row .playkit-input-copy-url{margin:0}.playkit-copy-url-row .playkit-btn-copy-url{margin:0 8px}.playkit-copy-url-row .playkit-btn-copy-url .playkit-icon{height:24px;width:24px;margin-top:-3px;display:none}.playkit-copy-url-row .playkit-btn-copy-url .playkit-icon-copy{display:block}.playkit-copy-url-row .playkit-btn-copy-url.playkit-copied .playkit-icon-copy{display:none}.playkit-copy-url-row .playkit-btn-copy-url.playkit-copied .playkit-icon-check{display:block}.playkit-IE.playkit-player .playkit-tooltip .playkit-tooltip-label{white-space:nowrap}.playkit-player .playkit-tooltip{position:relative;display:inline-block;height:100%;width:100%}.playkit-player .playkit-tooltip .playkit-tooltip-label{visibility:hidden;background-color:var(--playkit-tooltip-background-color);color:var(--playkit-tooltip-color);text-align:center;padding:4px 6px;border-radius:4px;position:absolute;line-height:normal;font-weight:bold;font-size:13px;opacity:0;transition:opacity 1s;width:max-content;display:table}.playkit-player .playkit-tooltip .playkit-tooltip-label:before{content:\"\";position:absolute;border-width:5px;border-style:solid;border-radius:3px;color:var(--playkit-tooltip-background-color);z-index:-1}.playkit-player .playkit-tooltip .playkit-tooltip-label:after{content:\"\";position:absolute;inset:-1em}.playkit-player .playkit-tooltip .playkit-tooltip-label.playkit-tooltip-top{bottom:calc(100% + 10px);left:50%;transform:translate(-50%)}.playkit-player .playkit-tooltip .playkit-tooltip-label.playkit-tooltip-top:before{bottom:-4px;left:50%;transform:translate(-50%) rotate(45deg) skew(5deg, 5deg)}.playkit-player .playkit-tooltip .playkit-tooltip-label.playkit-tooltip-top-left{bottom:calc(100% + 10px);left:50%;transform:translate(-100%);margin-left:16px}.playkit-player .playkit-tooltip .playkit-tooltip-label.playkit-tooltip-top-left:before{bottom:-4px;right:0;margin-right:11px;transform:rotate(45deg) skew(5deg, 5deg)}.playkit-player .playkit-tooltip .playkit-tooltip-label.playkit-tooltip-top-right{bottom:calc(100% + 10px);left:50%;transform:translate(-16px)}.playkit-player .playkit-tooltip .playkit-tooltip-label.playkit-tooltip-top-right:before{bottom:-4px;left:0;margin-left:11px;transform:rotate(45deg) skew(5deg, 5deg)}.playkit-player .playkit-tooltip .playkit-tooltip-label.playkit-tooltip-bottom{top:calc(100% + 10px);left:50%;transform:translate(-50%)}.playkit-player .playkit-tooltip .playkit-tooltip-label.playkit-tooltip-bottom:before{top:-4px;left:50%;margin-left:-5px;transform:rotate(45deg) skew(5deg, 5deg)}.playkit-player .playkit-tooltip .playkit-tooltip-label.playkit-tooltip-bottom-right{top:calc(100% + 10px);left:50%;transform:translate(-16px)}.playkit-player .playkit-tooltip .playkit-tooltip-label.playkit-tooltip-bottom-right:before{top:-4px;left:0;margin-left:11px;transform:rotate(45deg) skew(5deg, 5deg)}.playkit-player .playkit-tooltip .playkit-tooltip-label.playkit-tooltip-bottom-left{top:calc(100% + 10px);transform:translate(-100%);left:50%;margin-left:16px}.playkit-player .playkit-tooltip .playkit-tooltip-label.playkit-tooltip-bottom-left:before{top:-4px;right:0;margin-right:11px;transform:rotate(45deg) skew(5deg, 5deg)}.playkit-player .playkit-tooltip .playkit-tooltip-label.playkit-tooltip-left{top:50%;right:calc(100% + 10px);transform:translate(0, -50%)}.playkit-player .playkit-tooltip .playkit-tooltip-label.playkit-tooltip-left:before{top:50%;left:100%;margin-left:-6px;margin-top:-5px;transform:rotate(135deg) skew(10deg, 10deg)}.playkit-player .playkit-tooltip .playkit-tooltip-label.playkit-tooltip-right{top:50%;left:calc(100% + 10px);transform:translate(0, -50%)}.playkit-player .playkit-tooltip .playkit-tooltip-label.playkit-tooltip-right:before{top:50%;right:100%;margin-top:-5px;margin-right:-6px;transform:rotate(135deg) skew(10deg, 10deg)}.playkit-player .playkit-tooltip .playkit-tooltip-label.playkit-show{visibility:visible;opacity:1}.playkit-player .playkit-tooltip .playkit-tooltip-label.playkit-hide{transition:opacity .15s ease-in-out}.playkit-side-panel{position:absolute;transition:all 500ms;transition-property:left,right,bottom,top,opacity;z-index:0}.playkit-side-panel.playkit-small-size{z-index:2}.playkit-vertical-side-panel{height:100%}.playkit-horizontal-side-panel{height:0;left:0;right:0}.playkit-side-panel-content{width:100%;height:100%;overflow:hidden}.playkit-player.playkit-overlay-active .playkit-interactive-area{filter:blur(16px)}.playkit-interactive-area{pointer-events:none;position:relative;top:0;margin:16px;transition:margin 100ms ease-in-out;flex:1}.playkit-player.playkit-size-sm .playkit-interactive-area{margin:8px}.playkit-player.playkit-casting:not(.playkit-overlay-active).playkit-size-sm .playkit-interactive-area,.playkit-player.playkit-metadata-loaded.playkit-hover:not(.playkit-overlay-active).playkit-size-sm .playkit-interactive-area,.playkit-player.playkit-state-paused:not(.playkit-overlay-active).playkit-size-sm .playkit-interactive-area,.playkit-player.playkit-state-idle:not(.playkit-overlay-active).playkit-size-sm .playkit-interactive-area,.playkit-player.playkit-ad-break:not(.playkit-overlay-active).playkit-size-sm .playkit-interactive-area,.playkit-player.playkit-menu-active:not(.playkit-overlay-active).playkit-size-sm .playkit-interactive-area{margin:0px 8px}.playkit-player.playkit-casting .playkit-interactive-area,.playkit-player.playkit-metadata-loaded.playkit-hover .playkit-interactive-area,.playkit-player.playkit-state-paused .playkit-interactive-area,.playkit-player.playkit-state-idle .playkit-interactive-area,.playkit-player.playkit-ad-break .playkit-interactive-area,.playkit-player.playkit-menu-active .playkit-interactive-area{margin:0px 16px}.playkit-video-area{pointer-events:none;transition:all 500ms;transition-property:left,right,bottom,top,width,height}.playkit-gui-area{pointer-events:none;transition:all 500ms;transition-property:left,right,bottom,top;display:flex;flex-flow:column nowrap}@keyframes playkit-kaltura-spinner{0%{transform:rotate(0deg) scale(0.7);opacity:1}70%{transform:rotate(360deg) scale(0.7);opacity:1}82%{transform:rotate(360deg) scale(0);opacity:0}87%{transform:rotate(360deg) scale(0.9);opacity:1}100%{transform:rotate(360deg) scale(0.7);opacity:1}}.playkit-spinner{width:100px;height:100px;position:relative;animation:playkit-kaltura-spinner 2.5s infinite}.playkit-spinner span{width:8px;height:8px;background-color:#fff;display:block;border-radius:8px;position:absolute;top:50%;left:50%;margin-top:-4px;margin-left:-4px}.playkit-spinner span:nth-child(1){transform:rotate(45deg) translateX(-25px) translateY(-25px);background-color:#da1f26}.playkit-spinner span:nth-child(2){transform:rotate(90deg) translateX(-25px) translateY(-25px);background-color:#06a885}.playkit-spinner span:nth-child(3){transform:rotate(135deg) translateX(-25px) translateY(-25px);background-color:#009344}.playkit-spinner span:nth-child(4){transform:rotate(180deg) translateX(-25px) translateY(-25px);background-color:#f8a61a}.playkit-spinner span:nth-child(5){transform:rotate(225deg) translateX(-25px) translateY(-25px);background-color:#1b4a97}.playkit-spinner span:nth-child(6){transform:rotate(270deg) translateX(-25px) translateY(-25px);background-color:#00abcc}.playkit-spinner span:nth-child(7){transform:rotate(315deg) translateX(-25px) translateY(-25px);background-color:#b1d238}.playkit-spinner span:nth-child(8){transform:rotate(360deg) translateX(-25px) translateY(-25px);background-color:#fcd203}.playkit-switch{position:relative;display:inline-block;width:32px;height:16px}.playkit-switch .playkit-toggle-input{opacity:0;width:0;height:0}.playkit-switch .playkit-toggle-input:checked+.playkit-slider{background-color:#2196f3}.playkit-switch .playkit-toggle-input:focus+.playkit-slider{box-shadow:0 0 1px #2196f3}.playkit-switch .playkit-toggle-input:checked+.playkit-slider:before{transform:translateX(14px);-webkit-transform:translateX(14px);-ms-transform:translateX(14px)}.playkit-switch .playkit-slider{height:100%;position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;-webkit-transition:.4s;transition:.4s;border-radius:34px}.playkit-switch .playkit-slider:before{position:absolute;content:\"\";height:12px;width:12px;left:3px;top:2px;background-color:#fff;-webkit-transition:.3s;transition:.3s;border-radius:50%}.playkit-player .playkit-audio-entry-backdrop{background:linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.7) 100%);bottom:0;left:0;position:absolute;width:100%;pointer-events:none;display:flex;flex-direction:column;justify-content:flex-end}.playkit-player .playkit-audio-entry-backdrop .playkit-audio-entry-details{margin:128px 16px 60px 16px;left:16px;color:#fff;max-height:100%;pointer-events:auto;z-index:1}.playkit-player .playkit-audio-entry-backdrop .playkit-audio-entry-details.playkit-audio-entry-l{max-width:600px}.playkit-player .playkit-audio-entry-backdrop .playkit-audio-entry-details.playkit-audio-entry-m{max-width:min(600px,100%)}.playkit-player .playkit-audio-entry-backdrop .playkit-audio-entry-details.playkit-audio-entry-t{max-width:0px}.playkit-player .playkit-audio-entry-backdrop .playkit-audio-entry-details.playkit-audio-entry-t .playkit-audio-entry-description{font-size:0}.playkit-player .playkit-audio-entry-backdrop .playkit-audio-entry-details .playkit-audio-entry-title{font-size:32px;line-height:38px}.playkit-player .playkit-audio-entry-backdrop .playkit-audio-entry-details .playkit-audio-entry-title.playkit-audio-entry-title-trimmed{-webkit-box-orient:vertical;-webkit-line-clamp:1;display:-webkit-box;overflow:hidden;text-overflow:ellipsis}.playkit-player .playkit-audio-entry-backdrop .playkit-audio-entry-details .playkit-audio-entry-description{font-size:14px;line-height:18px}.playkit-player .playkit-audio-entry-backdrop.playkit-audio-entry-expanded{overflow:auto;background:linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.7) 100%);height:auto}.playkit-player .playkit-audio-entry-backdrop.playkit-audio-entry-expanded .playkit-audio-entry-details{overflow:auto;margin:60px 16px}.playkit-player .playkit-expandable-text{text-overflow:ellipsis;overflow:hidden;-webkit-box-orient:vertical;display:-webkit-box}.playkit-player .playkit-more-button-text{pointer-events:auto;cursor:pointer;position:relative;z-index:1;width:fit-content;outline-offset:-1px}.playkit-scrollable{display:flex;width:100%}.playkit-scrollable .playkit-items-container{display:flex;width:100%;height:fit-content}.playkit-scrollable.playkit-horizontal{flex-direction:row;overflow:auto hidden}.playkit-scrollable.playkit-horizontal .playkit-items-container{flex-direction:row}.playkit-scrollable.playkit-vertical{flex-direction:column;height:100%;overflow:hidden auto}.playkit-scrollable.playkit-vertical .playkit-items-container{flex-direction:column}.playkit-scrollable::-webkit-scrollbar{height:4px;width:4px}.playkit-scrollable::-webkit-scrollbar-track{visibility:hidden}.playkit-scrollable::-webkit-scrollbar-thumb{background-color:rgba(255,255,255,.3);border-radius:3px;visibility:hidden}.playkit-scrollable.playkit-scrolling::-webkit-scrollbar-track,.playkit-scrollable.playkit-scrolling::-webkit-scrollbar-thumb{visibility:visible}",""]),t.locals={primaryColor:"var(--playkit-primary-color)",primaryDarkerColor:"var(--playkit-primary-darker-color)",primaryBrighterColor:"var(--playkit-primary-brighter-color)",primaryTextContrastColor:"var(--playkit-primary-text-contrast-color)",secondaryColor:"var(--playkit-secondary-color)",secondaryDarkerColor:"var(--playkit-secondary-darker-color)",secondaryBrighterColor:"var(--playkit-secondary-brighter-color)",secondaryTextContrastColor:"var(--playkit-secondary-text-contrast-color)",successDarkerColor:"var(--playkit-success-darker-color)",successBrighterColor:"var(--playkit-success-brighter-color)",successTextContrastColor:"var(--playkit-success-text-contrast-color)",dangerColor:"var(--playkit-danger-color)",dangerDarkerColor:"var(--playkit-danger-darker-color)",dangerBrighterColor:"var(--playkit-danger-brighter-color)","danger-text-contrast-color":"var(--playkit-danger-text-contrast-color)",dangerTextContrastColor:"var(--playkit-danger-text-contrast-color)",warningColor:"var(--playkit-warning-color)",warningDarkerColor:"var(--playkit-warning-darker-color)",warningBrighterColor:"var(--playkit-warning-brighter-color)",warningTextContrastColor:"var(--playkit-warning-text-contrast-color)",tone1Color:"var(--playkit-tone-1-color)",tone2Color:"var(--playkit-tone-2-color)",tone3Color:"var(--playkit-tone-3-color)",tone4Color:"var(--playkit-tone-4-color)",tone5Color:"var(--playkit-tone-5-color)",tone6Color:"var(--playkit-tone-6-color)",tone7Color:"var(--playkit-tone-7-color)",tone8Color:"var(--playkit-tone-8-color)",liveColor:"var(--playkit-live-color)",playerBackgroundColor:"var(--playkit-player-background-color)",tabFocusColor:"var(--playkit-tab-focus-color)",tooltipBackgroundColor:"var(--playkit-tooltip-background-color)",tooltipColor:"var(--playkit-tooltip-color)",adsColor:"var(--playkit-ads-color)",progressBarHeight:"4px",progressBarBorderRadius:"2px",defaultTransitionTime:"500",bottomBarMaxHeight:"60",topBarMaxHeight:"60",brandColor:"#006bff",white:"#fff",player:"playkit-player",row:"playkit-row","d-inline-block":"playkit-d-inline-block",dInlineBlock:"playkit-d-inline-block","mobile-hidden-select":"playkit-mobile-hidden-select",mobileHiddenSelect:"playkit-mobile-hidden-select","font-size-base":"playkit-font-size-base",fontSizeBase:"playkit-font-size-base","ad-notice":"playkit-ad-notice",adNotice:"playkit-ad-notice","form-group":"playkit-form-group",formGroup:"playkit-form-group","has-error":"playkit-has-error",hasError:"playkit-has-error","form-control":"playkit-form-control",formControl:"playkit-form-control","has-icon":"playkit-has-icon",hasIcon:"playkit-has-icon",icon:"playkit-icon",checkbox:"playkit-checkbox","form-group-row":"playkit-form-group-row",formGroupRow:"playkit-form-group-row",dropdown:"playkit-dropdown",btn:"playkit-btn","btn-block":"playkit-btn-block",btnBlock:"playkit-btn-block","btn-dark-transparent":"playkit-btn-dark-transparent",btnDarkTransparent:"playkit-btn-dark-transparent","btn-branded":"playkit-btn-branded",btnBranded:"playkit-btn-branded","btn-rounded":"playkit-btn-rounded",btnRounded:"playkit-btn-rounded","btn-borderless":"playkit-btn-borderless",btnBorderless:"playkit-btn-borderless","only-icon":"playkit-only-icon",onlyIcon:"playkit-only-icon","only-label":"playkit-only-label",onlyLabel:"playkit-only-label","btn-translucent":"playkit-btn-translucent",btnTranslucent:"playkit-btn-translucent","size-sm":"playkit-size-sm",sizeSm:"playkit-size-sm","size-xs":"playkit-size-xs",sizeXs:"playkit-size-xs","badge-icon":"playkit-badge-icon",badgeIcon:"playkit-badge-icon","icon-maximize":"playkit-icon-maximize",iconMaximize:"playkit-icon-maximize","icon-minimize":"playkit-icon-minimize",iconMinimize:"playkit-icon-minimize","icon-play":"playkit-icon-play",iconPlay:"playkit-icon-play","icon-pause":"playkit-icon-pause",iconPause:"playkit-icon-pause","icon-volume-base":"playkit-icon-volume-base",iconVolumeBase:"playkit-icon-volume-base","icon-volume-waves":"playkit-icon-volume-waves",iconVolumeWaves:"playkit-icon-volume-waves","icon-volume-wave":"playkit-icon-volume-wave",iconVolumeWave:"playkit-icon-volume-wave","icon-volume-mute":"playkit-icon-volume-mute",iconVolumeMute:"playkit-icon-volume-mute","icon-close":"playkit-icon-close",iconClose:"playkit-icon-close","icon-settings":"playkit-icon-settings",iconSettings:"playkit-icon-settings","icon-check":"playkit-icon-check",iconCheck:"playkit-icon-check","icon-check-active":"playkit-icon-check-active",iconCheckActive:"playkit-icon-check-active","icon-language":"playkit-icon-language",iconLanguage:"playkit-icon-language","icon-quality":"playkit-icon-quality",iconQuality:"playkit-icon-quality","icon-captions":"playkit-icon-captions",iconCaptions:"playkit-icon-captions","icon-speed":"playkit-icon-speed",iconSpeed:"playkit-icon-speed","icon-speed-down":"playkit-icon-speed-down",iconSpeedDown:"playkit-icon-speed-down","icon-speed-up":"playkit-icon-speed-up",iconSpeedUp:"playkit-icon-speed-up","icon-audio":"playkit-icon-audio",iconAudio:"playkit-icon-audio","icon-arrow-down":"playkit-icon-arrow-down",iconArrowDown:"playkit-icon-arrow-down","icon-start-over":"playkit-icon-start-over",iconStartOver:"playkit-icon-start-over","icon-seek-end":"playkit-icon-seek-end",iconSeekEnd:"playkit-icon-seek-end","icon-rewind":"playkit-icon-rewind",iconRewind:"playkit-icon-rewind","icon-rewind-10":"playkit-icon-rewind-10",iconRewind10:"playkit-icon-rewind-10","icon-forward":"playkit-icon-forward",iconForward:"playkit-icon-forward","icon-forward-10":"playkit-icon-forward-10",iconForward10:"playkit-icon-forward-10","icon-vr-stereo":"playkit-icon-vr-stereo",iconVrStereo:"playkit-icon-vr-stereo","icon-vr-stereo-full":"playkit-icon-vr-stereo-full",iconVrStereoFull:"playkit-icon-vr-stereo-full","icon-chromecast":"playkit-icon-chromecast",iconChromecast:"playkit-icon-chromecast","icon-chromecast-brand":"playkit-icon-chromecast-brand",iconChromecastBrand:"playkit-icon-chromecast-brand","icon-next":"playkit-icon-next",iconNext:"playkit-icon-next","icon-prev":"playkit-icon-prev",iconPrev:"playkit-icon-prev","icon-picture-in-picture-start":"playkit-icon-picture-in-picture-start",iconPictureInPictureStart:"playkit-icon-picture-in-picture-start","icon-picture-in-picture-stop":"playkit-icon-picture-in-picture-stop",iconPictureInPictureStop:"playkit-icon-picture-in-picture-stop","icon-advanced-audio-description":"playkit-icon-advanced-audio-description",iconAdvancedAudioDescription:"playkit-icon-advanced-audio-description","icon-advanced-audio-description-active":"playkit-icon-advanced-audio-description-active",iconAdvancedAudioDescriptionActive:"playkit-icon-advanced-audio-description-active","icon-quality-hd":"playkit-icon-quality-hd",iconQualityHd:"playkit-icon-quality-hd","icon-quality-hd-active":"playkit-icon-quality-hd-active",iconQualityHdActive:"playkit-icon-quality-hd-active","icon-quality-4k":"playkit-icon-quality-4k",iconQuality4K:"playkit-icon-quality-4k","icon-quality-4k-active":"playkit-icon-quality-4k-active",iconQuality4KActive:"playkit-icon-quality-4k-active","icon-quality-8k":"playkit-icon-quality-8k",iconQuality8K:"playkit-icon-quality-8k","icon-quality-8k-active":"playkit-icon-quality-8k-active",iconQuality8KActive:"playkit-icon-quality-8k-active","icon-closed-captions-on":"playkit-icon-closed-captions-on",iconClosedCaptionsOn:"playkit-icon-closed-captions-on","icon-closed-captions-off":"playkit-icon-closed-captions-off",iconClosedCaptionsOff:"playkit-icon-closed-captions-off","label-badge":"playkit-label-badge",labelBadge:"playkit-label-badge",active:"playkit-active","dropdown-menu":"playkit-dropdown-menu",dropdownMenu:"playkit-dropdown-menu","dropdown-button":"playkit-dropdown-button",dropdownButton:"playkit-dropdown-button",openDropmenu:"playkit-openDropmenu",top:"playkit-top",bottom:"playkit-bottom",right:"playkit-right",left:"playkit-left","stick-bottom":"playkit-stick-bottom",stickBottom:"playkit-stick-bottom","dropdown-menu-item":"playkit-dropdown-menu-item",dropdownMenuItem:"playkit-dropdown-menu-item","menu-icon-container":"playkit-menu-icon-container",menuIconContainer:"playkit-menu-icon-container","control-button":"playkit-control-button",controlButton:"playkit-control-button","button-badge":"playkit-button-badge",buttonBadge:"playkit-button-badge","control-button-rounded":"playkit-control-button-rounded",controlButtonRounded:"playkit-control-button-rounded",touch:"playkit-touch","control-button-container":"playkit-control-button-container",controlButtonContainer:"playkit-control-button-container","state-idle":"playkit-state-idle",stateIdle:"playkit-state-idle","no-idle-control":"playkit-no-idle-control",noIdleControl:"playkit-no-idle-control",rotate:"playkit-rotate",spin:"playkit-spin","reverse-rotate":"playkit-reverse-rotate",reverseRotate:"playkit-reverse-rotate","reverse-spin":"playkit-reverse-spin",reverseSpin:"playkit-reverse-spin","upper-bar-icon":"playkit-upper-bar-icon",upperBarIcon:"playkit-upper-bar-icon",emptyUrl:"playkit-emptyUrl","player-gui":"playkit-player-gui",playerGui:"playkit-player-gui","overlay-active":"playkit-overlay-active",overlayActive:"playkit-overlay-active",nav:"playkit-nav","ad-break":"playkit-ad-break",adBreak:"playkit-ad-break","metadata-loaded":"playkit-metadata-loaded",metadataLoaded:"playkit-metadata-loaded",hover:"playkit-hover","state-paused":"playkit-state-paused",statePaused:"playkit-state-paused","pre-playback":"playkit-pre-playback",prePlayback:"playkit-pre-playback",casting:"playkit-casting","menu-active":"playkit-menu-active",menuActive:"playkit-menu-active",iOS:"playkit-iOS",iOs:"playkit-iOS",Safari:"playkit-Safari",safari:"playkit-Safari",fullscreen:"playkit-fullscreen","video-player":"playkit-video-player",videoPlayer:"playkit-video-player",overlay:"playkit-overlay",openOverlay:"playkit-openOverlay","overlay-contents":"playkit-overlay-contents",overlayContents:"playkit-overlay-contents",title:"playkit-title","close-overlay":"playkit-close-overlay",closeOverlay:"playkit-close-overlay","overlay-screen":"playkit-overlay-screen",overlayScreen:"playkit-overlay-screen","size-md":"playkit-size-md",sizeMd:"playkit-size-md","smart-container":"playkit-smart-container",smartContainer:"playkit-smart-container",openSmartContainer:"playkit-openSmartContainer",leaving:"playkit-leaving",closeSmartContainer:"playkit-closeSmartContainer","smart-container-item":"playkit-smart-container-item",smartContainerItem:"playkit-smart-container-item","select-menu-item":"playkit-select-menu-item",selectMenuItem:"playkit-select-menu-item","label-icon":"playkit-label-icon",labelIcon:"playkit-label-icon",Windows:"playkit-Windows",windows:"playkit-Windows","cvaa-overlay":"playkit-cvaa-overlay",cvaaOverlay:"playkit-cvaa-overlay",sample:"playkit-sample",custom:"playkit-custom","black-bg":"playkit-black-bg",blackBg:"playkit-black-bg","yellow-text":"playkit-yellow-text",yellowText:"playkit-yellow-text","active-tick":"playkit-active-tick",activeTick:"playkit-active-tick","button-save-cvaa":"playkit-button-save-cvaa",buttonSaveCvaa:"playkit-button-save-cvaa","custom-captions-applied":"playkit-custom-captions-applied",customCaptionsApplied:"playkit-custom-captions-applied","custom-caption-form":"playkit-custom-caption-form",customCaptionForm:"playkit-custom-caption-form",slider:"playkit-slider","preview-container":"playkit-preview-container",previewContainer:"playkit-preview-container","font-size":"playkit-font-size",fontSize:"playkit-font-size","font-alignment":"playkit-font-alignment",fontAlignment:"playkit-font-alignment","font-color":"playkit-font-color",fontColor:"playkit-font-color","font-family":"playkit-font-family",fontFamily:"playkit-font-family","font-style":"playkit-font-style",fontStyle:"playkit-font-style","font-opacity":"playkit-font-opacity",fontOpacity:"playkit-font-opacity","background-color":"playkit-background-color",backgroundColor:"playkit-background-color","background-opacity":"playkit-background-opacity",backgroundOpacity:"playkit-background-opacity","loading-backdrop":"playkit-loading-backdrop",loadingBackdrop:"playkit-loading-backdrop",show:"playkit-show","spinner-container":"playkit-spinner-container",spinnerContainer:"playkit-spinner-container","control-play-pause":"playkit-control-play-pause",controlPlayPause:"playkit-control-play-pause","is-playing":"playkit-is-playing",isPlaying:"playkit-is-playing","control-volume":"playkit-control-volume",controlVolume:"playkit-control-volume","volume-control":"playkit-volume-control",volumeControl:"playkit-volume-control","volume-control-bar":"playkit-volume-control-bar",volumeControlBar:"playkit-volume-control-bar","is-muted":"playkit-is-muted",isMuted:"playkit-is-muted","dragging-active":"playkit-dragging-active",draggingActive:"playkit-dragging-active",bar:"playkit-bar",progress:"playkit-progress","smart-container-open":"playkit-smart-container-open",smartContainerOpen:"playkit-smart-container-open","control-volume-bar":"playkit-control-volume-bar",controlVolumeBar:"playkit-control-volume-bar","size-ty":"playkit-size-ty",sizeTy:"playkit-size-ty","control-fullscreen":"playkit-control-fullscreen",controlFullscreen:"playkit-control-fullscreen","is-fullscreen":"playkit-is-fullscreen",isFullscreen:"playkit-is-fullscreen","seek-bar":"playkit-seek-bar",seekBar:"playkit-seek-bar","time-preview":"playkit-time-preview",timePreview:"playkit-time-preview","frame-preview":"playkit-frame-preview",framePreview:"playkit-frame-preview","hide-frame-preview":"playkit-hide-frame-preview",hideFramePreview:"playkit-hide-frame-preview","progress-bar":"playkit-progress-bar",progressBar:"playkit-progress-bar",scrubber:"playkit-scrubber","virtual-progress":"playkit-virtual-progress",virtualProgress:"playkit-virtual-progress",chapters:"playkit-chapters","virtual-progress-indicator":"playkit-virtual-progress-indicator",virtualProgressIndicator:"playkit-virtual-progress-indicator","non-sticky":"playkit-non-sticky",nonSticky:"playkit-non-sticky",live:"playkit-live",buffered:"playkit-buffered","frame-preview-img-container":"playkit-frame-preview-img-container",framePreviewImgContainer:"playkit-frame-preview-img-container","frame-preview-img":"playkit-frame-preview-img",framePreviewImg:"playkit-frame-preview-img","time-display":"playkit-time-display",timeDisplay:"playkit-time-display","video-playing-title":"playkit-video-playing-title",videoPlayingTitle:"playkit-video-playing-title","bottom-bar":"playkit-bottom-bar",bottomBar:"playkit-bottom-bar",hide:"playkit-hide","controls-container":"playkit-controls-container",controlsContainer:"playkit-controls-container","left-controls":"playkit-left-controls",leftControls:"playkit-left-controls","right-controls":"playkit-right-controls",rightControls:"playkit-right-controls","bottom-bar-area":"playkit-bottom-bar-area",bottomBarArea:"playkit-bottom-bar-area","playback-controls":"playkit-playback-controls",playbackControls:"playkit-playback-controls","top-bar":"playkit-top-bar",topBar:"playkit-top-bar","top-bar-area":"playkit-top-bar-area",topBarArea:"playkit-top-bar-area",disabled:"playkit-disabled","overlay-action":"playkit-overlay-action",overlayAction:"playkit-overlay-action",in:"playkit-in",overlayActionIconIn:"playkit-overlayActionIconIn","pre-playback-play-overlay":"playkit-pre-playback-play-overlay",prePlaybackPlayOverlay:"playkit-pre-playback-play-overlay","pre-playback-play-button":"playkit-pre-playback-play-button",prePlaybackPlayButton:"playkit-pre-playback-play-button","gui-area":"playkit-gui-area",guiArea:"playkit-gui-area","btn-skip-ad":"playkit-btn-skip-ad",btnSkipAd:"playkit-btn-skip-ad","skip-ad":"playkit-skip-ad",skipAd:"playkit-skip-ad","live-tag":"playkit-live-tag",liveTag:"playkit-live-tag","non-live-playhead":"playkit-non-live-playhead",nonLivePlayhead:"playkit-non-live-playhead","interactive-area":"playkit-interactive-area",interactiveArea:"playkit-interactive-area","unmute-button-container":"playkit-unmute-button-container",unmuteButtonContainer:"playkit-unmute-button-container","show-icon-only":"playkit-show-icon-only",showIconOnly:"playkit-show-icon-only","unmute-button":"playkit-unmute-button",unmuteButton:"playkit-unmute-button","has-top-bar":"playkit-has-top-bar",hasTopBar:"playkit-has-top-bar","unmute-icon-container":"playkit-unmute-icon-container",unmuteIconContainer:"playkit-unmute-icon-container","error-overlay":"playkit-error-overlay",errorOverlay:"playkit-error-overlay","custom-error-slate":"playkit-custom-error-slate",customErrorSlate:"playkit-custom-error-slate","copy-url-row":"playkit-copy-url-row",copyUrlRow:"playkit-copy-url-row",headline:"playkit-headline","error-title":"playkit-error-title",errorTitle:"playkit-error-title","error-message":"playkit-error-message",errorMessage:"playkit-error-message","error-session":"playkit-error-session",errorSession:"playkit-error-session","retry-btn":"playkit-retry-btn",retryBtn:"playkit-retry-btn","error-text":"playkit-error-text",errorText:"playkit-error-text","link-options-container":"playkit-link-options-container",linkOptionsContainer:"playkit-link-options-container","input-copy-url":"playkit-input-copy-url",inputCopyUrl:"playkit-input-copy-url","btn-copy-url":"playkit-btn-copy-url",btnCopyUrl:"playkit-btn-copy-url",handle:"playkit-handle","learn-more":"playkit-learn-more",learnMore:"playkit-learn-more",watermark:"playkit-watermark","hide-watermark":"playkit-hide-watermark",hideWatermark:"playkit-hide-watermark","control-vr-stereo":"playkit-control-vr-stereo",controlVrStereo:"playkit-control-vr-stereo","vr-stereo-mode":"playkit-vr-stereo-mode",vrStereoMode:"playkit-vr-stereo-mode","control-closed-captions":"playkit-control-closed-captions",controlClosedCaptions:"playkit-control-closed-captions","cc-on":"playkit-cc-on",ccOn:"playkit-cc-on","cast-button":"playkit-cast-button",castButton:"playkit-cast-button","cast-button-active":"playkit-cast-button-active",castButtonActive:"playkit-cast-button-active","cast-overlay":"playkit-cast-overlay",castOverlay:"playkit-cast-overlay","cast-poster":"playkit-cast-poster",castPoster:"playkit-cast-poster","has-poster":"playkit-has-poster",hasPoster:"playkit-has-poster","cast-black-cover":"playkit-cast-black-cover",castBlackCover:"playkit-cast-black-cover","cast-box":"playkit-cast-box",castBox:"playkit-cast-box","cast-icon":"playkit-cast-icon",castIcon:"playkit-cast-icon","cast-connecting-spinner":"playkit-cast-connecting-spinner",castConnectingSpinner:"playkit-cast-connecting-spinner","cast-text":"playkit-cast-text",castText:"playkit-cast-text","cast-status":"playkit-cast-status",castStatus:"playkit-cast-status","cast-device":"playkit-cast-device",castDevice:"playkit-cast-device","cast-on-tv-button-container":"playkit-cast-on-tv-button-container",castOnTvButtonContainer:"playkit-cast-on-tv-button-container","show-cast-on-tv":"playkit-show-cast-on-tv",showCastOnTv:"playkit-show-cast-on-tv",castOnTVAnimation:"playkit-castOnTVAnimation",castOnTvAnimation:"playkit-castOnTVAnimation","cast-on-tv-button":"playkit-cast-on-tv-button",castOnTvButton:"playkit-cast-on-tv-button","cast-on-tv-icon-container":"playkit-cast-on-tv-icon-container",castOnTvIconContainer:"playkit-cast-on-tv-icon-container","control-playlist-button":"playkit-control-playlist-button",controlPlaylistButton:"playkit-control-playlist-button","poster-preview":"playkit-poster-preview",posterPreview:"playkit-poster-preview","poster-preview-img":"playkit-poster-preview-img",posterPreviewImg:"playkit-poster-preview-img","poster-preview-text":"playkit-poster-preview-text",posterPreviewText:"playkit-poster-preview-text","poster-preview-text-title":"playkit-poster-preview-text-title",posterPreviewTextTitle:"playkit-poster-preview-text-title","poster-preview-text-name":"playkit-poster-preview-text-name",posterPreviewTextName:"playkit-poster-preview-text-name","is-in-picture-in-picture":"playkit-is-in-picture-in-picture",isInPictureInPicture:"playkit-is-in-picture-in-picture","center-playback-controls":"playkit-center-playback-controls",centerPlaybackControls:"playkit-center-playback-controls","playlist-countdown":"playkit-playlist-countdown",playlistCountdown:"playkit-playlist-countdown",slideIn:"playkit-slideIn",hidden:"playkit-hidden","playlist-countdown-content-placeholder":"playkit-playlist-countdown-content-placeholder",playlistCountdownContentPlaceholder:"playkit-playlist-countdown-content-placeholder","playlist-countdown-content-background":"playkit-playlist-countdown-content-background",playlistCountdownContentBackground:"playkit-playlist-countdown-content-background","playlist-countdown-content":"playkit-playlist-countdown-content",playlistCountdownContent:"playkit-playlist-countdown-content",canceled:"playkit-canceled","playlist-countdown-poster":"playkit-playlist-countdown-poster",playlistCountdownPoster:"playkit-playlist-countdown-poster","playlist-countdown-text":"playkit-playlist-countdown-text",playlistCountdownText:"playkit-playlist-countdown-text","playlist-countdown-text-title":"playkit-playlist-countdown-text-title",playlistCountdownTextTitle:"playkit-playlist-countdown-text-title","playlist-countdown-time-left":"playkit-playlist-countdown-time-left",playlistCountdownTimeLeft:"playkit-playlist-countdown-time-left","playlist-countdown-text-name":"playkit-playlist-countdown-text-name",playlistCountdownTextName:"playkit-playlist-countdown-text-name","playlist-countdown-cancel":"playkit-playlist-countdown-cancel",playlistCountdownCancel:"playkit-playlist-countdown-cancel","playlist-next-screen-overlay":"playkit-playlist-next-screen-overlay",playlistNextScreenOverlay:"playkit-playlist-next-screen-overlay","playlist-next-screen-content":"playkit-playlist-next-screen-content",playlistNextScreenContent:"playkit-playlist-next-screen-content","playlist-next-screen-text":"playkit-playlist-next-screen-text",playlistNextScreenText:"playkit-playlist-next-screen-text","playlist-next-screen-text-title":"playkit-playlist-next-screen-text-title",playlistNextScreenTextTitle:"playkit-playlist-next-screen-text-title","playlist-next-screen-text-name":"playkit-playlist-next-screen-text-name",playlistNextScreenTextName:"playkit-playlist-next-screen-text-name","playlist-next-screen-poster-placeholder":"playkit-playlist-next-screen-poster-placeholder",playlistNextScreenPosterPlaceholder:"playkit-playlist-next-screen-poster-placeholder","playlist-next-screen-poster-aspect-ratio":"playkit-playlist-next-screen-poster-aspect-ratio",playlistNextScreenPosterAspectRatio:"playkit-playlist-next-screen-poster-aspect-ratio","playlist-next-screen-poster":"playkit-playlist-next-screen-poster",playlistNextScreenPoster:"playkit-playlist-next-screen-poster","playlist-next-screen-poster-img":"playkit-playlist-next-screen-poster-img",playlistNextScreenPosterImg:"playkit-playlist-next-screen-poster-img","size-lg":"playkit-size-lg",sizeLg:"playkit-size-lg","picture-in-picture-overlay":"playkit-picture-in-picture-overlay",pictureInPictureOverlay:"playkit-picture-in-picture-overlay","picture-in-picture-poster":"playkit-picture-in-picture-poster",pictureInPicturePoster:"playkit-picture-in-picture-poster","dark-layer":"playkit-dark-layer",darkLayer:"playkit-dark-layer","picture-in-picture-control":"playkit-picture-in-picture-control",pictureInPictureControl:"playkit-picture-in-picture-control","picture-in-picture-text":"playkit-picture-in-picture-text",pictureInPictureText:"playkit-picture-in-picture-text","picture-in-picture-button":"playkit-picture-in-picture-button",pictureInPictureButton:"playkit-picture-in-picture-button","icon-copy":"playkit-icon-copy",iconCopy:"playkit-icon-copy",copied:"playkit-copied",IE:"playkit-IE",ie:"playkit-IE",tooltip:"playkit-tooltip","tooltip-label":"playkit-tooltip-label",tooltipLabel:"playkit-tooltip-label","tooltip-top":"playkit-tooltip-top",tooltipTop:"playkit-tooltip-top","tooltip-top-left":"playkit-tooltip-top-left",tooltipTopLeft:"playkit-tooltip-top-left","tooltip-top-right":"playkit-tooltip-top-right",tooltipTopRight:"playkit-tooltip-top-right","tooltip-bottom":"playkit-tooltip-bottom",tooltipBottom:"playkit-tooltip-bottom","tooltip-bottom-right":"playkit-tooltip-bottom-right",tooltipBottomRight:"playkit-tooltip-bottom-right","tooltip-bottom-left":"playkit-tooltip-bottom-left",tooltipBottomLeft:"playkit-tooltip-bottom-left","tooltip-left":"playkit-tooltip-left",tooltipLeft:"playkit-tooltip-left","tooltip-right":"playkit-tooltip-right",tooltipRight:"playkit-tooltip-right","side-panel":"playkit-side-panel",sidePanel:"playkit-side-panel","small-size":"playkit-small-size",smallSize:"playkit-small-size","vertical-side-panel":"playkit-vertical-side-panel",verticalSidePanel:"playkit-vertical-side-panel","horizontal-side-panel":"playkit-horizontal-side-panel",horizontalSidePanel:"playkit-horizontal-side-panel","side-panel-content":"playkit-side-panel-content",sidePanelContent:"playkit-side-panel-content","video-area":"playkit-video-area",videoArea:"playkit-video-area",spinner:"playkit-spinner","kaltura-spinner":"playkit-kaltura-spinner",kalturaSpinner:"playkit-kaltura-spinner",switch:"playkit-switch","toggle-input":"playkit-toggle-input",toggleInput:"playkit-toggle-input","audio-entry-backdrop":"playkit-audio-entry-backdrop",audioEntryBackdrop:"playkit-audio-entry-backdrop","audio-entry-details":"playkit-audio-entry-details",audioEntryDetails:"playkit-audio-entry-details","audio-entry-l":"playkit-audio-entry-l",audioEntryL:"playkit-audio-entry-l","audio-entry-m":"playkit-audio-entry-m",audioEntryM:"playkit-audio-entry-m","audio-entry-t":"playkit-audio-entry-t",audioEntryT:"playkit-audio-entry-t","audio-entry-description":"playkit-audio-entry-description",audioEntryDescription:"playkit-audio-entry-description","audio-entry-title":"playkit-audio-entry-title",audioEntryTitle:"playkit-audio-entry-title","audio-entry-title-trimmed":"playkit-audio-entry-title-trimmed",audioEntryTitleTrimmed:"playkit-audio-entry-title-trimmed","audio-entry-expanded":"playkit-audio-entry-expanded",audioEntryExpanded:"playkit-audio-entry-expanded","expandable-text":"playkit-expandable-text",expandableText:"playkit-expandable-text","more-button-text":"playkit-more-button-text",moreButtonText:"playkit-more-button-text",scrollable:"playkit-scrollable","items-container":"playkit-items-container",itemsContainer:"playkit-items-container",horizontal:"playkit-horizontal",vertical:"playkit-vertical",scrolling:"playkit-scrolling"},e.exports=t},645:function(e){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=function(e,t){var n,r,i,a=e[1]||"",o=e[3];if(!o)return a;if(t&&"function"==typeof btoa){var s=(n=o,r=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),i="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(r),"/*# ".concat(i," */")),l=o.sources.map((function(e){return"/*# sourceURL=".concat(o.sourceRoot||"").concat(e," */")}));return[a].concat(l).concat([s]).join("\n")}return[a].join("\n")}(t,e);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n})).join("")},t.i=function(e,n,r){"string"==typeof e&&(e=[[null,e,""]]);var i={};if(r)for(var a=0;a<this.length;a++){var o=this[a][0];null!=o&&(i[o]=!0)}for(var s=0;s<e.length;s++){var l=[].concat(e[s]);r&&i[l[0]]||(n&&(l[2]?l[2]="".concat(n," and ").concat(l[2]):l[2]=n),t.push(l))}},t}},905:function(e){e.exports=function(e,t,n,r,i){for(t=t.split?t.split("."):t,r=0;r<t.length;r++)e=e?e[t[r]]:i;return e===i?n:e}},545:function(e,t,n){"use strict";var r=n(864),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},a={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},o={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function l(e){return r.isMemo(e)?o:s[e.$$typeof]||i}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=o;var u=Object.defineProperty,c=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,p=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,h=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(h){var i=f(n);i&&i!==h&&e(t,i,r)}var o=c(n);d&&(o=o.concat(d(n)));for(var s=l(t),y=l(n),g=0;g<o.length;++g){var v=o[g];if(!(a[v]||r&&r[v]||y&&y[v]||s&&s[v])){var m=p(n,v);try{u(t,v,m)}catch(e){}}}}return t}},703:function(e,t,n){"use strict";var r=n(414);function i(){}function a(){}a.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,a,o){if(o!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:i};return n.PropTypes=n,n}},697:function(e,t,n){e.exports=n(703)()},414:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},921:function(e,t){"use strict";var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,i=n?Symbol.for("react.portal"):60106,a=n?Symbol.for("react.fragment"):60107,o=n?Symbol.for("react.strict_mode"):60108,s=n?Symbol.for("react.profiler"):60114,l=n?Symbol.for("react.provider"):60109,u=n?Symbol.for("react.context"):60110,c=n?Symbol.for("react.async_mode"):60111,d=n?Symbol.for("react.concurrent_mode"):60111,p=n?Symbol.for("react.forward_ref"):60112,f=n?Symbol.for("react.suspense"):60113,h=n?Symbol.for("react.suspense_list"):60120,y=n?Symbol.for("react.memo"):60115,g=n?Symbol.for("react.lazy"):60116,v=n?Symbol.for("react.block"):60121,m=n?Symbol.for("react.fundamental"):60117,b=n?Symbol.for("react.responder"):60118,k=n?Symbol.for("react.scope"):60119;function E(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case c:case d:case a:case s:case o:case f:return e;default:switch(e=e&&e.$$typeof){case u:case p:case g:case y:case l:return e;default:return t}}case i:return t}}}function _(e){return E(e)===d}t.AsyncMode=c,t.ConcurrentMode=d,t.ContextConsumer=u,t.ContextProvider=l,t.Element=r,t.ForwardRef=p,t.Fragment=a,t.Lazy=g,t.Memo=y,t.Portal=i,t.Profiler=s,t.StrictMode=o,t.Suspense=f,t.isAsyncMode=function(e){return _(e)||E(e)===c},t.isConcurrentMode=_,t.isContextConsumer=function(e){return E(e)===u},t.isContextProvider=function(e){return E(e)===l},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return E(e)===p},t.isFragment=function(e){return E(e)===a},t.isLazy=function(e){return E(e)===g},t.isMemo=function(e){return E(e)===y},t.isPortal=function(e){return E(e)===i},t.isProfiler=function(e){return E(e)===s},t.isStrictMode=function(e){return E(e)===o},t.isSuspense=function(e){return E(e)===f},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===a||e===d||e===s||e===o||e===f||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===g||e.$$typeof===y||e.$$typeof===l||e.$$typeof===u||e.$$typeof===p||e.$$typeof===m||e.$$typeof===b||e.$$typeof===k||e.$$typeof===v)},t.typeOf=E},864:function(e,t,n){"use strict";e.exports=n(921)},25:function(e,t,n){var r=n(994),i=n(944);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.id,i,""]]),r(i,{attributes:{id:"@playkit-js/playkit-js-ui"},insert:"head",singleton:!1}),e.exports=i.locals||{}},994:function(e,t,n){"use strict";var r,i=function(){var e={};return function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}e[t]=n}return e[t]}}(),a=[];function o(e){for(var t=-1,n=0;n<a.length;n++)if(a[n].identifier===e){t=n;break}return t}function s(e,t){for(var n={},r=[],i=0;i<e.length;i++){var s=e[i],l=t.base?s[0]+t.base:s[0],u=n[l]||0,c="".concat(l," ").concat(u);n[l]=u+1;var d=o(c),p={css:s[1],media:s[2],sourceMap:s[3]};-1!==d?(a[d].references++,a[d].updater(p)):a.push({identifier:c,updater:y(p,t),references:1}),r.push(c)}return r}function l(e){var t=document.createElement("style"),r=e.attributes||{};if(void 0===r.nonce){var a=n.nc;a&&(r.nonce=a)}if(Object.keys(r).forEach((function(e){t.setAttribute(e,r[e])})),"function"==typeof e.insert)e.insert(t);else{var o=i(e.insert||"head");if(!o)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");o.appendChild(t)}return t}var u,c=(u=[],function(e,t){return u[e]=t,u.filter(Boolean).join("\n")});function d(e,t,n,r){var i=n?"":r.media?"@media ".concat(r.media," {").concat(r.css,"}"):r.css;if(e.styleSheet)e.styleSheet.cssText=c(t,i);else{var a=document.createTextNode(i),o=e.childNodes;o[t]&&e.removeChild(o[t]),o.length?e.insertBefore(a,o[t]):e.appendChild(a)}}function p(e,t,n){var r=n.css,i=n.media,a=n.sourceMap;if(i?e.setAttribute("media",i):e.removeAttribute("media"),a&&btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(a))))," */")),e.styleSheet)e.styleSheet.cssText=r;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(r))}}var f=null,h=0;function y(e,t){var n,r,i;if(t.singleton){var a=h++;n=f||(f=l(t)),r=d.bind(null,n,a,!1),i=d.bind(null,n,a,!0)}else n=l(t),r=p.bind(null,n,t),i=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(n)};return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else i()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=(void 0===r&&(r=Boolean(window&&document&&document.all&&!window.atob)),r));var n=s(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var r=0;r<n.length;r++){var i=o(n[r]);a[i].references--}for(var l=s(e,t),u=0;u<n.length;u++){var c=o(n[u]);0===a[c].references&&(a[c].updater(),a.splice(c,1))}n=l}}}},121:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}}),e=n.hmd(e);var r=function(e){var t,n=e.Symbol;return"function"==typeof n?n.observable?t=n.observable:(t=n("observable"),n.observable=t):t="@@observable",t}("undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==n.g?n.g:e)},230:function(e){"use strict";e.exports=n}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var a=t[n]={id:n,loaded:!1,exports:{}};return e[n].call(a.exports,a,a.exports,r),a.loaded=!0,a.exports}r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,{a:t}),t},r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.hmd=function(e){return(e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set:function(){throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nc=void 0;var i={};return function(){"use strict";r.r(i),r.d(i,{Components:function(){return E},Event:function(){return o},EventType:function(){return ur},NAME:function(){return ih},Presets:function(){return _},Reducers:function(){return T},ReservedPresetAreas:function(){return xr},ReservedPresetNames:function(){return Cr},SidePanelModes:function(){return wr},SidePanelPositions:function(){return Sr},UIEventType:function(){return ur},UIManager:function(){return nh},Utils:function(){return l},VERSION:function(){return rh},components:function(){return E},createPortal:function(){return st},getOverlayPortalElement:function(){return js},h:function(){return W},preact:function(){return e},preactHooks:function(){return t},preacti18n:function(){return a},presets:function(){return _},reducers:function(){return T},redux:function(){return n},style:function(){return ah},utils:function(){return l}});var e={};r.r(e),r.d(e,{Component:function(){return X},Fragment:function(){return q},__u:function(){return pe},cloneElement:function(){return ge},createContext:function(){return ve},createElement:function(){return W},createRef:function(){return Z},h:function(){return W},hydrate:function(){return ye},isValidElement:function(){return S},options:function(){return A},render:function(){return he},toChildArray:function(){return ne}});var t={};r.r(t),r.d(t,{useCallback:function(){return Me},useContext:function(){return Ne},useDebugValue:function(){return Ue},useEffect:function(){return Re},useErrorBoundary:function(){return Be},useImperativeHandle:function(){return Oe},useLayoutEffect:function(){return Ie},useMemo:function(){return Le},useReducer:function(){return Pe},useRef:function(){return De},useState:function(){return xe}});var n={};r.r(n),r.d(n,{Provider:function(){return _t},ReactReduxContext:function(){return vt},batch:function(){return yt},connect:function(){return un},connectAdvanced:function(){return Nt},createDispatchHook:function(){return fn},createSelectorHook:function(){return gn},createStoreHook:function(){return dn},shallowEqual:function(){return Bt},useDispatch:function(){return hn},useSelector:function(){return vn},useStore:function(){return pn}});var a={};r.r(a),r.d(a,{IntlProvider:function(){return An},Localizer:function(){return Ln},MarkupText:function(){return Mn},Text:function(){return Dn},default:function(){return Bn},intl:function(){return Sn},withText:function(){return Un}});var o={};r.r(o),r.d(o,{EventType:function(){return ur},withEventManager:function(){return sr}});var s={};r.r(s),r.d(s,{ReservedPresetAreas:function(){return xr},ReservedPresetNames:function(){return Cr},SidePanelModes:function(){return wr},SidePanelOrientation:function(){return Ar},SidePanelPositions:function(){return Sr},actions:function(){return Or},default:function(){return Dr},initialState:function(){return Ir},types:function(){return Tr}});var l={};r.r(l),r.d(l,{KeyCode:function(){return dr},KeyMap:function(){return cr},bindActions:function(){return Lr},focusElement:function(){return Mr},formatOnlyNumbersInput:function(){return Fr},getLogger:function(){return qn},toHHMMSS:function(){return Ur},toSecondsFromHHMMSS:function(){return Br},withKeyboardA11y:function(){return Nr}});var u={};r.r(u),r.d(u,{actions:function(){return qr},default:function(){return Zr},initialState:function(){return Yr},types:function(){return Wr}});var c={};r.r(c),r.d(c,{actions:function(){return ri},default:function(){return ni},initialState:function(){return ti},types:function(){return ei}});var d={};r.r(d),r.d(d,{actions:function(){return ra},default:function(){return na},initialState:function(){return ta},types:function(){return ea}});var p={};r.r(p),r.d(p,{actions:function(){return ua},default:function(){return la},initialState:function(){return sa},types:function(){return oa}});var f={};r.r(f),r.d(f,{actions:function(){return ga},default:function(){return ya},initialState:function(){return ha},types:function(){return fa}});var h={};r.r(h),r.d(h,{actions:function(){return _a},default:function(){return Ea},initialState:function(){return ka},types:function(){return ba}});var y={};r.r(y),r.d(y,{actions:function(){return xa},default:function(){return Ca},initialState:function(){return wa},types:function(){return Sa}});var g={};r.r(g),r.d(g,{actions:function(){return La},default:function(){return Oa},initialState:function(){return Da},types:function(){return Ia}});var v={};r.r(v),r.d(v,{actions:function(){return ja},default:function(){return Fa},initialState:function(){return Ba},types:function(){return Ua}});var m={};r.r(m),r.d(m,{actions:function(){return Wa},default:function(){return za},initialState:function(){return Ka},types:function(){return Ga}});var b={};r.r(b),r.d(b,{actions:function(){return io},default:function(){return ro},initialState:function(){return no},types:function(){return to}});var k={};r.r(k),r.d(k,{isPlayingAdOrPlayback:function(){return So}});var E={};r.r(E),r.d(E,{AdLearnMore:function(){return Pl},AdNotice:function(){return Dl},AdSkip:function(){return Il},AdvancedAudioDesc:function(){return Lp},AdvancedAudioDescToggle:function(){return Rp},AudioMenu:function(){return rp},BadgeType:function(){return Eo},BaseComponent:function(){return zl},BottomBar:function(){return hl},Button:function(){return No},ButtonControl:function(){return Xo},CVAAOverlay:function(){return Tu},CaptionsControl:function(){return tf},CaptionsMenu:function(){return pp},Cast:function(){return fo},CastAfterPlay:function(){return Td},CastBeforePlay:function(){return kd},CastControl:function(){return fo},CastOverlay:function(){return hd},ClosedCaptions:function(){return Al},ClosedCaptionsControl:function(){return Al},CopyButton:function(){return Du},DropDown:function(){return ru},EngineConnector:function(){return Pu},ErrorOverlay:function(){return Gu},EventDispatcherProvider:function(){return yi},ExpandableText:function(){return Fp},Forward:function(){return _s},ForwardControl:function(){return _s},Fullscreen:function(){return Jo},FullscreenControl:function(){return Jo},GuiArea:function(){return Wp},HeightResolution:function(){return bp},Icon:function(){return To},IconState:function(){return _o},IconType:function(){return ko},InteractiveArea:function(){return Yp},Keyboard:function(){return Do},KeyboardControl:function(){return Do},KeyboardEventProvider:function(){return Lo},LiveTag:function(){return zu},Loading:function(){return tc},Logo:function(){return ld},Menu:function(){return eu},Overlay:function(){return Zl},OverlayAction:function(){return cc},OverlayPortal:function(){return Ls},PLAYER_BREAK_POINTS:function(){return Li},PLAYER_SIZE:function(){return Oi},PictureInPicture:function(){return Vd},PlayPause:function(){return rs},PlayPauseControl:function(){return rs},PlaybackControls:function(){return Kd},PlayerArea:function(){return br},PlayerProvider:function(){return ii},PlaylistButton:function(){return Pd},PlaylistNextScreen:function(){return Ud},PrePlaybackPlayOverlay:function(){return gc},PrevNext:function(){return xd},ProgressIndicator:function(){return Ps},QualityMenu:function(){return Ap},Remove:function(){return fr},Rewind:function(){return ms},RewindControl:function(){return ms},Scrollable:function(){return Kp},SeekBar:function(){return Os},SeekBarControl:function(){return Os},SeekBarLivePlaybackContainer:function(){return _c},SeekBarPlaybackContainer:function(){return Cc},SeekBarPreview:function(){return As},Settings:function(){return Xs},SettingsControl:function(){return Xs},Shell:function(){return Ni},SidePanel:function(){return Zp},Slider:function(){return au},SmartContainer:function(){return Pc},SmartContainerItem:function(){return Rc},SpeedMenu:function(){return mp},TimeDisplay:function(){return Dc},TimeDisplayAdsContainer:function(){return Mc},TimeDisplayPlaybackContainer:function(){return Bc},ToggleSwitch:function(){return qd},ToolTipType:function(){return lo},Tooltip:function(){return uo},TopBar:function(){return Vc},UnmuteIndication:function(){return Wc},VideoArea:function(){return zp},VideoPlayer:function(){return td},Volume:function(){return el},VolumeControl:function(){return el},VrStereo:function(){return ml},VrStereoControl:function(){return ml},Watermark:function(){return rd},getLabelBadgeType:function(){return kp},withEventDispatcher:function(){return Si},withKeyboardEvent:function(){return Mo},withLogger:function(){return pr},withPlayer:function(){return ai},withPlayerPreset:function(){return Xi}});var _={};r.r(_),r.d(_,{adsUI:function(){return Pf},docUI:function(){return Vf},errorUI:function(){return If},idleUI:function(){return pf},imgUI:function(){return Bf},liveUI:function(){return Mf},playbackUI:function(){return Sf}});var T={};r.r(T),r.d(T,{bottomBar:function(){return b},config:function(){return u},cvaa:function(){return h},engine:function(){return c},getters:function(){return k},loading:function(){return f},overlay:function(){return m},overlayAction:function(){return g},playlist:function(){return v},seekbar:function(){return d},setting:function(){return y},shell:function(){return s},volume:function(){return p}});var A,S,w,C,x,P,R,I=r(38),D=r.n(I),O=r(319),L=r.n(O),M=r(575),N=r.n(M),U=r(913),B=r.n(U),F=r(713),j=r.n(F),H={},V=[],G=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function K(e,t){for(var n in t)e[n]=t[n];return e}function z(e){var t=e.parentNode;t&&t.removeChild(e)}function W(e,t,n){var r,i=arguments,a={};for(r in t)"key"!==r&&"ref"!==r&&(a[r]=t[r]);if(arguments.length>3)for(n=[n],r=3;r<arguments.length;r++)n.push(i[r]);if(null!=n&&(a.children=n),"function"==typeof e&&null!=e.defaultProps)for(r in e.defaultProps)void 0===a[r]&&(a[r]=e.defaultProps[r]);return Y(e,a,t&&t.key,t&&t.ref,null)}function Y(e,t,n,r,i){var a={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:i};return null==i&&(a.__v=a),A.vnode&&A.vnode(a),a}function Z(){return{current:null}}function q(e){return e.children}function X(e,t){this.props=e,this.context=t}function Q(e,t){if(null==t)return e.__?Q(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?Q(e):null}function $(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return $(e)}}function J(e){(!e.__d&&(e.__d=!0)&&w.push(e)&&!ee.__r++||x!==A.debounceRendering)&&((x=A.debounceRendering)||C)(ee)}function ee(){for(var e;ee.__r=w.length;)e=w.sort((function(e,t){return e.__v.__b-t.__v.__b})),w=[],e.some((function(e){var t,n,r,i,a,o,s;e.__d&&(o=(a=(t=e).__v).__e,(s=t.__P)&&(n=[],(r=K({},a)).__v=r,i=le(s,a,r,t.__n,void 0!==s.ownerSVGElement,null,n,null==o?Q(a):o),ue(n,a),i!=o&&$(a)))}))}function te(e,t,n,r,i,a,o,s,l,u){var c,d,p,f,h,y,g,v=r&&r.__k||V,m=v.length;for(l==H&&(l=null!=o?o[0]:m?Q(r,0):null),n.__k=[],c=0;c<t.length;c++)if(null!=(f=n.__k[c]=null==(f=t[c])||"boolean"==typeof f?null:"string"==typeof f||"number"==typeof f?Y(null,f,null,null,f):Array.isArray(f)?Y(q,{children:f},null,null,null):null!=f.__e||null!=f.__c?Y(f.type,f.props,f.key,null,f.__v):f)){if(f.__=n,f.__b=n.__b+1,null===(p=v[c])||p&&f.key==p.key&&f.type===p.type)v[c]=void 0;else for(d=0;d<m;d++){if((p=v[d])&&f.key==p.key&&f.type===p.type){v[d]=void 0;break}p=null}h=le(e,f,p=p||H,i,a,o,s,l,u),(d=f.ref)&&p.ref!=d&&(g||(g=[]),p.ref&&g.push(p.ref,null,f),g.push(d,f.__c||h,f)),null!=h?(null==y&&(y=h),l=re(e,f,p,v,o,h,l),"option"==n.type?e.value="":"function"==typeof n.type&&(n.__d=l)):l&&p.__e==l&&l.parentNode!=e&&(l=Q(p))}if(n.__e=y,null!=o&&"function"!=typeof n.type)for(c=o.length;c--;)null!=o[c]&&z(o[c]);for(c=m;c--;)null!=v[c]&&pe(v[c],v[c]);if(g)for(c=0;c<g.length;c++)de(g[c],g[++c],g[++c])}function ne(e){return null==e||"boolean"==typeof e?[]:Array.isArray(e)?V.concat.apply([],e.map(ne)):[e]}function re(e,t,n,r,i,a,o){var s,l,u;if(void 0!==t.__d)s=t.__d,t.__d=void 0;else if(i==n||a!=o||null==a.parentNode)e:if(null==o||o.parentNode!==e)e.appendChild(a),s=null;else{for(l=o,u=0;(l=l.nextSibling)&&u<r.length;u+=2)if(l==a)break e;e.insertBefore(a,o),s=o}return void 0!==s?s:a.nextSibling}function ie(e,t,n){"-"===t[0]?e.setProperty(t,n):e[t]="number"==typeof n&&!1===G.test(t)?n+"px":null==n?"":n}function ae(e,t,n,r,i){var a,o,s,l,u;if(i?"className"===t&&(t="class"):"class"===t&&(t="className"),"style"===t)if(a=e.style,"string"==typeof n)a.cssText=n;else{if("string"==typeof r&&(a.cssText="",r=null),r)for(l in r)n&&l in n||ie(a,l,"");if(n)for(u in n)r&&n[u]===r[u]||ie(a,u,n[u])}else"o"===t[0]&&"n"===t[1]?(o=t!==(t=t.replace(/Capture$/,"")),s=t.toLowerCase(),t=(s in e?s:t).slice(2),n?(r||e.addEventListener(t,oe,o),(e.l||(e.l={}))[t]=n):e.removeEventListener(t,oe,o)):"list"!==t&&"tagName"!==t&&"form"!==t&&"type"!==t&&"size"!==t&&!i&&t in e?e[t]=null==n?"":n:"function"!=typeof n&&"dangerouslySetInnerHTML"!==t&&(t!==(t=t.replace(/^xlink:?/,""))?null==n||!1===n?e.removeAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase()):e.setAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase(),n):null==n||!1===n&&!/^ar/.test(t)?e.removeAttribute(t):e.setAttribute(t,n))}function oe(e){this.l[e.type](A.event?A.event(e):e)}function se(e,t,n){var r,i;for(r=0;r<e.__k.length;r++)(i=e.__k[r])&&(i.__=e,i.__e&&("function"==typeof i.type&&i.__k.length>1&&se(i,t,n),t=re(n,i,i,e.__k,null,i.__e,t),"function"==typeof e.type&&(e.__d=t)))}function le(e,t,n,r,i,a,o,s,l){var u,c,d,p,f,h,y,g,v,m,b,k=t.type;if(void 0!==t.constructor)return null;(u=A.__b)&&u(t);try{e:if("function"==typeof k){if(g=t.props,v=(u=k.contextType)&&r[u.__c],m=u?v?v.props.value:u.__:r,n.__c?y=(c=t.__c=n.__c).__=c.__E:("prototype"in k&&k.prototype.render?t.__c=c=new k(g,m):(t.__c=c=new X(g,m),c.constructor=k,c.render=fe),v&&v.sub(c),c.props=g,c.state||(c.state={}),c.context=m,c.__n=r,d=c.__d=!0,c.__h=[]),null==c.__s&&(c.__s=c.state),null!=k.getDerivedStateFromProps&&(c.__s==c.state&&(c.__s=K({},c.__s)),K(c.__s,k.getDerivedStateFromProps(g,c.__s))),p=c.props,f=c.state,d)null==k.getDerivedStateFromProps&&null!=c.componentWillMount&&c.componentWillMount(),null!=c.componentDidMount&&c.__h.push(c.componentDidMount);else{if(null==k.getDerivedStateFromProps&&g!==p&&null!=c.componentWillReceiveProps&&c.componentWillReceiveProps(g,m),!c.__e&&null!=c.shouldComponentUpdate&&!1===c.shouldComponentUpdate(g,c.__s,m)||t.__v===n.__v){c.props=g,c.state=c.__s,t.__v!==n.__v&&(c.__d=!1),c.__v=t,t.__e=n.__e,t.__k=n.__k,c.__h.length&&o.push(c),se(t,s,e);break e}null!=c.componentWillUpdate&&c.componentWillUpdate(g,c.__s,m),null!=c.componentDidUpdate&&c.__h.push((function(){c.componentDidUpdate(p,f,h)}))}c.context=m,c.props=g,c.state=c.__s,(u=A.__r)&&u(t),c.__d=!1,c.__v=t,c.__P=e,u=c.render(c.props,c.state,c.context),c.state=c.__s,null!=c.getChildContext&&(r=K(K({},r),c.getChildContext())),d||null==c.getSnapshotBeforeUpdate||(h=c.getSnapshotBeforeUpdate(p,f)),b=null!=u&&u.type==q&&null==u.key?u.props.children:u,te(e,Array.isArray(b)?b:[b],t,n,r,i,a,o,s,l),c.base=t.__e,c.__h.length&&o.push(c),y&&(c.__E=c.__=null),c.__e=!1}else null==a&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=ce(n.__e,t,n,r,i,a,o,l);(u=A.diffed)&&u(t)}catch(e){t.__v=null,A.__e(e,t,n)}return t.__e}function ue(e,t){A.__c&&A.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){A.__e(e,t.__v)}}))}function ce(e,t,n,r,i,a,o,s){var l,u,c,d,p,f=n.props,h=t.props;if(i="svg"===t.type||i,null!=a)for(l=0;l<a.length;l++)if(null!=(u=a[l])&&((null===t.type?3===u.nodeType:u.localName===t.type)||e==u)){e=u,a[l]=null;break}if(null==e){if(null===t.type)return document.createTextNode(h);e=i?document.createElementNS("http://www.w3.org/2000/svg",t.type):document.createElement(t.type,h.is&&{is:h.is}),a=null,s=!1}if(null===t.type)f!==h&&e.data!=h&&(e.data=h);else{if(null!=a&&(a=V.slice.call(e.childNodes)),c=(f=n.props||H).dangerouslySetInnerHTML,d=h.dangerouslySetInnerHTML,!s){if(null!=a)for(f={},p=0;p<e.attributes.length;p++)f[e.attributes[p].name]=e.attributes[p].value;(d||c)&&(d&&c&&d.__html==c.__html||(e.innerHTML=d&&d.__html||""))}(function(e,t,n,r,i){var a;for(a in n)"children"===a||"key"===a||a in t||ae(e,a,null,n[a],r);for(a in t)i&&"function"!=typeof t[a]||"children"===a||"key"===a||"value"===a||"checked"===a||n[a]===t[a]||ae(e,a,t[a],n[a],r)})(e,h,f,i,s),d?t.__k=[]:(l=t.props.children,te(e,Array.isArray(l)?l:[l],t,n,r,"foreignObject"!==t.type&&i,a,o,H,s)),s||("value"in h&&void 0!==(l=h.value)&&l!==e.value&&ae(e,"value",l,f.value,!1),"checked"in h&&void 0!==(l=h.checked)&&l!==e.checked&&ae(e,"checked",l,f.checked,!1))}return e}function de(e,t,n){try{"function"==typeof e?e(t):e.current=t}catch(e){A.__e(e,n)}}function pe(e,t,n){var r,i,a;if(A.unmount&&A.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||de(r,null,t)),n||"function"==typeof e.type||(n=null!=(i=e.__e)),e.__e=e.__d=void 0,null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){A.__e(e,t)}r.base=r.__P=null}if(r=e.__k)for(a=0;a<r.length;a++)r[a]&&pe(r[a],t,n);null!=i&&z(i)}function fe(e,t,n){return this.constructor(e,n)}function he(e,t,n){var r,i,a;A.__&&A.__(e,t),i=(r=n===P)?null:n&&n.__k||t.__k,e=W(q,null,[e]),a=[],le(t,(r?t:n||t).__k=e,i||H,H,void 0!==t.ownerSVGElement,n&&!r?[n]:i?null:t.childNodes.length?V.slice.call(t.childNodes):null,a,n||H,r),ue(a,e)}function ye(e,t){he(e,t,P)}function ge(e,t){var n,r;for(r in t=K(K({},e.props),t),arguments.length>2&&(t.children=V.slice.call(arguments,2)),n={},t)"key"!==r&&"ref"!==r&&(n[r]=t[r]);return Y(e.type,n,t.key||e.key,t.ref||e.ref,null)}function ve(e){var t={},n={__c:"__cC"+R++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var r,i=this;return this.getChildContext||(r=[],this.getChildContext=function(){return t[n.__c]=i,t},this.shouldComponentUpdate=function(e){i.props.value!==e.value&&r.some((function(t){t.context=e.value,J(t)}))},this.sub=function(e){r.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){r.splice(r.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Consumer.contextType=n,n.Provider.__=n,n}A={__e:function(e,t){for(var n,r;t=t.__;)if((n=t.__c)&&!n.__)try{if(n.constructor&&null!=n.constructor.getDerivedStateFromError&&(r=!0,n.setState(n.constructor.getDerivedStateFromError(e))),null!=n.componentDidCatch&&(r=!0,n.componentDidCatch(e)),r)return J(n.__E=n)}catch(t){e=t}throw e}},S=function(e){return null!=e&&void 0===e.constructor},X.prototype.setState=function(e,t){var n;n=this.__s!==this.state?this.__s:this.__s=K({},this.state),"function"==typeof e&&(e=e(n,this.props)),e&&K(n,e),null!=e&&this.__v&&(t&&this.__h.push(t),J(this))},X.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),J(this))},X.prototype.render=q,w=[],C="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,ee.__r=0,P=H,R=0;var me,be,ke,Ee=0,_e=[],Te=A.__r,Ae=A.diffed,Se=A.__c,we=A.unmount;function Ce(e,t){A.__h&&A.__h(be,e,Ee||t),Ee=0;var n=be.__H||(be.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function xe(e){return Ee=1,Pe(Ke,e)}function Pe(e,t,n){var r=Ce(me++,2);return r.t=e,r.__c||(r.__c=be,r.__=[n?n(t):Ke(void 0,t),function(e){var t=r.t(r.__[0],e);r.__[0]!==t&&(r.__=[t,r.__[1]],r.__c.setState({}))}]),r.__}function Re(e,t){var n=Ce(me++,3);!A.__s&&Ge(n.__H,t)&&(n.__=e,n.__H=t,be.__H.__h.push(n))}function Ie(e,t){var n=Ce(me++,4);!A.__s&&Ge(n.__H,t)&&(n.__=e,n.__H=t,be.__h.push(n))}function De(e){return Ee=5,Le((function(){return{current:e}}),[])}function Oe(e,t,n){Ee=6,Ie((function(){"function"==typeof e?e(t()):e&&(e.current=t())}),null==n?n:n.concat(e))}function Le(e,t){var n=Ce(me++,7);return Ge(n.__H,t)?(n.__H=t,n.__h=e,n.__=e()):n.__}function Me(e,t){return Ee=8,Le((function(){return e}),t)}function Ne(e){var t=be.context[e.__c],n=Ce(me++,9);return n.__c=e,t?(null==n.__&&(n.__=!0,t.sub(be)),t.props.value):e.__}function Ue(e,t){A.useDebugValue&&A.useDebugValue(t?t(e):e)}function Be(e){var t=Ce(me++,10),n=xe();return t.__=e,be.componentDidCatch||(be.componentDidCatch=function(e){t.__&&t.__(e),n[1](e)}),[n[0],function(){n[1](void 0)}]}function Fe(){_e.some((function(e){if(e.__P)try{e.__H.__h.forEach(He),e.__H.__h.forEach(Ve),e.__H.__h=[]}catch(t){return e.__H.__h=[],A.__e(t,e.__v),!0}})),_e=[]}A.__r=function(e){Te&&Te(e),me=0;var t=(be=e.__c).__H;t&&(t.__h.forEach(He),t.__h.forEach(Ve),t.__h=[])},A.diffed=function(e){Ae&&Ae(e);var t=e.__c;t&&t.__H&&t.__H.__h.length&&(1!==_e.push(t)&&ke===A.requestAnimationFrame||((ke=A.requestAnimationFrame)||function(e){var t,n=function(){clearTimeout(r),je&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);je&&(t=requestAnimationFrame(n))})(Fe))},A.__c=function(e,t){t.some((function(e){try{e.__h.forEach(He),e.__h=e.__h.filter((function(e){return!e.__||Ve(e)}))}catch(n){t.some((function(e){e.__h&&(e.__h=[])})),t=[],A.__e(n,e.__v)}})),Se&&Se(e,t)},A.unmount=function(e){we&&we(e);var t=e.__c;if(t&&t.__H)try{t.__H.__.forEach(He)}catch(e){A.__e(e,t.__v)}};var je="function"==typeof requestAnimationFrame;function He(e){"function"==typeof e.u&&e.u()}function Ve(e){e.u=e.__()}function Ge(e,t){return!e||t.some((function(t,n){return t!==e[n]}))}function Ke(e,t){return"function"==typeof t?t(e):t}function ze(e,t){for(var n in t)e[n]=t[n];return e}function We(e,t){for(var n in e)if("__source"!==n&&!(n in t))return!0;for(var r in t)if("__source"!==r&&e[r]!==t[r])return!0;return!1}var Ye=function(e){var t,n;function r(t){var n;return(n=e.call(this,t)||this).isPureReactComponent=!0,n}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r.prototype.shouldComponentUpdate=function(e,t){return We(this.props,e)||We(this.state,t)},r}(X),Ze=A.__b;A.__b=function(e){e.type&&e.type.t&&e.ref&&(e.props.ref=e.ref,e.ref=null),Ze&&Ze(e)};var qe="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function Xe(e){function t(t,n){var r=ze({},t);return delete r.ref,e(r,(n=t.ref||n)&&("object"!=typeof n||"current"in n)?n:null)}return t.$$typeof=qe,t.render=t,t.prototype.isReactComponent=t.t=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var Qe=function(e,t){return e?ne(e).reduce((function(e,n,r){return e.concat(t(n,r))}),[]):null},$e={map:Qe,forEach:Qe,count:function(e){return e?ne(e).length:0},only:function(e){if(1!==(e=ne(e)).length)throw new Error("Children.only() expects only one child.");return e[0]},toArray:ne},Je=A.__e;function et(e){return e&&((e=ze({},e)).__c=null,e.__k=e.__k&&e.__k.map(et)),e}function tt(){this.__u=0,this.o=null,this.__b=null}function nt(e){var t=e.__.__c;return t&&t.u&&t.u(e)}function rt(){this.i=null,this.l=null}A.__e=function(e,t,n){if(e.then)for(var r,i=t;i=i.__;)if((r=i.__c)&&r.__c)return r.__c(e,t.__c);Je(e,t,n)},(tt.prototype=new X).__c=function(e,t){var n=this;null==n.o&&(n.o=[]),n.o.push(t);var r=nt(n.__v),i=!1,a=function(){i||(i=!0,r?r(o):o())};t.__c=t.componentWillUnmount,t.componentWillUnmount=function(){a(),t.__c&&t.__c()};var o=function(){var e;if(! --n.__u)for(n.__v.__k[0]=n.state.u,n.setState({u:n.__b=null});e=n.o.pop();)e.forceUpdate()};n.__u++||n.setState({u:n.__b=n.__v.__k[0]}),e.then(a,a)},tt.prototype.render=function(e,t){return this.__b&&(this.__v.__k&&(this.__v.__k[0]=et(this.__b)),this.__b=null),[W(q,null,t.u?null:e.children),t.u&&e.fallback]};var it=function(e,t,n){if(++n[1]===n[0]&&e.l.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.l.size))for(n=e.i;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.i=n=n[2]}};(rt.prototype=new X).u=function(e){var t=this,n=nt(t.__v),r=t.l.get(e);return r[0]++,function(i){var a=function(){t.props.revealOrder?(r.push(i),it(t,e,r)):i()};n?n(a):a()}},rt.prototype.render=function(e){this.i=null,this.l=new Map;var t=ne(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var n=t.length;n--;)this.l.set(t[n],this.i=[1,0,this.i]);return e.children},rt.prototype.componentDidUpdate=rt.prototype.componentDidMount=function(){var e=this;e.l.forEach((function(t,n){it(e,n,t)}))};var at=function(){function e(){}var t=e.prototype;return t.getChildContext=function(){return this.props.context},t.render=function(e){return e.children},e}();function ot(e){var t=this,n=e.container,r=W(at,{context:t.context},e.vnode);return t.s&&t.s!==n&&(t.v.parentNode&&t.s.removeChild(t.v),pe(t.h),t.p=!1),e.vnode?t.p?(n.__k=t.__k,he(r,n),t.__k=n.__k):(t.v=document.createTextNode(""),ye("",n),n.appendChild(t.v),t.p=!0,t.s=n,he(r,n,t.v),t.__k=t.v.__k):t.p&&(t.v.parentNode&&t.s.removeChild(t.v),pe(t.h)),t.h=r,t.componentWillUnmount=function(){t.v.parentNode&&t.s.removeChild(t.v),pe(t.h)},null}function st(e,t){return W(ot,{vnode:e,container:t})}var lt=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|fill|flood|font|glyph(?!R)|horiz|marker(?!H|W|U)|overline|paint|stop|strikethrough|stroke|text(?!L)|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/;X.prototype.isReactComponent={};var ut="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,ct=A.event;function dt(e,t){e["UNSAFE_"+t]&&!e[t]&&Object.defineProperty(e,t,{configurable:!1,get:function(){return this["UNSAFE_"+t]},set:function(e){this["UNSAFE_"+t]=e}})}A.event=function(e){ct&&(e=ct(e)),e.persist=function(){};var t=!1,n=!1,r=e.stopPropagation;e.stopPropagation=function(){r.call(e),t=!0};var i=e.preventDefault;return e.preventDefault=function(){i.call(e),n=!0},e.isPropagationStopped=function(){return t},e.isDefaultPrevented=function(){return n},e.nativeEvent=e};var pt={configurable:!0,get:function(){return this.class}},ft=A.vnode;function ht(e){return!!e&&e.$$typeof===ut}A.vnode=function(e){e.$$typeof=ut;var t=e.type,n=e.props;if(t){if(n.class!=n.className&&(pt.enumerable="className"in n,null!=n.className&&(n.class=n.className),Object.defineProperty(n,"className",pt)),"function"!=typeof t){var r,i,a;for(a in n.defaultValue&&void 0!==n.value&&(n.value||0===n.value||(n.value=n.defaultValue),delete n.defaultValue),Array.isArray(n.value)&&n.multiple&&"select"===t&&(ne(n.children).forEach((function(e){-1!=n.value.indexOf(e.props.value)&&(e.props.selected=!0)})),delete n.value),n)if(r=lt.test(a))break;if(r)for(a in i=e.props={},n)i[lt.test(a)?a.replace(/[A-Z0-9]/,"-$&").toLowerCase():a]=n[a]}!function(t){var n=e.type,r=e.props;if(r&&"string"==typeof n){var i={};for(var a in r)/^on(Ani|Tra|Tou)/.test(a)&&(r[a.toLowerCase()]=r[a],delete r[a]),i[a.toLowerCase()]=a;if(i.ondoubleclick&&(r.ondblclick=r[i.ondoubleclick],delete r[i.ondoubleclick]),i.onbeforeinput&&(r.onbeforeinput=r[i.onbeforeinput],delete r[i.onbeforeinput]),i.onchange&&("textarea"===n||"input"===n.toLowerCase()&&!/^fil|che|ra/i.test(r.type))){var o=i.oninput||"oninput";r[o]||(r[o]=r[i.onchange],delete r[i.onchange])}}}(),"function"==typeof t&&!t.m&&t.prototype&&(dt(t.prototype,"componentWillMount"),dt(t.prototype,"componentWillReceiveProps"),dt(t.prototype,"componentWillUpdate"),t.m=!0)}ft&&ft(e)};var yt=function(e,t){return e(t)},gt={useState:xe,useReducer:Pe,useEffect:Re,useLayoutEffect:Ie,useRef:De,useImperativeHandle:Oe,useMemo:Le,useCallback:Me,useContext:Ne,useDebugValue:Ue,version:"16.8.0",Children:$e,render:function(e,t,n){if(null==t.__k)for(;t.firstChild;)t.removeChild(t.firstChild);return he(e,t),"function"==typeof n&&n(),e?e.__c:null},hydrate:function(e,t,n){return ye(e,t),"function"==typeof n&&n(),e?e.__c:null},unmountComponentAtNode:function(e){return!!e.__k&&(he(null,e),!0)},createPortal:st,createElement:W,createContext:ve,createFactory:function(e){return W.bind(null,e)},cloneElement:function(e){return ht(e)?ge.apply(null,arguments):e},createRef:Z,Fragment:q,isValidElement:ht,findDOMNode:function(e){return e&&(e.base||1===e.nodeType&&e)||null},Component:X,PureComponent:Ye,memo:function(e,t){function n(e){var n=this.props.ref,r=n==e.ref;return!r&&n&&(n.call?n(null):n.current=null),t?!t(this.props,e)||!r:We(this.props,e)}function r(t){return this.shouldComponentUpdate=n,W(e,t)}return r.prototype.isReactComponent=!0,r.displayName="Memo("+(e.displayName||e.name)+")",r.t=!0,r},forwardRef:Xe,unstable_batchedUpdates:yt,StrictMode:q,Suspense:tt,SuspenseList:rt,lazy:function(e){var t,n,r;function i(i){if(t||(t=e()).then((function(e){n=e.default||e}),(function(e){r=e})),r)throw r;if(!n)throw t;return W(n,i)}return i.displayName="Lazy",i.t=!0,i}},vt=(r(697),gt.createContext(null)),mt=function(e){e()},bt=function(){return mt},kt={notify:function(){}},Et=function(){function e(e,t){this.store=e,this.parentSub=t,this.unsubscribe=null,this.listeners=kt,this.handleChangeWrapper=this.handleChangeWrapper.bind(this)}var t=e.prototype;return t.addNestedSub=function(e){return this.trySubscribe(),this.listeners.subscribe(e)},t.notifyNestedSubs=function(){this.listeners.notify()},t.handleChangeWrapper=function(){this.onStateChange&&this.onStateChange()},t.isSubscribed=function(){return Boolean(this.unsubscribe)},t.trySubscribe=function(){this.unsubscribe||(this.unsubscribe=this.parentSub?this.parentSub.addNestedSub(this.handleChangeWrapper):this.store.subscribe(this.handleChangeWrapper),this.listeners=function(){var e=bt(),t=null,n=null;return{clear:function(){t=null,n=null},notify:function(){e((function(){for(var e=t;e;)e.callback(),e=e.next}))},get:function(){for(var e=[],n=t;n;)e.push(n),n=n.next;return e},subscribe:function(e){var r=!0,i=n={callback:e,next:null,prev:n};return i.prev?i.prev.next=i:t=i,function(){r&&null!==t&&(r=!1,i.next?i.next.prev=i.prev:n=i.prev,i.prev?i.prev.next=i.next:t=i.next)}}}}())},t.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null,this.listeners.clear(),this.listeners=kt)},e}(),_t=function(e){var t=e.store,n=e.context,r=e.children,i=Le((function(){var e=new Et(t);return e.onStateChange=e.notifyNestedSubs,{store:t,subscription:e}}),[t]),a=Le((function(){return t.getState()}),[t]);Re((function(){var e=i.subscription;return e.trySubscribe(),a!==t.getState()&&e.notifyNestedSubs(),function(){e.tryUnsubscribe(),e.onStateChange=null}}),[i,a]);var o=n||vt;return gt.createElement(o.Provider,{value:i},r)};function Tt(){return Tt=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Tt.apply(this,arguments)}function At(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}var St=r(545),wt=r.n(St),Ct=r(864),xt="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?Ie:Re,Pt=[],Rt=[null,null];function It(e,t){var n=e[1];return[t.payload,n+1]}function Dt(e,t,n){xt((function(){return e.apply(void 0,t)}),n)}function Ot(e,t,n,r,i,a,o){e.current=r,t.current=i,n.current=!1,a.current&&(a.current=null,o())}function Lt(e,t,n,r,i,a,o,s,l,u){if(e){var c=!1,d=null,p=function(){if(!c){var e,n,p=t.getState();try{e=r(p,i.current)}catch(e){n=e,d=e}n||(d=null),e===a.current?o.current||l():(a.current=e,s.current=e,o.current=!0,u({type:"STORE_UPDATED",payload:{error:n}}))}};return n.onStateChange=p,n.trySubscribe(),p(),function(){if(c=!0,n.tryUnsubscribe(),n.onStateChange=null,d)throw d}}}var Mt=function(){return[null,0]};function Nt(e,t){void 0===t&&(t={});var n=t,r=n.getDisplayName,i=void 0===r?function(e){return"ConnectAdvanced("+e+")"}:r,a=n.methodName,o=void 0===a?"connectAdvanced":a,s=n.renderCountProp,l=void 0===s?void 0:s,u=n.shouldHandleStateChanges,c=void 0===u||u,d=n.storeKey,p=void 0===d?"store":d,f=(n.withRef,n.forwardRef),h=void 0!==f&&f,y=n.context,g=void 0===y?vt:y,v=At(n,["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"]),m=g;return function(t){var n=t.displayName||t.name||"Component",r=i(n),a=Tt({},v,{getDisplayName:i,methodName:o,renderCountProp:l,shouldHandleStateChanges:c,storeKey:p,displayName:r,wrappedComponentName:n,WrappedComponent:t}),s=v.pure,u=s?Le:function(e){return e()};function d(n){var r=Le((function(){var e=n.reactReduxForwardedRef,t=At(n,["reactReduxForwardedRef"]);return[n.context,e,t]}),[n]),i=r[0],o=r[1],s=r[2],l=Le((function(){return i&&i.Consumer&&(0,Ct.isContextConsumer)(gt.createElement(i.Consumer,null))?i:m}),[i,m]),d=Ne(l),p=Boolean(n.store)&&Boolean(n.store.getState)&&Boolean(n.store.dispatch);Boolean(d)&&Boolean(d.store);var f=p?n.store:d.store,h=Le((function(){return function(t){return e(t.dispatch,a)}(f)}),[f]),y=Le((function(){if(!c)return Rt;var e=new Et(f,p?null:d.subscription),t=e.notifyNestedSubs.bind(e);return[e,t]}),[f,p,d]),g=y[0],v=y[1],b=Le((function(){return p?d:Tt({},d,{subscription:g})}),[p,d,g]),k=Pe(It,Pt,Mt),E=k[0][0],_=k[1];if(E&&E.error)throw E.error;var T=De(),A=De(s),S=De(),w=De(!1),C=u((function(){return S.current&&s===A.current?S.current:h(f.getState(),s)}),[f,E,s]);Dt(Ot,[A,T,w,s,C,S,v]),Dt(Lt,[c,f,g,h,A,T,w,S,v,_],[f,g,h]);var x=Le((function(){return gt.createElement(t,Tt({},C,{ref:o}))}),[o,t,C]);return Le((function(){return c?gt.createElement(l.Provider,{value:b},x):x}),[l,x,b])}var f=s?gt.memo(d):d;if(f.WrappedComponent=t,f.displayName=r,h){var y=gt.forwardRef((function(e,t){return gt.createElement(f,Tt({},e,{reactReduxForwardedRef:t}))}));return y.displayName=r,y.WrappedComponent=t,wt()(y,t)}return wt()(f,t)}}function Ut(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function Bt(e,t){if(Ut(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var i=0;i<n.length;i++)if(!Object.prototype.hasOwnProperty.call(t,n[i])||!Ut(e[n[i]],t[n[i]]))return!1;return!0}var Ft=r(121),jt=function(){return Math.random().toString(36).substring(7).split("").join(".")},Ht={INIT:"@@redux/INIT"+jt(),REPLACE:"@@redux/REPLACE"+jt(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+jt()}};function Vt(e,t,n){var r;if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error("It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function.");if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error("Expected the enhancer to be a function.");return n(Vt)(e,t)}if("function"!=typeof e)throw new Error("Expected the reducer to be a function.");var i=e,a=t,o=[],s=o,l=!1;function u(){s===o&&(s=o.slice())}function c(){if(l)throw new Error("You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return a}function d(e){if("function"!=typeof e)throw new Error("Expected the listener to be a function.");if(l)throw new Error("You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api-reference/store#subscribelistener for more details.");var t=!0;return u(),s.push(e),function(){if(t){if(l)throw new Error("You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api-reference/store#subscribelistener for more details.");t=!1,u();var n=s.indexOf(e);s.splice(n,1),o=null}}}function p(e){if(!function(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}(e))throw new Error("Actions must be plain objects. Use custom middleware for async actions.");if(void 0===e.type)throw new Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(l)throw new Error("Reducers may not dispatch actions.");try{l=!0,a=i(a,e)}finally{l=!1}for(var t=o=s,n=0;n<t.length;n++)(0,t[n])();return e}return p({type:Ht.INIT}),(r={dispatch:p,subscribe:d,getState:c,replaceReducer:function(e){if("function"!=typeof e)throw new Error("Expected the nextReducer to be a function.");i=e,p({type:Ht.REPLACE})}})[Ft.Z]=function(){var e,t=d;return(e={subscribe:function(e){if("object"!=typeof e||null===e)throw new TypeError("Expected the observer to be an object.");function n(){e.next&&e.next(c())}return n(),{unsubscribe:t(n)}}})[Ft.Z]=function(){return this},e},r}function Gt(e,t){var n=t&&t.type;return"Given "+(n&&'action "'+String(n)+'"'||"an action")+', reducer "'+e+'" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.'}function Kt(e,t){return function(){return t(e.apply(this,arguments))}}function zt(e,t){if("function"==typeof e)return Kt(e,t);if("object"!=typeof e||null===e)throw new Error("bindActionCreators expected an object or a function, instead received "+(null===e?"null":typeof e)+'. Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?');var n={};for(var r in e){var i=e[r];"function"==typeof i&&(n[r]=Kt(i,t))}return n}function Wt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Yt(e,t){var n=Object.keys(e);return Object.getOwnPropertySymbols&&n.push.apply(n,Object.getOwnPropertySymbols(e)),t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n}function Zt(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 0===t.length?function(e){return e}:1===t.length?t[0]:t.reduce((function(e,t){return function(){return e(t.apply(void 0,arguments))}}))}function qt(e){return function(t,n){var r=e(t,n);function i(){return r}return i.dependsOnOwnProps=!1,i}}function Xt(e){return null!==e.dependsOnOwnProps&&void 0!==e.dependsOnOwnProps?Boolean(e.dependsOnOwnProps):1!==e.length}function Qt(e,t){return function(t,n){n.displayName;var r=function(e,t){return r.dependsOnOwnProps?r.mapToProps(e,t):r.mapToProps(e)};return r.dependsOnOwnProps=!0,r.mapToProps=function(t,n){r.mapToProps=e,r.dependsOnOwnProps=Xt(e);var i=r(t,n);return"function"==typeof i&&(r.mapToProps=i,r.dependsOnOwnProps=Xt(i),i=r(t,n)),i},r}}var $t=[function(e){return"function"==typeof e?Qt(e):void 0},function(e){return e?void 0:qt((function(e){return{dispatch:e}}))},function(e){return e&&"object"==typeof e?qt((function(t){return zt(e,t)})):void 0}],Jt=[function(e){return"function"==typeof e?Qt(e):void 0},function(e){return e?void 0:qt((function(){return{}}))}];function en(e,t,n){return Tt({},n,{},e,{},t)}var tn=[function(e){return"function"==typeof e?function(e){return function(t,n){n.displayName;var r,i=n.pure,a=n.areMergedPropsEqual,o=!1;return function(t,n,s){var l=e(t,n,s);return o?i&&a(l,r)||(r=l):(o=!0,r=l),r}}}(e):void 0},function(e){return e?void 0:function(){return en}}];function nn(e,t,n,r){return function(i,a){return n(e(i,a),t(r,a),a)}}function rn(e,t,n,r,i){var a,o,s,l,u,c=i.areStatesEqual,d=i.areOwnPropsEqual,p=i.areStatePropsEqual,f=!1;return function(i,h){return f?function(i,f){var h,y,g=!d(f,o),v=!c(i,a);return a=i,o=f,g&&v?(s=e(a,o),t.dependsOnOwnProps&&(l=t(r,o)),u=n(s,l,o)):g?(e.dependsOnOwnProps&&(s=e(a,o)),t.dependsOnOwnProps&&(l=t(r,o)),u=n(s,l,o)):v?(h=e(a,o),y=!p(h,s),s=h,y&&(u=n(s,l,o)),u):u}(i,h):(s=e(a=i,o=h),l=t(r,o),u=n(s,l,o),f=!0,u)}}function an(e,t){var n=t.initMapStateToProps,r=t.initMapDispatchToProps,i=t.initMergeProps,a=At(t,["initMapStateToProps","initMapDispatchToProps","initMergeProps"]),o=n(e,a),s=r(e,a),l=i(e,a);return(a.pure?rn:nn)(o,s,l,e,a)}function on(e,t,n){for(var r=t.length-1;r>=0;r--){var i=t[r](e);if(i)return i}return function(t,r){throw new Error("Invalid value of type "+typeof e+" for "+n+" argument when connecting component "+r.wrappedComponentName+".")}}function sn(e,t){return e===t}function ln(e){var t=void 0===e?{}:e,n=t.connectHOC,r=void 0===n?Nt:n,i=t.mapStateToPropsFactories,a=void 0===i?Jt:i,o=t.mapDispatchToPropsFactories,s=void 0===o?$t:o,l=t.mergePropsFactories,u=void 0===l?tn:l,c=t.selectorFactory,d=void 0===c?an:c;return function(e,t,n,i){void 0===i&&(i={});var o=i,l=o.pure,c=void 0===l||l,p=o.areStatesEqual,f=void 0===p?sn:p,h=o.areOwnPropsEqual,y=void 0===h?Bt:h,g=o.areStatePropsEqual,v=void 0===g?Bt:g,m=o.areMergedPropsEqual,b=void 0===m?Bt:m,k=At(o,["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"]),E=on(e,a,"mapStateToProps"),_=on(t,s,"mapDispatchToProps"),T=on(n,u,"mergeProps");return r(d,Tt({methodName:"connect",getDisplayName:function(e){return"Connect("+e+")"},shouldHandleStateChanges:Boolean(e),initMapStateToProps:E,initMapDispatchToProps:_,initMergeProps:T,pure:c,areStatesEqual:f,areOwnPropsEqual:y,areStatePropsEqual:v,areMergedPropsEqual:b},k))}}var un=ln();function cn(){return Ne(vt)}function dn(e){void 0===e&&(e=vt);var t=e===vt?cn:function(){return Ne(e)};return function(){return t().store}}var pn=dn();function fn(e){void 0===e&&(e=vt);var t=e===vt?pn:dn(e);return function(){return t().dispatch}}var hn=fn(),yn=function(e,t){return e===t};function gn(e){void 0===e&&(e=vt);var t=e===vt?cn:function(){return Ne(e)};return function(e,n){void 0===n&&(n=yn);var r=t(),i=function(e,t,n,r){var i,a=Pe((function(e){return e+1}),0),o=a[1],s=Le((function(){return new Et(n,r)}),[n,r]),l=De(),u=De(),c=De(),d=De(),p=n.getState();try{i=e!==u.current||p!==c.current||l.current?e(p):d.current}catch(e){throw l.current&&(e.message+="\nThe error may be correlated with this previous error:\n"+l.current.stack+"\n\n"),e}return xt((function(){u.current=e,c.current=p,d.current=i,l.current=void 0})),xt((function(){function e(){try{var e=u.current(n.getState());if(t(e,d.current))return;d.current=e}catch(e){l.current=e}o()}return s.onStateChange=e,s.trySubscribe(),e(),function(){return s.tryUnsubscribe()}}),[n,s]),i}(e,n,r.store,r.subscription);return Ue(i),i}}var vn=gn();mt=yt;var mn=r(905),bn=r.n(mn);function kn(e){return null!=e}function En(e,t){for(var n in t)e[n]=t[n];return e}function _n(e,t){var n=En({},e);for(var r in t)t.hasOwnProperty(r)&&(e[r]&&t[r]&&"object"==typeof e[r]&&"object"==typeof t[r]?n[r]=_n(e[r],t[r]):n[r]=e[r]||t[r]);return n}var Tn=/[?&#]intl=show/,An=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getChildContext=function(){var e=this.props,t=e.scope,n=e.definition,r=e.mark,i=En({},this.context.intl||{});return t&&(i.scope=t),n&&(i.dictionary=_n(i.dictionary||{},n)),(r||"undefined"!=typeof location&&String(location).match(Tn))&&(i.mark=!0),{intl:i}},t.prototype.render=function(e){return e.children},t}(X);function Sn(e,t){if(arguments.length<2)return t=e,function(e){return Sn(e,t)};function n(n){return W(An,t||{},W(e,n))}return n.getWrappedComponent=e&&e.getWrappedComponent||function(){return e},n}var wn,Cn={};function xn(e,t){return wn=t||Cn,e&&e.replace(/\{\{([\w.-]+)\}\}/g,Pn)}function Pn(e,t){for(var n=t.split("."),r=wn,i=0;i<n.length;i++)if(null==(r=r[n[i]]))return"";return"string"==typeof r&&r.match(/\{\{/)&&(r=xn(r,wn)),r}function Rn(e,t,n,r,i,a){t&&(e=t+"."+e);var o=n&&bn()(n,e);return(i||0===i)&&o&&"object"==typeof o&&(o=o.splice?o[i]||o[0]:0===i&&kn(o.none)?o.none:1===i&&kn(o.one||o.singular)?o.one||o.singular:o.some||o.many||o.plural||o.other||o),o&&xn(o,r)||a||null}function In(e,t){var n=e.value,r=e.id,i=t.intl;if(i&&i.mark){var a="dictionary"+(i&&i.scope?"."+i.scope:"")+"."+r;return W("mark",{style:{background:n?bn()(i,a)?"rgba(119,231,117,.5)":"rgba(229,226,41,.5)":"rgba(228,147,51,.5)"},title:r},n)}return n}function Dn(e,t){var n=e.id,r=e.children,i=e.plural,a=e.fields,o=t.intl;return W(In,{id:n,value:Rn(n,o&&o.scope,o&&o.dictionary,a,i,r)})}function On(e,t,n){var r={};for(var i in t=t||{},e=function(e){if("string"==typeof(e=e||{})&&(e=e.split(",")),"join"in e){for(var t={},n=0;n<e.length;n++){var r=e[n].trim();r&&(t[r.split(".").pop()]=r)}return t}return e}(e),e)if(e.hasOwnProperty(i)&&e[i]){var a=e[i];n||"string"!=typeof a?a.type===Dn&&(a=En({fallback:a.props.children},a.props),r[i]=Rn(a.id,t.scope,t.dictionary,a.fields,a.plural,a.fallback)):r[i]=Rn(a,t.scope,t.dictionary)}return r}function Ln(e,t){var n=e.children,r=t.intl;return n&&n.length?n.map((function(e){return ge(e,On(e.props,r,!0))})):n&&ge(n,On(n.props,r,!0))}function Mn(e){return W(Ln,null,W(Nn,{html:W(Dn,e),id:e.id}))}function Nn(e){var t=e.html,n=e.id,r=t?"string"==typeof t?W("span",{dangerouslySetInnerHTML:{__html:t}}):W("span",null,t):t;return W(In,{id:n,value:r})}function Un(e){return function(t){function n(n,r){var i=On("function"==typeof e?e(n,r):e,r.intl);return W(t,En(En({},n),i))}return n.getWrappedComponent=t&&t.getWrappedComponent||function(){return t},n}}Sn.intl=Sn,Sn.IntlProvider=An,Sn.Text=Dn,Sn.MarkupText=Mn,Sn.Localizer=Ln,Sn.withText=Un;var Bn=Sn,Fn=r(8),jn=r.n(Fn);function Hn(e){var t;return Array.isArray(e)?(t=e.length>0?e.slice(0):[]).forEach((function(e,n){("object"===jn()(e)||Array.isArray(e)&&e.length>0)&&(t[n]=Hn(e))})):"object"===jn()(e)?(t=Object.assign({},e),Object.keys(t).forEach((function(e){("object"===jn()(t[e])||Array.isArray(t[e])&&t[e].length>0)&&(t[e]=Hn(t[e]))}))):t=e,t}function Vn(e){return e&&"object"===jn()(e)&&!Array.isArray(e)}function Gn(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if(!n.length)return e;var i=n.shift();if(Vn(e)&&Vn(i))for(var a in i)Vn(i[a])?(e[a]||Object.assign(e,j()({},a,{})),Gn(e[a],i[a])):Object.assign(e,j()({},a,i[a]));return Gn.apply(void 0,[e].concat(n))}var Kn={get:function(e){return{VERSION:"",DEBUG:{value:"",name:""},ERROR:{value:"",name:""},INFO:{value:"",name:""},OFF:{value:"",name:""},TIME:{value:"",name:""},TRACE:{value:"",name:""},WARN:{value:"",name:""},createDefaultHandler:function(){},debug:function(){},enabledFor:function(){},error:function(){},get:function(){},getLevel:function(){},info:function(){},log:function(){},setHandler:function(){},setLevel:function(){},time:function(){},timeEnd:function(){},trace:function(){},useDefaults:function(){},warn:function(){}}}},zn={};function Wn(e){return Kn.get(e)}var Yn,Zn,qn=Wn,Xn=r(154),Qn=r.n(Xn),$n=r(506),Jn=r.n($n),er=r(205),tr=r.n(er),nr=r(585),rr=r.n(nr),ir=r(754),ar=r.n(ir),or=r(230),sr=function(e){return function(t){tr()(a,t);var n,r,i=(n=a,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=ar()(n);if(r){var i=ar()(this).constructor;e=Reflect.construct(t,arguments,i)}else e=t.apply(this,arguments);return rr()(this,e)});function a(){var e;N()(this,a);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e=i.call.apply(i,[this].concat(n)),j()(Jn()(e),"eventManager",new or.EventManager),e}return B()(a,[{key:"componentWillUnmount",value:function(){this.eventManager&&(this.eventManager.destroy(),this.eventManager=null)}},{key:"render",value:function(){return W(e,Qn()({},this.props,{eventManager:this.eventManager}))}}]),a}(X)},lr="playkit-ui",ur={UI_CLICKED:"".concat(lr,"-uiclicked"),UI_VISIBILITY_CHANGED:"".concat(lr,"-uivisibilitychanged"),GUI_RESIZE:"".concat(lr,"-guiresize"),PLAYER_RESIZE:"".concat(lr,"-playerresize"),VIDEO_RESIZE:"".concat(lr,"-videoresize"),UI_PRESET_CHANGE:"".concat(lr,"-uipresetchange"),USER_CLICKED_PLAY:"".concat(lr,"-userclickedplay"),USER_CLICKED_PAUSE:"".concat(lr,"-userclickedpause"),USER_CLICKED_REWIND:"".concat(lr,"-userclickedrewind"),USER_CLICKED_FORWARD:"".concat(lr,"-userclickedforward"),USER_CLICKED_LIVE_TAG:"".concat(lr,"-userclickedlivetag"),USER_CLICKED_LOGO:"".concat(lr,"-userclickedlogo"),USER_CLICKED_MUTE:"".concat(lr,"-userclickedmute"),USER_CLICKED_UNMUTE:"".concat(lr,"-userclickedunmute"),USER_CLICKED_ADVANCED_AUDIO_DESCRIPTION:"".concat(lr,"-userclickedadvancedaudiodescription"),USER_CHANGED_VOLUME:"".concat(lr,"-userchangedvolume"),USER_SELECTED_CAPTION_TRACK:"".concat(lr,"-userselectedcaptiontrack"),USER_SHOWED_CAPTIONS:"".concat(lr,"-usershowedcaptions"),USER_HID_CAPTIONS:"".concat(lr,"-userhidcaptions"),USER_SELECTED_AUDIO_TRACK:"".concat(lr,"-userselectedaudiotrack"),USER_SELECTED_QUALITY_TRACK:"".concat(lr,"-userselectedqualitytrack"),USER_ENTERED_FULL_SCREEN:"".concat(lr,"-userenteredfullscreen"),USER_EXITED_FULL_SCREEN:"".concat(lr,"-userexitedfullscreen"),USER_ENTERED_PICTURE_IN_PICTURE:"".concat(lr,"-userenteredpictureinpicture"),USER_EXITED_PICTURE_IN_PICTURE:"".concat(lr,"-userexitedpictureinpicture"),USER_SELECTED_CAPTIONS_STYLE:"".concat(lr,"-userselectedcaptionsstyle"),USER_SELECTED_SPEED:"".concat(lr,"-userselectedspeed"),USER_SEEKED:"".concat(lr,"-userseeked"),RESIZE:"".concat(lr,"-resize"),USER_SELECTED_CAPTIONS_SIZE:"".concat(lr,"-userselectedcaptionssize"),USER_SELECTED_CAPTIONS_ALIGNMENT:"".concat(lr,"-userselectedcaptionsalignment"),USER_SELECTED_CAPTIONS_FONT_COLOR:"".concat(lr,"-userselectedcaptionsfontcolor"),USER_SELECTED_CAPTIONS_FONT_FAMILY:"".concat(lr,"-userselectedcaptionsfontfamily"),USER_SELECTED_CAPTIONS_FONT_STYLE:"".concat(lr,"-userselectedcaptionsfontstyle"),USER_SELECTED_CAPTIONS_FONT_OPACITY:"".concat(lr,"-userselectedcaptionsfontopacity"),USER_SELECTED_CAPTIONS_BACKGROUND_COLOR:"".concat(lr,"-userselectedcaptionsbackgroundcolor"),USER_SELECTED_CAPTIONS_BACKGROUND_OPACITY:"".concat(lr,"-userselectedcaptionsbackgroundopacity")},cr={TAB:9,ENTER:13,ESC:27,SPACE:32,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,P:80,C:67,F:70,M:77,SEMI_COLON:186,COMMA:188,PERIOD:190},dr={Backspace:"Backspace",Tab:"Tab",Enter:"Enter",ShiftLeft:"ShiftLeft",ShiftRight:"ShiftRight",ControlLeft:"ControlLeft",ControlRight:"ControlRight",AltLeft:"AltLeft",AltRight:"AltRight",Pause:"Pause",CapsLock:"CapsLock",Escape:"Escape",Space:"Space",PageUp:"PageUp",PageDown:"PageDown",End:"End",Home:"Home",ArrowLeft:"ArrowLeft",ArrowUp:"ArrowUp",ArrowRight:"ArrowRight",ArrowDown:"ArrowDown",Insert:"Insert",Delete:"Delete",KeyP:"KeyP",KeyC:"KeyC",KeyF:"KeyF",KeyM:"KeyM",Numpad0:"Numpad0",Semicolon:"Semicolon",Equal:"Equal",Comma:"Comma",Minus:"Minus",Period:"Period",Slash:"Slash"},pr=function(e){return function(t){return function(n){tr()(o,n);var r,i,a=(r=o,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=ar()(r);if(i){var n=ar()(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return rr()(this,e)});function o(t){var n;return N()(this,o),n=a.call(this),j()(Jn()(n),"logger",void 0),n.logger=qn("UI ".concat(e)),n.logger.debug("Initialized"),n}return B()(o,[{key:"render",value:function(){return W(t,Qn()({},this.props,{logger:this.logger}))}}]),o}(X)}},fr="remove";function hr(e,t){return e[t]=e[t]||{before:[],after:[],replace:null},e[t]}var yr,gr,vr,mr={playerAreaComponents:null,hasPositionedComponents:!1,presetComponentsOnlyMode:!0},br=pr("PlayerArea")(Yn=un((function(e){return{activePresetName:e.shell.activePresetName}}))((Zn=function(e){tr()(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=ar()(t);if(n){var i=ar()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return rr()(this,e)});function i(){var e;N()(this,i);for(var t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];return e=r.call.apply(r,[this].concat(n)),j()(Jn()(e),"_unregisterListenerCallback",void 0),j()(Jn()(e),"_actualChildren",void 0),j()(Jn()(e),"_updateAreaComponents",(function(t){var n=e.props,r=n.activePresetName,i=n.name;e.props.logger.debug("Player area '".concat(i,"' in preset '").concat(r,"' - update children components"));var a={},o={appendedComponents:[],positionedComponentMap:a},s=!1;t.forEach((function(e){e.beforeComponent?(hr(a,e.beforeComponent).before.push(e),s=!0):e.afterComponent?(hr(a,e.afterComponent).after.push(e),s=!0):e.replaceComponent?(hr(a,e.replaceComponent).replace=e,s=!0):o.appendedComponents.push(e)})),e.setState({playerAreaComponents:o,hasPositionedComponents:s,presetComponentsOnlyMode:!1})})),e}return B()(i,[{key:"shouldComponentUpdate",value:function(e,t){return e.shouldUpdate||this.state.playerAreaComponents!==t.playerAreaComponents||e.activePresetName!==this.props.activePresetName}},{key:"componentDidUpdate",value:function(e){e.activePresetName!==this.props.activePresetName&&this._registerListener()}},{key:"_unregisterListener",value:function(){this.props.logger.debug("Player area '".concat(this.props.name,"' - unregister to changes")),"function"==typeof this._unregisterListenerCallback&&(this._unregisterListenerCallback(),this._unregisterListenerCallback=null)}},{key:"_registerListener",value:function(){var e=this.props,t=e.activePresetName,n=e.name;this._unregisterListener(),t&&n&&(this.props.logger.debug("Player area '".concat(n,"' in preset '").concat(t,"' - register to changes")),this._unregisterListenerCallback=this.context.playerAreaComponentsStore.listen(t,n,this._updateAreaComponents))}},{key:"componentDidMount",value:function(){this.props.logger.debug("Player area '".concat(this.props.name,"' - handle did mount")),this.setState(mr),this._registerListener(),this._actualChildren=[]}},{key:"componentWillUpdate",value:function(e){var t=e.children;this._actualChildren=t&&t.type===q?t.props.children:t}},{key:"componentWillUnmount",value:function(){var e=this.props.name;this.props.logger.debug("Player area '".concat(e,"' - handle will unmount")),this._unregisterListener()}},{key:"_renderUIComponent",value:function(e){return e.get?W(e.get,e.props):null}},{key:"renderContent",value:function(e){return W(q,null,e)}},{key:"_getPositionedComponents",value:function(e){var t=this,n=this.state.playerAreaComponents,r=[];return ne(e).forEach((function(e){if("div"===e.type||e.type===q)return e.props.children=t._getPositionedComponents(e.props.children),void r.push(e);var i=function(e){return e&&e.type?e.type.displayName:null}(e);if(i){var a=n.positionedComponentMap[i];if(a){var o=a.replace,s=a.before,l=a.after;if(o){if(o.get===fr)return;return"string"!=typeof o.get&&(o.props=o.props||{},o.props.replacedComponentProps=e.props),void r.push(t._renderUIComponent(o))}s.length&&s.forEach((function(e){r.push(t._renderUIComponent(e))})),r.push(e),l.length&&l.forEach((function(e){r.push(t._renderUIComponent(e))}))}else r.push(e)}else r.push(e)})),r}},{key:"render",value:function(){var e,t=this,n=this.props.show,r=this.state,i=r.playerAreaComponents,a=r.hasPositionedComponents;if(r.presetComponentsOnlyMode)return this.renderContent(this._actualChildren);if(!i||!n)return null;var o,s=[];a?s=this._getPositionedComponents(this._actualChildren):(o=s).push.apply(o,L()(ne(this._actualChildren)));var l=i.appendedComponents.map((function(e){return t._renderUIComponent(e)})),u=s.length;return(e=s).splice.apply(e,[u,0].concat(L()(l))),this.renderContent(s)}}]),i}(X),j()(Zn,"defaultProps",{show:!0}),Yn=Zn))||Yn)||Yn,kr=function(e,t){var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var i=0;i<n.length;i++)if(e[n[i]]!==t[n[i]])return!1;return!0};function Er(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _r(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Er(Object(n),!0).forEach((function(t){j()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Er(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Tr={ADD_PLAYER_CLASS:"shell/ADD_PLAYER_CLASS",REMOVE_PLAYER_CLASS:"shell/REMOVE_PLAYER_CLASS",UPDATE_IS_MOBILE:"shell/UPDATE_IS_MOBILE",UPDATE_PLAYER_SIZE:"shell/UPDATE_PLAYER_SIZE",UPDATE_IS_SMALL_SIZE:"shell/UPDATE_IS_SMALL_SIZE",UPDATE_GUI_CLIENT_RECT:"shell/UPDATE_GUI_CLIENT_RECT",UPDATE_PLAYER_CLIENT_RECT:"shell/UPDATE_PLAYER_CLIENT_RECT",UPDATE_VIDEO_CLIENT_RECT:"shell/UPDATE_VIDEO_CLIENT_RECT",UPDATE_DOCUMENT_WIDTH:"shell/UPDATE_DOCUMENT_WIDTH",UPDATE_PLAYER_HOVER_STATE:"shell/UPDATE_PLAYER_HOVER_STATE",UPDATE_PLAYER_NAV_STATE:"shell/UPDATE_PLAYER_NAV_STATE",UPDATE_SMART_CONTAINER_OPEN:"shell/UPDATE_SMART_CONTAINER_OPEN",UPDATE_ACTIVE_PRESET_NAME:"shell/UPDATE_ACTIVE_PRESET_NAME",UPDATE_SIDE_PANEL_MODE:"shell/UPDATE_SIDE_PANEL_MODE",UPDATE_SIDE_PANEL_SIZE:"shell/UPDATE_SIDE_PANEL_SIZE",UPDATE_PRESET_SETTINGS:"shell/UPDATE_PRESET_SETTINGS",UPDATE_LAYOUT_STYLES:"shell/UPDATE_LAYOUT_STYLES"},Ar={VERTICAL:"vertical",HORIZONTAL:"horizontal"},Sr={LEFT:"left",TOP:"top",BOTTOM:"bottom",RIGHT:"right"},wr={ALONGSIDE:"alongside",HIDDEN:"hidden",OVER:"over"},Cr={Playback:"Playback",Live:"Live",Ads:"Ads",Error:"Error",Idle:"Idle",Img:"Img",Document:"Document",MiniAudioUI:"MiniAudioUI"},xr={PlayerArea:"PlayerArea",PresetArea:"PresetArea",InteractiveArea:"InteractiveArea",VideoArea:"VideoArea",GuiArea:"GuiArea",TopBar:"TopBar",BottomBar:"BottomBar",PresetFloating:"PresetFloating",TopBarLeftControls:"TopBarLeftControls",TopBarRightControls:"TopBarRightControls",BottomBarLeftControls:"BottomBarLeftControls",BottomBarRightControls:"BottomBarRightControls",SidePanelTop:"SidePanelTop",SidePanelLeft:"SidePanelLeft",SidePanelRight:"SidePanelRight",SidePanelBottom:"SidePanelBottom",SeekBar:"SeekBar",LoadingSpinner:"LoadingSpinner"},Pr={x:0,y:0,width:0,height:0,top:0,right:0,bottom:0,left:0},Rr={position:"absolute",left:0,right:0,top:0,bottom:0},Ir={playerClasses:[],guiClientRect:Pr,playerClientRect:Pr,videoClientRect:Pr,layoutStyles:{video:Rr,gui:Rr,sidePanels:(yr={},j()(yr,Sr.LEFT,{}),j()(yr,Sr.RIGHT,{}),j()(yr,Sr.TOP,{}),j()(yr,Sr.BOTTOM,{}),yr)},playerHover:!1,playerNav:!1,smartContainerOpen:!1,activePresetName:"",sidePanelsModes:(gr={},j()(gr,Sr.LEFT,wr.HIDDEN),j()(gr,Sr.RIGHT,wr.HIDDEN),j()(gr,Sr.TOP,wr.HIDDEN),j()(gr,Sr.BOTTOM,wr.HIDDEN),gr),sidePanelsSizes:(vr={},j()(vr,Ar.VERTICAL,{min:240,max:480,ratio:.33}),j()(vr,Ar.HORIZONTAL,{min:144,max:288,ratio:.33}),vr),presetSettings:{allowSidePanels:!1,allowPlayerArea:!1}},Dr=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ir,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Tr.ADD_PLAYER_CLASS:return e.playerClasses.includes(t.className)?e:_r(_r({},e),{},{playerClasses:[].concat(L()(e.playerClasses),[t.className])});case Tr.REMOVE_PLAYER_CLASS:return _r(_r({},e),{},{playerClasses:e.playerClasses.filter((function(e){return e!==t.className}))});case Tr.UPDATE_IS_MOBILE:return _r(_r({},e),{},{isMobile:t.isMobile});case Tr.UPDATE_PLAYER_SIZE:return _r(_r({},e),{},{playerSize:t.playerSize});case Tr.UPDATE_IS_SMALL_SIZE:return _r(_r({},e),{},{isSmallSize:t.isSmallSize});case Tr.UPDATE_GUI_CLIENT_RECT:return _r(_r({},e),{},{guiClientRect:t.guiClientRect});case Tr.UPDATE_PLAYER_CLIENT_RECT:return _r(_r({},e),{},{playerClientRect:t.playerClientRect});case Tr.UPDATE_LAYOUT_STYLES:var n,r=e.layoutStyles,i=r.sidePanels,a=r.video,o=r.gui,s=t.layoutStyles,l=s.sidePanels,u=s.video,c=s.gui;return _r(_r({},e),{},{layoutStyles:{sidePanels:(n={},j()(n,Sr.LEFT,kr(i[Sr.LEFT],l[Sr.LEFT])?i[Sr.LEFT]:l[Sr.LEFT]),j()(n,Sr.RIGHT,kr(i[Sr.RIGHT],l[Sr.RIGHT])?i[Sr.RIGHT]:l[Sr.RIGHT]),j()(n,Sr.TOP,kr(i[Sr.TOP],l[Sr.TOP])?i[Sr.TOP]:l[Sr.TOP]),j()(n,Sr.BOTTOM,kr(i[Sr.BOTTOM],l[Sr.BOTTOM])?i[Sr.BOTTOM]:l[Sr.BOTTOM]),n),video:kr(a,u)?a:u,gui:kr(o,c)?o:c}});case Tr.UPDATE_VIDEO_CLIENT_RECT:return _r(_r({},e),{},{videoClientRect:t.videoClientRect});case Tr.UPDATE_DOCUMENT_WIDTH:return _r(_r({},e),{},{documentWidth:t.documentWidth});case Tr.UPDATE_PLAYER_HOVER_STATE:return _r(_r({},e),{},{playerHover:t.hover});case Tr.UPDATE_PLAYER_NAV_STATE:return _r(_r({},e),{},{playerNav:t.nav});case Tr.UPDATE_SMART_CONTAINER_OPEN:return _r(_r({},e),{},{smartContainerOpen:t.open});case Tr.UPDATE_ACTIVE_PRESET_NAME:return _r(_r({},e),{},{activePresetName:t.activePresetName});case Tr.UPDATE_SIDE_PANEL_MODE:return _r(_r({},e),{},{sidePanelsModes:_r(_r({},e.sidePanelsModes),{},j()({},t.position,t.sidePanelMode))});case Tr.UPDATE_SIDE_PANEL_SIZE:var d=t.options,p=d.ratio,f=d.min,h=d.max,y=e.sidePanelsSizes[t.orientation],g={ratio:"number"==typeof p&&p<=1?p:y.ratio,min:"number"==typeof f?f:y.min,max:"number"==typeof h?h:y.max};return _r(_r({},e),{},{sidePanelsSizes:_r(_r({},e.sidePanelsSizes),{},j()({},t.orientation,g))});case Tr.UPDATE_PRESET_SETTINGS:return _r(_r({},e),{},{presetSettings:_r(_r({},{allowSidePanels:!1,allowPlayerArea:!1}),t.presetSettings||{})});default:return e}},Or={addPlayerClass:function(e){return{type:Tr.ADD_PLAYER_CLASS,className:e}},removePlayerClass:function(e){return{type:Tr.REMOVE_PLAYER_CLASS,className:e}},updateIsMobile:function(e){return{type:Tr.UPDATE_IS_MOBILE,isMobile:e}},updatePlayerSize:function(e){return{type:Tr.UPDATE_PLAYER_SIZE,playerSize:e}},updateIsSmallSize:function(e){return{type:Tr.UPDATE_IS_SMALL_SIZE,isSmallSize:e}},updateGuiClientRect:function(e){return{type:Tr.UPDATE_GUI_CLIENT_RECT,guiClientRect:e}},updatePlayerClientRect:function(e){return{type:Tr.UPDATE_PLAYER_CLIENT_RECT,playerClientRect:e}},updateVideoClientRect:function(e){return{type:Tr.UPDATE_VIDEO_CLIENT_RECT,videoClientRect:e}},updateDocumentWidth:function(e){return{type:Tr.UPDATE_DOCUMENT_WIDTH,documentWidth:e}},updatePlayerHoverState:function(e){return{type:Tr.UPDATE_PLAYER_HOVER_STATE,hover:e}},updatePlayerNavState:function(e){return{type:Tr.UPDATE_PLAYER_NAV_STATE,nav:e}},updateSmartContainerOpen:function(e){return{type:Tr.UPDATE_SMART_CONTAINER_OPEN,open:e}},updateActivePresetName:function(e){return{type:Tr.UPDATE_ACTIVE_PRESET_NAME,activePresetName:e}},updateSidePanelMode:function(e,t){return{type:Tr.UPDATE_SIDE_PANEL_MODE,position:e,sidePanelMode:t}},updateSidePanelSize:function(e,t){return{type:Tr.UPDATE_SIDE_PANEL_SIZE,orientation:e,options:t}},updatePresetSettings:function(e){return{type:Tr.UPDATE_PRESET_SETTINGS,presetSettings:e}},updateLayoutStyles:function(e){return{type:Tr.UPDATE_LAYOUT_STYLES,layoutStyles:e}}};function Lr(e){return function(t){return zt(e,t)}}function Mr(e){var t=setInterval((function(){e&&"hidden"!==getComputedStyle(e).visibility&&(e.focus(),clearInterval(t))}),arguments.length>1&&void 0!==arguments[1]?arguments[1]:100)}var Nr=function(e){return function(t){tr()(a,t);var n,r,i=(n=a,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=ar()(n);if(r){var i=ar()(this).constructor;e=Reflect.construct(t,arguments,i)}else e=t.apply(this,arguments);return rr()(this,e)});function a(){var e;N()(this,a);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e=i.call.apply(i,[this].concat(n)),j()(Jn()(e),"_defaultFocusedElement",void 0),j()(Jn()(e),"_accessibleChildren",[]),j()(Jn()(e),"_previouslyActiveElement",void 0),j()(Jn()(e),"_isModal",!1),j()(Jn()(e),"onKeyDown",(function(t){switch(t.keyCode){case cr.ESC:e.props.onClose&&(e.props.onClose(),t.stopPropagation());break;case cr.DOWN:case cr.UP:if(document.activeElement&&!e._isModal){var n=e._accessibleChildren.indexOf(document.activeElement);n=(n+(t.keyCode==cr.DOWN?1:-1)+e._accessibleChildren.length)%e._accessibleChildren.length,e._accessibleChildren[n].focus(),t.preventDefault(),t.stopPropagation()}break;case cr.TAB:e._isModal?t.shiftKey||document.activeElement!==e._accessibleChildren[e._accessibleChildren.length-1]?t.shiftKey&&document.activeElement===e._accessibleChildren[0]&&(e._accessibleChildren[e._accessibleChildren.length-1].focus(),t.preventDefault(),t.stopPropagation()):(e._accessibleChildren[0].focus(),t.preventDefault(),t.stopPropagation()):(e._previouslyActiveElement=null,e.props.onClose&&e.props.onClose())}})),j()(Jn()(e),"setDefaultFocusedElement",(function(t){t&&(e._defaultFocusedElement=t)})),j()(Jn()(e),"addAccessibleChild",(function(t,n){t&&-1==e._accessibleChildren.indexOf(t)&&(n?e._accessibleChildren.unshift(t):e._accessibleChildren.push(t))})),j()(Jn()(e),"clearAccessibleChildren",(function(){e._accessibleChildren=[]})),j()(Jn()(e),"focusOnDefault",(function(){var t=e._defaultFocusedElement||e._accessibleChildren.length&&e._accessibleChildren[0];t&&(e._previouslyActiveElement=document.activeElement,t.focus())})),j()(Jn()(e),"setIsModel",(function(t){e.isModal=t})),e}return B()(a,[{key:"componentDidMount",value:function(){this.focusOnDefault()}},{key:"componentWillUnmount",value:function(){this._previouslyActiveElement&&document.contains(this._previouslyActiveElement)&&Mr(this._previouslyActiveElement)}},{key:"render",value:function(t){return W(e,Qn()({},t,{setDefaultFocusedElement:this.setDefaultFocusedElement,focusOnDefault:this.focusOnDefault,addAccessibleChild:this.addAccessibleChild,clearAccessibleChildren:this.clearAccessibleChildren,handleKeyDown:this.onKeyDown,setIsModal:this.setIsModel}))}},{key:"isModal",set:function(e){this._isModal=e}}]),a}(X)};function Ur(e){var t=parseInt(e,10),n=Math.floor(t/3600),r=Math.floor((t-3600*n)/60),i=t-3600*n-60*r,a=n,o=r,s=i;return n<10&&(a="0"+n),r<10&&(o="0"+r),i<10&&(s="0"+i),"".concat("00"!==a?a+":":"").concat(o,":").concat(s)}function Br(e){for(var t=e.split(":"),n=0,r=1,i=t.length-1;i>=0;i--){var a=parseInt(t[i]);if(isNaN(a)||a>59){n=0;break}n+=a*r,r*=60}return n}function Fr(e){var t=parseInt(e);return t<10?"00:0"+e:t<=59?"00:"+e:Ur(t)}var jr=r(25),Hr=r.n(jr);function Vr(e,t,n){var r=n.config.components&&n.config.components[e];return r?Gn(t,r):t}function Gr(e,t,n){return n.componentAlias===e?Gn(t,n.config):t}function Kr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function zr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Kr(Object(n),!0).forEach((function(t){j()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Kr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Wr={UPDATE:"config/UPDATE",UPDATE_COMPONENT:"config/UPDATE_COMPONENT",RESET:"config/RESET"},Yr={targetId:void 0,forceTouchUI:!1,showCCButton:!0,openMenuFromCCButton:!1,settings:{showAudioMenu:!0,showCaptionsMenu:!0,showQualityMenu:!0,showSpeedMenu:!0,showAdvancedAudioDescToggle:!1,showAdvancedCaptionsMenu:!0},hoverTimeout:3e3,tinySizeDisabled:!1,components:{watermark:{},seekbar:{},vrStereo:{},logo:{},fullscreen:{},sidePanels:{}}},Zr=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Yr,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Wr.UPDATE:var n=Gn({},e,t.config);return zr(zr({},e),n);case Wr.UPDATE_COMPONENT:return zr(zr({},e),{},{components:zr(zr({},e.components),{},j()({},t.componentAlias,Gn({},e.components[t.componentAlias],t.config)))});default:return e}},qr={updateConfig:function(e){return{type:Wr.UPDATE,config:e}},updateComponentConfig:function(e,t){return{type:Wr.UPDATE_COMPONENT,componentAlias:e,config:t}}};function Xr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Qr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Xr(Object(n),!0).forEach((function(t){j()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var $r,Jr="engine",ei={UPDATE_PLAYER_STATE:"".concat(Jr,"/UPDATE_PLAYER_STATE"),UPDATE_PRE_PLAYBACK:"".concat(Jr,"/UPDATE_PRE_PLAYBACK"),UPDATE_IS_PLAYING:"".concat(Jr,"/UPDATE_IS_PLAYING"),UPDATE_IS_PAUSED:"".concat(Jr,"/UPDATE_IS_PAUSED"),UPDATE_IS_SEEKING:"".concat(Jr,"/UPDATE_IS_SEEKING"),UPDATE_LAST_SEEK_POINT:"".concat(Jr,"/UPDATE_LAST_SEEK_POINT"),UPDATE_IS_CHANGING_SOURCE:"".concat(Jr,"/UPDATE_IS_CHANGING_SOURCE"),UPDATE_IS_ENDED:"".concat(Jr,"/UPDATE_IS_ENDED"),UPDATE_IS_PLAYBACK_STARTED:"".concat(Jr,"/UPDATE_IS_PLAYBACK_STARTED"),UPDATE_IS_PLAYBACK_ENDED:"".concat(Jr,"/UPDATE_IS_PLAYBACK_ENDED"),UPDATE_CURRENT_TIME:"".concat(Jr,"/UPDATE_CURRENT_TIME"),UPDATE_DURATION:"".concat(Jr,"/UPDATE_DURATION"),UPDATE_VOLUME:"".concat(Jr,"/UPDATE_VOLUME"),UPDATE_MUTED:"".concat(Jr,"/UPDATE_MUTED"),UPDATE_METADATA_LOADING_STATUS:"".concat(Jr,"/UPDATE_METADATA_LOADING_STATUS"),UPDATE_DATA_LOADING_STATUS:"".concat(Jr,"/UPDATE_DATA_LOADING_STATUS"),UPDATE_AUDIO_TRACKS:"".concat(Jr,"/UPDATE_AUDIO_TRACKS"),UPDATE_VIDEO_TRACKS:"".concat(Jr,"/UPDATE_VIDEO_TRACKS"),UPDATE_TEXT_TRACKS:"".concat(Jr,"/UPDATE_TEXT_TRACKS"),UPDATE_AD_BREAK:"".concat(Jr,"/UPDATE_AD_BREAK"),UPDATE_AD_BREAK_PROGRESS:"".concat(Jr,"/UPDATE_AD_BREAK_PROGRESS"),UPDATE_AD_BREAK_COMPLETED:"".concat(Jr,"/UPDATE_AD_BREAK_COMPLETED"),UPDATE_AD_IS_PLAYING:"".concat(Jr,"/UPDATE_AD_IS_PLAYING"),UPDATE_AD_SKIP_TIME_OFFSET:"".concat(Jr,"/UPDATE_AD_SKIP_TIME_OFFSET"),UPDATE_AD_SKIPPABLE_STATE:"".concat(Jr,"/UPDATE_AD_SKIPPABLE_STATE"),UPDATE_AD_URL:"".concat(Jr,"/UPDATE_AD_URL"),UPDATE_AD_IS_LINEAR:"".concat(Jr,"/UPDATE_AD_IS_LINEAR"),UPDATE_AD_IS_BUMPER:"".concat(Jr,"/UPDATE_AD_IS_BUMPER"),UPDATE_AD_CONTENT_TYPE:"".concat(Jr,"/UPDATE_AD_CONTENT_TYPE"),UPDATE_PLAYER_POSTER:"".concat(Jr,"/UPDATE_PLAYER_POSTER"),UPDATE_IS_AUDIO:"".concat(Jr,"/UPDATE_IS_AUDIO"),UPDATE_IS_LIVE:"".concat(Jr,"/UPDATE_IS_LIVE"),UPDATE_IS_DVR:"".concat(Jr,"/UPDATE_IS_DVR"),UPDATE_IS_IMG:"".concat(Jr,"/UPDATE_IS_IMG"),UPDATE_IS_DOCUMENT:"".concat(Jr,"/UPDATE_IS_DOCUMENT"),UPDATE_ERROR:"".concat(Jr,"/ERROR"),UPDATE_ERROR_DETAILS:"".concat(Jr,"/ERROR_DETAILS"),UPDATE_IS_IDLE:"".concat(Jr,"/UPDATE_IS_IDLE"),UPDATE_FALLBACK_TO_MUTED_AUTOPLAY:"".concat(Jr,"/UPDATE_FALLBACK_TO_MUTED_AUTOPLAY"),UPDATE_IS_VR:"".concat(Jr,"/UPDATE_IS_VR"),UPDATE_VR_STEREO_MODE:"".concat(Jr,"/UPDATE_VR_STEREO_MODE"),UPDATE_IS_CASTING:"".concat(Jr,"/UPDATE_IS_CASTING"),UPDATE_CAST_SESSION:"".concat(Jr,"/UPDATE_CAST_SESSION"),UPDATE_IS_CAST_AVAILABLE:"".concat(Jr,"/UPDATE_IS_CAST_AVAILABLE"),UPDATE_PLAYLIST:"".concat(Jr,"/UPDATE_PLAYLIST"),UPDATE_PICTURE_IN_PICTURE_SUPPORTED:"".concat(Jr,"/UPDATE_PICTURE_IN_PICTURE_SUPPORTED"),UPDATE_PICTURE_IN_PICTURE_MODE:"".concat(Jr,"/UPDATE_PICTURE_IN_PICTURE_MODE"),UPDATE_FULLSCREEN:"".concat(Jr,"/UPDATE_FULLSCREEN")},ti={isIdle:!1,isPlaying:!1,isPaused:!0,isSeeking:!1,isEnded:!1,isPlaybackStarted:!1,isPlaybackEnded:!1,isChangingSource:!1,prePlayback:!0,metadataLoaded:!1,dataLoaded:!1,playerState:{previousState:"",currentState:""},fallbackToMutedAutoPlay:!1,poster:"",currentTime:0,lastSeekPoint:0,duration:0,volume:1,muted:!1,videoTracks:[],audioTracks:[],textTracks:[],adIsLinear:!1,adBreak:!1,adIsPlaying:!1,adSkipTimeOffset:0,adSkippableState:!1,adIsBumper:!1,adContentType:null,isLive:!1,isDvr:!1,isImg:!1,isDocument:!1,isAudio:!1,adProgress:{currentTime:0,duration:0},adUrl:"",hasError:!1,errorDetails:{errorCategory:void 0,errorTitle:void 0,errorMessage:void 0},isVr:!1,vrStereoMode:!1,isCasting:!1,castSession:null,isCastAvailable:!1,pictureInPictureSupported:!1,isInPictureInPicture:!1,playlist:null,fullscreen:!1},ni=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ti,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Wr.UPDATE:return Vr(Jr,e,t);case Wr.UPDATE_COMPONENT:return Gr(Jr,e,t);case ei.UPDATE_ERROR:return Qr(Qr({},e),{},{hasError:t.hasError});case ei.UPDATE_ERROR_DETAILS:return Qr(Qr({},e),{},{errorDetails:t.errorDetails});case ei.UPDATE_PLAYER_STATE:return Qr(Qr({},e),{},{playerState:t.playerState});case ei.UPDATE_PRE_PLAYBACK:return Qr(Qr({},e),{},{prePlayback:t.prePlayback});case ei.UPDATE_IS_PLAYING:return Qr(Qr({},e),{},{isPlaying:t.isPlaying});case ei.UPDATE_IS_PAUSED:return Qr(Qr({},e),{},{isPaused:t.isPaused});case ei.UPDATE_IS_SEEKING:return Qr(Qr({},e),{},{isSeeking:t.isSeeking});case ei.UPDATE_LAST_SEEK_POINT:return Qr(Qr({},e),{},{lastSeekPoint:t.lastSeekPoint});case ei.UPDATE_IS_ENDED:return Qr(Qr({},e),{},{isEnded:t.isEnded});case ei.UPDATE_IS_PLAYBACK_STARTED:return Qr(Qr({},e),{},{isPlaybackStarted:t.isPlaybackStarted});case ei.UPDATE_IS_PLAYBACK_ENDED:return Qr(Qr({},e),{},{isPlaybackEnded:t.isPlaybackEnded});case ei.UPDATE_CURRENT_TIME:return Qr(Qr({},e),{},{currentTime:t.currentTime});case ei.UPDATE_DURATION:return Qr(Qr({},e),{},{duration:t.duration});case ei.UPDATE_VOLUME:return Qr(Qr({},e),{},{volume:t.volume});case ei.UPDATE_MUTED:return Qr(Qr({},e),{},{muted:t.muted});case ei.UPDATE_METADATA_LOADING_STATUS:return Qr(Qr({},e),{},{metadataLoaded:t.metadataLoaded});case ei.UPDATE_DATA_LOADING_STATUS:return Qr(Qr({},e),{},{dataLoaded:t.dataLoaded});case ei.UPDATE_AUDIO_TRACKS:return Qr(Qr({},e),{},{audioTracks:t.tracks});case ei.UPDATE_VIDEO_TRACKS:return Qr(Qr({},e),{},{videoTracks:t.tracks});case ei.UPDATE_TEXT_TRACKS:return Qr(Qr({},e),{},{textTracks:t.tracks});case ei.UPDATE_AD_BREAK:return Qr(Qr({},e),{},{adBreak:t.adBreak});case ei.UPDATE_AD_BREAK_PROGRESS:return Qr(Qr({},e),{},{adProgress:t.adProgress});case ei.UPDATE_AD_BREAK_COMPLETED:return Qr(Qr({},e),{},{adProgress:{currentTime:e.adProgress.duration,duration:e.adProgress.duration}});case ei.UPDATE_AD_IS_PLAYING:return Qr(Qr({},e),{},{adIsPlaying:t.adIsPlaying});case ei.UPDATE_AD_IS_LINEAR:return Qr(Qr({},e),{},{adIsLinear:t.adIsLinear});case ei.UPDATE_AD_SKIP_TIME_OFFSET:return Qr(Qr({},e),{},{adSkipTimeOffset:t.adSkipTimeOffset});case ei.UPDATE_AD_SKIPPABLE_STATE:return Qr(Qr({},e),{},{adSkippableState:t.adSkippableState});case ei.UPDATE_AD_URL:return Qr(Qr({},e),{},{adUrl:t.adUrl});case ei.UPDATE_AD_IS_BUMPER:return Qr(Qr({},e),{},{adIsBumper:t.adIsBumper});case ei.UPDATE_AD_CONTENT_TYPE:return Qr(Qr({},e),{},{adContentType:t.adContentType});case ei.UPDATE_PLAYER_POSTER:return Qr(Qr({},e),{},{poster:t.poster});case ei.UPDATE_IS_AUDIO:return Qr(Qr({},e),{},{isAudio:t.isAudio});case ei.UPDATE_IS_LIVE:return Qr(Qr({},e),{},{isLive:t.isLive});case ei.UPDATE_IS_DVR:return Qr(Qr({},e),{},{isDvr:t.isDvr});case ei.UPDATE_IS_IMG:return Qr(Qr({},e),{},{isImg:t.isImg});case ei.UPDATE_IS_DOCUMENT:return Qr(Qr({},e),{},{isDocument:t.isDocument});case ei.UPDATE_IS_IDLE:return Qr(Qr({},e),{},{isIdle:t.IsIdle});case ei.UPDATE_FALLBACK_TO_MUTED_AUTOPLAY:return Qr(Qr({},e),{},{fallbackToMutedAutoPlay:t.fallback});case ei.UPDATE_IS_VR:return Qr(Qr({},e),{},{isVr:t.isVr});case ei.UPDATE_VR_STEREO_MODE:return Qr(Qr({},e),{},{vrStereoMode:t.vrStereoMode});case ei.UPDATE_IS_CASTING:return Qr(Qr({},e),{},{isCasting:t.isCasting});case ei.UPDATE_CAST_SESSION:return Qr(Qr({},e),{},{castSession:t.castSession});case ei.UPDATE_IS_CAST_AVAILABLE:return Qr(Qr({},e),{},{isCastAvailable:t.isCastAvailable});case ei.UPDATE_IS_CHANGING_SOURCE:return Qr(Qr({},e),{},{isChangingSource:t.isChangingSource});case ei.UPDATE_PLAYLIST:return Qr(Qr({},e),{},{playlist:t.playlist});case ei.UPDATE_PICTURE_IN_PICTURE_SUPPORTED:return Qr(Qr({},e),{},{isPictureInPictureSupported:t.isPictureInPictureSupported});case ei.UPDATE_PICTURE_IN_PICTURE_MODE:return Qr(Qr({},e),{},{isInPictureInPicture:t.isInPictureInPicture});case ei.UPDATE_FULLSCREEN:return Qr(Qr({},e),{},{fullscreen:t.fullscreen});default:return e}},ri={updateHasError:function(e){return{type:ei.UPDATE_ERROR,hasError:e}},updateErrorDetails:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return{type:ei.UPDATE_ERROR_DETAILS,errorDetails:{errorCategory:e,errorTitle:t,errorMessage:n}}},updatePlayerState:function(e,t){return{type:ei.UPDATE_PLAYER_STATE,playerState:{prevoiusState:e,currentState:t}}},updatePrePlayback:function(e){return{type:ei.UPDATE_PRE_PLAYBACK,prePlayback:e}},updateIsPlaying:function(e){return{type:ei.UPDATE_IS_PLAYING,isPlaying:e}},updateIsPaused:function(e){return{type:ei.UPDATE_IS_PAUSED,isPaused:e}},updateIsSeeking:function(e){return{type:ei.UPDATE_IS_SEEKING,isSeeking:e}},updateLastSeekPoint:function(e){return{type:ei.UPDATE_LAST_SEEK_POINT,lastSeekPoint:e}},updateIsEnded:function(e){return{type:ei.UPDATE_IS_ENDED,isEnded:e}},updateIsPlaybackStarted:function(e){return{type:ei.UPDATE_IS_PLAYBACK_STARTED,isPlaybackStarted:e}},updateIsPlaybackEnded:function(e){return{type:ei.UPDATE_IS_PLAYBACK_ENDED,isPlaybackEnded:e}},updateCurrentTime:function(e){return{type:ei.UPDATE_CURRENT_TIME,currentTime:e}},updateDuration:function(e){return{type:ei.UPDATE_DURATION,duration:e}},updateVolume:function(e){return{type:ei.UPDATE_VOLUME,volume:e}},updateMuted:function(e){return{type:ei.UPDATE_MUTED,muted:e}},updateMetadataLoadingStatus:function(e){return{type:ei.UPDATE_METADATA_LOADING_STATUS,metadataLoaded:e}},updateDataLoadingStatus:function(e){return{type:ei.UPDATE_DATA_LOADING_STATUS,dataLoaded:e}},updateAudioTracks:function(e){return{type:ei.UPDATE_AUDIO_TRACKS,tracks:e}},updateVideoTracks:function(e){return{type:ei.UPDATE_VIDEO_TRACKS,tracks:e}},updateTextTracks:function(e){return{type:ei.UPDATE_TEXT_TRACKS,tracks:e}},updateAdBreak:function(e){return{type:ei.UPDATE_AD_BREAK,adBreak:e}},updateAdBreakProgress:function(e,t){return{type:ei.UPDATE_AD_BREAK_PROGRESS,adProgress:{currentTime:e,duration:t}}},updateAdBreakCompleted:function(){return{type:ei.UPDATE_AD_BREAK_COMPLETED}},updateAdIsPlaying:function(e){return{type:ei.UPDATE_AD_IS_PLAYING,adIsPlaying:e}},updateAdSkipTimeOffset:function(e){return{type:ei.UPDATE_AD_SKIP_TIME_OFFSET,adSkipTimeOffset:e}},updateAdSkippableState:function(e){return{type:ei.UPDATE_AD_SKIPPABLE_STATE,adSkippableState:e}},updateAdClickUrl:function(e){return{type:ei.UPDATE_AD_URL,adUrl:e}},updateAdIsLinear:function(e){return{type:ei.UPDATE_AD_IS_LINEAR,adIsLinear:e}},updateAdIsBumper:function(e){return{type:ei.UPDATE_AD_IS_BUMPER,adIsBumper:e}},updateAdContentType:function(e){return{type:ei.UPDATE_AD_CONTENT_TYPE,adContentType:e}},updatePlayerPoster:function(e){return{type:ei.UPDATE_PLAYER_POSTER,poster:e}},updateIsAudio:function(e){return{type:ei.UPDATE_IS_AUDIO,isAudio:e}},updateIsLive:function(e){return{type:ei.UPDATE_IS_LIVE,isLive:e}},updateIsDvr:function(e){return{type:ei.UPDATE_IS_DVR,isDvr:e}},updateIsImg:function(e){return{type:ei.UPDATE_IS_IMG,isImg:e}},updateIsDocument:function(e){return{type:ei.UPDATE_IS_DOCUMENT,isDocument:e}},updateIsIdle:function(e){return{type:ei.UPDATE_IS_IDLE,IsIdle:e}},updateFallbackToMutedAutoPlay:function(e){return{type:ei.UPDATE_FALLBACK_TO_MUTED_AUTOPLAY,fallback:e}},updateIsVr:function(e){return{type:ei.UPDATE_IS_VR,isVr:e}},updateVrStereoMode:function(e){return{type:ei.UPDATE_VR_STEREO_MODE,vrStereoMode:e}},updateIsCasting:function(e){return{type:ei.UPDATE_IS_CASTING,isCasting:e}},updateCastSession:function(e){return{type:ei.UPDATE_CAST_SESSION,castSession:e}},updateIsCastAvailable:function(e){return{type:ei.UPDATE_IS_CAST_AVAILABLE,isCastAvailable:e}},updateIsChangingSource:function(e){return{type:ei.UPDATE_IS_CHANGING_SOURCE,isChangingSource:e}},updatePlaylist:function(e){return{type:ei.UPDATE_PLAYLIST,playlist:e}},updatePictureInPictureSupport:function(e){return{type:ei.UPDATE_PICTURE_IN_PICTURE_SUPPORTED,isPictureInPictureSupported:e}},updateIsInPictureInPicture:function(e){return{type:ei.UPDATE_PICTURE_IN_PICTURE_MODE,isInPictureInPicture:e}},updateFullscreen:function(e){return{type:ei.UPDATE_FULLSCREEN,fullscreen:e}}},ii=function(e){tr()(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=ar()(t);if(n){var i=ar()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return rr()(this,e)});function i(){return N()(this,i),r.apply(this,arguments)}return B()(i,[{key:"getChildContext",value:function(){return{player:this.props.player}}},{key:"render",value:function(){return this.props.children&&ne(this.props.children)[0]||null}}]),i}(X),ai=function(e){return function(t){tr()(a,t);var n,r,i=(n=a,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=ar()(n);if(r){var i=ar()(this).constructor;e=Reflect.construct(t,arguments,i)}else e=t.apply(this,arguments);return rr()(this,e)});function a(e){return N()(this,a),i.call(this)}return B()(a,[{key:"render",value:function(){var t=this.context.player;return W(e,Qn()({},this.props,{player:t}))}}]),a}(X)},oi=function(e){tr()(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=ar()(t);if(n){var i=ar()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return rr()(this,e)});function i(e){var t;return N()(this,i),(t=r.call(this,ur.USER_SELECTED_AUDIO_TRACK)).payload={audioTrack:e},t}return i}(or.FakeEvent),si=function(e){tr()(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=ar()(t);if(n){var i=ar()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return rr()(this,e)});function i(e){var t;return N()(this,i),(t=r.call(this,ur.USER_SELECTED_CAPTION_TRACK)).payload={captionTrack:e},t}return i}(or.FakeEvent),li=function(e){tr()(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=ar()(t);if(n){var i=ar()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return rr()(this,e)});function i(e){var t;return N()(this,i),(t=r.call(this,ur.USER_SELECTED_QUALITY_TRACK)).payload={qualityTrack:e},t}return i}(or.FakeEvent),ui=function(e){tr()(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=ar()(t);if(n){var i=ar()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return rr()(this,e)});function i(e,t){var n;return N()(this,i),(n=r.call(this,ur.USER_SEEKED)).payload={from:e,to:t},n}return i}(or.FakeEvent),ci=function(e){tr()(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=ar()(t);if(n){var i=ar()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return rr()(this,e)});function i(e){var t;return N()(this,i),(t=r.call(this,ur.USER_SELECTED_SPEED)).payload={speed:e},t}return i}(or.FakeEvent),di=function(e){tr()(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=ar()(t);if(n){var i=ar()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return rr()(this,e)});function i(e){var t;return N()(this,i),(t=r.call(this,ur.UI_VISIBILITY_CHANGED)).payload={visible:e},t}return i}(or.FakeEvent),pi=function(e){tr()(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=ar()(t);if(n){var i=ar()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return rr()(this,e)});function i(e,t){var n;return N()(this,i),(n=r.call(this,ur.USER_CLICKED_REWIND)).payload={from:e,to:t},n}return i}(or.FakeEvent),fi=function(e){tr()(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=ar()(t);if(n){var i=ar()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return rr()(this,e)});function i(e,t){var n;return N()(this,i),(n=r.call(this,ur.USER_CLICKED_FORWARD)).payload={from:e,to:t},n}return i}(or.FakeEvent),hi=function(e){tr()(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=ar()(t);if(n){var i=ar()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return rr()(this,e)});function i(e){var t;return N()(this,i),(t=r.call(this,ur.USER_CHANGED_VOLUME)).payload={volume:e},t}return i}(or.FakeEvent),yi=function(e){tr()(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=ar()(t);if(n){var i=ar()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return rr()(this,e)});function i(){var e;N()(this,i);for(var t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];return e=r.call.apply(r,[this].concat(n)),j()(Jn()(e),"_notifyClick",(function(t){return function(e,t,n){switch(t.name){case"Keyboard":Ai[t.payload.key](e,t,n);break;case"OverlayAction":!function(e,t,n){"PlayPause"===t.payload.type?gi(e,0,n):"Fullscreen"===t.payload.type&&mi(0,0,n)}(e,t,n);break;case"CVAAOverlay":!function(e,t,n){var r,i=n.textStyle,a=null===(r=t.payload)||void 0===r?void 0:r.textStyle;[{key:"fontSize",eventType:ur.USER_SELECTED_CAPTIONS_SIZE},{key:"textAlign",eventType:ur.USER_SELECTED_CAPTIONS_ALIGNMENT},{key:"fontFamily",eventType:ur.USER_SELECTED_CAPTIONS_FONT_FAMILY},{key:"fontOpacity",eventType:ur.USER_SELECTED_CAPTIONS_FONT_OPACITY},{key:"backgroundOpacity",eventType:ur.USER_SELECTED_CAPTIONS_BACKGROUND_OPACITY},{key:"backgroundColor",eventType:ur.USER_SELECTED_CAPTIONS_BACKGROUND_COLOR,collection:n.TextStyle.StandardColors},{key:"fontColor",eventType:ur.USER_SELECTED_CAPTIONS_FONT_COLOR,collection:n.TextStyle.StandardColors},{key:"fontEdge",eventType:ur.USER_SELECTED_CAPTIONS_FONT_STYLE,collection:n.TextStyle.EdgeStyles}].map((function(e){var t=e.key,r=e.eventType,o=e.collection;o&&!kr(null==i?void 0:i[t],null==a?void 0:a[t])?Object.keys(o).some((function(e){if(kr(o[e],null==a?void 0:a[t]))return n.dispatchEvent(new or.FakeEvent(r,e.toLowerCase())),!0})):(null==i?void 0:i[t])!==(null==a?void 0:a[t])&&n.dispatchEvent(new or.FakeEvent(r,null==a?void 0:a[t]))}))}(0,t,n);break;case"Fullscreen":mi(0,0,n);break;case"CaptionsMenu":!function(e,t,n){t.payload.type===n.Track.TEXT&&n.dispatchEvent(new si(t.payload.track))}(0,t,n);break;case"AudioMenu":!function(e,t,n){t.payload.type===n.Track.AUDIO&&n.dispatchEvent(new oi(t.payload.track))}(0,t,n);break;case"QualityMenu":!function(e,t,n){t.payload.type===n.Track.VIDEO&&n.dispatchEvent(new li(t.payload.track))}(0,t,n);break;case"SpeedMenu":!function(e,t,n){"speed"===t.payload.type&&n.dispatchEvent(new ci(t.payload.speed))}(0,t,n);break;case"AdvancedAudioDescToggle":case"AdvancedAudioDesc":!function(e,t,n){"AdvancedAudioDescription"===t.payload.type&&n.dispatchEvent(new or.FakeEvent(ur.USER_CLICKED_ADVANCED_AUDIO_DESCRIPTION,t.payload))}(0,t,n);break;case"Shell":n.dispatchEvent(new or.FakeEvent(ur.UI_CLICKED));break;case"Rewind":n.dispatchEvent(new pi(t.payload.from,t.payload.to));break;case"Forward":n.dispatchEvent(new fi(t.payload.from,t.payload.to));break;case"LiveTag":n.dispatchEvent(new or.FakeEvent(ur.USER_CLICKED_LIVE_TAG));break;case"Logo":n.dispatchEvent(new or.FakeEvent(ur.USER_CLICKED_LOGO,t.payload));break;case"PrePlaybackPlayOverlay":case"PlayPause":gi(e,0,n);break;case"Volume":vi(e,0,n);break;case"PictureInPicture":bi(0,0,n);break;case"ClosedCaptions":!function(e,t,n){t.payload?n.dispatchEvent(new or.FakeEvent(ur.USER_HID_CAPTIONS)):n.dispatchEvent(new or.FakeEvent(ur.USER_SHOWED_CAPTIONS))}(0,t,n)}}(e.props.store,t,e.props.player)})),j()(Jn()(e),"_notifyChange",(function(t){return function(e,t,n){switch(t.name){case"Volume":n.dispatchEvent(new hi(t.payload.volume));break;case"SeekBarPlaybackContainer":case"SeekBarLivePlaybackContainer":n.dispatchEvent(new ui(t.payload.from,t.payload.to));break;case"ActivePreset":n.dispatchEvent(new or.FakeEvent(ur.UI_PRESET_CHANGE,t.payload))}}(e.props.store,t,e.props.player)})),j()(Jn()(e),"_notifyHoverChange",(function(t){return function(e,t,n){var r=e.getState().engine,i=e.getState().shell;!r.adBreak&&r.isPlaying&&i.playerHover!==t.payload.hover&&n.dispatchEvent(new di(t.payload.hover))}(e.props.store,t,e.props.player)})),e}return B()(i,[{key:"getChildContext",value:function(){return{notifyClick:this._notifyClick,notifyChange:this._notifyChange,notifyHoverChange:this._notifyHoverChange}}},{key:"render",value:function(){return this.props.children&&ne(this.props.children)[0]||null}}]),i}(X);function gi(e,t,n){var r=e.getState().engine;r.adBreak?r.adIsPlaying?n.dispatchEvent(new or.FakeEvent(ur.USER_CLICKED_PAUSE)):n.dispatchEvent(new or.FakeEvent(ur.USER_CLICKED_PLAY)):r.isPlaying?n.dispatchEvent(new or.FakeEvent(ur.USER_CLICKED_PAUSE)):n.dispatchEvent(new or.FakeEvent(ur.USER_CLICKED_PLAY))}function vi(e,t,n){e.getState().engine.muted?n.dispatchEvent(new or.FakeEvent(ur.USER_CLICKED_MUTE)):n.dispatchEvent(new or.FakeEvent(ur.USER_CLICKED_UNMUTE))}function mi(e,t,n){n.isFullscreen()?n.dispatchEvent(new or.FakeEvent(ur.USER_EXITED_FULL_SCREEN)):n.dispatchEvent(new or.FakeEvent(ur.USER_ENTERED_FULL_SCREEN))}function bi(e,t,n){n.isInPictureInPicture()?n.dispatchEvent(new or.FakeEvent(ur.USER_EXITED_PICTURE_IN_PICTURE)):n.dispatchEvent(new or.FakeEvent(ur.USER_ENTERED_PICTURE_IN_PICTURE))}var ki,Ei,_i,Ti,Ai=($r={},j()($r,cr.SPACE,(function(e,t,n){gi(e,0,n)})),j()($r,cr.UP,(function(e,t,n){n.dispatchEvent(new hi(t.payload.volume))})),j()($r,cr.DOWN,(function(e,t,n){n.dispatchEvent(new hi(t.payload.volume))})),j()($r,cr.F,(function(e,t,n){mi(0,0,n)})),j()($r,cr.P,(function(e,t,n){bi(0,0,n)})),j()($r,cr.ESC,(function(e,t,n){mi(0,0,n)})),j()($r,cr.LEFT,(function(e,t,n){n.dispatchEvent(new ui(t.payload.from,t.payload.to))})),j()($r,cr.RIGHT,(function(e,t,n){n.dispatchEvent(new ui(t.payload.from,t.payload.to))})),j()($r,cr.HOME,(function(e,t,n){n.dispatchEvent(new ui(t.payload.from,t.payload.to))})),j()($r,cr.END,(function(e,t,n){n.dispatchEvent(new ui(t.payload.from,t.payload.to))})),j()($r,cr.M,(function(e,t,n){vi(e,0,n)})),j()($r,cr.SEMI_COLON,(function(e,t,n){n.dispatchEvent(new ci(t.payload.speed))})),j()($r,cr.PERIOD,(function(e,t,n){n.dispatchEvent(new ci(t.payload.speed))})),j()($r,cr.COMMA,(function(e,t,n){n.dispatchEvent(new ci(t.payload.speed))})),j()($r,cr.C,(function(e,t,n){n.dispatchEvent(new si(t.payload.track))})),$r),Si=function(e){return function(t){return function(n){tr()(o,n);var r,i,a=(r=o,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=ar()(r);if(i){var n=ar()(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return rr()(this,e)});function o(){return N()(this,o),a.apply(this,arguments)}return B()(o,[{key:"notifyClick",value:function(t){this.context.notifyClick({name:e,payload:t})}},{key:"notifyChange",value:function(t){this.context.notifyChange({name:e,payload:t})}},{key:"notifyHoverChange",value:function(t){this.context.notifyHoverChange({name:e,payload:t})}},{key:"render",value:function(){var e=this;return W(t,Qn()({},this.props,{notifyHoverChange:function(t){return e.notifyHoverChange(t)},notifyChange:function(t){return e.notifyChange(t)},notifyClick:function(t){return e.notifyClick(t)}}))}}]),o}(X)}},wi=function(e){tr()(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=ar()(t);if(n){var i=ar()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return rr()(this,e)});function i(){var e;N()(this,i);for(var t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];return e=r.call.apply(r,[this].concat(n)),j()(Jn()(e),"_observer",void 0),j()(Jn()(e),"_el",void 0),e}return B()(i,[{key:"destroy",value:function(){this._observer&&this._observer.disconnect(),this._observer=null,this._el=null}},{key:"init",value:function(e){this._observer||(this._el=e,ResizeObserver?this._createNativeObserver():this._createIframeObserver(),this._el instanceof HTMLElement&&this._observer&&this._observer.observe(this._el))}},{key:"_createNativeObserver",value:function(){var e=this;this._observer=new ResizeObserver((function(t){t.forEach((function(){e._triggerResize()}))}))}},{key:"_createIframeObserver",value:function(){this._observer=new Ci(this._triggerResize.bind(this))}},{key:"_triggerResize",value:function(){this.dispatchEvent(new or.FakeEvent(ur.RESIZE))}}]),i}(or.FakeEventTarget),Ci=function(){function e(t){N()(this,e),j()(this,"_observersStore",{}),j()(this,"_onChangeCallback",void 0),this._onChangeCallback=t}return B()(e,[{key:"observe",value:function(e){var t=this,n=this._createIframe(),r=e.getAttribute("id");this._observersStore[r]=n,e.appendChild(n),n.contentWindow.onresize=function(){return t._onChangeCallback()}}},{key:"disconnect",value:function(){for(var e in this._observersStore){var t=document.getElementById(e),n=this._observersStore[e];n.onresize=null,t&&(t.removeChild(n),delete this._observersStore[t.getAttribute("id")])}}},{key:"_createIframe",value:function(){var e=document.createElement("iframe");return e.className="playkit-size-iframe",e}}]),e}(),xi=function(e,t){var n,r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return function(){for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];var s=void 0;r&&!n&&e.apply(s,a),clearTimeout(n),n=setTimeout((function(){n=null,r||e.apply(s,a)}),t)}};function Pi(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ri(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Pi(Object(n),!0).forEach((function(t){j()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Pi(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ii,Di=100,Oi={TINY:"tiny",EXTRA_SMALL:"extrasmall",SMALL:"small",MEDIUM:"medium",LARGE:"large",EXTRA_LARGE:"extralarge"},Li={TINY:280,EXTRA_SMALL:380,SMALL:480,MEDIUM:768,LARGE:1024},Mi="Shell",Ni=(ki=un((function(e){return{targetId:e.config.targetId,forceTouchUI:e.config.forceTouchUI,hoverTimeout:e.config.hoverTimeout,metadataLoaded:e.engine.metadataLoaded,currentState:e.engine.playerState.currentState,playerClasses:e.shell.playerClasses,isMobile:e.shell.isMobile,playerSize:e.shell.playerSize,isCasting:e.engine.isCasting,guiClientRect:e.shell.guiClientRect,playerHover:e.shell.playerHover,playerNav:e.shell.playerNav,seekbarDraggingActive:e.seekbar.draggingActive,seekbarHoverActive:e.seekbar.hoverActive,volumeHoverActive:e.volume.hover,adBreak:e.engine.adBreak,prePlayback:e.engine.prePlayback,smartContainerOpen:e.shell.smartContainerOpen,fullscreen:e.engine.fullscreen,fallbackToMutedAutoPlay:e.engine.fallbackToMutedAutoPlay,playlist:e.engine.playlist,tinySizeDisabled:e.config.tinySizeDisabled}}),Lr(Ri(Ri({},Or),ri))),Ei=pr(Mi),_i=Si(Mi),ki(Ti=ai(Ti=sr(Ti=Ei(Ti=_i(Ti=function(e){tr()(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=ar()(t);if(n){var i=ar()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return rr()(this,e)});function i(){var e;N()(this,i);for(var t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];return e=r.call.apply(r,[this].concat(n)),j()(Jn()(e),"hoverTimeout",null),j()(Jn()(e),"_environmentClasses",void 0),j()(Jn()(e),"_playerResizeWatcher",void 0),j()(Jn()(e),"_playerRef",null),j()(Jn()(e),"onMouseLeave",(function(t){Object.prototype.hasOwnProperty.call(t,"toElement")&&(e.props.isMobile||e.state.hover&&e._updatePlayerHover(!1))})),j()(Jn()(e),"onMouseMove",(function(){e.props.isMobile||(e.state.nav&&(e.setState({nav:!1}),e.props.updatePlayerNavState(!1)),e._updatePlayerHoverState())})),j()(Jn()(e),"onMouseUp",(function(){e.unMuteFallback(),e.props.notifyClick(),e._startHoverTimeout()})),j()(Jn()(e),"onTouchEnd",(function(t){e.props.prePlayback||(e.props.fallbackToMutedAutoPlay&&(e.props.player.muted=!1),e.state.hover||t.stopPropagation(),e._updatePlayerHoverState())})),j()(Jn()(e),"onKeyDown",(function(t){e.state.nav||t.keyCode!==cr.TAB||(e.setState({nav:!0}),e.props.updatePlayerNavState(!0)),!e.state.nav||t.keyCode!==cr.ENTER&&t.keyCode!==cr.SPACE||(e.unMuteFallback(),t.srcElement.contains(e._playerRef)&&(t.preventDefault(),e.props.player.paused?e.props.player.play():e.props.player.pause()))})),j()(Jn()(e),"_handleClickOutside",(function(t){var n,r=t.target,i=e.props,a=i.isMobile,o=i.isSmallSize,s=i.updatePlayerNavState;a||o||(null===(n=e._playerRef)||void 0===n?void 0:n.contains(r))||!e.state.nav||(e.setState({nav:!1}),s(!1))})),j()(Jn()(e),"_onWindowResize",(function(){e._updatePlayerClientRect(),document.body&&e.props.updateDocumentWidth(document.body.clientWidth)})),j()(Jn()(e),"_updatePlayerClientRect",(function(){var t=document.getElementById(e.props.targetId);t&&e.props.updatePlayerClientRect(t.getBoundingClientRect())})),e}return B()(i,[{key:"unMuteFallback",value:function(){this.props.fallbackToMutedAutoPlay&&(this.props.player.muted=!1)}},{key:"componentWillMount",value:function(){var e=this.props,t=e.player,n=e.forceTouchUI;this._environmentClasses=["".concat("playkit","-").concat(t.env.os.name.replace(/ /g,"-")),"".concat("playkit","-").concat(t.env.browser.name.replace(/ /g,"-"))];var r=t.env,i=r.isIPadOS,a=r.isTablet,o=r.isMobile;this.props.updateIsMobile(i||a||o||n)}},{key:"componentDidMount",value:function(){var e=this,t=this.props,n=t.player,r=t.eventManager;r.listen(window,"resize",xi(this._onWindowResize,Di)),r.listen(document,"scroll",xi(this._updatePlayerClientRect,Di)),r.listen(document,"click",xi(this._handleClickOutside,Di)),this._playerResizeWatcher=new wi,this._playerResizeWatcher.init(document.getElementById(this.props.targetId)),r.listen(this._playerResizeWatcher,ur.RESIZE,xi(this._onWindowResize,Di)),r.listen(n,n.Event.FIRST_PLAY,(function(){return e._onWindowResize()})),this._onWindowResize()}},{key:"componentWillUnmount",value:function(){this._clearHoverTimeout(),this._playerResizeWatcher.destroy()}},{key:"_updatePlayerHoverState",value:function(){this.props.prePlayback||(this.state.hover||this._updatePlayerHover(!0),this._startHoverTimeout())}},{key:"_updatePlayerHover",value:function(e){this.props.updatePlayerHoverState(e),this.props.notifyHoverChange({hover:e}),this.setState({hover:e})}},{key:"_canEndHoverState",value:function(){return!this.props.seekbarDraggingActive&&!this.props.seekbarHoverActive&&!this.props.volumeHoverActive&&!this.props.smartContainerOpen&&(!this.props.player.paused||this.props.adBreak)}},{key:"_startHoverTimeout",value:function(){var e=this;this._clearHoverTimeout(),this.props.hoverTimeout&&(this.hoverTimeout=setTimeout((function(){e._canEndHoverState()&&e._updatePlayerHover(!1)}),this.props.hoverTimeout))}},{key:"_clearHoverTimeout",value:function(){this.hoverTimeout&&(clearTimeout(this.hoverTimeout),this.hoverTimeout=null)}},{key:"componentDidUpdate",value:function(e){(this.state.hover!==this.props.playerHover||"playing"===this.props.currentState&&"paused"===e.currentState||!this.props.prePlayback&&e.prePlayback||!this.props.adBreak&&e.adBreak||this.props.adBreak&&!e.adBreak)&&(this.state.hover!==this.props.playerHover&&this.props.notifyHoverChange({hover:this.props.playerHover}),this._updatePlayerHoverState())}},{key:"render",value:function(e){var t=this,n=[Hr().player,Hr().skinDefault].concat(L()(this._environmentClasses)).concat(e.playerClasses);return this.props.prePlayback&&n.push(Hr().prePlayback),this.props.isCasting&&n.push("".concat("playkit","-casting")),this.props.isMobile&&n.push(Hr().touch),this.props.playerNav&&n.push(Hr().nav),(this.props.playerHover||this.props.playerNav)&&n.push(Hr().hover),this.props.metadataLoaded&&n.push(Hr().metadataLoaded),this.props.adBreak&&n.push(Hr().adBreak),this.props.metadataLoaded&&n.push(Hr()["state-"+this.props.currentState]),this.props.seekbarDraggingActive&&n.push(Hr().hover),this.props.fullscreen&&n.push(Hr().fullscreen),this.props.playlist&&n.push(Hr().playlist),this.props.guiClientRect&&(this.props.guiClientRect.width<=Li.TINY&&!this.props.tinySizeDisabled?(n.push(Hr().sizeTy),this.props.updatePlayerSize(Oi.TINY)):this.props.guiClientRect.width<=Li.EXTRA_SMALL?(n.push(Hr().sizeXs),this.props.updatePlayerSize(Oi.EXTRA_SMALL)):this.props.guiClientRect.width<=Li.SMALL?(n.push(Hr().sizeSm),this.props.updatePlayerSize(Oi.SMALL)):this.props.guiClientRect.width<=Li.MEDIUM?(n.push(Hr().sizeMd),this.props.updatePlayerSize(Oi.MEDIUM)):this.props.guiClientRect.width<=Li.LARGE?(n.push(Hr().sizeLg),this.props.updatePlayerSize(Oi.LARGE)):this.props.updatePlayerSize(Oi.EXTRA_LARGE),this.props.updateIsSmallSize([Oi.SMALL,Oi.EXTRA_SMALL].includes(this.props.playerSize))),n.push("notranslate"),W("div",{tabIndex:-1,ref:function(e){return t._playerRef=e},className:n.join(" "),onTouchEnd:this.onTouchEnd,onMouseUp:this.onMouseUp,onMouseMove:this.onMouseMove,onMouseLeave:this.onMouseLeave,onKeyDown:this.onKeyDown},e.children)}}]),i}(X))||Ti)||Ti)||Ti)||Ti)||Ti);function Ui(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Bi(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ui(Object(n),!0).forEach((function(t){j()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ui(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Fi(e){var t,n=e.sidePanelsSizes,r=e.sidePanelsModes,i=e.playerClientRect,a=e.isVideo,o=n[Ar.VERTICAL],s=i.width,l=Math.max(o.min,Math.min(o.max,s*o.ratio)),u=r[Sr.LEFT],c=r[Sr.RIGHT],d=s-(t=a?u===wr.ALONGSIDE&&c===wr.ALONGSIDE?2:1:u!==wr.HIDDEN&&c!==wr.HIDDEN?2:1)*l;return s<Li.SMALL&&(d=s,l=s),{verticalPanelWidth:l,videoWidth:d,verticalPanelCount:t}}function ji(e){var t,n=e.sidePanelsSizes,r=e.sidePanelsModes,i=e.playerClientRect,a=e.isVideo,o=n[Ar.HORIZONTAL],s=i.height,l=Math.max(o.min,Math.min(o.max,s*o.ratio)),u=r[Sr.TOP],c=r[Sr.BOTTOM],d=s-(t=a?u===wr.ALONGSIDE&&c===wr.ALONGSIDE?2:1:u!==wr.HIDDEN&&c!==wr.HIDDEN?2:1)*l;return i.width<Li.SMALL&&(d=s,l=s),{horizontalPanelHeight:l,videoHeight:d,horizontalPanelCount:t}}function Hi(e){var t=e.sidePanelsModes,n=e.allowSidePanels,r={position:"absolute",left:0,right:0,top:0,bottom:0},i=n?t[Sr.LEFT]:wr.HIDDEN,a=n?t[Sr.RIGHT]:wr.HIDDEN,o=n?t[Sr.TOP]:wr.HIDDEN,s=n?t[Sr.BOTTOM]:wr.HIDDEN;if(e.playerClientRect.width>Li.SMALL){if(i===wr.ALONGSIDE||a===wr.ALONGSIDE){var l=Fi(Bi(Bi({},e),{},{isVideo:!0})),u=l.verticalPanelWidth,c=l.videoWidth;r.left=i===wr.ALONGSIDE?u:0,r.right=a===wr.ALONGSIDE?u:0,r.width=c,r.position="absolute"}if(o===wr.ALONGSIDE||s===wr.ALONGSIDE){var d=ji(Bi(Bi({},e),{},{isVideo:!0})),p=d.horizontalPanelHeight,f=d.videoHeight;r.top=o===wr.ALONGSIDE?p:0,r.bottom=s===wr.ALONGSIDE?p:0,r.height=f,r.position="absolute"}}return r}function Vi(e){var t=e.position,n=e.sidePanelsModes,r=n[Sr.LEFT],i=n[Sr.RIGHT],a=n[Sr.TOP],o=n[Sr.BOTTOM];if(-1!==[Sr.RIGHT,Sr.LEFT].indexOf(t)){var s={},l=Fi(e).verticalPanelWidth;return s.width=l,t===Sr.RIGHT?(i===wr.HIDDEN?(s.right=-l,s.opacity=0):(s.right=0,s.opacity=1),s):(r===wr.HIDDEN?(s.left=-l,s.opacity=0):(s.left=0,s.opacity=1),s)}var u={},c=ji(e).horizontalPanelHeight,d=Fi(e).verticalPanelWidth;return u.height=c,r!==wr.HIDDEN&&(u.left=d),i!==wr.HIDDEN&&(u.right=d),t===Sr.TOP?(a===wr.HIDDEN?(u.top=-c,u.opacity=0):(u.top=0,u.opacity=1),u):(o===wr.HIDDEN?(u.bottom=-c,u.opacity=0):(u.bottom=0,u.opacity=1),u)}function Gi(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ki(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Gi(Object(n),!0).forEach((function(t){j()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Gi(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function zi(e){var t,n;return e.allowSidePanels?(t={},j()(t,Sr.TOP,Vi(Ki(Ki({},e),{},{position:Sr.TOP}))),j()(t,Sr.BOTTOM,Vi(Ki(Ki({},e),{},{position:Sr.BOTTOM}))),j()(t,Sr.RIGHT,Vi(Ki(Ki({},e),{},{position:Sr.RIGHT}))),j()(t,Sr.LEFT,Vi(Ki(Ki({},e),{},{position:Sr.LEFT}))),t):(n={},j()(n,Sr.TOP,{}),j()(n,Sr.BOTTOM,{}),j()(n,Sr.RIGHT,{}),j()(n,Sr.LEFT,{}),n)}var Wi,Yi=un((function(e){return{sidePanelsModes:e.shell.sidePanelsModes,sidePanelsSizes:e.shell.sidePanelsSizes,allowSidePanels:e.shell.presetSettings.allowSidePanels,playerClientRect:e.shell.playerClientRect}}),Lr(Or))(Ii=function(e){tr()(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=ar()(t);if(n){var i=ar()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return rr()(this,e)});function i(){return N()(this,i),r.apply(this,arguments)}return B()(i,[{key:"shouldComponentUpdate",value:function(e){var t=this.props,n=t.sidePanelsModes,r=t.sidePanelsSizes,i=t.allowSidePanels,a=t.playerClientRect,o=e.sidePanelsModes,s=e.sidePanelsSizes,l=e.allowSidePanels,u=e.playerClientRect;return!(n===o&&r===s&&i===l&&a===u)}},{key:"componentDidUpdate",value:function(){var e={sidePanelsModes:this.props.sidePanelsModes,sidePanelsSizes:this.props.sidePanelsSizes,playerClientRect:this.props.playerClientRect,allowSidePanels:this.props.allowSidePanels},t=function(e){var t=e.sidePanelsModes,n=e.playerClientRect,r=e.allowSidePanels,i={position:"absolute",left:0,right:0,top:0,bottom:0},a=n.width,o=n.height,s=r?t[Sr.LEFT]:wr.HIDDEN,l=r?t[Sr.RIGHT]:wr.HIDDEN,u=r?t[Sr.TOP]:wr.HIDDEN,c=r?t[Sr.BOTTOM]:wr.HIDDEN;if(n.width>Li.SMALL){if(s!==wr.HIDDEN||l!==wr.HIDDEN){var d=Fi(e).verticalPanelWidth;s!==wr.HIDDEN&&(i.left=d),l!==wr.HIDDEN&&(i.right=d)}if(u!==wr.HIDDEN||c!==wr.HIDDEN){var p=ji(e).horizontalPanelHeight;u!==wr.HIDDEN&&(i.top=p),c!==wr.HIDDEN&&(i.bottom=p)}a=a-i.right-i.left,o=o-i.top-i.bottom}var f=n.left+(s!==wr.HIDDEN?i.left:0),h=n.top+(u!==wr.HIDDEN?i.top:0);return{style:i,rect:{x:f,y:h,width:a,height:o,top:h,right:n.right+(l!==wr.HIDDEN?i.right:0),bottom:n.bottom+(c!==wr.HIDDEN?i.bottom:0),left:f}}}(e),n=t.style,r=t.rect;this.props.updateLayoutStyles({gui:n,video:Hi(e),sidePanels:zi(e)}),this.props.updateGuiClientRect(r)}},{key:"render",value:function(){return null}}]),i}(X))||Ii,Zi=pr("PlayerAreaProvider")(Wi=un((function(e){return{activePresetName:e.shell.activePresetName}}))(Wi=function(e){tr()(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=ar()(t);if(n){var i=ar()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return rr()(this,e)});function i(){var e;return N()(this,i),e=r.call(this),j()(Jn()(e),"_listeners",void 0),j()(Jn()(e),"_componentsByPreset",void 0),j()(Jn()(e),"_validateComponentData",(function(t){var n=t.container||t.area;return!!(t.get&&t.presets&&n)||(e.props.logger.warn("component data with label '".concat(t.label||"","' is invalid (did you remember to set 'get', 'presets' and 'area'?)")),!1)})),j()(Jn()(e),"_addNewComponentAndUpdateListeners",(function(t){return e._addNewComponent(t,!0)})),j()(Jn()(e),"_addNewComponent",(function(t,n){var r=Object.assign({},t);if(r.container&&(r.area=r.area||r.container,delete r.container),!e._validateComponentData(r))return function(){};var i=r.area;return r.presets.forEach((function(t){if((e._componentsByPreset[t]||(e._componentsByPreset[t]=[])).push(r),n){var a=e._findListeners(i,t);e._emitListeners(a)}})),function(){e._removeNewComponent(r)}})),j()(Jn()(e),"_removeNewComponent",(function(t){e._validateComponentData(t)&&t.presets.forEach((function(n){var r=e._componentsByPreset[n]||[],i=r.indexOf(t);if(-1!==i){r.splice(i,1);var a=e._findListeners(t.area,t.presetName);e._emitListeners(a)}}))})),j()(Jn()(e),"_findListeners",(function(t,n){return t?e._listeners.filter((function(e){return(!n||e.presetName===n)&&e.areaName===t})):[]})),j()(Jn()(e),"_listen",(function(t,n,r){if(!t||!n||!r)return function(){};var i=e._findListeners(n,t);i&&i.length>0&&(e.props.logger.warn("Another component is already registered to updates for player area '".concat(n,"' in preset '").concat(t,"'. Unlisten to previous listener")),i.forEach((function(t){e._unlisten(t)})));var a={presetName:t,areaName:n,callback:r};return e._listeners.push(a),e._emitListeners([a]),function(){e._unlisten(a)}})),j()(Jn()(e),"_unlisten",(function(t){var n=e._listeners.indexOf(t);-1!==n&&e._listeners.splice(n,1)})),j()(Jn()(e),"_getAreaComponents",(function(t,n){if(!n||!t)return[];var r=e._componentsByPreset[t],i=r?r.filter((function(e){return e.area===n})):[];return i||[]})),e._listeners=[],e._componentsByPreset={},e}return B()(i,[{key:"_initializePlayerComponents",value:function(){var e=this;this.props.uiComponents&&this.props.uiComponents.length>0&&(this.props.uiComponents.forEach((function(t){return e._addNewComponent(t)})),this._emitAllListeners())}},{key:"_emitListeners",value:function(e){var t=this,n=this.props.activePresetName;(e||[]).forEach((function(e){var r=e.presetName===n?t._getAreaComponents(n,e.areaName):[];try{e.callback(r)}catch(n){t.props.logger.error("Error occurred when handling player area ".concat(e.areaName," of preset ").concat(e.presetName,"."),n)}}))}},{key:"_emitAllListeners",value:function(){this._emitListeners(this._listeners)}},{key:"componentDidMount",value:function(){this.props.setApi(this._addNewComponentAndUpdateListeners),this._initializePlayerComponents()}},{key:"componentDidUpdate",value:function(e){e.activePresetName!==this.props.activePresetName&&this._emitAllListeners()}},{key:"getChildContext",value:function(){return{playerAreaComponentsStore:{listen:this._listen,addNewComponent:this._addNewComponentAndUpdateListeners,getAreaComponents:this._getAreaComponents}}}},{key:"render",value:function(e){return W(q,null,W(Yi,null),e.children)}}]),i}(X))||Wi)||Wi,qi={allowSidePanels:!1,allowPlayerArea:!1},Xi=function(e){return function(t){var n,r=un(null,Lr(Or))(n=function(n){tr()(o,n);var r,i,a=(r=o,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=ar()(r);if(i){var n=ar()(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return rr()(this,e)});function o(){return N()(this,o),a.apply(this,arguments)}return B()(o,[{key:"componentDidMount",value:function(){var t=Object.assign({},qi,e),n=t.allowSidePanels,r=t.allowPlayerArea;this.props.updatePresetSettings({allowSidePanels:n,allowPlayerArea:r})}},{key:"shouldComponentUpdate",value:function(){return!1}},{key:"render",value:function(e){return W(t,e)}}]),o}(X))||n;return r}};function Qi(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function $i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Qi(Object(n),!0).forEach((function(t){j()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qi(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ji="seekbar",ea={UPDATE_SEEKBAR_DRAGGING_STATUS:"".concat(Ji,"/UPDATE_SEEKBAR_DRAGGING_STATUS"),UPDATE_SEEKBAR_HOVER_ACTIVE:"".concat(Ji,"/UPDATE_SEEKBAR_HOVER_ACTIVE"),UPDATE_SEEKBAR_PREVIEW_HOVER_ACTIVE:"".concat(Ji,"/UPDATE_SEEKBAR_PREVIEW_HOVER_ACTIVE"),UPDATE_SEEKBAR_CLIENT_RECT:"".concat(Ji,"/UPDATE_SEEKBAR_CLIENT_RECT"),UPDATE_HIDE_SEEKBAR_PREVIEW:"".concat(Ji,"/UPDATE_HIDE_SEEKBAR_PREVIEW"),UPDATE_HIDE_SEEKBAR_TIME_BUBBLE:"".concat(Ji,"/UPDATE_HIDE_SEEKBAR_TIME_BUBBLE"),UPDATE_CURRENT_TIME:"".concat(Ji,"/UPDATE_CURRENT_TIME"),UPDATE_VIRTUAL_TIME:"".concat(Ji,"/UPDATE_VIRTUAL_TIME"),UPDATE_HOVERED_SEGMENT:"".concat(Ji,"/UPDATE_HOVERED_SEGMENT"),UPDATE_SEEKBAR_SEGMENTS:"".concat(Ji,"/UPDATE_SEEKBAR_SEGMENTS"),UPDATE_SEGMENT_END_TIME:"".concat(Ji,"/UPDATE_SEGMENT_END_TIME"),ADD_SEEKBAR_CLASS:"".concat(Ji,"/ADD_SEEKBAR_CLASS"),REMOVE_SEEKBAR_CLASS:"".concat(Ji,"/REMOVE_SEEKBAR_CLASS"),UPDATE_PREVENT_SEEK:"".concat(Ji,"/UPDATE_PREVENT_SEEK")},ta={currentTime:0,virtualTime:0,draggingActive:!1,hoverActive:!1,previewHoverActive:!1,clientRect:{x:0,y:0,width:0,height:0,top:0,right:0,bottom:0,left:0},hidePreview:!1,hideTimeBubble:!1,segments:[],seekbarClasses:[],isPreventSeek:!1},na=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ta,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case ea.UPDATE_SEEKBAR_DRAGGING_STATUS:return $i($i({},e),{},{draggingActive:t.draggingActive});case ea.UPDATE_SEEKBAR_HOVER_ACTIVE:return $i($i({},e),{},{hoverActive:t.hoverActive});case ea.UPDATE_SEEKBAR_PREVIEW_HOVER_ACTIVE:return $i($i({},e),{},{previewHoverActive:t.previewHoverActive});case ea.UPDATE_SEEKBAR_CLIENT_RECT:return $i($i({},e),{},{clientRect:t.clientRect});case ea.UPDATE_HIDE_SEEKBAR_PREVIEW:return $i($i({},e),{},{hidePreview:t.hidePreview});case ea.UPDATE_HIDE_SEEKBAR_TIME_BUBBLE:return $i($i({},e),{},{hideTimeBubble:t.hideTimeBubble});case ea.UPDATE_CURRENT_TIME:return $i($i({},e),{},{currentTime:t.currentTime});case ea.UPDATE_VIRTUAL_TIME:return $i($i({},e),{},{virtualTime:t.virtualTime});case ea.UPDATE_HOVERED_SEGMENT:return $i($i({},e),{},{segments:e.segments.map((function(e){return e.id===t.id?$i($i({},e),{},{isHovered:t.isHovered}):e}))});case ea.UPDATE_SEEKBAR_SEGMENTS:return $i($i({},e),{},{segments:t.segments});case ea.UPDATE_SEGMENT_END_TIME:return $i($i({},e),{},{segments:e.segments.map((function(e){return e.id===t.id?$i($i({},e),{},{endTime:t.endTime}):e}))});case ea.ADD_SEEKBAR_CLASS:return e.seekbarClasses.includes(t.className)?e:$i($i({},e),{},{seekbarClasses:[].concat(L()(e.seekbarClasses),[t.className])});case ea.REMOVE_SEEKBAR_CLASS:return $i($i({},e),{},{seekbarClasses:e.seekbarClasses.filter((function(e){return e!==t.className}))});case ea.UPDATE_PREVENT_SEEK:return $i($i({},e),{},{isPreventSeek:t.isPreventSeek});default:return e}},ra={updateSeekbarDraggingStatus:function(e){return{type:ea.UPDATE_SEEKBAR_DRAGGING_STATUS,draggingActive:e}},updateSeekbarHoverActive:function(e){return{type:ea.UPDATE_SEEKBAR_HOVER_ACTIVE,hoverActive:e}},updateSeekbarPreviewHoverActive:function(e){return{type:ea.UPDATE_SEEKBAR_PREVIEW_HOVER_ACTIVE,previewHoverActive:e}},updateSeekbarClientRect:function(e){return{type:ea.UPDATE_SEEKBAR_CLIENT_RECT,clientRect:e}},updateHideSeekbarPreview:function(e){return{type:ea.UPDATE_HIDE_SEEKBAR_PREVIEW,hidePreview:e}},updateHideSeekbarTimeBubble:function(e){return{type:ea.UPDATE_HIDE_SEEKBAR_TIME_BUBBLE,hideTimeBubble:e}},updateCurrentTime:function(e){return{type:ea.UPDATE_CURRENT_TIME,currentTime:e}},updateVirtualTime:function(e){return{type:ea.UPDATE_VIRTUAL_TIME,virtualTime:e}},updateHoveredSegment:function(e,t){return{type:ea.UPDATE_HOVERED_SEGMENT,id:e,isHovered:t}},updateSegmentEndTime:function(e,t){return{type:ea.UPDATE_SEGMENT_END_TIME,id:e,endTime:t}},updateSeekbarSegments:function(e){return{type:ea.UPDATE_SEEKBAR_SEGMENTS,segments:e}},addSeekbarClass:function(e){return{type:ea.ADD_SEEKBAR_CLASS,className:e}},removeSeekbarClass:function(e){return{type:ea.REMOVE_SEEKBAR_CLASS,className:e}},updatePreventSeek:function(e){return{type:ea.UPDATE_PREVENT_SEEK,isPreventSeek:e}}};function ia(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function aa(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ia(Object(n),!0).forEach((function(t){j()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ia(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var oa={UPDATE_VOLUME_DRAGGING_STATUS:"volume/UPDATE_VOLUME_DRAGGING_STATUS",UPDATE_HOVER:"volume/UPDATE_HOVER"},sa={draggingActive:!1,hover:!1},la=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:sa,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case oa.UPDATE_VOLUME_DRAGGING_STATUS:return aa(aa({},e),{},{draggingActive:t.draggingActive});case oa.UPDATE_HOVER:return aa(aa({},e),{},{hover:t.hover});default:return e}},ua={updateVolumeDraggingStatus:function(e){return{type:oa.UPDATE_VOLUME_DRAGGING_STATUS,draggingActive:e}},updateVolumeHover:function(e){return{type:oa.UPDATE_HOVER,hover:e}}};function ca(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function da(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ca(Object(n),!0).forEach((function(t){j()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ca(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var pa="loading",fa={UPDATE_LOADING_SPINNER_STATE:"".concat(pa,"/UPDATE_LOADING_SPINNER_STATE")},ha={show:!1},ya=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ha,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Wr.UPDATE:return Vr(pa,e,t);case Wr.UPDATE_COMPONENT:return Gr(pa,e,t);case fa.UPDATE_LOADING_SPINNER_STATE:return da(da({},e),{},{show:t.show});default:return e}},ga={updateLoadingSpinnerState:function(e){return{type:fa.UPDATE_LOADING_SPINNER_STATE,show:e}}};function va(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ma(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?va(Object(n),!0).forEach((function(t){j()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):va(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ba={UPDATE_CAPTIONS_STYLE:"cvaa/UPDATE_CAPTIONS_STYLE"},ka={style:"default"},Ea=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ka,t=arguments.length>1?arguments[1]:void 0;return t.type===ba.UPDATE_CAPTIONS_STYLE?ma(ma({},e),{},{style:t.style}):e},_a={updateCaptionsStyle:function(e){return{type:ba.UPDATE_CAPTIONS_STYLE,style:e}}};function Ta(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Aa(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ta(Object(n),!0).forEach((function(t){j()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ta(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Sa={UPDATE_QUALITY:"settings/UPDATE_QUALITY",UPDATE_SPEED:"settings/UPDATE_SPEED",UPDATE_AUDIO:"settings/UPDATE_AUDIO",UPDATE_ADVANCED_AUDIO_DESC:"settings/UPDATE_ADVANCED_AUDIO_DESC",UPDATE_IS_CAPTIONS_ENABLED:"settings/UPDATE_IS_CAPTIONS_ENABLED"},wa={quality:1,speed:2,advancedAudioDesc:!1,isCaptionsEnabled:!1},Ca=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:wa,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Sa.UPDATE_QUALITY:return Aa(Aa({},e),{},{quality:t.quality});case Sa.UPDATE_SPEED:return Aa(Aa({},e),{},{speed:t.speed});case Sa.UPDATE_AUDIO:return Aa(Aa({},e),{},{audio:t.audio});case Sa.UPDATE_ADVANCED_AUDIO_DESC:return Aa(Aa({},e),{},{advancedAudioDesc:t.isChecked});case Sa.UPDATE_IS_CAPTIONS_ENABLED:return Aa(Aa({},e),{},{isCaptionsEnabled:t.isCaptionsEnabled});default:return e}},xa={updateQuality:function(e){return{type:Sa.UPDATE_QUALITY,quality:e}},updateSpeed:function(e){return{type:Sa.UPDATE_SPEED,speed:e}},updateAudio:function(e){return{type:Sa.UPDATE_AUDIO,audio:e}},updateAdvancedAudioDesc:function(e){return{type:Sa.UPDATE_ADVANCED_AUDIO_DESC,isChecked:e}},updateIsCaptionsEnabled:function(e){return{type:Sa.UPDATE_IS_CAPTIONS_ENABLED,isCaptionsEnabled:e}}};function Pa(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ra(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Pa(Object(n),!0).forEach((function(t){j()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Pa(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ia={UPDATE_ACTION_ICON:"overlay-action/UPDATE_ACTION_ICON"},Da={iconType:null},Oa=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Da,t=arguments.length>1?arguments[1]:void 0;return t.type===Ia.UPDATE_ACTION_ICON?Ra(Ra({},e),{},{iconType:t.iconType}):e},La={updateOverlayActionIcon:function(e){return{type:Ia.UPDATE_ACTION_ICON,iconType:e}}};function Ma(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Na(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ma(Object(n),!0).forEach((function(t){j()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ma(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ua={UPDATE_PLAYLIST_COUNTDOWN_CANCELED:"playlist-countdown/UPDATE_PLAYLIST_COUNTDOWN_CANCELED"},Ba={countdownCanceled:!1},Fa=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ba,t=arguments.length>1?arguments[1]:void 0;return t.type===Ua.UPDATE_PLAYLIST_COUNTDOWN_CANCELED?Na(Na({},e),{},{countdownCanceled:t.countdownCanceled}):e},ja={updatePlaylistCountdownCanceled:function(e){return{type:Ua.UPDATE_PLAYLIST_COUNTDOWN_CANCELED,countdownCanceled:e}}};function Ha(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Va(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ha(Object(n),!0).forEach((function(t){j()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ha(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ga={UPDATE_OVERLAY:"overlay/UPDATE_OVERLAY"},Ka={isOpen:!1},za=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ka,t=arguments.length>1?arguments[1]:void 0;return t.type===Ga.UPDATE_OVERLAY?Va(Va({},e),{},{isOpen:t.isOpen}):e},Wa={updateOverlay:function(e){return{type:Ga.UPDATE_OVERLAY,isOpen:e}}};function Ya(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Za(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ya(Object(n),!0).forEach((function(t){j()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ya(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var qa,Xa,Qa,$a,Ja,eo,to={UPDATE_CONTROLS_TO_MOVE:"bottom-bar/UPDATE_CONTROLS_TO_MOVE"},no={controlsToMove:[]},ro=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:no,t=arguments.length>1?arguments[1]:void 0;return t.type===to.UPDATE_CONTROLS_TO_MOVE?Za(Za({},e),{},{controlsToMove:t.controlsToMove}):e},io={updateControlsToMove:function(e){return{type:to.UPDATE_CONTROLS_TO_MOVE,controlsToMove:e}}},ao=function(e){for(var t=Object.keys(e),n={},r=0;r<t.length;r++){var i=t[r];"function"==typeof e[i]&&(n[i]=e[i])}var a,o=Object.keys(n);try{!function(e){Object.keys(e).forEach((function(t){var n=e[t];if(void 0===n(void 0,{type:Ht.INIT}))throw new Error('Reducer "'+t+"\" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.");if(void 0===n(void 0,{type:Ht.PROBE_UNKNOWN_ACTION()}))throw new Error('Reducer "'+t+"\" returned undefined when probed with a random type. Don't try to handle "+Ht.INIT+' or other actions in "redux/*" namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.')}))}(n)}catch(e){a=e}return function(e,t){if(void 0===e&&(e={}),a)throw a;for(var r=!1,i={},s=0;s<o.length;s++){var l=o[s],u=n[l],c=e[l],d=u(c,t);if(void 0===d){var p=Gt(l,t);throw new Error(p)}i[l]=d,r=r||d!==c}return(r=r||o.length!==Object.keys(e).length)?i:e}}({config:Zr,engine:ni,shell:Dr,seekbar:na,volume:la,loading:ya,cvaa:Ea,settings:Ca,overlayAction:Oa,playlist:Fa,overlay:za,bottomBar:ro}),oo=ao,so=JSON.parse('{"en":{"controls":{"play":"Play","pause":"Pause","language":"Language","settings":"Settings","fullscreen":"Fullscreen","fullscreenExit":"Exit fullscreen","rewind":"Seek backwards","secondsRewind":"Seek {{seconds}} seconds backwards","forward":"Seek forward","secondsForward":"Seek {{seconds}} seconds forward","vrStereo":"vrStereo","closedCaptionsOn":"Disable Captions","closedCaptionsOff":"Enable Captions","live":"Live","mute":"Mute","unmute":"Unmute","next":"Next","prev":"Prev","startOver":"Start over","pictureInPicture":"Picture in picture","pictureInPictureExit":"Exit picture in picture","logo":"Logo","seekBarSlider":"Seek bar","readLess":"Less","readMore":"More"},"unmute":{"unmute":"Unmute"},"volume":{"muted_click_to_unmute":"Muted. Click to unmute","volume_click_to_mute":"{{vol}}% volume. Click to mute","ten_percent":"ten percent","twenty_percent":"twenty percent","thirty_percent":"thirty percent","fourty_percent":"forty percent","fifty_percent":"fifty percent","sixty_percent":"sixty percent","seventy_percent":"seventy percent","eighty_percent":"eighty percent","ninety_percent":"ninety percent","one_hundred_percent":"one hundred percent","volume_slider_aria_label":"Volume","volume_slider_description":"Use the arrows to control the volume"},"copy":{"button":"Copy URL"},"settings":{"title":"Settings","audio":"Audio","quality":"Quality","speed":"Speed","speedNormal":"Normal","qualityAuto":"Auto","qualityHdLabel":"Quality is HD","quality4kLabel":"Quality is 4k","quality8kLabel":"Quality is 8k","advanced_audio_description":"Extended Audio Description","advanced_audio_description_enabled":"Disable Extended Audio Description","advanced_audio_description_disabled":"Enable Extended Audio Description"},"captions":{"captions":"Captions","advanced_captions_settings":"Advanced captions settings"},"overlay":{"close":"Close"},"error":{"default_error_title":"Something went wrong","default_error_message":"An error occurred, please try again later.","network_error_title":"There’s a problem with your network","network_error_message":"Please check your network connection and try again.","media_unavailable_error_title":"Media unavailable","media_unavailable_error_message":"This media has been restricted. Please obtain relevant permissions to access content.","text_error_title":"Text stream error","text_error_message":"Text stream error occurred","media_error_title":"Media stream error","media_error_message":"One or more media streams have failed.","manifest_error_title":"Play manifest error","manifest_error_message":"Error processing the play manifest.","streaming_error_title":"Cannot load stream","streaming_error_message":"A streaming protocol error occurred.","drm_error_message":"You don’t have permissions to view this media.","media_not_ready_error_title":"Media is being processed","media_not_ready_error_message":"Media is processing, check back soon.","geo_location_error_title":"Geo location unavailable","geo_location_error_message":"This content is unavailable in your region.","ip_restricted_error_message":"This media has been restricted to certain IP addresses.","default_session_text":"Copy for customer care: session ID","retry":"Try again"},"ads":{"ad_notice":"Advertisement","learn_more":"Learn more","skip_ad":"Skip ad","skip_in":"Skip in"},"cvaa":{"title":"Advanced captions settings","sample_caption_tag":"Sample {{number}}","sample_custom_caption_tag":"Custom captions","set_custom_caption":"Set custom caption","edit_caption":"Edit caption","size_label":"Size","font_color_label":"Font color","font_alignment_label":"Font alignment","font_family_label":"Font family","font_style_label":"Font style","font_opacity_label":"Font opacity","background_color_label":"Background color","background_opacity_label":"Background opacity","apply":"Apply","caption_preview":"This is your caption preview"},"cast":{"play_on_tv":"Play on TV","disconnect_from_tv":"Disconnect from TV","status":{"connecting_to":"Connecting to","connected_to":"Connected to","playing_on":"Playing on"}},"playlist":{"prev":"Previous","next":"Next","up_next":"Up Next","up_next_in":"Up next in","cancel":"Cancel"},"pictureInPicture":{"overlay_text":"Playing in Picture In Picture mode"},"watermark":{"watermark_alt_text":"Watermark"}}}'),lo={Top:"top",Bottom:"bottom",TopRight:"top-right",TopLeft:"top-left",BottomRight:"bottom-right",BottomLeft:"bottom-left",Left:"left",Right:"right"},uo=un((function(e){return{playerClientRect:e.shell.playerClientRect,guiClientRect:e.shell.guiClientRect,isMobile:e.shell.isMobile}}))(qa=sr((Xa=function(e){tr()(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=ar()(t);if(n){var i=ar()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return rr()(this,e)});function i(){var e;N()(this,i);for(var t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];return e=r.call.apply(r,[this].concat(n)),j()(Jn()(e),"_hoverTimeout",null),j()(Jn()(e),"textElement",void 0),j()(Jn()(e),"tooltipElement",void 0),j()(Jn()(e),"lastAlternativeTypeIndex",-1),j()(Jn()(e),"_buttonRef",null),j()(Jn()(e),"showTooltip",(function(){e.setState({showTooltip:!0})})),j()(Jn()(e),"hideTooltip",(function(){e.setState({showTooltip:!1})})),j()(Jn()(e),"handleKeyDown",(function(t){t.keyCode===cr.ESC&&e.hideTooltip()})),j()(Jn()(e),"setButtonRef",(function(t){e._buttonRef=t})),j()(Jn()(e),"handleFocusOnChildren",(function(){var t=e.props.children.props.onFocus;e.showTooltip(),t&&t()})),j()(Jn()(e),"handleBlurOnChildren",(function(){var t=e.props.children.props.onBlur;e.hideTooltip(),t&&t()})),j()(Jn()(e),"onMouseOver",(function(){e._clearHoverTimeout(),e._hoverTimeout=setTimeout((function(){e.showTooltip()}),750)})),j()(Jn()(e),"onMouseLeave",(function(){e.hideTooltip(),e._clearHoverTimeout()})),e}return B()(i,[{key:"_clearHoverTimeout",value:function(){this._hoverTimeout&&(clearTimeout(this._hoverTimeout),this._hoverTimeout=null)}},{key:"getAlternateType",value:function(){var e=this;return Object.values(lo).find((function(t,n){return n>e.lastAlternativeTypeIndex&&t!=e.props.type&&(e.lastAlternativeTypeIndex=n,!0)}))}},{key:"isToolTipInBoundaries",value:function(){if(this.props.strictPosition)return!0;var e=this.textElement.getBoundingClientRect(),t=this.props.playerClientRect;return e.top>t.top+5&&e.bottom<t.bottom-5&&e.right<t.right-5&&e.left>t.left+5}},{key:"componentWillMount",value:function(){this.setState({valid:!1,type:this.props.type})}},{key:"componentDidMount",value:function(){var e,t=this,n=this.props.eventManager;n.listen(document,"click",(function(e){return t.handleClickOutside(e)})),(null===(e=this._buttonRef)||void 0===e?void 0:e.addEventListener)&&n.listen(this._buttonRef,"keydown",this.handleKeyDown)}},{key:"handleClickOutside",value:function(e){var t;!(null===(t=this.tooltipElement)||void 0===t?void 0:t.contains(e.target))&&this.state.showTooltip&&this.hideTooltip()}},{key:"componentDidUpdate",value:function(e){if(this.props.guiClientRect!==e.guiClientRect)this.lastAlternativeTypeIndex=-1,this.setState({valid:!1,type:this.props.type});else if(this.state.showTooltip)if(this.isToolTipInBoundaries())this.state.valid||this.setState({valid:!0});else{var t=this.getAlternateType();t&&this.setState({valid:!1,type:t})}}},{key:"componentWillUnmount",value:function(){this._clearHoverTimeout()}},{key:"render",value:function(e){var t=this,n=[Hr().tooltipLabel,Hr()["tooltip-".concat(this.state.type)]];if(e.className&&n.push(e.className),this.state.showTooltip&&this.state.valid?n.push(Hr().show):n.push(Hr().hide),e.isMobile)return ne(e.children)[0];var r=ge(e.children,{onFocus:this.handleFocusOnChildren,onBlur:this.handleBlurOnChildren,ref:this.setButtonRef});return W("div",{className:Hr().tooltip,onMouseOver:this.onMouseOver,onMouseLeave:this.onMouseLeave,ref:function(e){return e?t.tooltipElement=e:void 0}},r,W("span",{style:{maxWidth:e.maxWidth},ref:function(e){return e?t.textElement=e:void 0},className:n.join(" ")},e.label))}}]),i}(X),j()(Xa,"defaultProps",{type:lo.Top,maxWidth:"240px",strictPosition:!1}),qa=Xa))||qa)||qa,co="chromecast",po="Cast",fo=(Qa=un((function(e){return{isCasting:e.engine.isCasting,isCastAvailable:e.engine.isCastAvailable}})),$a=pr(po),Ja=Un({castText:"cast.play_on_tv"}),Qa(eo=ai(eo=sr(eo=$a(eo=Ja(eo=function(e){tr()(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=ar()(t);if(n){var i=ar()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return rr()(this,e)});function i(){var e;N()(this,i);for(var t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];return e=r.call.apply(r,[this].concat(n)),j()(Jn()(e),"onClick",(function(){e.props.player.setIsCastInitiator(co,!0),e.props.eventManager.listenOnce(e.props.player,e.props.player.Event.Cast.CAST_SESSION_START_FAILED,(function(){return e.props.player.setIsCastInitiator(co,!1)}))})),j()(Jn()(e),"onKeyDown",(function(t){t.keyCode!==cr.ENTER&&t.keyCode!==cr.SPACE||(t.preventDefault(),e.props.player.startCasting(co))})),e}return B()(i,[{key:"_shouldRender",value:function(){var e=this.props.isCasting||this.props.isCastAvailable;return this.props.onToggle(po,e),e}},{key:"render",value:function(e){if(this._shouldRender()){var t=e.isCasting?"".concat(Hr().castButton," ").concat(Hr().castButtonActive):Hr().castButton;return W("div",{role:"button","aria-label":this.props.castText,className:Hr().controlButtonContainer,onClick:this.onClick,onKeyDown:this.onKeyDown},W(uo,{label:this.props.castText},W("google-cast-launcher",{className:t,tabIndex:"0"})))}}}]),i}(X))||eo)||eo)||eo)||eo)||eo);function ho(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function yo(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ho(Object(n),!0).forEach((function(t){j()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ho(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}fo.displayName=po;var go,vo,mo,bo,ko={Maximize:"maximize",Minimize:"minimize",Play:"play",Pause:"pause",VolumeBase:"volume-base",VolumeWaves:"volume-waves",VolumeWave:"volume-wave",VolumeMute:"volume-mute",Close:"close",Settings:"settings",Check:"check",CheckActive:"check-active",Language:"language",Quality:"quality",Captions:"captions",Speed:"speed",SpeedDown:"speed-down",SpeedUp:"speed-up",Audio:"audio",ArrowDown:"arrow-down",StartOver:"start-over",SeekEnd:"seek-end",Rewind:"rewind",Rewind10:"rewind10",Forward:"forward",Forward10:"forward10",vrStereo:"vr-stereo",vrStereoFull:"vr-stereo-full",Cast:"cast",CastBrand:"cast-brand",Next:"next",Prev:"prev",PictureInPictureStart:"picture-in-picture-start",PictureInPictureStop:"picture-in-picture-stop",ClosedCaptionsOn:"closed-captions-on",ClosedCaptionsOff:"closed-captions-off",AdvancedAudioDescription:"advanced-audio-description",AdvancedAudioDescriptionActive:"advanced-audio-description-active"},Eo={qualityHd:"".concat(Hr().badgeIcon," ").concat(Hr().iconQualityHd),qualityHdActive:"".concat(Hr().badgeIcon," ").concat(Hr().iconQualityHdActive),quality4k:"".concat(Hr().badgeIcon," ").concat(Hr().iconQuality4K),quality4kActive:"".concat(Hr().badgeIcon," ").concat(Hr().iconQuality4KActive),quality8k:"".concat(Hr().badgeIcon," ").concat(Hr().iconQuality8K),quality8kActive:"".concat(Hr().badgeIcon," ").concat(Hr().iconQuality8KActive)},_o={INACTIVE:0,ACTIVE:1},To=function(e){tr()(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=ar()(t);if(n){var i=ar()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return rr()(this,e)});function i(e){var t;N()(this,i),t=r.call(this,e),j()(Jn()(t),"_defaultColor",Hr().white),j()(Jn()(t),"_activeColor",Hr().brandColor),j()(Jn()(t),"_className",""),j()(Jn()(t),"createDynamicIconClass",(function(e){var n=e.path,r=e.state,i=e.color,a=e.activeColor,o=e.width,s=e.height,l=e.viewBox,u=e.fillRule,c=t.getFillColor(r,i,a),d=t.getPathTag(n,c),p=t.getSVGUrl(d,o,s,l,u),f=".".concat(t._className," { background-image: ").concat(p,"; }"),h=document.getElementById(ih);h&&h.appendChild(document.createTextNode(f))})),j()(Jn()(t),"getSVGUrl",(function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:36,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:36,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"nonzero",i='<svg xmlns="http://www.w3.org/2000/svg"  xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="'.concat(arguments.length>3&&void 0!==arguments[3]?arguments[3]:"0 0 1024 1024",'" width="').concat(t,'" height="').concat(n,'" fill-rule="').concat(r,'">').concat(e,"</svg>"),a=[['"',"'"],["%","%25"],["&","%26"],["#","%23"],["{","%7B"],["}","%7D"],["<","%3C"],[">","%3E"]],o=2e3,s=Math.ceil(i.length/o),l=0,u="",c=0;c<s;c++){for(var d=i.slice(l,l+o-1),p=0;p<a.length;p++)d=d.split(a[p][0]).join(a[p][1]);u="".concat(u).concat(d),l+=o}return'url("data:image/svg+xml,'.concat(u,'")')})),j()(Jn()(t),"getFillColor",(function(e,n,r){return e===_o.ACTIVE?r||t._activeColor:n||t._defaultColor})),j()(Jn()(t),"getPathTag",(function(e,t){return Array.isArray(e)||(e=[e]),e.map((function(e){var n="string"==typeof e?{d:e,fill:t}:yo(yo({},e),{},{fill:t}),r=Object.keys(n).map((function(e){return"".concat(e,'="').concat(n[e],'"')})).join(" ");return"<path ".concat(r," />")})).join(" ")}));var n=e.path,a=e.id;if(n&&a){t._className="playkit-icon-".concat(a);var o=Array.from(document.styleSheets).find((function(e){return e.ownerNode.id===ih}));o&&Array.from(o.rules).find((function(e){return e.selectorText===".".concat(t._className)}))||t.createDynamicIconClass(e)}return t}return B()(i,[{key:"componentWillUpdate",value:function(e){this._className&&this.props.state!==e.state&&this.createDynamicIconClass(e)}},{key:"render",value:function(e){if(this._className)return W("i",Qn()({className:[Hr().icon,this._className].join(" ")},e.hidden?{"aria-hidden":"true"}:{}));switch(e.type){case ko.Maximize:return W("i",{className:[Hr().icon,Hr().iconMaximize].join(" "),"aria-hidden":"true"});case ko.Minimize:return W("i",{className:[Hr().icon,Hr().iconMinimize].join(" "),"aria-hidden":"true"});case ko.Play:return W("i",{className:[Hr().icon,Hr().iconPlay].join(" "),"aria-hidden":"true"});case ko.Pause:return W("i",{className:[Hr().icon,Hr().iconPause].join(" "),"aria-hidden":"true"});case ko.VolumeBase:return W("i",{className:[Hr().icon,Hr().iconVolumeBase].join(" "),"aria-hidden":"true"});case ko.VolumeWaves:return W("i",{className:[Hr().icon,Hr().iconVolumeWaves].join(" "),"aria-hidden":"true"});case ko.VolumeWave:return W("i",{className:[Hr().icon,Hr().iconVolumeWave].join(" "),"aria-hidden":"true"});case ko.VolumeMute:return W("i",{className:[Hr().icon,Hr().iconVolumeMute].join(" "),"aria-hidden":"true"});case ko.Close:return W("i",{className:[Hr().icon,Hr().iconClose].join(" "),"aria-hidden":"true"});case ko.Settings:return W("i",{className:[Hr().icon,Hr().iconSettings].join(" "),"aria-hidden":"true"});case ko.Check:return W("i",{className:[Hr().icon,Hr().iconCheck].join(" ")});case ko.CheckActive:return W("i",{className:[Hr().icon,Hr().iconCheckActive].join(" ")});case ko.Language:return W("i",{className:[Hr().icon,Hr().iconLanguage].join(" "),"aria-hidden":"true"});case ko.Quality:return W("i",{className:[Hr().icon,Hr().iconQuality].join(" ")});case ko.Captions:return W("i",{className:[Hr().icon,Hr().iconCaptions].join(" ")});case ko.Speed:return W("i",{className:[Hr().icon,Hr().iconSpeed].join(" ")});case ko.SpeedDown:return W("i",{className:[Hr().icon,Hr().iconSpeedDown].join(" ")});case ko.SpeedUp:return W("i",{className:[Hr().icon,Hr().iconSpeedUp].join(" ")});case ko.Audio:return W("i",{className:[Hr().icon,Hr().iconAudio].join(" ")});case ko.ArrowDown:return W("i",{className:[Hr().icon,Hr().iconArrowDown].join(" ")});case ko.StartOver:return W("i",{className:[Hr().icon,Hr().iconStartOver].join(" ")});case ko.SeekEnd:return W("i",{className:[Hr().icon,Hr().iconSeekEnd].join(" ")});case ko.Rewind:return W("i",{className:[Hr().icon,Hr().iconRewind].join(" "),"aria-hidden":"true"});case ko.Rewind10:return W("i",{className:[Hr().icon,Hr().iconRewind10].join(" "),"aria-hidden":"true"});case ko.Forward:return W("i",{className:[Hr().icon,Hr().iconForward].join(" "),"aria-hidden":"true"});case ko.Forward10:return W("i",{className:[Hr().icon,Hr().iconForward10].join(" "),"aria-hidden":"true"});case ko.vrStereo:return W("i",{className:[Hr().icon,Hr().iconVrStereo].join(" ")});case ko.vrStereoFull:return W("i",{className:[Hr().icon,Hr().iconVrStereoFull].join(" ")});case ko.Cast:return W("i",{className:[Hr().icon,Hr().iconChromecast].join(" ")});case ko.CastBrand:return W("i",{className:[Hr().icon,Hr().iconChromecastBrand].join(" ")});case ko.Next:return W("i",{className:[Hr().icon,Hr().iconNext].join(" ")});case ko.Prev:return W("i",{className:[Hr().icon,Hr().iconPrev].join(" ")});case ko.PictureInPictureStart:return W("i",{className:[Hr().icon,Hr().iconPictureInPictureStart].join(" "),"aria-hidden":"true"});case ko.PictureInPictureStop:return W("i",{className:[Hr().icon,Hr().iconPictureInPictureStop].join(" "),"aria-hidden":"true"});case ko.ClosedCaptionsOn:return W("i",{className:[Hr().icon,Hr().iconClosedCaptionsOn].join(" "),"aria-hidden":"true"});case ko.ClosedCaptionsOff:return W("i",{className:[Hr().icon,Hr().iconClosedCaptionsOff].join(" "),"aria-hidden":"true"});case ko.AdvancedAudioDescription:return W("i",{className:[Hr().icon,Hr().iconAdvancedAudioDescription].join(" ")});case ko.AdvancedAudioDescriptionActive:return W("i",{className:[Hr().icon,Hr().iconAdvancedAudioDescriptionActive].join(" ")})}}}]),i}(X),Ao=To,So=function(e){return e.adBreak&&e.adIsPlaying||!e.adBreak&&e.isPlaying};function wo(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var Co,xo,Po,Ro="Keyboard",Io={preventDefault:!1,payload:null},Do=(go=un((function(e){return{isPlayingAdOrPlayback:So(e.engine),playerNav:e.shell.playerNav,textTracks:e.engine.textTracks,overlayOpen:e.overlay.isOpen}}),Lr(Object.assign({},Or,La))),vo=pr(Ro),mo=Si(Ro),go(bo=ai(bo=vo(bo=mo(bo=function(e){tr()(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=ar()(t);if(n){var i=ar()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return rr()(this,e)});function i(e){var t,n;N()(this,i),n=r.call(this),j()(Jn()(n),"_lastActiveTextLanguage",""),j()(Jn()(n),"_hoverTimeout",null),j()(Jn()(n),"keyboardHandlers",(t={},j()(t,cr.SPACE,(function(){return n.props.isPlayingAdOrPlayback?(n.props.player.pause(),n.props.updateOverlayActionIcon(ko.Pause)):(n.props.player.play(),n.props.updateOverlayActionIcon(ko.Play)),n.props.updatePlayerHoverState(!0),{preventDefault:!0,payload:!0}})),j()(t,cr.UP,(function(){var e=(Math.round(100*n.props.player.volume)+5)/100;return e=e>1?1:e,n.props.logger.debug("Changing volume. ".concat(n.props.player.volume," => ").concat(e)),n.props.player.muted&&(n.props.player.muted=!1),n.props.player.volume=e,n.props.updateOverlayActionIcon([ko.VolumeBase,ko.VolumeWaves]),{preventDefault:!0,payload:{volume:n.props.player.volume}}})),j()(t,cr.DOWN,(function(){var e=(Math.round(100*n.props.player.volume)-5)/100;return e=e<0?0:e,n.props.logger.debug("Changing volume. ".concat(n.props.player.volume," => ").concat(e)),n.props.player.volume=e,0===e?(n.props.player.muted=!0,n.props.updateOverlayActionIcon([ko.VolumeBase,ko.VolumeMute])):n.props.updateOverlayActionIcon([ko.VolumeBase,ko.VolumeWave]),{preventDefault:!0,payload:{volume:n.props.player.volume}}})),j()(t,cr.F,(function(){return n.props.player.isFullscreen()?{preventDefault:!0,payload:null}:(n.props.logger.debug("Enter fullscreen"),n.props.player.enterFullscreen(),{preventDefault:!0,payload:!0})})),j()(t,cr.P,(function(){return n.props.player.isInPictureInPicture()?(n.props.logger.debug("Exit Picture In Picture"),n.props.player.exitPictureInPicture()):(n.props.logger.debug("Enter Picture In Picture"),n.props.player.enterPictureInPicture()),n.props.updatePlayerHoverState(!0),{preventDefault:!0,payload:!0}})),j()(t,cr.ESC,(function(){return n.props.player.isFullscreen()?(n.props.logger.debug("Exit fullscreen"),n.props.player.exitFullscreen(),{preventDefault:!0,payload:!0}):{preventDefault:!0,payload:null}})),j()(t,cr.LEFT,(function(){if((!n.props.player.ads||!n.props.player.ads.isAdBreak())&&(!n.props.player.isLive()||n.props.player.isDvr())){var e=n.props.player.currentTime-5,t=n.props.player.currentTime,r=e>0?e:0;return n.props.logger.debug("Seek. ".concat(t," => ").concat(r)),n.props.player.currentTime=r,n.props.updateOverlayActionIcon(ko.Rewind),n.props.updatePlayerHoverState(!0),{preventDefault:!0,payload:{from:t,to:r}}}return{preventDefault:!0,payload:null}})),j()(t,cr.RIGHT,(function(){if((!n.props.player.ads||!n.props.player.ads.isAdBreak())&&(!n.props.player.isLive()||n.props.player.isDvr())){var e=n.props.player.currentTime+5,t=n.props.player.currentTime,r=e>n.props.player.duration?n.props.player.duration:e;return n.props.logger.debug("Seek. ".concat(t," => ").concat(r)),n.props.player.currentTime=e>n.props.player.duration?n.props.player.duration:e,n.props.updateOverlayActionIcon(ko.Forward),n.props.updatePlayerHoverState(!0),{preventDefault:!0,payload:{from:t,to:r}}}return{preventDefault:!0,payload:null}})),j()(t,cr.HOME,(function(){if((!n.props.player.ads||!n.props.player.ads.isAdBreak())&&(!n.props.player.isLive()||n.props.player.isDvr())){var e=n.props.player.currentTime;return n.props.logger.debug("Seek. ".concat(e," => ").concat(0)),n.props.player.currentTime=0,n.props.updateOverlayActionIcon(ko.StartOver),n.props.updatePlayerHoverState(!0),{preventDefault:!0,payload:{from:e,to:0}}}return{preventDefault:!0,payload:null}})),j()(t,cr.END,(function(){if((!n.props.player.ads||!n.props.player.ads.isAdBreak())&&(!n.props.player.isLive()||n.props.player.isDvr())){var e=n.props.player.currentTime,t=n.props.player.duration;return n.props.logger.debug("Seek. ".concat(e," => ").concat(t)),n.props.player.currentTime=t,n.props.updateOverlayActionIcon(ko.SeekEnd),n.props.updatePlayerHoverState(!0),{preventDefault:!0,payload:{from:e,to:t}}}return{preventDefault:!0,payload:null}})),j()(t,cr.M,(function(){return n.props.logger.debug(n.props.player.muted?"Umnute":"Mute"),n.props.player.muted=!n.props.player.muted,n.props.player.muted?n.props.updateOverlayActionIcon([ko.VolumeBase,ko.VolumeMute]):n.props.updateOverlayActionIcon([ko.VolumeBase,ko.VolumeWaves]),{preventDefault:!0,payload:!0}})),j()(t,cr.SEMI_COLON,(function(e){return e.shiftKey?n.props.player.playbackRate!==n.props.player.defaultPlaybackRate?(n.props.logger.debug("Changing playback rate. ".concat(n.props.player.playbackRate," => ").concat(n.props.player.defaultPlaybackRate)),n.props.player.playbackRate=n.props.player.defaultPlaybackRate,n.props.updateOverlayActionIcon(ko.Speed),{preventDefault:!0,payload:{speed:n.props.player.defaultPlaybackRate}}):{preventDefault:!0,payload:null}:Io})),j()(t,cr.PERIOD,(function(e){if(e.shiftKey){var t=n.props.player.playbackRate,r=n.props.player.playbackRates.indexOf(t);return r<n.props.player.playbackRates.length-1?(n.props.logger.debug("Changing playback rate. ".concat(t," => ").concat(n.props.player.playbackRates[r+1])),n.props.player.playbackRate=n.props.player.playbackRates[r+1],n.props.updateOverlayActionIcon(ko.SpeedUp),{preventDefault:!0,payload:{speed:n.props.player.playbackRates[r+1]}}):{preventDefault:!0,payload:null}}return Io})),j()(t,cr.COMMA,(function(e){if(e.shiftKey){var t=n.props.player.playbackRate,r=n.props.player.playbackRates.indexOf(t);return r>0?(n.props.logger.debug("Changing playback rate. ".concat(t," => ").concat(n.props.player.playbackRates[r-1])),n.props.player.playbackRate=n.props.player.playbackRates[r-1],n.props.updateOverlayActionIcon(ko.SpeedDown),{preventDefault:!0,payload:{speed:n.props.player.playbackRates[r-1]}}):{preventDefault:!0,payload:null}}return Io})),j()(t,cr.C,(function(e){var t=n.props.player.getActiveTracks().text;if(e.altKey||e.shiftKey||e.ctrlKey||e.metaKey)return Io;if(t){if("off"===t.language&&n._lastActiveTextLanguage){n.props.logger.debug("Changing text track to language",n._lastActiveTextLanguage);var r=n.props.player.getTracks("text").find((function(e){return e.language===n._lastActiveTextLanguage}));return n.props.player.selectTrack(r),{preventDefault:!0,payload:{track:r}}}"off"===t.language||n._lastActiveTextLanguage||(n.props.logger.debug("Hiding text track"),n._lastActiveTextLanguage=t.language,n.props.player.hideTextTrack())}return{preventDefault:!0,payload:null}})),t));var a=document.getElementById(e.config.targetId);return a?(a.onkeydown=function(e){var t=e.target instanceof Node&&e.target.nodeName||"";if(-1===["INPUT","SELECT","TEXTAREA"].indexOf(t)&&!n.props.overlayOpen&&!n.props.playerNav&&"function"==typeof n.keyboardHandlers[e.keyCode]){n.props.logger.debug("KeyDown -> keyName: ".concat(function(e){for(var t in cr)if(cr[t]===e)return t;return"NOT_FOUND"}(e.keyCode),", shiftKey: ").concat(e.shiftKey.toString()));var r=n.keyboardHandlers[e.keyCode](e),i=r.preventDefault,a=r.payload;i&&e.preventDefault(),a&&n.props.notifyClick(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?wo(Object(n),!0).forEach((function(t){j()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wo(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({key:e.keyCode},a))}},n):rr()(n)}return B()(i,[{key:"componentWillReceiveProps",value:function(e){var t=this.props.textTracks.find((function(e){return e.active})),n=e.textTracks.find((function(e){return e.active}));t&&"off"!==t.language&&n&&"off"===n.language?this._lastActiveTextLanguage=t.language:n&&"off"!==n.language&&(this._lastActiveTextLanguage="")}},{key:"render",value:function(){}}]),i}(X))||bo)||bo)||bo)||bo),Oo=["keydown","keyup"],Lo=(Co=un((function(e){return{playerNav:e.shell.playerNav,overlayOpen:e.overlay.isOpen}})),xo=pr("KEYBOARD_PROVIDER"),Co(Po=sr(Po=xo(Po=function(e){tr()(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=ar()(t);if(n){var i=ar()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return rr()(this,e)});function i(){for(var e,t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];return N()(this,i),e=r.call.apply(r,[this].concat(n)),j()(Jn()(e),"_keyboardListeners",[]),j()(Jn()(e),"_isKeyboardEnable",!1),j()(Jn()(e),"_componentToHandle",null),j()(Jn()(e),"keyEventHandler",void 0),j()(Jn()(e),"_addKeyboardHandler",(function(t,n,r,i){var a=e._createKeyCode(n,r);e._keyboardListeners[a]?e.props.logger.warn("Combination of key ".concat(r.code," altKey ").concat((!!r.altKey).toString()," ctrlKey ").concat((!!r.ctrlKey).toString(),"\n      metaKey ").concat((!!r.metaKey).toString()," shiftKey ").concat((!!r.shiftKey).toString()," already exist")):e._keyboardListeners[a]={callback:i,componentName:t}})),j()(Jn()(e),"_removeKeyboardHandler",(function(t,n){var r=e._createKeyCode(t,n);e._keyboardListeners[r]&&delete e._keyboardListeners[r]})),j()(Jn()(e),"_updateIsKeyboardEnabled",(function(t){e._isKeyboardEnable=t})),j()(Jn()(e),"_setKeyboardEventToScope",(function(t){e._componentToHandle=t})),e}return B()(i,[{key:"componentDidMount",value:function(){var e=this,t=this.props,n=t.eventManager,r=t.playerContainer;this.keyEventHandler=this._keyEventHandler.bind(this),Oo.forEach((function(t){n.listen(r,t,e.keyEventHandler)}))}},{key:"shouldComponentUpdate",value:function(){return!1}},{key:"_keyEventHandler",value:function(e){var t=this._createKeyCode(e.type,{code:e.keyCode,altKey:e.altKey,ctrlKey:e.ctrlKey,metaKey:e.metaKey,shiftKey:e.shiftKey}),n=e.target instanceof Node&&e.target.nodeName||"";-1!==["INPUT","SELECT","TEXTAREA"].indexOf(n)||!this._shouldHandleKeyboardEvents()||!this._keyboardListeners[t]||"function"!=typeof this._keyboardListeners[t].callback||this._componentToHandle&&this._keyboardListeners[t].componentName!==this._componentToHandle||(e.preventDefault(),e.stopPropagation(),this._keyboardListeners[t].callback(e))}},{key:"_shouldHandleKeyboardEvents",value:function(){return this._isKeyboardEnable&&!this.props.playerNav&&!this.props.overlayOpen}},{key:"_createKeyCode",value:function(e,t){var n=Oo.indexOf(e),r=t.altKey?1:0,i=t.ctrlKey?1:0,a=t.metaKey?1:0,o=t.shiftKey?1:0;return parseInt(""+n+t.code+r+i+a+o)}},{key:"getChildContext",value:function(){return{addKeyboardHandler:this._addKeyboardHandler,removeKeyboardHandler:this._removeKeyboardHandler,updateIsKeyboardEnabled:this._updateIsKeyboardEnabled,setKeyboardEventToScope:this._setKeyboardEventToScope}}},{key:"render",value:function(){return this.props.children&&ne(this.props.children)[0]||null}}]),i}(X))||Po)||Po)||Po),Mo=function(e){return function(t){return function(n){tr()(o,n);var r,i,a=(r=o,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=ar()(r);if(i){var n=ar()(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return rr()(this,e)});function o(){var t;N()(this,o);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return t=a.call.apply(a,[this].concat(r)),j()(Jn()(t),"keyboardEventHandlers",[]),j()(Jn()(t),"_updateIsKeyboardEnabled",(function(e){t.context.updateIsKeyboardEnabled(e)})),j()(Jn()(t),"_setKeyboardEventToScope",(function(n){n?t.context.setKeyboardEventToScope(e):t.context.setKeyboardEventToScope(null)})),t}return B()(o,[{key:"componentDidMount",value:function(){var t=this;this.keyboardEventHandlers.forEach((function(n){var r=n.eventType?n.eventType:Oo[0];t._addKeyboardHandler(e,r,n.key,n.action)}))}},{key:"componentWillUnmount",value:function(){var e=this;this.keyboardEventHandlers.forEach((function(t){var n=t.eventType?t.eventType:Oo[0];e._removeKeyboardHandler(n,t.key)}))}},{key:"registerKeyboardEvents",value:function(e){this.keyboardEventHandlers=e}},{key:"_addKeyboardHandler",value:function(e,t,n,r){this.context.addKeyboardHandler(e,t,n,r)}},{key:"_removeKeyboardHandler",value:function(e,t){this.context.removeKeyboardHandler(e,t)}},{key:"render",value:function(){var e=this;return W(t,Qn()({},this.props,{setKeyboardEventToScope:function(t){return e._setKeyboardEventToScope(t)},updateIsKeyboardEnabled:function(t){return e._updateIsKeyboardEnabled(t)},registerKeyboardEvents:function(t){return e.registerKeyboardEvents(t)}}))}}]),o}(X)}},No=Xe((function(e,t){return W("button",Qn()({type:"button",ref:t},e))}));No.displayName="Button";var Uo,Bo,Fo,jo,Ho,Vo,Go,Ko,zo,Wo,Yo,Zo=r(479),qo=r.n(Zo),Xo=Xe((function(e,t){var n=e.className,r=e.children,i=e.name,a=qo()(e,["className","children","name"]),o=[Hr().controlButtonContainer,"".concat("playkit","-control-").concat(Qo(i))];if(n){var s=Array.isArray(n)?n:[n];o=o.concat(s)}return W("div",Qn()({className:o.join(" "),ref:t},a),r)})),Qo=function(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/\s+/g,"-").toLowerCase()},$o="Fullscreen",Jo=(Uo=un((function(e){return{isInFullscreen:e.engine.fullscreen}})),Bo=pr($o),Fo=Mo($o),jo=Si($o),Ho=Un({fullscreenText:"controls.fullscreen",fullscreenExitText:"controls.fullscreenExit"}),Uo(Vo=ai(Vo=Bo(Vo=Fo(Vo=jo(Vo=Ho(Vo=function(e){tr()(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=ar()(t);if(n){var i=ar()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return rr()(this,e)});function i(){var e;N()(this,i);for(var t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];return e=r.call.apply(r,[this].concat(n)),j()(Jn()(e),"_keyboardEventHandlers",[{key:{code:cr.ENTER},action:function(t){e.handleKeydown(t)}},{key:{code:cr.F},action:function(t){e.handleKeydown(t)}},{key:{code:cr.ESC},action:function(t){e.handleKeydown(t)}}]),j()(Jn()(e),"handleKeydown",(function(t){switch(t.keyCode){case cr.ENTER:t.preventDefault(),t.repeat||e.toggleFullscreen();case cr.F:e.props.player.isFullscreen()||e.toggleFullscreen();break;case cr.ESC:e.props.player.isFullscreen()&&e.toggleFullscreen()}})),j()(Jn()(e),"toggleFullscreen",(function(){var t=e.props,n=t.logger,r=t.player;n.debug("Toggle fullscreen"),r.isFullscreen()?r.exitFullscreen():r.enterFullscreen(),e.props.notifyClick()})),e}return B()(i,[{key:"componentDidMount",value:function(){this.props.registerKeyboardEvents(this._keyboardEventHandlers)}},{key:"render",value:function(){return W(Xo,{name:$o},W(uo,{label:this.props.isInFullscreen?this.props.fullscreenExitText:this.props.fullscreenText},W(No,{tabIndex:"0","aria-label":this.props.isInFullscreen?this.props.fullscreenExitText:this.props.fullscreenText,className:this.props.isInFullscreen?[Hr().controlButton,Hr().isFullscreen].join(" "):Hr().controlButton,onKeyDown:this.handleKeydown,onClick:this.toggleFullscreen},W(To,{type:ko.Maximize}),W(To,{type:ko.Minimize}))))}}]),i}(X))||Vo)||Vo)||Vo)||Vo)||Vo)||Vo);function es(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ts(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?es(Object(n),!0).forEach((function(t){j()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):es(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}Jo.displayName=$o;var ns="PlayPause",rs=(Go=un((function(e){return{isPlayingAdOrPlayback:So(e.engine),isPlaying:e.engine.isPlaying,adBreak:e.engine.adBreak,isPlaybackEnded:e.engine.isPlaybackEnded,playerSize:e.shell.playerSize}}),Lr(ts(ts(ts({},Or),xa),La))),Ko=pr(ns),zo=Si(ns),Wo=Un({startOverText:"controls.startOver",pauseText:"controls.pause",playText:"controls.play"}),Go(Yo=ai(Yo=Ko(Yo=zo(Yo=sr(Yo=Wo(Yo=function(e){tr()(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=ar()(t);if(n){var i=ar()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return rr()(this,e)});function i(){var e;N()(this,i);for(var t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];return e=r.call.apply(r,[this].concat(n)),j()(Jn()(e),"_playPauseButtonRef",void 0),j()(Jn()(e),"togglePlayPause",(function(){e.props.logger.debug("Toggle play"),e.props.isPlayingAdOrPlayback?e.props.player.pause():e.props.player.play(),e.props.notifyClick()})),e}return B()(i,[{key:"componentDidMount",value:function(){var e=this,t=this.props,n=t.eventManager,r=t.player,i=[Oi.TINY,Oi.EXTRA_SMALL,Oi.SMALL];n.listenOnce(r,r.Event.UI.USER_CLICKED_PLAY,(function(){n.listenOnce(r,r.Event.Core.FIRST_PLAY,(function(){var t;i.includes(e.props.playerSize)||null===(t=e._playPauseButtonRef)||void 0===t||t.focus()}))}))}},{key:"render",value:function(e){var t=this,n=this.props.isPlayingAdOrPlayback?[Hr().controlButton,Hr().isPlaying].join(" "):Hr().controlButton,r=e.isPlaybackEnded&&!this.props.adBreak,i=this.props.isPlayingAdOrPlayback?this.props.pauseText:this.props.playText,a=r?this.props.startOverText:i;return W(Xo,{name:ns},W(uo,{label:a},W(No,{tabIndex:"0","aria-label":a,className:n,onClick:this.togglePlayPause,ref:function(e){t._playPauseButtonRef=e}},r?W(Ao,{type:ko.StartOver}):W("div",null,W(Ao,{type:ko.Play}),W(Ao,{type:ko.Pause})))))}}]),i}(X))||Yo)||Yo)||Yo)||Yo)||Yo)||Yo);rs.displayName=ns;var is,as,os,ss,ls,us,cs,ds,ps,fs,hs,ys,gs=function(e){return function(t){return sr(function(n){tr()(o,n);var r,i,a=(r=o,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=ar()(r);if(i){var n=ar()(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return rr()(this,e)});function o(){var t;N()(this,o);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return t=a.call.apply(a,[this].concat(r)),j()(Jn()(t),"ref",{current:null}),j()(Jn()(t),"animate",(function(){t.ref.current&&(t.ref.current.classList.add(e),t.props.eventManager.listenOnce(t.ref.current,"animationend",(function(){t.ref.current.classList.remove(e)})))})),t}return B()(o,[{key:"render",value:function(){return W(t,Qn()({},this.props,{innerRef:this.ref,animate:this.animate}))}}]),o}(X))}},vs="Rewind",ms=(is=un((function(e){return{isDvr:e.engine.isDvr,isLive:e.engine.isLive}})),as=pr(vs),os=Si(vs),ss=gs(Hr().rotate),ls=Un((function(e){return{rewindText:W(Dn,{id:"controls.secondsRewind",fields:{seconds:e.step||10}})}})),is(us=ai(us=as(us=os(us=ss(us=ls(us=function(e){tr()(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=ar()(t);if(n){var i=ar()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return rr()(this,e)});function i(){var e;N()(this,i);for(var t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];return e=r.call.apply(r,[this].concat(n)),j()(Jn()(e),"onClick",(function(){var t,n=e.props.player;e.props.animate();var r=e.props.step||10,i=n.currentTime,a=n.isLive()?n.getStartTimeOfDvrWindow():0;n.currentTime-r<a?e.props.isDvr||(t=a):t=n.currentTime-r,n.currentTime=t,e.props.notifyClick({from:i,to:t})})),e}return B()(i,[{key:"_shouldRender",value:function(){var e=!(this.props.isLive&&!this.props.isDvr);return this.props.onToggle(vs,e),e}},{key:"render",value:function(e){var t=e.step,n=e.rewindText,r=e.innerRef;return this._shouldRender()?W(Xo,{name:vs,className:Hr().noIdleControl},W(uo,{label:n},W(No,{tabIndex:"0","aria-label":n,className:"".concat(Hr().controlButton),ref:r,onClick:this.onClick},W(Ao,{type:t&&10!==t?ko.Rewind:ko.Rewind10})))):void 0}}]),i}(X))||us)||us)||us)||us)||us)||us);ms.displayName=vs;var bs,ks,Es="Forward",_s=(cs=un((function(e){return{isDvr:e.engine.isDvr,isLive:e.engine.isLive}})),ds=pr(Es),ps=Si(Es),fs=gs(Hr().reverseRotate),hs=Un((function(e){return{forwardText:W(Dn,{id:"controls.secondsForward",fields:{seconds:e.step||10}})}})),cs(ys=ai(ys=ds(ys=ps(ys=fs(ys=hs(ys=function(e){tr()(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=ar()(t);if(n){var i=ar()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return rr()(this,e)});function i(){var e;N()(this,i);for(var t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];return e=r.call.apply(r,[this].concat(n)),j()(Jn()(e),"onClick",(function(){var t,n=e.props.player;e.props.animate();var r=e.props.step||10,i=n.currentTime,a=n.isLive()?n.liveDuration:n.duration;n.currentTime+r>a?n.isOnLiveEdge()||(t=a):t=n.currentTime+r,n.currentTime=t,e.props.notifyClick({from:i,to:t})})),e}return B()(i,[{key:"_shouldRender",value:function(){var e=!(this.props.isLive&&!this.props.isDvr);return this.props.onToggle(Es,e),e}},{key:"render",value:function(e){var t=e.step,n=e.forwardText,r=e.innerRef;return this._shouldRender()?W(Xo,{name:Es,className:Hr().noIdleControl},W(uo,{label:n},W(No,{tabIndex:"0","aria-label":n,className:"".concat(Hr().controlButton),ref:r,onClick:this.onClick},W(To,{type:t&&10!==t?ko.Forward:ko.Forward10})))):void 0}}]),i}(X))||ys)||ys)||ys)||ys)||ys)||ys);_s.displayName=Es;var Ts,As=(bs=un((function(e){return{duration:e.engine.duration}})),ai(ks=bs(ks=function(e){tr()(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=ar()(t);if(n){var i=ar()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return rr()(this,e)});function i(){return N()(this,i),r.apply(this,arguments)}return B()(i,[{key:"_getFramePreviewImgStyle",value:function(e){return"background: url(".concat(e.url,");")+"background-position: -".concat(e.x,"px -").concat(e.y,"px;")}},{key:"_getFramePreviewImgContainerStyle",value:function(e){return{height:"".concat(e.height+4,"px"),width:"".concat(e.width+4,"px")}}},{key:"render",value:function(){var e=this.props.player.getThumbnail(this.props.virtualTime);if(e)return W("div",{style:this._getFramePreviewImgContainerStyle(e),className:[Hr().framePreviewImgContainer,Hr().nonSticky].join(" ")},W("div",{className:Hr().framePreviewImg,style:this._getFramePreviewImgStyle(e)}))}}]),i}(X))||ks)||ks);As.displayName="SeekBarPreview";var Ss,ws,Cs,xs,Ps=un((function(e){return{dataLoaded:e.engine.dataLoaded,currentTime:e.seekbar.currentTime,duration:e.engine.duration,isMobile:e.shell.isMobile,adBreak:e.engine.adBreak}}))(Ts=ai(Ts=function(e){tr()(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=ar()(t);if(n){var i=ar()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return rr()(this,e)});function i(){return N()(this,i),r.apply(this,arguments)}return B()(i,[{key:"getBufferedPercent",value:function(){var e=this.props.player;if(this.props.duration>0&&e.buffered.length>0){var t=(e.isLive()?e.buffered.end(0)-e.getStartTimeOfDvrWindow():e.buffered.end(0))/this.props.duration*100;return t<100?t:100}return 0}},{key:"render",value:function(e){var t="".concat(Math.round(this.getBufferedPercent()),"%"),n="".concat(e.player.isLive()&&e.player.isOnLiveEdge()?100:e.currentTime/e.duration*100,"%");return W(q,null,W("div",{className:Hr().buffered,style:{width:t}}),e.dataLoaded?W("div",{className:Hr().progress,style:{width:n}}):void 0)}}]),i}(X))||Ts)||Ts;function Rs(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Is(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Rs(Object(n),!0).forEach((function(t){j()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Rs(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}Ps.displayName="ProgressIndicator";var Ds="SeekBar",Os=(Ss=un((function(e){return{config:e.config.components.seekbar,isMobile:e.shell.isMobile,previewHoverActive:e.seekbar.previewHoverActive,hidePreview:e.seekbar.hidePreview,hideTimeBubble:e.seekbar.hideTimeBubble,segments:e.seekbar.segments,seekbarClasses:e.seekbar.seekbarClasses,isPreventSeek:e.seekbar.isPreventSeek,playerSize:e.shell.playerSize}}),Lr(Is(Is({},Or),La))),ws=Mo(Ds),Cs=Un({sliderAriaLabel:"controls.seekBarSlider"}),Ss(xs=ai(xs=sr(xs=ws(xs=Cs(xs=function(e){tr()(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=ar()(t);if(n){var i=ar()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return rr()(this,e)});function i(){var e;N()(this,i);for(var t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];return e=r.call.apply(r,[this].concat(n)),j()(Jn()(e),"_seekBarElement",void 0),j()(Jn()(e),"_framePreviewElement",void 0),j()(Jn()(e),"_timeBubbleElement",void 0),j()(Jn()(e),"_keyboardEventHandlers",[{key:{code:cr.LEFT},action:function(t){e.handleKeydown(t,!1)}},{key:{code:cr.RIGHT},action:function(t){e.handleKeydown(t,!1)}},{key:{code:cr.HOME},action:function(t){e.handleKeydown(t,!1)}},{key:{code:cr.END},action:function(t){e.handleKeydown(t,!1)}}]),j()(Jn()(e),"onSeekbarMouseDown",(function(t){if(!e.props.isMobile&&!e.props.previewHoverActive&&(t.preventDefault(),t.stopPropagation(),e.props.updateSeekbarDraggingStatus(!0),e.props.isDraggingActive)){var n=e.getTime(t);e.updateSeekBarProgress(n,e.props.duration)}})),j()(Jn()(e),"onPlayerMouseUp",(function(t){if(!e.props.isMobile&&!e.props.previewHoverActive&&e.props.isDraggingActive){var n=e.props.currentTime,r=e.getTime(t);e.props.changeCurrentTime(r),e.updateSeekBarProgress(r,e.props.duration),e.props.updateSeekbarDraggingStatus(!1),e.props.notifyChange({from:n,to:r})}})),j()(Jn()(e),"onPlayerMouseMove",(function(t){if(!e.props.isMobile&&e.props.isDraggingActive){var n=e.getTime(t);e.updateSeekBarProgress(n,e.props.duration),e.updateSeekBarProgress(n,e.props.duration,!0)}})),j()(Jn()(e),"onSeekbarMouseMove",(function(t){if(!e.props.isMobile&&!e.props.previewHoverActive){var n=e.getTime(t);e.updateSeekBarProgress(n,e.props.duration,!0)}})),j()(Jn()(e),"onSeekbarTouchStart",(function(t){if(e.props.updateSeekbarDraggingStatus(!0),e.props.isDraggingActive){var n=e.getTime(t);e.updateSeekBarProgress(n,e.props.duration)}})),j()(Jn()(e),"onSeekbarTouchMove",(function(t){var n=e.getTime(t);e.updateSeekBarProgress(n,e.props.duration,!0),e.props.isDraggingActive&&e.updateSeekBarProgress(n,e.props.duration),t.preventDefault()})),j()(Jn()(e),"onKeyDown",(function(t){switch(t.keyCode){case cr.LEFT:case cr.RIGHT:e.handleKeydown(t,!0);break;case cr.ENTER:case cr.SPACE:t.preventDefault(),e.togglePlayPause()}})),j()(Jn()(e),"togglePlayPause",(function(){e.props.player.paused?e.props.player.play():e.props.player.pause()})),j()(Jn()(e),"onSeekbarTouchEnd",(function(t){if(e.props.isDraggingActive){var n=e.getTime(t),r=e.props.currentTime,i=n;e.props.changeCurrentTime(i),e.updateSeekBarProgress(i,e.props.duration),e.props.notifyChange({from:r,to:i})}e.props.updateSeekbarDraggingStatus(!1)})),j()(Jn()(e),"onSeekbarMouseOver",(function(){e.props.isMobile||e.props.updateSeekbarHoverActive(!0)})),j()(Jn()(e),"onSeekbarMouseLeave",(function(){e.props.isMobile||e.props.updateSeekbarHoverActive(!1)})),e}return B()(i,[{key:"componentDidMount",value:function(){var e=this,t=this.props,n=t.player,r=t.eventManager,i=(t.playerSize,this._seekBarElement.getBoundingClientRect());this.props.updateSeekbarClientRect(i),r.listen(n,ur.GUI_RESIZE,(function(){e.setState({resizing:!0}),setTimeout((function(){var t=e._seekBarElement.getBoundingClientRect();e.props.updateSeekbarClientRect(t),e.setState({resizing:!1})}),Number(Hr().defaultTransitionTime))}));var a=[Oi.TINY,Oi.EXTRA_SMALL,Oi.SMALL];r.listenOnce(n,n.Event.UI.USER_CLICKED_PLAY,(function(){r.listenOnce(n,n.Event.Core.FIRST_PLAY,(function(){var t;a.includes(e.props.playerSize)&&(null===(t=e._seekBarElement)||void 0===t||t.focus())}))})),document.addEventListener("mouseup",this.onPlayerMouseUp),document.addEventListener("mousemove",this.onPlayerMouseMove),this.props.registerKeyboardEvents(this._keyboardEventHandlers)}},{key:"componentWillUnmount",value:function(){document.removeEventListener("mouseup",this.onPlayerMouseUp),document.removeEventListener("mousemove",this.onPlayerMouseMove)}},{key:"handleKeydown",value:function(e,t){var n=this,r=this.props,i=r.duration,a=r.currentTime,o=function(e,t){n.props.changeCurrentTime(t),n.updateSeekBarProgress(t,i,!0),n.props.notifyChange({from:e,to:t})};switch(this.props.updatePlayerHoverState(!0),e.keyCode){case cr.LEFT:t||this.props.updateOverlayActionIcon(ko.Rewind),o(a,a-5>0?a-5:0);break;case cr.RIGHT:t||this.props.updateOverlayActionIcon(ko.Forward),o(a,a+5>i?i:a+5);break;case cr.HOME:t||this.props.updateOverlayActionIcon(ko.StartOver),o(a,0);break;case cr.END:t||this.props.updateOverlayActionIcon(ko.SeekEnd),o(a,i)}}},{key:"updateSeekBarProgress",value:function(e,t){arguments.length>2&&void 0!==arguments[2]&&arguments[2]?this.props.updateVirtualTime(e):this.props.updateCurrentTime(e)}},{key:"getOffset",value:function(e){for(var t=0,n=0;e&&!isNaN(e.offsetLeft)&&!isNaN(e.offsetTop);)t+=e.offsetLeft-e.scrollLeft+this._getTransformX(e),n+=e.offsetTop-e.scrollTop,e=e.offsetParent;return this.props.player.isFullscreen()&&(t=0),{top:n,left:t}}},{key:"_getTransformX",value:function(e){var t=getComputedStyle(e),n=(t.getPropertyValue("transform")||t.getPropertyValue("-webkit-transform")||t.getPropertyValue("-moz-transform")||t.getPropertyValue("-ms-transform")||t.getPropertyValue("-o-transform")).match(/-?\d+/g),r=0;return n&&n.length>0&&(r=parseFloat(n[4])),r}},{key:"getTime",value:function(e){var t,n=("number"==typeof e.clientX?e.clientX:null==e||null===(t=e.changedTouches[0])||void 0===t?void 0:t.clientX)-this._seekBarElement.getBoundingClientRect().left,r=parseFloat((this.props.duration/this._seekBarElement.offsetWidth*n).toFixed(2));return r<0?0:r>this.props.duration?this.props.duration:r}},{key:"getFramePreviewOffset",value:function(){if(this._seekBarElement&&this._framePreviewElement){var e=this.props.virtualTime/this.props.duration*this._seekBarElement.clientWidth-this._framePreviewElement.clientWidth/2;return e<0?0:e>this._seekBarElement.clientWidth-this._framePreviewElement.clientWidth?this._seekBarElement.clientWidth-this._framePreviewElement.clientWidth:e}return 0}},{key:"getTimeBubbleOffset",value:function(){if(this._timeBubbleElement){var e=this.props.virtualTime/this.props.duration*this._seekBarElement.clientWidth-this._timeBubbleElement.clientWidth/2;return e<0?0:e>this._seekBarElement.clientWidth-this._timeBubbleElement.clientWidth?this._seekBarElement.clientWidth-this._timeBubbleElement.clientWidth:e}return 0}},{key:"renderFramePreview",value:function(){var e=this;if(this.props.showFramePreview&&!this.props.isMobile&&!this.props.isPreventSeek)return W("div",{className:this.props.hidePreview?[Hr().framePreview,Hr().hideFramePreview].join(" "):Hr().framePreview,style:this._getFramePreviewStyle(),ref:function(t){return t?e._framePreviewElement=t:void 0}},W(As,{virtualTime:this.props.virtualTime}))}},{key:"_getFramePreviewStyle",value:function(){return"left: ".concat(this.getFramePreviewOffset(),"px;")}},{key:"renderTimeBubble",value:function(){var e=this;if(!this.props.hideTimeBubble&&this.props.showTimeBubble&&!this.props.isMobile){var t="left: ".concat(this.getTimeBubbleOffset(),"px"),n=this.props.isDvr?"-"+Ur(this.props.duration-this.props.virtualTime):Ur(this.props.virtualTime);return W("div",{className:Hr().timePreview,style:t,ref:function(t){return t?e._timeBubbleElement=t:void 0}},n)}}},{key:"render",value:function(e,t){var n,r=this,i="".concat(e.virtualTime/e.duration*100,"%"),a="".concat(e.currentTime/e.duration*(null===(n=this._seekBarElement)||void 0===n?void 0:n.clientWidth),"px"),o=[Hr().seekBar].concat(L()(e.seekbarClasses));return e.adBreak&&o.push(Hr().adBreak),e.isDvr&&o.push(Hr().live),e.isMobile&&o.push(Hr().hover),e.isDraggingActive&&o.push(Hr().hover),t.resizing&&o.push(Hr().resizing),W("div",{tabIndex:0,className:o.join(" "),ref:function(e){return e?r._seekBarElement=e:void 0},role:"slider","aria-label":e.sliderAriaLabel,"aria-valuemin":0,"aria-valuemax":Math.round(this.props.duration),"aria-valuenow":Math.round(this.props.currentTime),"aria-valuetext":"".concat(Ur(this.props.currentTime)," of ").concat(Ur(this.props.duration)),onMouseOver:this.onSeekbarMouseOver,onMouseLeave:this.onSeekbarMouseLeave,onMouseMove:this.onSeekbarMouseMove,onMouseDown:this.onSeekbarMouseDown,onTouchStart:this.onSeekbarTouchStart,onTouchMove:this.onSeekbarTouchMove,onTouchEnd:this.onSeekbarTouchEnd,onKeyDown:this.onKeyDown},W("div",{className:Hr().progressBar},W(br,{name:"SeekBar",shouldUpdate:!0},this.renderFramePreview(),this.renderTimeBubble(),W(Ps,null),e.adBreak?void 0:W("div",{id:"scrubber-container",style:"transform: translateX(".concat(a,")")},W("div",{id:"scrubber",className:Hr().scrubber})),W("div",{className:Hr().virtualProgress,style:{width:i}},W("div",{className:Hr().virtualProgressIndicator})))))}}]),i}(X))||xs)||xs)||xs)||xs)||xs);Os.displayName=Ds;var Ls=function(e){tr()(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=ar()(t);if(n){var i=ar()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return rr()(this,e)});function i(){return N()(this,i),r.apply(this,arguments)}return B()(i,[{key:"shouldComponentUpdate",value:function(){return!1}},{key:"render",value:function(e){return W("div",{className:"overlay-portal","aria-live":"polite"},e.children)}}]),i}(X);Ls.displayName="OverlayPortal";var Ms,Ns,Us,Bs,Fs,js=function(e){return(document.getElementById(e.config.targetId)||document).querySelector(".overlay-portal")};function Hs(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Vs(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Hs(Object(n),!0).forEach((function(t){j()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Hs(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Gs,Ks,zs,Ws,Ys,Zs,qs="Settings",Xs=(Ms=un((function(e){return{audioTracks:e.engine.audioTracks,textTracks:e.engine.textTracks,videoTracks:e.engine.videoTracks,isMobile:e.shell.isMobile,isSmallSize:e.shell.isSmallSize,isLive:e.engine.isLive,isAudio:e.engine.isAudio,showQualityMenu:e.config.settings.showQualityMenu,showAudioMenu:e.config.settings.showAudioMenu,showCaptionsMenu:e.config.settings.showCaptionsMenu,showSpeedMenu:e.config.settings.showSpeedMenu,showAdvancedAudioDescToggle:e.config.settings.showAdvancedAudioDescToggle}}),Lr(Vs(Vs({},xa),La))),Ns=Un((function(){return{buttonLabel:W(Dn,{id:"controls.settings"},"Settings"),qualityHdLabel:W(Dn,{id:"settings.qualityHdLabel"},"Quality is HD"),quality4kLabel:W(Dn,{id:"settings.quality4kLabel"},"Quality is 4k"),quality8kLabel:W(Dn,{id:"settings.quality8kLabel"},"Quality is 8k")}})),Us=Mo(qs),Bs=pr(qs),Ms(Fs=Ns(Fs=ai(Fs=sr(Fs=Us(Fs=Bs(Fs=function(e){tr()(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=ar()(t);if(n){var i=ar()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return rr()(this,e)});function i(){var e;N()(this,i);for(var t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];return e=r.call.apply(r,[this].concat(n)),j()(Jn()(e),"_controlSettingsElement",void 0),j()(Jn()(e),"_buttonRef",null),j()(Jn()(e),"_lastActiveTextLanguage",""),j()(Jn()(e),"_keyboardEventHandlers",[{key:{code:cr.PERIOD,shiftKey:!0},action:function(t){e.handleKeydown(t)}},{key:{code:cr.SEMI_COLON,shiftKey:!0},action:function(t){e.handleKeydown(t)}},{key:{code:cr.COMMA,shiftKey:!0},action:function(t){e.handleKeydown(t)}}]),j()(Jn()(e),"onControlButtonClick",(function(t,n){e.setState((function(e){return{smartContainerOpen:!e.smartContainerOpen}})),n&&e.state.smartContainerOpen&&Mr(e._buttonRef)})),j()(Jn()(e),"setButtonRef",(function(t){e._buttonRef=t})),j()(Jn()(e),"toggleCVAAOverlay",(function(){e.setState((function(e){return{cvaaOverlay:!e.cvaaOverlay}}))})),j()(Jn()(e),"onCVAAOverlayClose",(function(t,n){e.toggleCVAAOverlay(),e.onControlButtonClick(t,n)})),e}return B()(i,[{key:"componentWillMount",value:function(){this.setState({smartContainerOpen:!1,cvaaOverlay:!1})}},{key:"componentDidMount",value:function(){var e=this,t=this.props.eventManager;t.listen(document,"click",(function(t){return e.handleClickOutside(t)})),t.listen(document,"keydown",(function(t){return e.handleCCToggle(t)})),this.props.registerKeyboardEvents(this._keyboardEventHandlers)}},{key:"handleKeydown",value:function(e){var t,n,r=this.props,i=r.player,a=r.logger;switch(e.keyCode){case cr.PERIOD:t=i.playbackRate,(n=i.playbackRates.indexOf(t))<i.playbackRates.length-1&&(a.debug("Changing playback rate. ".concat(t," => ").concat(i.playbackRates[n+1])),i.playbackRate=i.playbackRates[n+1],this.props.updateOverlayActionIcon(ko.SpeedUp),i.dispatchEvent(new ci(i.playbackRate)));break;case cr.SEMI_COLON:i.playbackRate!==i.defaultPlaybackRate&&(a.debug("Changing playback rate. ".concat(i.playbackRate," => ").concat(i.defaultPlaybackRate)),i.playbackRate=i.defaultPlaybackRate,this.props.updateOverlayActionIcon(ko.Speed),i.dispatchEvent(new ci(i.playbackRate)));break;case cr.COMMA:t=i.playbackRate,(n=i.playbackRates.indexOf(t))>0&&(a.debug("Changing playback rate. ".concat(t," => ").concat(i.playbackRates[n-1])),i.playbackRate=i.playbackRates[n-1],this.props.updateOverlayActionIcon(ko.SpeedDown),i.dispatchEvent(new ci(i.playbackRate)))}}},{key:"handleCCToggle",value:function(e){var t=this;if("c"===e.key||"C"===e.key){var n=this.props,r=n.player,i=n.logger,a=r.getActiveTracks().text;if(a)if("off"===a.language&&this._lastActiveTextLanguage){i.debug("Changing text track to language",this._lastActiveTextLanguage);var o=r.getTracks("text").find((function(e){return e.language===t._lastActiveTextLanguage}));r.selectTrack(o)}else"off"===a.language||this._lastActiveTextLanguage||(i.debug("Hiding text track"),this._lastActiveTextLanguage=a.language,r.hideTextTrack())}}},{key:"componentWillReceiveProps",value:function(e){var t=this.props.textTracks.find((function(e){return e.active})),n=e.textTracks.find((function(e){return e.active}));t&&"off"!==t.language&&n&&"off"===n.language?this._lastActiveTextLanguage=t.language:n&&"off"!==n.language&&(this._lastActiveTextLanguage="")}},{key:"handleClickOutside",value:function(e){this.state.cvaaOverlay||this.props.isMobile||this.props.isSmallSize||!this._controlSettingsElement||this._controlSettingsElement.contains(e.target)||!this.state.smartContainerOpen||this.setState({smartContainerOpen:!1})}},{key:"getButtonBadgeType",value:function(){var e,t,n=null===(e=this.props.player.getActiveTracks())||void 0===e||null===(t=e.video)||void 0===t?void 0:t.height;return n?kp(n):null}},{key:"getQualityLabel",value:function(e){switch(e){case"qualityHd":return this.props.qualityHdLabel;case"quality4k":return this.props.quality4kLabel;case"quality8k":return this.props.quality8kLabel;default:return""}}},{key:"render",value:function(e){var t=this,n=e.showAudioMenu&&e.audioTracks.length>1,r=e.showAdvancedAudioDescToggle,i=e.showCaptionsMenu&&e.textTracks.length>1,a=e.showQualityMenu&&!e.isAudio&&e.videoTracks.length>1,o=e.showSpeedMenu&&e.player.playbackRates.length>1&&!e.isLive;if((n||i||a||o)&&(!(e.isLive&&e.videoTracks.length<=1)||n||i)){var s=this.getButtonBadgeType()||"",l=e.buttonLabel+" "+this.getQualityLabel(s);return W(Xo,{name:qs,ref:function(e){return e?t._controlSettingsElement=e:void 0}},W(uo,{label:e.buttonLabel},W(No,{ref:this.setButtonRef,tabIndex:"0","aria-label":l,"aria-haspopup":"true",className:[Hr().controlButton,Hr().buttonBadge,Eo[s+"Active"],this.state.smartContainerOpen?Hr().active:""].join(" "),onClick:this.onControlButtonClick},W(Ao,{type:ko.Settings}))),this.state.smartContainerOpen&&!this.state.cvaaOverlay&&W(Pc,{title:W(Dn,{id:"settings.title"}),onClose:this.onControlButtonClick},r&&W(Rp,null),n&&W(rp,null),i&&W(pp,{asDropdown:!0,onAdvancedCaptionsClick:this.toggleCVAAOverlay}),a&&W(Ap,null),o&&W(mp,null)),this.state.cvaaOverlay?st(W(Tu,{onClose:this.onCVAAOverlayClose}),js(e.player)):W("div",null))}}}]),i}(X))||Fs)||Fs)||Fs)||Fs)||Fs)||Fs);function Qs(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function $s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Qs(Object(n),!0).forEach((function(t){j()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qs(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}Xs.displayName=qs;var Js="Volume",el=(Gs=un((function(e){return{isDraggingActive:e.volume.draggingActive,volume:e.engine.volume,muted:e.engine.muted,isMobile:e.shell.isMobile}}),Lr($s($s($s({},ua),ri),La))),Ks=Mo(Js),zs=pr(Js),Ws=Si(Js),Ys=Un((function(e){return{volumeLabel:e.muted?W(Dn,{id:"controls.unmute"},"Unmute"):W(Dn,{id:"controls.mute"},"Mute"),sliderAriaLabel:W(Dn,{id:"volume.volume_slider_aria_label"},"Volume"),sliderAriaDescription:W(Dn,{id:"volume.volume_slider_description"},"Use the arrows to control the volume")}})),Gs(Zs=ai(Zs=sr(Zs=Ks(Zs=zs(Zs=Ws(Zs=Ys(Zs=function(e){tr()(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=ar()(t);if(n){var i=ar()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return rr()(this,e)});function i(){var e;N()(this,i);for(var t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];return e=r.call.apply(r,[this].concat(n)),j()(Jn()(e),"_volumeControlElement",void 0),j()(Jn()(e),"_volumeProgressBarElement",void 0),j()(Jn()(e),"_keyboardEventHandlers",[{key:{code:cr.UP},action:function(t){e.handleKeydown(t)}},{key:{code:cr.DOWN},action:function(t){e.handleKeydown(t)}},{key:{code:cr.M},action:function(t){e.handleKeydown(t)}}]),j()(Jn()(e),"onVolumeProgressBarMouseDown",(function(){e.props.updateVolumeDraggingStatus(!0)})),j()(Jn()(e),"onVolumeProgressBarMouseMove",(function(t){e.props.isDraggingActive&&e.changeVolume(t)})),j()(Jn()(e),"onMouseOver",(function(){e.props.isMobile||(e.props.updateVolumeHover(!0),e.setState({hover:!0}))})),j()(Jn()(e),"onMouseOut",(function(){e.props.isMobile||(e.props.updateVolumeHover(!1),e.setState({hover:!1}))})),j()(Jn()(e),"onKeyDown",(function(t){switch(t.keyCode){case cr.UP:case cr.DOWN:case cr.ENTER:case cr.SPACE:t.preventDefault(),t.stopPropagation(),e.handleKeydown(t);break;case cr.TAB:break;default:e.setState({hover:!1})}})),j()(Jn()(e),"onFocus",(function(){e.props.isMobile||e.state.hover||e.setState({hover:!0})})),j()(Jn()(e),"onTouchEnd",(function(e){e.stopImmediatePropagation()})),j()(Jn()(e),"onVolumeProgressBarMouseUp",(function(t){e.props.isDraggingActive&&(e.props.updateVolumeDraggingStatus(!1),e.changeVolume(t))})),j()(Jn()(e),"toggleMute",(function(){var t=e.props.player;0===t.volume?(e.props.logger.debug("Toggle mute. Volume is 0, set mute to false & volume to 0.5"),t.muted=!1,t.volume=.5):(e.props.logger.debug("Toggle mute. ".concat(t.muted," => ").concat(!t.muted)),t.muted=!t.muted),e.props.notifyClick()})),j()(Jn()(e),"onProgressBarKeyDown",(function(t){t.keyCode===cr.TAB?e.setState({hover:!1}):(t.preventDefault(),t.stopPropagation(),e.handleKeydown(t,!0))})),e}return B()(i,[{key:"componentDidMount",value:function(){var e=this,t=this.props.player;this.props.eventManager.listen(t,t.Event.LOADED_METADATA,(function(){e.props.updateVolume(t.volume),e.props.updateMuted(t.muted)})),this.props.eventManager.listen(t,t.Event.VOLUME_CHANGE,(function(){e.props.updateMuted(t.muted),e.props.updateVolume(t.volume)})),this.props.eventManager.listen(document,"mouseup",this.onVolumeProgressBarMouseUp),this.props.eventManager.listen(document,"mousemove",this.onVolumeProgressBarMouseMove),this.props.eventManager.listen(document,"click",(function(t){return e.handleClickOutside(t)})),this.props.registerKeyboardEvents(this._keyboardEventHandlers)}},{key:"_shouldRender",value:function(){var e=!(this.props.player.isImage()||this.props.player.isDocument());return this.props.onToggle(Js,e),e}},{key:"handleClickOutside",value:function(e){!this.props.isMobile&&this._volumeControlElement&&!this._volumeControlElement.contains(e.target)&&this.state.hover&&this.setState({hover:!1})}},{key:"getVolumeProgressHeight",value:function(){return this.props.muted?"0%":Math.round(100*this.props.volume)+"%"}},{key:"handleKeydown",value:function(e){var t,n=this,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=this.props.player,a=function(e){e===i.volume||e>100||e<0||(i.muted=e<5,i.volume=e/100,n.props.notifyChange({volume:i.volume}))};switch(e.keyCode){case cr.UP:this.props.updateOverlayActionIcon([ko.VolumeBase,ko.VolumeWaves]),a(t=Math.min(Math.round(100*i.volume)+5,100));break;case cr.DOWN:0===(t=Math.max(Math.round(100*i.volume)-5,0))?this.props.updateOverlayActionIcon([ko.VolumeBase,ko.VolumeMute]):this.props.updateOverlayActionIcon([ko.VolumeBase,ko.VolumeWave]),a(t);break;case cr.M:i.muted?this.props.updateOverlayActionIcon([ko.VolumeBase,ko.VolumeWaves]):this.props.updateOverlayActionIcon([ko.VolumeBase,ko.VolumeMute]),this.toggleMute();break;case cr.ENTER:case cr.SPACE:r||this.toggleMute()}}},{key:"changeVolume",value:function(e){var t,n=this.props.player,r=this._volumeProgressBarElement.getBoundingClientRect();t=r.height>r.width?this._getVerticalVolume(r,e):this._getHorizontalVolume(r,e),(t=parseFloat(t.toFixed(2)))<=1&&t>=0&&(this.props.logger.debug("Change volume from ".concat(n.volume," => ").concat(t)),n.volume=t,this.props.muted&&(n.muted=!1),this.props.notifyChange({volume:n.volume}))}},{key:"_getHorizontalVolume",value:function(e,t){var n=e.width,r=e.left,i=t.clientX;return 0!=n?(i-r)/n:0}},{key:"_getVerticalVolume",value:function(e,t){var n=e.height,r=e.top,i=t.clientY;return 0!=n?1-(i-r)/n:0}},{key:"render",value:function(){var e=this;if(this._shouldRender){var t=this.props,n=t.player,r=t.isDraggingActive,i=t.muted,a=t.volume,o=t.smartContainerOpen,s=[Hr().volumeControl];r&&s.push(Hr().draggingActive),(i||0===a)&&s.push(Hr().isMuted),this.state.hover&&!o&&s.push(Hr().hover);var l=Math.round(100*n.volume);return W(Xo,{name:Js,ref:function(t){return t?e._volumeControlElement=t:void 0},className:s,onMouseOver:this.onMouseOver,onMouseOut:this.onMouseOut},W(uo,{label:this.props.volumeLabel,type:this.props.toolTipType?this.props.toolTipType:lo.Left},W(No,{tabIndex:"0","aria-live":"polite","aria-label":"".concat(this.props.volumeLabel),className:Hr().controlButton,onMouseUp:this.toggleMute,onTouchEnd:this.onTouchEnd,onKeyDown:this.onKeyDown},W(To,{type:ko.VolumeBase}),W(To,{type:ko.VolumeWaves}),W(To,{type:ko.VolumeMute}))),W("div",{tabIndex:0,"aria-orientation":"vertical","aria-label":this.props.sliderAriaLabel,"aria-description":this.props.sliderAriaDescription,onKeyDown:this.onProgressBarKeyDown,className:Hr().volumeControlBar,onFocus:this.onFocus,role:"slider","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":l,"aria-valuetext":"".concat(l,"% volume ").concat(n.muted?"muted":"")},W("div",{className:Hr().bar,ref:function(t){return t?e._volumeProgressBarElement=t:void 0},onMouseDown:this.onVolumeProgressBarMouseDown},W("div",{className:Hr().progress,style:{height:this.getVolumeProgressHeight()}}))))}}}]),i}(X))||Zs)||Zs)||Zs)||Zs)||Zs)||Zs)||Zs);el.displayName=Js;var tl,nl,rl=function(){function e(){N()(this,e),j()(this,"_registry",void 0),this._registry=new Map}return B()(e,[{key:"register",value:function(e,t){this.getComponentItem(e)||this._registry.set(e,t)}},{key:"unregister",value:function(e){this.getComponentItem(e)&&this._registry.delete(e)}},{key:"getComponentItem",value:function(e){return this._registry.get(e)}},{key:"clear",value:function(){this._registry.clear()}}]),e}(),il="bottomBarRegistryManager",al=function(e,t,n){var r=(null==t?void 0:t.getService(il))||void 0;r&&!r.getComponentItem(e)&&r.register(e,n())};function ol(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function sl(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ol(Object(n),!0).forEach((function(t){j()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ol(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ll,ul,cl,dl,pl=[["PictureInPicture"],["VrStereo"],["TimeDisplayPlaybackContainer"],["AdvancedAudioDesc"],["ClosedCaptions"],["CaptionsControl"],["Cast"]],fl="TimeDisplayPlaybackContainer",hl=(tl=un((function(e){return{isCasting:e.engine.isCasting,isPlaybackEnded:e.engine.isPlaybackEnded,guiClientRect:e.shell.guiClientRect,playerSize:e.shell.playerSize,playlist:e.engine.playlist}}),Lr(sl(sl({},Or),io))),ai(nl=sr(nl=tl(nl=function(e){tr()(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=ar()(t);if(n){var i=ar()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return rr()(this,e)});function i(e){var t;return N()(this,i),t=r.call(this),j()(Jn()(t),"bottomBarContainerRef",{current:null}),j()(Jn()(t),"presetControls",{}),j()(Jn()(t),"currentBarWidth",0),j()(Jn()(t),"resizeObserver",void 0),j()(Jn()(t),"_maxControlsWidth",0),j()(Jn()(t),"_getControlsWidth",(function(e){return Array.from(e.childNodes).reduce((function(e,t){return e+t.offsetWidth}),0)})),j()(Jn()(t),"onToggleControl",(function(e,n){e in t.state.activeControls&&t.state.activeControls[e]!==n&&t.setState((function(t){return{activeControls:sl(sl({},t.activeControls),j()({},e,n))}}))})),e.leftControls=e.leftControls||[],e.rightControls=e.rightControls||[],e.leftControls.concat(e.rightControls).map((function(e){return e.displayName})).forEach((function(e){return t.presetControls[e]=!0})),t.state={fitInControls:t.presetControls,activeControls:t.presetControls},e.player.registerService(il,new rl),t}return B()(i,[{key:"componentDidMount",value:function(){var e=this;this.resizeObserver=new ResizeObserver((function(t){return e.onBarWidthChange(t[0])})),this.resizeObserver.observe(this.bottomBarContainerRef.current)}},{key:"componentWillUnmount",value:function(){this.resizeObserver.disconnect(),this._maxControlsWidth=0}},{key:"onBarWidthChange",value:function(e){var t=this,n=e.contentRect.width,r=this._getControlsWidth(e.target);if(this._maxControlsWidth=Math.max(this._maxControlsWidth,r),n!==this.currentBarWidth){this.currentBarWidth=n;var i=this.props.guiClientRect.width<=Li.SMALL?38:44,a=pl.filter((function(e){return t.state.activeControls[e[0]]}));this.filterControls(n,this._maxControlsWidth,i,a)}}},{key:"filterControls",value:function(e,t,n,r){if(t>=e){var i=function(e,t,n,r){var i=Math.ceil((e-t)/n)||1,a=r.flat().slice(0,i),o=L()(r).reverse().find((function(e){return e.length>1}));return a[a.length-1]===(null==o?void 0:o[0])&&a.push(o[1]),a}(t,e,n,r),a={};i.forEach((function(e){return a[e]=!1})),this.props.updateControlsToMove(i),this.setState({fitInControls:sl(sl({},this.presetControls),a)})}else this.setState({fitInControls:sl({},this.presetControls)}),this.props.updateControlsToMove([])}},{key:"render",value:function(e){var t=this,n=[Hr().bottomBar];e.isCasting&&e.isPlaybackEnded&&n.push(Hr().hide);var r=this.presetControls[fl]&&!this.state.fitInControls[fl];return W("div",{className:n.join(" ")},W("div",{className:Hr().bottomBarArea},W(br,{shouldUpdate:!0,name:"BottomBar"},r&&W(Bc,null),e.children)),W("div",{ref:this.bottomBarContainerRef,className:Hr().controlsContainer},W("div",{className:Hr().leftControls},W(br,{shouldUpdate:!0,name:"BottomBarLeftControls"},e.leftControls&&e.leftControls.map((function(e){return t.presetControls[e.displayName]&&t.state.fitInControls[e.displayName]&&W(e,{key:e.displayName,onToggle:t.onToggleControl})})))),W("div",{className:Hr().rightControls},W(br,{shouldUpdate:!0,name:"BottomBarRightControls"},e.rightControls&&e.rightControls.map((function(e){return t.presetControls[e.displayName]&&t.state.fitInControls[e.displayName]&&W(e,{key:e.displayName,onToggle:t.onToggleControl})}))))))}}]),i}(X))||nl)||nl)||nl);function yl(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function gl(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?yl(Object(n),!0).forEach((function(t){j()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yl(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}hl.displayName="BottomBar";var vl="VrStereo",ml=(ll=un((function(e){return{isVr:e.engine.isVr,vrStereoMode:e.engine.vrStereoMode,config:e.config.components.vrStereo}}),Lr(gl(gl({},Or),ri))),ul=pr(vl),cl=Un({vrStereoText:"controls.vrStereo"}),ll(dl=ai(dl=ul(dl=cl(dl=function(e){tr()(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=ar()(t);if(n){var i=ar()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return rr()(this,e)});function i(e){var t;return N()(this,i),t=r.call(this,e),j()(Jn()(t),"getComponentText",(function(){return t.props.vrStereoText})),j()(Jn()(t),"onClick",(function(){t.props.player.toggleVrStereoMode(),t.props.updateVrStereoMode(!t.props.vrStereoMode)})),j()(Jn()(t),"onKeyDown",(function(e){e.keyCode===cr.ENTER&&t.onClick()})),al(vl,e.player,(function(){return t.registerComponent()})),t}return B()(i,[{key:"registerComponent",value:function(){var e=this;return{ariaLabel:function(){return e.getComponentText()},displayName:vl,order:5,svgIcon:function(){return e.getSvgIcon()},onClick:function(){return e.onClick()},component:function(){return bl(gl(gl({},e.props),{},{classNames:[Hr().upperBarIcon]}))},shouldHandleOnClick:!1}}},{key:"getSvgIcon",value:function(){return{type:pn().getState().engine.vrStereoMode?ko.vrStereoFull:ko.vrStereo}}},{key:"_shouldRender",value:function(){var e=this.props.config,t=this.props.isVr&&!(0===Object.keys(e).length&&e.constructor===Object);return this.props.onToggle(vl,t),t}},{key:"componentWillMount",value:function(){this.props.updateVrStereoMode(this.props.config.vrStereoMode)}},{key:"render",value:function(){return this._shouldRender()?W(Xo,{name:vl,className:this.props.classNames?this.props.classNames.join(" "):""},W(uo,{label:this.props.vrStereoText},W(No,{tabIndex:"0","aria-label":this.props.vrStereoText,className:this.props.vrStereoMode?[Hr().controlButton,Hr().vrStereoMode].join(" "):Hr().controlButton,onClick:this.onClick,onKeyDown:this.onKeyDown},W(Ao,{type:ko.vrStereo}),W(Ao,{type:ko.vrStereoFull})))):void 0}}]),i}(X))||dl)||dl)||dl)||dl),bl=function(e){return W(ml,e)};function kl(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function El(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?kl(Object(n),!0).forEach((function(t){j()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kl(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}ml.displayName=vl;var _l,Tl="ClosedCaptions",Al=un((function(e){return{textTracks:e.engine.textTracks,showCCButton:e.config.showCCButton,openMenuFromCCButton:e.config.openMenuFromCCButton}}))(pr(Tl)(Si(Tl)(Un({closedCaptionsOnText:"controls.closedCaptionsOn",closedCaptionsOffText:"controls.closedCaptionsOff"})((function(e,t){var n=xe(!1),r=D()(n,2),i=r[0],a=r[1],o=e.textTracks,s=t.player,l=o.find((function(e){return e.active}));Re((function(){a("off"!==(null==l?void 0:l.language))}),[l]),Re((function(){al(Tl,s,(function(){return u()}))}),[]);var u=function(){return{ariaLabel:function(){return d()},displayName:Tl,order:5,svgIcon:function(){return p()},onClick:function(){return f()},component:function(){return Sl(El(El({},e),{},{classNames:[Hr().upperBarIcon]}))},shouldHandleOnClick:!1}},c=function(){return pn().getState().settings.isCaptionsEnabled},d=function(){return c()?e.closedCaptionsOnText:e.closedCaptionsOffText},p=function(){return{type:c()?ko.ClosedCaptionsOn:ko.ClosedCaptionsOff}},f=function(){var t=c();e.notifyClick(t),t?s.hideTextTrack():s.showTextTrack()},h=!!(null==o?void 0:o.length)&&e.showCCButton&&!e.openMenuFromCCButton;if(e.onToggle(Tl,h),h)return W(Xo,{name:Tl,className:e.classNames?e.classNames.join(" "):""},i?W(uo,{label:e.closedCaptionsOnText},W(No,{tabIndex:0,"aria-label":e.closedCaptionsOnText,className:[Hr().controlButton,Hr().ccOn].join(" "),onClick:function(){e.notifyClick(!0),s.hideTextTrack()}},W(To,{type:ko.ClosedCaptionsOn}))):W(uo,{label:e.closedCaptionsOffText},W(No,{tabIndex:0,"aria-label":e.closedCaptionsOffText,className:Hr().controlButton,onClick:function(){e.notifyClick(!1),s.showTextTrack()}},W(To,{type:ko.ClosedCaptionsOff}))))}))))),Sl=function(e){return W(Al,e)};Al.displayName=Tl;var wl,Cl,xl,Pl=un((function(e){return{url:e.engine.adUrl}}))(_l=function(e){tr()(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=ar()(t);if(n){var i=ar()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return rr()(this,e)});function i(){return N()(this,i),r.apply(this,arguments)}return B()(i,[{key:"render",value:function(e){return W("a",{href:e.url,target:"_blank",rel:"noreferrer",className:[Hr().btn,Hr().btnDarkTransparent,Hr().learnMore].join(" ")},W(Dn,{id:"ads.learn_more"}))}}]),i}(X))||_l;Pl.displayName="AdLearnMore";var Rl="AdSkip",Il=(wl=un((function(e){return{currentTime:e.engine.adProgress.currentTime,duration:e.engine.adProgress.duration,adSkipTimeOffset:e.engine.adSkipTimeOffset,adSkippableState:e.engine.adSkippableState}})),Cl=pr(Rl),wl(xl=ai(xl=Cl(xl=function(e){tr()(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=ar()(t);if(n){var i=ar()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return rr()(this,e)});function i(){var e;N()(this,i);for(var t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];return e=r.call.apply(r,[this].concat(n)),j()(Jn()(e),"skipAd",(function(){var t;null===(t=e.props.player.ads)||void 0===t||t.skipAd()})),e}return B()(i,[{key:"getSkipTimeOffset",value:function(){return Math.ceil(this.props.adSkipTimeOffset-this.props.currentTime)}},{key:"render",value:function(){return this.props.adSkippableState?this.getSkipTimeOffset()<=0?W(Ln,null,W("a",{className:[Hr().btn,Hr().btnBranded,Hr().btnSkipAd].join(" "),onClick:this.skipAd},W(Dn,{id:"ads.skip_ad"}))):W(Ln,null,W("span",{className:Hr().skipAd},W(Dn,{id:"ads.skip_in"})," "+this.getSkipTimeOffset())):void 0}}]),i}(X))||xl)||xl)||xl);Il.displayName=Rl;var Dl=function(e){tr()(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=ar()(t);if(n){var i=ar()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return rr()(this,e)});function i(){return N()(this,i),r.apply(this,arguments)}return B()(i,[{key:"render",value:function(){return W("span",{className:Hr().adNotice},W(Dn,{id:"ads.ad_notice"}))}}]),i}(X);Dl.displayName="AdNotice";var Ol,Ll=function(e){tr()(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=ar()(t);if(n){var i=ar()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return rr()(this,e)});function i(e){var t;return N()(this,i),(t=r.call(this,ur.USER_SELECTED_CAPTIONS_STYLE)).payload={captionsStyle:e},t}return i}(or.FakeEvent),Ml=function(e){tr()(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=ar()(t);if(n){var i=ar()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return rr()(this,e)});function i(e){var t;return N()(this,i),(t=r.call(this,ur.PLAYER_RESIZE)).payload={playerSize:e},t}return i}(or.FakeEvent),Nl=function(e){tr()(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=ar()(t);if(n){var i=ar()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return rr()(this,e)});function i(e){var t;return N()(this,i),(t=r.call(this,ur.GUI_RESIZE)).payload={guiSize:e},t}return i}(or.FakeEvent),Ul=function(e){tr()(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=ar()(t);if(n){var i=ar()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return rr()(this,e)});function i(e){var t;return N()(this,i),(t=r.call(this,ur.VIDEO_RESIZE)).payload={videoSize:e},t}return i}(or.FakeEvent),Bl="event-dispatcher-middleware",Fl={COMPONENT_CLICKED:"".concat(Bl,"/COMPONENT_CLICKED"),COMPONENT_CHANGED:"".concat(Bl,"/COMPONENT_CHANGED")};function jl(e,t,n){var r=e.getState().engine;r.adBreak?r.adIsPlaying?n.dispatchEvent(new or.FakeEvent(ur.USER_CLICKED_PAUSE)):n.dispatchEvent(new or.FakeEvent(ur.USER_CLICKED_PLAY)):r.isPlaying?n.dispatchEvent(new or.FakeEvent(ur.USER_CLICKED_PAUSE)):n.dispatchEvent(new or.FakeEvent(ur.USER_CLICKED_PLAY))}function Hl(e,t,n){e.getState().engine.muted?n.dispatchEvent(new or.FakeEvent(ur.USER_CLICKED_MUTE)):n.dispatchEvent(new or.FakeEvent(ur.USER_CLICKED_UNMUTE))}function Vl(e,t,n){n.isFullscreen()?n.dispatchEvent(new or.FakeEvent(ur.USER_EXITED_FULL_SCREEN)):n.dispatchEvent(new or.FakeEvent(ur.USER_ENTERED_FULL_SCREEN))}var Gl,Kl=(Ol={},j()(Ol,cr.SPACE,(function(e,t,n){jl(e,0,n)})),j()(Ol,cr.UP,(function(e,t,n){n.dispatchEvent(new hi(t.payload.volume))})),j()(Ol,cr.DOWN,(function(e,t,n){n.dispatchEvent(new hi(t.payload.volume))})),j()(Ol,cr.F,(function(e,t,n){Vl(0,0,n)})),j()(Ol,cr.P,(function(e,t,n){!function(e,t,n){n.isInPictureInPicture()?n.dispatchEvent(new or.FakeEvent(ur.USER_EXITED_PICTURE_IN_PICTURE)):n.dispatchEvent(new or.FakeEvent(ur.USER_ENTERED_PICTURE_IN_PICTURE))}(0,0,n)})),j()(Ol,cr.ESC,(function(e,t,n){Vl(0,0,n)})),j()(Ol,cr.LEFT,(function(e,t,n){n.dispatchEvent(new ui(t.payload.from,t.payload.to))})),j()(Ol,cr.RIGHT,(function(e,t,n){n.dispatchEvent(new ui(t.payload.from,t.payload.to))})),j()(Ol,cr.HOME,(function(e,t,n){n.dispatchEvent(new ui(t.payload.from,t.payload.to))})),j()(Ol,cr.END,(function(e,t,n){n.dispatchEvent(new ui(t.payload.from,t.payload.to))})),j()(Ol,cr.M,(function(e,t,n){Hl(e,0,n)})),j()(Ol,cr.SEMI_COLON,(function(e,t,n){n.dispatchEvent(new ci(t.payload.speed))})),j()(Ol,cr.PERIOD,(function(e,t,n){n.dispatchEvent(new ci(t.payload.speed))})),j()(Ol,cr.COMMA,(function(e,t,n){n.dispatchEvent(new ci(t.payload.speed))})),j()(Ol,cr.C,(function(e,t,n){n.dispatchEvent(new si(t.payload.track))})),Ol),zl=function(e){tr()(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=ar()(t);if(n){var i=ar()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return rr()(this,e)});function i(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{config:{}};return N()(this,i),e=r.call(this),j()(Jn()(e),"player",void 0),j()(Jn()(e),"name",void 0),j()(Jn()(e),"config",void 0),j()(Jn()(e),"logger",void 0),j()(Jn()(e),"eventManager",void 0),e.name=t.name,e.config=t.config,e.player=t.player,e.eventManager=new or.EventManager,e.logger=qn("UI ".concat(e.name)),e.logger.debug("Initialized"),e}return B()(i,[{key:"notifyClick",value:function(e){this.context.store.dispatch({type:Fl.COMPONENT_CLICKED,name:this.name,payload:e})}},{key:"notifyChange",value:function(e){this.context.store.dispatch({type:Fl.COMPONENT_CHANGED,name:this.name,payload:e})}},{key:"componentWillUnmount",value:function(){this.eventManager.removeAll()}},{key:"render",value:function(e,t,n){}}]),i}(X);function Wl(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Yl(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Wl(Object(n),!0).forEach((function(t){j()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Wl(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}j()(zl,"defaultProps",{});var Zl=un((function(e){return{overlayOpen:e.overlay.isOpen}}),Lr(Yl(Yl({},Or),Wa)))(Gl=ai(Gl=function(e){tr()(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=ar()(t);if(n){var i=ar()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return rr()(this,e)});function i(){var e;N()(this,i);for(var t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];return e=r.call.apply(r,[this].concat(n)),j()(Jn()(e),"_timeoutId",null),j()(Jn()(e),"onCloseButtonKeyDown",(function(t){t.keyCode!==cr.ENTER&&t.keyCode!==cr.SPACE||(t.preventDefault(),e.props.onClose(t,!0))})),j()(Jn()(e),"onKeyDown",(function(t){e.props.handleKeyDown&&e.props.handleKeyDown(t)})),e}return B()(i,[{key:"componentDidMount",value:function(){var e=this;this._timeoutId=setTimeout((function(){return e.props.addPlayerClass(Hr().overlayActive)}),0)}},{key:"componentWillUnmount",value:function(){this._timeoutId&&(clearTimeout(this._timeoutId),this._timeoutId=null),(this.props.dontCheckOverlayPortal||js(this.props.player).childElementCount<=1)&&this.props.removePlayerClass(Hr().overlayActive)}},{key:"renderCloseButton",value:function(e){return e.permanent?void 0:W(Ln,null,W("a",{role:"button",ref:function(t){e.addAccessibleChild&&e.addAccessibleChild(t)},tabIndex:0,onClick:function(){e.updateOverlay(!1),e.onClose()},onKeyDown:this.onCloseButtonKeyDown,"aria-label":W(Dn,{id:"overlay.close"}),className:Hr().closeOverlay},W(Ao,{type:ko.Close})))}},{key:"render",value:function(e){var t=e.type,n=e.open,r=e.ariaLabel,i=e.ariaLabelledBy,a=i?{"aria-labelledby":i}:{"aria-label":r},o=[Hr().overlay];if(t){var s=Hr()[t+"-overlay"]?Hr()[t+"-overlay"]:t+"-overlay";o.push(s)}return n&&(this.props.updateOverlay(n),o.push(Hr().active)),W("div",Qn()({tabIndex:-1,className:o.join(" "),role:"dialog",onKeyDown:this.onKeyDown},a),W("div",{className:Hr().overlayContents},this.props.children),this.renderCloseButton(this.props))}}]),i}(X))||Gl)||Gl;Zl.displayName="Overlay";var ql,Xl,Ql=function(e){var t=De(null);return Re((function(){e.isActive&&t.focus()}),[]),W("div",{role:"menuitemradio",tabIndex:0,"aria-checked":e.isActive?"true":"false",ref:function(n){t=n,e.addAccessibleChild(n)},className:e.classNames.join(" "),onClick:e.changeCaptionsStyle,onKeyDown:function(t){t.keyCode===cr.ENTER&&e.changeCaptionsStyle()}},e.children,e.isActive?W("div",{className:Hr().activeTick},W(To,{type:ko.Check})):void 0)},$l=ai(ql=function(e){tr()(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=ar()(t);if(n){var i=ar()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return rr()(this,e)});function i(){var e;N()(this,i);for(var t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];return e=r.call.apply(r,[this].concat(n)),j()(Jn()(e),"captionsStyleDefault",void 0),j()(Jn()(e),"captionsStyleYellow",void 0),j()(Jn()(e),"captionsStyleBlackBG",void 0),j()(Jn()(e),"transitionToState",(function(){e.props.transitionToState(e.props.cvaaOverlayState.CustomCaptions)})),j()(Jn()(e),"onKeyDown",(function(t){t.keyCode===cr.ENTER&&e.transitionToState()})),e}return B()(i,[{key:"componentWillMount",value:function(){var e=this.props.player;this.captionsStyleDefault=e.TextStyle.fromJson({backgroundOpacity:e.TextStyle.StandardOpacities.TRANSPARENT}),this.captionsStyleYellow=e.TextStyle.fromJson({backgroundOpacity:e.TextStyle.StandardOpacities.TRANSPARENT,fontColor:e.TextStyle.StandardColors.YELLOW}),this.captionsStyleBlackBG=e.TextStyle.fromJson({backgroundColor:e.TextStyle.StandardColors.BLACK,fontColor:e.TextStyle.StandardColors.WHITE})}},{key:"render",value:function(e){var t=this;return W("div",{className:[Hr().overlayScreen,Hr().active].join(" ")},W("h2",{className:Hr().title,id:this.props.captionsTitleId},W(Dn,{id:"cvaa.title"})),W("div",{role:"group"},W(Ql,{addAccessibleChild:e.addAccessibleChild,classNames:[Hr().sample],changeCaptionsStyle:function(){return e.changeCaptionsStyle(t.captionsStyleDefault)},isActive:e.player.textStyle.isEqual(this.captionsStyleDefault)},W(Dn,{id:"cvaa.sample_caption_tag",fields:{number:"1"}})),W(Ql,{addAccessibleChild:e.addAccessibleChild,classNames:[Hr().sample,Hr().blackBg],changeCaptionsStyle:function(){return e.changeCaptionsStyle(t.captionsStyleBlackBG)},isActive:e.player.textStyle.isEqual(this.captionsStyleBlackBG)},W(Dn,{id:"cvaa.sample_caption_tag",fields:{number:"2"}})),W(Ql,{addAccessibleChild:e.addAccessibleChild,classNames:[Hr().sample,Hr().yellowText],changeCaptionsStyle:function(){return e.changeCaptionsStyle(t.captionsStyleYellow)},isActive:e.player.textStyle.isEqual(this.captionsStyleYellow)},W(Dn,{id:"cvaa.sample_caption_tag",fields:{number:"3"}}))),this.isAdvancedStyleApplied()?W("div",{className:Hr().customCaptionsApplied},W("div",{className:[Hr().sample,Hr().custom].join(" "),style:e.customTextStyle.toCSS()},W(Dn,{id:"cvaa.sample_custom_caption_tag"}),W("div",{className:Hr().activeTick},W(To,{type:ko.Check}))),W("a",{role:"button",tabIndex:0,"aria-haspopup":"true",onClick:this.transitionToState,ref:function(t){e.addAccessibleChild(t)},onKeyDown:this.onKeyDown},W(Dn,{id:"cvaa.edit_caption"}))):W("a",{role:"button","aria-haspopup":"true",tabIndex:0,className:Hr().buttonSaveCvaa,onClick:this.transitionToState,ref:function(t){e.addAccessibleChild(t)},onKeyDown:this.onKeyDown},W(Dn,{id:"cvaa.set_custom_caption"})))}},{key:"isAdvancedStyleApplied",value:function(){var e=this.props.player;return!e.textStyle.isEqual(this.captionsStyleDefault)&&!e.textStyle.isEqual(this.captionsStyleBlackBG)&&!e.textStyle.isEqual(this.captionsStyleYellow)}}]),i}(X))||ql;function Jl(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=ar()(e);if(t){var i=ar()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return rr()(this,n)}}var eu=un((function(e){return{isMobile:e.shell.isMobile,isSmallSize:e.shell.isSmallSize,guiClientRect:e.shell.guiClientRect}}))(Xl=sr(Xl=Nr(Xl=function(e){tr()(n,e);var t=Jl(n);function n(){var e;N()(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),j()(Jn()(e),"_menuElement",void 0),j()(Jn()(e),"handleClickOutside",(function(t){e.props.isMobile||e.props.isSmallSize||!e._menuElement||e._menuElement.contains(t.target)||e.props.onClose()})),j()(Jn()(e),"onChange",(function(t){e.onSelect(e.props.options[t.target.value])})),e}return B()(n,[{key:"componentWillMount",value:function(){this.setState({position:[Hr().top,Hr().left]})}},{key:"componentDidMount",value:function(){this.props.eventManager.listen(document,"click",this.handleClickOutside),this.props.isMobile||this.props.isSmallSize||this.setState({position:this.getPosition()})}},{key:"getPosition",value:function(){var e=this._menuElement.getBoundingClientRect(),t=this.props.guiClientRect;return e.top>=t.top?[Hr().top,Hr().left]:e.bottom+e.height<t.bottom?[Hr().bottom,Hr().left]:(this._menuElement.style.maxHeight=.8*t.height+"px",[Hr().stickBottom,Hr().left])}},{key:"isSelected",value:function(e){return e.active}},{key:"onSelect",value:function(e){this.props.onMenuChosen(e.value),this.props.options.filter((function(e){return e.active})).forEach((function(e){e.active=!1})),this.props.options.filter((function(t){return t.value===e.value}))[0].active=!0}},{key:"renderNativeSelect",value:function(e){var t=this,n=this.props.hideSelect?Hr().mobileHiddenSelect:"";return W("select",{"aria-labelledby":e,role:"listbox",ref:function(e){t.props.pushRef&&t.props.pushRef(e)},className:n+=" ".concat(Hr().dropdown),onChange:this.onChange},this.props.options.map((function(e,n){return W("option",{role:"option","aria-selected":t.isSelected(e),selected:t.isSelected(e),value:n,key:n},e.label)})))}},{key:"render",value:function(e){var t=this;return e.clearAccessibleChildren(),e.isMobile||e.isSmallSize?this.renderNativeSelect(e.labelledby):W("div",{role:"menu",onKeyDown:e.handleKeyDown,ref:function(e){return e?t._menuElement=e:void 0},className:[Hr().dropdownMenu].concat(L()(this.state.position)).join(" ")},e.options.map((function(n,r){return W(nu,{setDefaultFocusedElement:e.setDefaultFocusedElement,addAccessibleChild:e.addAccessibleChild,isSelected:t.isSelected,onSelect:function(e){t.onSelect(e)},key:r,data:n,role:(null==n?void 0:n.isAdvanced)?"menuitem":"menuitemradio"})})))}}]),n}(X))||Xl)||Xl)||Xl;eu.displayName="Menu";var tu,nu=function(e){tr()(n,e);var t=Jl(n);function n(){var e;N()(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),j()(Jn()(e),"onClick",(function(t){t.stopPropagation(),e.props.onSelect(e.props.data)})),j()(Jn()(e),"onKeyDown",(function(t){switch(t.keyCode){case cr.ENTER:case cr.SPACE:e.props.onSelect(e.props.data),t.stopPropagation(),t.preventDefault()}})),e}return B()(n,[{key:"render",value:function(e){var t=this,n=e.data.badgeType&&!e.isSelected(e.data)?Eo[e.data.badgeType]:Eo[e.data.badgeType+"Active"];return W("div",{role:null==e?void 0:e.role,tabIndex:-1,"aria-checked":e.isSelected(e.data)?"true":"false",ref:function(n){t.props.addAccessibleChild(n),e.isSelected(e.data)&&setTimeout((function(){return e.setDefaultFocusedElement(n)}))},className:e.isSelected(e.data)?[Hr().dropdownMenuItem,Hr().active].join(" "):Hr().dropdownMenuItem,onClick:this.onClick,onKeyDown:this.onKeyDown},W("span",{className:n?[Hr().labelBadge,n].join(" "):""},e.data.label),W("span",{className:[Hr().menuIconContainer,Hr().active].join(" ")},W(Ao,{type:ko.CheckActive})))}}]),n}(X),ru=un((function(e){return{isMobile:e.shell.isMobile,isSmallSize:e.shell.isSmallSize}}))(tu=function(e){tr()(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=ar()(t);if(n){var i=ar()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return rr()(this,e)});function i(){var e;N()(this,i);for(var t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];return e=r.call.apply(r,[this].concat(n)),j()(Jn()(e),"_el",void 0),j()(Jn()(e),"onMenuChosen",(function(t){e.props.onMenuChosen(t),e.setState({dropMenuActive:!1})})),j()(Jn()(e),"onClick",(function(){e.state.dropMenuActive||setTimeout((function(){return e.toggleDropDown()}))})),j()(Jn()(e),"onKeyDown",(function(t){switch(t.keyCode){case cr.ENTER:e.onClick();break;case cr.SPACE:t.preventDefault(),e.onClick();break;case cr.ESC:e.state.dropMenuActive&&(e.onClose(),t.stopPropagation())}})),j()(Jn()(e),"onClose",(function(){e.setState({dropMenuActive:!1})})),e}return B()(i,[{key:"componentWillMount",value:function(){this.setState({dropMenuActive:!1})}},{key:"componentDidMount",value:function(){this.props.registerParentSelectedCallback&&this.props.registerParentSelectedCallback(this.toggleDropDown.bind(this))}},{key:"isSelected",value:function(e){return e.active}},{key:"getActiveOption",value:function(){return this.props.options.find((function(e){return e.active}))||this.props.options[0]||{label:"Unlabled"}}},{key:"renderNativeSelect",value:function(e){return W(eu,{labelledby:e,pushRef:this.props.pushRef,options:this.props.options,onMenuChosen:this.onMenuChosen,onClose:this.onClose})}},{key:"render",value:function(e){var t,n,r=this,i=e.name+"Active",a=this.getActiveOption(),o=(null==a||null===(t=a.dropdownOptions)||void 0===t?void 0:t.label)||a.label,s=Eo[a.badgeType||(null==a||null===(n=a.dropdownOptions)||void 0===n?void 0:n.badgeType)];return e.isMobile||e.isSmallSize?this.renderNativeSelect(e.name):W("div",{name:e.name,className:this.state.dropMenuActive?[Hr().dropdown,Hr().active].join(" "):Hr().dropdown,ref:function(e){return e?r._el=e:void 0}},W("div",{tabIndex:e.tabbable?0:-1,ref:function(t){e.pushRef&&e.pushRef(t)},role:"menuitem","aria-haspopup":"true","aria-expanded":this.state.dropMenuActive?"true":"false","aria-labelledby":[e.name,i].join(" "),className:Hr().dropdownButton,onClick:this.onClick,onKeyDown:this.onKeyDown},W("span",{id:i,className:s?[Hr().labelBadge,s].join(" "):""},o),W(To,{type:ko.ArrowDown}),this.state.dropMenuActive?W(eu,{parentEl:this._el,options:e.options,onMenuChosen:this.onMenuChosen,onClose:this.onClose}):void 0))}},{key:"toggleDropDown",value:function(){this.setState((function(e){return{dropMenuActive:!e.dropMenuActive}}))}}]),i}(X))||tu;ru.displayName="DropDown";var iu=function(e){return W("div",{className:e.classNames.join(" ")},W("label",{id:e.styleName},W(Dn,{id:e.labelId})),W(ru,{name:e.styleName,pushRef:function(t){e.addAccessibleChild(t)},tabbable:!0,onMenuChosen:function(t){var n={};n[e.styleName]=t,e.changeCustomStyle(n)},options:e.options}))},au=function(e){tr()(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=ar()(t);if(n){var i=ar()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return rr()(this,e)});function i(){var e;N()(this,i);for(var t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];return e=r.call.apply(r,[this].concat(n)),j()(Jn()(e),"sliderWidth",void 0),j()(Jn()(e),"_sliderElement",void 0),j()(Jn()(e),"_sliderElementOffsetLeft",void 0),j()(Jn()(e),"mouseDownHandler",(function(t){e._sliderElementOffsetLeft=e._sliderElement.getBoundingClientRect().left,e.state.dragging||e.setState((function(n){return{dragging:!0,value:e.mouseEventToValue(t,n)}}),(function(){e.props.onChange(e.mouseEventToValue(t,e.state))}))})),j()(Jn()(e),"onKeyDown",(function(t){t.keyCode!==cr.LEFT&&t.keyCode!==cr.RIGHT||e.onKeyboardDragging(t)})),j()(Jn()(e),"mouseMoveHandler",(function(t){e.state.dragging&&e.setState((function(n){return{value:e.mouseEventToValue(t,n)}}),(function(){e.props.onChange(e.mouseEventToValue(t,e.state))}))})),j()(Jn()(e),"mouseUpHandler",(function(t){e.state.dragging&&e.setState((function(n){return{value:e.mouseEventToValue(t,n),dragging:!1}}),(function(){e.props.onChange(e.mouseEventToValue(t,e.state))}))})),e}return B()(i,[{key:"componentWillMount",value:function(){this.setState({value:this.props.value||0,min:this.props.min||0,max:this.props.max||100,dragging:!1}),document.addEventListener("mouseup",this.mouseUpHandler),document.addEventListener("mousemove",this.mouseMoveHandler),document.addEventListener("touchend",this.mouseUpHandler),document.addEventListener("touchmove",this.mouseMoveHandler)}},{key:"componentWillUnmount",value:function(){document.removeEventListener("mouseup",this.mouseUpHandler),document.removeEventListener("mousemove",this.mouseMoveHandler),document.removeEventListener("touchend",this.mouseUpHandler),document.removeEventListener("touchmove",this.mouseMoveHandler)}},{key:"componentDidMount",value:function(){this.sliderWidth=this._sliderElement.clientWidth,this._sliderElementOffsetLeft=this._sliderElement.getBoundingClientRect().left}},{key:"onKeyboardDragging",value:function(e){var t=this;e.stopPropagation(),this._sliderElementOffsetLeft=this._sliderElement.getBoundingClientRect().left;var n=this.props.value;switch(e.keyCode){case cr.RIGHT:(n+=5)>this.state.max&&(n=this.state.max);break;case cr.LEFT:(n-=5)<this.state.min&&(n=this.state.min)}this.setState({value:n,dragging:!1},(function(){t.props.onChange(n)}))}},{key:"mouseEventToValue",value:function(e,t){var n=(e.touches&&e.touches.length>0?e.touches[0].clientX:e.changedTouches?e.changedTouches[0].pageX:e.clientX)-this._sliderElement.getBoundingClientRect().left,r=Math.round(n/this._sliderElement.clientWidth*100);return this.getValueByPersentage(r)<t.min?t.min:this.getValueByPersentage(r)>t.max?t.max:this.getValueByPersentage(r)}},{key:"getValueByPersentage",value:function(e){return this.state.max/100*e}},{key:"getPercentageByValue",value:function(){return Math.round(this.state.value/this.state.max*100)}},{key:"render",value:function(e){var t=this;return W("div",{role:"slider","aria-valuemin":this.state.min,"aria-valuenow":this.state.value,"aria-valuemax":this.state.max,"aria-labelledby":e.name,tabIndex:0,ref:function(n){n&&(t._sliderElement=n,e.pushRef&&e.pushRef(n))},className:Hr().slider,onMouseDown:this.mouseDownHandler,onTouchStart:this.mouseDownHandler,onKeyDown:this.onKeyDown},W("div",{className:Hr().progress,style:{width:this.getPercentageByValue()+"%"}},W("div",{className:Hr().handle,onMouseDown:this.mouseDownHandler,onTouchStart:this.mouseDownHandler})))}}]),i}(X);au.displayName="Slider";var ou,su=function(e){return W("div",{className:e.classNames.join(" ")},W("label",{id:e.styleName},W(Dn,{id:e.labelId})),W(au,{name:e.styleName,pushRef:function(t){e.addAccessibleChild(t)},min:0,max:100,value:100*e.value,onChange:function(t){var n={};n[e.styleName]=t/100,e.changeCustomStyle(n)}}))};function lu(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function uu(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?lu(Object(n),!0).forEach((function(t){j()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lu(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var cu,du,pu,fu,hu,yu=ai(ou=function(e){tr()(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=ar()(t);if(n){var i=ar()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return rr()(this,e)});function i(){var e;N()(this,i);for(var t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];return e=r.call.apply(r,[this].concat(n)),j()(Jn()(e),"changeCaptionsStyle",(function(){e.props.changeCaptionsStyle(e.props.customTextStyle)})),j()(Jn()(e),"transitionToState",(function(){e.props.transitionToState(e.props.cvaaOverlayState.Main)})),j()(Jn()(e),"onKeyDown",(function(t){t.keyCode===cr.ENTER&&e.changeCaptionsStyle()})),e}return B()(i,[{key:"componentDidMount",value:function(){this.props.focusOnDefault()}},{key:"render",value:function(e){var t=this,n=this.props.player,r=n.TextStyle.FontFamily,i=n.TextStyle.EdgeStyles,a=n.TextStyle.StandardColors,o=n.TextStyle.FontSizes.map((function(t){return{value:t.label,label:t.label,active:e.customTextStyle.fontSize===t.label}})),s=Object.keys(a).map((function(t){return{value:a[t],label:t.charAt(0).toUpperCase()+t.toLowerCase().slice(1),active:e.customTextStyle.fontColor.every((function(e,n){return e===a[t][n]}))}})),l=Object.keys(r).map((function(t){return{value:r[t],label:r[t],active:e.customTextStyle.fontFamily===r[t]}})),u=Object.keys(i).map((function(t){return{value:i[t],label:t.charAt(0).toUpperCase()+t.toLowerCase().slice(1),active:e.customTextStyle.fontEdge===i[t]}})),c=Object.keys(a).map((function(t){return{value:a[t],label:t.charAt(0).toUpperCase()+t.toLowerCase().slice(1),active:e.customTextStyle.backgroundColor.every((function(e,n){return e===a[t][n]}))}})),d=n.TextStyle.FontAlignment.map((function(t){return uu(uu({},t),{},{active:e.customTextStyle.textAlign===t.value})}));return W("div",{className:[Hr().overlayScreen,Hr().active].join(" ")},W("form",{className:[Hr().form,Hr().customCaptionForm].join(" ")},W(iu,{addAccessibleChild:e.addAccessibleChild,labelId:"cvaa.size_label",options:o,classNames:[Hr().formGroupRow,Hr().fontSize],styleName:"fontSize",changeCustomStyle:e.changeCustomStyle}),W(iu,{addAccessibleChild:e.addAccessibleChild,labelId:"cvaa.font_alignment_label",options:d,classNames:[Hr().formGroupRow,Hr().fontAlignment],styleName:"textAlign",changeCustomStyle:e.changeCustomStyle}),W(iu,{addAccessibleChild:e.addAccessibleChild,labelId:"cvaa.font_color_label",options:s,classNames:[Hr().formGroupRow,Hr().fontColor],styleName:"fontColor",changeCustomStyle:e.changeCustomStyle}),W(iu,{addAccessibleChild:e.addAccessibleChild,labelId:"cvaa.font_family_label",options:l,classNames:[Hr().formGroupRow,Hr().fontFamily],styleName:"fontFamily",changeCustomStyle:e.changeCustomStyle}),W(iu,{addAccessibleChild:e.addAccessibleChild,labelId:"cvaa.font_style_label",options:u,classNames:[Hr().formGroupRow,Hr().fontStyle],styleName:"fontEdge",changeCustomStyle:e.changeCustomStyle}),W(su,{addAccessibleChild:e.addAccessibleChild,labelId:"cvaa.font_opacity_label",value:e.customTextStyle.fontOpacity,classNames:[Hr().formGroupRow,Hr().fontOpacity],styleName:"fontOpacity",changeCustomStyle:e.changeCustomStyle}),W(iu,{addAccessibleChild:e.addAccessibleChild,labelId:"cvaa.background_color_label",options:c,classNames:[Hr().formGroupRow,Hr().backgroundColor],styleName:"backgroundColor",changeCustomStyle:e.changeCustomStyle}),W(su,{addAccessibleChild:e.addAccessibleChild,labelId:"cvaa.background_opacity_label",value:e.customTextStyle.backgroundOpacity,classNames:[Hr().formGroupRow,Hr().backgroundOpacity],styleName:"backgroundOpacity",changeCustomStyle:e.changeCustomStyle}),W("div",{className:Hr().formGroupRow},W("a",{role:"button",tabIndex:0,ref:function(t){e.addAccessibleChild(t)},onClick:function(){t.changeCaptionsStyle(),t.transitionToState()},onKeyDown:this.onKeyDown,className:[Hr().btn,Hr().btnBranded,Hr().btnBlock].join(" ")},W(Dn,{id:"cvaa.apply"}))),W("div",{className:Hr().previewContainer},W("span",{style:e.getPreviewStyle()},W(Dn,{id:"cvaa.caption_preview"})))))}}]),i}(X))||ou;function gu(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function vu(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?gu(Object(n),!0).forEach((function(t){j()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gu(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var mu,bu,ku,Eu={Main:"main",CustomCaptions:"custom-captions"},_u="CVAAOverlay",Tu=(cu=un((function(e){return{style:e.cvaa.style}}),Lr(vu(vu({},_a),Or))),du=pr(_u),pu=Si(_u),fu=Un({cvvaDialogText:"cvaa.title",cvvaSetCustomCaptionsText:"cvaa.set_custom_caption"}),cu(hu=ai(hu=du(hu=pu(hu=Nr(hu=fu(hu=function(e){tr()(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=ar()(t);if(n){var i=ar()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return rr()(this,e)});function i(){var e;N()(this,i);for(var t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];return e=r.call.apply(r,[this].concat(n)),j()(Jn()(e),"transitionToState",(function(t){e.setState({activeWindow:t})})),j()(Jn()(e),"changeCaptionsStyle",(function(t){e.props.notifyClick({textStyle:t}),e.props.updateCaptionsStyle(t),e.props.player.textStyle=t})),j()(Jn()(e),"getPreviewStyle",(function(){var t=100*e.state.customTextStyle.implicitFontScale+"%",n=e.state.customTextStyle.toCSS();return"font-size: ".concat(t,"!important; ").concat(n)})),j()(Jn()(e),"changeCustomStyle",(function(t){e.setState((function(e){var n=e.customTextStyle.clone();return{customTextStyle:Object.assign(n,t)}}))})),e}return B()(i,[{key:"componentWillUnmount",value:function(){this.setState({activeWindow:Eu.Main})}},{key:"componentWillMount",value:function(){var e=this.props.player;this.setState({activeWindow:Eu.Main,customTextStyle:e.textStyle}),this.props.setIsModal(!0)}},{key:"render",value:function(e){e.clearAccessibleChildren();var t=this.state.activeWindow===Eu.Main,n="captions_title_".concat(or.Utils.Generator.guid()),r=t?{ariaLabelledBy:n}:{ariaLabel:this.props.cvvaSetCustomCaptionsText};return W(Zl,Qn()({open:!0,handleKeyDown:this.props.handleKeyDown,addAccessibleChild:this.props.addAccessibleChild,onClose:e.onClose,type:"cvaa"},r),this.state.activeWindow===Eu.Main?W($l,{captionsTitleId:n,cvaaOverlayState:Eu,addAccessibleChild:e.addAccessibleChild,captionsStyleDefault:this.captionsStyleDefault,captionsStyleBlackBG:this.captionsStyleBlackBG,captionsStyleYellow:this.captionsStyleYellow,changeCaptionsStyle:this.changeCaptionsStyle,transitionToState:this.transitionToState,customTextStyle:this.state.customTextStyle}):W(yu,{addAccessibleChild:e.addAccessibleChild,focusOnDefault:this.props.focusOnDefault,changeCaptionsStyle:this.changeCaptionsStyle,changeCustomStyle:this.changeCustomStyle,getPreviewStyle:this.getPreviewStyle,customTextStyle:this.state.customTextStyle,transitionToState:this.transitionToState,cvaaOverlayState:Eu}))}}]),i}(X))||hu)||hu)||hu)||hu)||hu)||hu);function Au(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Su(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Au(Object(n),!0).forEach((function(t){j()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Au(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}Tu.displayName=_u;var wu=ra.updateCurrentTime,Cu=xa.updateIsCaptionsEnabled,xu="EngineConnector",Pu=(mu=un(ni,Lr(Su(Su(Su(Su({},ri),ga),Or),{},{seekbarUpdateCurrentTime:wu,updateIsCaptionsEnabled:Cu}))),bu=pr(xu),mu(ku=ai(ku=sr(ku=bu(ku=function(e){tr()(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=ar()(t);if(n){var i=ar()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return rr()(this,e)});function i(){return N()(this,i),r.apply(this,arguments)}return B()(i,[{key:"componentDidMount",value:function(){var e=this,t=this.props,n=t.player,r=t.eventManager,i=n.Track;this.props.updatePrePlayback(!n.config.playback.autoplay),r.listen(n,n.Event.Core.PLAYER_RESET,(function(t){e.props.updateCurrentTime(0),e.props.seekbarUpdateCurrentTime(0),t.payload.isChangeMedia||e.props.updateIsIdle(!0),e.props.updateIsPlaybackStarted(!1),e.props.updateDataLoadingStatus(!1)})),r.listen(n,n.Event.Core.SOURCE_SELECTED,(function(){e.props.updateIsCastAvailable(n.isCastAvailable()),e.props.updateIsLive(n.isLive()),e.props.updateIsVr(n.isVr()),e.props.updateIsImg(n.isUntimedImg()),e.props.updateIsDocument(n.isUntimedDocument()),e.props.updateIsAudio(n.isAudio()),e.props.updateIsInPictureInPicture(n.isInPictureInPicture()),n.config.playback.autoplay?e.props.updateLoadingSpinnerState(!0):e.props.updateLoadingSpinnerState(!1)})),r.listen(n,n.Event.Core.CHANGE_SOURCE_STARTED,(function(){e.props.updatePrePlayback(!n.config.playback.autoplay&&!e.props.engine.isPlaybackStarted),e.props.updateIsChangingSource(!0),e.props.updateFallbackToMutedAutoPlay(!1),e.props.updateAdBreak(!1),e.props.updateAdIsPlaying(!1),e.props.updateIsPlaying(!1),e.props.updateIsEnded(!1),e.props.updateIsPlaybackEnded(!1),e.props.updateLastSeekPoint(0),e.props.updateIsPaused(!1),e.props.engine.isCasting&&e.props.updateLoadingSpinnerState(!0)})),r.listen(n,n.Event.Core.CHANGE_SOURCE_ENDED,(function(){e.props.updateIsChangingSource(!1),e.props.updatePlayerPoster(n.poster),e.props.updateIsIdle(!1)})),r.listen(n,n.Event.Core.PLAYER_STATE_CHANGED,(function(t){e.props.updatePlayerState(t.payload.oldState.type,t.payload.newState.type)})),r.listen(n,n.Event.Core.TIME_UPDATE,(function(){e.props.updateCurrentTime(n.currentTime)})),r.listen(n,n.Event.Core.DURATION_CHANGE,(function(){e.props.updateDuration(n.isLive()?n.liveDuration:n.duration)})),r.listen(n,n.Event.Core.LOADED_DATA,(function(){e.props.updateDuration(n.isLive()?n.liveDuration:n.duration),e.props.updatePictureInPictureSupport(n.isPictureInPictureSupported()),e.props.updateDataLoadingStatus(!0)})),r.listen(n,n.Event.Core.LOADED_METADATA,(function(){e.props.updateMuted(n.muted),e.props.updateMetadataLoadingStatus(!0),e.props.updateIsLive(n.isLive()),e.props.updateIsDvr(n.isDvr()),e.props.updatePlayerPoster(n.poster)})),r.listen(n,n.Event.Core.VOLUME_CHANGE,(function(){e.props.updateVolume(n.volume)})),r.listen(n,n.Event.Core.MUTE_CHANGE,(function(){e.props.updateMuted(n.muted),e.props.engine.fallbackToMutedAutoPlay&&e.props.updateFallbackToMutedAutoPlay(n.muted)})),r.listen(n,n.Event.Core.PLAYBACK_START,(function(){e.props.updatePrePlayback(!1),e.props.updateIsPlaybackStarted(!0),e.props.updateLoadingSpinnerState(!0)})),r.listen(n,n.Event.Core.AUTOPLAY_FAILED,(function(){e.props.updatePrePlayback(!0)})),r.listen(n,n.Event.Core.FIRST_PLAY,(function(){e.props.updatePrePlayback(!1)})),r.listen(n,n.Event.Core.PLAY,(function(){e.props.updateIsPlaying(!0),e.props.updateIsEnded(!1),e.props.updateIsPaused(!1),e.props.updateIsPlaybackEnded(!1)})),r.listen(n,n.Event.Core.PAUSE,(function(){e.props.updateIsPlaying(!1),e.props.updateIsPaused(!0)})),r.listen(n,n.Event.Core.SEEKING,(function(){e.props.updateIsSeeking(!0)})),r.listen(n,n.Event.Core.SEEKED,(function(){e.props.updateIsSeeking(!1),e.props.updateLastSeekPoint(n.currentTime),e.props.updateIsPlaybackEnded(!1)})),r.listen(n,n.Event.Core.ENDED,(function(){e.props.updateIsEnded(!0),e.props.updateIsPlaying(!1),e.props.updateIsPaused(!0)})),r.listen(n,n.Event.Core.PLAYBACK_ENDED,(function(){e.props.updateIsPlaybackEnded(!0)})),r.listen(n,n.Event.Core.TRACKS_CHANGED,(function(){var t=n.getTracks(i.AUDIO),r=n.getTracks(i.VIDEO),a=n.getTracks(i.TEXT);e.props.updateAudioTracks(t),e.props.updateVideoTracks(r),e.props.updateTextTracks(a)})),r.listen(n,n.Event.Core.TEXT_TRACK_CHANGED,(function(){var t,r=n.getTracks(i.TEXT);e.props.updateTextTracks(r),e.props.updateIsCaptionsEnabled("off"!==(null===(t=r.find((function(e){return e.active})))||void 0===t?void 0:t.language))})),r.listen(n,n.Event.Core.AUDIO_TRACK_CHANGED,(function(){var t=n.getTracks(i.AUDIO);e.props.updateAudioTracks(t)})),r.listen(n,n.Event.Core.VIDEO_TRACK_CHANGED,(function(){var t=n.getTracks(i.VIDEO);e.props.updateVideoTracks(t)})),r.listen(n,n.Event.Core.AD_BREAK_START,(function(){e.props.updateHasError(!1),e.props.updateAdBreak(!0)})),r.listen(n,n.Event.Core.AD_BREAK_END,(function(){e.props.updateAdBreak(!1)})),r.listen(n,n.Event.Core.ALL_ADS_COMPLETED,(function(){e.props.updateAdBreak(!1)})),r.listen(n,n.Event.Core.AD_PROGRESS,(function(t){var n=t.payload.adProgress.currentTime,r=t.payload.adProgress.duration;e.props.updateAdBreakProgress(n,r)})),r.listen(n,n.Event.Core.AD_COMPLETED,(function(){e.props.updateAdBreakCompleted()})),r.listen(n,n.Event.Core.AD_STARTED,(function(t){var n=t.payload.ad;e.props.updateLoadingSpinnerState(!1),e.props.updateAdIsPlaying(!0),e.props.updatePrePlayback(!1),e.props.updateAdIsBumper(n.bumper),e.props.updateAdContentType(n.contentType)})),r.listen(n,n.Event.Core.AD_RESUMED,(function(){e.props.updateAdIsPlaying(!0)})),r.listen(n,n.Event.Core.AD_PAUSED,(function(){e.props.updateAdIsPlaying(!1)})),r.listen(n,n.Event.Core.AD_ERROR,(function(t){t.payload.severity===n.Error.Severity.CRITICAL&&e.props.updateAdBreak(!1)})),r.listen(n,n.Event.Core.FALLBACK_TO_MUTED_AUTOPLAY,(function(){e.props.updateFallbackToMutedAutoPlay(!0)})),r.listen(n,n.Event.Core.AD_LOADED,(function(t){var n=t.payload.ad;e.props.updateAdIsLinear(n.linear),e.props.updateAdIsBumper(n.bumper),e.props.updateAdClickUrl(n.clickThroughUrl),e.props.updateAdSkipTimeOffset(n.skipOffset),e.props.updateAdSkippableState(n.skippable)})),r.listen(n,n.Event.Core.VR_STEREO_MODE_CHANGED,(function(t){e.props.updateVrStereoMode(t.payload.mode)})),r.listen(n,n.Event.Core.ERROR,(function(t){var r,i;t.payload.severity===n.Error.Severity.CRITICAL&&(e.props.updateIsIdle(!1),e.props.updateHasError(!0),e.props.updateErrorDetails(t.payload.category||void 0,null===(r=t.payload.errorDetails)||void 0===r?void 0:r.errorTitle,null===(i=t.payload.errorDetails)||void 0===i?void 0:i.errorMessage))})),r.listen(n,n.Event.Cast.CAST_SESSION_STARTED,(function(t){var n=t.payload.session;e.props.updateIsCasting(!0),e.props.updateCastSession(n),n.resuming&&e.props.updateLoadingSpinnerState(!1)})),r.listen(n,n.Event.Cast.CAST_SESSION_ENDED,(function(){e.props.updateIsCasting(!1),e.props.updateCastSession(null)})),r.listen(n,n.Event.Cast.CAST_AVAILABLE,(function(t){var n=t.payload.available;e.props.updateIsCastAvailable(n)})),r.listen(n,n.Event.Playlist.PLAYLIST_ITEM_CHANGED,(function(){e.props.updatePlaylist({next:n.playlist.next,prev:n.playlist.prev})})),r.listen(n,n.Event.Core.ENTER_PICTURE_IN_PICTURE,(function(){e.props.updateIsInPictureInPicture(!0)})),r.listen(n,n.Event.Core.LEAVE_PICTURE_IN_PICTURE,(function(){e.props.updateIsInPictureInPicture(!1)})),r.listen(n,n.Event.Core.PRESENTATION_MODE_CHANGED,(function(){e.props.updateIsInPictureInPicture(n.isInPictureInPicture()),e.props.updateFullscreen(n.isFullscreen())})),r.listen(n,n.Event.Core.ENTER_FULLSCREEN,(function(){e.props.updateFullscreen(!0)})),r.listen(n,n.Event.Core.EXIT_FULLSCREEN,(function(){e.props.updateFullscreen(!1)}))}},{key:"shouldComponentUpdate",value:function(){return!1}},{key:"render",value:function(){return W("span",null)}}]),i}(X))||ku)||ku)||ku)||ku);Pu.displayName=xu;var Ru="CopyButton",Iu=[{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M7 4C5.89543 4 5 4.89543 5 6V13C5 14.1046 5.89543 15 7 15H11C12.1046 15 13 14.1046 13 13V6C13 4.89543 12.1046 4 11 4H7ZM7 6H11V13H7V6Z"},{d:"M15 11H16V18H12V17.2H10V18.1C10 19.2458 10.9971 20 12 20H16C17.0029 20 18 19.2458 18 18.1V10.9C18 9.75416 17.0029 9 16 9H15V11Z"}],Du=function(e){tr()(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=ar()(t);if(n){var i=ar()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return rr()(this,e)});function i(e){var t;return N()(this,i),t=r.call(this,e),j()(Jn()(t),"_timeoutId",null),j()(Jn()(t),"copy",(function(){try{t.props.copy(),t.setState({copySuccess:!0}),t._timeoutId=setTimeout((function(){t.setState({copySuccess:!1})}),2e3)}catch(e){t.setState({copySuccess:!1})}})),j()(Jn()(t),"onKeyDown",(function(e){e.keyCode===cr.ENTER&&t.copy()})),t.setState({copySuccess:!1}),t}return B()(i,[{key:"componentWillUnmount",value:function(){this._timeoutId&&(clearTimeout(this._timeoutId),this._timeoutId=null)}},{key:"render",value:function(e){var t=[Hr().btnCopyUrl,Hr().btnBorderless,Hr().onlyIcon].join(" ");return t+=this.state.copySuccess?" "+Hr().copied:"",W(Ln,null,W(Xo,{name:Ru},W(uo,{label:W(Dn,{id:"copy.button"})},W(No,{tabIndex:"0",ref:function(t){e.addAccessibleChild&&e.addAccessibleChild(t)},className:t,onClick:this.copy,onKeyDown:this.onKeyDown},W(To,{id:"copy",color:"#fff",path:Iu,width:"24",height:"24",viewBox:"0 0 24 24"}),W(To,{type:ko.Check})))))}}]),i}(X);j()(Du,"defaultProps",{icon:ko.Copy}),Du.displayName=Ru;var Ou,Lu,Mu,Nu,Uu,Bu,Fu,ju=new Map([[1,{title:"network_error_title",message:"network_error_message"}],[2,{title:"text_error_title",message:"text_error_message"}],[3,{title:"media_error_title",message:"media_error_message"}],[4,{title:"manifest_error_title",message:"manifest_error_message"}],[5,{title:"streaming_error_title",message:"streaming_error_message"}],[6,{title:"media_unavailable_error_title",message:"drm_error_message"}],[7,{title:"default_error_title",message:"default_error_message"}],[8,{title:"default_error_title",message:"default_error_message"}],[9,{title:"default_error_title",message:"default_error_message"}],[12,{title:"media_not_ready_error_title",message:"media_not_ready_error_message"}],[13,{title:"geo_location_error_title",message:"geo_location_error_message"}],[14,{title:"media_unavailable_error_title",message:"media_unavailable_error_message"}],[15,{title:"media_unavailable_error_title",message:"ip_restricted_error_message"}]]),Hu={title:"default_error_title",message:"default_error_message"},Vu="ErrorOverlay",Gu=(Ou=un((function(e){var t;return{hasError:e.engine.hasError,errorOverlaConfig:null===(t=e.config.components)||void 0===t?void 0:t.errorOverlay,errorDetails:e.engine.errorDetails}}),Lr(ri)),Lu=pr(Vu),Ou(Mu=ai(Mu=Lu(Mu=function(e){tr()(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=ar()(t);if(n){var i=ar()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return rr()(this,e)});function i(){var e;N()(this,i);for(var t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];return e=r.call.apply(r,[this].concat(n)),j()(Jn()(e),"sessionEl",void 0),j()(Jn()(e),"copyError",(function(){var t=window.getSelection(),n=document.createRange();n.selectNode(e.sessionEl),t.removeAllRanges(),t.addRange(n),document.execCommand("copy")})),j()(Jn()(e),"handleClick",(function(){var t=e.props.player.getMediaInfo();e.props.player.loadMedia(t)})),j()(Jn()(e),"getBackgroundUrl",(function(){var t=e.props.errorOverlaConfig;return null==t?void 0:t.backgroundUrl})),e}return B()(i,[{key:"renderSessionID",value:function(){var e=this,t=this.props.player,n=t&&t.config&&t.config.session&&t.config.session.id;return n?W("div",{className:Hr().linkOptionsContainer},W("div",{className:Hr().copyUrlRow},W("div",{ref:function(t){return t?e.sessionEl=t:void 0},className:Hr().errorSession},W(Dn,{id:"error.default_session_text"})," "," "+n),W(Du,{copy:this.copyError}))):void 0}},{key:"renderRetryButton",value:function(){if(this.props.player.getMediaInfo()){var e=Boolean(this.getBackgroundUrl());return W("div",{className:Hr().controlButtonContainer,onClick:this.handleClick},W(No,{className:[e?Hr().btnTranslucent:Hr().btnBorderless,Hr().retryBtn].join(" ")},W(Dn,{id:"error.retry"})))}}},{key:"renderErrorHead",value:function(){var e=this.props.errorDetails,t=e.errorCategory,n=e.errorTitle,r=e.errorMessage,i="",a="";if(n&&r)i=n,a=r;else{var o=function(e){return ju.get(e)||Hu}(t);i=W(Dn,{id:"error.".concat(o.title)}),a=W(Dn,{id:"error.".concat(o.message)})}return W("div",{className:Hr().headline},W("div",{className:Hr().errorTitle},this.props.errorHead||i),a?W("div",{className:Hr().errorMessage},a):void 0)}},{key:"render",value:function(){if(this.props&&this.props.hasError||this.props.permanent){var e=this.getBackgroundUrl(),t=e?{backgroundImage:"url(".concat(e,")")}:void 0;return W("div",{className:["overlay-portal",e?Hr().customErrorSlate:""].join(" ")},W(Zl,{open:!0,permanent:!0,type:"error"},W("div",{className:Hr().errorOverlay,style:t},W("p",{className:Hr().errorText}),this.renderErrorHead(),this.renderSessionID(),this.renderRetryButton())))}}}]),i}(X))||Mu)||Mu)||Mu);Gu.displayName=Vu;var Ku="LiveTag",zu=(Nu=un((function(e){return{isLive:e.engine.isLive,isDvr:e.engine.isDvr,currentTime:e.engine.currentTime,duration:e.engine.duration}})),Uu=pr(Ku),Bu=Si(Ku),Nu(Fu=ai(Fu=Uu(Fu=Bu(Fu=function(e){tr()(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=ar()(t);if(n){var i=ar()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return rr()(this,e)});function i(){var e;N()(this,i);for(var t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];return e=r.call.apply(r,[this].concat(n)),j()(Jn()(e),"onKeyDown",(function(t){t.keyCode===cr.ENTER&&e.onClick()})),j()(Jn()(e),"onClick",(function(){e.isOnLiveEdge()||(e.props.player.seekToLiveEdge(),e.props.player.paused&&e.props.player.play()),e.props.notifyClick()})),e}return B()(i,[{key:"isOnLiveEdge",value:function(){return this.props.player.isOnLiveEdge()}},{key:"render",value:function(e){var t=[Hr().liveTag];return e.isDvr&&!this.isOnLiveEdge()&&t.push(Hr().nonLivePlayhead),W("div",{tabIndex:0,className:t.join(" "),onClick:this.onClick,onKeyDown:this.onKeyDown},W(Dn,{id:"controls.live"}))}}]),i}(X))||Fu)||Fu)||Fu)||Fu);zu.displayName=Ku;var Wu,Yu,Zu,qu=function(e){tr()(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=ar()(t);if(n){var i=ar()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return rr()(this,e)});function i(){return N()(this,i),r.apply(this,arguments)}return B()(i,[{key:"render",value:function(){return W("div",{className:Hr().spinner},Array(8).fill(0).map((function(e,t){return W("span",{key:t+1})})))}}]),i}(X);qu.displayName="Spinner";var Xu,Qu,$u,Ju,ec="Loading",tc=(Wu=un((function(e){return{show:e.loading.show,isMobile:e.shell.isMobile,adBreak:e.engine.adBreak,adIsLinear:e.engine.adIsLinear}}),Lr(ga)),Yu=pr(ec),Wu(Zu=ai(Zu=sr(Zu=Yu(Zu=function(e){tr()(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=ar()(t);if(n){var i=ar()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return rr()(this,e)});function i(){return N()(this,i),r.call(this)}return B()(i,[{key:"componentDidMount",value:function(){var e=this,t=this.props,n=t.player,r=t.eventManager;r.listen(n,n.Event.PLAYER_STATE_CHANGED,(function(t){var r=n.State;t.payload.newState.type===r.IDLE||t.payload.newState.type===r.PLAYING||t.payload.newState.type===r.PAUSED?e.props.updateLoadingSpinnerState(!1):e.props.updateLoadingSpinnerState(!0)})),r.listen(n,n.Event.AD_BREAK_START,(function(){e.props.updateLoadingSpinnerState(!0)})),r.listen(n,n.Event.AD_PROGRESS,(function(){e.props.updateLoadingSpinnerState(!1)})),r.listen(n,n.Event.AD_STARTED,(function(){e.props.adIsLinear&&e.props.updateLoadingSpinnerState(!1)})),r.listen(n,n.Event.ALL_ADS_COMPLETED,(function(){e.props.updateLoadingSpinnerState(!1)})),r.listen(n,n.Event.AUTOPLAY_FAILED,(function(){e.props.updateLoadingSpinnerState(!1)})),r.listen(n,n.Event.PLAYING,(function(){e.props.updateLoadingSpinnerState(!1)}))}},{key:"render",value:function(e){if(e.show)return W("div",{className:[Hr().loadingBackdrop,Hr().show].join(" ")},W("div",{className:Hr().spinnerContainer},W(br,{name:xr.LoadingSpinner},W(qu,null))))}}]),i}(X))||Zu)||Zu)||Zu)||Zu);function nc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function rc(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?nc(Object(n),!0).forEach((function(t){j()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nc(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}tc.displayName=ec;var ic,ac,oc,sc,lc,uc="OverlayAction",cc=(Xu=un((function(e){return{isPlayingAdOrPlayback:So(e.engine),iconType:e.overlayAction.iconType,playerHover:e.shell.playerHover,isMobile:e.shell.isMobile,guiStyles:e.shell.layoutStyles.gui,isSmartContainerOpen:e.shell.smartContainerOpen,fullscreenConfig:e.config.components.fullscreen,seekbarDraggingActive:e.seekbar.draggingActive}}),Lr(rc(rc({},La),Or))),Qu=pr(uc),$u=Si(uc),Xu(Ju=ai(Ju=Qu(Ju=$u(Ju=function(e){tr()(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=ar()(t);if(n){var i=ar()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return rr()(this,e)});function i(){var e;N()(this,i);for(var t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];return e=r.call.apply(r,[this].concat(n)),j()(Jn()(e),"_iconTimeout",null),j()(Jn()(e),"_pointerDownPosX",NaN),j()(Jn()(e),"_pointerDownPosY",NaN),j()(Jn()(e),"_firstClickTime",0),j()(Jn()(e),"_clickTimeout",null),j()(Jn()(e),"togglePlayPause",(function(){e.props.isPlayingAdOrPlayback?(e.props.player.pause(),e.props.updateOverlayActionIcon(ko.Pause)):(e.props.player.play(),e.props.updateOverlayActionIcon(ko.Play)),e.props.updatePlayerHoverState(!0),e.props.notifyClick({type:"PlayPause"})})),j()(Jn()(e),"onOverlayPointerDown",(function(t){e._pointerDownPosX=t.clientX||t.changedTouches&&t.changedTouches[0]&&t.changedTouches[0].clientX,e._pointerDownPosY=t.clientY||t.changedTouches&&t.changedTouches[0]&&t.changedTouches[0].clientY})),j()(Jn()(e),"onOverlayMouseUp",(function(t){e.isDragging(t)||e.overlayClick()})),j()(Jn()(e),"onOverlayTouchEnd",(function(t){t.preventDefault(),e.props.playerHover&&!e.isDragging(t)&&e.togglePlayPause()})),e}return B()(i,[{key:"componentWillUnmount",value:function(){this.cancelClickTimeout(),this.cancelIconTimeout()}},{key:"toggleFullscreen",value:function(){this.props.player.isFullscreen()?(this.props.logger.debug("Exit fullscreen"),this.props.player.exitFullscreen()):(this.props.logger.debug("Enter fullscreen"),this.props.player.enterFullscreen()),this.props.notifyClick({type:"Fullscreen"})}},{key:"isDragging",value:function(e){var t=e.clientX||e.changedTouches&&e.changedTouches[0]&&e.changedTouches[0].clientX,n=e.clientY||e.changedTouches&&e.changedTouches[0]&&e.changedTouches[0].clientY;return this.props.seekbarDraggingActive||Math.abs(t-this._pointerDownPosX)>5||Math.abs(n-this._pointerDownPosY)>5}},{key:"overlayClick",value:function(){var e=this;if(!this.props.isSmartContainerOpen){if(!this.props.fullscreenConfig.disableDoubleClick){var t=Date.now();if(t-this._firstClickTime<200)return this.cancelClickTimeout(),void this.toggleFullscreen();if(t-this._firstClickTime<500)return this.cancelClickTimeout(),this.togglePlayPause(),this.toggleFullscreen(),void(this._firstClickTime=0);this._firstClickTime=t}this._clickTimeout=setTimeout((function(){e._clickTimeout=null,e.togglePlayPause()}),200)}}},{key:"cancelClickTimeout",value:function(){this._clickTimeout&&(clearTimeout(this._clickTimeout),this._clickTimeout=null)}},{key:"cancelIconTimeout",value:function(){this._iconTimeout&&(clearTimeout(this._iconTimeout),this._iconTimeout=null)}},{key:"shouldComponentUpdate",value:function(e){return e.iconType&&this.toggleOverlayActionIcon(e.iconType),!0}},{key:"toggleOverlayActionIcon",value:function(e){var t=this,n=function(){t.setState({animation:!0,iconType:e},(function(){t._iconTimeout=setTimeout((function(){t._iconTimeout=null,t.setState({animation:!1})}),300)}))};null!==this._iconTimeout?(this.cancelIconTimeout(),this.setState({animation:!1},(function(){t.forceUpdate(),n()}))):n()}},{key:"render",value:function(){return W("div",{style:this.props.guiStyles,className:"".concat(Hr().overlayAction," ").concat(this.state.animation?Hr().in:""),onMouseDown:this.onOverlayPointerDown,onTouchStart:this.onOverlayPointerDown,onMouseUp:this.onOverlayMouseUp,onTouchEnd:this.onOverlayTouchEnd},this.state.animation?this.renderIcons():void 0)}},{key:"renderIcons",value:function(){return Array.isArray(this.state.iconType)?this.state.iconType.map((function(e,t){return W(Ao,{key:t,type:e})})):W(Ao,{type:this.state.iconType})}},{key:"componentDidUpdate",value:function(){this.state.animation&&this.props.updateOverlayActionIcon(null)}}]),i}(X))||Ju)||Ju)||Ju)||Ju);cc.displayName=uc;var dc,pc,fc,hc,yc="PrePlaybackPlayOverlay",gc=(ic=un((function(e){return{prePlayback:e.engine.prePlayback,isPlaybackEnded:e.engine.isPlaybackEnded,playlist:e.engine.playlist,loading:e.loading.show}}),Lr(ga)),ac=pr(yc),oc=Si(yc),sc=Un({startOverText:"controls.startOver",playText:"controls.play"}),ic(lc=ai(lc=ac(lc=oc(lc=sc(lc=function(e){tr()(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=ar()(t);if(n){var i=ar()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return rr()(this,e)});function i(){var e;N()(this,i);for(var t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];return e=r.call.apply(r,[this].concat(n)),j()(Jn()(e),"handleClick",(function(){e.props.playlist&&e.props.isPlaybackEnded?e.props.player.playlist.playNext():e.props.player.play(),e.props.notifyClick()})),j()(Jn()(e),"onKeyDown",(function(t){t.keyCode===cr.ENTER&&e.handleClick()})),j()(Jn()(e),"onMouseOver",(function(e){e.stopPropagation()})),e}return B()(i,[{key:"render",value:function(e){var t=e.isPlaybackEnded&&!e.player.config.playback.loop&&!(e.playlist&&e.playlist.next);if((e.prePlayback||t)&&!e.loading){var n=e.isPlaybackEnded?e.startOverText:e.playText;return W("div",{className:Hr().prePlaybackPlayOverlay,onMouseOver:this.onMouseOver,onClick:this.handleClick},W(No,{className:Hr().prePlaybackPlayButton,tabIndex:"0","aria-label":n,onKeyDown:this.onKeyDown},W(uo,{label:n},e.isPlaybackEnded?W(Ao,{type:ko.StartOver}):W(Ao,{type:ko.Play}))))}}}]),i}(X))||lc)||lc)||lc)||lc)||lc);gc.displayName=yc;var vc,mc,bc,kc,Ec="SeekBarLivePlaybackContainer",_c=(dc=un((function(e){return{currentTime:e.seekbar.currentTime,virtualTime:e.seekbar.virtualTime,isDraggingActive:e.seekbar.draggingActive,isMobile:e.shell.isMobile,poster:e.engine.poster,isDvr:e.engine.isDvr,dataLoaded:e.engine.dataLoaded}}),Lr(ra)),pc=Si(Ec),fc=pr(Ec),dc(hc=ai(hc=sr(hc=pc(hc=fc(hc=function(e){tr()(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=ar()(t);if(n){var i=ar()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return rr()(this,e)});function i(){return N()(this,i),r.apply(this,arguments)}return B()(i,[{key:"componentDidMount",value:function(){var e=this.props,t=e.eventManager,n=e.player,r=e.isDraggingActive,i=e.updateCurrentTime;t.listen(n,n.Event.TIME_UPDATE,(function(){r||i(Math.max(n.normalizedCurrentTime,0))})),t.listen(n,n.Event.LOADED_DATA,(function(){i(Math.max(n.normalizedCurrentTime,0))}))}},{key:"render",value:function(e){var t=this;if(e.isDvr)return W(Os,{playerElement:this.props.playerContainer,showFramePreview:this.props.showFramePreview,showTimeBubble:this.props.showTimeBubble,changeCurrentTime:function(e){t.props.player.isOnLiveEdge()&&e===t.duration||(t.props.player.normalizedCurrentTime=e)},playerPoster:this.props.poster,updateSeekbarDraggingStatus:function(e){return t.props.updateSeekbarDraggingStatus(e)},updateSeekbarHoverActive:function(e){return t.props.updateSeekbarHoverActive(e)},updateSeekbarClientRect:function(e){return t.props.updateSeekbarClientRect(e)},updateCurrentTime:function(e){return t.props.updateCurrentTime(e)},updateVirtualTime:function(e){return t.props.updateVirtualTime(e)},isDvr:this.props.isDvr,currentTime:this.currentTime,virtualTime:this.props.virtualTime,duration:this.duration,isDraggingActive:this.props.isDraggingActive,isMobile:this.props.isMobile,notifyChange:function(e){return t.props.notifyChange(e)},forceFullProgress:this.props.player.isOnLiveEdge(),dataLoaded:this.props.dataLoaded})}},{key:"currentTime",get:function(){return Math.min(this.props.currentTime,this.duration)}},{key:"duration",get:function(){return this.props.player.normalizedDuration}}]),i}(X))||hc)||hc)||hc)||hc)||hc);_c.displayName=Ec;var Tc,Ac,Sc,wc="SeekBarPlaybackContainer",Cc=(vc=un((function(e){return{currentTime:e.seekbar.currentTime,virtualTime:e.seekbar.virtualTime,duration:e.engine.duration,isDraggingActive:e.seekbar.draggingActive,isMobile:e.shell.isMobile,poster:e.engine.poster,dataLoaded:e.engine.dataLoaded}}),Lr(ra)),mc=pr(wc),bc=Si(wc),vc(kc=ai(kc=sr(kc=mc(kc=bc(kc=function(e){tr()(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=ar()(t);if(n){var i=ar()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return rr()(this,e)});function i(){return N()(this,i),r.apply(this,arguments)}return B()(i,[{key:"componentDidMount",value:function(){var e=this;this.props.eventManager.listen(this.props.player,this.props.player.Event.TIME_UPDATE,(function(){e.props.isDraggingActive||e.props.updateCurrentTime(e.props.player.currentTime)}))}},{key:"render",value:function(){var e=this;return W(Os,{playerElement:this.props.playerContainer,showFramePreview:this.props.showFramePreview,showTimeBubble:this.props.showTimeBubble,changeCurrentTime:function(t){return e.props.player.currentTime=t},playerPoster:this.props.poster,updateSeekbarDraggingStatus:function(t){return e.props.updateSeekbarDraggingStatus(t)},updateSeekbarHoverActive:function(t){return e.props.updateSeekbarHoverActive(t)},updateSeekbarClientRect:function(t){return e.props.updateSeekbarClientRect(t)},updateCurrentTime:function(t){return e.props.updateCurrentTime(t)},updateVirtualTime:function(t){return e.props.updateVirtualTime(t)},currentTime:this.props.currentTime,virtualTime:this.props.virtualTime,duration:this.props.duration,isDraggingActive:this.props.isDraggingActive,isMobile:this.props.isMobile,notifyChange:function(t){return e.props.notifyChange(t)},dataLoaded:this.props.dataLoaded})}}]),i}(X))||kc)||kc)||kc)||kc)||kc);function xc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}Cc.displayName=wc;var Pc=(Tc=un((function(e){return{isMobile:e.shell.isMobile,isSmallSize:e.shell.isSmallSize}}),Lr(Or)),Ac=Un({settingsText:"settings.title"}),Tc(Sc=Nr(Sc=ai(Sc=Ac(Sc=function(e){tr()(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=ar()(t);if(n){var i=ar()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return rr()(this,e)});function i(){return N()(this,i),r.apply(this,arguments)}return B()(i,[{key:"componentWillMount",value:function(){this.props.addPlayerClass(Hr().smartContainerOpen),this.props.updateSmartContainerOpen(!0)}},{key:"componentWillUnmount",value:function(){this.props.removePlayerClass(Hr().smartContainerOpen),this.props.updateSmartContainerOpen(!1)}},{key:"componentDidMount",value:function(){this.props.setIsModal(this.isPortal)}},{key:"render",value:function(e){return e.clearAccessibleChildren(),this.isPortal?st(W(Zl,{open:!0,onClose:e.onClose,handleKeyDown:this.props.handleKeyDown,addAccessibleChild:this.props.addAccessibleChild,label:e.settingsText},W("div",{className:Hr().title},e.title),this.renderChildren(e)),js(e.player)):W("div",{onKeyDown:e.handleKeyDown,tabIndex:-1,role:"menu",className:[Hr().smartContainer,Hr().top,Hr().left].join(" ")},this.renderChildren(e))}},{key:"renderChildren",value:function(e){var t=this,n=ne(e.children).map((function(n){if(n)return ge(n,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?xc(Object(n),!0).forEach((function(t){j()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xc(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({pushRef:function(t){e.addAccessibleChild(t)}},t.props))}));return n}},{key:"isPortal",get:function(){return this.props.isMobile||this.props.isSmallSize}}]),i}(X))||Sc)||Sc)||Sc)||Sc);Pc.displayName="SmartContainer";var Rc=function(e){tr()(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=ar()(t);if(n){var i=ar()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return rr()(this,e)});function i(){return N()(this,i),r.apply(this,arguments)}return B()(i,[{key:"render",value:function(e){var t=e.label&&e.label.toLowerCase();return W("div",{className:[Hr().smartContainerItem,Hr().selectMenuItem].join(" ")},W("label",{id:t,htmlFor:t},e.icon?W("div",{className:Hr().labelIcon},W(Ao,{type:e.icon})):void 0,e.label),e.options&&e.options.length?W(ru,{pushRef:function(t){e.pushRef(t)},name:t,onMenuChosen:function(t){return e.onMenuChosen(t)},options:e.options}):W("div",{style:{paddingLeft:"20px"}},W(qd,{pushRef:function(t){e.pushRef(t)},name:t,isChecked:e.isChecked,onMenuChosen:function(t){return e.onMenuChosen(t)}})))}}]),i}(X);Rc.displayName="SmartContainerItem";var Ic,Dc=function(e){tr()(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=ar()(t);if(n){var i=ar()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return rr()(this,e)});function i(){return N()(this,i),r.apply(this,arguments)}return B()(i,[{key:"getTimeDisplay",value:function(e,t,n){var r=n||"current / total",i=Ur(e),a=Ur(t),o=Ur(t-e);return(r=(r=r.replace(/current/g,i)).replace(/total/g,a)).replace(/left/g,o)}},{key:"render",value:function(e){var t=e.currentTime,n=e.duration,r=e.format,i=void 0===r?"current / total":r;return W("div",{className:Hr().timeDisplay},W("span",null,this.getTimeDisplay(t,n,i)))}}]),i}(X);Dc.displayName="TimeDisplay";var Oc,Lc="TimeDisplayAdsContainer",Mc=un((function(e){return{adProgress:e.engine.adProgress}}))(Ic=pr(Lc)(Ic=function(e){tr()(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=ar()(t);if(n){var i=ar()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return rr()(this,e)});function i(){return N()(this,i),r.apply(this,arguments)}return B()(i,[{key:"render",value:function(e){return W(Dc,Qn()({currentTime:Math.round(e.adProgress.currentTime),duration:Math.round(e.adProgress.duration)},e))}}]),i}(X))||Ic)||Ic;Mc.displayName=Lc;var Nc,Uc="TimeDisplayPlaybackContainer",Bc=un((function(e){return{currentTime:e.engine.currentTime,duration:e.engine.duration}}))(Oc=pr(Uc)(Oc=function(e){tr()(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=ar()(t);if(n){var i=ar()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return rr()(this,e)});function i(){return N()(this,i),r.apply(this,arguments)}return B()(i,[{key:"render",value:function(e){return W(Dc,Qn()({currentTime:e.currentTime,duration:e.duration},e))}}]),i}(X))||Oc)||Oc;Bc.displayName=Uc;var Fc,jc,Hc,Vc=un((function(e){return{isCasting:e.engine.isCasting,isPlaybackEnded:e.engine.isPlaybackEnded}}))(Nc=function(e){tr()(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=ar()(t);if(n){var i=ar()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return rr()(this,e)});function i(){return N()(this,i),r.apply(this,arguments)}return B()(i,[{key:"render",value:function(e){var t=e.disabled,n=e.isPlaybackEnded,r=e.isCasting,i=e.leftControls,a=e.rightControls,o=[Hr().topBar];return t&&o.push(Hr().disabled),r&&n&&o.push(Hr().hide),W("div",{className:o.join(" ")},W("div",{className:Hr().topBarArea},W(br,{name:"TopBar"})),e.children,W("div",{className:Hr().leftControls},W(br,{name:"TopBarLeftControls"},i)),W("div",{className:Hr().rightControls},W(br,{name:"TopBarRightControls"},a)))}}]),i}(X))||Nc;Vc.displayName="TopBar";var Gc,Kc,zc="UnmuteIndication",Wc=(Fc=un((function(e){return{fallbackToMutedAutoPlay:e.engine.fallbackToMutedAutoPlay}}),null),jc=pr(zc),Fc(Hc=ai(Hc=sr(Hc=jc(Hc=function(e){tr()(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=ar()(t);if(n){var i=ar()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return rr()(this,e)});function i(){var e;N()(this,i);for(var t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];return e=r.call.apply(r,[this].concat(n)),j()(Jn()(e),"_iconTimeout",null),j()(Jn()(e),"onKeyDown",(function(t){t.keyCode===cr.ENTER&&(e.props.player.muted=!e.props.player.muted)})),j()(Jn()(e),"onMouseOver",(function(){return e.setState({iconOnly:!1})})),j()(Jn()(e),"onMouseOut",(function(){return e.setState({iconOnly:!0})})),j()(Jn()(e),"onMouseUp",(function(){return e.props.player.muted=!e.props.player.muted})),j()(Jn()(e),"onTouchEnd",(function(e){return e.stopImmediatePropagation()})),e}return B()(i,[{key:"componentDidUpdate",value:function(e){var t=this;!e.fallbackToMutedAutoPlay&&this.props.fallbackToMutedAutoPlay&&(this.props.eventManager.listenOnce(this.props.player,this.props.player.Event.PLAYING,(function(){return t._iconOnlyTimeout()})),this.props.eventManager.listenOnce(this.props.player,this.props.player.Event.AD_STARTED,(function(){return t._iconOnlyTimeout()})))}},{key:"componentWillUnmount",value:function(){this._iconTimeout&&(clearTimeout(this._iconTimeout),this._iconTimeout=null)}},{key:"_iconOnlyTimeout",value:function(){var e=this;this._iconTimeout=setTimeout((function(){e.setState({iconOnly:!0})}),3e3)}},{key:"render",value:function(e){if(this.props.fallbackToMutedAutoPlay){var t=[Hr().unmuteButtonContainer];return e.hasTopBar&&t.push(Hr().hasTopBar),this.state.iconOnly&&t.push(Hr().showIconOnly),W(Ln,null,W("div",{tabIndex:0,"aria-label":W(Dn,{id:"controls.unmute"}),className:t.join(" "),onMouseOver:this.onMouseOver,onMouseOut:this.onMouseOut,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd,onKeyDown:this.onKeyDown},W("a",{className:[Hr().btn,Hr().btnDarkTransparent,Hr().unmuteButton].join(" ")},W("div",{className:Hr().unmuteIconContainer},W(Ao,{type:ko.VolumeBase}),W(Ao,{type:ko.VolumeMute})),W("span",null,W(Dn,{id:"unmute.unmute"})))))}}}]),i}(X))||Hc)||Hc)||Hc)||Hc);Wc.displayName=zc;var Yc,Zc,qc,Xc,Qc,$c,Jc,ed,td=(Gc=un((function(e){return{videoStyles:e.shell.layoutStyles.video,targetId:e.config.targetId}}),Lr(Or)),ai(Kc=sr(Kc=Gc(Kc=function(e){tr()(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=ar()(t);if(n){var i=ar()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return rr()(this,e)});function i(){var e;N()(this,i);for(var t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];return e=r.call.apply(r,[this].concat(n)),j()(Jn()(e),"_el",void 0),j()(Jn()(e),"_videoResizeWatcher",void 0),j()(Jn()(e),"_onVideoResize",(function(){var t=e.props.player.getVideoElement();t&&e.props.updateVideoClientRect(t.getBoundingClientRect())})),j()(Jn()(e),"_setRef",(function(t){e._videoResizeWatcher&&(e.props.eventManager.unlisten(e._videoResizeWatcher,ur.RESIZE,e._onVideoResize),e._videoResizeWatcher.destroy()),t&&(e._el=t),e._el?e._el.appendChild(e.props.player.getView()):e.props.updateVideoClientRect({x:0,y:0,width:0,height:0,top:0,right:0,bottom:0,left:0})})),e}return B()(i,[{key:"shouldComponentUpdate",value:function(e){return e.videoStyles!==this.props.videoStyles}},{key:"componentDidMount",value:function(){var e=this,t=this.props,n=t.eventManager,r=t.player;n.listen(r,r.Event.SOURCE_SELECTED,(function(){return e._onVideoResize()}));var i=new wi;i.init(this._el),this._videoResizeWatcher=i,this.props.eventManager.listen(this._videoResizeWatcher,ur.RESIZE,this._onVideoResize)}},{key:"componentWillUnmount",value:function(){this._videoResizeWatcher.destroy()}},{key:"render",value:function(){var e=this.props,t=e.videoStyles,n=e.targetId;return W("div",{id:"".concat(n,"-video"),className:Hr().videoPlayer,style:t,ref:this._setRef},W(br,{name:"VideoContainer"}))}}]),i}(X))||Kc)||Kc)||Kc),nd="Watermark",rd=(Yc=un((function(e){return{config:Object.assign({placement:"top-left",timeout:0},e.config.components.watermark)}})),Zc=pr(nd),Yc(qc=ai(qc=sr(qc=Zc(qc=function(e){tr()(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=ar()(t);if(n){var i=ar()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return rr()(this,e)});function i(){var e;return N()(this,i),e=r.call(this),j()(Jn()(e),"_timeoutId",null),e.setState({show:!0}),e}return B()(i,[{key:"componentDidMount",value:function(){var e=this,t=function(){e.props.config.timeout>0&&(e._timeoutId=setTimeout((function(){return e.setState({show:!1})}),e.props.config.timeout))},n=this.props.player;this.props.eventManager.listenOnce(n,n.Event.PLAYING,t),this.props.eventManager.listen(n,n.Event.CHANGE_SOURCE_ENDED,(function(){e.setState({show:!0}),e.props.eventManager.listenOnce(n,n.Event.PLAYING,t)}))}},{key:"componentWillUnmount",value:function(){this._timeoutId&&(clearTimeout(this._timeoutId),this._timeoutId=null)}},{key:"render",value:function(e){if(e.config.img){var t=[Hr().watermark];return e.config.placement.split("-").forEach((function(e){t.push(Hr()[e])})),e.config.url||t.push(Hr().emptyUrl),this.state.show||t.push(Hr().hideWatermark),W("div",{className:t.join(" ")},W("a",{href:e.config.url,target:"_blank",rel:"noopener noreferrer"},W(Ln,null,W("img",{src:e.config.img,alt:W(Dn,{id:"watermark.watermark_alt_text"})}))))}}}]),i}(X))||qc)||qc)||qc)||qc);rd.displayName=nd;var id,ad,od="Logo",sd="{entryId}",ld=(Xc=un((function(e){return{isMobile:e.shell.isMobile,playerSize:e.shell.playerSize,config:e.config.components.logo}})),Qc=pr(od),$c=Si(od),Jc=Un({logoText:"controls.logo"}),Xc(ed=ai(ed=sr(ed=Qc(ed=$c(ed=Jc(ed=function(e){tr()(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=ar()(t);if(n){var i=ar()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return rr()(this,e)});function i(e){var t;return N()(this,i),t=r.call(this,e),j()(Jn()(t),"_handleKeyDown",(function(e){e.keyCode!==cr.ENTER&&e.keyCode!==cr.SPACE||(window.open(t.state.urlLink,"_blank"),e.preventDefault(),t._handleOnClick())})),j()(Jn()(t),"_handleOnClick",(function(){t.props.notifyClick({logoUrl:t.state.urlLink})})),t.setState({isUrlClickable:"string"==typeof e.config.url,urlLink:e.config.url}),t}return B()(i,[{key:"componentDidMount",value:function(){this._handleLogoUrl()}},{key:"_handleLogoUrl",value:function(){var e=this,t=this.props.config.url;if(t&&-1!==t.indexOf(sd)){var n=this.props,r=n.player,i=n.eventManager;this._setLogoUrlWithEntryId(t)||i.listen(r,r.Event.MEDIA_LOADED,(function(){e._setLogoUrlWithEntryId(t)}))}}},{key:"_setLogoUrlWithEntryId",value:function(e){var t=this.props.player.sources.id;return"string"==typeof t?(this.setState({urlLink:e.replace(sd,t),isUrlClickable:!0}),!0):(this.props.logger.debug("Logo url was not replaced; entry id was not found."),this.setState({isUrlClickable:!1}),!1)}},{key:"_shouldRender",value:function(){var e=!(0===Object.keys(this.props.config).length&&this.props.config.constructor===Object)&&this.props.config.img;return this.props.onToggle(od,e),e}},{key:"render",value:function(e){if(this._shouldRender())return W("div",{className:[Hr().controlButtonContainer,e.config.url&&this.state.isUrlClickable?"":Hr().emptyUrl].join(" "),title:e.config.text},this.state.isUrlClickable?W("a",{onClick:this._handleOnClick,onKeyDown:this._handleKeyDown,className:Hr().controlButton,href:this.state.urlLink,"aria-label":e.config.text||e.logoText,target:"_blank",rel:"noopener noreferrer",tabIndex:0},W("img",{className:Hr().icon,src:e.config.img})):W("span",{className:Hr().controlButton,"aria-label":e.config.text||e.logoText},W("img",{className:Hr().icon,src:e.config.img})))}}]),i}(X))||ed)||ed)||ed)||ed)||ed)||ed);ld.displayName=od;var ud,cd,dd,pd,fd="CastOverlay",hd=un((function(e){return{poster:e.engine.poster,castSession:e.engine.castSession,isIdle:e.engine.isIdle,isPlaying:e.engine.isPlaying,isPlaybackEnded:e.engine.isPlaybackEnded,isPaused:e.engine.isPaused,isChangingSource:e.engine.isChangingSource}}))(id=pr(fd)((ad=function(e){tr()(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=ar()(t);if(n){var i=ar()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return rr()(this,e)});function i(){return N()(this,i),r.apply(this,arguments)}return B()(i,[{key:"getStatus",value:function(){return this.props.isPlaying||this.props.isPaused?W(Dn,{id:"cast.status.playing_on"}):this.props.isPlaybackEnded||this.props.isChangingSource||this.props.castSession.resuming?W(Dn,{id:"cast.status.connected_to"}):W(Dn,{id:"cast.status.connecting_to"})}},{key:"getIcon",value:function(){return this.props.isPlaying||this.props.isPaused||this.props.isPlaybackEnded||this.props.isChangingSource||this.props.castSession.resuming?W(To,{type:this.props.icon}):W("div",{className:Hr().castConnectingSpinner})}},{key:"render",value:function(e){if(e.castSession){var t={},n=[Hr().castPoster];e.poster&&(t={backgroundImage:e.isChangingSource?"":"url(".concat(e.poster,")"),backgroundSize:"contain"},n.push(Hr().hasPoster));var r=this.getStatus(),i=this.getIcon();return W("div",null,W("div",{className:Hr().castOverlay},W("div",{className:n.join(" "),style:t,onMouseOver:function(e){return e.stopPropagation()}}),W("div",{className:Hr().castBlackCover})),W("div",{className:Hr().castBox},W("div",{className:Hr().castIcon},i),W("div",{className:Hr().castText},W(Ln,null,W("span",{className:Hr().castStatus},r)),W("br",null),W("span",{className:Hr().castDevice},e.castSession.deviceFriendlyName))))}}}]),i}(X),j()(ad,"defaultProps",{icon:ko.Cast}),id=ad))||id)||id;hd.displayName=fd;var yd,gd,vd,md,bd="CastBeforePlay",kd=(ud=un((function(e){return{isPlaybackEnded:e.engine.isPlaybackEnded,prePlayback:e.engine.prePlayback,loading:e.loading.show,isCastAvailable:e.engine.isCastAvailable}})),cd=pr(bd),ud(dd=ai(dd=cd((pd=function(e){tr()(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=ar()(t);if(n){var i=ar()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return rr()(this,e)});function i(){var e;N()(this,i);for(var t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];return e=r.call.apply(r,[this].concat(n)),j()(Jn()(e),"_timeoutId",null),j()(Jn()(e),"onClick",(function(){e.props.player.startCasting(co)})),j()(Jn()(e),"_handleKeydown",(function(t){t.keyCode!==cr.ENTER&&t.keyCode!==cr.SPACE||(t.preventDefault(),e.onClick())})),e}return B()(i,[{key:"componentDidMount",value:function(){var e=this;this._timeoutId=setTimeout((function(){e.setState({show:!0})}),700)}},{key:"componentWillUnmount",value:function(){this._timeoutId&&(clearTimeout(this._timeoutId),this._timeoutId=null)}},{key:"render",value:function(e){if(e.isCastAvailable&&!e.loading&&e.prePlayback){var t=[Hr().castOnTvButtonContainer];return this.state.show&&t.push(Hr().showCastOnTv),W("div",{className:t.join(" ")},W(Ln,null,W(No,{tabIndex:"0","aria-label":W(Dn,{id:"cast.play_on_tv"}),onClick:this.onClick,onKeyDown:this._handleKeydown,className:[Hr().btn,Hr().btnDarkTransparent,Hr().castOnTvButton].join(" ")},W("div",{className:Hr().castOnTvIconContainer},W(To,{type:e.icon})),W("span",null,W(Dn,{id:"cast.play_on_tv"})))))}}}]),i}(X),j()(pd,"defaultProps",{icon:ko.Cast}),dd=pd))||dd)||dd)||dd);kd.displayName=bd;var Ed,_d="CastAfterPlay",Td=(yd=un((function(e){return{isPlaybackEnded:e.engine.isPlaybackEnded,isCasting:e.engine.isCasting}}),null),gd=pr(_d),yd(vd=ai(vd=gd((md=function(e){tr()(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=ar()(t);if(n){var i=ar()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return rr()(this,e)});function i(){var e;N()(this,i);for(var t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];return e=r.call.apply(r,[this].concat(n)),j()(Jn()(e),"_timeoutId",null),j()(Jn()(e),"onClick",(function(t){t.stopPropagation(),e.props.player.stopCasting()})),e}return B()(i,[{key:"componentDidMount",value:function(){var e=this;this._timeoutId=setTimeout((function(){e.setState({show:!0})}),700)}},{key:"componentWillUnmount",value:function(){this._timeoutId&&(clearTimeout(this._timeoutId),this._timeoutId=null)}},{key:"render",value:function(e){if(e.isCasting&&e.isPlaybackEnded){var t=[Hr().castOnTvButtonContainer];return this.state.show&&t.push(Hr().showCastOnTv),W("div",null,W("div",{className:t.join(" "),onClick:this.onClick},W("a",{className:[Hr().btn,Hr().btnDarkTransparent,Hr().castOnTvButton].join(" ")},W("div",{className:Hr().castOnTvIconContainer},W(To,{type:e.icon})),W(Ln,null,W("span",null,W(Dn,{id:"cast.disconnect_from_tv"}))))))}}}]),i}(X),j()(md,"defaultProps",{icon:ko.CastBrand}),vd=md))||vd)||vd)||vd);Td.displayName=_d;var Ad,Sd,wd,Cd,xd=Un({prevControlsText:"controls.prev",nextControlsText:"controls.next",playlistPrevText:"playlist.prev",playlistUpNextText:"playlist.up_next"})(Ed=function(e){tr()(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=ar()(t);if(n){var i=ar()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return rr()(this,e)});function i(){return N()(this,i),r.apply(this,arguments)}return B()(i,[{key:"render",value:function(e){var t,n,r=e.type,i=e.item,a=e.onClick,o="next"===r?ko.Next:ko.Prev,s=e["".concat(e.type,"ControlsText")],l="prev"===r?this.props.playlistPrevText:this.props.playlistUpNextText,u=null==i||null===(t=i.sources)||void 0===t?void 0:t.poster,c=(null==i||null===(n=i.sources)||void 0===n?void 0:n.metadata)?i.sources.metadata.name:"",d=W(No,{disabled:!i,tabIndex:"0","aria-label":s,className:"".concat(Hr().controlButton),onClick:a},W("div",null,W(Ao,{type:o})));return W("div",{className:[Hr().controlButtonContainer,Hr().controlPlaylistButton].join(" ")},e.showPreview&&(u||c)?W(q,null,W("div",{className:Hr().posterPreview},u?W("div",{className:Hr().posterPreviewImg,style:"background-image: url(".concat(u,");")}):void 0,W("div",{className:Hr().posterPreviewText},W("div",{className:Hr().posterPreviewTextTitle},l),W("div",{className:Hr().posterPreviewTextName},"".concat(c||"")))),d):W(uo,{label:s},d))}}]),i}(X))||Ed,Pd=un((function(e){return{playlist:e.engine.playlist}}))(Ad=ai(Ad=function(e){tr()(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=ar()(t);if(n){var i=ar()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return rr()(this,e)});function i(){var e;N()(this,i);for(var t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];return e=r.call.apply(r,[this].concat(n)),j()(Jn()(e),"onClick",(function(){"prev"===e.props.type?e.props.player.playlist.playPrev():e.props.player.playlist.playNext()})),e}return B()(i,[{key:"render",value:function(e){var t=e.playlist[e.type];return W(xd,{type:e.type,item:t,onClick:this.onClick.bind(this),showPreview:e.showPreview})}}]),i}(X))||Ad)||Ad;Pd.displayName="PlaylistButton";var Rd,Id,Dd,Od,Ld,Md,Nd="PlaylistNextScreen",Ud=(Sd=un((function(e){return{playlist:e.engine.playlist,isPlaybackEnded:e.engine.isPlaybackEnded}})),wd=pr(Nd),Sd(Cd=ai(Cd=wd(Cd=function(e){tr()(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=ar()(t);if(n){var i=ar()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return rr()(this,e)});function i(){var e;N()(this,i);for(var t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];return e=r.call.apply(r,[this].concat(n)),j()(Jn()(e),"focusElement",void 0),j()(Jn()(e),"onPosterClick",(function(){e.props.player.playlist.playNext()})),j()(Jn()(e),"onKeyDown",(function(t){t.keyCode!==cr.ENTER&&t.keyCode!==cr.SPACE||(t.preventDefault(),e.onPosterClick())})),e}return B()(i,[{key:"componentDidUpdate",value:function(e){!this._shouldRender(e)&&this._shouldRender(this.props)&&this.focusElement&&this.focusElement.focus()}},{key:"_shouldRender",value:function(e){return!(!(e.playlist&&e.playlist.next&&e.playlist.next.sources&&e.isPlaybackEnded)||e.player.playlist.options.autoContinue)}},{key:"_getPosterUrl",value:function(){var e=this.props.playlist.next;return e.sources.poster?e.sources.poster.indexOf("entry_id/".concat(e.sources.id))>-1&&-1===e.sources.poster.indexOf("/width/")?"".concat(e.sources.poster,"/width/").concat(384):e.sources.poster:""}},{key:"render",value:function(e){var t=this;if(this._shouldRender(e)){var n=e.playlist.next;return W("div",{className:Hr().playlistNextScreenOverlay},W("div",{className:Hr().playlistNextScreenContent},W("div",{id:"playlistNextScreenTextId",className:Hr().playlistNextScreenText},W(Ln,null,W("div",{className:Hr().playlistNextScreenTextTitle},W(Dn,{id:"playlist.next"}))),W("div",{className:Hr().playlistNextScreenTextName},"".concat(n.sources.metadata?n.sources.metadata.name:""))),W("div",{className:Hr().playlistNextScreenPosterPlaceholder},W("div",{className:Hr().playlistNextScreenPosterAspectRatio},W("div",{role:"button","aria-labelledby":"playlistNextScreenTextId",ref:function(e){return e?t.focusElement=e:void 0},tabIndex:0,className:Hr().playlistNextScreenPoster,onClick:this.onPosterClick,onKeyDown:this.onKeyDown},W("div",{className:Hr().playlistNextScreenPosterImg,style:"background-image: url(".concat(this._getPosterUrl(),");")}),W(Ao,{type:ko.Play}))))))}}}]),i}(X))||Cd)||Cd)||Cd);function Bd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Fd(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Bd(Object(n),!0).forEach((function(t){j()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Bd(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}Ud.displayName=Nd;var jd,Hd="PictureInPicture",Vd=(Rd=un((function(e){return{isPictureInPictureSupported:e.engine.isPictureInPictureSupported,isInPictureInPicture:e.engine.isInPictureInPicture,playerSize:e.shell.playerSize}}),Lr(Or)),Id=Mo(Hd),Dd=pr(Hd),Od=Si(Hd),Ld=Un({pictureInPictureText:"controls.pictureInPicture",pictureInPictureExitText:"controls.pictureInPictureExit"}),Rd(Md=ai(Md=Id(Md=Dd(Md=Od(Md=Ld(Md=function(e){tr()(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=ar()(t);if(n){var i=ar()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return rr()(this,e)});function i(e){var t;return N()(this,i),t=r.call(this,e),j()(Jn()(t),"_keyboardEventHandlers",[{key:{code:cr.P},action:function(){t.togglePip(),t.props.updatePlayerHoverState(!0)}}]),j()(Jn()(t),"getSvgIcon",(function(){return{type:t.props.player.isInPictureInPicture()?ko.PictureInPictureStop:ko.PictureInPictureStart}})),j()(Jn()(t),"getComponentText",(function(){return t.props.player.isInPictureInPicture()?t.props.pictureInPictureExitText:t.props.pictureInPictureText})),j()(Jn()(t),"togglePip",(function(){var e=t.props.player;e.isInPictureInPicture()?(t.props.logger.debug("Exit Picture In Picture"),t.props.notifyClick(),e.exitPictureInPicture()):(t.props.logger.debug("Enter Picture In Picture"),t.props.notifyClick(),e.enterPictureInPicture())})),al(Hd,e.player,(function(){return t.registerComponent()})),t}return B()(i,[{key:"registerComponent",value:function(){var e=this;return{ariaLabel:function(){return e.getComponentText()},displayName:Hd,order:5,svgIcon:function(){return e.getSvgIcon()},onClick:function(){return e.togglePip()},component:function(){return Gd(Fd(Fd({},e.props),{},{classNames:[Hr().upperBarIcon]}))},shouldHandleOnClick:!1}}},{key:"componentDidMount",value:function(){this.props.registerKeyboardEvents(this._keyboardEventHandlers)}},{key:"_shouldRender",value:function(){var e=!(void 0!==this.props.isPictureInPictureSupported&&!this.props.isPictureInPictureSupported);return this.props.onToggle(Hd,e),e}},{key:"render",value:function(){if(this._shouldRender())return W(Xo,{name:Hd,className:this.props.classNames?this.props.classNames.join(" "):""},W(uo,{label:this.props.isInPictureInPicture?this.props.pictureInPictureExitText:this.props.pictureInPictureText},W(No,{tabIndex:"0","aria-label":this.props.isInPictureInPicture?this.props.pictureInPictureExitText:this.props.pictureInPictureText,className:this.props.isInPictureInPicture?[Hr().controlButton,Hr().isInPictureInPicture].join(" "):Hr().controlButton,onClick:this.togglePip},W(Ao,{type:ko.PictureInPictureStart}),W(Ao,{type:ko.PictureInPictureStop}))))}}]),i}(X))||Md)||Md)||Md)||Md)||Md)||Md),Gd=function(e){return W(Vd,e)};Vd.displayName=Hd;var Kd=un((function(e){return{playlist:e.engine.playlist}}))(jd=function(e){tr()(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=ar()(t);if(n){var i=ar()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return rr()(this,e)});function i(){return N()(this,i),r.apply(this,arguments)}return B()(i,[{key:"componentDidMount",value:function(){this.setState({shouldUpdate:!1})}},{key:"componentDidUpdate",value:function(e){!!e.playlist!=!!this.props.playlist&&this.setState({shouldUpdate:!0})}},{key:"render",value:function(e){var t=e.showPreview,n=void 0===t||t,r=e.playlist,i=e.className,a=this.state.shouldUpdate;return a&&this.setState({shouldUpdate:!1}),W("div",{className:[Hr().playbackControls,i].join(" ")},W(br,{name:"BottomBarPlaybackControls",shouldUpdate:a},r?W(q,null,W(Pd,{type:"prev",showPreview:n}),W(rs,null),W(Pd,{type:"next",showPreview:n})):W(rs,null)))}}]),i}(X))||jd;Kd.displayName="PlaybackControls";var zd,Wd,Yd,Zd,qd=function(e){tr()(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=ar()(t);if(n){var i=ar()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return rr()(this,e)});function i(){var e;N()(this,i);for(var t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];return e=r.call.apply(r,[this].concat(n)),j()(Jn()(e),"onChange",(function(t){e.props.onMenuChosen(t)})),j()(Jn()(e),"handleOnKeyDown",(function(t){t.keyCode!==cr.ENTER&&t.keyCode!==cr.SPACE||(t.preventDefault(),e.onChange(!e.props.isChecked))})),e}return B()(i,[{key:"render",value:function(e){var t=this;return W("label",{onKeyDown:function(e){return t.handleOnKeyDown(e)},className:Hr().switch,ref:function(t){e.pushRef&&e.pushRef(t)},"aria-label":e.name,role:"switch","aria-checked":e.isChecked,tabIndex:-1},W("input",{name:e.name,className:Hr().toggleInput,type:"checkbox",checked:e.isChecked,onChange:function(e){return t.onChange(e.target.checked)}}),W("span",{className:Hr().slider}))}}]),i}(X);qd.displayName="ToggleSwitch";var Xd,Qd,$d,Jd,ep,tp,np="AudioMenu",rp=(zd=un((function(e){return{audioTracks:e.engine.audioTracks}}),Lr(xa)),Wd=Si(np),Yd=Un({audioLabelText:"settings.audio"}),zd(Zd=ai(Zd=Wd(Zd=Yd(Zd=function(e){tr()(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=ar()(t);if(n){var i=ar()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return rr()(this,e)});function i(){return N()(this,i),r.apply(this,arguments)}return B()(i,[{key:"onAudioChange",value:function(e){this.props.updateAudio(e),this.props.player.selectTrack(e),this.props.notifyClick({type:this.props.player.Track.AUDIO,track:e})}},{key:"render",value:function(e){var t=this,n=e.audioTracks.filter((function(e){return e.label||e.language})).map((function(e){return{label:e.label||e.language,active:e.active,value:e}}));return W(Rc,{pushRef:function(t){e.pushRef(t)},icon:ko.Audio,label:this.props.audioLabelText,options:n,onMenuChosen:function(e){return t.onAudioChange(e)}})}}]),i}(X))||Zd)||Zd)||Zd)||Zd);function ip(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ap(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ip(Object(n),!0).forEach((function(t){j()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ip(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}rp.displayName=np;var op,sp,lp,up,cp,dp="CaptionsMenu",pp=(Xd=un((function(e){return{textTracks:e.engine.textTracks,isMobile:e.shell.isMobile,isSmallSize:e.shell.isSmallSize,showAdvancedCaptionsMenu:e.config.settings.showAdvancedCaptionsMenu}}),Lr(_a)),Qd=Mo(dp),$d=pr(dp),Jd=Si(dp),ep=Un({captionsLabelText:"captions.captions",advancedCaptionsSettingsText:"captions.advanced_captions_settings"}),Xd(tp=ai(tp=sr(tp=Qd(tp=$d(tp=Jd(tp=ep(tp=function(e){tr()(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=ar()(t);if(n){var i=ar()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return rr()(this,e)});function i(){return N()(this,i),r.apply(this,arguments)}return B()(i,[{key:"onCaptionsChange",value:function(e){e!==this.props.advancedCaptionsSettingsText?(this.props.player.selectTrack(e),this.props.notifyClick({type:this.props.player.Track.TEXT,track:e})):this.props.onAdvancedCaptionsClick()}},{key:"render",value:function(e){var t=this,n=e.textTracks.map((function(e){return{label:e.label||e.language,active:e.active,value:e}})).map((function(e){return ap(ap({},e),{},{label:e.label.charAt(0).toUpperCase()+e.label.slice(1)})})).sort((function(e,t){return e.label>t.label||"Off"===e.label?1:-1}));return e.showAdvancedCaptionsMenu&&n.push({label:e.advancedCaptionsSettingsText,value:e.advancedCaptionsSettingsText,active:!1,isAdvanced:!0}),this.props.asDropdown?W(Rc,{pushRef:function(t){e.pushRef(t)},icon:ko.Captions,label:this.props.captionsLabelText,options:n,onMenuChosen:function(e){return t.onCaptionsChange(e)}}):W(eu,{options:n,onMenuChosen:function(e){return t.onCaptionsChange(e)},onClose:function(){}})}}]),i}(X))||tp)||tp)||tp)||tp)||tp)||tp)||tp);pp.displayName=dp;var fp,hp,yp,gp,vp="SpeedMenu",mp=(op=un(null,Lr(xa)),sp=pr(vp),lp=Si(vp),up=Un({speedLabelText:"settings.speed",speedNormalLabelText:"settings.speedNormal"}),op(cp=ai(cp=sp(cp=lp(cp=up(cp=function(e){tr()(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=ar()(t);if(n){var i=ar()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return rr()(this,e)});function i(){var e;N()(this,i);for(var t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];return e=r.call.apply(r,[this].concat(n)),j()(Jn()(e),"onSpeedChange",(function(t){e.props.updateSpeed(t),e.props.player.playbackRate=t,e.props.notifyClick({type:"speed",speed:t})})),e}return B()(i,[{key:"render",value:function(e){var t=e.optionsRenderer?e.optionsRenderer(e.player.playbackRates):e.player.playbackRates.reduce((function(t,n){var r={value:n,label:1===n?e.speedNormalLabelText:n,active:!1};return n===e.player.playbackRate&&(r.active=!0),t.push(r),t}),[]);return W(Rc,{pushRef:function(t){e.pushRef(t)},icon:ko.Speed,label:e.speedLabelText,options:t,onMenuChosen:this.onSpeedChange})}}]),i}(X))||cp)||cp)||cp)||cp)||cp);mp.displayName=vp;var bp={HD:1080,UHD_4K:2160,UHD_8K:4320};function kp(e){var t=Object.keys(Eo),n=D()(t,5),r=n[0],i=n[2],a=n[4];return e>=bp.HD&&e<bp.UHD_4K?r:e>=bp.UHD_4K&&e<bp.UHD_8K?i:e>=bp.UHD_8K?a:null}var Ep,_p=["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"],Tp="QualityMenu",Ap=(fp=un((function(e){return{videoTracks:e.engine.videoTracks}}),Lr(xa)),hp=Si(Tp),yp=Un({qualityLabelText:"settings.quality",qualityAutoLabelText:"settings.qualityAuto"}),fp(gp=ai(gp=hp(gp=yp(gp=function(e){tr()(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=ar()(t);if(n){var i=ar()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return rr()(this,e)});function i(){return N()(this,i),r.apply(this,arguments)}return B()(i,[{key:"onQualityChange",value:function(e){this.props.updateQuality(e);var t=this.props.player;"auto"===e?t.enableAdaptiveBitrate():t.selectTrack(e),this.props.notifyClick({type:t.Track.VIDEO,track:e})}},{key:"filterUniqueQualities",value:function(e,t){var n=e.length-1,r=e[n];return n>-1&&t.label===r.label?(t.bandwidth>r.bandwidth&&(e[n]=t),e[n].active=t.active||r.active):e.push(t),e}},{key:"render",value:function(e){var t=this,n=e.videoTracks.sort((function(e,t){return e.height<t.height?1:-1})).filter((function(e){return e.bandwidth||e.height})).reduce(this.filterUniqueQualities,[]).map((function(t){return{label:t.label,active:!e.player.isAdaptiveBitrateEnabled()&&t.active,value:t,badgeType:kp(t.height)}}));if(n.length>1&&"progressive"!==e.player.streamType){var r,i,a=null===(r=n.find((function(e){return!0===e.value.active})))||void 0===r?void 0:r.value,o=(null==a?void 0:a.label)||"".concat(360,"p");i=_p.includes(this.props.player._localPlayer._config.ui.locale)?o+" - "+this.props.qualityAutoLabelText:this.props.qualityAutoLabelText+" - "+o,n.unshift({label:this.props.qualityAutoLabelText,dropdownOptions:{label:i,badgeType:kp((null==a?void 0:a.height)||360)},active:e.player.isAdaptiveBitrateEnabled(),value:"auto"})}return W(Rc,{pushRef:function(t){e.pushRef(t)},icon:ko.Quality,label:e.qualityLabelText,options:n,onMenuChosen:function(e){return t.onQualityChange(e)}})}}]),i}(X))||gp)||gp)||gp)||gp);Ap.displayName=Tp;var Sp,wp,Cp,xp,Pp="AdvancedAudioDescToggle",Rp=un((function(e){return{isAdvancedAudioDescChecked:e.settings.advancedAudioDesc}}),Lr(xa))(Ep=Si(Pp)(Ep=Un({advancedAudioText:"settings.advanced_audio_description"})(Ep=function(e){tr()(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=ar()(t);if(n){var i=ar()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return rr()(this,e)});function i(){var e;N()(this,i);for(var t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];return e=r.call.apply(r,[this].concat(n)),j()(Jn()(e),"onAdvancedAudioClick",(function(t){e.props.updateAdvancedAudioDesc(t),e.props.notifyClick({type:"AdvancedAudioDescription",checked:t})})),e}return B()(i,[{key:"render",value:function(e){return W(Rc,{pushRef:function(t){e.pushRef(t)},icon:ko.AdvancedAudioDescription,label:e.advancedAudioText,isChecked:e.isAdvancedAudioDescChecked,onMenuChosen:this.onAdvancedAudioClick})}}]),i}(X))||Ep)||Ep)||Ep;function Ip(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Dp(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ip(Object(n),!0).forEach((function(t){j()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ip(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}Rp.displayName=Pp;var Op="AdvancedAudioDesc",Lp=(Sp=un((function(e){var t=e.config,n=e.settings;return{showAdvancedAudioDescToggle:t.settings.showAdvancedAudioDescToggle,advancedAudioDescEnabled:n.advancedAudioDesc}}),Lr(xa)),wp=Si(Op),Cp=Un({advancedAudioDescEnabledText:"settings.advanced_audio_description_enabled",advancedAudioDescDisabledText:"settings.advanced_audio_description_disabled"}),Sp(xp=ai(xp=wp(xp=Cp(xp=function(e){tr()(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=ar()(t);if(n){var i=ar()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return rr()(this,e)});function i(e){var t;return N()(this,i),t=r.call(this),j()(Jn()(t),"getComponentText",(function(){return t.props.advancedAudioDescEnabled?t.props.advancedAudioDescEnabledText:t.props.advancedAudioDescDisabledText})),j()(Jn()(t),"getSvgIcon",(function(){return{type:pn().getState().settings.advancedAudioDesc?ko.AdvancedAudioDescriptionActive:ko.AdvancedAudioDescription}})),j()(Jn()(t),"onClick",(function(){var e=!t.props.advancedAudioDescEnabled;t.props.updateAdvancedAudioDesc(e),t.props.notifyClick({type:"AdvancedAudioDescription",checked:e})})),al(Op,e.player,(function(){return t.registerComponent()})),t}return B()(i,[{key:"registerComponent",value:function(){var e=this;return{ariaLabel:function(){return e.getComponentText()},displayName:Op,order:5,svgIcon:function(){return e.getSvgIcon()},onClick:function(){return e.onClick()},component:function(){return Mp(Dp(Dp({},e.props),{},{classNames:[Hr().upperBarIcon]}))},shouldHandleOnClick:!1}}},{key:"_shouldRender",value:function(){return this.props.showAdvancedAudioDescToggle}},{key:"render",value:function(e){var t=e.innerRef;return this._shouldRender()?W(Xo,{name:Op,className:[Hr().noIdleControl,this.props.classNames?this.props.classNames.join(" "):""].join(" ")},W(uo,{label:this.getComponentText()},W(No,{tabIndex:"0","aria-label":this.getComponentText(),className:"".concat(Hr().controlButton),ref:t,onClick:this.onClick},W(To,{type:this.props.advancedAudioDescEnabled?ko.AdvancedAudioDescriptionActive:ko.AdvancedAudioDescription})))):void 0}}]),i}(X))||xp)||xp)||xp)||xp),Mp=function(e){return W(Lp,e)};Lp.displayName=Op;var Np=cr.ENTER,Up=cr.SPACE,Bp=function(e){var t=e.isTextExpanded,n=e.readLessLabel,r=e.readMoreLabel,i=e.onClick,a=e.onKeyDown,o=qo()(e,["isTextExpanded","readLessLabel","readMoreLabel","onClick","onKeyDown"]);return W("div",Qn()({tabIndex:0,className:Hr().moreButtonText,onClick:i,onKeyDown:a},o),t?n:r)},Fp=Un({readMoreLabel:"controls.readMore",readLessLabel:"controls.readLess"})((function(e){var t=xe(!1),n=D()(t,2),r=n[0],i=n[1],a=xe(!1),o=D()(a,2),s=o[0],l=o[1],u=xe(!1),c=D()(u,2),d=c[0],p=c[1],f=De(null),h=De(null);Ie((function(){var e,t;(null==h?void 0:h.current)&&(null==f?void 0:f.current)&&(p(!0),l((null==h||null===(e=h.current)||void 0===e?void 0:e.getBoundingClientRect().height)<(null==f||null===(t=f.current)||void 0===t?void 0:t.getBoundingClientRect().height)))}),[d]);var y=function(t){e.onClick&&e.onClick(t),i((function(t){var n=!t;return e.onExpand&&e.onExpand(n),n}))};return s||e.forceShowMore?W("div",{className:[e.className,r?e.classNameExpanded:""].join(" ")},r?e.children:W("div",{className:Hr().expandableText,style:{"-webkit-line-clamp":e.lines}},e.text),W(Bp,Qn()({onClick:function(e){y(e)},onKeyDown:function(e){e.keyCode!==Up&&e.keyCode!==Np||y(e)},isTextExpanded:r,readLessLabel:e.readLessLabel,readMoreLabel:e.readMoreLabel},e.buttonProps))):W("div",{className:Hr().contentText},W("div",{className:Hr().titleWrapper},W("div",{ref:h,style:{"-webkit-line-clamp":e.lines},className:Hr().expandableText},e.text),d?void 0:W("div",{ref:f,style:{"-webkit-line-clamp":e.lines+1},className:Hr().expandableText},e.text)))}));Fp.defaultProps={buttonProps:{}},Fp.displayName="ExpandableText";var jp,Hp,Vp,Gp,Kp=function(e){var t=e.children,n=e.isVertical,r=De(null),i=De(null),a=xe(!1),o=D()(a,2),s=o[0],l=o[1],u=xe(-1),c=D()(u,2),d=c[0],p=c[1],f=xe(-1),h=D()(f,2),y=h[0],g=h[1],v=function(){clearTimeout(d),l(!0),p(window.setTimeout((function(){l(!1)}),250))},m=function(e){e.preventDefault(),(null==r?void 0:r.current)&&(r.current.scrollLeft+=e.deltaY,v())};Ie((function(){if(n&&(null==r?void 0:r.current)&&(null==i?void 0:i.current)){var e,t=r.current,a=null===(e=t.parentElement)||void 0===e?void 0:e.clientHeight;if(a){var o=getComputedStyle(t.parentElement),s=a-(parseFloat(o.paddingTop)+parseFloat(o.paddingBottom));i.current.clientHeight>s?g(s):-1!==y&&g(-1)}}}));var b=Le((function(){return n?{onScroll:v}:{onWheel:m,ref:r}}),[n]);return W("div",Qn()({className:"".concat(Hr().scrollable," ").concat(s?Hr().scrolling:""," ").concat(n?Hr().vertical:Hr().horizontal),style:"".concat(n&&y>-1?"height: ".concat(y,"px"):""),ref:r},b),W("div",{className:Hr().itemsContainer,ref:i},t))},zp=un((function(e){return{videoStyles:e.shell.layoutStyles.video}}))(jp=function(e){tr()(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=ar()(t);if(n){var i=ar()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return rr()(this,e)});function i(){return N()(this,i),r.apply(this,arguments)}return B()(i,[{key:"shouldComponentUpdate",value:function(e){return e.videoStyles!==this.props.videoStyles}},{key:"render",value:function(){var e=this.props,t=e.videoStyles,n=e.children;return W("div",{style:t,className:Hr().videoArea},W("div",{style:{pointerEvents:"auto"}},W(br,{name:"VideoArea"},n)))}}]),i}(X))||jp,Wp=un((function(e){return{guiStyles:e.shell.layoutStyles.gui}}))(Hp=function(e){tr()(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=ar()(t);if(n){var i=ar()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return rr()(this,e)});function i(){var e;N()(this,i);for(var t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];return e=r.call.apply(r,[this].concat(n)),j()(Jn()(e),"_ref",void 0),j()(Jn()(e),"_setRef",(function(t){t&&(e._ref=t,e.setState((function(e){return{render:!e.render}})))})),e}return B()(i,[{key:"shouldComponentUpdate",value:function(e,t){return e.guiStyles!==this.props.guiStyles||t.render!==this.state.render}},{key:"render",value:function(){var e=this.props,t=e.guiStyles,n=ne(e.children),r=n[0],i=n[1];return W("div",{ref:this._setRef,style:t,className:Hr().guiArea},W("div",{style:{pointerEvents:"auto"}},W(br,{name:"GuiArea"},r)),"function"==typeof i?i({containerRef:this._ref}):i)}}]),i}(X))||Hp,Yp=ai(Vp=function(e){tr()(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=ar()(t);if(n){var i=ar()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return rr()(this,e)});function i(){return N()(this,i),r.apply(this,arguments)}return B()(i,[{key:"shouldComponentUpdate",value:function(){return!1}},{key:"render",value:function(){var e=this.props.children;return W("div",{className:Hr().interactiveArea},W("div",{style:{pointerEvents:"auto"}},W(br,{name:"InteractiveArea"},e)))}}]),i}(X))||Vp,Zp=un((function(e){return{sidePanelsStyles:e.shell.layoutStyles.sidePanels,playerClientRect:e.shell.playerClientRect,isSmallSize:e.shell.isSmallSize}}))(Gp=function(e){tr()(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=ar()(t);if(n){var i=ar()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return rr()(this,e)});function i(){return N()(this,i),r.apply(this,arguments)}return B()(i,[{key:"shouldComponentUpdate",value:function(e){var t=this.props,n=t.sidePanelsStyles,r=t.position,i=t.isSmallSize,a=e.sidePanelsStyles,o=e.position;return n[r]!==a[o]||i!==e.isSmallSize}},{key:"render",value:function(e){var t=e.position,n=e.sidePanelsStyles,r=-1!==[Sr.RIGHT,Sr.LEFT].indexOf(t)?"verticalSidePanel":"horizontalSidePanel",i=[Hr().sidePanel,Hr()[r]];e.isSmallSize&&i.push(Hr().smallSize);var a="SidePanel".concat(t.charAt(0).toUpperCase()+t.slice(1).toLowerCase());return W("div",{style:n[t],className:i.join(" ")},W("div",{className:Hr().sidePanelContent},W(br,{name:a})))}}]),i}(X))||Gp,qp="CaptionsControlMini",Xp=un((function(e){return{controlsToMove:e.bottomBar.controlsToMove}}))((function(e,t){var n=xe(!1),r=D()(n,2),i=r[0],a=r[1],o=t.player,s=e.controlsToMove,l=null;Re((function(){al(tf.displayName,o,(function(){return u()}))}),[]);var u=function(){return{ariaLabel:e.captionsLabelText,displayName:qp,order:5,svgIcon:{type:ko.ClosedCaptionsOn},onClick:function(){return p()},component:function(){return Qp(e)},shouldHandleOnClick:!1}};Re((function(){a(s.includes(tf.displayName))}),[s]);var c=function(){l&&(l(),l=null)},d=function(){c(),l=o.ui.addComponent({label:"cvaa-overlay",area:"GuiArea",presets:[Cr.Playback,Cr.Live],get:function(){return st(W(Tu,{onClose:function(){return c()}}),js(o))}})},p=function(){l=o.ui.addComponent({label:"captions-overlay",area:"GuiArea",presets:[Cr.Playback,Cr.Live],get:function(){return W(Pc,{targetId:o.config.targetId,onClose:function(){return c()},title:W(Dn,{id:"controls.language"})},W(pp,{asDropdown:!1,onAdvancedCaptionsClick:d}))}})};return i?W(Xo,{name:qp,className:ah.upperBarIcon},W(uo,{label:e.captionsLabelText},W(No,{tabIndex:"0","aria-label":e.captionsLabelText,"aria-haspopup":"true",className:ah.controlButton,onClick:p},W(To,{type:pn().getState().settings.isCaptionsEnabled?ko.ClosedCaptionsOn:ko.ClosedCaptionsOff})))):void 0})),Qp=function(e){return W(Xp,e)};Xp.displayName=qp;var $p,Jp,ef="CaptionsControl",tf=un((function(e){return{textTracks:e.engine.textTracks,showCCButton:e.config.showCCButton,openMenuFromCCButton:e.config.openMenuFromCCButton,isMobile:e.shell.isMobile,isSmallSize:e.shell.isSmallSize,isCVAAOverlayOpen:e.shell.isCVAAOverlayOpen}}))(Un({captionsLabelText:"captions.captions"})((function(e,t){var n=xe(!1),r=D()(n,2),i=r[0],a=r[1],o=xe(!1),s=D()(o,2),l=s[0],u=s[1],c=xe(!1),d=D()(c,2),p=d[0],f=d[1],h=De(null),y=De(null),g=t.player,v=e.isSmallSize,m=e.isMobile,b=e.textTracks,k=b.find((function(e){return e.active})),E=function(e,t){a((function(e){return!e})),t&&i&&Mr(h.current)},_=function(){u((function(e){return!e}))},T=function(e){m||v||!y.current||y.current.contains(e.target)||a(!1)};Re((function(){return document.addEventListener("click",T),function(){return document.removeEventListener("click",T)}}),[v,m]),Re((function(){f("off"!==(null==k?void 0:k.language))}),[k]);var A=!!(null==b?void 0:b.length)&&e.showCCButton&&e.openMenuFromCCButton;if(e.onToggle(ef,A),A)return W(q,null,W(Xo,{name:ef,ref:y},W(uo,{label:e.captionsLabelText},W(No,{ref:h,tabIndex:"0","aria-label":e.captionsLabelText,"aria-haspopup":"true",className:[Hr().controlButton,i?Hr().active:""].join(" "),onClick:E},W(To,{type:p?ko.ClosedCaptionsOn:ko.ClosedCaptionsOff}))),i&&!l&&W(Pc,{targetId:g.config.targetId,onClose:function(){return a(!1)},title:W(Dn,{id:"controls.language"})},W(pp,{asDropdown:!1,onAdvancedCaptionsClick:_})),l?st(W(Tu,{onClose:function(e,t){_(),E(0,t)}}),js(g)):W("div",null)),W(Xp,e))})));function nf(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}tf.displayName=ef;var rf,af,of,sf,lf,uf=Si("ActivePreset")($p=un((function(e){return{state:{shell:e.shell,engine:{adBreak:e.engine.adBreak,isLive:e.engine.isLive,hasError:e.engine.hasError,isIdle:e.engine.isIdle,isVr:e.engine.isVr,isImg:e.engine.isImg,isDocument:e.engine.isDocument,playlist:e.engine.playlist}},config:e.config}}),Lr(Or))((Jp=function(e){tr()(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=ar()(t);if(n){var i=ar()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return rr()(this,e)});function i(){var e;return N()(this,i),e=r.call(this),i.logger=qn("ActivePreset"),e}return B()(i,[{key:"getMatchedUI",value:function(e,t){var n,r,i=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return nf(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?nf(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}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 a,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}(e);try{for(i.s();!(r=i.n()).done;){var a=r.value;if(void 0===a.condition||a.condition(t)){n=a;break}}}catch(e){i.e(e)}finally{i.f()}return n}},{key:"render",value:function(e){var t,n=this.props,r=n.uis,a=n.state.shell.activePresetName;if(r.length>0){var o=(t=this.getMatchedUI(r,e.state))?t.template(e):r[r.length-1].template(e),s=o&&o.type.displayName||"";return a!==s&&(e.notifyChange({from:a,to:s}),e.updateActivePresetName(s),e.updatePresetSettings(null),i.logger.debug("update active preset to '".concat(a,"' and reset preset settings"))),o}}}]),i}(X),j()(Jp,"logger",void 0),$p=Jp))||$p)||$p,cf=un((function(e){return{allowSidePanels:e.shell.presetSettings.allowSidePanels,allowPlayerArea:e.shell.presetSettings.allowPlayerArea,sidePanelsConfig:e.config.components.sidePanels}}),Lr(Or))(rf=function(e){tr()(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=ar()(t);if(n){var i=ar()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return rr()(this,e)});function i(){return N()(this,i),r.apply(this,arguments)}return B()(i,[{key:"componentDidUpdate",value:function(){var e=this.props.sidePanelsConfig,t=e.verticalSizes,n=e.horizontalSizes;t&&this.props.updateSidePanelSize(Ar.VERTICAL,t),n&&this.props.updateSidePanelSize(Ar.HORIZONTAL,n)}},{key:"render",value:function(){var e=this.props,t=e.uis,n=e.playerContainer,r=e.allowSidePanels,i=e.allowPlayerArea;return W(q,null,W(uf,{uis:t,playerContainer:n}),r?W(q,null,W(Zp,{position:Sr.RIGHT}),W(Zp,{position:Sr.LEFT}),W(Zp,{position:Sr.TOP}),W(Zp,{position:Sr.BOTTOM})):void 0,i?W(br,{name:"PlayerArea"}):void 0)}}]),i}(X))||rf,df=Xi({allowSidePanels:!0,allowPlayerArea:!0})(af=function(e){tr()(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=ar()(t);if(n){var i=ar()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return rr()(this,e)});function i(){return N()(this,i),r.apply(this,arguments)}return B()(i,[{key:"render",value:function(){return W("div",{className:Hr().playbackGuiWrapper},W(br,{name:"PresetArea"},W(Wp,null,W(tc,null))))}}]),i}(X))||af;function pf(e){return W(df,e)}df.displayName="Idle";var ff,hf,yf,gf="PlaylistCountdown",vf=(of=un((function(e){return{playlist:e.engine.playlist,currentTime:e.engine.currentTime,duration:e.engine.duration,lastSeekPoint:e.engine.lastSeekPoint,isSeeking:e.engine.isSeeking,isPlaybackEnded:e.engine.isPlaybackEnded,countdownCanceled:e.playlist.countdownCanceled}}),Lr(ja)),sf=pr(gf),of(lf=ai(lf=sr(lf=sf(lf=function(e){tr()(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=ar()(t);if(n){var i=ar()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return rr()(this,e)});function i(e){var t;return N()(this,i),t=r.call(this,e),j()(Jn()(t),"focusElement",void 0),j()(Jn()(t),"nextShown",void 0),j()(Jn()(t),"onClick",(function(){t.props.player.playlist.playNext()})),j()(Jn()(t),"cancelNext",(function(e){t.props.logger.debug("Cancel auto play next item"),e.stopPropagation(),t.props.updatePlaylistCountdownCanceled(!0)})),j()(Jn()(t),"onKeyDown",(function(e){switch(e.keyCode){case cr.ENTER:t.onClick();break;case cr.ESC:t.cancelNext(e)}})),j()(Jn()(t),"onCancelButtonKeyDown",(function(e){e.keyCode===cr.ENTER&&t.cancelNext(e)})),t.setState({focusable:!1}),t}return B()(i,[{key:"_shouldRender",value:function(e){return this.state.timeToShow&&e.playlist&&e.playlist.next&&e.playlist.next.sources&&e.player.playlist.countdown.showing&&(e.player.playlist.options.autoContinue||e.player.playlist.options.loop)}},{key:"_getTimeToShow",value:function(){var e=this.props.player.playlist.countdown,t=this.props.duration-e.duration;return e.timeToShow>=0&&e.timeToShow<=this.props.duration&&(t=Math.max(e.timeToShow,this.props.lastSeekPoint)),Math.max(0,Math.min(t,this.props.duration))}},{key:"componentWillUpdate",value:function(e){var t=this._getTimeToShow();e.currentTime>=t?this.setState({timeToShow:!0}):(this.setState({timeToShow:!1}),this.props.updatePlaylistCountdownCanceled(!1))}},{key:"isHidden",value:function(e){return!e.timeToShow||this.props.player.playlist.countdown.duration>=this.props.duration}},{key:"isCanceled",value:function(){return this.props.countdownCanceled}},{key:"isShown",value:function(e){return!this.isHidden(e)&&!this.isCanceled()}},{key:"componentDidUpdate",value:function(e,t){var n=this;if(this._shouldRender(e)){var r=this._getTimeToShow(),i=this.props.player.playlist.countdown;e.isSeeking||this.props.countdownCanceled||!(this.props.isPlaybackEnded||this.props.currentTime>=r+i.duration&&this.props.currentTime<this.props.duration)||this.props.player.playlist.playNext()}!t.shown&&this.state.shown?this.focusElement&&this.props.eventManager.listenOnce(this.focusElement,"animationend",(function(){n.isShown(n.state)&&(n.focusElement.focus(),n.setState({focusable:!0}))})):t.shown&&!this.state.shown&&this.setState({focusable:!1}),this.isShown(this.state)!==this.state.shown&&this.setState((function(e){return{shown:n.isShown(e)}}))}},{key:"shouldComponentUpdate",value:function(e){return this.props.duration>0&&!e.isSeeking&&!this.props.isPlaybackEnded}},{key:"render",value:function(e){var t=this;if(this._shouldRender(e)&&(this.isShown(this.state)&&(this.nextShown=e.playlist.next),e.playlist.next&&e.playlist.next.sources&&this.nextShown)){var n=this.props.player.playlist.countdown,r=this._getTimeToShow(),i=e.currentTime-r,a=Math.min(n.duration,e.duration-r),o=Math.ceil(a-(i>0?i:0)),s=[Hr().playlistCountdown];return this.isHidden(this.state)?s.push(Hr().hidden):this.isCanceled()?s.push(Hr().canceled):s.push(Hr().slideIn),W("div",{role:"button","aria-labelledby":"playlistCountdownTextId",ref:function(e){return e?t.focusElement=e:void 0},tabIndex:this.state.focusable?0:-1,className:s.join(" "),onKeyDown:this.onKeyDown,onClick:this.onClick},W("div",{className:Hr().playlistCountdownPoster,style:"background-image: url(".concat(this.nextShown.sources.poster,");")}),W("div",{className:Hr().playlistCountdownContentPlaceholder},W("div",{className:Hr().playlistCountdownContentBackground},W("div",{className:Hr().playlistCountdownContent},W(Ln,null,W("div",{id:"playlistCountdownTextId",className:Hr().playlistCountdownText},W("div",{className:Hr().playlistCountdownTextTitle},W(Dn,{id:"playlist.up_next_in"}),W("div",{className:Hr().playlistCountdownTimeLeft},o)),W("div",{className:Hr().playlistCountdownTextName},"".concat(this.nextShown.sources.metadata?this.nextShown.sources.metadata.name:"")))),W("div",{className:[Hr().controlButtonContainer,Hr().playlistCountdownCancel].join(" ")},W(Ln,null,W(No,{tabIndex:this.state.focusable?0:-1,"aria-label":W(Dn,{id:"playlist.cancel"}),className:[Hr().controlButton,Hr().playlistCountdownCancelButton].join(" "),onClick:this.cancelNext,onKeyDown:this.onCancelButtonKeyDown},W(Ao,{type:ko.Close}))))))))}}}]),i}(X))||lf)||lf)||lf)||lf);vf.displayName=gf;var mf="PictureInPictureOverlay",bf=(ff=un((function(e){return{poster:e.engine.poster,isInPictureInPicture:e.engine.isInPictureInPicture,isChangingSource:e.engine.isChangingSource}})),hf=pr(mf),ff(yf=ai(yf=hf(yf=function(e){tr()(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=ar()(t);if(n){var i=ar()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return rr()(this,e)});function i(){return N()(this,i),r.apply(this,arguments)}return B()(i,[{key:"_handleClick",value:function(){this.props.player.exitPictureInPicture()}},{key:"render",value:function(){if(this.props.isInPictureInPicture){var e={},t=[Hr().pictureInPicturePoster];return this.props.poster&&(e={backgroundImage:this.props.isChangingSource?"":"url(".concat(this.props.poster,")"),backgroundSize:"contain"},t.push(Hr().hasPoster)),W("div",null,W("div",{className:Hr().pictureInPictureOverlay},W("div",{className:t.join(" "),style:e,onMouseOver:function(e){return e.stopPropagation()}},W("div",{className:Hr().darkLayer})),W("div",{className:Hr().pictureInPictureControl},W(Ln,null,W("span",{className:Hr().pictureInPictureText},W(Dn,{id:"pictureInPicture.overlay_text"}))))))}}}]),i}(X))||yf)||yf)||yf);bf.displayName=mf;var kf,Ef=un((function(e){return{isAudio:e.engine.isAudio,playerSize:e.shell.playerSize}}))(sr(ai((function(e){var t,n,r,i=function(e){return u.parseFromString(e,"text/html").body.textContent||""},a=De(null),o=De(null),s=xe(null),l=D()(s,2),u=l[0],c=l[1],d=xe(!1),p=D()(d,2),f=p[0],h=p[1],y=xe(!1),g=D()(y,2),v=g[0],m=g[1],b=xe(!1),k=D()(b,2),E=k[0],_=k[1],T=xe(!1),A=D()(T,2),S=A[0],w=A[1];if(Ie((function(){var e,t,n,r;(null==a?void 0:a.current)&&(null==o?void 0:o.current)&&(m(!0),_((null==a||null===(e=a.current)||void 0===e?void 0:e.getBoundingClientRect().height)>(null==o||null===(t=o.current)||void 0===t?void 0:t.getBoundingClientRect().height))),S||w((null==a||null===(n=a.current)||void 0===n?void 0:n.getBoundingClientRect().height)>(null==o||null===(r=o.current)||void 0===r?void 0:r.getBoundingClientRect().height))})),Ie((function(){e.eventManager.listen(e.player,e.player.Event.CHANGE_SOURCE_STARTED,(function(){h(!1)})),e.eventManager.listen(e.player,e.player.Event.CHANGE_SOURCE_ENDED,(function(){h(!0)})),c(new DOMParser)}),[]),!f||!e.isAudio||!(null===(t=e.player.sources)||void 0===t||null===(n=t.metadata)||void 0===n?void 0:n.name)&&!(null===(r=e.player.sources)||void 0===r?void 0:r.metadata.description))return null;var C=e.player.sources.metadata,x=C.name,P=void 0===x?"":x,R=C.description,I=void 0===R?"":R;P=i(P),I=i(I);var O=function(e){switch(e){case Oi.EXTRA_LARGE:case Oi.LARGE:return Hr().audioEntryL;case Oi.MEDIUM:return Hr().audioEntryM;default:return Hr().audioEntryT}}(e.playerSize),L="".concat(Hr().audioEntryTitle," ").concat(E?Hr().audioEntryTitleTrimmed:""),M=E?"":Hr().audioEntryExpanded;return W("div",{className:"".concat(Hr().audioEntryBackdrop," ").concat(M)},W("div",{className:"".concat(Hr().audioEntryDetails," ").concat(O)},W(Kp,{isVertical:!0},W("div",{className:Hr().audioEntryContent},W("div",{ref:a,className:L},P),v?void 0:W("div",{ref:o,className:"".concat(Hr().audioEntryTitle," ").concat(Hr().audioEntryTitleTrimmed)},P),W("div",{className:Hr().audioEntryDescription},W(Fp,{text:I,lines:3,onClick:function(){_(!E)},forceShowMore:S},I))))))}))));Ef.displayName="AudioEntryDetails";var _f,Tf="Playback",Af=Xi({allowSidePanels:!0,allowPlayerArea:!0})(kf=Mo(Tf)(kf=function(e){tr()(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=ar()(t);if(n){var i=ar()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return rr()(this,e)});function i(){return N()(this,i),r.apply(this,arguments)}return B()(i,[{key:"componentDidMount",value:function(){this.props.updateIsKeyboardEnabled(!0)}},{key:"render",value:function(){return W("div",{className:Hr().playbackGuiWrapper},W(br,{name:"PresetArea"},W("div",{className:Hr().playerGui,id:"player-gui"},W(cc,null),W(zp,null),W(Wp,null,W(q,null,W(Ef,null),W(Wc,null),W(tc,null),W(Ls,null),W(bf,null),W(Kd,{name:"OverlayPlaybackControls",className:Hr().centerPlaybackControls}),W(Ud,null),W(gc,null),W(kd,null)),(function(e){var t=e.containerRef;return W(q,null,W(Vc,null),W(Yp,null,W(rd,null),W(vf,null)),W(hl,{leftControls:[Kd,ms,_s,Bc],rightControls:[ml,el,Lp,Al,tf,Xs,fo,Vd,Jo,ld]},W(Cc,{showFramePreview:!0,showTimeBubble:!0,playerContainer:t})))})))))}}]),i}(X))||kf)||kf;function Sf(e){return W(Af,e)}Af.displayName=Tf;var wf=un((function(e){return{isBumper:e.engine.adIsBumper}}))(_f=function(e){tr()(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=ar()(t);if(n){var i=ar()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return rr()(this,e)});function i(){return N()(this,i),r.apply(this,arguments)}return B()(i,[{key:"render",value:function(){return this.props.isBumper?null:W(Dl,null)}}]),i}(X))||_f;wf.displayName="AdLeftControls";var Cf,xf=un((function(e){return{state:{shell:e.shell,engine:{adIsLinear:e.engine.adIsLinear,adContentType:e.engine.adContentType}}}}))(Mo("Ads")((function(e,t){if(e.updateIsKeyboardEnabled(!0),function(e,t){var n=e.state.shell.isMobile&&!t.player.env.isIPadOS,r=!1;try{var i=t.player.config.plugins.ima.adsRenderingSettings;r=i&&i.useStyledLinearAds}catch(e){}return n||r}(e,t))return W("div",{className:Hr().adGuiWrapper},W(br,{name:"PresetArea"},W("div",{className:Hr().playerGui,id:"player-gui"},W(Wp,null,W(q,null,W(tc,null),W(Wc,{hasTopBar:!0})),W(q,null,W(Vc,{disabled:!0,leftControls:W(wf,null)}))))));var n=!1,r=!1,i=W(hl,{leftControls:[Kd,Mc],rightControls:[el,Jo]}),a=W(hl,{rightControls:[Jo]});return W("div",{className:Hr().adGuiWrapper},W(br,{name:"PresetArea"},W("div",{className:Hr().playerGui,id:"player-gui"},W(Wp,null,W(q,null,W(tc,null),W(Wc,{hasTopBar:!0}),r?W(Il,null):void 0,W(Kd,{name:"OverlayPlaybackControls",className:Hr().centerPlaybackControls})),W(q,null,W(Vc,{disabled:!0,leftControls:W(wf,null),rightControls:n?W(Pl,null):void 0}),function(e){var t=e.state.engine,n=t.adIsLinear,r=t.adContentType;return!(n&&r&&!r.startsWith("video"))}(e)?i:a)))))})));function Pf(e){return W(xf,e)}function Rf(){return W("div",{className:Hr().playbackGuiWrapper},W(br,{name:"PresetArea"},W(Wp,null,W(q,null,W(Gu,null)))))}function If(e){return W(Rf,e)}xf.displayName="Ads",Rf.displayName="Error";var Df,Of="Live",Lf=Xi({allowSidePanels:!0,allowPlayerArea:!0})(Cf=Mo(Of)(Cf=function(e){tr()(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=ar()(t);if(n){var i=ar()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return rr()(this,e)});function i(){return N()(this,i),r.apply(this,arguments)}return B()(i,[{key:"componentDidMount",value:function(){this.props.updateIsKeyboardEnabled(!0)}},{key:"render",value:function(){return W("div",{className:Hr().playbackGuiWrapper},W(br,{name:"PresetArea"},W("div",{className:Hr().playerGui,id:"player-gui"},W(cc,null),W(zp,null),W(Wp,null,W(q,null,W(tc,null),W(Ls,null),W(bf,null),W(Kd,{name:"OverlayPlaybackControls",className:Hr().centerPlaybackControls}),W(gc,null),W(kd,null)),(function(e){var t=e.containerRef;return W(q,null,W(Vc,null),W(Yp,null,W(rd,null),W(Wc,null)),W(hl,{leftControls:[Kd,ms,_s,zu],rightControls:[ml,el,Al,tf,Xs,fo,Vd,Jo,ld]},W(_c,{showFramePreview:!0,showTimeBubble:!0,playerContainer:t})))})))))}}]),i}(X))||Cf)||Cf;function Mf(e){return W(Lf,e)}Lf.displayName=Of;var Nf,Uf=Xi({allowSidePanels:!0,allowPlayerArea:!0})(Df=Mo("Img")(Df=function(e){tr()(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=ar()(t);if(n){var i=ar()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return rr()(this,e)});function i(){return N()(this,i),r.apply(this,arguments)}return B()(i,[{key:"componentDidMount",value:function(){this.props.updateIsKeyboardEnabled(!0)}},{key:"render",value:function(){return W("div",{className:Hr().playbackGuiWrapper},W(br,{name:"PresetArea"},W("div",{className:Hr().playerGui,id:"player-gui"},W(zp,null),W(Wp,null,W(q,null,W(Wc,null),W(tc,null),W(Ls,null),W(Kd,{name:"OverlayPlaybackControls",className:Hr().centerPlaybackControls}),W(kd,null)),(function(){return W(q,null,W(Vc,null),W(Yp,null,W(rd,null)),W(hl,{rightControls:[ml,fo,Jo,ld],leftControls:[]}))})))))}}]),i}(X))||Df)||Df;function Bf(e){return W(Uf,e)}Uf.displayName="Img";var Ff,jf="Document",Hf=Xi({allowSidePanels:!0,allowPlayerArea:!0})(Nf=Mo(jf)(Nf=function(e){tr()(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=ar()(t);if(n){var i=ar()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return rr()(this,e)});function i(){return N()(this,i),r.apply(this,arguments)}return B()(i,[{key:"componentDidMount",value:function(){this.props.updateIsKeyboardEnabled(!0)}},{key:"render",value:function(){return W("div",{className:Hr().playbackGuiWrapper},W(br,{name:"PresetArea"},W("div",{className:Hr().playerGui,id:"player-gui"},W(zp,null),W(Wp,null,W(q,null,W(Wc,null),W(tc,null),W(Ls,null),W(Kd,{name:"OverlayPlaybackControls",className:Hr().centerPlaybackControls}),W(kd,null)),(function(){return W(q,null,W(Vc,null),W(Yp,null,W(rd,null)),W(hl,{rightControls:[ml,fo,Jo,ld],leftControls:[]}))})))))}}]),i}(X))||Nf)||Nf;function Vf(e){return W(Hf,e)}Hf.displayName=jf;var Gf=null,Kf=null,zf=function(e,t){return function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return function(){var n=e.apply(void 0,arguments),r=function(){throw new Error("Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")},i={getState:n.getState,dispatch:function(){return r.apply(void 0,arguments)}},a=t.map((function(e){return e(i)}));return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Yt(n,!0).forEach((function(t){Wt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Yt(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},n,{dispatch:r=Zt.apply(void 0,a)(n.dispatch)})}}}(function(e){return function(t){return function(t){return function(n){Ff||(Ff=qn("UILoggerMiddleware")),e.debugActions&&Ff.debug("Action fired",n),t(n)}}}}(t),function(e){return function(t){return function(n){return function(r){switch(r.type){case Fl.COMPONENT_CLICKED:!function(e,t,n){switch(t.name){case"Keyboard":Kl[t.payload.key](e,t,n);break;case"OverlayAction":!function(e,t,n){"PlayPause"===t.payload.type?jl(e,0,n):"Fullscreen"===t.payload.type&&Vl(0,0,n)}(e,t,n);break;case"CaptionsMenu":!function(e,t,n){t.payload.type===n.Track.TEXT&&n.dispatchEvent(new si(t.payload.track))}(0,t,n);break;case"AudioMenu":!function(e,t,n){t.payload.type===n.Track.AUDIO&&n.dispatchEvent(new oi(t.payload.track))}(0,t,n);break;case"QualityMenu":!function(e,t,n){t.payload.type===n.Track.VIDEO&&n.dispatchEvent(new li(t.payload.track))}(0,t,n);break;case"SpeedMenu":!function(e,t,n){"speed"===t.payload.type&&n.dispatchEvent(new ci(t.payload.speed))}(0,t,n);break;case"AdvancedAudioDescToggle":!function(e,t,n){"AdvancedAudioDescription"===t.payload.type&&n.dispatchEvent(new or.FakeEvent(ur.USER_CLICKED_ADVANCED_AUDIO_DESCRIPTION,t.payload))}(0,t,n);break;case"CVAAOverlay":n.dispatchEvent(new Ll(t.payload.textStyle));break;case"Fullscreen":Vl(0,0,n);break;case"Shell":n.dispatchEvent(new or.FakeEvent(ur.UI_CLICKED));break;case"Rewind":n.dispatchEvent(new pi(t.payload.from,t.payload.to));break;case"Forward":n.dispatchEvent(new fi(t.payload.from,t.payload.to));break;case"LiveTag":n.dispatchEvent(new or.FakeEvent(ur.USER_CLICKED_LIVE_TAG));break;case"PrePlaybackPlayOverlay":case"PlayPause":jl(e,0,n);break;case"Volume":Hl(e,0,n)}}(t,r,e);break;case Fl.COMPONENT_CHANGED:!function(e,t,n){switch(t.name){case"Volume":n.dispatchEvent(new hi(t.payload.volume));break;case"SeekBarPlaybackContainer":n.dispatchEvent(new ui(t.payload.from,t.payload.to));break;case"ActivePreset":n.dispatchEvent(new or.FakeEvent(ur.UI_PRESET_CHANGE,t.payload))}}(0,r,e);break;case Tr.UPDATE_PLAYER_HOVER_STATE:!function(e,t,n){var r=e.getState().engine,i=e.getState().shell;!r.adBreak&&r.isPlaying&&i.playerHover!==t.hover&&n.dispatchEvent(new di(t.hover))}(t,r,e)}switch(n(r),r.type){case Tr.UPDATE_GUI_CLIENT_RECT:!function(e,t,n){var r=e.getState().shell.guiClientRect;n.dispatchEvent(new Nl(r))}(t,0,e);break;case Tr.UPDATE_PLAYER_CLIENT_RECT:!function(e,t,n){var r=e.getState().shell.playerClientRect;n.dispatchEvent(new Ml(r))}(t,0,e);break;case Tr.UPDATE_VIDEO_CLIENT_RECT:!function(e,t,n){var r=e.getState().shell.videoClientRect;n.dispatchEvent(new Ul(r))}(t,0,e)}}}}}(e),(function(e){return function(e){return function(t){t.type===Tr.UPDATE_IS_SMALL_SIZE?(Kf=t,Gf&&clearTimeout(Gf),Gf=setTimeout((function(){Gf=null,e(Kf)}),150)):e(t)}}}))};function Wf(e){return function(e){var t,n=e[0]/255,r=e[1]/255,i=e[2]/255,a=Math.min(n,r,i),o=Math.max(n,r,i),s=o-a;o===a?t=0:n===o?t=(r-i)/s:r===o?t=2+(i-n)/s:i===o&&(t=4+(n-r)/s),(t=Math.min(60*t,360))<0&&(t+=360);var l=(a+o)/2;return[t,100*(o===a?0:l<=.5?s/(o+a):s/(2-o-a)),100*l]}(function(e){var t=e.toString().match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];var n=t[0];3===t[0].length&&(n=n.split("").map((function(e){return e+e})).join(""));var r=parseInt(n,16);return[r>>16&255,r>>8&255,255&r]}(e))}var Yf="playkit",Zf="--".concat(Yf,"-{name}-color"),qf="--".concat(Yf,"-{name}-hsl-hue"),Xf="--".concat(Yf,"-{name}-hsl-saturation"),Qf="--".concat(Yf,"-{name}-hsl-lightness"),$f={colors:{live:"--playkit-live-color",playerBackground:"--playkit-player-background-color",paperSurface:"--playkit-paper-color",elevatedSurface:"--playkit-elevated-color",protectionSurface:"--playkit-protection-color",tone1:"--playkit-tone-1-color",tone2:"--playkit-tone-2-color",tone3:"--playkit-tone-3-color",tone4:"--playkit-tone-4-color",tone5:"--playkit-tone-5-color",tone6:"--playkit-tone-6-color",tone7:"--playkit-tone-7-color",tone8:"--playkit-tone-8-color",tone1RGB:"--playkit-tone-1-color-rgb",tone2RGB:"--playkit-tone-2-color-rgb",tone3RGB:"--playkit-tone-3-color-rgb",tone4RGB:"--playkit-tone-4-color-rgb",tone5RGB:"--playkit-tone-5-color-rgb",tone6RGB:"--playkit-tone-6-color-rgb",tone7RGB:"--playkit-tone-7-color-rgb",tone8RGB:"--playkit-tone-8-color-rgb"}},Jf=["primary","secondary","success","danger","warning"],eh=["--playkit-icon-data-url","--playkit-icon-chromecast-url","--playkit-icon-quality-HD-active-url","--playkit-icon-quality-4K-active-url","--playkit-icon-quality-8K-active-url"],th=function(){function e(t,n,r){N()(this,e),j()(this,"player",void 0),j()(this,"config",void 0),j()(this,"playerContainerElement",void 0),this.player=t,this.config=n,this.playerContainerElement=document.querySelector("#".concat(r))}return B()(e,[{key:"applyUserTheme",value:function(){this.config&&this.setColors(this.config)}},{key:"makeTextContrastColor",value:function(e){var t=Wf(e),n=t[0],r=t[1],i=t[2];return(n<30||n>205)&&(i=i<70?100:0),n>30&&n<205&&(i=i<40?100:0),function(e,t,n){t/=100,n/=100;var r=(1-Math.abs(2*n-1))*t,i=r*(1-Math.abs(e/60%2-1)),a=n-r/2,o=0,s=0,l=0;return 0<=e&&e<60?(o=r,s=i,l=0):60<=e&&e<120?(o=i,s=r,l=0):120<=e&&e<180?(o=0,s=r,l=i):180<=e&&e<240?(o=0,s=i,l=r):240<=e&&e<300?(o=i,s=0,l=r):300<=e&&e<360&&(o=r,s=0,l=i),o=Math.round(255*(o+a)).toString(16),s=Math.round(255*(s+a)).toString(16),l=Math.round(255*(l+a)).toString(16),1==o.length&&(o="0"+o),1==s.length&&(s="0"+s),1==l.length&&(l="0"+l),"#"+o+s+l}(n,r,i)}},{key:"setColors",value:function(e){for(var t in e.colors.primary&&this.setSvgFillColor(e.colors.primary),e.colors)if(Jf.includes(t)){var n=e.colors[t],r=this.makeTextContrastColor(n);this.setAccentOrAcknowledgementColor("".concat(t,"-").concat("text-contrast"),r),this.setAccentOrAcknowledgementColor(t,n),"primary"===t&&this.setSvgFillColor(r,!0)}else this.setColor($f.colors[t],e.colors[t])}},{key:"setAccentOrAcknowledgementColor",value:function(e,t){var n=Wf(t),r=D()(n,3),i=r[0],a=r[1],o=r[2];this.setCSSVariable(Zf.replace("{name}",e),t),this.setCSSVariable(qf.replace("{name}",e),"".concat(Math.round(i),"deg")),this.setCSSVariable(Xf.replace("{name}",e),"".concat(Math.round(a),"%")),this.setCSSVariable(Qf.replace("{name}",e),"".concat(Math.round(o),"%"))}},{key:"setColor",value:function(e,t){this.setCSSVariable(e,t)}},{key:"setSvgFillColor",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=0,r=eh;n<r.length;n++){var i=r[n],a=this.getCSSVariable(i),o=e.replace("#","%23"),s=/fill='%23([a-f0-9]{3}){1,2}\b'/g;t&&(s=/fill='textColor'/g),this.setCSSVariable(i,a.replaceAll(s,"fill='".concat(o,"'")))}}},{key:"getCSSVariable",value:function(e){return getComputedStyle(this.playerContainerElement.querySelector(".".concat(Hr().player))).getPropertyValue(e)||""}},{key:"setCSSVariable",value:function(e,t){this.playerContainerElement.querySelector(".".concat(Hr().player)).style.setProperty(e,t)}}]),e}(),nh=function(){function e(t,n){var r;N()(this,e),j()(this,"player",void 0),j()(this,"targetId",void 0),j()(this,"store",void 0),j()(this,"container",void 0),j()(this,"_translations",{en:so.en}),j()(this,"_locale","en"),j()(this,"_uiComponents",void 0),j()(this,"_themesManager",void 0),function(e){e&&"function"==typeof e.getLogger&&(Kn.get=e.getLogger),e&&e.LogLevel&&(zn=e.LogLevel)}(n.logger),this._uiComponents=L()(n.uiComponents||[]),this.player=t,this.targetId=n.targetId,this._createStore(n),this.setConfig(n),this._setLocaleTranslations(n),this._themesManager=new th(t,n.userTheme,n.targetId),r=this.player.env,cr.SEMI_COLON="firefox"===r.browser.name.toLowerCase()?59:186}return B()(e,[{key:"setConfig",value:function(e,t){t?this.store.dispatch(qr.updateComponentConfig(t,e)):this.store.dispatch(qr.updateConfig(e))}},{key:"addComponent",value:function(e){return function(){}}},{key:"buildDefaultUI",value:function(){var e=[{template:function(e){return pf(e)},condition:function(e){return e.engine.isIdle}},{template:function(e){return If(e)},condition:function(e){return e.engine.hasError}},{template:function(e){return Pf(e)},condition:function(e){return e.engine.adBreak}},{template:function(e){return Mf(e)},condition:function(e){return e.engine.isLive}},{template:function(e){return Bf(e)},condition:function(e){return e.engine.isImg}},{template:function(e){return Vf(e)},condition:function(e){return e.engine.isDocument}},{template:function(e){return Sf(e)}}];this._buildUI(e),this._themesManager.applyUserTheme()}},{key:"buildCustomUI",value:function(e){if(e.length>0)this._buildUI(e);else{var t=[{template:function(e){return Sf(e)}}];this._buildUI(t)}this._themesManager.applyUserTheme()}},{key:"_setLocaleTranslations",value:function(e){var t=this;e.translations&&Object.entries(e.translations).forEach((function(e){var n=D()(e,2),r=n[0],i=n[1];i=Gn({},t._translations.en,i),t._translations[r]=i})),e.locale&&this._translations[e.locale]&&(this._locale=e.locale)}},{key:"_createStore",value:function(e){var t=window.__REDUX_DEVTOOLS_EXTENSION__;this.store=Vt(oo,Zt(zf(this.player,e),t?t({trace:!1}):function(e){return e}))}},{key:"_buildUI",value:function(e){var t=this;this.player&&(this.container=document.getElementById(this.targetId),this.container&&he(W(_t,{store:this.store},W(Zi,{uiComponents:this._uiComponents,setApi:function(e){e&&(t.addComponent=e)}},W(An,{definition:this._translations[this._locale]},W(ii,{player:this.player},W(yi,{player:this.player,store:this.store},W(Lo,{playerContainer:this.container},W(Ni,null,W(Pu,null),W(td,null),W(cf,{uis:e,playerContainer:this.container})))))))),this.container))}},{key:"destroy",value:function(){this.container&&(this.container.prepend(this.player.getView()),he("",this.container))}},{key:"getLogLevel",value:function(e){return function(e){return Wn(e).getLevel()}(e)}},{key:"setLogLevel",value:function(e,t){!function(e,t){Wn(t).setLevel(e)}(e,t)}},{key:"getCSSVariable",value:function(e){return this._themesManager.getCSSVariable(e)}},{key:"setCSSVariable",value:function(e,t){this._themesManager.setCSSVariable(e,t)}},{key:"config",get:function(){return Hn(this.store.getState().config)}},{key:"LogLevel",get:function(){return zn}},{key:"Event",get:function(){return ur}}]),e}(),rh="0.79.12",ih="@playkit-js/playkit-js-ui",ah=Hr()}(),i}())},75:module=>{self,module.exports=function(){var e={9063:function(e,t,n){"use strict";n.d(t,{S:function(){return r}});var r={PRE:"preroll",MID:"midroll",POST:"postroll",OVERLAY:"overlay"}},4611:function(e,t,n){"use strict";n.d(t,{J:function(){return r}});var r={AD_CAN_SKIP:"adcanskip",AD_MANIFEST_LOADED:"admanifestloaded",AD_LOADED:"adloaded",AD_STARTED:"adstarted",AD_RESUMED:"adresumed",AD_PAUSED:"adpaused",AD_CLICKED:"adclicked",AD_SKIPPED:"adskipped",AD_COMPLETED:"adcompleted",AD_ERROR:"aderror",ADS_COMPLETED:"adscompleted",ALL_ADS_COMPLETED:"alladscompleted",AD_BREAK_START:"adbreakstart",AD_BREAK_END:"adbreakend",AD_FIRST_QUARTILE:"adfirstquartile",AD_MIDPOINT:"admidpoint",AD_THIRD_QUARTILE:"adthirdquartile",USER_CLOSED_AD:"userclosedad",AD_VOLUME_CHANGED:"advolumechanged",AD_MUTED:"admuted",AD_PROGRESS:"adprogress",AD_BUFFERING:"adbuffering",AD_WATERFALLING:"adwaterfalling",AD_WATERFALLING_FAILED:"adwaterfallingfailed",AD_AUTOPLAY_FAILED:"adautoplayfailed"}},8151:function(e,t,n){"use strict";n.d(t,{J:function(){return r}});var r={VAST:"vast",VMAP:"vmap"}},7237:function(e,t,n){"use strict";n.d(t,{J:function(){return r}});var r={WIDEVINE:"com.widevine.alpha",PLAYREADY:"com.microsoft.playready",FAIRPLAY:"com.apple.fairplay"}},1057:function(e,t,n){"use strict";n.d(t,{_:function(){return a}});var r=n(5671),i=n(3144),a=function(){function e(t){(0,r.Z)(this,e),this._name=t.getName(),this._getEngineDecorator=t.getEngineDecorator.bind(t)}return(0,i.Z)(e,[{key:"getEngineDecorator",value:function(e,t){return this._getEngineDecorator(e,t)}},{key:"getName",value:function(){return this._name}}]),e}()},4779:function(e,t,n){"use strict";n.d(t,{zv:function(){return w},Hl:function(){return C},co:function(){return x}});var r,i=n(5671),a=n(3144),o=n(4942),s=n(4358),l=n(7326),u=n(9340),c=n(2963),d=n(1120),p=n(8171),f=n(8987),h=n(4270),y=n(2114),g=n(2588),v=n(6462),m=n(375),b=n(4821),k=JSON.parse('{"$":"data:video/mp4;base64,AAAAHGZ0eXBpc29tAAACAGlzb21pc28ybXA0MQAAAAhmcmVlAAAC721kYXQhEAUgpBv/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3pwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcCEQBSCkG//AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADengAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcAAAAsJtb292AAAAbG12aGQAAAAAAAAAAAAAAAAAAAPoAAAALwABAAABAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAB7HRyYWsAAABcdGtoZAAAAAMAAAAAAAAAAAAAAAIAAAAAAAAALwAAAAAAAAAAAAAAAQEAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAACRlZHRzAAAAHGVsc3QAAAAAAAAAAQAAAC8AAAAAAAEAAAAAAWRtZGlhAAAAIG1kaGQAAAAAAAAAAAAAAAAAAKxEAAAIAFXEAAAAAAAtaGRscgAAAAAAAAAAc291bgAAAAAAAAAAAAAAAFNvdW5kSGFuZGxlcgAAAAEPbWluZgAAABBzbWhkAAAAAAAAAAAAAAAkZGluZgAAABxkcmVmAAAAAAAAAAEAAAAMdXJsIAAAAAEAAADTc3RibAAAAGdzdHNkAAAAAAAAAAEAAABXbXA0YQAAAAAAAAABAAAAAAAAAAAAAgAQAAAAAKxEAAAAAAAzZXNkcwAAAAADgICAIgACAASAgIAUQBUAAAAAAfQAAAHz+QWAgIACEhAGgICAAQIAAAAYc3R0cwAAAAAAAAABAAAAAgAABAAAAAAcc3RzYwAAAAAAAAABAAAAAQAAAAIAAAABAAAAHHN0c3oAAAAAAAAAAAAAAAIAAAFzAAABdAAAABRzdGNvAAAAAAAAAAEAAAAsAAAAYnVkdGEAAABabWV0YQAAAAAAAAAhaGRscgAAAAAAAAAAbWRpcmFwcGwAAAAAAAAAAAAAAAAtaWxzdAAAACWpdG9vAAAAHWRhdGEAAAABAAAAAExhdmY1Ni40MC4xMDE="}'),E=(r=function(){function e(){(0,i.Z)(this,e)}return(0,a.Z)(e,null,[{key:"runCapability",value:function(){e._capabilities.autoplay||"boolean"==typeof e._capabilities.autoplay&&"boolean"==typeof e._capabilities.mutedAutoPlay?e._playPromiseResult=Promise.resolve(e._capabilities):(e._vid||(e._vid=b.is.createElement("video"),e._vid.src=k.$,e._vid.setAttribute("playsinline","")),e._playPromiseResult=new Promise((function(t){e._setMuted(!1),e._getPlayPromise().then((function(){return t({autoplay:!0,mutedAutoPlay:!0})})).catch((function(){e._setMuted(!0),e._getPlayPromise().then((function(){return t({autoplay:!1,mutedAutoPlay:!0})})).catch((function(){return t({autoplay:!1,mutedAutoPlay:!1})}))}))})))}},{key:"getCapability",value:function(){return e._playPromiseResult.then((function(t){var n;return t.autoplay?n=Promise.resolve(t):(e.runCapability(),n=e._playPromiseResult),n.then((function(t){return b.c7.mergeDeep(t,e._capabilities)}))}))}},{key:"setCapabilities",value:function(t){e._logger.debug("Set player capabilities",t);var n=t.autoplay,r=t.mutedAutoPlay;"boolean"==typeof n&&(e._capabilities.autoplay=n),"boolean"==typeof r&&(e._capabilities.mutedAutoPlay=r)}},{key:"_getPlayPromise",value:function(){return e._vid.play()||e._forcePromiseReturnValue()}},{key:"_setMuted",value:function(t){t?(e._vid.muted=!0,e._vid.setAttribute("muted","")):(e._vid.muted=!1,e._vid.removeAttribute("muted"))}},{key:"_forcePromiseReturnValue",value:function(){return new Promise((function(t,n){e._vid.addEventListener(y.Rk.ERROR,(function(){n()}));var r=setTimeout((function(){e._logger.debug("Timeout ".concat(500," ms has been reached")),n()}),500);!0===e._vid.paused?(clearTimeout(r),n()):(clearTimeout(r),t())}))}}]),e}(),(0,o.Z)(r,"_logger",(0,s.ZP)("Html5AutoPlayCapability")),(0,o.Z)(r,"_capabilities",{}),r),_=n(962),T=n(9439),A=function(e){(0,u.Z)(s,e);var t,n,r=(t=s,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,d.Z)(t);if(n){var i=(0,d.Z)(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return(0,c.Z)(this,e)});function s(e,t,n){var a;return(0,i.Z)(this,s),a=r.call(this),(0,o.Z)((0,l.Z)(a),"_droppedFramesInterval",null),(0,o.Z)((0,l.Z)(a),"_lastDroppedFrames",0),(0,o.Z)((0,l.Z)(a),"_lastDecodedFrames",0),(0,o.Z)((0,l.Z)(a),"_lastTime",0),(0,o.Z)((0,l.Z)(a),"_currentBitrate",0),a._eventManager=new h.Q,a._mediaSourceAdapter=e,a._config=t,a._videoElement=n,a._mediaSourceAdapter.capabilities.fpsControl?(a._eventManager.listen(a._mediaSourceAdapter,y.nQ.FPS_DROP,(function(e){return a._triggerFPSDrop(e.payload.data)})),(0,c.Z)(a)):(-1===a._getDroppedAndDecodedFrames()[0]?s._logger.debug("Dropped frame watcher is not supported"):a._config.capLevelOnFPSDrop?(s._logger.debug("Initialized capLevelOnFPSDrop = true"),a._init()):s._logger.debug("Not Initialized"),a)}return(0,a.Z)(s,[{key:"_init",value:function(){var e=this;this._eventManager.listen(this._mediaSourceAdapter,y.nQ.VIDEO_TRACK_CHANGED,(function(t){return e._currentBitrate=t.payload.selectedVideoTrack.bandwidth})),this._droppedFramesInterval=setInterval((function(){return e._checkFPS()}),this._config.fpsDroppedFramesInterval)}},{key:"_triggerFPSDrop",value:function(e){this.dispatchEvent(new f.v(y.nQ.FPS_DROP,e))}},{key:"_getDroppedAndDecodedFrames",value:function(){if("function"==typeof this._videoElement.getVideoPlaybackQuality){var e=this._videoElement.getVideoPlaybackQuality();return[e.droppedVideoFrames,e.totalVideoFrames]}return"number"==typeof this._videoElement.webkitDroppedFrameCount&&"number"==typeof this._videoElement.webkitDecodedFrameCount?[this._videoElement.webkitDroppedFrameCount,this._videoElement.webkitDecodedFrameCount]:[-1,-1]}},{key:"_checkFPS",value:function(){var e=this._getDroppedAndDecodedFrames(),t=(0,T.Z)(e,2),n=t[0],r=t[1];try{var i=performance.now();if(r){if(this._lastTime){var a=i-this._lastTime,o=n-this._lastDroppedFrames,l=r-this._lastDecodedFrames,u=1e3*o/a;u>0&&(s._logger.debug("checkFPS : droppedFPS/decodedFPS:"+u/(1e3*l/a)),o>this._config.fpsDroppedMonitoringThreshold*l&&(this._mediaSourceAdapter.setMaxBitrate(this._currentBitrate-1),this._triggerFPSDrop({currentDropped:o,currentDecoded:l,totalDroppedFrames:u})))}this._lastTime=i,this._lastDroppedFrames=n,this._lastDecodedFrames=r}}catch(e){s._logger.error("Error occur while trying to check dropFrames: ",e)}}},{key:"destroy",value:function(){this._droppedFramesInterval&&clearInterval(this._droppedFramesInterval),this._droppedFramesInterval=null,this._eventManager.destroy()}}]),s}(p.H);(0,o.Z)(A,"_logger",(0,s.ZP)("droppedFramesWatcher"));var S=function(e){(0,u.Z)(s,e);var t,n,r=(t=s,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,d.Z)(t);if(n){var i=(0,d.Z)(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return(0,c.Z)(this,e)});function s(e,t,n){var a;return(0,i.Z)(this,s),a=r.call(this),(0,o.Z)((0,l.Z)(a),"_reset",!1),(0,o.Z)((0,l.Z)(a),"_cachedUrls",[]),a._eventManager=new h.Q,a._canLoadMediaSourceAdapterPromise=Promise.resolve(),a._createVideoElement(n),a._init(e,t),a}return(0,a.Z)(s,[{key:"restore",value:function(e,t){this.reset(),this._init(e,t)}},{key:"reset",value:function(){var e=this;this._reset||(this._reset=!0,this._eventManager.removeAll(),this._droppedFramesWatcher&&(this._droppedFramesWatcher.destroy(),this._droppedFramesWatcher=void 0),this._canLoadMediaSourceAdapterPromise=new Promise((function(t,n){var r=e._mediaSourceAdapter?e._mediaSourceAdapter.destroy():Promise.resolve();e._el&&e._el.src?r.then((function(){b.is.setAttribute(e._el,"src",""),b.is.removeAttribute(e._el,"src"),t()}),n):r.then(t,n)})),this._mediaSourceAdapter=null)}},{key:"destroy",value:function(){this.detach(),this._el&&(this.pause(),b.is.removeAttribute(this._el,"src"),b.is.removeChild(this._el.parentNode,this._el)),this._eventManager.destroy(),g.Z.destroy(),this._droppedFramesWatcher&&(this._droppedFramesWatcher.destroy(),this._droppedFramesWatcher=void 0),this._mediaSourceAdapter&&(this._mediaSourceAdapter.setCachedUrls([]),this._mediaSourceAdapter.destroy(),this._mediaSourceAdapter=null)}},{key:"mediaSourceAdapter",get:function(){return this._mediaSourceAdapter}},{key:"id",get:function(){return s.id}},{key:"attachMediaSource",value:function(){this._mediaSourceAdapter&&this._mediaSourceAdapter.attachMediaSource()}},{key:"detachMediaSource",value:function(){this._mediaSourceAdapter&&this._mediaSourceAdapter.detachMediaSource()}},{key:"attach",value:function(){var e=this;Object.keys(y.Rk).forEach((function(t){[y.Rk.ERROR,y.Rk.WAITING].includes(y.Rk[t])||e._eventManager.listen(e._el,y.Rk[t],(function(){return e.dispatchEvent(new f.v(y.Rk[t]))}))})),this._eventManager.listen(this._el,y.Rk.ERROR,(function(){return e._handleVideoError()})),this._eventManager.listen(this._el,y.Rk.WAITING,(function(){return e._handleWaiting()})),this._handleMetadataTrackEvents(),this._eventManager.listen(this._el.textTracks,"addtrack",(function(t){v.PZ.isNativeTextTrack(t.track)&&e.dispatchEvent(new f.v(y.nQ.TEXT_TRACK_ADDED,{track:t.track}))}));var t=this._mediaSourceAdapter;t&&(this._eventManager.listen(t,y.nQ.VIDEO_TRACK_CHANGED,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(t,y.nQ.AUDIO_TRACK_CHANGED,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(t,y.nQ.TEXT_TRACK_CHANGED,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(t,y.nQ.IMAGE_TRACK_CHANGED,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(t,y.nQ.ABR_MODE_CHANGED,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(t,y.nQ.TEXT_CUE_CHANGED,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(t,y.nQ.TRACKS_CHANGED,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(t,y.nQ.FRAG_LOADED,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(t,y.nQ.DRM_LICENSE_LOADED,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(t,y.nQ.MANIFEST_LOADED,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(t,y.Rk.ERROR,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(t,y.Rk.TIME_UPDATE,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(t,y.Rk.PLAYING,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(t,y.Rk.WAITING,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(t,y.nQ.MEDIA_RECOVERED,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(t,y.nQ.TIMED_METADATA_ADDED,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(t,"hlsFragParsingMetadata",(function(t){return e.dispatchEvent(t)})),this._droppedFramesWatcher&&this._eventManager.listen(this._droppedFramesWatcher,y.nQ.FPS_DROP,(function(t){return e.dispatchEvent(t)})))}},{key:"detach",value:function(){var e=this;Object.keys(y.Rk).forEach((function(t){e._eventManager.unlisten(e._el,y.Rk[t])})),this._mediaSourceAdapter&&(this._eventManager.unlisten(this._mediaSourceAdapter,y.nQ.VIDEO_TRACK_CHANGED),this._eventManager.unlisten(this._mediaSourceAdapter,y.nQ.AUDIO_TRACK_CHANGED),this._eventManager.unlisten(this._mediaSourceAdapter,y.nQ.TEXT_TRACK_CHANGED),this._eventManager.unlisten(this._mediaSourceAdapter,y.nQ.TEXT_CUE_CHANGED))}},{key:"getVideoElement",value:function(){return this._el}},{key:"selectVideoTrack",value:function(e){this._mediaSourceAdapter&&this._mediaSourceAdapter.selectVideoTrack(e)}},{key:"selectAudioTrack",value:function(e){this._mediaSourceAdapter&&this._mediaSourceAdapter.selectAudioTrack(e)}},{key:"selectTextTrack",value:function(e){this._removeCueChangeListeners(),this._mediaSourceAdapter&&this._mediaSourceAdapter.selectTextTrack(e),this.resetAllCues(),this._addCueChangeListener()}},{key:"selectImageTrack",value:function(e){this._mediaSourceAdapter&&this._mediaSourceAdapter.selectImageTrack(e)}},{key:"hideTextTrack",value:function(){this._mediaSourceAdapter&&this._mediaSourceAdapter.hideTextTrack(),this._removeCueChangeListeners()}},{key:"enableAdaptiveBitrate",value:function(){this._mediaSourceAdapter&&this._mediaSourceAdapter.enableAdaptiveBitrate()}},{key:"isAdaptiveBitrateEnabled",value:function(){return!!this._mediaSourceAdapter&&this._mediaSourceAdapter.isAdaptiveBitrateEnabled()}},{key:"applyABRRestriction",value:function(e){if(this._mediaSourceAdapter)return this._mediaSourceAdapter.applyABRRestriction(e)}},{key:"seekToLiveEdge",value:function(){this._mediaSourceAdapter&&this._mediaSourceAdapter.seekToLiveEdge()}},{key:"isOnLiveEdge",value:function(){return!!this._mediaSourceAdapter&&this._mediaSourceAdapter.isOnLiveEdge()}},{key:"getStartTimeOfDvrWindow",value:function(){return this._mediaSourceAdapter?this._mediaSourceAdapter.getStartTimeOfDvrWindow():0}},{key:"isLive",value:function(){return!!this._mediaSourceAdapter&&this._mediaSourceAdapter.isLive()}},{key:"play",value:function(){var e=this,t=this._el.play();return t&&t.catch((function(t){return e.dispatchEvent(new f.v(y.nQ.PLAY_FAILED,{error:t}))})),t}},{key:"pause",value:function(){return this._el.pause()}},{key:"load",value:function(e){var t=this;return this._el.load(),this._canLoadMediaSourceAdapterPromise.then((function(){return t._mediaSourceAdapter?t._mediaSourceAdapter.load(e):Promise.resolve({})})).catch((function(e){return t.dispatchEvent(new f.v(y.Rk.ERROR,e)),Promise.reject(e)}))}},{key:"enterPictureInPicture",value:function(){var e=this;try{document.pictureInPictureEnabled&&"function"==typeof this._el.requestPictureInPicture&&!this._el.disablePictureInPicture?this._el.requestPictureInPicture().catch((function(t){e.dispatchEvent(new f.v(y.Rk.ERROR,new _.Z(_.Z.Severity.RECOVERABLE,_.Z.Category.PLAYER,_.Z.Code.ENTER_PICTURE_IN_PICTURE_FAILED,t)))})):"function"==typeof this._el.webkitSetPresentationMode&&(this._el.webkitSetPresentationMode("picture-in-picture"),setTimeout((function(){return e.dispatchEvent(new f.v(y.Rk.ENTER_PICTURE_IN_PICTURE))}),0))}catch(e){this.dispatchEvent(new f.v(y.Rk.ERROR,new _.Z(_.Z.Severity.RECOVERABLE,_.Z.Category.PLAYER,_.Z.Code.ENTER_PICTURE_IN_PICTURE_FAILED,e)))}}},{key:"exitPictureInPicture",value:function(){var e=this;try{document.pictureInPictureEnabled&&"function"==typeof document.exitPictureInPicture&&this._el===document.pictureInPictureElement?document.exitPictureInPicture().catch((function(t){e.dispatchEvent(new f.v(y.Rk.ERROR,new _.Z(_.Z.Severity.RECOVERABLE,_.Z.Category.PLAYER,_.Z.Code.EXIT_PICTURE_IN_PICTURE_FAILED,t)))})):"function"==typeof this._el.webkitSetPresentationMode&&this._el.webkitSetPresentationMode("inline")}catch(e){this.dispatchEvent(new f.v(y.Rk.ERROR,new _.Z(_.Z.Severity.RECOVERABLE,_.Z.Category.PLAYER,_.Z.Code.EXIT_PICTURE_IN_PICTURE_FAILED,e)))}}},{key:"isPictureInPictureSupported",value:function(){return"function"==typeof this._el.webkitSupportsPresentationMode?this._el.webkitSupportsPresentationMode("picture-in-picture"):!!document.pictureInPictureEnabled}},{key:"getThumbnail",value:function(e){return this._mediaSourceAdapter?this._mediaSourceAdapter.getThumbnail(e):null}},{key:"src",get:function(){return this._mediaSourceAdapter?this._mediaSourceAdapter.src:""},set:function(e){this._mediaSourceAdapter&&(this._mediaSourceAdapter.src=e)}},{key:"currentTime",get:function(){return this._el?this._el.currentTime:0},set:function(e){this._el&&(this._el.currentTime=e)}},{key:"duration",get:function(){return this._el.duration}},{key:"liveDuration",get:function(){return this._mediaSourceAdapter?this._mediaSourceAdapter.liveDuration:-1}},{key:"volume",get:function(){return this._el.volume},set:function(e){this._el.volume=e}},{key:"paused",get:function(){return this._el.paused}},{key:"seeking",get:function(){return this._el.seeking}},{key:"seekable",get:function(){return this._el.seekable}},{key:"played",get:function(){return this._el.played}},{key:"buffered",get:function(){return this._el.buffered}},{key:"muted",get:function(){return this._el.muted},set:function(e){this._el.muted=e}},{key:"defaultMuted",get:function(){return this._el.defaultMuted}},{key:"poster",get:function(){return this._el.poster},set:function(e){this._el.poster=e}},{key:"preload",get:function(){return this._el.preload},set:function(e){this._el.preload=e}},{key:"autoplay",get:function(){return this._el.autoplay},set:function(e){this._el.autoplay=e}},{key:"loop",get:function(){return this._el.loop},set:function(e){this._el.loop=e}},{key:"controls",get:function(){return this._el.controls},set:function(e){this._el.controls=e}},{key:"playbackRate",get:function(){return this._el.playbackRate},set:function(e){this._el.playbackRate=e}},{key:"defaultPlaybackRate",get:function(){return this._el.defaultPlaybackRate},set:function(e){this._el.defaultPlaybackRate=e}},{key:"ended",get:function(){return this._el.ended}},{key:"error",get:function(){return this._el.error}},{key:"networkState",get:function(){return this._el.networkState}},{key:"readyState",get:function(){return this._el.readyState}},{key:"videoHeight",get:function(){return this._el.videoHeight}},{key:"videoWidth",get:function(){return this._el.videoWidth}},{key:"playsinline",get:function(){return""===this._el.getAttribute("playsinline")},set:function(e){e?this._el.setAttribute("playsinline",""):this._el.removeAttribute("playsinline")}},{key:"crossOrigin",get:function(){return this._el.getAttribute("crossorigin")},set:function(e){"string"==typeof e?this._el.setAttribute("crossorigin",e):this._el.removeAttribute("crossorigin")}},{key:"playbackRates",get:function(){return s.PLAYBACK_RATES}},{key:"isInPictureInPicture",get:function(){return!!document.pictureInPictureElement&&null!==document.pictureInPictureElement&&this._el===document.pictureInPictureElement||!!this._el.webkitPresentationMode&&"picture-in-picture"===this._el.webkitPresentationMode}},{key:"_init",value:function(e,t){this._config=t,this._reset=!1,this._loadMediaSourceAdapter(e),this.attach()}},{key:"_createVideoElement",value:function(e){this._el=s.videoElementStore[e]||b.is.createElement("video"),this._el.id=b.RO.uniqueId(5),this._el.controls=!1}},{key:"_loadMediaSourceAdapter",value:function(e){this._mediaSourceAdapter=g.Z.getMediaSourceAdapter(this.getVideoElement(),e,this._config),this._mediaSourceAdapter&&(this._droppedFramesWatcher=new A(this._mediaSourceAdapter,this._config.abr,this._el),this._cachedUrls.length&&(this._mediaSourceAdapter.setCachedUrls(this._cachedUrls),this._cachedUrls=[]))}},{key:"_addCueChangeListener",value:function(){var e=this,t=Array.from(this._el.textTracks).find((function(e){return v.PZ.isNativeTextTrack(e)&&e.mode!==v.PZ.MODE.DISABLED}));t&&this._eventManager.listen(t,"cuechange",(function(t){return e._onCueChange(t)}))}},{key:"_removeCueChangeListeners",value:function(){var e=this;Array.from(this._el.textTracks).filter((function(e){return!v.PZ.isMetaDataTrack(e)})).forEach((function(t){e._eventManager.unlisten(t,"cuechange")}))}},{key:"_onCueChange",value:function(e){var t=e.currentTarget.activeCues,n=(0,v.z6)(t);this.dispatchEvent(new f.v(y.nQ.TEXT_CUE_CHANGED,{cues:n}))}},{key:"resetAllCues",value:function(){var e=Array.from(this._el.textTracks).find((function(e){return v.PZ.isNativeTextTrack(e)&&e.mode!==v.PZ.MODE.DISABLED}));if(e)for(var t=0;t<e.cues.length;t++)e.cues[t].hasBeenReset=!0}},{key:"_handleVideoError",value:function(){if(this._el.error){var e=this._el.error.code;if(e!==MediaError.MEDIA_ERR_ABORTED){var t=this._getMsExtendedError(),n=this._el.error.message;if(this._mediaSourceAdapter&&!this._mediaSourceAdapter.handleMediaError(this._el.error)){var r=new _.Z(_.Z.Severity.CRITICAL,_.Z.Category.MEDIA,_.Z.Code.VIDEO_ERROR,{code:e,extended:t,message:n});this.dispatchEvent(new f.v(y.Rk.ERROR,r))}}}}},{key:"_handleWaiting",value:function(){var e=this,t=!1;this._eventManager.listenOnce(this._el,y.Rk.PLAYING,(function(){return t=!0})),setTimeout((function(){t||e.dispatchEvent(new f.v(y.Rk.WAITING))}),200)}},{key:"_getMsExtendedError",value:function(){var e=this._el.error.msExtendedCode;return e&&(e<0&&(e+=Math.pow(2,32)),e=e.toString(16)),e}},{key:"_handleMetadataTrackEvents",value:function(){var e=this,t=function(t){t.mode=v.PZ.MODE.HIDDEN,e._eventManager.listen(t,"cuechange",(function(){var t=[];Array.from(e._el.textTracks).forEach((function(e){v.PZ.isMetaDataTrack(e)&&(t=t.concat((0,v.z6)(e.activeCues)))})),t=t.sort((function(e,t){return e.startTime-t.startTime})),e.dispatchEvent(new f.v(y.nQ.TIMED_METADATA,{cues:t})),e.dispatchEvent(new f.v(y.nQ.TIMED_METADATA_CHANGE,{cues:t.map((function(e){return(0,m.cP)(e)}))}))}))};Array.from(this._el.textTracks).forEach((function(e){v.PZ.isMetaDataTrack(e)&&t(e)})),this._eventManager.listen(this._el.textTracks,"addtrack",(function(e){v.PZ.isMetaDataTrack(e.track)&&t(e.track)})),this._eventManager.listen(this._el.textTracks,"change",(function(){Array.from(e._el.textTracks).forEach((function(e){v.PZ.isMetaDataTrack(e)&&e.mode!==v.PZ.MODE.HIDDEN&&(e.mode=v.PZ.MODE.HIDDEN)}))}))}},{key:"targetBuffer",get:function(){return this._mediaSourceAdapter?this._mediaSourceAdapter.targetBuffer:NaN}},{key:"availableBuffer",get:function(){var e=0;if(this.buffered)for(var t=0;t<this.buffered.length;t++)this.buffered.start(t)<=this._el.currentTime&&this._el.currentTime<=this.buffered.end(t)&&(e=this.buffered.end(t)-this._el.currentTime);return e}},{key:"addTextTrack",value:function(e,t,n){return this._el.addTextTrack(e,t,n)}},{key:"getNativeTextTracks",value:function(){return Array.from(this._el.textTracks)}},{key:"getDrmInfo",value:function(){return this._mediaSourceAdapter?this._mediaSourceAdapter.getDrmInfo():null}},{key:"setCachedUrls",value:function(e){this._cachedUrls=e,this._mediaSourceAdapter&&(this._mediaSourceAdapter.setCachedUrls(e),this._cachedUrls=[])}}],[{key:"isSupported",value:function(){try{var e=b.is.createElement("video");return e.volume=.5,!!e.canPlayType}catch(e){return!1}}},{key:"createEngine",value:function(e,t,n){return new this(e,t,n)}},{key:"canPlaySource",value:function(e,t,n){return g.Z.canPlaySource(e,t,n)}},{key:"runCapabilities",value:function(){s._capabilities.forEach((function(e){return e.runCapability()}))}},{key:"getCapabilities",value:function(){var e=[];return s._capabilities.forEach((function(t){return e.push(t.getCapability())})),Promise.all(e).then((function(e){var t={};return e.forEach((function(e){return Object.assign(t,e)})),(0,o.Z)({},s.id,t)}))}},{key:"setCapabilities",value:function(e){s._capabilities.forEach((function(t){return t.setCapabilities(e)}))}},{key:"prepareVideoElement",value:function(e){if(!s.videoElementStore[e]){s._logger.debug("Create the video element for playing ".concat(e));var t=b.is.createElement("video");s.videoElementStore[e]=t}s._logger.debug("Prepare the video element for playing ".concat(e)),s.videoElementStore[e].load()}}]),s}(p.H);(0,o.Z)(S,"_logger",(0,s.ZP)("Html5")),(0,o.Z)(S,"_capabilities",[E]),(0,o.Z)(S,"id","html5"),(0,o.Z)(S,"videoElementStore",{}),(0,o.Z)(S,"PLAYBACK_RATES",[.5,1,1.5,2]);var w=function(){function e(){(0,i.Z)(this,e)}return(0,a.Z)(e,null,[{key:"register",value:function(t,n){t&&!e._engineProviders[t]?(e._logger.debug("Engine <".concat(t,"> has been registered successfully")),e._engineProviders[t]=n):e._logger.debug("Engine <".concat(t,"> is already registered, do not register again"))}},{key:"unRegister",value:function(t){e._engineProviders[t]&&(e._logger.debug("Unregistered <".concat(t,"> Engine")),delete e._engineProviders[t])}},{key:"getEngines",value:function(){return Object.keys(e._engineProviders).map((function(t){return e._engineProviders[t]}))}},{key:"destroy",value:function(){e._engineProviders={}}}]),e}();(0,o.Z)(w,"_logger",(0,s.ZP)("EngineProvider")),(0,o.Z)(w,"_engineProviders",{}),S.isSupported()&&w.register(S.id,S);var C=w.register,x=w.unRegister},488:function(e,t,n){"use strict";n.d(t,{r:function(){return r}});var r={HTML5:"html5",FLASH:"flash",SILVERLIGHT:"silverlight",CAST:"cast",YOUTUBE:"youtube",IMAGE:"image",DOCUMENT:"document"}},6145:function(e,t,n){"use strict";n.d(t,{X:function(){return r}});var r={ANONYMOUS:"anonymous",USE_CREDENTIALS:"use-credentials"}},4651:function(e,t,n){"use strict";n.d(t,{Z:function(){return E}});var r,i=n(5671),a=n(3144),o=n(7326),s=n(9340),l=n(2963),u=n(1120),c=n(4942),d=n(8987),p=n(8171),f=n(962),h=n(2114),y=n(4358),g=n(4877),v=n(7812),m=n(6462),b=n(4270),k=n(2983),E=function(e){(0,s.Z)(p,e);var t,n,r=(t=p,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,u.Z)(t);if(n){var i=(0,u.Z)(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return(0,l.Z)(this,e)});function p(e,t){var n,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return(0,i.Z)(this,p),n=r.call(this),(0,c.Z)((0,o.Z)(n),"_capabilities",{fpsControl:!1}),n._videoElement=e,n._sourceObj=t,n._config=a,n._onDurationChanged=function(){n.isLive()&&n._videoElement.paused&&n._trigger(h.Rk.TIME_UPDATE)},n._eventManager=new b.Q,n._handleLiveTimeUpdate(),n}return(0,a.Z)(p,[{key:"destroy",value:function(){return this._sourceObj=void 0,this._config={},this.disableNativeTextTracks(),this._videoElement.removeEventListener(h.Rk.DURATION_CHANGE,this._onDurationChanged),this._eventManager.destroy(),Promise.resolve()}},{key:"_onTrackChanged",value:function(e){e instanceof g.Z?(p._logger.debug("Video track changed",e),this._trigger(h.nQ.VIDEO_TRACK_CHANGED,{selectedVideoTrack:e})):e instanceof v.Z?(p._logger.debug("Audio track changed",e),this._trigger(h.nQ.AUDIO_TRACK_CHANGED,{selectedAudioTrack:e})):e instanceof m.ZP?(p._logger.debug("Text track changed",e),this._trigger(h.nQ.TEXT_TRACK_CHANGED,{selectedTextTrack:e})):e instanceof k.Z&&(p._logger.debug("Image track changed",e),this._trigger(h.nQ.IMAGE_TRACK_CHANGED,{selectedImageTrack:e}))}},{key:"_trigger",value:function(e,t){this.dispatchEvent(new d.v(e,t))}},{key:"applyTextTrackStyles",value:function(e,t,n,r){return p._throwNotImplementedError("applyTextTrackStyles")}},{key:"load",value:function(){return p._throwNotImplementedError("load")}},{key:"selectVideoTrack",value:function(e){return p._throwNotImplementedError("selectVideoTrack")}},{key:"selectAudioTrack",value:function(e){p._throwNotImplementedError("selectAudioTrack")}},{key:"selectTextTrack",value:function(e){p._throwNotImplementedError("selectTextTrack")}},{key:"selectImageTrack",value:function(e){}},{key:"hideTextTrack",value:function(){p._throwNotImplementedError("hideTextTrack")}},{key:"enableAdaptiveBitrate",value:function(){p._throwNotImplementedError("enableAdaptiveBitrate")}},{key:"isAdaptiveBitrateEnabled",value:function(){return p._throwNotImplementedError("isAdaptiveBitrateEnabled")}},{key:"applyABRRestriction",value:function(e){return p._throwNotImplementedError("applyABRRestriction")}},{key:"_getLiveEdge",value:function(){return p._throwNotImplementedError("_getLiveEdge")}},{key:"seekToLiveEdge",value:function(){p._throwNotImplementedError("seekToLiveEdge")}},{key:"isLive",value:function(){return p._throwNotImplementedError("isLive")}},{key:"isOnLiveEdge",value:function(){return 0===this.getSegmentDuration()||this.liveDuration-this._videoElement.currentTime<=2*this.getSegmentDuration()}},{key:"setMaxBitrate",value:function(e){}},{key:"attachMediaSource",value:function(){}},{key:"detachMediaSource",value:function(){}},{key:"_handleLiveTimeUpdate",value:function(){this._videoElement.addEventListener(h.Rk.DURATION_CHANGE,this._onDurationChanged)}},{key:"disableNativeTextTracks",value:function(){Array.from(this._videoElement.textTracks).forEach((function(e){m.ZP.isNativeTextTrack(e)&&!m.ZP.isExternalTrack(e)&&(e.mode=m.ZP.MODE.DISABLED)}))}},{key:"handleMediaError",value:function(e){return!1}},{key:"getStartTimeOfDvrWindow",value:function(){return p._throwNotImplementedError("getStartTimeOfDvrWindow")}},{key:"getThumbnail",value:function(e){return null}},{key:"getSegmentDuration",value:function(){return p._throwNotImplementedError("getSegmentDuration")}},{key:"liveDuration",get:function(){return p._throwNotImplementedError("liveDuration")}},{key:"src",get:function(){return this._loadPromise&&this._sourceObj?this._sourceObj.url:""},set:function(e){!this._loadPromise&&this._sourceObj&&(this._sourceObj.url=e)}},{key:"capabilities",get:function(){return this._capabilities}},{key:"targetBuffer",get:function(){return NaN}},{key:"getDrmInfo",value:function(){return null}},{key:"setCachedUrls",value:function(e){}}],[{key:"isSupported",value:function(){return!0}},{key:"isMSESupported",value:function(){var e=window.MediaSource||window.WebKitMediaSource;return!!e&&"function"==typeof e.isTypeSupported}},{key:"canPlayType",value:function(e,t){return p._throwNotImplementedError("static canPlayType")}},{key:"_throwNotImplementedError",value:function(e){throw new f.Z(f.Z.Severity.CRITICAL,f.Z.Category.PLAYER,f.Z.Code.RUNTIME_ERROR_METHOD_NOT_IMPLEMENTED,e)}}]),p}(p.H);r=E,(0,c.Z)(E,"id","BaseAdapter"),(0,c.Z)(E,"getLogger",y.ZP),(0,c.Z)(E,"_logger",r.getLogger(r.id))},2588:function(e,t,n){"use strict";n.d(t,{Z:function(){return B},L:function(){return F}});var r=n(5671),i=n(3144),a=n(4942),o=n(3433),s=n(7326),l=n(1752),u=n(9340),c=n(2963),d=n(1120),p=n(2114),f=n(4877),h=n(7812),y=n(6462),g=n(6975),v=n(4651);function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var b,k=n(1177),E=n(4821),_=n(7237),T=n(4358),A=(0,T.ZP)("FairPlay"),S=function(){function e(){(0,r.Z)(this,e)}return(0,i.Z)(e,null,[{key:"isConfigured",value:function(e,t){return _.J.FAIRPLAY===t.keySystem&&!!e.find((function(e){return e.scheme===t.keySystem}))}},{key:"canPlayDrm",value:function(e){var t=e.some((function(e){return e.scheme===_.J.FAIRPLAY}))&&!!window.WebKitMediaKeys;return A.debug("Can play DRM scheme of: ".concat(_.J.FAIRPLAY," is ").concat(t.toString())),t}},{key:"setDrmPlayback",value:function(e,t){A.debug("Sets drm playback");var n=t.find((function(e){return e.scheme===_.J.FAIRPLAY}));n&&(e.licenseUrl=n.licenseUrl,e.certificate=n.certificate)}}]),e}(),w=n(2069),C=n(962),x=JSON.parse('{"heartbeatTimeout":30000}'),P=n(9439),R=n(4270),I="com.apple.fps.1_0",D={NEED_KEY:"webkitneedkey",KEY_MESSAGE:"webkitkeymessage",KEY_ADDED:"webkitkeyadded",KEY_ERROR:"webkitkeyerror"},O=function(){function e(t,n,i,o){var s=this;(0,r.Z)(this,e),(0,a.Z)(this,"_logger",(0,T.ZP)("FairPlayDrmHandler")),(0,a.Z)(this,"_retryLicenseRequest",4),(0,a.Z)(this,"_defaultConfig",{licenseUrl:"",certificate:"",network:{responseFilter:function(t,n){var r={};try{var i=new DataView(n.data),a=(new TextDecoder).decode(i).trim();r=JSON.parse(a)}catch(e){return void s._onError(C.Z.Code.BAD_FAIRPLAY_RESPONSE,{error:e,responseText:n.data})}var o=e._validateResponse(r);o.valid?n.data=e._base64DecodeUint8Array(r.ckc):s._onError(C.Z.Code.BAD_FAIRPLAY_RESPONSE,o)}}}),this._config=E.c7.mergeDeep({},this._defaultConfig,n),this._errorCallback=i,this._drmResponseCallback=o,this._videoElement=t,this._onWebkitNeedKeyHandler=function(e){return s._onWebkitNeedKey(e)},this._eventManager=new R.Q,this._eventManager.listen(this._videoElement,D.NEED_KEY,this._onWebkitNeedKeyHandler)}return(0,i.Z)(e,[{key:"_onWebkitNeedKey",value:function(t){var n=this;this._logger.debug("Webkit need key triggered");var r=t.target,i=t.initData,a=e._extractContentId(i),o=e._base64DecodeUint8Array(this._config.certificate);if(i=e._concatInitDataIdAndCertificate(i,a,o),!r.webkitKeys){var s=this._selectKeySystem();this._logger.debug("Sets media keys"),r.webkitSetMediaKeys(new WebKitMediaKeys(s))}r.webkitKeys||this._onError(C.Z.Code.COULD_NOT_CREATE_MEDIA_KEYS),this._logger.debug("Creates session"),this._keySession=r.webkitKeys.createSession("video/mp4",i),this._keySession||this._onError(C.Z.Code.COULD_NOT_CREATE_KEY_SESSION),this._keySession.contentId=a,this._eventManager.listen(this._keySession,D.KEY_MESSAGE,(function(e){return n._onWebkitKeyMessage(e)})),this._eventManager.listen(this._keySession,D.KEY_ADDED,(function(){return n._onWebkitKeyAdded()})),this._eventManager.listen(this._keySession,D.KEY_ERROR,(function(e){return n._onWebkitKeyError(e)}))}},{key:"getDrmInfo",value:function(){var e=this._config;return{certificate:e.certificate,licenseUrl:e.licenseUrl,scheme:_.J.FAIRPLAY}}},{key:"destroy",value:function(){this._eventManager.destroy(),this._keySession.close(),this._keySession=null}},{key:"_onWebkitKeyMessage",value:function(t){var n=this;this._logger.debug("Webkit key message triggered");var r=t.message,i=new XMLHttpRequest;i.responseType="arraybuffer",this._eventManager.listenOnce(i,"load",(function(e){return n._licenseRequestLoaded(e)}));var a,o={url:this._config.licenseUrl,body:e._base64EncodeUint8Array(r),headers:{}},s=this._config.network.requestFilter;if(s){this._logger.debug("Apply request filter");try{a=s(g.x.LICENSE,o)}catch(e){a=Promise.reject(e)}}(a=a||Promise.resolve(o)).then((function(e){i.open("POST",e.url,!0);var t=!0;e.headers&&Object.entries(e.headers).forEach((function(e){var n=(0,P.Z)(e,2),r=n[0],a=n[1];"string"==typeof a&&i.setRequestHeader(r,a),t&&(t="content-type"!==r.toLowerCase())})),"boolean"==typeof e.withCredentials&&(i.withCredentials=e.withCredentials),t&&i.setRequestHeader("Content-type","application/json"),n._logger.debug("Ready for license request"),i.onerror=function(){n._onError(C.Z.Code.LICENSE_REQUEST_FAILED,{status:i.status,responseText:i.responseText})},n._licenseRequestTime=Date.now(),i.send(e.body)})).catch((function(e){n._errorCallback(new C.Z(C.Z.Severity.CRITICAL,C.Z.Category.NETWORK,C.Z.Code.REQUEST_FILTER_ERROR,e)),n.destroy()}))}},{key:"_onWebkitKeyAdded",value:function(){this._logger.debug("Decryption key was added to session")}},{key:"_onWebkitKeyError",value:function(e){this._logger.error("A decryption key error was encountered",e),this._retryLicenseRequest<=0&&this._onError(C.Z.Code.LICENSE_REQUEST_FAILED,e.target.error),this._retryLicenseRequest--}},{key:"_licenseRequestLoaded",value:function(e){var t=this;this._logger.debug("License request loaded");var n=e.target;if(n.status>299)this._onError(C.Z.Code.LICENSE_REQUEST_FAILED,{status:n.status,error:n.responseText});else{if(this._drmResponseCallback){var r=Date.now()-this._licenseRequestTime;this._drmResponseCallback({licenseTime:r/1e3,scheme:_.J.FAIRPLAY})}var i,a=n.responseURL,o=n.response,s={url:a,originalUrl:this._config.licenseUrl,data:o,headers:E.eV.convertHeadersToDictionary(n.getAllResponseHeaders())};this._logger.debug("Apply response filter");try{i=this._config.network.responseFilter(g.x.LICENSE,s)}catch(e){i=Promise.reject(e)}(i=i||Promise.resolve(s)).then((function(e){t._keySession.update(e.data)})).catch((function(e){t._errorCallback(new C.Z(C.Z.Severity.CRITICAL,C.Z.Category.NETWORK,C.Z.Code.RESPONSE_FILTER_ERROR,e)),t.destroy()}))}}},{key:"_onError",value:function(e,t){this._errorCallback(new C.Z(C.Z.Severity.CRITICAL,C.Z.Category.DRM,e,t))}},{key:"_selectKeySystem",value:function(){var e=null;return WebKitMediaKeys.isTypeSupported(I,"video/mp4")?e=I:this._logger.warn("Key System not supported"),e}}],[{key:"_validateResponse",value:function(e){return e.message&&e.message.indexOf("error")>0||null===e.reference||500===e.status_code?{valid:!1,details:"internal server error"}:""===e.ckc?{valid:!1,details:"ckc is missing"}:{valid:!0}}},{key:"_extractContentId",value:function(t){var n=document.createElement("a");return n.href=e._arrayToString(t),n.hostname}},{key:"_arrayToString",value:function(e){return String.fromCharCode.apply(null,new Uint16Array(e.buffer))}},{key:"_base64DecodeUint8Array",value:function(e){for(var t=window.atob(e),n=t.length,r=new Uint8Array(new ArrayBuffer(n)),i=0;i<n;i++)r[i]=t.charCodeAt(i);return r}},{key:"_concatInitDataIdAndCertificate",value:function(t,n,r){"string"==typeof n&&(n=e._stringToArray(n));var i=0,a=new ArrayBuffer(t.byteLength+4+n.byteLength+4+r.byteLength),o=new DataView(a);new Uint8Array(a,i,t.byteLength).set(t),i+=t.byteLength,o.setUint32(i,n.byteLength,!0),i+=4;var s=new Uint8Array(a,i,n.byteLength);return s.set(n),i+=s.byteLength,o.setUint32(i,r.byteLength,!0),i+=4,new Uint8Array(a,i,r.byteLength).set(r),new Uint8Array(a,0,a.byteLength)}},{key:"_stringToArray",value:function(e){for(var t=new ArrayBuffer(2*e.length),n=new Uint16Array(t),r=0,i=e.length;r<i;r++)n[r]=e.charCodeAt(r);return n}},{key:"_base64EncodeUint8Array",value:function(e){for(var t,n,r,i,a,o,s,l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",u="",c=0;c<e.length;)i=(t=e[c++])>>2,a=(3&t)<<4|(n=c<e.length?e[c++]:Number.NaN)>>4,o=(15&n)<<2|(r=c<e.length?e[c++]:Number.NaN)>>6,s=63&r,isNaN(n)?o=s=64:isNaN(r)&&(s=64),u+=l.charAt(i)+l.charAt(a)+l.charAt(o)+l.charAt(s);return u}}]),e}();function L(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return M(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?M(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}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 a,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function M(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}(0,a.Z)(O,"WebkitEvents",D),O.WebkitEvents=D;var N="playkit-native-text",U=function(e){(0,u.Z)(b,e);var t,n,v=(t=b,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,d.Z)(t);if(n){var i=(0,d.Z)(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return(0,c.Z)(this,e)});function b(e,t,n){var i;return(0,r.Z)(this,b),i=v.call(this,e,t,n),(0,a.Z)((0,s.Z)(i),"_lastTimeUpdate",0),(0,a.Z)((0,s.Z)(i),"_waitingEventTriggered",!1),(0,a.Z)((0,s.Z)(i),"_segmentDuration",0),(0,a.Z)((0,s.Z)(i),"_startTimeOfDvrWindow",0),(0,a.Z)((0,s.Z)(i),"_mediaErrorRecoveryAttempts",0),(0,a.Z)((0,s.Z)(i),"_lastTimeDetach",NaN),(0,a.Z)((0,s.Z)(i),"_startTimeAttach",NaN),(0,a.Z)((0,s.Z)(i),"_nativeTextTracksMap",{}),(0,a.Z)((0,s.Z)(i),"_captionsHidden",!1),b._logger.debug("Creating adapter"),i._config=E.c7.mergeDeep({},x,i._config),i._progressiveSources=n.progressiveSources,i._liveEdge=0,i._setStarTimeOfDvrWindowInterval(),i}return(0,i.Z)(b,[{key:"_dispatchErrorCallback",value:function(e){this._trigger(p.Rk.ERROR,e)}},{key:"_dispatchDRMLicenseLoaded",value:function(e){this._trigger(p.nQ.DRM_LICENSE_LOADED,e)}},{key:"_maybeSetDrmPlayback",value:function(){var e=this;if(b._drmProtocol&&this._sourceObj&&this._sourceObj.drmData){var t={licenseUrl:"",certificate:"",network:this._config.network};b._drmProtocol.setDrmPlayback(t,this._sourceObj.drmData),this._drmHandler=new O(this._videoElement,t,(function(t){return e._dispatchErrorCallback(t)}),(function(t){return e._dispatchDRMLicenseLoaded(t)}))}}},{key:"_setProgressiveSource",value:function(){var e=function(e,t,n){var r=null;if(n&&e){var i,a=[],o=1/0,s=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return m(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?m(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}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 a,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}(e);try{for(s.s();!(i=s.n()).done;){var l=i.value,u=Math.abs(l.width-t);u<o?(o=u,a=[l]):u===o&&a.push(l)}}catch(e){s.e(e)}finally{s.f()}for(var c=t/n,d=a,p=1/0,f=0,h=a;f<h.length;f++){var y=h[f];if(y.height){var g=Math.abs(y.width/y.height-c);g<p?(p=g,d=[y]):g===p&&d.push(y)}}for(var v=0,b=0,k=d;b<k.length;b++){var E=k[b];(E.bandwidth>v||!E.bandwidth)&&(v=E.bandwidth||v,r=E)}}return r}(this._progressiveSources,this._videoElement.offsetWidth,this._videoElement.offsetHeight);e&&(this._sourceObj=e)}},{key:"_isProgressivePlayback",value:function(){return!!this._sourceObj&&b._progressiveMimeTypes.includes(this._sourceObj.mimetype.toLowerCase())}},{key:"load",value:function(e){var t=this;return this._maybeSetDrmPlayback(),this._loadPromise||(this._loadPromise=new Promise((function(n,r){t._lastTimeUpdate=e||0;var i="number"==typeof e?e:-1,a=t._startTimeAttach||i;t._loadPromiseReject=r,t._eventManager.listenOnce(t._videoElement,p.Rk.LOADED_DATA,(function(){return t._onLoadedData(n,a)})),t._eventManager.listenOnce(t._videoElement,p.Rk.PLAYING,(function(){return t._onPlaying(a)})),t._eventManager.listen(t._videoElement,p.Rk.TIME_UPDATE,(function(){return t._onTimeUpdate()})),t._eventManager.listen(t._videoElement,p.Rk.PLAY,(function(){return t._resetHeartbeatTimeout()})),t._eventManager.listen(t._videoElement,p.Rk.PAUSE,(function(){return t._clearHeartbeatTimeout()})),t._eventManager.listen(t._videoElement,p.Rk.ENDED,(function(){return t._clearHeartbeatTimeout()})),t._eventManager.listen(t._videoElement,p.Rk.ABORT,(function(){return t._clearHeartbeatTimeout()})),t._eventManager.listen(t._videoElement,p.Rk.SEEKED,(function(){return t._syncCurrentTime()})),t._eventManager.listen(t._videoElement,p.Rk.WAITING,(function(){return t._waitingEventTriggered=!0})),t._eventManager.listen(t._videoElement,p.Rk.PLAYING,(function(){return t._waitingEventTriggered=!1})),t._eventManager.listen(window,"focus",(function(){setTimeout((function(){w.Z.isIOS&&(t._videoElement.currentTime=t._videoElement.currentTime>.1?t._videoElement.currentTime-.1:0),t._syncCurrentTime()}),1e3)})),t._isProgressivePlayback()&&t._setProgressiveSource(),t._sourceObj&&t._sourceObj.url?t._setSrc().then((function(){t._trigger(p.nQ.ABR_MODE_CHANGED,{mode:t._isProgressivePlayback()?"manual":"auto"}),t._videoElement.load()})):t._videoElement.load()}))),this._loadPromise}},{key:"_handleDecodeError",value:function(e){var t=this;b._logger.debug("handleDecodeError",e);var n=this._videoElement.currentTime,r=this._getActivePKAudioTrack(),i=this._getActivePKTextTrack();this._videoElement.load(),this._eventManager.listenOnce(this._videoElement,p.Rk.PLAYING,(function(){t._mediaErrorRecoveryAttempts=0})),this._eventManager.listenOnce(this._videoElement,p.Rk.CAN_PLAY,(function(){b._logger.debug("CAN_PLAY"),t._videoElement.currentTime=n,t._videoElement.play(),t._videoElement.pause(),r&&t.selectAudioTrack(r),i?t.selectTextTrack(i):t.disableNativeTextTracks()}))}},{key:"handleMediaError",value:function(e){return this._loadPromiseReject?(this._loadPromiseReject(new C.Z(C.Z.Severity.CRITICAL,C.Z.Category.MEDIA,C.Z.Code.NATIVE_ADAPTER_LOAD_FAILED,e)),!0):!!(e&&e.code===MediaError.MEDIA_ERR_DECODE&&(this._mediaErrorRecoveryAttempts++,this._mediaErrorRecoveryAttempts<=3))&&(this._handleDecodeError(e),!0)}},{key:"attachMediaSource",value:function(){this._startTimeAttach=this._lastTimeDetach,this._lastTimeDetach=NaN}},{key:"detachMediaSource",value:function(){this._lastTimeDetach=this._videoElement.currentTime,this._videoElement&&this._videoElement.src&&(E.is.setAttribute(this._videoElement,"src",""),E.is.removeAttribute(this._videoElement,"src")),this._loadPromise=void 0}},{key:"_setSrc",value:function(){var e,t=this,n={url:this._sourceObj?this._sourceObj.url:"",body:null,headers:{}};if("function"==typeof E.c7.getPropertyPath(this._config,"network.requestFilter"))try{b._logger.debug("Apply request filter"),e=this._config.network.requestFilter(g.x.MANIFEST,n)}catch(t){e=Promise.reject(t)}return(e=e||Promise.resolve(n)).then((function(e){if(t._config.useSourceTag){var n,r=document.createElement("source"),i=(null===(n=t._sourceObj)||void 0===n?void 0:n.mimetype.toLowerCase())||"";if(r.setAttribute("src",e.url),r.setAttribute("type",i),t._config.useMediaOptionAttribute){var a={};if(t._config.mediaOptionAttribute&&(a=t._config.mediaOptionAttribute),t._config.abrEwmaDefaultEstimate){var o={start:t._config.abrEwmaDefaultEstimate};E.c7.createPropertyPath(a,"option.adaptiveStreaming.bps",o)}b._logger.debug("Setting mediaOption -",a);var s=encodeURI(JSON.stringify(a));r.setAttribute("type",i+";mediaOption="+s)}t._videoElement.appendChild(r)}else t._videoElement.src=e.url})).catch((function(e){t._trigger(p.Rk.ERROR,new C.Z(C.Z.Severity.CRITICAL,C.Z.Category.NETWORK,C.Z.Code.REQUEST_FILTER_ERROR,e))})),e}},{key:"_onPlaying",value:function(e){this.isLive()&&this._setStartTime(e)}},{key:"_onLoadedData",value:function(e,t){var n=this,r=function(){n._playerTracks=n._getParsedTracks(),n._addNativeAudioTrackChangeListener(),n._addNativeTextTrackChangeListener(),n._addNativeTextTrackAddedListener(),b._logger.debug("The source has been loaded successfully"),n._loadPromiseReject=void 0,e({tracks:n._playerTracks}),n.isLive()&&n._handleLiveDurationChange()};void 0!==t&&t>-1&&(this._videoElement.currentTime=t),this._videoElement.textTracks.length>0?r():this._eventManager.listenOnce(this._videoElement,p.Rk.CAN_PLAY,r.bind(this)),this._startTimeAttach=NaN}},{key:"_setStartTime",value:function(e){"number"==typeof e&&e>-1&&(this._videoElement.currentTime=e)}},{key:"_onTimeUpdate",value:function(){this._videoElement.paused||(this._videoElement.currentTime>this._lastTimeUpdate?(this._waitingEventTriggered&&(this._waitingEventTriggered=!1,this._trigger(p.Rk.PLAYING)),this._resetHeartbeatTimeout()):this._videoElement.currentTime<this._lastTimeUpdate?this._syncCurrentTime():(this._waitingEventTriggered=!0,this._trigger(p.Rk.WAITING))),this._handleVideoTracksChange()}},{key:"_syncCurrentTime",value:function(){this._lastTimeUpdate=this._videoElement.currentTime}},{key:"_resetHeartbeatTimeout",value:function(){var e=this;this._lastTimeUpdate=this._videoElement.currentTime,this._clearHeartbeatTimeout(),this._heartbeatTimeoutId=setTimeout((function(){e._clearHeartbeatTimeout(),e._trigger(p.Rk.ERROR,new C.Z(C.Z.Severity.CRITICAL,C.Z.Category.NETWORK,C.Z.Code.TIMEOUT,"The player exceeded max buffer time of ".concat(e._config.heartbeatTimeout," ms. No progress has been done during this time.")))}),this._config.heartbeatTimeout)}},{key:"_clearHeartbeatTimeout",value:function(){this._heartbeatTimeoutId&&(clearTimeout(this._heartbeatTimeoutId),this._heartbeatTimeoutId=void 0)}},{key:"_handleVideoTracksChange",value:function(){if(!this._isProgressivePlayback()){var e=this._videoElement,t=e.videoHeight,n=e.videoWidth,r=e.videoTracks;if(!this._videoDimensions||t!==this._videoDimensions.videoHeight||n!==this._videoDimensions.videoWidth){this._videoDimensions={videoHeight:t,videoWidth:n};var i={language:"",height:t,width:n,active:!0,index:Array.from(r).findIndex((function(e){return e.selected}))};this._onTrackChanged(new f.Z(i))}}}},{key:"destroy",value:function(){var e=this;return b._logger.debug("destroy"),new Promise((function(t,n){e._maybeRemoveSourceTag(),(0,l.Z)((0,d.Z)(b.prototype),"destroy",e).call(e).then((function(){e._videoElement.classList.remove(N),e._drmHandler&&e._drmHandler.destroy(),e._waitingEventTriggered=!1,e._progressiveSources=[],e._loadPromise=void 0,e._nativeTextTracksMap={},e._loadPromiseReject=void 0,e._liveEdge=0,e._lastTimeUpdate=0,e._lastTimeDetach=NaN,e._startTimeAttach=NaN,e._videoDimensions=void 0,e._clearHeartbeatTimeout(),clearInterval(e._startTimeOfDvrWindowInterval),e._liveDurationChangeInterval&&(clearInterval(e._liveDurationChangeInterval),e._liveDurationChangeInterval=void 0),t()}),(function(){return n}))}))}},{key:"_maybeRemoveSourceTag",value:function(){if(this._config.useSourceTag&&this._videoElement){var e=this._videoElement.firstChild;e&&(e.setAttribute("src",""),e.removeAttribute("src"),this._videoElement.removeChild(e))}}},{key:"_getParsedTracks",value:function(){var e=this._getParsedVideoTracks(),t=this._getParsedAudioTracks(),n=this._getParsedTextTracks();return[].concat((0,o.Z)(e),(0,o.Z)(t),(0,o.Z)(n))}},{key:"_getParsedVideoTracks",value:function(){return this._isProgressivePlayback()?this._getParsedProgressiveVideoTracks():this._getParsedAdaptiveVideoTracks()}},{key:"_getParsedProgressiveVideoTracks",value:function(){var e=this._progressiveSources,t=[];if(e)for(var n=0;n<e.length;n++){var r={id:e[n].id,bandwidth:e[n].bandwidth,width:e[n].width,height:e[n].height,active:!!this._sourceObj&&e[n].id===this._sourceObj.id,index:n};t.push(new f.Z(r))}return t}},{key:"_getParsedAdaptiveVideoTracks",value:function(){var e=this._videoElement.videoTracks,t=[];if(e)for(var n=0;n<e.length;n++){var r={id:e[n].id,active:e[n].selected,label:e[n].label,language:e[n].language,index:n};t.push(new f.Z(r))}return t}},{key:"_getParsedAudioTracks",value:function(){var e=this._videoElement.audioTracks,t=[];if(e)for(var n=0;n<e.length;n++){var r={id:e[n].id,active:e[n].enabled,label:e[n].label,language:e[n].language,index:n};t.push(new h.Z(r))}return t}},{key:"_getParsedTextTracks",value:function(){var e=[this._config.captionsTextTrack1Label,this._config.captionsTextTrack2Label],t=[this._config.captionsTextTrack1LanguageCode,this._config.captionsTextTrack2LanguageCode],n=this._videoElement.textTracks,r=[];if(n){for(var i=0;i<n.length;i++)if(!y.ZP.isExternalTrack(n[i])){var a={kind:n[i].kind,active:n[i].mode===y.ZP.MODE.SHOWING,label:n[i].label,language:n[i].language,available:!0};if(a.kind===y.ZP.KIND.SUBTITLES){var o=new y.ZP(a);r.push(o),this._nativeTextTracksMap[o.index]=n[i]}else if(a.kind===y.ZP.KIND.CAPTIONS&&this._config.enableCEA708Captions){a.label=a.label||e.shift(),a.language=a.language||t.shift(),a.available=this._captionsHidden;var s=new y.ZP(a);r.push(s),this._nativeTextTracksMap[s.index]=n[i]}}this._captionsHidden||this._maybeShow708Captions()}return r}},{key:"_maybeShow708Captions",value:function(){var e=this,t=Array.from(this._videoElement.textTracks).filter((function(e){return e.kind===y.ZP.KIND.CAPTIONS})),n=t.find((function(e){return e.mode===y.ZP.MODE.SHOWING||e.mode===y.ZP.MODE.HIDDEN}))||t[0];n&&(n.mode=y.ZP.MODE.HIDDEN,this._captionsHidden=!0,this._eventManager.listenOnce(n,"cuechange",(function(){e._getPKTextTracks().forEach((function(e){return(e.available=!0)&&(e.mode=y.ZP.MODE.DISABLED)})),e._trigger(p.nQ.TRACKS_CHANGED,{tracks:e._playerTracks})})))}},{key:"selectVideoTrack",value:function(e){this._isProgressivePlayback()?this._selectProgressiveVideoTrack(e):this.selectAdaptiveVideoTrack(e)}},{key:"_selectProgressiveVideoTrack",value:function(e){var t=this,n=this._progressiveSources;if(e instanceof f.Z&&n&&n[e.index]){var r=this._videoElement.currentTime,i=this._videoElement.paused;e.active=!0,this._sourceObj=n[e.index],this._eventManager.listenOnce(this._videoElement,p.Rk.LOADED_DATA,(function(){"Android Browser"===w.Z.browser.name?(t._eventManager.listenOnce(t._videoElement,p.Rk.DURATION_CHANGE,(function(){t._videoElement.currentTime=r})),t._eventManager.listenOnce(t._videoElement,p.Rk.SEEKED,(function(){t._onTrackChanged(e),i&&t._videoElement.pause()})),t._videoElement.play()):(t._eventManager.listenOnce(t._videoElement,p.Rk.SEEKED,(function(){t._onTrackChanged(e)})),t._videoElement.currentTime=r,i||t._videoElement.play())})),this._setSrc()}}},{key:"selectAdaptiveVideoTrack",value:function(e){var t=this._videoElement.videoTracks;e instanceof f.Z&&t&&t[e.index]&&(this._disableVideoTracks(),t[e.index].selected=!0,this._onTrackChanged(e))}},{key:"selectAudioTrack",value:function(e){b._logger.debug("selectAudioTrack");var t=this._videoElement.audioTracks;e instanceof h.Z&&t&&t[e.index]&&(this._removeNativeAudioTrackChangeListener(),this._switchAudioTrack(e.index),this._onTrackChanged(e),this._addNativeAudioTrackChangeListener())}},{key:"_removeNativeAudioTrackChangeListener",value:function(){this._videoElement.audioTracks&&this._eventManager.unlisten(this._videoElement.audioTracks,"change")}},{key:"_addNativeAudioTrackChangeListener",value:function(){var e=this;this._videoElement.audioTracks&&this._eventManager.listen(this._videoElement.audioTracks,"change",(function(){return e._onNativeAudioTrackChange()}))}},{key:"_getPKAudioTracks",value:function(){return this._playerTracks.filter((function(e){return e instanceof h.Z}))}},{key:"_getActivePKAudioTrack",value:function(){return this._getPKAudioTracks().find((function(e){return!0===e.active}))}},{key:"_onNativeAudioTrackChange",value:function(){var e=this,t=function(){for(var t=0;t<e._videoElement.audioTracks.length;t++)if(e._videoElement.audioTracks[t].enabled)return t;return-1}(),n=this._getActivePKAudioTrack(),r=n?n.index:-1;if(t!==r){var i=this._getPKAudioTracks().find((function(e){return e.index===t}));i&&(b._logger.debug("Native selection of track, update the player audio track ("+r+" -> "+t+")"),this._onTrackChanged(i))}}},{key:"selectTextTrack",value:function(e){if(e instanceof y.ZP&&y.ZP.isNativeTextTrack(e)){this._removeNativeTextTrackChangeListener();var t=this._nativeTextTracksMap[e.index];t&&(this.disableNativeTextTracks(),t.mode=this._getDisplayTextTrackModeString(),this._onTrackChanged(e),this._addNativeTextTrackChangeListener())}}},{key:"_removeNativeTextTrackChangeListener",value:function(){this._videoElement.textTracks&&this._eventManager.unlisten(this._videoElement.textTracks,"change")}},{key:"_addNativeTextTrackChangeListener",value:function(){var e=this;this._videoElement.textTracks&&this._eventManager.listen(this._videoElement.textTracks,"change",(function(){return e._onNativeTextTrackChange()}))}},{key:"_getPKTextTracks",value:function(){return this._playerTracks.filter((function(e){return e instanceof y.ZP}))}},{key:"_getActivePKTextTrack",value:function(){return this._getPKTextTracks().find((function(e){return!0===e.active}))}},{key:"_onNativeTextTrackChange",value:function(){var e=this,t=this._getPKTextTracks(),n=t.find((function(e){return"off"===e.language})),r=function(){for(var t in e._nativeTextTracksMap)if(e._getDisplayTextTrackModeString()===e._nativeTextTracksMap[t].mode)return Number(t);return-1}(),i=this._getActivePKTextTrack(),a=i?i.index:-1;if(r!==a)if(-1===r)n&&(b._logger.debug("Native selection of track, update the player text track ("+a+" -> off)"),this._onTrackChanged(n));else{var o=t.find((function(e){return e.index===r}));o&&(b._logger.debug("Native selection of track, update the player text track ("+a+" -> "+r+")"),this._onTrackChanged(o))}}},{key:"_getDisplayTextTrackModeString",value:function(){return this._config.displayTextTrack?y.ZP.MODE.SHOWING:y.ZP.MODE.HIDDEN}},{key:"_addNativeTextTrackAddedListener",value:function(){var e=this;!this._config.displayTextTrack&&this._videoElement.textTracks&&this._eventManager.listen(this._videoElement.textTracks,"addtrack",(function(){return e._onNativeTextTrackAdded()}))}},{key:"_onNativeTextTrackAdded",value:function(){this._playerTracks=this._getParsedTracks(),this._trigger(p.nQ.TRACKS_CHANGED,{tracks:this._playerTracks})}},{key:"hideTextTrack",value:function(){this.disableNativeTextTracks()}},{key:"enableAdaptiveBitrate",value:function(){b._logger.warn("Enabling adaptive bitrate is not supported for native playback")}},{key:"isAdaptiveBitrateEnabled",value:function(){return!this._isProgressivePlayback()}},{key:"applyABRRestriction",value:function(e){E.c7.createPropertyPath(this._config,"abr.restrictions",e),this._maybeApplyAbrRestrictions(e)}},{key:"_maybeApplyAbrRestrictions",value:function(e){if(this._isProgressivePlayback()){var t=this._playerTracks.filter((function(e){return e instanceof f.Z})),n=(0,k.u)(t,e);!n.find((function(e){return e.active}))&&n.length?this.selectVideoTrack(n[0]):b._logger.warn("Invalid restrictions, there are not tracks within the restriction range")}}},{key:"_disableVideoTracks",value:function(){var e=this._videoElement.videoTracks;if(e)for(var t=0;t<e.length;t++)e[t].selected=!1}},{key:"_switchAudioTrack",value:function(e){b._logger.debug("_switchAudioTracks");var t=this._videoElement.audioTracks;if(t)for(var n=0;n<t.length;n++)t[n].enabled=n===e}},{key:"_getLiveEdge",value:function(){return this._videoElement.seekable.length?this._videoElement.seekable.end(this._videoElement.seekable.length-1):this._videoElement.buffered.length?this._videoElement.buffered.end(this._videoElement.buffered.length-1):this._videoElement.duration}},{key:"liveDuration",get:function(){return this._getLiveEdge()}},{key:"seekToLiveEdge",value:function(){try{this._videoElement.currentTime=this._getLiveEdge()}catch(e){return}}},{key:"getSegmentDuration",value:function(){return this._segmentDuration}},{key:"isLive",value:function(){return this._videoElement.duration===1/0}},{key:"_handleLiveDurationChange",value:function(){var e=this;this._liveDurationChangeInterval=setInterval((function(){e._calculateSegmentDuration();var t=e._getLiveEdge();e._liveEdge!==t&&(e._liveEdge=t,e._videoElement.dispatchEvent(new Event(p.Rk.DURATION_CHANGE)))}),1e3)}},{key:"_calculateSegmentDuration",value:function(){if(this._videoElement.seekable.length>0&&0===this._videoElement.seekable.start(0)){var e=this._videoElement,t=e.buffered,n=e.seekable;t.length&&n.length&&(this._segmentDuration=(t.end(t.length-1)-n.end(n.length-1))/3)}else{var r=this._getLiveEdge();this._liveEdge&&this._liveEdge!==r&&(this._segmentDuration=r-this._liveEdge)}}},{key:"_getStartTimeOfDvrWindow",value:function(){return this.isLive()&&this._videoElement.seekable.length?this._videoElement.seekable.start(0):0}},{key:"getStartTimeOfDvrWindow",value:function(){return this._startTimeOfDvrWindow}},{key:"_setStarTimeOfDvrWindowInterval",value:function(){var e=this;this._startTimeOfDvrWindowInterval=setInterval((function(){var t=e._segmentDuration;!e._waitingEventTriggered&&e._getStartTimeOfDvrWindow()&&t&&Math.abs(e._getStartTimeOfDvrWindow()-e._startTimeOfDvrWindow)<=2*t?e._startTimeOfDvrWindow+=1:e._startTimeOfDvrWindow=e._getStartTimeOfDvrWindow()}),1e3)}},{key:"getDrmInfo",value:function(){return this._drmHandler?this._drmHandler.getDrmInfo():null}}],[{key:"canPlayType",value:function(e){var t=!1;return"string"==typeof e&&(t=!!b.TEST_VIDEO.canPlayType(e.toLowerCase())),b._logger.debug("canPlayType result for mimeType:"+e+" is "+t.toString()),t}},{key:"canPlayDrm",value:function(e,t){b._drmProtocol=null;var n,r=L(b._drmProtocols);try{for(r.s();!(n=r.n()).done;){var i=n.value;if(i.isConfigured(e,t)){b._drmProtocol=i;break}}}catch(e){r.e(e)}finally{r.f()}if(!b._drmProtocol){var a,o=L(b._drmProtocols);try{for(o.s();!(a=o.n()).done;){var s=a.value;s.canPlayDrm(e)&&(b._drmProtocol=s)}}catch(e){o.e(e)}finally{o.f()}}return!!b._drmProtocol}},{key:"createAdapter",value:function(e,t,n){b._logger.debug("createAdapter");var r={displayTextTrack:!1,progressiveSources:[]};if(E.c7.hasPropertyPath(n,"text.useNativeTextTrack")&&(r.displayTextTrack=E.c7.getPropertyPath(n,"text.useNativeTextTrack")),!1!==r.displayTextTrack&&e.classList.add(N),E.c7.hasPropertyPath(n,"sources.progressive")&&(r.progressiveSources=E.c7.getPropertyPath(n,"sources.progressive")),E.c7.hasPropertyPath(n,"text")&&(r.enableCEA708Captions=n.text.enableCEA708Captions,r.captionsTextTrack1Label=n.text.captionsTextTrack1Label,r.captionsTextTrack1LanguageCode=n.text.captionsTextTrack1LanguageCode,r.captionsTextTrack2Label=n.text.captionsTextTrack2Label,r.captionsTextTrack2LanguageCode=n.text.captionsTextTrack2LanguageCode),E.c7.hasPropertyPath(n,"playback")&&E.c7.hasPropertyPath(n.playback,"options.html5.native")&&E.c7.mergeDeep(r,n.playback.options.html5.native),E.c7.hasPropertyPath(n,"abr")){var i=n.abr;i.defaultBandwidthEstimate&&(r.abrEwmaDefaultEstimate=i.defaultBandwidthEstimate),i.restrictions&&E.c7.createPropertyPath(r,"abr.restrictions",i.restrictions)}return r.network=n.network,new this(e,t,r)}}]),b}(v.Z);b=U,(0,a.Z)(U,"id","NativeAdapter"),(0,a.Z)(U,"_logger",v.Z.getLogger(b.id)),(0,a.Z)(U,"TEST_VIDEO",E.is.createElement("video")),(0,a.Z)(U,"_drmProtocols",[S]),(0,a.Z)(U,"_drmProtocol",null),(0,a.Z)(U,"_progressiveMimeTypes",["video/mp4","audio/mp3"]);var B=function(){function e(){(0,r.Z)(this,e)}return(0,i.Z)(e,null,[{key:"register",value:function(t){t&&(e._mediaSourceAdapters.includes(t)?e._logger.debug("Adapter <".concat(t.id,"> is already registered, do not register again")):(e._logger.debug("Adapter <".concat(t.id,"> has been registered successfully")),e._mediaSourceAdapters.push(t)))}},{key:"unRegister",value:function(t){var n=e._mediaSourceAdapters.indexOf(t);n>-1&&(e._logger.debug("Unregistered <".concat(t.id,"> adapter")),e._mediaSourceAdapters.splice(n,1))}},{key:"canPlaySource",value:function(t){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=arguments.length>2?arguments[2]:void 0;e._orderMediaSourceAdapters(n);var i=e._mediaSourceAdapters;if(t&&t.mimetype)for(var a=0;a<i.length;a++)if(i[a].canPlayType(t.mimetype)&&(!t.drmData||i[a].canPlayDrm(t.drmData,r)))return e._selectedAdapter=i[a],e._logger.debug("Selected adapter is <".concat(e._selectedAdapter.id,">")),!0;return!1}},{key:"_orderMediaSourceAdapters",value:function(t){e._mediaSourceAdapters=e._mediaSourceAdapters.filter((function(e){return"NativeAdapter"!==e.id})),t?e._mediaSourceAdapters.unshift(U):e._mediaSourceAdapters.push(U)}},{key:"getMediaSourceAdapter",value:function(t,n,r){return t&&n&&r?(e._selectedAdapter||e.canPlaySource(n,!0,r.drm),e._selectedAdapter?e._selectedAdapter.createAdapter(t,n,r):null):null}},{key:"destroy",value:function(){e._selectedAdapter=null}}]),e}();(0,a.Z)(B,"_logger",(0,T.ZP)("MediaSourceProvider")),(0,a.Z)(B,"_mediaSourceAdapters",[U]),(0,a.Z)(B,"_selectedAdapter",null);var F=B.register},7300:function(e,t,n){"use strict";n.d(t,{j:function(){return r}});var r={DASH:"dash",HLS:"hls",PROGRESSIVE:"progressive",IMAGE:"image",DOCUMENT:"document"}},8143:function(e,t,n){"use strict";n.d(t,{B:function(){return r}});var r={TRUE:!0,FALSE:!1,IN_VIEW:"inview"}},2806:function(e,t,n){"use strict";n.d(t,{D:function(){return r}});var r={VOD:"Vod",LIVE:"Live",AUDIO:"Audio",IMAGE:"Image",DOCUMENT:"Document",UNKNOWN:"Unknown"}},3336:function(e,t,n){"use strict";n.d(t,{H:function(){return r}});var r={HLS:["application/x-mpegurl","application/vnd.apple.mpegurl"],DASH:["application/dash+xml"],PROGRESSIVE:["video/mp4"],SMOOTH_STREAMING:["application/vnd.ms-sstr+xml"]}},6975:function(e,t,n){"use strict";n.d(t,{x:function(){return r}});var r={MANIFEST:0,SEGMENT:1,LICENSE:2}},3323:function(e,t,n){"use strict";n.d(t,{z:function(){return r}});var r={NONE:"none",ANY:"any",NATURAL:"natural",LANDSCAPE:"landscape",PORTRAIT:"portrait",PORTRAIT_PRIMARY:"portrait-primary",PORTRAIT_SECONDARY:"portrait-secondary",LANDSCAPE_PRIMARY:"landscape-primary",LANDSCAPE_SECONDARY:"landscape-secondary"}},962:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var r=n(3144),i=n(5671),a=n(4942),o=n(4358),s={UNSUPPORTED_SCHEME:1e3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,UNKNOWN_DATA_URI_ENCODING:1005,REQUEST_FILTER_ERROR:1006,RESPONSE_FILTER_ERROR:1007,LIVE_MANIFEST_REFRESH_ERROR:1008,INVALID_TEXT_HEADER:2e3,INVALID_TEXT_CUE:2001,UNABLE_TO_DETECT_ENCODING:2003,BAD_ENCODING:2004,INVALID_XML:2005,INVALID_MP4_TTML:2007,INVALID_MP4_VTT:2008,UNABLE_TO_CREATE_TEXT_CUE:2009,DASH_ADAPTER_ERROR_PARSE_ISSUE:2010,UNKNOWN_FILE_TYPE:2011,UNKNOWN_LANGUAGE:2012,INVALID_VTT_THUMBNAILS_FILE:2013,BUFFER_READ_OUT_OF_BOUNDS:3e3,JS_INTEGER_OVERFLOW:3001,EBML_OVERFLOW:3002,EBML_BAD_FLOATING_POINT_SIZE:3003,MP4_SIDX_WRONG_BOX_TYPE:3004,MP4_SIDX_INVALID_TIMESCALE:3005,MP4_SIDX_TYPE_NOT_SUPPORTED:3006,WEBM_CUES_ELEMENT_MISSING:3007,WEBM_EBML_HEADER_ELEMENT_MISSING:3008,WEBM_SEGMENT_ELEMENT_MISSING:3009,WEBM_INFO_ELEMENT_MISSING:3010,WEBM_DURATION_ELEMENT_MISSING:3011,WEBM_CUE_TRACK_POSITIONS_ELEMENT_MISSING:3012,WEBM_CUE_TIME_ELEMENT_MISSING:3013,MEDIA_SOURCE_OPERATION_FAILED:3014,MEDIA_SOURCE_OPERATION_THREW:3015,VIDEO_ERROR:3016,QUOTA_EXCEEDED_ERROR:3017,HLS_FATAL_MEDIA_ERROR:3018,HLS_FRAG_PARSING_ERROR:3019,HLS_BUFFER_APPEND_ISSUE:3020,HLS_BUFFER_APPENDING_ISSUE:3021,NATIVE_ADAPTER_LOAD_FAILED:3022,HLS_BUFFER_STALLED_ERROR:3023,UNABLE_TO_GUESS_MANIFEST_TYPE:4e3,DASH_INVALID_XML:4001,DASH_NO_SEGMENT_INFO:4002,DASH_EMPTY_ADAPTATION_SET:4003,DASH_EMPTY_PERIOD:4004,DASH_WEBM_MISSING_INIT:4005,DASH_UNSUPPORTED_CONTAINER:4006,DASH_PSSH_BAD_ENCODING:4007,DASH_NO_COMMON_KEY_SYSTEM:4008,DASH_MULTIPLE_KEY_IDS_NOT_SUPPORTED:4009,DASH_CONFLICTING_KEY_IDS:4010,UNPLAYABLE_PERIOD:4011,RESTRICTIONS_CANNOT_BE_MET:4012,NO_PERIODS:4014,HLS_PLAYLIST_HEADER_MISSING:4015,INVALID_HLS_TAG:4016,HLS_INVALID_PLAYLIST_HIERARCHY:4017,DASH_DUPLICATE_REPRESENTATION_ID:4018,HLS_MULTIPLE_MEDIA_INIT_SECTIONS_FOUND:4020,HLS_COULD_NOT_GUESS_MIME_TYPE:4021,HLS_MASTER_PLAYLIST_NOT_PROVIDED:4022,HLS_REQUIRED_ATTRIBUTE_MISSING:4023,HLS_REQUIRED_TAG_MISSING:4024,HLS_COULD_NOT_GUESS_CODECS:4025,HLS_KEYFORMATS_NOT_SUPPORTED:4026,DASH_UNSUPPORTED_XLINK_ACTUATE:4027,DASH_XLINK_DEPTH_LIMIT:4028,HLS_LIVE_CONTENT_NOT_SUPPORTED:4029,HLSJS_CANNOT_PARSE:4030,INVALID_STREAMS_CHOSEN:5005,NO_RECOGNIZED_KEY_SYSTEMS:6e3,REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE:6001,FAILED_TO_CREATE_CDM:6002,FAILED_TO_ATTACH_TO_VIDEO:6003,INVALID_SERVER_CERTIFICATE:6004,FAILED_TO_CREATE_SESSION:6005,FAILED_TO_GENERATE_LICENSE_REQUEST:6006,LICENSE_REQUEST_FAILED:6007,LICENSE_RESPONSE_REJECTED:6008,ENCRYPTED_CONTENT_WITHOUT_DRM_INFO:6010,NO_LICENSE_SERVER_GIVEN:6012,OFFLINE_SESSION_REMOVED:6013,EXPIRED:6014,BAD_FAIRPLAY_RESPONSE:6015,COULD_NOT_CREATE_MEDIA_KEYS:6016,COULD_NOT_CREATE_KEY_SESSION:6017,LOAD_INTERRUPTED:7e3,BITRATE_SWITCH_ISSUE:7001,LOAD_FAILED:7002,RUNTIME_ERROR_NOT_REGISTERED_PLUGIN:7003,RUNTIME_ERROR_METHOD_NOT_IMPLEMENTED:7004,RUNTIME_ERROR_NOT_VALID_HANDLER:7005,NO_SOURCE_PROVIDED:7006,NO_ENGINE_FOUND_TO_PLAY_THE_SOURCE:7007,ENTER_PICTURE_IN_PICTURE_FAILED:7008,EXIT_PICTURE_IN_PICTURE_FAILED:7009,PLUGIN_LOAD_FAILED:7010,CAST_API_UNAVAILABLE:8e3,NO_CAST_RECEIVERS:8001,ALREADY_CASTING:8002,UNEXPECTED_CAST_ERROR:8003,CAST_CANCELED_BY_USER:8004,CAST_CONNECTION_TIMED_OUT:8005,CAST_RECEIVER_APP_UNAVAILABLE:8006,STORAGE_NOT_SUPPORTED:9e3,INDEXED_DB_ERROR:9001,OPERATION_ABORTED:9002,REQUESTED_ITEM_NOT_FOUND:9003,MALFORMED_OFFLINE_URI:9004,CANNOT_STORE_LIVE_OFFLINE:9005,STORE_ALREADY_IN_PROGRESS:9006,NO_INIT_DATA_FOR_OFFLINE:9007,LOCAL_PLAYER_INSTANCE_REQUIRED:9008,CONTENT_UNSUPPORTED_BY_BROWSER:9009,CANNOT_ADD_ITEM:9010,DOWNLOAD_FAILED:9011,COULD_NOT_GET_INFO_FROM_MEDIA_PROVIDER:9012,ENTRY_DOES_NOT_EXIST:9013,PAUSE_FAILED:9014,RESUME_FAILED:9015,RENEW_LICENSE_FAILED:9016,ENTRY_ALREADY_EXISTS:9017,REMOVE_FAILED:9018,CAST_LOAD_MEDIA_FAILED:10001,CAST_CUSTOM_MESSAGE_PARSING_ERROR:10002,CAST_EDIT_TRACKS_INFO_ERROR:10003,VR_NOT_SUPPORTED:11e3};Object.assign(s,{XML_PARSING_ERROR:8100,VAST_SCHEMA_VALIDATION_ERROR:8101,VAST_RESPONSE_VERSION_NOT_SUPPORTED:8102,TRAFFICKING_ERROR:8200,VAST_UNEXPECTED_LINEARITY:8201,VAST_UNEXPECTED_DURATION_ERROR:8202,VAST_UNEXPECTED_SIZE_ERROR:8203,VAST_WRAPPER_ERROR:8300,VAST_URI_ERROR:8301,VAST_TOO_MANY_REDIRECTS:8302,NO_ADS_VAST_RESPONSE:8303,GENERAL_LINEAR_ERROR:8400,FILE_NOT_FOUND:8401,VAST_MEDIA_LOAD_TIMEOUT:8402,MEDIA_FILE_NOT_FOUND:8403,MEDIA_FILE_DISPLAY_ERROR:8405,MEZZANINE_FILE_NOT_PROVIDED:8406,MEZZANINE_DOWNLOADED_FOR_THE_FIRST_TIME:8407,VAST_RESPONSE_AD_REJECTED:8408,CREATIVE_WAS_NOT_EXECUTED:8409,CODE_REFERENCED_NOT_EXECUTED:8410,GENERAL_NON_LINEAR_AD_ERROR:8500,NON_LINEAR_CREATIVE_DIMENSIONS_NOT_ALIGN_ERROR:8501,NON_LINEAR_FETCH_ERROR:8502,NON_LINEAR_RESOURCE_NOT_FOUND:8503,GENERAL_COMPANION_ADS_ERROR:8600,COMPANION_DIMENSIONS_NOT_FIT:8601,COMPANION_CANNOT_BE_DISPLAY:8602,COMPANION_CANNOT_BE_FETCHED:8603,COMPANION_TYPE_NOT_FOUND:8604,AD_UNDEFINED_ERROR:8900,GENERAL_VPAID_ERROR:8901});var l="Error",u=(0,r.Z)((function e(t,n,r){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},s=arguments.length>4?arguments[4]:void 0;(0,i.Z)(this,e),this.severity=t,this.category=n,this.code=r,this.data=a,this.errorDetails=s||{},(0,o.ZO)(l)!==o.in.OFF&&e._logger.error("Category:".concat(n," | Code:").concat(r," |"),a)}));(0,a.Z)(u,"Severity",{RECOVERABLE:1,CRITICAL:2}),(0,a.Z)(u,"Category",{NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,ADS:8,STORAGE:9,CAST:10,VR:11,MEDIA_NOT_READY:12,GEO_LOCATION:13,MEDIA_UNAVAILABLE:14,IP_RESTRICTED:15}),(0,a.Z)(u,"Code",s),(0,a.Z)(u,"_logger",(0,o.ZP)(l))},4270:function(e,t,n){"use strict";n.d(t,{Q:function(){return s}});var r=n(5671),i=n(3144),a=n(7916);function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var s=function(){function e(){(0,r.Z)(this,e),this._bindingMap=new a.MultiMap}return(0,i.Z)(e,[{key:"destroy",value:function(){return this.removeAll(),this._bindingMap=null,Promise.resolve()}},{key:"listenOnce",value:function(e,t,n,r){var i=this;this.listen(e,t,(function r(a){i.unlisten(e,t,r),n.call(i,a)}),r)}},{key:"listen",value:function(e,t,n,r){var i=new l(e,t,n,r);this._bindingMap&&this._bindingMap.push(t,i)}},{key:"unlisten",value:function(e,t,n){if(this._bindingMap)for(var r=this._bindingMap.get(t),i=0;i<r.length;++i){var a=r[i];a.target!==e||a.listener!==n&&n||(a.unlisten(),this._bindingMap&&this._bindingMap.remove(t,a))}}},{key:"removeAll",value:function(){if(this._bindingMap){var e,t=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}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 a,s=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){l=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(l)throw a}}}}(this._bindingMap.getAll());try{for(t.s();!(e=t.n()).done;)e.value.unlisten()}catch(e){t.e(e)}finally{t.f()}this._bindingMap&&this._bindingMap.clear()}}}]),e}(),l=function(){function e(t,n,i,a){(0,r.Z)(this,e),this.target=t,this.type=n,this.listener=i,this.options=a,this.target.addEventListener(n,i,!1)}return(0,i.Z)(e,[{key:"unlisten",value:function(){this.target&&(this.target.removeEventListener(this.type,this.listener,this.options),this.target=null,this.listener=null,this.options=null)}}]),e}()},2114:function(e,t,n){"use strict";n.d(t,{Rk:function(){return s},nQ:function(){return l},tw:function(){return u}});var r=n(4942),i=n(4611);function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var s={ABORT:"abort",CAN_PLAY:"canplay",CAN_PLAY_THROUGH:"canplaythrough",DURATION_CHANGE:"durationchange",EMPTIED:"emptied",ENDED:"ended",ERROR:"error",LOADED_DATA:"loadeddata",LOADED_METADATA:"loadedmetadata",LOAD_START:"loadstart",PAUSE:"pause",PLAY:"play",PLAYING:"playing",PROGRESS:"progress",RATE_CHANGE:"ratechange",SEEKED:"seeked",SEEKING:"seeking",STALLED:"stalled",SUSPEND:"suspend",TIME_UPDATE:"timeupdate",VOLUME_CHANGE:"volumechange",WAITING:"waiting",ENTER_PICTURE_IN_PICTURE:"enterpictureinpicture",LEAVE_PICTURE_IN_PICTURE:"leavepictureinpicture",PRESENTATION_MODE_CHANGED:"webkitpresentationmodechanged"},l={MEDIA_LOADED:"medialoaded",PLAYER_RESET:"playerreset",PLAYER_DESTROY:"playerdestroy",ENTER_FULLSCREEN:"enterfullscreen",EXIT_FULLSCREEN:"exitfullscreen",PLAY_FAILED:"playfailed",AUTOPLAY_FAILED:"autoplayfailed",FALLBACK_TO_MUTED_AUTOPLAY:"fallbacktomutedautoplay",CHANGE_SOURCE_STARTED:"changesourcestarted",CHANGE_SOURCE_ENDED:"changesourceended",MUTE_CHANGE:"mutechange",VIDEO_TRACK_CHANGED:"videotrackchanged",AUDIO_TRACK_CHANGED:"audiotrackchanged",TEXT_TRACK_CHANGED:"texttrackchanged",IMAGE_TRACK_CHANGED:"imagetrackchanged",TEXT_TRACK_ADDED:"texttrackadded",TEXT_CUE_CHANGED:"textcuechanged",TRACKS_CHANGED:"trackschanged",ABR_MODE_CHANGED:"abrmodechanged",PLAYER_STATE_CHANGED:"playerstatechanged",PLAYBACK_START:"playbackstart",FIRST_PLAY:"firstplay",FIRST_PLAYING:"firstplaying",PLAYBACK_ENDED:"playbackended",SOURCE_SELECTED:"sourceselected",TEXT_STYLE_CHANGED:"textstylechanged",MEDIA_RECOVERED:"mediarecovered",VR_STEREO_MODE_CHANGED:"vrstereomodechanged",FPS_DROP:"fpsdrop",BOOKMARK_ERROR:"bookmarkerror",CONCURRENCY_LIMIT:"concurrencylimit",RESIZE:"resize",TIMED_METADATA:"timedmetadata",TIMED_METADATA_CHANGE:"timedmetadatachange",TIMED_METADATA_ADDED:"timedmetadataadded",FRAG_LOADED:"fragloaded",MANIFEST_LOADED:"manifestloaded",USER_GESTURE:"usergesture",DRM_LICENSE_LOADED:"drmlicenseloaded",SOURCE_URL_SWITCHED:"sourceurlswitched"},u=o(o(o({},s),l),i.J)},8171:function(e,t,n){"use strict";n.d(t,{H:function(){return s}});var r=n(5671),i=n(3144),a=n(7916),o=n(4358),s=function(){function e(){(0,r.Z)(this,e),this._listeners=new a.MultiMap,this.dispatchTarget=this,this.__logger=(0,o.jl)("FakeEventTarget")}return(0,i.Z)(e,[{key:"addEventListener",value:function(e,t){this._listeners.push(e,t)}},{key:"removeEventListener",value:function(e,t){this._listeners.remove(e,t)}},{key:"dispatchEvent",value:function(e){for(var t=this._listeners.get(e.type)||[],n=0;n<t.length;++n){e.target=this.dispatchTarget,e.currentTarget=this.dispatchTarget;var r=t[n];try{r.handleEvent?r.handleEvent(e):r.call(this,e)}catch(t){this.__logger.error("Error occurred when handling event: ".concat(e.type,"."),t)}if(e.stopped)break}return e.defaultPrevented}}]),e}()},8987:function(e,t,n){"use strict";n.d(t,{v:function(){return a}});var r=n(5671),i=n(3144),a=function(){function e(t,n){(0,r.Z)(this,e),this.bubbles=!1,this.cancelable=!1,this.defaultPrevented=!1,this.timeStamp=window.performance?window.performance.now():Date.now(),this.type=t,this.isTrusted=!1,this.currentTarget=null,this.target=null,this.stopped=!1,this.payload=n}return(0,i.Z)(e,[{key:"preventDefault",value:function(){}},{key:"stopImmediatePropagation",value:function(){this.stopped=!0}},{key:"stopPropagation",value:function(){}}]),e}()},902:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(5671),i=n(3144),a=function(){function e(){(0,r.Z)(this,e)}return(0,i.Z)(e,[{key:"callNext",value:function(e){e&&e()}}]),e}()},4649:function(e,t,n){"use strict";n.d(t,{Z:function(){return rt}});var r=n(9439),i=n(5671),a=n(3144),o=n(7326),s=n(9340),l=n(2963),u=n(1120),c=n(4942),d=n(2069),p=n(4270),f=n(4821),h=function(){function e(){(0,i.Z)(this,e),this._createEl()}return(0,a.Z)(e,[{key:"setSrc",value:function(e){e&&(this._posterUrl=e,f.is.setStyle(this._el,"background-image",'url("'.concat(this._posterUrl,'")')),this.hide())}},{key:"src",get:function(){return this._posterUrl}},{key:"getElement",value:function(){return this._el}},{key:"_createEl",value:function(){if(!this._el){var e=this._el=f.is.createElement("div");f.is.setAttribute(e,"id",f.RO.uniqueId(5)),f.is.setAttribute(e,"tabindex","-1")}}},{key:"_removeEl",value:function(){this._el&&f.is.removeChild(this._el.parentNode||void 0,this._el)}},{key:"show",value:function(){f.is.setStyle(this._el,"display","")}},{key:"hide",value:function(){f.is.setStyle(this._el,"display","none")}},{key:"reset",value:function(){this._posterUrl="",f.is.setStyle(this._el,"background-image","")}},{key:"destroy",value:function(){this.reset(),this._removeEl()}}]),e}(),y=n(8987),g=n(8171),v=n(2114),m=function(){function e(){(0,i.Z)(this,e)}return(0,a.Z)(e,null,[{key:"language",get:function(){var e;return(e=navigator.languages&&navigator.languages.length?navigator.languages[0]:navigator.language)&&e.match("-")&&(e=e.split("-")[0]),e}}]),e}(),b=n(4358),k=n(4919),E=n(9769),_=n(962),T=function(){function e(t){var n,r,a,o,s,l,u=this;(0,i.Z)(this,e),(0,c.Z)(this,"_transitions",(l={},(0,c.Z)(l,E.Y.IDLE,(n={},(0,c.Z)(n,v.Rk.LOAD_START,(function(){return u._updateState(E.Y.LOADING)})),(0,c.Z)(n,v.Rk.PLAY,(function(){return u._updateState(E.Y.BUFFERING)})),(0,c.Z)(n,v.Rk.SEEKED,(function(){return u._updateState(E.Y.PAUSED)})),n)),(0,c.Z)(l,E.Y.LOADING,(r={},(0,c.Z)(r,v.Rk.LOADED_METADATA,(function(){return u._updateState(E.Y.PAUSED)})),(0,c.Z)(r,v.Rk.ERROR,(function(e){return e.payload.severity===_.Z.Severity.CRITICAL&&u._updateState(E.Y.IDLE)})),(0,c.Z)(r,v.Rk.SEEKED,(function(){u._prevState&&u._prevState.type===E.Y.PLAYING&&u._updateState(E.Y.PLAYING)})),r)),(0,c.Z)(l,E.Y.PAUSED,(a={},(0,c.Z)(a,v.Rk.PLAY,(function(){return u._updateState(E.Y.PLAYING)})),(0,c.Z)(a,v.Rk.PLAYING,(function(){return u._updateState(E.Y.PLAYING)})),(0,c.Z)(a,v.Rk.ENDED,(function(){return u._updateState(E.Y.IDLE)})),a)),(0,c.Z)(l,E.Y.PLAYING,(o={},(0,c.Z)(o,v.Rk.PAUSE,(function(){return u._updateState(E.Y.PAUSED)})),(0,c.Z)(o,v.Rk.WAITING,(function(){u._player.seeking?u._updateState(E.Y.LOADING):(u._updateState(E.Y.BUFFERING),u._lastWaitingTime=u._player.currentTime)})),(0,c.Z)(o,v.Rk.ENDED,(function(){return u._updateState(E.Y.IDLE)})),(0,c.Z)(o,v.Rk.ERROR,(function(e){return e.payload.severity===_.Z.Severity.CRITICAL&&u._updateState(E.Y.IDLE)})),o)),(0,c.Z)(l,E.Y.BUFFERING,(s={},(0,c.Z)(s,v.Rk.PLAYING,(function(){return u._updateState(E.Y.PLAYING)})),(0,c.Z)(s,v.Rk.PAUSE,(function(){return u._updateState(E.Y.PAUSED)})),(0,c.Z)(s,v.Rk.TIME_UPDATE,(function(){"IE"===d.Z.browser.name&&u._player.currentTime!==u._lastWaitingTime&&u._prevState&&u._prevState.type===E.Y.PLAYING&&(u._lastWaitingTime=null,u._updateState(E.Y.PLAYING))})),s)),l)),this._player=t,this._logger=(0,b.ZP)("StateManager"),this._eventManager=new p.Q,this._history=[],this._prevState=null,this._curState=new k.Z(E.Y.IDLE),this._attachListeners()}return(0,a.Z)(e,[{key:"_attachListeners",value:function(){this._eventManager.listen(this._player,v.Rk.ERROR,this._doTransition.bind(this)),this._eventManager.listen(this._player,v.Rk.ENDED,this._doTransition.bind(this)),this._eventManager.listen(this._player,v.Rk.PLAY,this._doTransition.bind(this)),this._eventManager.listen(this._player,v.Rk.LOAD_START,this._doTransition.bind(this)),this._eventManager.listen(this._player,v.Rk.PLAYING,this._doTransition.bind(this)),this._eventManager.listen(this._player,v.Rk.LOADED_METADATA,this._doTransition.bind(this)),this._eventManager.listen(this._player,v.Rk.PAUSE,this._doTransition.bind(this)),this._eventManager.listen(this._player,v.Rk.WAITING,this._doTransition.bind(this)),this._eventManager.listen(this._player,v.Rk.SEEKED,this._doTransition.bind(this)),this._eventManager.listen(this._player,v.Rk.TIME_UPDATE,this._doTransition.bind(this))}},{key:"_doTransition",value:function(e){(e.type!==v.Rk.TIME_UPDATE||this._curState===E.Y.BUFFERING&&e.type===v.Rk.TIME_UPDATE)&&this._logger.debug("Do transition request",e.type);var t=this._transitions[this._curState.type];"function"==typeof t[e.type]&&t[e.type](e)}},{key:"_updateState",value:function(e){this._curState.type!==e&&(this._curState.duration=Date.now()/1e3,this._history.push(this._curState),this._prevState=this._curState,this._curState=new k.Z(e),this._logger.debug("Switch player state: from ".concat(this._prevState.type," to ").concat(this._curState.type)),this._dispatchEvent())}},{key:"_dispatchEvent",value:function(){var e=new y.v(v.nQ.PLAYER_STATE_CHANGED,{oldState:this._prevState,newState:this._curState});this._player.dispatchEvent(e)}},{key:"destroy",value:function(){this._history=[],this._eventManager.destroy()}},{key:"reset",value:function(){this._history=[]}},{key:"currentState",get:function(){return this._curState}},{key:"previousState",get:function(){return this._prevState}},{key:"history",get:function(){return this._history}}]),e}(),A=n(8413),S=n(4877),w=n(7812),C=n(6462),x=n(6234),P={"":!0,up:!0};function R(e){return"number"==typeof e&&e>=0&&e<=100}var I,D=function(){function e(){(0,i.Z)(this,e),(0,c.Z)(this,"_width",100),(0,c.Z)(this,"_lines",3),(0,c.Z)(this,"_regionAnchorX",0),(0,c.Z)(this,"_regionAnchorY",100),(0,c.Z)(this,"_viewportAnchorX",0),(0,c.Z)(this,"_viewportAnchorY",100),(0,c.Z)(this,"_scroll","")}return(0,a.Z)(e,[{key:"width",get:function(){return this._width},set:function(e){if(!R(e))throw new Error("Width must be between 0 and 100.");this._width=e}},{key:"scroll",get:function(){return this._scroll},set:function(e){var t=function(e){return"string"==typeof e&&!!P[e.toLowerCase()]&&e.toLowerCase()}(e);if(!1===t)throw new SyntaxError("An invalid or illegal string was specified.");this._scroll=t}},{key:"viewportAnchorY",get:function(){return this._viewportAnchorY},set:function(e){if(!R(e))throw new Error("ViewportAnchorY must be between 0 and 100.");this._viewportAnchorY=e}},{key:"viewportAnchorX",get:function(){return this._viewportAnchorX},set:function(e){if(!R(e))throw new Error("ViewportAnchorX must be between 0 and 100.");this._viewportAnchorX=e}},{key:"regionAnchorX",get:function(){return this._regionAnchorX},set:function(e){if(!R(e))throw new Error("RegionAnchorY must be between 0 and 100.");this._regionAnchorX=e}},{key:"lines",get:function(){return this._lines},set:function(e){if("number"!=typeof e)throw new TypeError("Lines must be set to a number.");this._lines=e}},{key:"regionAnchorY",get:function(){return this._regionAnchorY},set:function(e){if(!R(e))throw new Error("RegionAnchorX must be between 0 and 100.");this._regionAnchorY=e}}]),e}();function O(e){function t(e,t,n,r){return 3600*(0|e)+60*(0|t)+(0|n)+(0|r)/1e3}var n=e.match(/^(\d+):(\d{2})(:\d{2})?\.(\d{3})/);return n?n[3]?t(n[1],n[2],n[3].replace(":",""),n[4]):n[1]>59?t(n[1],n[2],0,n[4]):t(0,n[1],n[2],n[4]):null}I="undefined"!=typeof window&&window.VTTRegion?window.VTTRegion:D;var L={"&amp;":"&","&lt;":"<","&gt;":">","&lrm;":"‎","&rlm;":"‏","&nbsp;":" "},M={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},N={v:"title",lang:"lang"},U={rt:"ruby"};function B(){this.values=Z(null)}function F(e,t,n,r){var i=r?e.split(r):[e];for(var a in i)if("string"==typeof i[a]){var o=i[a].split(n);2===o.length&&t(o[0],o[1])}}function j(e,t,n){var r=e;function i(){var t=O(e);if(null===t)throw new q(q.Errors.BadTimeStamp,"Malformed timestamp: "+r);return e=e.replace(/^[^\sa-zA-Z-]+/,""),t}function a(){e=e.replace(/^\s+/,"")}if(a(),t.startTime=i(),a(),"--\x3e"!==e.substr(0,3))throw new q(q.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '--\x3e'): "+r);e=e.substr(3),a(),t.endTime=i(),a(),function(e,t){var r=new B;F(e,(function(e,t){switch(e){case"region":for(var i=n.length-1;i>=0;i--)if(n[i].id===t){r.set(e,n[i].region);break}break;case"vertical":r.alt(e,t,["rl","lr"]);break;case"line":var a=t.split(","),o=a[0];r.integer(e,o),r.percent(e,o)&&r.set("snapToLines",!1),r.alt(e,o,["auto"]),2===a.length&&r.alt("lineAlign",a[1],["start","center","end"]);break;case"position":a=t.split(","),r.percent(e,a[0]),2===a.length&&r.alt("positionAlign",a[1],["start","center","end"]);break;case"size":r.percent(e,t);break;case"align":r.alt(e,t,["start","center","end","left","right"])}}),/:/,/\s/),t.region=r.get("region",null),t.vertical=r.get("vertical",""),t.line=r.get("line",t.line||"auto"),t.lineAlign=r.get("lineAlign","start"),t.snapToLines=r.get("snapToLines",!0),t.size=r.get("size",100);try{t.align=r.get("align","center")}catch(e){t.align=r.get("align","middle")}t.position=r.get("position",t.position||"auto"),t.positionAlign=r.get("positionAlign",{start:"start",left:"start",center:"center",middle:"center",end:"end",right:"end"},t.align)}(e,t)}B.prototype={set:function(e,t){this.get(e)||""===t||(this.values[e]=t)},get:function(e,t,n){return n?this.has(e)?this.values[e]:t[n]:this.has(e)?this.values[e]:t},has:function(e){return e in this.values},alt:function(e,t,n){for(var r=0;r<n.length;++r)if(t===n[r]){this.set(e,t);break}},integer:function(e,t){/^-?\d+$/.test(t)&&this.set(e,parseInt(t,10))},percent:function(e,t){return!!(t.match(/^([\d]{1,3})(\.[\d]*)?%$/)&&(t=parseFloat(t))>=0&&t<=100)&&(this.set(e,t),!0)}};var H=[[1470,1470],[1472,1472],[1475,1475],[1478,1478],[1488,1514],[1520,1524],[1544,1544],[1547,1547],[1549,1549],[1563,1563],[1566,1610],[1645,1647],[1649,1749],[1765,1766],[1774,1775],[1786,1805],[1807,1808],[1810,1839],[1869,1957],[1969,1969],[1984,2026],[2036,2037],[2042,2042],[2048,2069],[2074,2074],[2084,2084],[2088,2088],[2096,2110],[2112,2136],[2142,2142],[2208,2208],[2210,2220],[8207,8207],[64285,64285],[64287,64296],[64298,64310],[64312,64316],[64318,64318],[64320,64321],[64323,64324],[64326,64449],[64467,64829],[64848,64911],[64914,64967],[65008,65020],[65136,65140],[65142,65276],[67584,67589],[67592,67592],[67594,67637],[67639,67640],[67644,67644],[67647,67669],[67671,67679],[67840,67867],[67872,67897],[67903,67903],[67968,68023],[68030,68031],[68096,68096],[68112,68115],[68117,68119],[68121,68147],[68160,68167],[68176,68184],[68192,68223],[68352,68405],[68416,68437],[68440,68466],[68472,68479],[68608,68680],[126464,126467],[126469,126495],[126497,126498],[126500,126500],[126503,126503],[126505,126514],[126516,126519],[126521,126521],[126523,126523],[126530,126530],[126535,126535],[126537,126537],[126539,126539],[126541,126543],[126545,126546],[126548,126548],[126551,126551],[126553,126553],[126555,126555],[126557,126557],[126559,126559],[126561,126562],[126564,126564],[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126590,126590],[126592,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],[1114109,1114109]];function V(e){for(var t=0;t<H.length;t++){var n=H[t];if(e>=n[0]&&e<=n[1])return!0}return!1}var G=function(e){(0,s.Z)(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,u.Z)(t);if(n){var i=(0,u.Z)(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return(0,l.Z)(this,e)});function o(e,t,n){var a;(0,i.Z)(this,o),a=r.call(this);var s="undefined"!=typeof navigator&&/MSIE\s8\.0/.test(navigator.userAgent);"undefined"!=typeof WebVTTSet&&(WebVTTSet.fontSet,WebVTTSet.backgroundSet,WebVTTSet.edgeSet),a.cue=t,a.cueDiv=function(e,t){function n(){if(!t)return null;var e,n=t.match(/^([^<]*)(<[^>]+>?)?/);return e=n[1]?n[1]:n[2],t=t.substr(e.length),e}function r(e){return L[e]}function i(e){for(var t;t=e.match(/&(amp|lt|gt|lrm|rlm|nbsp);/);)e=e.replace(t[0],r);return e}function a(e,t){return!U[t.localName]||U[t.localName]===e.localName}function o(t,n){var r=M[t];if(!r)return null;var i=e.document.createElement(r),a=N[t];return a&&n&&(i[a]=n.trim()),i}for(var s,l=e.document.createElement("div"),u=l,c=[];null!==(s=n());)if("<"!==s[0])u.appendChild(e.document.createTextNode(i(s)));else{if("/"===s[1]){c.length&&c[c.length-1]===s.substr(2).replace(">","")&&(c.pop(),u=u.parentNode);continue}var d=O(s.substr(1,s.length-2)),p=void 0;if(d){p=e.document.createProcessingInstruction("timestamp",d),u.appendChild(p);continue}var f=s.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!f)continue;if(!(p=o(f[1],f[3])))continue;if(!a(u,p))continue;f[2]&&(p.className=f[2].substr(1).replace("."," ")),c.push(f[1]),u.appendChild(p),u=p}return l}(e,t.text);var l={color:n.color,backgroundColor:n.backgroundColor,textShadow:n.textShadow,position:"relative",left:0,right:0,top:0,bottom:0,display:"inline"};s||(l.writingMode=""===t.vertical?"horizontal-tb":"lr"===t.vertical?"vertical-lr":"vertical-rl",l.unicodeBidi="plaintext"),a.applyStyles(l,a.cueDiv);var u="default"===n.textAlign;a.div=e.document.createElement("div");var c="middle"===t.align?"center":t.align;u||(c=n.textAlign),l={textAlign:c,font:n.font,whiteSpace:"pre-line",position:"absolute"},s||(l.direction=function(e){var t=[],n="";if(!e||!e.childNodes)return"ltr";function r(e,t){for(var n=t.childNodes.length-1;n>=0;n--)e.push(t.childNodes[n])}function i(e){if(!e||!e.length)return null;var t=e.pop(),n=t.textContent||t.innerText;if(n){var a=n.match(/^.*(\n|\r)/);return a?(e.length=0,a[0]):n}return"ruby"===t.tagName?i(e):t.childNodes?(r(e,t),i(e)):void 0}for(r(t,e);n=i(t);)for(var a=0;a<n.length;a++)if(V(n.charCodeAt(a)))return"rtl";return"ltr"}(a.cueDiv),l.writingMode=""===t.vertical?"horizontal-tb":"lr"===t.vertical?"vertical-lr":"vertical-rl".stylesunicodeBidi="plaintext"),a.applyStyles(l),a.div.appendChild(a.cueDiv);var d=0,p=t.positionAlign||t.align;if(u)switch(p){case"start":case"left":case"line-left":d=t.position;break;case"center":d=t.position-t.size/2;break;case"end":case"right":case"line-right":d=t.position-t.size}return""===t.vertical?a.applyStyles({left:a.formatStyle(d,"%"),width:a.formatStyle(Math.min(t.size,100-d)||t.size,"%")}):a.applyStyles({top:a.formatStyle(d,"%"),height:a.formatStyle(Math.min(t.size,100-d)||t.size,"%")}),a.move=function(e){this.applyStyles({top:this.formatStyle(e.top,"px"),bottom:this.formatStyle(e.bottom,"px"),left:this.formatStyle(e.left,"px"),right:this.formatStyle(e.right,"px"),height:this.formatStyle(e.height,"px"),width:this.formatStyle(e.width,"px")})},a}return(0,a.Z)(o)}(function(){function e(){(0,i.Z)(this,e)}return(0,a.Z)(e,[{key:"applyStyles",value:function(e,t){for(var n in t=t||this.div,e)e.hasOwnProperty(n)&&(t.style[n]=e[n])}},{key:"formatStyle",value:function(e,t){return 0===e?0:e+t}}]),e}()),K=function(){function e(t){var n,r,a,o,s;(0,i.Z)(this,e),(0,c.Z)(this,"overlaps",(function(e){return this.left<e.right&&this.right>e.left&&this.top<e.bottom&&this.bottom>e.top})),t.div&&(r=t.div.offsetHeight,a=t.div.offsetWidth,o=t.div.offsetTop,s=(s=t.div.childNodes)&&(s=s[0])&&s.getClientRects&&s.getClientRects(),t=t.div.getBoundingClientRect(),n=s?Math.max(s[0]&&s[0].height||0,t.height/s.length):0),this.left=t.left,this.right=t.right,this.top=t.top||o,this.height=t.height||r,this.bottom=t.bottom||o+(t.height||r),this.width=t.width||a,this.lineHeight=n||t.lineHeight||13}return(0,a.Z)(e,[{key:"move",value:function(e,t){switch(t=void 0!==t?t:this.lineHeight,e){case"+x":this.left+=t,this.right+=t;break;case"-x":this.left-=t,this.right-=t;break;case"+y":this.top+=t,this.bottom+=t;break;case"-y":this.top-=t,this.bottom-=t}}},{key:"overlapsAny",value:function(e){for(var t=0;t<e.length;t++)if(this.overlaps(e[t]))return!0;return!1}},{key:"within",value:function(e){return this.top>=e.top&&this.bottom<=e.bottom&&this.left>=e.left&&this.right<=e.right}},{key:"overlapsOppositeAxis",value:function(e,t){switch(t){case"+x":return this.left<e.left;case"-x":return this.right>e.right;case"+y":return this.top<e.top;case"-y":return this.bottom>e.bottom}}},{key:"intersectPercentage",value:function(e){return Math.max(0,Math.min(this.right,e.right)-Math.max(this.left,e.left))*Math.max(0,Math.min(this.bottom,e.bottom)-Math.max(this.top,e.top))/(this.height*this.width)}},{key:"toCSSCompatValues",value:function(e){return{top:this.top-e.top,bottom:e.bottom-this.bottom,left:this.left-e.left,right:e.right-this.right,height:this.height,width:this.width}}}],[{key:"getSimpleBoxPosition",value:function(e){var t=e.div?e.div.offsetHeight:e.tagName?e.offsetHeight:0,n=e.div?e.div.offsetWidth:e.tagName?e.offsetWidth:0,r=e.div?e.div.offsetTop:e.tagName?e.offsetTop:0;return{left:(e=e.div?e.div.getBoundingClientRect():e.tagName?e.getBoundingClientRect():e).left,right:e.right,top:e.top||r,height:e.height||t,bottom:e.bottom||r+(e.height||t),width:e.width||n}}}]),e}();function z(e,t,n,r){var i=new K(t),a=t.cue,o=function(e){if("number"==typeof e.line&&(e.snapToLines||e.line>=0&&e.line<=100))return e.line;if(!e.track||!e.track.textTrackList||!e.track.textTrackList.mediaElement)return-1;for(var t=e.track,n=t.textTrackList,r=0,i=0;i<n.length&&n[i]!==t;i++)n[i].mode===C.ZP.MODE.SHOWING&&r++;return-1*++r}(a),s=[];if(a.snapToLines){var l;switch(a.vertical){case"":s=["+y","-y"],l="height";break;case"rl":s=["+x","-x"],l="width";break;case"lr":s=["-x","+x"],l="width"}var u=i.lineHeight,c=u*Math.round(o),d=n[l]+u,p=s[0];Math.abs(c)>d&&(c=c<0?-1:1,c*=Math.ceil(d/u)*u),o<0&&(c+=""===a.vertical?n.height:n.width,s=s.reverse()),i.move(p,c)}else{var f=i.lineHeight/n.height*100;switch(a.lineAlign){case"center":o-=f/2;break;case"end":o-=f}switch(a.vertical){case"":t.applyStyles({top:t.formatStyle(o,"%")});break;case"rl":t.applyStyles({left:t.formatStyle(o,"%")});break;case"lr":t.applyStyles({right:t.formatStyle(o,"%")})}s=["+y","-x","+x","-y"],i=new K(t)}var h=function(e,t){for(var i,a=new K(e),o=1,s=0;s<t.length;s++){for(;e.overlapsOppositeAxis(n,t[s])||e.within(n)&&e.overlapsAny(r);)e.move(t[s]);if(e.within(n))return e;var l=e.intersectPercentage(n);o>l&&(i=new K(e),o=l),e=new K(a)}return i||a}(i,s);t.move(h.toCSSCompatValues(n))}var W=function(e,t){this.window=e,this.state="INITIAL",this.buffer="",this.decoder=t||new TextDecoder("utf8"),this.regionList=[]},Y=function(){return{decode:function(e){if(!e)return"";if("string"!=typeof e)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}},Z=Object.create||function(){function e(){}return function(t){if(1!==arguments.length)throw new Error("Object.create shim only accepts one parameter.");return e.prototype=t,new e}}();function q(e,t){this.name="ParsingError",this.code=e.code,this.message=t||e.message}q.prototype=Z(Error.prototype),q.prototype.constructor=q,q.Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}},W.prototype={reportOrThrowError:function(e){if(!(e instanceof q))throw e;this.onparsingerror&&this.onparsingerror(e)},parse:function(e){var t=this;function n(){for(var e=t.buffer,n=0;n<e.length&&"\r"!==e[n]&&"\n"!==e[n];)++n;var r=e.substr(0,n);return"\r"===e[n]&&++n,"\n"===e[n]&&++n,t.buffer=e.substr(n),r}e&&(t.buffer+=t.decoder.decode(e,{stream:!0}));try{var r;if("INITIAL"===t.state){if(!/\r\n|\n/.test(t.buffer))return this;var i=(r=n()).match(/^WEBVTT([ \t].*)?$/);if(!i||!i[0])throw new q(q.Errors.BadSignature);t.state="HEADER"}for(var a=!1;t.buffer;){if(!/\r\n|\n/.test(t.buffer))return this;switch(a?a=!1:r=n(),t.state){case"HEADER":/:/.test(r)?F(r,(function(e,n){"Region"===e&&function(e){var n=new B;if(F(e,(function(e,t){switch(e){case"id":n.set(e,t);break;case"width":n.percent(e,t);break;case"lines":n.integer(e,t);break;case"regionanchor":case"viewportanchor":var r=t.split(",");if(2!==r.length)break;var i=new B;if(i.percent("x",r[0]),i.percent("y",r[1]),!i.has("x")||!i.has("y"))break;n.set(e+"X",i.get("x")),n.set(e+"Y",i.get("y"));break;case"scroll":n.alt(e,t,["up"])}}),/=/,/\s/),n.has("id")){var r=new I;r.width=n.get("width",100),r.lines=n.get("lines",3),r.regionAnchorX=n.get("regionanchorX",0),r.regionAnchorY=n.get("regionanchorY",100),r.viewportAnchorX=n.get("viewportanchorX",0),r.viewportAnchorY=n.get("viewportanchorY",100),r.scroll=n.get("scroll",""),t.onregion&&t.onregion(r),t.regionList.push({id:n.get("id"),region:r})}}(n)}),/:/):r||(t.state="ID");continue;case"NOTE":r||(t.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(r)){t.state="NOTE";break}if(!r)continue;if(t.cue=new VTTCue(0,0,""),t.state="CUE",-1===r.indexOf("--\x3e")){t.cue.id=r;continue}case"CUE":try{j(r,t.cue,t.regionList)}catch(e){t.reportOrThrowError(e),t.cue=null,t.state="BADCUE";continue}t.state="CUETEXT";continue;case"CUETEXT":var o=-1!==r.indexOf("--\x3e");if(!r||o&&(a=!0)){t.oncue&&t.oncue(t.cue),t.cue=null,t.state="ID";continue}t.cue.text&&(t.cue.text+="\n"),t.cue.text+=r;continue;case"BADCUE":r||(t.state="ID");continue}}}catch(e){t.reportOrThrowError(e),"CUETEXT"===t.state&&t.cue&&t.oncue&&t.oncue(t.cue),t.cue=null,t.state="INITIAL"===t.state?"BADWEBVTT":"BADCUE"}return this},flush:function(){var e=this;try{if(e.buffer+=e.decoder.decode(),(e.cue||"HEADER"===e.state)&&(e.buffer+="\n\n",e.parse()),"INITIAL"===e.state)throw new q(q.Errors.BadSignature)}catch(t){e.reportOrThrowError(t)}return e.onflush&&e.onflush(),this}};var X=n(5856),Q=n(7300),$=n(488),J=n(2806),ee=n(6820),te=n(6145),ne=n(3433),re=n(9654),ie=function(){function e(t){(0,i.Z)(this,e),this._actions=t,this._middlewares=new re.k,this._logger=(0,b.ZP)("Middleware")}return(0,a.Z)(e,[{key:"use",value:function(e){for(var t in this._actions){var n=this._actions[t];"function"==typeof e[n]&&(this._logger.debug("Register <".concat(e.id,"> for action ").concat(n)),this._middlewares.push(n,e[n].bind(e)))}}},{key:"run",value:function(e,t){var n=this;this._logger.debug("Start middleware chain for action "+e);for(var r=this._middlewares.get(e),i=arguments.length,a=new Array(i>2?i-2:0),o=2;o<i;o++)a[o-2]=arguments[o];this._executeMiddleware(r,(function(){n._logger.debug("Finish middleware chain for action "+e),t.apply(void 0,arguments)}),a)}},{key:"_executeMiddleware",value:function(e,t,n){var r=n,i=function(e,t,n){var i;null!=t&&t.length&&(r=t),null!==(i=r)&&void 0!==i&&i.length?e.apply(void 0,(0,ne.Z)(r).concat([n])):e(n)},a=e.reduceRight((function(e,t){return function(){for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];i(t,r,e)}}),(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];i(t,n)}));a()}}]),e}(),ae=function(){function e(){(0,i.Z)(this,e),this._middleware=new ie(e.Actions)}return(0,a.Z)(e,[{key:"use",value:function(e){this._middleware.use(e)}},{key:"load",value:function(t){this._middleware.run(e.Actions.LOAD,t)}},{key:"play",value:function(t){this._middleware.run(e.Actions.PLAY,t)}},{key:"pause",value:function(t){this._middleware.run(e.Actions.PAUSE,t)}},{key:"setCurrentTime",value:function(t,n){this._middleware.run(e.Actions.SET_CURRENT_TIME,n,t)}}]),e}();(0,c.Z)(ae,"Actions",{LOAD:"load",PLAY:"play",PAUSE:"pause",SET_CURRENT_TIME:"setCurrentTime"});var oe=n(3323),se={log:{level:"ERROR"},text:{enableCEA708Captions:!0,useNativeTextTrack:!1,forceCenter:!1,captionsTextTrack1Label:"English",captionsTextTrack1LanguageCode:"en",captionsTextTrack2Label:"Spanish",captionsTextTrack2LanguageCode:"es"},playback:{audioLanguage:"",textLanguage:"",volume:1,playsinline:!0,preload:"none",autoplay:!1,loop:!1,autopause:!1,allowMutedAutoPlay:!0,muted:!1,pictureInPicture:!0,options:{html5:{hls:{},dash:{},native:{}}},preferNative:{hls:!1,dash:!1},inBrowserFullscreen:!1,screenLockOrientionMode:oe.z.NONE,playAdsWithMSE:!1,streamPriority:[{engine:"html5",format:"hls"},{engine:"html5",format:"dash"},{engine:"html5",format:"progressive"},{engine:"flash",format:"hls"}]},streaming:{forceBreakStall:!1},abr:{enabled:!0,fpsDroppedFramesInterval:5e3,fpsDroppedMonitoringThreshold:.2,capLevelOnFPSDrop:!1,capLevelToPlayerSize:!1,restrictions:{minHeight:0,maxHeight:1/0,minWidth:0,maxWidth:1/0,minBitrate:0,maxBitrate:1/0}},drm:{keySystem:""},network:{maxStaleLevelReloads:20}},le={options:{},metadata:{}},ue=n(3379),ce=n.n(ue),de=n(7795),pe=n.n(de),fe=n(569),he=n.n(fe),ye=n(3565),ge=n.n(ye),ve=n(9216),me=n.n(ve),be=n(4589),ke=n.n(be),Ee=n(7774),_e={};_e.styleTagTransform=ke(),_e.setAttributes=ge(),_e.insert=he().bind(null,"head"),_e.domAPI=pe(),_e.insertStyleElement=me(),ce()(Ee.Z,_e),Ee.Z&&Ee.Z.locals&&Ee.Z.locals;var Te=n(4779),Ae="srt",Se="vtt",we=function(e){(0,s.Z)(d,e);var t,n,r=(t=d,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,u.Z)(t);if(n){var i=(0,u.Z)(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return(0,l.Z)(this,e)});function d(e){var t;return(0,i.Z)(this,d),t=r.call(this),(0,c.Z)((0,o.Z)(t),"_externalCueIndex",0),(0,c.Z)((0,o.Z)(t),"_textTrackModel",{}),(0,c.Z)((0,o.Z)(t),"_activeTextCues",[]),(0,c.Z)((0,o.Z)(t),"_isTextTrackActive",!1),(0,c.Z)((0,o.Z)(t),"_lastTimeUpdate",0),t._player=e,t._eventManager=new p.Q,t}return(0,a.Z)(d,[{key:"hideTextTrack",value:function(){this._player.config.text.useNativeTextTrack?(this._removeCueChangeListeners(),this._resetExternalNativeTextTrack()):this._isTextTrackActive&&(this._eventManager.unlisten(this._player,v.Rk.TIME_UPDATE),this.dispatchEvent(new y.v(v.nQ.TEXT_CUE_CHANGED,{cues:[]})),this._resetCurrentTrack())}},{key:"getExternalTracks",value:function(e){var t=this,n=this._player.sources.captions;if(!n)return[];this._player.config.text.useNativeTextTrack&&this._addNativeTextTrack();var r=e.filter((function(e){return e instanceof C.ZP})),i=[];return n.forEach((function(e){if(e.language){var n=t._createTextTrack(e);t._maybeAddTrack(n,e,r,i)}else{var a=new _.Z(_.Z.Severity.RECOVERABLE,_.Z.Category.TEXT,_.Z.Code.UNKNOWN_LANGUAGE,{caption:e});t.dispatchEvent(new y.v(v.Rk.ERROR,a))}})),i}},{key:"_maybeAddTrack",value:function(e,t,n,r){var i=n.find((function(e){return e.available&&A.Z.langComparer(t.language,e.language)}));i?d._logger.warn("duplicated language, taking the inband option. Language: ",i.language):(r.push(e),this._updateTextTracksModel(t))}},{key:"_createTextTrack",value:function(e){return new C.ZP({active:!!e.default,kind:C.ZP.KIND.SUBTITLES,label:e.label,language:e.language,external:!0})}},{key:"_updateTextTracksModel",value:function(e){this._textTrackModel[e.language]={cuesStatus:1,cues:[],url:e.url,type:e.type}}},{key:"selectTextTrack",value:function(e){var t=this;this._textTrackModel[e.language]&&(3===this._textTrackModel[e.language].cuesStatus?this._selectTextTrack(e):1===this._textTrackModel[e.language].cuesStatus&&this._downloadAndParseCues(e).then((function(){t._textTrackModel[e.language].cuesStatus=3,t._selectTextTrack(e)})).catch((function(e){return t.dispatchEvent(new y.v(v.Rk.ERROR,e))})))}},{key:"_selectTextTrack",value:function(e){this.hideTextTrack(),this._player.config.text.useNativeTextTrack?(this._addCuesToNativeTextTrack(this._textTrackModel[e.language].cues),this._addCueChangeListener()):this._setTextTrack(e),e.active=!0,this.dispatchEvent(new y.v(v.nQ.TEXT_TRACK_CHANGED,{selectedTextTrack:e}))}},{key:"resetAllCues",value:function(){for(var e in this._textTrackModel)this._textTrackModel[e].cues.forEach((function(e){e.hasBeenReset=!0}))}},{key:"_addCueChangeListener",value:function(){var e=this,t=this._player.getVideoElement();if(t&&t.textTracks){var n=Array.from(t.textTracks).find((function(e){return C.ZP.isNativeTextTrack(e)&&e.mode===C.ZP.MODE.SHOWING}));n&&this._eventManager.listen(n,"cuechange",(function(t){return e._onCueChange(t)}))}}},{key:"_removeCueChangeListeners",value:function(){var e=this._player.getVideoElement();if(e&&e.textTracks)for(var t=0;t<e.textTracks.length;t++)this._eventManager.unlisten(e.textTracks[t],"cuechange")}},{key:"_onCueChange",value:function(e){var t=e.currentTarget.activeCues,n=(0,C.z6)(t);this.dispatchEvent(new y.v(v.nQ.TEXT_CUE_CHANGED,{cues:n}))}},{key:"reset",value:function(){this._resetCurrentTrack(),this._textTrackModel={},this._resetExternalNativeTextTrack(),this._eventManager.removeAll()}},{key:"destroy",value:function(){this._textTrackModel={},this._eventManager.destroy(),this._activeTextCues=[]}},{key:"_resetCurrentTrack",value:function(){this._activeTextCues=[],this._isTextTrackActive=!1,this._maybeSetExternalCueIndex()}},{key:"_getCuesString",value:function(e){var t=this;return new Promise((function(n,r){var i=t._textTrackModel[e.language],a=i.type||t._getFileType(i.url);[Ae,Se].includes(a)||(t._textTrackModel[e.language].cuesStatus=1,r(new _.Z(_.Z.Severity.RECOVERABLE,_.Z.Category.TEXT,_.Z.Code.UNKNOWN_FILE_TYPE,{captionType:a}))),f.eV.execute(i.url,{},"GET").then((function(e){n(a===Ae?t._convertSrtToVtt(e):e)})).catch((function(){t._textTrackModel[e.language].cuesStatus=1,r(new _.Z(_.Z.Severity.RECOVERABLE,_.Z.Category.TEXT,_.Z.Code.HTTP_ERROR,{url:i.url}))}))}))}},{key:"_parseCues",value:function(e){return new Promise((function(t,n){var r=new W(window,Y()),i=[];r.oncue=function(e){i.push(e)},r.onflush=function(){d._logger.debug("finished parsing external cues"),t(i)},r.parse(e),r.flush(),r.onparsingerror((function(e){return n(e)}))}))}},{key:"_convertSrtToVtt",value:function(e){var t=e.replace(/(\d\d:\d\d:\d\d),(\d\d\d) --> (\d\d:\d\d:\d\d),(\d\d\d)/g,(function(e,t,n,r,i){return"".concat(t,".").concat(n," --\x3e ").concat(r,".").concat(i)}));return"WEBVTT\n\n".concat(t)}},{key:"_downloadAndParseCues",value:function(e){var t=this;return this._textTrackModel[e.language].cuesStatus=2,new Promise((function(n,r){t._getCuesString(e).then((function(e){return t._parseCues(e)})).then((function(r){t._textTrackModel[e.language].cues=r,n()})).catch((function(e){return r(e)}))}))}},{key:"_getFileType",value:function(e){return e.split(/[#?]/)[0].split(".").pop().trim()}},{key:"_handleCaptionOnTimeUpdate",value:function(e){var t=this._player.currentTime;if(t){var n=!1;this._hadSeeked()&&(this._activeTextCues=[],n=this._maybeSetExternalCueIndex());var r=this._maybeRemoveActiveCues(),i=this._maybeAddToActiveCues(e);(n||i||r)&&this.dispatchEvent(new y.v(v.nQ.TEXT_CUE_CHANGED,{cues:this._activeTextCues})),this._lastTimeUpdate=t}}},{key:"_hadSeeked",value:function(){return!!this._player.currentTime&&Math.abs(this._player.currentTime-this._lastTimeUpdate)>1}},{key:"_maybeRemoveActiveCues",value:function(){var e=this._player.currentTime;if(!e)return!1;var t=this._activeTextCues.filter((function(t){return t.startTime<e&&e<t.endTime})),n=this._activeTextCues.length!==t.length;return this._activeTextCues=t,n}},{key:"_maybeAddToActiveCues",value:function(e){var t=this._player.currentTime;if(!t)return!1;for(var n=!1,r=this._textTrackModel[e.language].cues;this._externalCueIndex<r.length&&t>r[this._externalCueIndex].startTime;)t<r[this._externalCueIndex].endTime&&this._activeTextCues.push(r[this._externalCueIndex]),this._externalCueIndex++,n=!0;return n}},{key:"_maybeSetExternalCueIndex",value:function(){var e=this._player._getTextTracks().find((function(e){return e.active&&e.external}));if(e&&e.external){for(var t=this._textTrackModel[e.language]?this._textTrackModel[e.language].cues:[],n=0;n<t.length&&!(t[n].startTime<this._player.currentTime&&this._player.currentTime<t[n].endTime)&&!(t[n].endTime>this._player.currentTime&&t[n].startTime>this._player.currentTime);n++);return this._externalCueIndex=n,!0}return!1}},{key:"_resetExternalNativeTextTrack",value:function(){var e=this._player.getVideoElement();if(e&&e.textTracks){var t=Array.from(e.textTracks).find((function(e){return!!e&&C.ZP.isExternalTrack(e)}));t&&(t.cues&&Object.values(t.cues).forEach((function(e){return t.removeCue(e)})),t.mode=C.ZP.MODE.DISABLED)}}},{key:"_addCuesToNativeTextTrack",value:function(e){var t=this._player.getVideoElement();if(t&&t.textTracks){var n=Array.from(t.textTracks).find((function(e){return!!e&&C.ZP.isExternalTrack(e)}));n&&(n.mode=C.ZP.MODE.SHOWING,void 0===VTTCue?this._convertCues(e).forEach((function(e){return n.addCue(e)})):e.forEach((function(e){return n.addCue(e)})))}}},{key:"_convertCues",value:function(e){return e.map((function(e){return new TextTrackCue(e.startTime,e.endTime,e.text)}))}},{key:"_addNativeTextTrack",value:function(){var e=this._player.getVideoElement();e&&e.textTracks&&(Array.from(e.textTracks).findIndex((function(e){return!!e&&C.ZP.isExternalTrack(e)}))>-1?this._resetExternalNativeTextTrack():e.addTextTrack(C.ZP.KIND.SUBTITLES,C.ZP.EXTERNAL_TRACK_ID,C.ZP.EXTERNAL_TRACK_ID))}},{key:"_setTextTrack",value:function(e){var t=this;this._player.config.text.useNativeTextTrack||(this._isTextTrackActive=!0,d._logger.debug("External text track changed",e),this._activeTextCues=[],this._externalCueIndex=0,this.dispatchEvent(new y.v(v.nQ.TEXT_CUE_CHANGED,{cues:this._activeTextCues})),this._eventManager.listen(this._player,v.Rk.TIME_UPDATE,(function(){return t._handleCaptionOnTimeUpdate(e)})))}}],[{key:"applyNativeTextTrackStyles",value:function(e,t,n,r){e.insertRule("#".concat(n," video.").concat(r,"::-webkit-media-text-track-display { text-align: ").concat(t.textAlign,"!important; }"),0),e.insertRule("#".concat(n," video.").concat(r,"::cue { ").concat(t.toCSS()," }"),0)}}]),d}(g.H);(0,c.Z)(we,"_logger",(0,b.ZP)("ExternalCaptionsHandler"));var Ce=n(9063),xe=n(8151),Pe=n(7916),Re="playkit-in-browser-fullscreen-mode",Ie=function(){function e(t){(0,i.Z)(this,e),(0,c.Z)(this,"_isElementInFullscreen",!1),(0,c.Z)(this,"_isScreenLocked",!1),(0,c.Z)(this,"_isScreenOrientationSupport",!!screen&&!!screen.orientation&&"function"==typeof screen.orientation.unlock&&"function"==typeof screen.orientation.lock),(0,c.Z)(this,"_isFullscreenEventDispatched",!1),this._player=t,this._isInBrowserFullscreen=!1,this._eventManager=new p.Q}return(0,a.Z)(e,[{key:"_isNativeDocumentFullscreen",value:function(){return!!(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement)}},{key:"_isIOSFullscreen",value:function(){var e="function"==typeof this._player.getVideoElement?this._player.getVideoElement():null;return"iOS"===this._player.env.os.name&&!!e&&("fullscreen"===e.webkitPresentationMode||!e.webkitPresentationMode&&e.webkitDisplayingFullscreen)}},{key:"isFullscreen",value:function(){return this._isNativeDocumentFullscreen()&&this._isElementInFullscreen||this._isIOSFullscreen()||this._isInBrowserFullscreen}},{key:"enterFullscreen",value:function(e){if(!this.isFullscreen()){this.registerFullScreenEvents();var t=e&&f.is.getElementById(e),n=this._player.config.playback;if(t||(t=this._player.getView()),"iOS"===this._player.env.os.name)if(n.inBrowserFullscreen&&n.playsinline||this._player.engineType===$.r.YOUTUBE)this._enterInBrowserFullscreen(t);else{var r=this._player.getVideoElement();r&&"function"==typeof r.webkitEnterFullScreen&&(this._player.isInPictureInPicture()?(setTimeout((function(){return r.webkitEnterFullScreen()}),1e3),this._player.exitPictureInPicture()):r.webkitEnterFullScreen())}else this._requestFullscreen(t)}}},{key:"exitFullscreen",value:function(){if(this.isFullscreen())if("iOS"===this._player.env.os.name)if(this._isInBrowserFullscreen||this._player.engineType===$.r.YOUTUBE)this._exitInBrowserFullscreen();else{var e=this._player.getVideoElement();e&&"function"==typeof e.webkitExitFullscreen&&e.webkitExitFullscreen()}else this._requestExitFullscreen()}},{key:"_nativeEnterFullScreen",value:function(e){return"function"==typeof e.requestFullscreen?e.requestFullscreen():"function"==typeof e.mozRequestFullScreen?e.mozRequestFullScreen():"function"==typeof e.webkitRequestFullScreen?e.webkitRequestFullScreen():"function"==typeof e.msRequestFullscreen?e.msRequestFullscreen():void 0}},{key:"_requestFullscreen",value:function(e){var t=this;this._player.isInPictureInPicture()&&this._player.exitPictureInPicture(),Promise.resolve(this._nativeEnterFullScreen(e)).then((function(){t._isElementInFullscreen=!0;var e=f.c7.getPropertyPath(t._player,"config.playback.screenLockOrientionMode"),n=e!==oe.z.NONE&&Object.values(oe.z).includes(e);t._isScreenOrientationSupport&&n&&screen.orientation.lock(e).then((function(){return t._isScreenLocked=!0})).catch((function(){return t._isScreenLocked=!1}))}),(function(){}))}},{key:"_nativeExitFullScreen",value:function(){return"function"==typeof document.exitFullscreen?document.exitFullscreen():"function"==typeof document.webkitExitFullscreen?document.webkitExitFullscreen():"function"==typeof document.mozCancelFullScreen?document.mozCancelFullScreen():"function"==typeof document.msExitFullscreen?document.msExitFullscreen():void 0}},{key:"_requestExitFullscreen",value:function(){var e=this;Promise.resolve(this._nativeExitFullScreen()).then((function(){e._isElementInFullscreen=!1,e._isScreenOrientationSupport&&e._isScreenLocked&&(screen.orientation.unlock(),e._isScreenLocked=!1)}),(function(){}))}},{key:"_enterInBrowserFullscreen",value:function(e){this._player.isInPictureInPicture()&&this._player.exitPictureInPicture(),f.is.addClassName(e,Re),this._isInBrowserFullscreen=!0,this._fullscreenEnterHandler(),this._player.dispatchEvent(new y.v(this._player.Event.RESIZE))}},{key:"_exitInBrowserFullscreen",value:function(){var e=f.is.getElementBySelector("."+Re);e&&f.is.removeClassName(e,Re),this._isInBrowserFullscreen=!1,this._fullscreenExitHandler(),this._player.dispatchEvent(new y.v(this._player.Event.RESIZE))}},{key:"registerFullScreenEvents",value:function(){var e=this;"iOS"===this._player.env.os.name?this._handleIosFullscreen():(this._eventManager.listen(document,"webkitfullscreenchange",(function(){return e._fullscreenChangeHandler()})),this._eventManager.listen(document,"mozfullscreenchange",(function(){return e._fullscreenChangeHandler()})),this._eventManager.listen(document,"fullscreenchange",(function(){return e._fullscreenChangeHandler()})),this._eventManager.listen(document,"MSFullscreenChange",(function(){return e._fullscreenChangeHandler()})))}},{key:"_handleIosFullscreen",value:function(){var e=this,t=function(){var t=e._player.getVideoElement();t&&(e._eventManager.listen(t,"webkitbeginfullscreen",(function(){return e._fullscreenEnterHandler()})),e._eventManager.listen(t,"webkitendfullscreen",(function(){return e._fullscreenExitHandler()})))};this._player.getVideoElement()?t():this._eventManager.listenOnce(this._player,this._player.Event.SOURCE_SELECTED,(function(){return t()}))}},{key:"_fullscreenChangeHandler",value:function(){this.isFullscreen()?this._fullscreenEnterHandler():this._fullscreenExitHandler()}},{key:"_fullscreenEnterHandler",value:function(){this.isFullscreen()&&!this._isFullscreenEventDispatched&&(this._isFullscreenEventDispatched=!0,this._player.dispatchEvent(new y.v(this._player.Event.ENTER_FULLSCREEN)))}},{key:"_fullscreenExitHandler",value:function(){!this.isFullscreen()&&this._isFullscreenEventDispatched&&(this._isFullscreenEventDispatched=!1,this._eventManager.removeAll(),this._player.dispatchEvent(new y.v(this._player.Event.EXIT_FULLSCREEN)))}},{key:"destroy",value:function(){this._eventManager.destroy()}}]),e}(),De=n(1752),Oe=function(e){(0,s.Z)(c,e);var t,n,r=(t=c,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,u.Z)(t);if(n){var i=(0,u.Z)(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return(0,l.Z)(this,e)});function c(e,t){var n,a;return(0,i.Z)(this,c),(a=r.call(this))._eventManager=new p.Q,a._pluginDecorators=t.createDecorators(e,(0,De.Z)((n=(0,o.Z)(a),(0,u.Z)(c.prototype)),"dispatchEvent",n).bind((0,o.Z)(a))),Object.values(v.tw).forEach((function(t){return a._eventManager.listen(e,t,(function(e){return a.dispatchEvent(e)}))})),(0,l.Z)(a,new Proxy(e,{get:function(e,t){"destroy"===t&&a._destroy();var n,r=a._pluginDecorators.find((function(e){return e.active}));return(n="addEventListener"===t||"removeEventListener"===t?(0,o.Z)(a):r&&t in r?r:e)[t]&&"function"==typeof n[t].bind?n[t].bind(n):n[t]},set:function(e,t,n){var r=a._pluginDecorators.find((function(e){return t in e&&e.active}));return r&&t in r?r[t]=n:e[t]=n,!0}}))}return(0,a.Z)(c,[{key:"dispatchEvent",value:function(e){var t=this._pluginDecorators.find((function(e){return e.active}));return t&&t.dispatchEvent?t.dispatchEvent(e):(0,De.Z)((0,u.Z)(c.prototype),"dispatchEvent",this).call(this,e)}},{key:"_destroy",value:function(){this._pluginDecorators=[],this._eventManager.destroy()}},{key:"active",get:function(){return!0}}]),c}(g.H),Le=n(8143),Me=n(2983),Ne=function(){function e(){(0,i.Z)(this,e),(0,c.Z)(this,"_decoratorProviders",new Map),(0,c.Z)(this,"_logger",(0,b.ZP)("EngineDecoratorManager"))}return(0,a.Z)(e,[{key:"register",value:function(e){this._decoratorProviders.has(e.getName())?this._logger.warn("decorator already registered for ".concat(e.getName())):this._decoratorProviders.set(e.getName(),e)}},{key:"createDecorators",value:function(e,t){return this._logger.debug("decorators created for ".concat(Array.from(this._decoratorProviders.keys()).toString())),Array.from(this._decoratorProviders.values(),(function(n){return n.getEngineDecorator(e,t)}))}},{key:"destroy",value:function(){this._logger.debug("decorators destroyed"),this._decoratorProviders.clear()}}]),e}(),Ue=n(1177);function Be(e,t,n,r,i,a,o){try{var s=e[a](o),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,i)}function Fe(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var a=e.apply(t,n);function o(e){Be(a,r,i,o,s,"next",e)}function s(e){Be(a,r,i,o,s,"throw",e)}o(void 0)}))}}var je=n(4687),He=n.n(je),Ve=n(5590);function Ge(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Ke(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ke(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}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 a,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function Ke(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ze(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function We(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ze(Object(n),!0).forEach((function(t){(0,c.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ze(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ye=/#wh=/i,Ze=/#xywh=/i,qe=new RegExp("^/[^/].+"),Xe=function(e){(0,s.Z)(E,e);var t,n,d,h,g,m,b,k=(m=E,b=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=(0,u.Z)(m);if(b){var n=(0,u.Z)(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return(0,l.Z)(this,e)});function E(){var e;return(0,i.Z)(this,E),e=k.call(this),(0,c.Z)((0,o.Z)(e),"_cues",[]),e._eventManager=new p.Q,e}return(0,a.Z)(E,[{key:"load",value:(g=Fe(He().mark((function e(t){return He().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=2;break}return e.abrupt("return");case 2:return E._logger.debug("start loading the vtt thumbnails"),e.next=5,this._downloadAndParseCues(t);case 5:case"end":return e.stop()}}),e,this)}))),function(e){return g.apply(this,arguments)})},{key:"getThumbnail",value:function(e){var t=this._findCue(e,this._cues);if(t){var n=t.imgUrl,r=t.size,i=t.coordinates;i=i||{x:0,y:0};var a=We(We({url:n},r=r||this._naturalImgSize),i);return new Ve.F(a)}return null}},{key:"isUsingVttThumbnails",value:function(){var e;return!(null===(e=this._cues)||void 0===e||!e.length)}},{key:"_downloadAndParseCues",value:(h=Fe(He().mark((function e(t){var n,r;return He().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this._downloadVttFile(t);case 3:return n=e.sent,e.next=6,this._processVtt(n);case 6:return r=e.sent,e.next=9,this._formatIntoThumbnailCues(r,t);case 9:this._cues=e.sent,e.next=15;break;case 12:e.prev=12,e.t0=e.catch(0),this.dispatchEvent(new y.v(v.Rk.ERROR,e.t0));case 15:case"end":return e.stop()}}),e,this,[[0,12]])}))),function(e){return h.apply(this,arguments)})},{key:"_downloadVttFile",value:(d=Fe(He().mark((function e(t){return He().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,f.eV.execute(t.vttUrl,{},"GET");case 3:return e.abrupt("return",e.sent);case 6:throw e.prev=6,e.t0=e.catch(0),new _.Z(_.Z.Severity.RECOVERABLE,_.Z.Category.TEXT,_.Z.Code.HTTP_ERROR,e.t0);case 9:case"end":return e.stop()}}),e,null,[[0,6]])}))),function(e){return d.apply(this,arguments)})},{key:"_processVtt",value:(n=Fe(He().mark((function e(t){return He().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e,n){var r=new W(window,Y()),i=[];r.oncue=function(e){i.push(e)},r.onflush=function(){E._logger.debug("finished parsing thumbnails cues"),e(i)},r.parse(t),r.flush(),r.onparsingerror((function(e){return n(e)}))})));case 1:case"end":return e.stop()}}),e)}))),function(e){return n.apply(this,arguments)})},{key:"_formatIntoThumbnailCues",value:(t=Fe(He().mark((function e(t,n){var r,i,a,o,s,l;return He().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.validateThumbnailsVTTFormat(t)){e.next=4;break}throw new _.Z(_.Z.Severity.RECOVERABLE,_.Z.Category.TEXT,_.Z.Code.INVALID_VTT_THUMBNAILS_FILE,{message:"invalid thumbnail vtt format",vttUrl:n.vttUrl});case 4:return r=this._extractCueMetadata(t[0],n),e.next=7,this.validateImgUrl(r.imgUrl);case 7:if(e.sent){e.next=11;break}throw new _.Z(_.Z.Severity.RECOVERABLE,_.Z.Category.TEXT,_.Z.Code.INVALID_VTT_THUMBNAILS_FILE,{message:"failed loading the image - invalid image url",imgUrl:r.imgUrl});case 11:return e.next=13,this.extractImgNaturalDimensions(r.imgUrl);case 13:this._naturalImgSize=e.sent,i=[],a=Ge(t);try{for(a.s();!(o=a.n()).done;)s=o.value,l=this._extractCueMetadata(s,n),i.push(l)}catch(e){a.e(e)}finally{a.f()}return e.abrupt("return",i);case 18:case"end":return e.stop()}}),e,this)}))),function(e,n){return t.apply(this,arguments)})},{key:"validateThumbnailsVTTFormat",value:function(e){return e.length&&e[0]instanceof VTTCue}},{key:"extractImgNaturalDimensions",value:function(e){var t=this;return new Promise((function(n){var r=new Image;r.src=e,t._eventManager.listenOnce(r,"load",(function(){n({height:r.naturalHeight,width:r.naturalWidth})})),t._eventManager.listenOnce(r,"error",(function(){return n(null)}))}))}},{key:"validateImgUrl",value:function(e){var t=this;return new Promise((function(n){var r=new Image;r.src=e,t._eventManager.listenOnce(r,"load",(function(){n(!0)})),t._eventManager.listenOnce(r,"error",(function(){return n(!1)}))}))}},{key:"_extractCueMetadata",value:function(e,t){var n,i=e.startTime,a=e.endTime,o=e.text,s=t.vttUrl.substring(0,t.vttUrl.lastIndexOf("/")),l=Ye.test(o),u=Ze.test(o),c=!1,d=null,p=null;if(l){var f=o.split(Ye);n=(0,r.Z)(f,1)[0],E._logger.warn('vtt thumbnails in "'.concat(Ye,'" form - is supported but the width and height options are ignored and The images will be displayed in their natural dimensions')),c=void 0!==n}else if(u){var h=o.split(Ze),y=(0,r.Z)(h,2);n=y[0];var g=y[1].split(",").map(Number),v=(0,r.Z)(g,4),m=v[0],b=v[1],k=v[2],T=v[3];d={x:m,y:b},p={width:k,height:T},c=[m,b,k,T,n].every((function(e){return void 0!==e}))}else n=o,c=!!o;if(0!==n.indexOf("http://")&&0!==n.indexOf("https://")&&(n=qe.test(n)?n.substring(1):n,n="".concat(s,"/").concat(n)),c)return{startTime:i,endTime:a,imgUrl:n,size:p,coordinates:d};throw new _.Z(_.Z.Severity.RECOVERABLE,_.Z.Category.TEXT,_.Z.Code.INVALID_VTT_THUMBNAILS_FILE,{message:"error while parsing the vtt cues - invalid cue",parsedCue:{startTime:i,endTime:a,options:o}})}},{key:"_findCue",value:function(e,t){for(var n=0,r=t.length-1;n<=r;){var i=Math.floor((n+r)/2),a=t[i];if(e>=a.startTime&&e<a.endTime)return t[i];e<a.startTime?r=i-1:n=i+1}return null}},{key:"reset",value:function(){this._cues=[],this._eventManager.removeAll(),this._naturalImgSize={}}},{key:"destroy",value:function(){this.reset(),this._eventManager.destroy()}}]),E}(g.H);function Qe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function $e(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Qe(Object(n),!0).forEach((function(t){(0,c.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Je(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}(0,c.Z)(Xe,"_logger",(0,b.ZP)("ExternalThumbnailsHandler"));var et="playkit-engine",tt="auto",nt="off",rt=function(e){(0,s.Z)(k,e);var t,n,g=(t=k,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,u.Z)(t);if(n){var i=(0,u.Z)(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return(0,l.Z)(this,e)});function k(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,i.Z)(this,k),e=g.call(this),(0,c.Z)((0,o.Z)(e),"_sources",{}),(0,c.Z)((0,o.Z)(e),"_activeTextCues",[]),(0,c.Z)((0,o.Z)(e),"_textDisplaySettings",{}),(0,c.Z)((0,o.Z)(e),"_playbackAttributesState",{muted:void 0,volume:void 0,rate:void 0,videoTrack:void 0,audioLanguage:"",textLanguage:"",captionsDisplay:void 0}),(0,c.Z)((0,o.Z)(e),"_hasUserInteracted",!1),(0,c.Z)((0,o.Z)(e),"_isOnLiveEdge",!1),(0,c.Z)((0,o.Z)(e),"_shouldLoadAfterAttach",!1),(0,c.Z)((0,o.Z)(e),"_cachedUrls",[]),e._setConfigLogLevel(t),e._playerId=f.RO.uniqueId(5),e._prepareVideoElement(),k.runCapabilities(),e._env=d.Z,e._tracks=[],e._firstPlay=!0,e._loadingMedia=!1,e._loading=!1,e._playbackStart=!1,e._firstPlaying=!1,e._reset=!0,e._destroyed=!1,e._fallbackToMutedAutoPlay=!1,e._config=k._defaultConfig,e._sources=f.c7.copyDeep(le),e._eventManager=new p.Q,e._posterManager=new h,e._stateManager=new T((0,o.Z)(e)),e._resizeWatcher=new Pe.ResizeWatcher,e._playbackMiddleware=new ae,e._textStyle=new x.Z,e._createReadyPromise(),e._createPlayerContainer(),e._appendDomElements(),e._externalCaptionsHandler=new we((0,o.Z)(e)),e._externalThumbnailsHandler=new Xe,e._fullscreenController=new Ie((0,o.Z)(e)),e.configure(t),e}return(0,a.Z)(k,[{key:"configure",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this._setConfigLogLevel(e),f.c7.mergeDeep(this._config,e),this._applyTextTrackConfig(),this._applyABRRestriction(e)}},{key:"setSourcesMetadata",value:function(e){this._sources&&(this._sources.metadata||(this._sources.metadata={}),f.c7.mergeDeep(this._sources.metadata,e))}},{key:"setSources",value:function(e){this._hasSources(e)?(this.reset(),f.c7.mergeDeep(this._sources,e),this._resizeWatcher.init(f.is.getElementById(this._playerId)),k._logger.debug("Change source started"),this.dispatchEvent(new y.v(v.nQ.CHANGE_SOURCE_STARTED)),this._reset=!1,this._selectEngineByPriority()?(this.dispatchEvent(new y.v(v.nQ.SOURCE_SELECTED,{selectedSource:this._sources[this._streamType]})),this._attachMedia(),this._handlePlaybackOptions(),this._posterManager.setSrc(this._sources.poster),this._handleDimensions(),this._handlePreload(),this._handleAutoPlay(),k._logger.debug("Change source ended"),this.dispatchEvent(new y.v(v.nQ.CHANGE_SOURCE_ENDED))):(k._logger.warn("No playable engines was found to play the given sources"),this.dispatchEvent(new y.v(v.Rk.ERROR,new _.Z(_.Z.Severity.CRITICAL,_.Z.Category.PLAYER,_.Z.Code.NO_ENGINE_FOUND_TO_PLAY_THE_SOURCE,"No Engine Found To Play The Source"))))):f.c7.mergeDeep(this._sources,e)}},{key:"ready",value:function(){return this._readyPromise?this._readyPromise:Promise.resolve()}},{key:"load",value:function(){var e=this;this.src?k._logger.debug("The source has already been loaded. load request ignored"):this._playbackMiddleware.load((function(){e._engine?e._load():e._eventManager.listenOnce(e,v.nQ.SOURCE_SELECTED,(function(){return e._load()}))}))}},{key:"play",value:function(e){var t=this;e&&e.programmatic?this._autoPlay():(this._playbackStart||(this._playbackStart=!0,this.dispatchEvent(new y.v(v.nQ.PLAYBACK_START)),this.src||this._prepareVideoElement(),this.load()),this._engine?this._playbackMiddleware.play((function(){return t._play()})):this._loadingMedia?this._playbackMiddleware.play((function(){return t._playAfterAsyncMiddleware()})):this.dispatchEvent(new y.v(v.Rk.ERROR,new _.Z(_.Z.Severity.CRITICAL,_.Z.Category.PLAYER,_.Z.Code.NO_SOURCE_PROVIDED,"No Source Provided"))))}},{key:"pause",value:function(){this._engine&&this._playbackMiddleware.pause(this._pause.bind(this))}},{key:"getView",value:function(){return this._el}},{key:"getVideoElement",value:function(){if(this._engine)return this._engine.getVideoElement()}},{key:"videoHeight",get:function(){return this._engine?this._engine.videoHeight:null}},{key:"videoWidth",get:function(){return this._engine?this._engine.videoWidth:null}},{key:"reset",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this._reset||(this.pause(),this._externalCaptionsHandler.reset(),this._externalThumbnailsHandler.reset(),this._posterManager.reset(),this._stateManager.reset(),this._sources=f.c7.copyDeep(le),this._activeTextCues=[],this._updateTextDisplay([]),this._tracks=[],C.PZ.reset(),this._resetStateFlags(),this._engineType="",this._streamType="",this._pendingSelectedVideoTrack=void 0,this._engine&&this._engine.reset(),this.showBlackCover(),this._reset=!0,this.dispatchEvent(new y.v(v.nQ.PLAYER_RESET,{isChangeMedia:e})),this._eventManager.removeAll(),this._resizeWatcher.init(f.is.getElementById(this._playerId)),this._createReadyPromise(),this._isOnLiveEdge=!1,this._shouldLoadAfterAttach=!1)}},{key:"destroy",value:function(){this._destroyed||(this._externalCaptionsHandler.destroy(),this._posterManager.destroy(),this._stateManager.destroy(),this._fullscreenController.destroy(),this._activeTextCues=[],this._textDisplaySettings={},this._config={},this._tracks=[],this._engineType="",this._streamType="",this._readyPromise=void 0,this._pendingSelectedVideoTrack=void 0,this._resetStateFlags(),this._playbackAttributesState={},this._engine&&this._engine.destroy(),this._engineDecoratorManager&&this._engineDecoratorManager.destroy(),this._resizeWatcher.destroy(),this._el&&f.is.removeChild(this._el.parentNode,this._el),this._destroyed=!0,this.dispatchEvent(new y.v(v.nQ.PLAYER_DESTROY)),this._eventManager.destroy())}},{key:"hideBlackCover",value:function(){this._blackCoverEl&&(this._blackCoverEl.style.visibility="hidden")}},{key:"showBlackCover",value:function(){this._blackCoverEl&&(this._blackCoverEl.style.visibility="visible")}},{key:"attachMediaSource",value:function(){var e=this;this._engine&&(this._shouldLoadAfterAttach=!0,this._engine.attachMediaSource(),this._eventManager.listenOnce(this,v.Rk.CAN_PLAY,(function(){"number"==typeof e._playbackAttributesState.rate&&(e.playbackRate=e._playbackAttributesState.rate)})))}},{key:"detachMediaSource",value:function(){this._engine&&(this.pause(),this.hideTextTrack(),this._shouldLoadAfterAttach=!1,this._createReadyPromise(),this._engine.detachMediaSource())}},{key:"registerEngineDecoratorProvider",value:function(e){this._engineDecoratorManager||(this._engineDecoratorManager=new Ne),e&&this._engineDecoratorManager.register(e)}},{key:"buffered",get:function(){return this._engine?this._engine.buffered:null}},{key:"stats",get:function(){var e={targetBuffer:NaN,availableBuffer:NaN};return this._engine&&(e.targetBuffer=this._engine.targetBuffer,e.availableBuffer=this._engine.availableBuffer),e}},{key:"currentTime",get:function(){return this._engine?this._engine.currentTime:null},set:function(e){this._playbackMiddleware.setCurrentTime(e,this._setCurrentTime.bind(this))}},{key:"duration",get:function(){return this._engine?this._engine.duration:null}},{key:"liveDuration",get:function(){return this._engine?this._engine.liveDuration:null}},{key:"volume",get:function(){return this._engine?this._engine.volume:null},set:function(e){if(this._engine&&(f.Mr.isFloat(e)||0===e||1===e)){var t=e;t<0&&(t=0),t>1&&(t=1),this._engine.volume=t}}},{key:"paused",get:function(){return this._engine?this._engine.paused:null}},{key:"seeking",get:function(){return this._engine?this._engine.seeking:null}},{key:"playsinline",get:function(){return this._engine?this._engine.playsinline:null},set:function(e){this._engine&&(this._engine.playsinline=e)}},{key:"muted",get:function(){return this._engine?this._engine.muted:null},set:function(e){this._engine&&(this._engine.muted=e,this.dispatchEvent(new y.v(v.nQ.MUTE_CHANGE,{mute:e})),!1===e&&(this._fallbackToMutedAutoPlay=e))}},{key:"src",get:function(){return this._engine?this._engine.src:null}},{key:"dimensions",get:function(){return{width:this._el.clientWidth,height:this._el.clientHeight}},set:function(e){var t=this._getTargetElement();if(!e||f.c7.isEmptyObject(e))this._aspectRatio=null,t.style.width=null,t.style.height=null;else{var n=f.c7.mergeDeep(this.dimensions,e),r=n.height,i=n.width;t.style.width="number"==typeof i?"".concat(i,"px"):i,t.style.height="number"==typeof r?"".concat(r,"px"):r,this._calcRatio(t,e)}}},{key:"_getTargetElement",value:function(){return f.is.getElementById(this._config.targetId)}},{key:"poster",get:function(){return this._posterManager.src}},{key:"playbackRate",get:function(){return this._engine?this._engine.playbackRate:null},set:function(e){this._engine&&(this._engine.playbackRate=e)}},{key:"playbackRates",get:function(){return this._playbackRates?this._playbackRates:this._engine?this._engine.playbackRates:[]}},{key:"defaultPlaybackRate",get:function(){return this._engine?this._engine.defaultPlaybackRate:1}},{key:"engineType",get:function(){return this._engineType}},{key:"streamType",get:function(){return this._streamType}},{key:"env",get:function(){return this._env}},{key:"config",get:function(){return f.c7.mergeDeep({},this._config)}},{key:"sources",get:function(){return f.c7.mergeDeep({},this._sources)}},{key:"hasUserInteracted",get:function(){return this._hasUserInteracted}},{key:"loadingMedia",set:function(e){this._loadingMedia=e}},{key:"crossOrigin",get:function(){return this._engine?this._engine.crossOrigin:null},set:function(e){this._engine&&(this._engine.crossOrigin=e)}},{key:"ended",get:function(){return this._engine?this._engine.ended:null}},{key:"playbackMiddleware",get:function(){return this._playbackMiddleware}},{key:"posterManager",get:function(){return this._posterManager}},{key:"isLive",value:function(){return!(this._sources.type===J.D.VOD||!(this._sources.type===J.D.LIVE||this._engine&&this._engine.isLive()))}},{key:"isAudio",value:function(){return this._sources.type===J.D.AUDIO}},{key:"isOnLiveEdge",value:function(){return this._engine&&"function"==typeof this._engine.isOnLiveEdge?this._engine.isOnLiveEdge():this._isOnLiveEdge}},{key:"isDvr",value:function(){return this.isLive()&&this._sources.dvr}},{key:"seekToLiveEdge",value:function(){this._engine&&this.isLive()&&(this._engine.seekToLiveEdge(),this._isOnLiveEdge=!0)}},{key:"getStartTimeOfDvrWindow",value:function(){return this._engine?this._engine.getStartTimeOfDvrWindow():0}},{key:"getTracks",value:function(e){switch(e){case X.V.VIDEO:return f.c7.copyDeep(this._getVideoTracks());case X.V.AUDIO:return f.c7.copyDeep(this._getAudioTracks());case X.V.TEXT:return f.c7.copyDeep(this._getTextTracks());case X.V.IMAGE:return f.c7.copyDeep(this._getImageTracks());default:return f.c7.copyDeep(this._tracks)}}},{key:"getActiveTracks",value:function(){return f.c7.copyDeep({video:this._getVideoTracks().find((function(e){return e.active})),audio:this._getAudioTracks().find((function(e){return e.active})),text:this._getTextTracks().find((function(e){return e.active}))})}},{key:"changeQuality",value:function(e){"auto"===e?this.enableAdaptiveBitrate():this.selectTrack(e),this._markActiveTrack(e)}},{key:"selectTrack",value:function(e){this._engine&&(e instanceof S.Z?(this._playbackAttributesState.videoTrack=e,this._stateManager.currentState.type===E.Y.IDLE?this._pendingSelectedVideoTrack=e:this._engine.selectVideoTrack(e)):e instanceof w.Z?this._engine.selectAudioTrack(e):e instanceof C.PZ?(this._resetTextDisplay(),e.language===nt?(this.hideTextTrack(),this._externalCaptionsHandler.hideTextTrack(),this._playbackAttributesState.captionsDisplay=!1):e.external?(this._engine.hideTextTrack(),this._externalCaptionsHandler.selectTextTrack(e)):(this._externalCaptionsHandler.hideTextTrack(),this._engine.selectTextTrack(e))):e instanceof Me.Z&&this._engine.selectImageTrack(e))}},{key:"hideTextTrack",value:function(){if(this._engine){this._engine.hideTextTrack(),this._resetTextDisplay();var e=this._getTextTracks(),t=e.find((function(e){return!0===e.active}));t&&t.external&&this._externalCaptionsHandler.hideTextTrack(),e.map((function(e){return e.active=!1}));var n=e.find((function(e){return e.language===nt}));n&&(n.active=!0,this.dispatchEvent(new y.v(v.nQ.TEXT_TRACK_CHANGED,{selectedTextTrack:n}))),this._playbackAttributesState.captionsDisplay=!1}}},{key:"showTextTrack",value:function(){var e=this._getTextTracks(),t=this._playbackAttributesState.textLanguage||this._getLanguage(e,tt,e.find((function(e){return e.default})));this._setDefaultTrack(e,t)}},{key:"addTextTrack",value:function(e,t,n){if(this._engine&&"function"==typeof this._engine.addTextTrack)return this._engine.addTextTrack(e,t,n)}},{key:"getNativeTextTracks",value:function(){return this._engine&&"function"==typeof this._engine.getNativeTextTracks?this._engine.getNativeTextTracks():[]}},{key:"enableAdaptiveBitrate",value:function(){this._engine&&this._engine.enableAdaptiveBitrate(),this._playbackAttributesState.videoTrack=void 0}},{key:"isAdaptiveBitrateEnabled",value:function(){return!!this._engine&&this._engine.isAdaptiveBitrateEnabled()}},{key:"_applyABRRestriction",value:function(e){if(f.c7.hasPropertyPath(e,"abr.restrictions")&&this._engine&&this._tracks.length){var t=this._config.abr.restrictions,n=this._tracks.filter((function(e){return e instanceof S.Z})),r=(0,Ue.u)(n,t);if(r.length){var i=this._tracks.filter((function(e){return e instanceof S.Z&&e.available}));(i.length!==r.length||!i.every((function(e,t){return e.bandwidth===r[t].bandwidth})))&&(this._engine.applyABRRestriction(t),this._tracks.forEach((function(e){!r.includes(e)&&e instanceof S.Z?(e.available=!1,e.active=!1):e.available=!0})),this.getActiveTracks().video||(r[0].active=!0),this.dispatchEvent(new y.v(v.nQ.TRACKS_CHANGED,{tracks:this._tracks.filter((function(e){return e.available}))})))}else k._logger.warn("Invalid restriction, Nothing has changed values do not meet the restriction")}}},{key:"_applyTextTrackConfig",value:function(){var e=f.c7.getPropertyPath(this._config,"text.textTrackDisplaySetting"),t=f.c7.getPropertyPath(this._config,"text.textStyle");if(e){var n=f.c7.mergeDeep({},e,{align:(null==e?void 0:e.align)||(null==t?void 0:t.textAlign)||"center"});f.c7.getPropertyPath(this._config,"text.forceCenter")&&(n.position="auto",n.align="center",n.size="100"),this.setTextDisplaySettings(n)}try{t&&(this.textStyle=x.Z.fromJson(t))}catch(e){k._logger.warn(e)}}},{key:"getThumbnail",value:function(e){return this._externalThumbnailsHandler.isUsingVttThumbnails()?this._externalThumbnailsHandler.getThumbnail(e):this._engine?this._engine.getThumbnail(e):null}},{key:"setTextDisplaySettings",value:function(e){this._textDisplaySettings=f.c7.mergeDeep(this._textDisplaySettings,e),this._updateCueDisplaySettings();for(var t=0;t<this._activeTextCues.length;t++)this._activeTextCues[t].hasBeenReset=!0;this._updateTextDisplay(this._activeTextCues)}},{key:"textDisplaySetting",get:function(){return f.c7.copyDeep(this._textDisplaySettings)}},{key:"textStyle",get:function(){return this._textStyle.clone()},set:function(e){if(!(e instanceof x.Z))throw new Error("Style must be instance of TextStyle");(0,Pe.resetSubtitleStyleSheet)(this._playerId);try{this._textStyle=e,this._config.text.useNativeTextTrack?this._applyCustomSubtitleStyles():this._engine&&(this._engine.resetAllCues(),this._externalCaptionsHandler.resetAllCues(),this._updateTextDisplay(this._activeTextCues)),this.dispatchEvent(new y.v(v.nQ.TEXT_STYLE_CHANGED))}catch(e){k._logger.error(e.message)}}},{key:"isFullscreen",value:function(){return this._fullscreenController.isFullscreen()}},{key:"notifyEnterFullscreen",value:function(){this.isFullscreen()&&this.dispatchEvent(new y.v(v.nQ.ENTER_FULLSCREEN))}},{key:"notifyExitFullscreen",value:function(){this.isFullscreen()||this.dispatchEvent(new y.v(v.nQ.EXIT_FULLSCREEN))}},{key:"enterFullscreen",value:function(e){this._fullscreenController.enterFullscreen(e)}},{key:"exitFullscreen",value:function(){this._fullscreenController.exitFullscreen()}},{key:"enterPictureInPicture",value:function(){this.isFullscreen()&&this.exitFullscreen(),this._engine&&!this._engine.isInPictureInPicture&&this._engine.enterPictureInPicture()}},{key:"exitPictureInPicture",value:function(){this._engine&&this._engine.isInPictureInPicture&&this._engine.exitPictureInPicture()}},{key:"isInPictureInPicture",value:function(){return!!this._engine&&this._engine.isInPictureInPicture}},{key:"isPictureInPictureSupported",value:function(){return!!this._config.playback.pictureInPicture&&this._engine.isPictureInPictureSupported()}},{key:"isVr",value:function(){return!!this._sources.vr}},{key:"getLogLevel",value:function(e){return(0,b.ZO)(e)}},{key:"setLogLevel",value:function(e,t){(0,b.Ub)(e,t)}},{key:"getDrmInfo",value:function(){return this._engine.getDrmInfo()}},{key:"_applyCustomSubtitleStyles",value:function(){try{var e,t=(null===(e=this._el)||void 0===e||null===(e=e.parentElement)||void 0===e?void 0:e.id)||this._playerId;if(this._config.text.useNativeTextTrack&&!this._config.text.useShakaTextTrackDisplay){var n=(0,Pe.getSubtitleStyleSheet)(this._playerId);we.applyNativeTextTrackStyles(n,this._textStyle,t,et)}else if(this._config.text.useShakaTextTrackDisplay){var r,i;(0,Pe.resetSubtitleStyleSheet)(this._playerId);var a=(0,Pe.getSubtitleStyleSheet)(this._playerId);null===(r=this._engine.mediaSourceAdapter)||void 0===r||null===(i=r.applyTextTrackStyles)||void 0===i||i.call(r,a,this._textStyle,t)}}catch(e){k._logger.error("Failed to add custom text style: ".concat(e.message))}}},{key:"_resetTextDisplay",value:function(){this._activeTextCues=[],this._updateTextDisplay([])}},{key:"_prepareVideoElement",value:function(){var e=this;Te.zv.getEngines().forEach((function(t){t.prepareVideoElement(e._playerId)}))}},{key:"_setConfigLogLevel",value:function(e){e.log&&e.log.level&&b.in[e.log.level]&&(0,b.Ub)(b.in[e.log.level]),e.log&&"function"==typeof e.log.handler&&(0,b.hs)(e.log.handler)}},{key:"_hasSources",value:function(e){return!!e&&!!Object.values(Q.j).find((function(t){return e[t]&&e[t].length>0}))}},{key:"_createPlayerContainer",value:function(){var e=this._el=f.is.createElement("div");f.is.addClassName(e,"playkit-container"),f.is.setAttribute(e,"id",this._playerId),f.is.setAttribute(e,"tabindex","-1")}},{key:"_appendEngineEl",value:function(){if(this._el){var e=this._engine.getVideoElement(),t="".concat(et);f.is.addClassName(e,t);var n="".concat(et,"-").concat(this._engine.id);f.is.addClassName(e,n),f.is.prependTo(e,this._el),"youtube"===this._engine.id?this._el.style.zIndex="1":this._el.style.zIndex&&(this._el.style.zIndex="")}}},{key:"_appendDomElements",value:function(){var e=f.is.createElement("div");f.is.addClassName(e,"playkit-video-filter"),f.is.appendChild(this._el,e),this._blackCoverEl=f.is.createElement("div"),f.is.addClassName(this._blackCoverEl,"playkit-black-cover"),f.is.appendChild(this._el,this._blackCoverEl);var t=this._posterManager.getElement();f.is.addClassName(t,"playkit-poster"),f.is.appendChild(this._el,t),this._textDisplayEl=f.is.createElement("div"),f.is.addClassName(this._textDisplayEl,"playkit-subtitles"),f.is.appendChild(this._el,this._textDisplayEl)}},{key:"_createReadyPromise",value:function(){var e=this;this._readyPromise=new Promise((function(t,n){e._eventManager.listenOnce(e,v.nQ.TRACKS_CHANGED,(function(){e.dispatchEvent(new y.v(v.nQ.MEDIA_LOADED)),e._handlePlaybackRate(),t()})),e._eventManager.listen(e,v.Rk.ERROR,(function(e){e.payload.severity===_.Z.Severity.CRITICAL&&n()}))})).catch((function(){}))}},{key:"_handlePlaybackRate",value:function(){"number"==typeof this._playbackAttributesState.rate?this.playbackRate=this._playbackAttributesState.rate:"number"==typeof this._config.playback.playbackRate&&(this.playbackRate=this._config.playback.playbackRate)}},{key:"_selectEngineByPriority",value:function(){var e,t=this,n=this._config.playback.streamPriority,r=this._config.playback.preferNative,i=this._sources,a=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Je(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Je(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}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 a,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}(n);try{var o,s=function(){var n=e.value,a="string"==typeof n.engine?n.engine.toLowerCase():"",o="string"==typeof n.format?n.format.toLowerCase():"",s=Te.zv.getEngines().find((function(e){return e.id===a}));if(s){var l=i[o];if(l&&l.length>0){var u=l[0];if(s.canPlaySource(u,r[o],t._config.drm))return k._logger.debug("Source selected: ",l),t._loadEngine(s,u),t._engineType=a,t._streamType=o,{v:!0}}}};for(a.s();!(e=a.n()).done;)if(o=s())return o.v}catch(e){a.e(e)}finally{a.f()}return!1}},{key:"_loadEngine",value:function(e,t){this._engine?this._engine.id===e.id?this._engine.restore(t,$e($e({},this._config),{},{sources:this._sources})):(this._engine.destroy(),this._createEngine(e,t),this._appendEngineEl()):(this._createEngine(e,t),this._appendEngineEl())}},{key:"_createEngine",value:function(e,t){var n=e.createEngine(t,$e($e({},this._config),{},{sources:this._sources}),this._playerId);this._engine=this._engineDecoratorManager?new Oe(n,this._engineDecoratorManager):n,this._cachedUrls.length&&this.setCachedUrls(this._cachedUrls)}},{key:"_attachMedia",value:function(){var e=this;if(this._engine){Object.keys(v.Rk).forEach((function(t){e._eventManager.listen(e._engine,v.Rk[t],(function(t){return e.dispatchEvent(t)}))})),this._eventManager.listen(this._engine,v.Rk.SEEKING,(function(){e.isLive()&&(e._isOnLiveEdge=!(!e.duration||!e.currentTime)&&e.currentTime>=e.duration-1&&!e.paused)})),this._eventManager.listen(this._engine,v.nQ.MEDIA_RECOVERED,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(this._engine,v.nQ.IMAGE_TRACK_CHANGED,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(this._engine,v.nQ.TEXT_TRACK_ADDED,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(this._engine,v.nQ.VIDEO_TRACK_CHANGED,(function(t){return e._markActiveTrack(t.payload.selectedVideoTrack),e.dispatchEvent(t)})),this._eventManager.listen(this._engine,v.nQ.AUDIO_TRACK_CHANGED,(function(t){e.ready().then((function(){return e._playbackAttributesState.audioLanguage=t.payload.selectedAudioTrack.language})),e._markActiveTrack(t.payload.selectedAudioTrack),e.dispatchEvent(t)})),this._eventManager.listen(this._engine,v.nQ.TEXT_TRACK_CHANGED,(function(t){return e._onTextTrackChanged(t)})),this._eventManager.listen(this._engine,v.nQ.TRACKS_CHANGED,(function(t){return e._onTracksChanged(t)})),this._eventManager.listen(this._engine,v.nQ.TEXT_CUE_CHANGED,(function(t){return e._onCueChange(t)})),this._eventManager.listen(this._engine,v.nQ.ABR_MODE_CHANGED,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(this._engine,v.nQ.TIMED_METADATA,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(this._engine,v.nQ.TIMED_METADATA_CHANGE,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(this._engine,v.nQ.TIMED_METADATA_ADDED,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(this._engine,v.nQ.PLAY_FAILED,(function(t){e._onPlayFailed(t),e.dispatchEvent(t)})),this._eventManager.listen(this._engine,v.nQ.FPS_DROP,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(this._engine,v.nQ.FRAG_LOADED,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(this._engine,v.nQ.DRM_LICENSE_LOADED,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(this._engine,v.nQ.MANIFEST_LOADED,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(this._engine,v.nQ.MEDIA_RECOVERED,(function(){return e._handleRecovered()})),this._eventManager.listen(this,v.nQ.CHANGE_SOURCE_ENDED,(function(){return e._addTitleOnIframe()})),this._eventManager.listen(this,v.Rk.PLAY,this._onPlay.bind(this)),this._eventManager.listen(this,v.Rk.PAUSE,this._onPause.bind(this)),this._eventManager.listen(this,v.Rk.PLAYING,this._onPlaying.bind(this)),this._eventManager.listen(this,v.Rk.ENDED,this._onEnded.bind(this)),this._eventManager.listen(this,v.nQ.MUTE_CHANGE,(function(t){var n;e._playbackAttributesState.muted=(null===(n=t.payload)||void 0===n?void 0:n.mute)||e.muted})),this._eventManager.listen(this,v.Rk.VOLUME_CHANGE,(function(){e._playbackAttributesState.volume=e.volume})),this._eventManager.listen(this,v.Rk.RATE_CHANGE,(function(){e._playbackAttributesState.rate=e.playbackRate})),this._eventManager.listen(this,v.nQ.ENTER_FULLSCREEN,(function(){return e._resetTextCuesAndReposition()})),this._eventManager.listen(this,v.nQ.EXIT_FULLSCREEN,(function(){return e._resetTextCuesAndReposition()})),this._eventManager.listen(this._resizeWatcher,v.nQ.RESIZE,(function(t){e._resetTextCuesAndReposition(),e.dispatchEvent(t)})),this._eventManager.listen(this._externalCaptionsHandler,v.nQ.TEXT_CUE_CHANGED,(function(t){return e._onCueChange(t)})),this._eventManager.listen(this._externalCaptionsHandler,v.nQ.TEXT_TRACK_CHANGED,(function(t){return e._onTextTrackChanged(t)})),this._eventManager.listen(this._externalCaptionsHandler,v.Rk.ERROR,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(this._externalThumbnailsHandler,v.Rk.ERROR,(function(t){return e.dispatchEvent(t)}));var t=f.is.getElementBySelector("#".concat(this.config.targetId));t&&this._eventManager.listen(t,"click",(function(){e._hasUserInteracted=!0,e.dispatchEvent(new y.v(v.nQ.USER_GESTURE))}),{capture:!0})}}},{key:"_addTitleOnIframe",value:function(){if(window.self!==window.top){var e=f.is.getElementBySelector("head"),t=e.querySelector("title");t||(t=f.is.createElement("title"),e.appendChild(t)),t.innerHTML=this._sources.metadata.name?this._sources.metadata.name:""}}},{key:"_handleRecovered",value:function(){this._stateManager.currentState.type===E.Y.PLAYING&&this.play()}},{key:"_onTextTrackChanged",value:function(e){var t=this;this.ready().then((function(){return t._playbackAttributesState.textLanguage=e.payload.selectedTextTrack.language})),this._markActiveTrack(e.payload.selectedTextTrack),this.dispatchEvent(e)}},{key:"_resetTextCuesAndReposition",value:function(){this._engine.resetAllCues(),this._externalCaptionsHandler.resetAllCues(),this._updateTextDisplay([]);for(var e=0;e<this._activeTextCues.length;e++)this._activeTextCues[e].hasBeenReset=!0;this._updateTextDisplay(this._activeTextCues)}},{key:"_handlePlaybackOptions",value:function(){if(this._config.playback=this._config.playback||{},"boolean"==typeof this._playbackAttributesState.muted?this.muted=this._playbackAttributesState.muted:"boolean"==typeof this._config.playback.muted&&(this.muted=this._config.playback.muted),"number"==typeof this._playbackAttributesState.volume?this.volume=this._playbackAttributesState.volume:"number"==typeof this._config.playback.volume&&(this.volume=this._config.playback.volume),"boolean"==typeof this._config.playback.playsinline&&(this.playsinline=this._config.playback.playsinline),"string"==typeof this._config.playback.crossOrigin&&(this.crossOrigin=this._config.playback.crossOrigin),Array.isArray(this._config.playback.playbackRates)){var e=this._config.playback.playbackRates.filter((function(e,t,n){return e>0&&e<=16&&n.indexOf(e)===t})).sort((function(e,t){return e-t}));e&&(this._playbackRates=e)}}},{key:"_handlePreload",value:function(){"auto"!==this._config.playback.preload||this._config.playback.autoplay||this.load()}},{key:"_autoPlay",value:function(){var e=this,t=this._config.playback.allowMutedAutoPlay;k.getCapabilities(this.engineType).then((function(s){s.autoplay?r():s.mutedAutoPlay?n()&&!e._fallbackToMutedAutoPlay?i():t?a():o():o()}));var n=function(){k._logger.debug("Checking muted value");var t="boolean"==typeof e._playbackAttributesState.muted&&e._playbackAttributesState.muted||"boolean"==typeof e._config.playback.muted&&e._config.playback.muted||e.muted;return k._logger.debug("Muted value is:",t),t},r=function(){k._logger.debug("Start autoplay"),e._fallbackToMutedAutoPlay&&(e._fallbackToMutedAutoPlay=!1,e.muted=!1),e.play()},i=function(){k._logger.debug("Start muted autoplay"),e.play()},a=function(){k._logger.debug("Fallback to muted autoplay"),e._fallbackToMutedAutoPlay=!0,e.muted=!0,e.dispatchEvent(new y.v(v.nQ.FALLBACK_TO_MUTED_AUTOPLAY)),e.play()},o=function(){k._logger.warn("Autoplay failed, pause player"),e._posterManager.show(),e.load(),e.dispatchEvent(new y.v(v.nQ.AUTOPLAY_FAILED))}}},{key:"_handleAutoPlay",value:function(){(this.isAudio()||this._config.playback.autoplay!==Le.B.TRUE)&&this._posterManager.show(),this._config.playback.autoplay===Le.B.TRUE&&this._autoPlay()}},{key:"_playAfterAsyncMiddleware",value:function(){var e=this;this._engine?this._play():this._eventManager.listenOnce(this,v.nQ.SOURCE_SELECTED,(function(){return e._play()}))}},{key:"_load",value:function(){var e=this;if(this._engine&&!this.src&&!this._loading){this._loading=!0;var t=this._sources.startTime;this._engine.load(t).then((function(n){e.isLive()&&(-1===t||Number(t)>=Number(e.duration))&&(e._isOnLiveEdge=!0),e._updateTracks(n.tracks),e.dispatchEvent(new y.v(v.nQ.TRACKS_CHANGED,{tracks:e._tracks})),e.sources.thumbnails&&e._externalThumbnailsHandler.load(e.sources.thumbnails)})).finally((function(){e._loading=!1,e._reset=!1}))}}},{key:"_handleDimensions",value:function(){var e=this.config.dimensions;f.c7.isObject(e)&&!f.c7.isEmptyObject(e)&&(this.dimensions=e)}},{key:"_play",value:function(){var e=this;this._shouldLoadAfterAttach&&(this._load(),this._shouldLoadAfterAttach=!1),this.ready().then((function(){e._shouldPlayerSeekToLiveEdge()&&e.seekToLiveEdge(),e._engine.play()}))}},{key:"_shouldPlayerSeekToLiveEdge",value:function(){if(this.isLive()){var e=!this.isDvr()||"number"==typeof this.currentTime&&this.currentTime<0;return this._firstPlay?!!this.src&&!this.isOnLiveEdge()&&void 0===this._sources.startTime:e}return!1}},{key:"_pause",value:function(){this._engine.pause()}},{key:"_setCurrentTime",value:function(e){if(this._engine&&f.Mr.isNumber(e)){var t=e;e<0&&(t=0);var n=this.isLive()?this._engine.duration:this._engine.duration-.1;t>n&&(t=n),this._engine.currentTime=t}}},{key:"_onPause",value:function(){this._isOnLiveEdge=!1}},{key:"_onPlay",value:function(){this._firstPlay&&(this._firstPlay=!1,this.dispatchEvent(new y.v(v.nQ.FIRST_PLAY)),this.hideBlackCover(),"number"==typeof this._playbackAttributesState.rate&&(this.playbackRate=this._playbackAttributesState.rate))}},{key:"_onPlaying",value:function(){this._firstPlaying||(this._firstPlaying=!0,this.isAudio()||this._posterManager.hide(),this.dispatchEvent(new y.v(v.nQ.FIRST_PLAYING))),this._engine&&this._pendingSelectedVideoTrack&&(this._engine.selectVideoTrack(this._pendingSelectedVideoTrack),this._pendingSelectedVideoTrack=void 0)}},{key:"_onPlayFailed",value:function(e){this._firstPlay&&this._config.playback.autoplay&&(this._posterManager.show(),this.dispatchEvent(new y.v(v.nQ.AUTOPLAY_FAILED,e.payload)))}},{key:"_onEnded",value:function(){this.paused||this._pause()}},{key:"_resetStateFlags",value:function(){this._loading=!1,this._firstPlay=!0,this._loadingMedia=!1,this._playbackStart=!1,this._firstPlaying=!1}},{key:"_calcRatio",value:function(e,t){if(void 0!==t.ratio&&(this._aspectRatio=t.ratio),this._aspectRatio){var n=this._aspectRatio.split(":").map((function(e){return Number(e)})),i=(0,r.Z)(n,2),a=i[0],o=i[1];if(t.width||!t.width&&!t.height){var s=o/a*e.clientWidth;e.style.height="".concat(s,"px")}else if(t.height&&!t.width){var l=a/o*e.clientHeight;e.style.width="".concat(l,"px")}}}},{key:"_onTracksChanged",value:function(e){this._updateTracks(e.payload.tracks),this.dispatchEvent(e)}},{key:"_updateTracks",value:function(e){k._logger.debug("Tracks changed",e),this._tracks=null==e?void 0:e.concat(this._externalCaptionsHandler.getExternalTracks(e)),this._applyABRRestriction(this._config),this._addTextTrackOffOption(),this._maybeSetTracksLabels(),this._setDefaultTracks()}},{key:"_getTracksByType",value:function(e){return this._tracks.reduce((function(t,n){return n instanceof e&&n.available&&t.push(n),t}),[])}},{key:"_getImageTracks",value:function(){return this._getTracksByType(Me.Z)}},{key:"_getTextTracks",value:function(){return this._getTracksByType(C.PZ)}},{key:"_getVideoTracks",value:function(){return this._getTracksByType(S.Z)}},{key:"_getAudioTracks",value:function(){return this._getTracksByType(w.Z)}},{key:"_markActiveTrack",value:function(e){var t;if(e instanceof S.Z?t=this._getVideoTracks():e instanceof w.Z?t=this._getAudioTracks():e instanceof C.PZ&&(t=this._getTextTracks()),t)for(var n=0;n<t.length;n++)t[n].active=e.index===t[n].index}},{key:"_onCueChange",value:function(e){k._logger.debug("Text cue changed",e.payload.cues);try{this._activeTextCues=e.payload.cues.filter((function(e,t,n){var r=n[t-1];return!r||!(e.startTime===r.startTime&&e.endTime===r.endTime&&e.text.trim()===r.text.trim())}))}catch(t){this._activeTextCues=e.payload.cues}this._updateCueDisplaySettings(),this._updateTextDisplay(this._activeTextCues),this.dispatchEvent(e)}},{key:"_updateCueDisplaySettings",value:function(){for(var e=this._activeTextCues,t=this._textDisplaySettings,n=0;n<e.length;n++){var r=e[n];for(var i in t)t[i]&&(r[i]=t[i])}}},{key:"_updateTextDisplay",value:function(e){this._config.text.useShakaTextTrackDisplay&&this._applyCustomSubtitleStyles(),this._config.text.useNativeTextTrack||this._config.text.useShakaTextTrackDisplay||function(e,t,n,r){if(!e||!t||!n)return null;for(;n.firstChild;)n.removeChild(n.firstChild);var i=e.document.createElement("div");if(i.style.position="absolute",i.style.left="0",i.style.right="0",i.style.top="0",i.style.bottom="0",i.style.margin="1.5%",n.appendChild(i),function(e){for(var t=0;t<e.length;t++)if(e[t].hasBeenReset||!e[t].displayState)return!0;return!1}(t)){var a=[],o=K.getSimpleBoxPosition(i),s=o.height<o.width?o.height:o.width,l={font:Math.round(.058*s*100)/100*1*r.implicitFontScale+"px "+r.fontFamily,textAlign:r.textAlign,color:x.Z.toRGBA(r.fontColor,r.fontOpacity),backgroundColor:x.Z.toRGBA(r.backgroundColor,r.backgroundOpacity),textShadow:r.getTextShadow()};!function(){for(var n,r,s=0;s<t.length;s++)r=t[s],n=new G(e,r,l),i.appendChild(n.div),z(0,n,o,a),r.displayState=n.div,a.push(K.getSimpleBoxPosition(n))}()}else for(var u=0;u<t.length;u++)i.appendChild(t[u].displayState)}(window,e,this._textDisplayEl,this._textStyle)}},{key:"_addTextTrackOffOption",value:function(){var e=this._getTextTracks();e&&e.length&&this._tracks.push(new C.PZ({active:!1,kind:C.PZ.KIND.SUBTITLES,label:"Off",language:nt}))}},{key:"_setDefaultTracks",value:function(){var e=this.getActiveTracks(),t=this._getTextTracks().find((function(e){return e.default})),n=this.config.playback,r=this._getTextTracks().find((function(e){return C.PZ.langComparer(nt,e.language)})),i=this._getLanguage(this._getTextTracks(),n.textLanguage,t),a=!this._playbackAttributesState.textLanguage||this.config.disableUserCache?i:this._playbackAttributesState.textLanguage,o=this._playbackAttributesState.audioLanguage||this._getLanguage(this._getAudioTracks(),n.audioLanguage,e.audio);n.captionsDisplay?a===n.textLanguage?this._setDefaultTrack(this._getTextTracks(),a,r,n.additionalTextLanguage):this._setDefaultTrack(this._getTextTracks(),a,r):(this._playbackAttributesState.textLanguage=i,this._setDefaultTrack(this._getTextTracks(),nt,r)),o===n.audioLanguage?this._setDefaultTrack(this._getAudioTracks(),o,e.audio,n.additionalAudioLanguage):this._setDefaultTrack(this._getAudioTracks(),o,e.audio),this._setDefaultVideoTrack()}},{key:"_getLanguage",value:function(e,t,n){var r=t;if(r===tt){var i=e.find((function(e){return A.Z.langComparer(m.language,e.language)}));i?r=i.language:n&&n.language!==nt?r=n.language:e&&e.length>0&&(r=e[0].language)}return r}},{key:"_setDefaultTrack",value:function(e,t,n,r){var i=this,a=function(e){i.selectTrack(e),i._markActiveTrack(e)},o=e.find((function(e){return A.Z.langComparer(t,e.language,r,!0)}));if(o)a(o);else{var s=e.find((function(e){return A.Z.langComparer(t,e.language,r,!1)}));s?a(s):n&&!n.active&&this.selectTrack(n)}}},{key:"_setDefaultVideoTrack",value:function(){var e=this,t=this._getVideoTracks().sort((function(e,t){return t.bandwidth-e.bandwidth})),n=t.find((function(t){var n;return t.label&&t.label===(null===(n=e._playbackAttributesState.videoTrack)||void 0===n?void 0:n.label)}));n||(n=t.find((function(t){var n;return t.height&&t.height===(null===(n=e._playbackAttributesState.videoTrack)||void 0===n?void 0:n.height)}))),n&&this.selectTrack(n)}},{key:"_maybeSetTracksLabels",value:function(){var e=this._config.customLabels;if(e)for(var t in e){if(!Object.prototype.hasOwnProperty.call(e,t))return;switch(t){case"qualities":this._setTracksCustomLabels(this._getVideoTracks(),e[t]);break;case"audio":this._setTracksCustomLabels(this._getAudioTracks(),e[t]);break;case"captions":this._setTracksCustomLabels(this._getTextTracks(),e[t])}}}},{key:"_setTracksCustomLabels",value:function(e,t){e.forEach((function(e){var n=t(f.c7.copyDeep(e));n&&(e.label=n)}))}},{key:"Event",get:function(){return v.tw}},{key:"TextStyle",get:function(){return x.Z}},{key:"State",get:function(){return E.Y}},{key:"Track",get:function(){return X.V}},{key:"LogLevelType",get:function(){return b.hX}},{key:"LogLevel",get:function(){return b.in}},{key:"AbrMode",get:function(){return ee.n}},{key:"MediaType",get:function(){return J.D}},{key:"StreamType",get:function(){return Q.j}},{key:"EngineType",get:function(){return $.r}},{key:"CorsType",get:function(){return te.X}},{key:"AdBreakType",get:function(){return Ce.S}},{key:"AdTagType",get:function(){return xe.J}},{key:"Error",get:function(){return _.Z}},{key:"setCachedUrls",value:function(e){this._cachedUrls=e,this._engine&&this._engine.setCachedUrls&&(this._engine.setCachedUrls(e),this._cachedUrls=[])}}],[{key:"runCapabilities",value:function(){k._logger.debug("Running player capabilities"),Te.zv.getEngines().forEach((function(e){return e.runCapabilities()}))}},{key:"getCapabilities",value:function(e){k._logger.debug("Get player capabilities",e);var t=[];return Te.zv.getEngines().forEach((function(e){return t.push(e.getCapabilities())})),Promise.all(t).then((function(t){var n={};return t.forEach((function(e){return Object.assign(n,e)})),e?n[e]:n}))}},{key:"setCapabilities",value:function(e,t){k._logger.debug("Set player capabilities",e,t);var n=Te.zv.getEngines().find((function(t){return t.id===e}));n&&n.setCapabilities(t)}},{key:"_defaultConfig",get:function(){return f.c7.copyDeep(se)}}]),k}(g.H);(0,c.Z)(rt,"_logger",(0,b.ZP)("Player"))},9769:function(e,t,n){"use strict";n.d(t,{Y:function(){return r}});var r={IDLE:"idle",LOADING:"loading",PLAYING:"playing",PAUSED:"paused",BUFFERING:"buffering"}},4919:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(5671),i=n(3144),a=function(){function e(t){(0,r.Z)(this,e),this.type=t,this._duration=0,this._timestamp=Date.now()/1e3}return(0,i.Z)(e,[{key:"duration",get:function(){return this._duration},set:function(e){this._duration=e-this._timestamp}}]),e}()},5590:function(e,t,n){"use strict";n.d(t,{F:function(){return a}});var r=n(5671),i=n(3144),a=function(){function e(t){(0,r.Z)(this,e);var n=t.url,i=t.width,a=t.height,o=t.x,s=t.y;this._url=n,this._width=i,this._height=a,this._x=o,this._y=s}return(0,i.Z)(e,[{key:"url",get:function(){return this._url}},{key:"width",get:function(){return this._width}},{key:"height",get:function(){return this._height}},{key:"x",get:function(){return this._x}},{key:"y",get:function(){return this._y}}]),e}()},6820:function(e,t,n){"use strict";n.d(t,{n:function(){return r}});var r={MANUAL:"manual",AUTO:"auto"}},7812:function(e,t,n){"use strict";var r=n(3144),i=n(5671),a=n(9340),o=n(2963),s=n(1120),l=function(e){(0,a.Z)(u,e);var t,n,l=(t=u,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,s.Z)(t);if(n){var i=(0,s.Z)(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return(0,o.Z)(this,e)});function u(){return(0,i.Z)(this,u),l.apply(this,arguments)}return(0,r.Z)(u)}(n(8413).Z);t.Z=l},2983:function(e,t,n){"use strict";var r=n(5671),i=n(3144),a=n(9340),o=n(2963),s=n(1120),l=function(e){(0,a.Z)(u,e);var t,n,l=(t=u,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,s.Z)(t);if(n){var i=(0,s.Z)(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return(0,o.Z)(this,e)});function u(e){var t;(0,r.Z)(this,u),t=l.call(this,e);var n=e.url,i=e.width,a=e.height,o=e.duration,s=e.rows,c=e.cols,d=e.customData;return t._url=n,t._width=i,t._height=a,t._duration=o,t._customData=d,t._rows=s||1,t._cols=c||1,t}return(0,i.Z)(u,[{key:"url",get:function(){return this._url}},{key:"width",get:function(){return this._width}},{key:"height",get:function(){return this._height}},{key:"duration",get:function(){return this._duration}},{key:"rows",get:function(){return this._rows}},{key:"cols",get:function(){return this._cols}},{key:"customData",get:function(){return this._customData}},{key:"sliceWidth",get:function(){return this._width/this._cols}},{key:"sliceHeight",get:function(){return this._height/this._rows}}]),u}(n(8413).Z);t.Z=l},6234:function(e,t,n){"use strict";var r=n(5671),i=n(3144),a=n(4942),o=function(){function e(){(0,r.Z)(this,e),(0,a.Z)(this,"_fontSizeIndex",2),(0,a.Z)(this,"textAlign",e.FontAlignment[0].value),(0,a.Z)(this,"fontFamily",e.FontFamily.SANS_SERIF),(0,a.Z)(this,"fontColor",e.StandardColors.WHITE),(0,a.Z)(this,"fontOpacity",e.StandardOpacities.OPAQUE),(0,a.Z)(this,"backgroundColor",e.StandardColors.BLACK),(0,a.Z)(this,"backgroundOpacity",e.StandardOpacities.OPAQUE),(0,a.Z)(this,"fontEdge",e.EdgeStyles.NONE)}return(0,i.Z)(e,[{key:"fontSize",get:function(){return e.FontSizes[this._fontSizeIndex].label},set:function(t){var n=e.FontSizes.findIndex((function(e){return e.label===t}));-1!==n&&(this._fontSizeIndex=n)}},{key:"fontScale",get:function(){return e.FontSizes[this._fontSizeIndex].value},set:function(t){var n=e.FontSizes.findIndex((function(e){return e.value===t}));-1!==n&&(this._fontSizeIndex=n)}},{key:"getTextShadow",value:function(){for(var t=[],n=0;n<this.fontEdge.length;n++){var r=this.fontEdge[n].slice(0,3),i=this.fontEdge[n].slice(3,6);t.push(e.toRGBA(r,this.fontOpacity)+" "+i.join("px ")+"px")}return t.join(",")}},{key:"toCSS",value:function(){var t=[];return t.push("text-align: "+this.textAlign),t.push("font-family: "+this.fontFamily),t.push("color: "+e.toRGBA(this.fontColor,this.fontOpacity)),t.push("background: linear-gradient(0deg, ".concat(e.toRGBA(this.backgroundColor,this.backgroundOpacity),", ").concat(e.toRGBA(this.backgroundColor,this.backgroundOpacity),")")),t.push("font-size: "+this.fontSize),t.push("text-shadow: "+this.getTextShadow()),t.join("!important; ")}},{key:"clone",value:function(){return e.fromJson(e.toJson(this))}},{key:"isEqual",value:function(t){return JSON.stringify(e.toJson(this))===JSON.stringify(e.toJson(t))}},{key:"implicitFontScale",get:function(){return.25*e.FontSizes[this._fontSizeIndex].value+1}}],[{key:"toRGBA",value:function(e,t){return"rgba("+e.concat(t).join(",")+")"}},{key:"fromJson",value:function(t){var n=function(e,t){return null!=e?e:t},r=new e;return r.fontEdge=n(t.fontEdge,r.fontEdge),r.fontSize=n(t.fontSize,r.fontSize),r.textAlign=n(t.textAlign,r.textAlign),r.fontScale=n(t.fontScale,r.fontScale),r.fontColor=n(t.fontColor,r.fontColor),r.fontOpacity=n(t.fontOpacity,r.fontOpacity),r.backgroundColor=n(t.backgroundColor,r.backgroundColor),r.backgroundOpacity=n(t.backgroundOpacity,r.backgroundOpacity),r.fontFamily=n(t.fontFamily,r.fontFamily),r}},{key:"toJson",value:function(e){return{fontEdge:e.fontEdge,fontSize:e.fontSize,textAlign:e.textAlign,fontScale:e.fontScale,fontColor:e.fontColor,fontOpacity:e.fontOpacity,backgroundColor:e.backgroundColor,backgroundOpacity:e.backgroundOpacity,fontFamily:e.fontFamily}}}]),e}();(0,a.Z)(o,"FontFamily",{ARIAL:"Arial",HELVETICA:"Helvetica",VERDANA:"Verdana",SANS_SERIF:"sans-serif"}),(0,a.Z)(o,"StandardColors",{WHITE:[255,255,255],BLACK:[0,0,0],RED:[255,0,0],GREEN:[0,255,0],BLUE:[0,0,255],YELLOW:[255,255,0],MAGENTA:[255,0,255],CYAN:[0,255,255]}),(0,a.Z)(o,"StandardOpacities",{OPAQUE:1,SEMI_HIGH:.75,SEMI_LOW:.25,TRANSPARENT:0}),(0,a.Z)(o,"EdgeStyles",{NONE:[],RAISED:[[34,34,34,1,1,0],[34,34,34,2,2,0],[34,34,34,3,3,0]],DEPRESSED:[[204,204,204,1,1,0],[204,204,204,0,1,0],[34,34,34,-1,-1,0],[34,34,34,0,-1,0]],UNIFORM:[[34,34,34,0,0,4],[34,34,34,0,0,4],[34,34,34,0,0,4],[34,34,34,0,0,4]],DROP:[[34,34,34,2,2,3],[34,34,34,2,2,4],[34,34,34,2,2,5]]}),(0,a.Z)(o,"FontSizes",[{value:-2,label:"50%"},{value:-1,label:"75%"},{value:0,label:"100%"},{value:2,label:"200%"},{value:3,label:"300%"},{value:4,label:"400%"}]),(0,a.Z)(o,"FontAlignment",[{label:"Default",value:"default"},{label:"Left",value:"left"},{label:"Center",value:"center"},{label:"Right",value:"right"}]),t.Z=o},6462:function(e,t,n){"use strict";n.d(t,{PZ:function(){return p},ZP:function(){return p},z6:function(){return f}});var r=n(5671),i=n(3144),a=n(9340),o=n(2963),s=n(1120),l=n(4942),u=n(8413),c=n(962);function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var p=function(e){(0,a.Z)(u,e);var t,n,l=(t=u,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,s.Z)(t);if(n){var i=(0,s.Z)(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return(0,o.Z)(this,e)});function u(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,r.Z)(this,u),(e=l.call(this,t))._label=e.label||e.language,e._kind=t.kind,e._external=t.external,e._index=u._generateIndex(),e._default=t.default||!1,e}return(0,i.Z)(u,[{key:"mode",get:function(){return this._mode},set:function(e){this._mode=e}},{key:"kind",get:function(){return this._kind}},{key:"external",get:function(){return this._external}},{key:"default",get:function(){return this._default}}],[{key:"_generateIndex",value:function(){return u._tracksCount++}},{key:"reset",value:function(){u._tracksCount=0}},{key:"isMetaDataTrack",value:function(e){return e&&e.kind===u.KIND.METADATA}},{key:"isNativeTextTrack",value:function(e){return e&&[u.KIND.SUBTITLES,u.KIND.CAPTIONS].includes(e.kind)}},{key:"isExternalTrack",value:function(e){return e&&[e.language,e.label].includes(u.EXTERNAL_TRACK_ID)}}]),u}(u.Z);function f(e){var t,n=[],r=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return d(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?d(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}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 a,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}(e);try{for(r.s();!(t=r.n()).done;){var i=t.value;if(VTTCue&&i instanceof VTTCue||window.DataCue&&i instanceof window.DataCue)n.push(i);else if(TextTrackCue&&i instanceof TextTrackCue)try{n.push(new VTTCue(i.startTime,i.endTime,i.text))}catch(e){new c.Z(c.Z.Severity.RECOVERABLE,c.Z.Category.TEXT,c.Z.Code.UNABLE_TO_CREATE_TEXT_CUE,e)}}}catch(e){r.e(e)}finally{r.f()}return n}(0,l.Z)(p,"MODE",{DISABLED:"disabled",SHOWING:"showing",HIDDEN:"hidden"}),(0,l.Z)(p,"KIND",{METADATA:"metadata",SUBTITLES:"subtitles",CAPTIONS:"captions"}),(0,l.Z)(p,"EXTERNAL_TRACK_ID","playkit-external-track"),(0,l.Z)(p,"_tracksCount",0)},375:function(e,t,n){"use strict";n.d(t,{D:function(){return a},PC:function(){return o},cP:function(){return s}});var r=n(3144),i=n(5671),a=(0,r.Z)((function e(t,n,r,a,o){(0,i.Z)(this,e),this.startTime=t,this.endTime=n,this.id=r,this.type=a,this.metadata=o}));function o(e){try{var t=e.startTime,n=e.endTime,r=e.id,i=e.type,a=e.metadata,o=new VTTCue(t,n,""),s={key:i,data:a};return o.id=r,o.value=s,o}catch(e){return null}}function s(e){if(e){var t=e.startTime,n=e.endTime,r=e.id;if(l(e)){var i=l(e),o=i.type,s=i.metadata;return new a(t,n,r,o,s)}}return null}function l(e){if(e&&"value"in e&&e.value){var t=e.type,n=e.value,r=e.track,i=n.key,o=n.data,s="org.id3"===t||"id3"===(r&&r.label),l=Object.values(a.TYPE).find((function(e){return e===i}));return l||(l=s?a.TYPE.ID3:a.TYPE.CUSTOM),{type:l,metadata:s||!o?n:o}}return null}a.TYPE={ID3:"id3",EMSG:"emsg",CUE_POINT:"cuepoint",CUSTOM:"custom"}},5856:function(e,t,n){"use strict";n.d(t,{V:function(){return r}});var r={VIDEO:"video",AUDIO:"audio",TEXT:"text",IMAGE:"image"}},8413:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(3433),i=n(5671),a=n(3144);function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var s=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,i.Z)(this,e),this._id=t.id,this._active=t.active,this._label=t.label,this._language=t.language,this._index=t.index,this._available="boolean"!=typeof t.available||t.available,this.clone=e.clone.bind(null,this)}return(0,a.Z)(e,[{key:"id",get:function(){return this._id}},{key:"active",get:function(){return this._active},set:function(e){this._active=e}},{key:"label",get:function(){return this._label},set:function(e){this._label=e}},{key:"language",get:function(){return this._language}},{key:"index",get:function(){return this._index},set:function(e){this._index=e}},{key:"available",get:function(){return this._available},set:function(e){this._available=e}}],[{key:"langComparer",value:function(t,n,i,a){try{var o;return o=Array.isArray(i)?[t].concat((0,r.Z)(i)):[t,i],e._langComparer(o,n,a)}catch(e){return!1}}},{key:"_langComparer",value:function(e,t,n){var r,i=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}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 a,s=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){l=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(l)throw a}}}}(e);try{for(i.s();!(r=i.n()).done;){var a=r.value;if(""!==(null==a?void 0:a.trim()))if(n){if(this._isLangEqual(a,t))return!0}else if(this._isLangPrefixEqual(a,t))return!0}}catch(e){i.e(e)}finally{i.f()}return!1}},{key:"_isLangEqual",value:function(e,t){return e.toLowerCase()===t.toLowerCase()}},{key:"_isLangPrefixEqual",value:function(e,t){return e.toLowerCase().startsWith(t.toLowerCase())||t.toLowerCase().startsWith(e.toLowerCase())}},{key:"clone",value:function(e){return Object.assign(Object.create(Object.getPrototypeOf(e)),e)}}]),e}()},4877:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(5671),i=n(3144),a=n(9340),o=n(2963),s=n(1120),l=function(e){(0,a.Z)(u,e);var t,n,l=(t=u,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,s.Z)(t);if(n){var i=(0,s.Z)(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return(0,o.Z)(this,e)});function u(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,r.Z)(this,u),(e=l.call(this,t))._bandwidth=t.bandwidth,e._width=t.width,e._height=t.height,e._label=t.label?t.label:e._height?e._height+"p":void 0,e}return(0,i.Z)(u,[{key:"bandwidth",get:function(){return this._bandwidth}},{key:"width",get:function(){return this._width}},{key:"height",get:function(){return this._height}}]),u}(n(8413).Z)},9150:function(e,t,n){"use strict";n.r(t),n.d(t,{TrackType:function(){return r.V}});var r=n(5856),i=n(5901),a={};for(var o in i)["default","TrackType"].indexOf(o)<0&&(a[o]=function(e){return i[e]}.bind(0,o));n.d(t,a)},2069:function(e,t,n){"use strict";var r,i=n(2238),a=n.n(i),o=/^.*(web0s).*(smarttv).*$/i,s=/^.*(smart-tv).*(tizen).*$/i,l=/^.*(vidaa).*(smarttv).*$/i,u=[[s],[[a().BROWSER.NAME,"SAMSUNG_TV_BROWSER"],[a().BROWSER.MAJOR,""],[a().BROWSER.VERSION,""]]],c=[[o],[a().OS.NAME],[l],[a().OS.NAME]],d=[[o],[[a().DEVICE.VENDOR,"LG"],[a().DEVICE.TYPE,a().DEVICE.SMARTTV]],[s],[[a().DEVICE.VENDOR,"SAMSUNG"],[a().DEVICE.TYPE,a().DEVICE.SMARTTV]],[l],[[a().DEVICE.VENDOR,"HISENSE"],[a().DEVICE.TYPE,a().DEVICE.SMARTTV]],[/^.*(smart-tv|smarttv).*$/i],[[a().DEVICE.TYPE,a().DEVICE.SMARTTV]]],p=[[/(edg)\/((\d+)?[\w.]+)/i],[[a().BROWSER.NAME,"Edge"],a().BROWSER.VERSION,a().BROWSER.MAJOR]],f=[].concat(p,u),h=new(a())(void 0,{browser:f,device:d,os:c}).getResult();h.isConsole=h.device.type===a().DEVICE.CONSOLE,h.isSmartTV=h.device.type===a().DEVICE.SMARTTV,h.isMobile=h.device.type===a().DEVICE.MOBILE,h.isTablet=h.device.type===a().DEVICE.TABLET,h.isWearable=h.device.type===a().DEVICE.WEARABLE,h.isEmbedded=h.device.type===a().DEVICE.EMBEDDED,h.isIPadOS="Mac OS"===h.os.name&&"ontouchend"in document,h.isSafari=Boolean(null===(r=h.browser.name)||void 0===r?void 0:r.includes("Safari")),h.isIOS="iOS"===h.os.name,h.isMacOS="Mac OS"===h.os.name,t.Z=h},7916:function(e,t,n){"use strict";n.r(t),n.d(t,{Dom:function(){return r.is},Generator:function(){return r.RO},Http:function(){return r.eV},MultiMap:function(){return y.k},Number:function(){return r.Mr},Object:function(){return r.c7},ResizeWatcher:function(){return f},String:function(){return r.Ld},VERSION:function(){return r.q4},binarySearch:function(){return g},getSubtitleStyleSheet:function(){return m},resetSubtitleStyleSheet:function(){return b}});var r=n(4821),i=n(4942),a=n(5671),o=n(3144),s=n(9340),l=n(2963),u=n(1120),c=n(8987),d=n(8171),p=n(2114),f=function(e){(0,s.Z)(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,u.Z)(t);if(n){var i=(0,u.Z)(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return(0,l.Z)(this,e)});function i(){return(0,a.Z)(this,i),r.call(this)}return(0,o.Z)(i,[{key:"destroy",value:function(){this._observer&&this._observer.disconnect(),this._observer=void 0,this._el=void 0}},{key:"init",value:function(e){this._observer||(this._el=e,window.ResizeObserver?this._createNativeObserver():this._createIframeObserver(),this._el instanceof HTMLElement&&this._observer&&this._observer.observe(this._el))}},{key:"_createNativeObserver",value:function(){var e=this;this._observer=new ResizeObserver((function(t){t.forEach((function(){e._triggerResize()}))}))}},{key:"_createIframeObserver",value:function(){this._observer=new h(this._triggerResize.bind(this))}},{key:"_triggerResize",value:function(){this.dispatchEvent(new c.v(p.nQ.RESIZE))}}]),i}(d.H),h=function(){function e(t){(0,a.Z)(this,e),(0,i.Z)(this,"_observersStore",{}),this._onChangeCallback=t}return(0,o.Z)(e,[{key:"observe",value:function(e){var t=this,n=this._createIframe(),r=e.getAttribute("id");this._observersStore[r]=n,e.appendChild(n),n.contentWindow.onresize=function(){return t._onChangeCallback()}}},{key:"disconnect",value:function(){for(var e in this._observersStore){var t=document.getElementById(e),n=this._observersStore[e];n.onresize=null,t&&(t.removeChild(n),delete this._observersStore[t.getAttribute("id")])}}},{key:"_createIframe",value:function(){var e=document.createElement("iframe");return e.className="playkit-size-iframe",e}}]),e}(),y=n(9654);function g(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){return 1};if(0===e.length||1===e.length&&0!==t(e[0]))return null;var n=Math.floor(e.length/2);return 0===t(e[n])?e[n]:t(e[n])>0?g(e.slice(0,n),t):g(e.slice(n+1),t)}var v="playkit-subtitles-style",m=function(e){var t=r.is.getElementBySelector(".".concat(e,".").concat(v));return t||(t=r.is.createElement("style"),r.is.addClassName(t,e),r.is.addClassName(t,v),r.is.appendChild(document.head,t)),t.sheet},b=function(e){var t=r.is.getElementBySelector(".".concat(e,".").concat(v));null==t||t.remove()}},4358:function(e,t,n){"use strict";n.d(t,{Ub:function(){return c},ZO:function(){return u},hX:function(){return o},hs:function(){return s},in:function(){return a},jl:function(){return l}});var r=n(5901),i=n.n(r),a={DEBUG:i().DEBUG,INFO:i().INFO,TIME:i().TIME,WARN:i().WARN,ERROR:i().ERROR,OFF:i().OFF,TRACE:i().TRACE},o={};function s(e){i().setHandler((function(t,n){return e(t,n)}))}function l(e){return e?i().get(e):i()}function u(e){return l(e).getLevel()}function c(e,t){l(t).setLevel(e)}Object.keys(a).forEach((function(e){o[e]=e})),i().useDefaults({defaultLevel:i().ERROR}),t.ZP=l},9654:function(e,t,n){"use strict";n.d(t,{k:function(){return o}});var r=n(5671),i=n(3144);function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var o=function(){function e(){(0,r.Z)(this,e),this._map=new Map}return(0,i.Z)(e,[{key:"push",value:function(e,t){if(this._map.has(e)){var n=this._map.get(e);Array.isArray(n)&&(n.push(t),this._map.set(e,n))}else this._map.set(e,[t])}},{key:"set",value:function(e,t){this._map.set(e,t)}},{key:"has",value:function(e){return this._map.has(e)}},{key:"get",value:function(e){var t=this._map.get(e);return t?t.slice():[]}},{key:"getAll",value:function(){var e,t=[],n=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return a(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}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 o,s=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){l=!0,o=e},f:function(){try{s||null==n.return||n.return()}finally{if(l)throw o}}}}(this._map.values());try{for(n.s();!(e=n.n()).done;){var r=e.value;t=t.concat(r)}}catch(e){n.e(e)}finally{n.f()}return t}},{key:"remove",value:function(e,t){if(this._map.has(e)){var n=this._map.get(e);if(Array.isArray(n)){for(var r=0;r<n.length;++r)n[r]===t&&(n.splice(r,1),--r);0===n.length&&this._map.delete(e)}}}},{key:"keys",value:function(){return this._map.keys()}},{key:"clear",value:function(){this._map.clear()}}]),e}()},1177:function(e,t,n){"use strict";function r(e,t){var n=function(e,t){var n=1/0,r=function(e,t,r){return e>=(t||0)&&e<=(r||n)},i=t.maxHeight,a=t.minHeight,o=t.maxWidth,s=t.minWidth;if(0!==a||0!==s||i!==n||o!==n)return e.filter((function(e){return r(e.height,a,i)})).filter((function(e){return r(e.width,s,o)}));var l=t.maxBitrate,u=t.minBitrate;return 0!==u||l!==n?e.filter((function(e){return r(e.bandwidth,u,l)})):e}(e,t);return n.length?n:[]}n.d(t,{u:function(){return r}})},4821:function(e,t,n){"use strict";n.d(t,{is:function(){return g},RO:function(){return y},eV:function(){return v},Mr:function(){return p},c7:function(){return h},Ld:function(){return f},q4:function(){return m}});var r=n(3878),i=n(9199),a=n(181),o=n(5267),s=n(4942),l=n(1002),u=n(962),c="responseFormat=jsonp&callback=";function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var p={isNumber:function(e){return Number(e)===e},isInt:function(e){return this.isNumber(e)&&e%1==0},isFloat:function(e){return this.isNumber(e)&&e%1!=0}},f={capitlize:function(e){return"string"!=typeof e?e:e.charAt(0).toUpperCase()+e.slice(1)},endsWith:function(e,t){return"string"==typeof e&&"string"==typeof t&&-1!==e.indexOf(t,e.length-t.length)}},h={merge:function(e){var t,n={},r=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return d(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?d(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}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 a,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}(e);try{for(r.s();!(t=r.n()).done;){var i=t.value;Object.assign(n,i)}}catch(e){r.e(e)}finally{r.f()}return n},isObject:function(e){return e&&"object"===(0,l.Z)(e)&&!Array.isArray(e)},isClassInstance:function(e){return e&&e.constructor&&e.constructor.name&&"Object"!==e.constructor.name},mergeDeep:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if(!n.length)return e;var i=n.shift();if(this.isObject(e)&&this.isObject(i))for(var a in i)this.isObject(i[a])&&!this.isClassInstance(i[a])?(e[a]||Object.assign(e,(0,s.Z)({},a,{})),this.mergeDeep(e[a],i[a])):Object.assign(e,(0,s.Z)({},a,i[a]));return this.mergeDeep.apply(this,[e].concat(n))},copyDeep:function(e){var t,n=this;return Array.isArray(e)?(t=e.length>0?e.slice(0):[]).forEach((function(e,r){("object"===(0,l.Z)(e)||Array.isArray(e)&&e.length>0)&&(t[r]=n.copyDeep(e))})):null!==e&&"object"===(0,l.Z)(e)?e.clone&&"function"==typeof e.clone?t=e.clone():(t=Object.assign({__proto__:e.__proto__},e),Object.keys(t).forEach((function(e){("object"===(0,l.Z)(t[e])||Array.isArray(t[e])&&t[e].length>0)&&(t[e]=n.copyDeep(t[e]))}))):t=e,t},isEmptyObject:function(e){for(var t in e)if(Object.hasOwnProperty.call(e,t))return!1;return!0},getPropertyPath:function(e,t){return t.split(".").reduce((function(e,t){return null==e?e:e[t]}),e)},hasPropertyPath:function(e,t){if(!t)return!1;for(var n=t.split("."),r=0;r<n.length;r++){var i=n[r];if(!e||!Object.hasOwnProperty.call(e,i))return!1;e=e[i]}return!0},createPropertyPath:function(e,t){for(var n,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,l=t.split("."),u=e;l.length>1;){var c=(n=l,(0,r.Z)(n)||(0,i.Z)(n)||(0,a.Z)(n)||(0,o.Z)()),d=c[0];l=c.slice(1),void 0===u[d]&&(u[d]={}),u=u[d]}return u[l[0]]=s,e},deletePropertyPath:function(e,t){if(e&&t){for(var n=t.split("."),r=0;r<n.length-1;r++)if(void 0===(e=e[n[r]]))return;delete e[n.pop()]}},defer:function(){var e,t,n=new Promise((function(n,r){e=n,t=r}));return n.resolve=e,n.reject=t,n},bind:function(e,t){return function(){t.apply(e,arguments)}}},y={uniqueId:function(e){var t=2+(!e||e<0?0:e-2);return"_"+Math.random().toString(36).slice(2,2+t)},guid:function(){var e=function(){return(65536*(1+Math.random())|0).toString(16).substring(1)};return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}},g={addClassName:function(e,t){e&&(e.classList?e.classList.add(t):g.hasClassName(e,t)||(e.className+=t))},removeClassName:function(e,t){e&&(e.classList?e.classList.remove(t):g.hasClassName(e,t)&&(e.className=e.className.replace(new RegExp("(\\s|^)"+t+"(\\s|$)")," ").replace(/^\s+|\s+$/g,"")))},hasClassName:function(e,t){return e&&e.className&&new RegExp("(^|\\s)"+t+"(\\s|$)").test(e.className)},setAttribute:function(e,t,n){e.setAttribute(t,n)},removeAttribute:function(e,t){e.removeAttribute(t)},setStyle:function(e,t,n){void 0!==e.style.getPropertyValue(t)&&e.style.setProperty(t,n)},appendChild:function(e,t){e&&t&&e.appendChild&&e.appendChild(t)},removeChild:function(e,t){e&&t&&e.removeChild&&e.removeChild(t)},prependTo:function(e,t){t.firstChild?t.insertBefore(e,t.firstChild):t.appendChild(e)},getElementById:function(e){return document.getElementById(e)},getElementsByTagName:function(e){return document.getElementsByTagName(e)},createElement:function(e){return document.createElement(e)},loadStyleSheetAsync:function(e){var t=this;return new Promise((function(n,r){var i=!1,a=t.createElement("link");a.type="text/css",a.rel="stylesheet",a.href=e,a.async=!0,a.onload=a.onreadystatechange=function(){i||this.readyState&&"complete"!==this.readyState||(i=!0,n(this))},a.onerror=a.onabort=r,g.appendChild(document.head,a)}))},loadScriptAsync:function(e){var t=this;return new Promise((function(n,r){var i=!1,a=document.getElementsByTagName("script")[0],o=t.createElement("script");o.type="text/javascript",o.src=e,o.async=!0,o.onload=o.onreadystatechange=function(){i||this.readyState&&"complete"!==this.readyState||(i=!0,n(this))},o.onerror=o.onabort=r,a&&a.parentNode&&a.parentNode.insertBefore(o,a)}))},getElementBySelector:function(e){try{return document.querySelector(e)}catch(e){return}},insertBefore:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;try{return e.insertBefore(t,n)}catch(e){return null}}},v={protocol:/^(https?:)/i.test(document.location.protocol)?document.location.protocol:"https:",execute:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"POST",r=arguments.length>3?arguments[3]:void 0,i=arguments.length>4?arguments[4]:void 0,a=arguments.length>5?arguments[5]:void 0,o=new XMLHttpRequest;return new Promise((function(s,l){o.onreadystatechange=function(){if(4===o.readyState)if(200===o.status)try{var e=JSON.parse(o.responseText);s(e)}catch(e){s(o.responseText)}else l(o.responseText)},o.open(n,e),r&&r.forEach((function(e,t){o.setRequestHeader(t,e)})),i&&(o.timeout=i),a&&(o.ontimeout=function(e){a(),l(e)}),o.send(t)}))},jsonp:function(e,t,n){var r,i=(n=n||{}).timeout?n.timeout:5e3,a=document.createElement("script"),o="jsonpcallback"+Math.round(Date.now()+1000001*Math.random()),s=e,l=function(){a&&a.parentNode&&a.parentNode.removeChild(a),window[o]=function(){},r&&clearTimeout(r)};return new Promise((function(n,d){i&&(r=setTimeout((function(){l(),d(new u.Z(u.Z.Severity.CRITICAL,u.Z.Category.NETWORK,u.Z.Code.TIMEOUT,e))}),i)),window[o]=function(r){var i=t(r,e);l(),n(i)},s.match(/\?/)?s+="&"+c+o:s+="?"+c+o,a.type="text/javascript",a.src=s,document.getElementsByTagName("head")[0].appendChild(a)}))},convertHeadersToDictionary:function(e){var t={};try{e.trim().split(/[\r\n]+/).forEach((function(e){var n=e.split(": "),r=n.shift().toLowerCase(),i=n.join(": ");t[r]=i}))}catch(e){}return t}},m={compare:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=(n=h.merge([{lexicographical:!1,zeroExtend:!0},n])).lexicographical,i=n.zeroExtend,a=(e||"0").split("."),o=(t||"0").split("."),s=function(e){return(r?/^\d+[A-Za-zαß]*$/:/^\d+[A-Za-zαß]?$/).test(e)},l=function(e){return e.map((function(e){var t=/[A-Za-zαß]/.exec(e);return Number(t?e.replace(t[0],"."+e.charCodeAt(t.index)):e)}))};if(!a.every(s)||!o.every(s))return NaN;if(i){for(;a.length<o.length;)a.push("0");for(;o.length<a.length;)o.push("0")}r||(a=l(a),o=l(o));for(var u=0;u<a.length;++u){if(o.length===u)return 1;if(a[u]!==o[u])return a[u]>o[u]?1:-1}return a.length!==o.length?-1:0}}},7774:function(e,t,n){"use strict";var r=n(7537),i=n.n(r),a=n(3645),o=n.n(a)()(i());o.push([e.id,".playkit-container {\n  position: relative;\n  width: 100%;\n  height: 100%;\n  color: #fff;\n  outline: none;\n  -webkit-touch-callout: none;\n  -webkit-user-select: none;\n  -moz-user-select: none;\n  -ms-user-select: none;\n  user-select: none;\n  -webkit-tap-highlight-color: transparent;\n}\n\n.playkit-engine {\n  width: 100%;\n  height: 100%;\n  position: absolute;\n  top: 0;\n  left: 0;\n  object-fit: contain;\n}\n\n.playkit-engine video::-webkit-media-controls-panel,\n.playkit-engine video::-webkit-media-controls-panel-container,\n.playkit-engine video::-webkit-media-controls-start-playback-button,\n.playkit-engine video::-webkit-media-controls-play-button {\n  display: none;\n  -webkit-appearance: none;\n}\n\n.playkit-poster {\n  position: absolute;\n  display: block;\n  top: 0;\n  bottom: 0;\n  left: 0;\n  right: 0;\n  background-size: contain;\n  background-position: center center;\n  background-repeat: no-repeat;\n  background-color: var(--playkit-player-background-color);\n  pointer-events: none;\n}\n\n.playkit-subtitles {\n  position: absolute;\n  top: 0;\n  bottom: 0;\n  right: 0;\n  left: 0;\n  pointer-events: none;\n  margin-bottom: 5px;\n}\n\n.playkit-black-cover {\n  position: absolute;\n  width: 100%;\n  height: 100%;\n  background-color: black;\n  pointer-events: none;\n}\n\n.playkit-size-iframe {\n  width: 100%;\n  height: 100%;\n  position: absolute;\n  border: 0;\n  z-index: -100;\n}\n\n.playkit-in-browser-fullscreen-mode {\n  width: 100% !important;\n  height: 100% !important;\n  position: fixed !important;\n  top: 0 !important;\n  left: 0 !important;\n  /*added for blocking element with fixed position which could be on the top of the player */\n  z-index: 999999 !important;\n}\n","",{version:3,sources:["webpack://./src/assets/style.css"],names:[],mappings:"AAAA;EACE,kBAAkB;EAClB,WAAW;EACX,YAAY;EACZ,WAAW;EACX,aAAa;EACb,2BAA2B;EAC3B,yBAAyB;EACzB,sBAAsB;EACtB,qBAAqB;EACrB,iBAAiB;EACjB,wCAAwC;AAC1C;;AAEA;EACE,WAAW;EACX,YAAY;EACZ,kBAAkB;EAClB,MAAM;EACN,OAAO;EACP,mBAAmB;AACrB;;AAEA;;;;EAIE,aAAa;EACb,wBAAwB;AAC1B;;AAEA;EACE,kBAAkB;EAClB,cAAc;EACd,MAAM;EACN,SAAS;EACT,OAAO;EACP,QAAQ;EACR,wBAAwB;EACxB,kCAAkC;EAClC,4BAA4B;EAC5B,wDAAwD;EACxD,oBAAoB;AACtB;;AAEA;EACE,kBAAkB;EAClB,MAAM;EACN,SAAS;EACT,QAAQ;EACR,OAAO;EACP,oBAAoB;EACpB,kBAAkB;AACpB;;AAEA;EACE,kBAAkB;EAClB,WAAW;EACX,YAAY;EACZ,uBAAuB;EACvB,oBAAoB;AACtB;;AAEA;EACE,WAAW;EACX,YAAY;EACZ,kBAAkB;EAClB,SAAS;EACT,aAAa;AACf;;AAEA;EACE,sBAAsB;EACtB,uBAAuB;EACvB,0BAA0B;EAC1B,iBAAiB;EACjB,kBAAkB;EAClB,0FAA0F;EAC1F,0BAA0B;AAC5B",sourcesContent:[".playkit-container {\n  position: relative;\n  width: 100%;\n  height: 100%;\n  color: #fff;\n  outline: none;\n  -webkit-touch-callout: none;\n  -webkit-user-select: none;\n  -moz-user-select: none;\n  -ms-user-select: none;\n  user-select: none;\n  -webkit-tap-highlight-color: transparent;\n}\n\n.playkit-engine {\n  width: 100%;\n  height: 100%;\n  position: absolute;\n  top: 0;\n  left: 0;\n  object-fit: contain;\n}\n\n.playkit-engine video::-webkit-media-controls-panel,\n.playkit-engine video::-webkit-media-controls-panel-container,\n.playkit-engine video::-webkit-media-controls-start-playback-button,\n.playkit-engine video::-webkit-media-controls-play-button {\n  display: none;\n  -webkit-appearance: none;\n}\n\n.playkit-poster {\n  position: absolute;\n  display: block;\n  top: 0;\n  bottom: 0;\n  left: 0;\n  right: 0;\n  background-size: contain;\n  background-position: center center;\n  background-repeat: no-repeat;\n  background-color: var(--playkit-player-background-color);\n  pointer-events: none;\n}\n\n.playkit-subtitles {\n  position: absolute;\n  top: 0;\n  bottom: 0;\n  right: 0;\n  left: 0;\n  pointer-events: none;\n  margin-bottom: 5px;\n}\n\n.playkit-black-cover {\n  position: absolute;\n  width: 100%;\n  height: 100%;\n  background-color: black;\n  pointer-events: none;\n}\n\n.playkit-size-iframe {\n  width: 100%;\n  height: 100%;\n  position: absolute;\n  border: 0;\n  z-index: -100;\n}\n\n.playkit-in-browser-fullscreen-mode {\n  width: 100% !important;\n  height: 100% !important;\n  position: fixed !important;\n  top: 0 !important;\n  left: 0 !important;\n  /*added for blocking element with fixed position which could be on the top of the player */\n  z-index: 999999 !important;\n}\n"],sourceRoot:""}]),t.Z=o},3645:function(e){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,r,i,a){"string"==typeof e&&(e=[[null,e,void 0]]);var o={};if(r)for(var s=0;s<this.length;s++){var l=this[s][0];null!=l&&(o[l]=!0)}for(var u=0;u<e.length;u++){var c=[].concat(e[u]);r&&o[c[0]]||(void 0!==a&&(void 0===c[5]||(c[1]="@layer".concat(c[5].length>0?" ".concat(c[5]):""," {").concat(c[1],"}")),c[5]=a),n&&(c[2]?(c[1]="@media ".concat(c[2]," {").concat(c[1],"}"),c[2]=n):c[2]=n),i&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=i):c[4]="".concat(i)),t.push(c))}},t}},7537:function(e){"use strict";e.exports=function(e){var t=e[1],n=e[3];if(!n)return t;if("function"==typeof btoa){var r=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),i="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(r),a="/*# ".concat(i," */");return[t].concat([a]).join("\n")}return[t].join("\n")}},5901:function(e,t,n){var r,i;!function(a){"use strict";var o,s={VERSION:"1.6.1"},l={},u=function(e,t){return function(){return t.apply(e,arguments)}},c=function(){var e,t,n=arguments,r=n[0];for(t=1;t<n.length;t++)for(e in n[t])!(e in r)&&n[t].hasOwnProperty(e)&&(r[e]=n[t][e]);return r},d=function(e,t){return{value:e,name:t}};s.TRACE=d(1,"TRACE"),s.DEBUG=d(2,"DEBUG"),s.INFO=d(3,"INFO"),s.TIME=d(4,"TIME"),s.WARN=d(5,"WARN"),s.ERROR=d(8,"ERROR"),s.OFF=d(99,"OFF");var p=function(e){this.context=e,this.setLevel(e.filterLevel),this.log=this.info};p.prototype={setLevel:function(e){e&&"value"in e&&(this.context.filterLevel=e)},getLevel:function(){return this.context.filterLevel},enabledFor:function(e){var t=this.context.filterLevel;return e.value>=t.value},trace:function(){this.invoke(s.TRACE,arguments)},debug:function(){this.invoke(s.DEBUG,arguments)},info:function(){this.invoke(s.INFO,arguments)},warn:function(){this.invoke(s.WARN,arguments)},error:function(){this.invoke(s.ERROR,arguments)},time:function(e){"string"==typeof e&&e.length>0&&this.invoke(s.TIME,[e,"start"])},timeEnd:function(e){"string"==typeof e&&e.length>0&&this.invoke(s.TIME,[e,"end"])},invoke:function(e,t){o&&this.enabledFor(e)&&o(t,c({level:e},this.context))}};var f,h=new p({filterLevel:s.OFF});(f=s).enabledFor=u(h,h.enabledFor),f.trace=u(h,h.trace),f.debug=u(h,h.debug),f.time=u(h,h.time),f.timeEnd=u(h,h.timeEnd),f.info=u(h,h.info),f.warn=u(h,h.warn),f.error=u(h,h.error),f.log=f.info,s.setHandler=function(e){o=e},s.setLevel=function(e){for(var t in h.setLevel(e),l)l.hasOwnProperty(t)&&l[t].setLevel(e)},s.getLevel=function(){return h.getLevel()},s.get=function(e){return l[e]||(l[e]=new p(c({name:e},h.context)))},s.createDefaultHandler=function(e){(e=e||{}).formatter=e.formatter||function(e,t){t.name&&e.unshift("["+t.name+"]")};var t={},n=function(e,t){Function.prototype.apply.call(e,console,t)};return"undefined"==typeof console?function(){}:function(r,i){r=Array.prototype.slice.call(r);var a,o=console.log;i.level===s.TIME?(a=(i.name?"["+i.name+"] ":"")+r[0],"start"===r[1]?console.time?console.time(a):t[a]=(new Date).getTime():console.timeEnd?console.timeEnd(a):n(o,[a+": "+((new Date).getTime()-t[a])+"ms"])):(i.level===s.WARN&&console.warn?o=console.warn:i.level===s.ERROR&&console.error?o=console.error:i.level===s.INFO&&console.info?o=console.info:i.level===s.DEBUG&&console.debug?o=console.debug:i.level===s.TRACE&&console.trace&&(o=console.trace),e.formatter(r,i),n(o,r))}},s.useDefaults=function(e){s.setLevel(e&&e.defaultLevel||s.DEBUG),s.setHandler(s.createDefaultHandler(e))},s.setDefaults=s.useDefaults,void 0===(i="function"==typeof(r=s)?r.call(t,n,t,e):r)||(e.exports=i)}()},3379:function(e){"use strict";var t=[];function n(e){for(var n=-1,r=0;r<t.length;r++)if(t[r].identifier===e){n=r;break}return n}function r(e,r){for(var a={},o=[],s=0;s<e.length;s++){var l=e[s],u=r.base?l[0]+r.base:l[0],c=a[u]||0,d="".concat(u," ").concat(c);a[u]=c+1;var p=n(d),f={css:l[1],media:l[2],sourceMap:l[3],supports:l[4],layer:l[5]};if(-1!==p)t[p].references++,t[p].updater(f);else{var h=i(f,r);r.byIndex=s,t.splice(s,0,{identifier:d,updater:h,references:1})}o.push(d)}return o}function i(e,t){var n=t.domAPI(t);return n.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;n.update(e=t)}else n.remove()}}e.exports=function(e,i){var a=r(e=e||[],i=i||{});return function(e){e=e||[];for(var o=0;o<a.length;o++){var s=n(a[o]);t[s].references--}for(var l=r(e,i),u=0;u<a.length;u++){var c=n(a[u]);0===t[c].references&&(t[c].updater(),t.splice(c,1))}a=l}}},569:function(e){"use strict";var t={};e.exports=function(e,n){var r=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},9216:function(e){"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},3565:function(e,t,n){"use strict";e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},7795:function(e){"use strict";e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var r="";n.supports&&(r+="@supports (".concat(n.supports,") {")),n.media&&(r+="@media ".concat(n.media," {"));var i=void 0!==n.layer;i&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,i&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}");var a=n.sourceMap;a&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(a))))," */")),t.styleTagTransform(r,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},4589:function(e){"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},2238:function(e,t,n){var r;!function(i,a){"use strict";var o="function",s="undefined",l="object",u="string",c="major",d="model",p="name",f="type",h="vendor",y="version",g="architecture",v="console",m="mobile",b="tablet",k="smarttv",E="wearable",_="embedded",T="Amazon",A="Apple",S="ASUS",w="BlackBerry",C="Browser",x="Chrome",P="Firefox",R="Google",I="Huawei",D="LG",O="Microsoft",L="Motorola",M="Opera",N="Samsung",U="Sharp",B="Sony",F="Xiaomi",j="Zebra",H="Facebook",V="Chromium OS",G="Mac OS",K=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];return t},z=function(e,t){return typeof e===u&&-1!==W(t).indexOf(W(e))},W=function(e){return e.toLowerCase()},Y=function(e,t){if(typeof e===u)return e=e.replace(/^\s\s*/,""),typeof t===s?e:e.substring(0,500)},Z=function(e,t){for(var n,r,i,s,u,c,d=0;d<t.length&&!u;){var p=t[d],f=t[d+1];for(n=r=0;n<p.length&&!u&&p[n];)if(u=p[n++].exec(e))for(i=0;i<f.length;i++)c=u[++r],typeof(s=f[i])===l&&s.length>0?2===s.length?typeof s[1]==o?this[s[0]]=s[1].call(this,c):this[s[0]]=s[1]:3===s.length?typeof s[1]!==o||s[1].exec&&s[1].test?this[s[0]]=c?c.replace(s[1],s[2]):a:this[s[0]]=c?s[1].call(this,c,s[2]):a:4===s.length&&(this[s[0]]=c?s[3].call(this,c.replace(s[1],s[2])):a):this[s]=c||a;d+=2}},q=function(e,t){for(var n in t)if(typeof t[n]===l&&t[n].length>0){for(var r=0;r<t[n].length;r++)if(z(t[n][r],e))return"?"===n?a:n}else if(z(t[n],e))return"?"===n?a:n;return e},X={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},Q={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[y,[p,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[y,[p,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[p,y],[/opios[\/ ]+([\w\.]+)/i],[y,[p,M+" Mini"]],[/\bopr\/([\w\.]+)/i],[y,[p,M]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[y,[p,"Baidu"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim)\s?(?:browser)?[\/ ]?([\w\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i,/(heytap|ovi)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[p,y],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[y,[p,"UC"+C]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[y,[p,"WeChat"]],[/konqueror\/([\w\.]+)/i],[y,[p,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[y,[p,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[y,[p,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[y,[p,"Smart Lenovo "+C]],[/(avast|avg)\/([\w\.]+)/i],[[p,/(.+)/,"$1 Secure "+C],y],[/\bfocus\/([\w\.]+)/i],[y,[p,P+" Focus"]],[/\bopt\/([\w\.]+)/i],[y,[p,M+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[y,[p,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[y,[p,"Dolphin"]],[/coast\/([\w\.]+)/i],[y,[p,M+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[y,[p,"MIUI "+C]],[/fxios\/([-\w\.]+)/i],[y,[p,P]],[/\bqihu|(qi?ho?o?|360)browser/i],[[p,"360 "+C]],[/(oculus|sailfish|huawei|vivo)browser\/([\w\.]+)/i],[[p,/(.+)/,"$1 "+C],y],[/samsungbrowser\/([\w\.]+)/i],[y,[p,N+" Internet"]],[/(comodo_dragon)\/([\w\.]+)/i],[[p,/_/g," "],y],[/metasr[\/ ]?([\d\.]+)/i],[y,[p,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[p,"Sogou Mobile"],y],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345Explorer)[\/ ]?([\w\.]+)/i],[p,y],[/(lbbrowser)/i,/\[(linkedin)app\]/i],[p],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[p,H],y],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[p,y],[/\bgsa\/([\w\.]+) .*safari\//i],[y,[p,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[y,[p,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[y,[p,x+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[p,x+" WebView"],y],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[y,[p,"Android "+C]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[p,y],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[y,[p,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[y,p],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[p,[y,q,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[p,y],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[p,"Netscape"],y],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[y,[p,P+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i,/panasonic;(viera)/i],[p,y],[/(cobalt)\/([\w\.]+)/i],[p,[y,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[g,"amd64"]],[/(ia32(?=;))/i],[[g,W]],[/((?:i[346]|x)86)[;\)]/i],[[g,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[g,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[g,"armhf"]],[/windows (ce|mobile); ppc;/i],[[g,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[g,/ower/,"",W]],[/(sun4\w)[;\)]/i],[[g,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[g,W]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[d,[h,N],[f,b]],[/\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[d,[h,N],[f,m]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[d,[h,A],[f,m]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[d,[h,A],[f,b]],[/(macintosh);/i],[d,[h,A]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[d,[h,U],[f,m]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[d,[h,I],[f,b]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[d,[h,I],[f,m]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[d,/_/g," "],[h,F],[f,m]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[d,/_/g," "],[h,F],[f,b]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[d,[h,"OPPO"],[f,m]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[d,[h,"Vivo"],[f,m]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[d,[h,"Realme"],[f,m]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[d,[h,L],[f,m]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[d,[h,L],[f,b]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[d,[h,D],[f,b]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[d,[h,D],[f,m]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[d,[h,"Lenovo"],[f,b]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[d,/_/g," "],[h,"Nokia"],[f,m]],[/(pixel c)\b/i],[d,[h,R],[f,b]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[d,[h,R],[f,m]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[d,[h,B],[f,m]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[d,"Xperia Tablet"],[h,B],[f,b]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[d,[h,"OnePlus"],[f,m]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[d,[h,T],[f,b]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[d,/(.+)/g,"Fire Phone $1"],[h,T],[f,m]],[/(playbook);[-\w\),; ]+(rim)/i],[d,h,[f,b]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[d,[h,w],[f,m]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[d,[h,S],[f,b]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[d,[h,S],[f,m]],[/(nexus 9)/i],[d,[h,"HTC"],[f,b]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[h,[d,/_/g," "],[f,m]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[d,[h,"Acer"],[f,b]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[d,[h,"Meizu"],[f,m]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[d,[h,"Ulefone"],[f,m]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[h,d,[f,m]],[/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[h,d,[f,b]],[/(surface duo)/i],[d,[h,O],[f,b]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[d,[h,"Fairphone"],[f,m]],[/(u304aa)/i],[d,[h,"AT&T"],[f,m]],[/\bsie-(\w*)/i],[d,[h,"Siemens"],[f,m]],[/\b(rct\w+) b/i],[d,[h,"RCA"],[f,b]],[/\b(venue[\d ]{2,7}) b/i],[d,[h,"Dell"],[f,b]],[/\b(q(?:mv|ta)\w+) b/i],[d,[h,"Verizon"],[f,b]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[d,[h,"Barnes & Noble"],[f,b]],[/\b(tm\d{3}\w+) b/i],[d,[h,"NuVision"],[f,b]],[/\b(k88) b/i],[d,[h,"ZTE"],[f,b]],[/\b(nx\d{3}j) b/i],[d,[h,"ZTE"],[f,m]],[/\b(gen\d{3}) b.+49h/i],[d,[h,"Swiss"],[f,m]],[/\b(zur\d{3}) b/i],[d,[h,"Swiss"],[f,b]],[/\b((zeki)?tb.*\b) b/i],[d,[h,"Zeki"],[f,b]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[h,"Dragon Touch"],d,[f,b]],[/\b(ns-?\w{0,9}) b/i],[d,[h,"Insignia"],[f,b]],[/\b((nxa|next)-?\w{0,9}) b/i],[d,[h,"NextBook"],[f,b]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[h,"Voice"],d,[f,m]],[/\b(lvtel\-)?(v1[12]) b/i],[[h,"LvTel"],d,[f,m]],[/\b(ph-1) /i],[d,[h,"Essential"],[f,m]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[d,[h,"Envizen"],[f,b]],[/\b(trio[-\w\. ]+) b/i],[d,[h,"MachSpeed"],[f,b]],[/\btu_(1491) b/i],[d,[h,"Rotor"],[f,b]],[/(shield[\w ]+) b/i],[d,[h,"Nvidia"],[f,b]],[/(sprint) (\w+)/i],[h,d,[f,m]],[/(kin\.[onetw]{3})/i],[[d,/\./g," "],[h,O],[f,m]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[d,[h,j],[f,b]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[d,[h,j],[f,m]],[/smart-tv.+(samsung)/i],[h,[f,k]],[/hbbtv.+maple;(\d+)/i],[[d,/^/,"SmartTV"],[h,N],[f,k]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[h,D],[f,k]],[/(apple) ?tv/i],[h,[d,A+" TV"],[f,k]],[/crkey/i],[[d,x+"cast"],[h,R],[f,k]],[/droid.+aft(\w+)( bui|\))/i],[d,[h,T],[f,k]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[d,[h,U],[f,k]],[/(bravia[\w ]+)( bui|\))/i],[d,[h,B],[f,k]],[/(mitv-\w{5}) bui/i],[d,[h,F],[f,k]],[/Hbbtv.*(technisat) (.*);/i],[h,d,[f,k]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[h,Y],[d,Y],[f,k]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[f,k]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[h,d,[f,v]],[/droid.+; (shield) bui/i],[d,[h,"Nvidia"],[f,v]],[/(playstation [345portablevi]+)/i],[d,[h,B],[f,v]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[d,[h,O],[f,v]],[/((pebble))app/i],[h,d,[f,E]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[d,[h,A],[f,E]],[/droid.+; (glass) \d/i],[d,[h,R],[f,E]],[/droid.+; (wt63?0{2,3})\)/i],[d,[h,j],[f,E]],[/(quest( 2| pro)?)/i],[d,[h,H],[f,E]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[h,[f,_]],[/(aeobc)\b/i],[d,[h,T],[f,_]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[d,[f,m]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[d,[f,b]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[f,b]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[f,m]],[/(android[-\w\. ]{0,9});.+buil/i],[d,[h,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[y,[p,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[y,[p,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[p,y],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[y,p]],os:[[/microsoft (windows) (vista|xp)/i],[p,y],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[p,[y,q,X]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[y,q,X],[p,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[y,/_/g,"."],[p,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[p,G],[y,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[y,p],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[p,y],[/\(bb(10);/i],[y,[p,w]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[y,[p,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[y,[p,P+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[y,[p,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[y,[p,"watchOS"]],[/crkey\/([\d\.]+)/i],[y,[p,x+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[p,V],y],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[p,y],[/(sunos) ?([\w\.\d]*)/i],[[p,"Solaris"],y],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[p,y]]},$=function(e,t){if(typeof e===l&&(t=e,e=a),!(this instanceof $))return new $(e,t).getResult();var n=typeof i!==s&&i.navigator?i.navigator:a,r=e||(n&&n.userAgent?n.userAgent:""),v=n&&n.userAgentData?n.userAgentData:a,k=t?function(e,t){var n={};for(var r in e)t[r]&&t[r].length%2==0?n[r]=t[r].concat(e[r]):n[r]=e[r];return n}(Q,t):Q,E=n&&n.userAgent==r;return this.getBrowser=function(){var e,t={};return t[p]=a,t[y]=a,Z.call(t,r,k.browser),t[c]=typeof(e=t[y])===u?e.replace(/[^\d\.]/g,"").split(".")[0]:a,E&&n&&n.brave&&typeof n.brave.isBrave==o&&(t[p]="Brave"),t},this.getCPU=function(){var e={};return e[g]=a,Z.call(e,r,k.cpu),e},this.getDevice=function(){var e={};return e[h]=a,e[d]=a,e[f]=a,Z.call(e,r,k.device),E&&!e[f]&&v&&v.mobile&&(e[f]=m),E&&"Macintosh"==e[d]&&n&&typeof n.standalone!==s&&n.maxTouchPoints&&n.maxTouchPoints>2&&(e[d]="iPad",e[f]=b),e},this.getEngine=function(){var e={};return e[p]=a,e[y]=a,Z.call(e,r,k.engine),e},this.getOS=function(){var e={};return e[p]=a,e[y]=a,Z.call(e,r,k.os),E&&!e[p]&&v&&"Unknown"!=v.platform&&(e[p]=v.platform.replace(/chrome os/i,V).replace(/macos/i,G)),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return r},this.setUA=function(e){return r=typeof e===u&&e.length>500?Y(e,500):e,this},this.setUA(r),this};$.VERSION="1.0.37",$.BROWSER=K([p,y,c]),$.CPU=K([g]),$.DEVICE=K([d,h,f,v,m,k,b,E,_]),$.ENGINE=$.OS=K([p,y]),typeof t!==s?(e.exports&&(t=e.exports=$),t.UAParser=$):n.amdO?(r=function(){return $}.call(t,n,t,e))===a||(e.exports=r):typeof i!==s&&(i.UAParser=$);var J=typeof i!==s&&(i.jQuery||i.Zepto);if(J&&!J.ua){var ee=new $;J.ua=ee.getResult(),J.ua.get=function(){return ee.getUA()},J.ua.set=function(e){ee.setUA(e);var t=ee.getResult();for(var n in t)J.ua[n]=t[n]}}}("object"==typeof window?window:this)},7061:function(e,t,n){var r=n(8698).default;function i(){"use strict";e.exports=i=function(){return n},e.exports.__esModule=!0,e.exports.default=e.exports;var t,n={},a=Object.prototype,o=a.hasOwnProperty,s=Object.defineProperty||function(e,t,n){e[t]=n.value},l="function"==typeof Symbol?Symbol:{},u=l.iterator||"@@iterator",c=l.asyncIterator||"@@asyncIterator",d=l.toStringTag||"@@toStringTag";function p(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{p({},"")}catch(t){p=function(e,t,n){return e[t]=n}}function f(e,t,n,r){var i=t&&t.prototype instanceof k?t:k,a=Object.create(i.prototype),o=new O(r||[]);return s(a,"_invoke",{value:P(e,n,o)}),a}function h(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}n.wrap=f;var y="suspendedStart",g="suspendedYield",v="executing",m="completed",b={};function k(){}function E(){}function _(){}var T={};p(T,u,(function(){return this}));var A=Object.getPrototypeOf,S=A&&A(A(L([])));S&&S!==a&&o.call(S,u)&&(T=S);var w=_.prototype=k.prototype=Object.create(T);function C(e){["next","throw","return"].forEach((function(t){p(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){function n(i,a,s,l){var u=h(e[i],e,a);if("throw"!==u.type){var c=u.arg,d=c.value;return d&&"object"==r(d)&&o.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,s,l)}),(function(e){n("throw",e,s,l)})):t.resolve(d).then((function(e){c.value=e,s(c)}),(function(e){return n("throw",e,s,l)}))}l(u.arg)}var i;s(this,"_invoke",{value:function(e,r){function a(){return new t((function(t,i){n(e,r,t,i)}))}return i=i?i.then(a,a):a()}})}function P(e,n,r){var i=y;return function(a,o){if(i===v)throw new Error("Generator is already running");if(i===m){if("throw"===a)throw o;return{value:t,done:!0}}for(r.method=a,r.arg=o;;){var s=r.delegate;if(s){var l=R(s,r);if(l){if(l===b)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===y)throw i=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=v;var u=h(e,n,r);if("normal"===u.type){if(i=r.done?m:g,u.arg===b)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(i=m,r.method="throw",r.arg=u.arg)}}}function R(e,n){var r=n.method,i=e.iterator[r];if(i===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,R(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),b;var a=h(i,e.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,b;var o=a.arg;return o?o.done?(n[e.resultName]=o.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,b):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,b)}function I(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function D(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function O(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(I,this),this.reset(!0)}function L(e){if(e||""===e){var n=e[u];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,a=function n(){for(;++i<e.length;)if(o.call(e,i))return n.value=e[i],n.done=!1,n;return n.value=t,n.done=!0,n};return a.next=a}}throw new TypeError(r(e)+" is not iterable")}return E.prototype=_,s(w,"constructor",{value:_,configurable:!0}),s(_,"constructor",{value:E,configurable:!0}),E.displayName=p(_,d,"GeneratorFunction"),n.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===E||"GeneratorFunction"===(t.displayName||t.name))},n.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,_):(e.__proto__=_,p(e,d,"GeneratorFunction")),e.prototype=Object.create(w),e},n.awrap=function(e){return{__await:e}},C(x.prototype),p(x.prototype,c,(function(){return this})),n.AsyncIterator=x,n.async=function(e,t,r,i,a){void 0===a&&(a=Promise);var o=new x(f(e,t,r,i),a);return n.isGeneratorFunction(t)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},C(w),p(w,d,"Generator"),p(w,u,(function(){return this})),p(w,"toString",(function(){return"[object Generator]"})),n.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},n.values=L,O.prototype={constructor:O,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(D),!e)for(var n in this)"t"===n.charAt(0)&&o.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function r(r,i){return s.type="throw",s.arg=e,n.next=r,i&&(n.method="next",n.arg=t),!!i}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var l=o.call(a,"catchLoc"),u=o.call(a,"finallyLoc");if(l&&u){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&o.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,b):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),b},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),D(n),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;D(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:L(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),b}},n}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports},8698:function(e){function t(n){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},4687:function(e,t,n){var r=n(7061)();e.exports=r;try{regeneratorRuntime=r}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}},907:function(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n.d(t,{Z:function(){return r}})},3878:function(e,t,n){"use strict";function r(e){if(Array.isArray(e))return e}n.d(t,{Z:function(){return r}})},7326:function(e,t,n){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,{Z:function(){return r}})},5671:function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,{Z:function(){return r}})},3144:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(9142);function i(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,(0,r.Z)(i.key),i)}}function a(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}},4942:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(9142);function i(e,t,n){return(t=(0,r.Z)(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},1752:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(1120);function i(){return i="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var i=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=(0,r.Z)(e)););return e}(e,t);if(i){var a=Object.getOwnPropertyDescriptor(i,t);return a.get?a.get.call(arguments.length<3?e:n):a.value}},i.apply(this,arguments)}},1120:function(e,t,n){"use strict";function r(e){return r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},r(e)}n.d(t,{Z:function(){return r}})},9340:function(e,t,n){"use strict";function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&r(e,t)}n.d(t,{Z:function(){return i}})},9199:function(e,t,n){"use strict";function r(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}n.d(t,{Z:function(){return r}})},5267:function(e,t,n){"use strict";function r(){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.d(t,{Z:function(){return r}})},2963:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(1002),i=n(7326);function a(e,t){if(t&&("object"===(0,r.Z)(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return(0,i.Z)(e)}},9439:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(3878),i=n(181),a=n(5267);function o(e,t){return(0,r.Z)(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a,o,s=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){u=!0,i=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}(e,t)||(0,i.Z)(e,t)||(0,a.Z)()}},3433:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(907),i=n(9199),a=n(181);function o(e){return function(e){if(Array.isArray(e))return(0,r.Z)(e)}(e)||(0,i.Z)(e)||(0,a.Z)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},9142:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(1002);function i(e){var t=function(e,t){if("object"!==(0,r.Z)(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,"string");if("object"!==(0,r.Z)(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===(0,r.Z)(t)?t:String(t)}},1002:function(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}n.d(t,{Z:function(){return r}})},181:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(907);function i(e,t){if(e){if("string"==typeof e)return(0,r.Z)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?(0,r.Z)(e,t):void 0}}}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var a=t[r]={id:r,exports:{}};return e[r].call(a.exports,a,a.exports,n),a.exports}n.amdO={},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nc=void 0;var r={};return function(){"use strict";n.r(r),n.d(r,{AbrMode:function(){return S.n},AdBreakType:function(){return I.S},AdEventType:function(){return O.J},AdTagType:function(){return D.J},AudioTrack:function(){return p.Z},AutoPlayType:function(){return M.B},BaseMediaSourceAdapter:function(){return t.Z},BaseMiddleware:function(){return s.Z},CorsType:function(){return C.X},CustomEventType:function(){return A.nQ},DrmScheme:function(){return x.J},EngineDecoratorProvider:function(){return a._},EngineType:function(){return _.r},Env:function(){return g.Z},Error:function(){return m.Z},EventManager:function(){return F.Q},EventType:function(){return A.tw},FakeEvent:function(){return B.v},FakeEventTarget:function(){return j.H},Html5EventType:function(){return A.Rk},ImageTrack:function(){return c.Z},LogLevel:function(){return w.in},LogLevelType:function(){return w.hX},MediaType:function(){return T.D},MimeType:function(){return P.H},NAME:function(){return z},PKTextTrack:function(){return f.PZ},Player:function(){return e.Z},RequestType:function(){return R.x},ScreenOrientationType:function(){return L.z},State:function(){return l.Z},StateType:function(){return b.Y},StreamType:function(){return E.j},TextStyle:function(){return y.Z},TextTrack:function(){return f.ZP},ThumbnailInfo:function(){return N.F},TimedMetadata:function(){return h.D},Track:function(){return u.Z},TrackType:function(){return k.V},Utils:function(){return v},VERSION:function(){return K},VideoTrack:function(){return d.Z},createTextTrackCue:function(){return h.PC},createTimedMetadata:function(){return h.cP},filterTracksByRestriction:function(){return U.u},getCapabilities:function(){return Y},getLogLevel:function(){return w.ZO},getLogger:function(){return w.ZP},loadPlayer:function(){return W},registerEngine:function(){return o.Hl},registerMediaSourceAdapter:function(){return i.L},setCapabilities:function(){return Z},setLogHandler:function(){return w.hs},setLogLevel:function(){return w.Ub},unRegisterEngine:function(){return o.co},utils:function(){return v}});var e=n(4649),t=n(4651),i=n(2588),a=n(1057),o=n(4779),s=n(902),l=n(4919),u=n(8413),c=n(2983),d=n(4877),p=n(7812),f=n(6462),h=n(375),y=n(6234),g=n(2069),v=n(7916),m=n(962),b=n(9769),k=n(5856),E=n(7300),_=n(488),T=n(2806),A=n(2114),S=n(6820),w=n(4358),C=n(6145),x=n(7237),P=n(3336),R=n(6975),I=n(9063),D=n(8151),O=n(4611),L=n(3323),M=n(8143),N=n(5590),U=n(1177),B=n(8987),F=n(4270),j=n(8171),H=n(9150),V={};for(var G in H)["default","loadPlayer","registerMediaSourceAdapter","BaseMediaSourceAdapter","BaseMiddleware","Track","VideoTrack","AudioTrack","TextTrack","PKTextTrack","ImageTrack","TextStyle","TimedMetadata","createTextTrackCue","createTimedMetadata","Utils","utils","Error","FakeEvent","EventManager","FakeEventTarget","VERSION","NAME","Env","State","getCapabilities","setCapabilities","EngineDecoratorProvider","registerEngine","unRegisterEngine","AdBreakType","AdTagType","AdEventType","filterTracksByRestriction","Html5EventType","CustomEventType","EventType","StateType","TrackType","EngineType","MediaType","StreamType","AbrMode","LogLevelType","CorsType","DrmScheme","MimeType","RequestType","ScreenOrientationType","AutoPlayType","ThumbnailInfo","getLogger","LogLevel","getLogLevel","setLogLevel","setLogHandler","Player"].indexOf(G)<0&&(V[G]=function(e){return H[e]}.bind(0,G));n.d(r,V);var K="0.84.16",z="@playkit-js/playkit-js";function W(t){return new e.Z(t||{})}var Y=e.Z.getCapabilities,Z=e.Z.setCapabilities;r.default=W}(),r}()},352:module=>{"use strict";module.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,r,i,a){"string"==typeof e&&(e=[[null,e,void 0]]);var o={};if(r)for(var s=0;s<this.length;s++){var l=this[s][0];null!=l&&(o[l]=!0)}for(var u=0;u<e.length;u++){var c=[].concat(e[u]);r&&o[c[0]]||(void 0!==a&&(void 0===c[5]||(c[1]="@layer".concat(c[5].length>0?" ".concat(c[5]):""," {").concat(c[1],"}")),c[5]=a),n&&(c[2]?(c[1]="@media ".concat(c[2]," {").concat(c[1],"}"),c[2]=n):c[2]=n),i&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=i):c[4]="".concat(i)),t.push(c))}},t}},864:module=>{"use strict";module.exports=function(e){var t=e[1],n=e[3];if(!n)return t;if("function"==typeof btoa){var r=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),i="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(r),a="/*# ".concat(i," */");return[t].concat([a]).join("\n")}return[t].join("\n")}},718:module=>{!function e(t){var n;n=function(){"use strict";function n(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function r(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach((function(t){var n,a,o;n=e,a=t,o=r[t],(a=i(a))in n?Object.defineProperty(n,a,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[a]=o})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function i(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,i(r.key),r)}}function o(e,t,n){return t&&a(e.prototype,t),n&&a(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s.apply(this,arguments)}function l(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,c(e,t)}function u(e){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},u(e)}function c(e,t){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},c(e,t)}function d(e,t,n){return d=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}()?Reflect.construct.bind():function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&c(i,n.prototype),i},d.apply(null,arguments)}function p(e){var t="function"==typeof Map?new Map:void 0;return p=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return d(e,arguments,u(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),c(n,e)},p(e)}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var h={exports:{}};!function(e,t){var n,r,i,a,o;n=/^(?=((?:[a-zA-Z0-9+\-.]+:)?))\1(?=((?:\/\/[^\/?#]*)?))\2(?=((?:(?:[^?#\/]*\/)*[^;?#\/]*)?))\3((?:;[^?#]*)?)(\?[^#]*)?(#[^]*)?$/,r=/^(?=([^\/?#]*))\1([^]*)$/,i=/(?:\/|^)\.(?=\/)/g,a=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,o={buildAbsoluteURL:function(e,t,n){if(n=n||{},e=e.trim(),!(t=t.trim())){if(!n.alwaysNormalize)return e;var i=o.parseURL(e);if(!i)throw new Error("Error trying to parse base URL.");return i.path=o.normalizePath(i.path),o.buildURLFromParts(i)}var a=o.parseURL(t);if(!a)throw new Error("Error trying to parse relative URL.");if(a.scheme)return n.alwaysNormalize?(a.path=o.normalizePath(a.path),o.buildURLFromParts(a)):t;var s=o.parseURL(e);if(!s)throw new Error("Error trying to parse base URL.");if(!s.netLoc&&s.path&&"/"!==s.path[0]){var l=r.exec(s.path);s.netLoc=l[1],s.path=l[2]}s.netLoc&&!s.path&&(s.path="/");var u={scheme:s.scheme,netLoc:a.netLoc,path:null,params:a.params,query:a.query,fragment:a.fragment};if(!a.netLoc&&(u.netLoc=s.netLoc,"/"!==a.path[0]))if(a.path){var c=s.path,d=c.substring(0,c.lastIndexOf("/")+1)+a.path;u.path=o.normalizePath(d)}else u.path=s.path,a.params||(u.params=s.params,a.query||(u.query=s.query));return null===u.path&&(u.path=n.alwaysNormalize?o.normalizePath(a.path):a.path),o.buildURLFromParts(u)},parseURL:function(e){var t=n.exec(e);return t?{scheme:t[1]||"",netLoc:t[2]||"",path:t[3]||"",params:t[4]||"",query:t[5]||"",fragment:t[6]||""}:null},normalizePath:function(e){for(e=e.split("").reverse().join("").replace(i,"");e.length!==(e=e.replace(a,"")).length;);return e.split("").reverse().join("")},buildURLFromParts:function(e){return e.scheme+e.netLoc+e.path+e.params+e.query+e.fragment}},e.exports=o}(h);var y=h.exports,g=Number.isFinite||function(e){return"number"==typeof e&&isFinite(e)},v=Number.isSafeInteger||function(e){return"number"==typeof e&&Math.abs(e)<=m},m=Number.MAX_SAFE_INTEGER||9007199254740991,b=function(e){return e.MEDIA_ATTACHING="hlsMediaAttaching",e.MEDIA_ATTACHED="hlsMediaAttached",e.MEDIA_DETACHING="hlsMediaDetaching",e.MEDIA_DETACHED="hlsMediaDetached",e.BUFFER_RESET="hlsBufferReset",e.BUFFER_CODECS="hlsBufferCodecs",e.BUFFER_CREATED="hlsBufferCreated",e.BUFFER_APPENDING="hlsBufferAppending",e.BUFFER_APPENDED="hlsBufferAppended",e.BUFFER_EOS="hlsBufferEos",e.BUFFER_FLUSHING="hlsBufferFlushing",e.BUFFER_FLUSHED="hlsBufferFlushed",e.MANIFEST_LOADING="hlsManifestLoading",e.MANIFEST_LOADED="hlsManifestLoaded",e.MANIFEST_PARSED="hlsManifestParsed",e.LEVEL_SWITCHING="hlsLevelSwitching",e.LEVEL_SWITCHED="hlsLevelSwitched",e.LEVEL_LOADING="hlsLevelLoading",e.LEVEL_LOADED="hlsLevelLoaded",e.LEVEL_UPDATED="hlsLevelUpdated",e.LEVEL_PTS_UPDATED="hlsLevelPtsUpdated",e.LEVELS_UPDATED="hlsLevelsUpdated",e.AUDIO_TRACKS_UPDATED="hlsAudioTracksUpdated",e.AUDIO_TRACK_SWITCHING="hlsAudioTrackSwitching",e.AUDIO_TRACK_SWITCHED="hlsAudioTrackSwitched",e.AUDIO_TRACK_LOADING="hlsAudioTrackLoading",e.AUDIO_TRACK_LOADED="hlsAudioTrackLoaded",e.SUBTITLE_TRACKS_UPDATED="hlsSubtitleTracksUpdated",e.SUBTITLE_TRACKS_CLEARED="hlsSubtitleTracksCleared",e.SUBTITLE_TRACK_SWITCH="hlsSubtitleTrackSwitch",e.SUBTITLE_TRACK_LOADING="hlsSubtitleTrackLoading",e.SUBTITLE_TRACK_LOADED="hlsSubtitleTrackLoaded",e.SUBTITLE_FRAG_PROCESSED="hlsSubtitleFragProcessed",e.CUES_PARSED="hlsCuesParsed",e.NON_NATIVE_TEXT_TRACKS_FOUND="hlsNonNativeTextTracksFound",e.INIT_PTS_FOUND="hlsInitPtsFound",e.FRAG_LOADING="hlsFragLoading",e.FRAG_LOAD_EMERGENCY_ABORTED="hlsFragLoadEmergencyAborted",e.FRAG_LOADED="hlsFragLoaded",e.FRAG_DECRYPTED="hlsFragDecrypted",e.FRAG_PARSING_INIT_SEGMENT="hlsFragParsingInitSegment",e.FRAG_PARSING_USERDATA="hlsFragParsingUserdata",e.FRAG_PARSING_METADATA="hlsFragParsingMetadata",e.FRAG_PARSED="hlsFragParsed",e.FRAG_BUFFERED="hlsFragBuffered",e.FRAG_CHANGED="hlsFragChanged",e.FPS_DROP="hlsFpsDrop",e.FPS_DROP_LEVEL_CAPPING="hlsFpsDropLevelCapping",e.MAX_AUTO_LEVEL_UPDATED="hlsMaxAutoLevelUpdated",e.ERROR="hlsError",e.DESTROYING="hlsDestroying",e.KEY_LOADING="hlsKeyLoading",e.KEY_LOADED="hlsKeyLoaded",e.LIVE_BACK_BUFFER_REACHED="hlsLiveBackBufferReached",e.BACK_BUFFER_REACHED="hlsBackBufferReached",e.STEERING_MANIFEST_LOADED="hlsSteeringManifestLoaded",e}({}),k=function(e){return e.NETWORK_ERROR="networkError",e.MEDIA_ERROR="mediaError",e.KEY_SYSTEM_ERROR="keySystemError",e.MUX_ERROR="muxError",e.OTHER_ERROR="otherError",e}({}),E=function(e){return e.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",e.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",e.KEY_SYSTEM_NO_SESSION="keySystemNoSession",e.KEY_SYSTEM_NO_CONFIGURED_LICENSE="keySystemNoConfiguredLicense",e.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",e.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED="keySystemServerCertificateRequestFailed",e.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED="keySystemServerCertificateUpdateFailed",e.KEY_SYSTEM_SESSION_UPDATE_FAILED="keySystemSessionUpdateFailed",e.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED="keySystemStatusOutputRestricted",e.KEY_SYSTEM_STATUS_INTERNAL_ERROR="keySystemStatusInternalError",e.MANIFEST_LOAD_ERROR="manifestLoadError",e.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",e.MANIFEST_PARSING_ERROR="manifestParsingError",e.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",e.LEVEL_EMPTY_ERROR="levelEmptyError",e.LEVEL_LOAD_ERROR="levelLoadError",e.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",e.LEVEL_PARSING_ERROR="levelParsingError",e.LEVEL_SWITCH_ERROR="levelSwitchError",e.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",e.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",e.SUBTITLE_LOAD_ERROR="subtitleTrackLoadError",e.SUBTITLE_TRACK_LOAD_TIMEOUT="subtitleTrackLoadTimeOut",e.FRAG_LOAD_ERROR="fragLoadError",e.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",e.FRAG_DECRYPT_ERROR="fragDecryptError",e.FRAG_PARSING_ERROR="fragParsingError",e.FRAG_GAP="fragGap",e.REMUX_ALLOC_ERROR="remuxAllocError",e.KEY_LOAD_ERROR="keyLoadError",e.KEY_LOAD_TIMEOUT="keyLoadTimeOut",e.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",e.BUFFER_INCOMPATIBLE_CODECS_ERROR="bufferIncompatibleCodecsError",e.BUFFER_APPEND_ERROR="bufferAppendError",e.BUFFER_APPENDING_ERROR="bufferAppendingError",e.BUFFER_STALLED_ERROR="bufferStalledError",e.BUFFER_FULL_ERROR="bufferFullError",e.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",e.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",e.INTERNAL_EXCEPTION="internalException",e.INTERNAL_ABORTED="aborted",e.UNKNOWN="unknown",e}({}),_=function(){},T={trace:_,debug:_,log:_,warn:_,info:_,error:_},A=T;function S(e,t){if("object"==typeof console&&!0===e||"object"==typeof e){!function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];n.forEach((function(t){A[t]=e[t]?e[t].bind(e):function(e){var t=self.console[e];return t?t.bind(self.console,"["+e+"] >"):_}(t)}))}(e,"debug","log","info","warn","error");try{A.log('Debug logs enabled for "'+t+'" in hls.js version 1.5.8')}catch(e){A=T}}else A=T}var w=A,C=/^(\d+)x(\d+)$/,x=/(.+?)=(".*?"|.*?)(?:,|$)/g,P=function(){function e(t){"string"==typeof t&&(t=e.parseAttrList(t)),s(this,t)}var t=e.prototype;return t.decimalInteger=function(e){var t=parseInt(this[e],10);return t>Number.MAX_SAFE_INTEGER?1/0:t},t.hexadecimalInteger=function(e){if(this[e]){var t=(this[e]||"0x").slice(2);t=(1&t.length?"0":"")+t;for(var n=new Uint8Array(t.length/2),r=0;r<t.length/2;r++)n[r]=parseInt(t.slice(2*r,2*r+2),16);return n}return null},t.hexadecimalIntegerAsNumber=function(e){var t=parseInt(this[e],16);return t>Number.MAX_SAFE_INTEGER?1/0:t},t.decimalFloatingPoint=function(e){return parseFloat(this[e])},t.optionalFloat=function(e,t){var n=this[e];return n?parseFloat(n):t},t.enumeratedString=function(e){return this[e]},t.bool=function(e){return"YES"===this[e]},t.decimalResolution=function(e){var t=C.exec(this[e]);if(null!==t)return{width:parseInt(t[1],10),height:parseInt(t[2],10)}},e.parseAttrList=function(e){var t,n={};for(x.lastIndex=0;null!==(t=x.exec(e));){var r=t[2];0===r.indexOf('"')&&r.lastIndexOf('"')===r.length-1&&(r=r.slice(1,-1)),n[t[1].trim()]=r}return n},o(e,[{key:"clientAttrs",get:function(){return Object.keys(this).filter((function(e){return"X-"===e.substring(0,2)}))}}]),e}();function R(e){return"SCTE35-OUT"===e||"SCTE35-IN"===e}var I=function(){function e(e,t){if(this.attr=void 0,this._startDate=void 0,this._endDate=void 0,this._badValueForSameId=void 0,t){var n=t.attr;for(var r in n)if(Object.prototype.hasOwnProperty.call(e,r)&&e[r]!==n[r]){w.warn('DATERANGE tag attribute: "'+r+'" does not match for tags with ID: "'+e.ID+'"'),this._badValueForSameId=r;break}e=s(new P({}),n,e)}if(this.attr=e,this._startDate=new Date(e["START-DATE"]),"END-DATE"in this.attr){var i=new Date(this.attr["END-DATE"]);g(i.getTime())&&(this._endDate=i)}}return o(e,[{key:"id",get:function(){return this.attr.ID}},{key:"class",get:function(){return this.attr.CLASS}},{key:"startDate",get:function(){return this._startDate}},{key:"endDate",get:function(){if(this._endDate)return this._endDate;var e=this.duration;return null!==e?new Date(this._startDate.getTime()+1e3*e):null}},{key:"duration",get:function(){if("DURATION"in this.attr){var e=this.attr.decimalFloatingPoint("DURATION");if(g(e))return e}else if(this._endDate)return(this._endDate.getTime()-this._startDate.getTime())/1e3;return null}},{key:"plannedDuration",get:function(){return"PLANNED-DURATION"in this.attr?this.attr.decimalFloatingPoint("PLANNED-DURATION"):null}},{key:"endOnNext",get:function(){return this.attr.bool("END-ON-NEXT")}},{key:"isValid",get:function(){return!!this.id&&!this._badValueForSameId&&g(this.startDate.getTime())&&(null===this.duration||this.duration>=0)&&(!this.endOnNext||!!this.class)}}]),e}(),D=function(){this.aborted=!1,this.loaded=0,this.retry=0,this.total=0,this.chunkCount=0,this.bwEstimate=0,this.loading={start:0,first:0,end:0},this.parsing={start:0,end:0},this.buffering={start:0,first:0,end:0}},O="audio",L="video",M="audiovideo",N=function(){function e(e){var t;this._byteRange=null,this._url=null,this.baseurl=void 0,this.relurl=void 0,this.elementaryStreams=((t={})[O]=null,t[L]=null,t[M]=null,t),this.baseurl=e}return e.prototype.setByteRange=function(e,t){var n,r=e.split("@",2);n=1===r.length?(null==t?void 0:t.byteRangeEndOffset)||0:parseInt(r[1]),this._byteRange=[n,parseInt(r[0])+n]},o(e,[{key:"byteRange",get:function(){return this._byteRange?this._byteRange:[]}},{key:"byteRangeStartOffset",get:function(){return this.byteRange[0]}},{key:"byteRangeEndOffset",get:function(){return this.byteRange[1]}},{key:"url",get:function(){return!this._url&&this.baseurl&&this.relurl&&(this._url=y.buildAbsoluteURL(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""},set:function(e){this._url=e}}]),e}(),U=function(e){function t(t,n){var r;return(r=e.call(this,n)||this)._decryptdata=null,r.rawProgramDateTime=null,r.programDateTime=null,r.tagList=[],r.duration=0,r.sn=0,r.levelkeys=void 0,r.type=void 0,r.loader=null,r.keyLoader=null,r.level=-1,r.cc=0,r.startPTS=void 0,r.endPTS=void 0,r.startDTS=void 0,r.endDTS=void 0,r.start=0,r.deltaPTS=void 0,r.maxStartPTS=void 0,r.minEndPTS=void 0,r.stats=new D,r.data=void 0,r.bitrateTest=!1,r.title=null,r.initSegment=null,r.endList=void 0,r.gap=void 0,r.urlId=0,r.type=t,r}l(t,e);var n=t.prototype;return n.setKeyFormat=function(e){if(this.levelkeys){var t=this.levelkeys[e];t&&!this._decryptdata&&(this._decryptdata=t.getDecryptData(this.sn))}},n.abortRequests=function(){var e,t;null==(e=this.loader)||e.abort(),null==(t=this.keyLoader)||t.abort()},n.setElementaryStreamInfo=function(e,t,n,r,i,a){void 0===a&&(a=!1);var o=this.elementaryStreams,s=o[e];s?(s.startPTS=Math.min(s.startPTS,t),s.endPTS=Math.max(s.endPTS,n),s.startDTS=Math.min(s.startDTS,r),s.endDTS=Math.max(s.endDTS,i)):o[e]={startPTS:t,endPTS:n,startDTS:r,endDTS:i,partial:a}},n.clearElementaryStreamInfo=function(){var e=this.elementaryStreams;e[O]=null,e[L]=null,e[M]=null},o(t,[{key:"decryptdata",get:function(){if(!this.levelkeys&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkeys&&!this.levelkeys.NONE){var e=this.levelkeys.identity;if(e)this._decryptdata=e.getDecryptData(this.sn);else{var t=Object.keys(this.levelkeys);if(1===t.length)return this._decryptdata=this.levelkeys[t[0]].getDecryptData(this.sn)}}return this._decryptdata}},{key:"end",get:function(){return this.start+this.duration}},{key:"endProgramDateTime",get:function(){if(null===this.programDateTime)return null;if(!g(this.programDateTime))return null;var e=g(this.duration)?this.duration:0;return this.programDateTime+1e3*e}},{key:"encrypted",get:function(){var e;if(null!=(e=this._decryptdata)&&e.encrypted)return!0;if(this.levelkeys){var t=Object.keys(this.levelkeys),n=t.length;if(n>1||1===n&&this.levelkeys[t[0]].encrypted)return!0}return!1}}]),t}(N),B=function(e){function t(t,n,r,i,a){var o;(o=e.call(this,r)||this).fragOffset=0,o.duration=0,o.gap=!1,o.independent=!1,o.relurl=void 0,o.fragment=void 0,o.index=void 0,o.stats=new D,o.duration=t.decimalFloatingPoint("DURATION"),o.gap=t.bool("GAP"),o.independent=t.bool("INDEPENDENT"),o.relurl=t.enumeratedString("URI"),o.fragment=n,o.index=i;var s=t.enumeratedString("BYTERANGE");return s&&o.setByteRange(s,a),a&&(o.fragOffset=a.fragOffset+a.duration),o}return l(t,e),o(t,[{key:"start",get:function(){return this.fragment.start+this.fragOffset}},{key:"end",get:function(){return this.start+this.duration}},{key:"loaded",get:function(){var e=this.elementaryStreams;return!!(e.audio||e.video||e.audiovideo)}}]),t}(N),F=function(){function e(e){this.PTSKnown=!1,this.alignedSliding=!1,this.averagetargetduration=void 0,this.endCC=0,this.endSN=0,this.fragments=void 0,this.fragmentHint=void 0,this.partList=null,this.dateRanges=void 0,this.live=!0,this.ageHeader=0,this.advancedDateTime=void 0,this.updated=!0,this.advanced=!0,this.availabilityDelay=void 0,this.misses=0,this.startCC=0,this.startSN=0,this.startTimeOffset=null,this.targetduration=0,this.totalduration=0,this.type=null,this.url=void 0,this.m3u8="",this.version=null,this.canBlockReload=!1,this.canSkipUntil=0,this.canSkipDateRanges=!1,this.skippedSegments=0,this.recentlyRemovedDateranges=void 0,this.partHoldBack=0,this.holdBack=0,this.partTarget=0,this.preloadHint=void 0,this.renditionReports=void 0,this.tuneInGoal=0,this.deltaUpdateFailed=void 0,this.driftStartTime=0,this.driftEndTime=0,this.driftStart=0,this.driftEnd=0,this.encryptedFragments=void 0,this.playlistParsingError=null,this.variableList=null,this.hasVariableRefs=!1,this.fragments=[],this.encryptedFragments=[],this.dateRanges={},this.url=e}return e.prototype.reloaded=function(e){if(!e)return this.advanced=!0,void(this.updated=!0);var t=this.lastPartSn-e.lastPartSn,n=this.lastPartIndex-e.lastPartIndex;this.updated=this.endSN!==e.endSN||!!n||!!t||!this.live,this.advanced=this.endSN>e.endSN||t>0||0===t&&n>0,this.updated||this.advanced?this.misses=Math.floor(.6*e.misses):this.misses=e.misses+1,this.availabilityDelay=e.availabilityDelay},o(e,[{key:"hasProgramDateTime",get:function(){return!!this.fragments.length&&g(this.fragments[this.fragments.length-1].programDateTime)}},{key:"levelTargetDuration",get:function(){return this.averagetargetduration||this.targetduration||10}},{key:"drift",get:function(){var e=this.driftEndTime-this.driftStartTime;return e>0?1e3*(this.driftEnd-this.driftStart)/e:1}},{key:"edge",get:function(){return this.partEnd||this.fragmentEnd}},{key:"partEnd",get:function(){var e;return null!=(e=this.partList)&&e.length?this.partList[this.partList.length-1].end:this.fragmentEnd}},{key:"fragmentEnd",get:function(){var e;return null!=(e=this.fragments)&&e.length?this.fragments[this.fragments.length-1].end:0}},{key:"age",get:function(){return this.advancedDateTime?Math.max(Date.now()-this.advancedDateTime,0)/1e3:0}},{key:"lastPartIndex",get:function(){var e;return null!=(e=this.partList)&&e.length?this.partList[this.partList.length-1].index:-1}},{key:"lastPartSn",get:function(){var e;return null!=(e=this.partList)&&e.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}]),e}();function j(e){return Uint8Array.from(atob(e),(function(e){return e.charCodeAt(0)}))}function H(e){return Uint8Array.from(unescape(encodeURIComponent(e)),(function(e){return e.charCodeAt(0)}))}var V="undefined"!=typeof self?self:void 0,G={CLEARKEY:"org.w3.clearkey",FAIRPLAY:"com.apple.fps",PLAYREADY:"com.microsoft.playready",WIDEVINE:"com.widevine.alpha"},K="org.w3.clearkey",z="com.apple.streamingkeydelivery",W="com.microsoft.playready",Y="urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed";function Z(e){switch(e){case z:return G.FAIRPLAY;case W:return G.PLAYREADY;case Y:return G.WIDEVINE;case K:return G.CLEARKEY}}var q="edef8ba979d64acea3c827dcd51d21ed";function X(e){switch(e){case G.FAIRPLAY:return z;case G.PLAYREADY:return W;case G.WIDEVINE:return Y;case G.CLEARKEY:return K}}function Q(e){var t=e.drmSystems,n=e.widevineLicenseUrl,r=t?[G.FAIRPLAY,G.WIDEVINE,G.PLAYREADY,G.CLEARKEY].filter((function(e){return!!t[e]})):[];return!r[G.WIDEVINE]&&n&&r.push(G.WIDEVINE),r}var $,J=null!=V&&null!=($=V.navigator)&&$.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null;function ee(e,t,n){return Uint8Array.prototype.slice?e.slice(t,n):new Uint8Array(Array.prototype.slice.call(e,t,n))}var te,ne=function(e,t){return t+10<=e.length&&73===e[t]&&68===e[t+1]&&51===e[t+2]&&e[t+3]<255&&e[t+4]<255&&e[t+6]<128&&e[t+7]<128&&e[t+8]<128&&e[t+9]<128},re=function(e,t){return t+10<=e.length&&51===e[t]&&68===e[t+1]&&73===e[t+2]&&e[t+3]<255&&e[t+4]<255&&e[t+6]<128&&e[t+7]<128&&e[t+8]<128&&e[t+9]<128},ie=function(e,t){for(var n=t,r=0;ne(e,t);)r+=10,r+=ae(e,t+6),re(e,t+10)&&(r+=10),t+=r;if(r>0)return e.subarray(n,n+r)},ae=function(e,t){var n=0;return n=(127&e[t])<<21,n|=(127&e[t+1])<<14,(n|=(127&e[t+2])<<7)|127&e[t+3]},oe=function(e,t){return ne(e,t)&&ae(e,t+6)+10<=e.length-t},se=function(e){for(var t=ce(e),n=0;n<t.length;n++){var r=t[n];if(le(r))return ye(r)}},le=function(e){return e&&"PRIV"===e.key&&"com.apple.streaming.transportStreamTimestamp"===e.info},ue=function(e){var t=String.fromCharCode(e[0],e[1],e[2],e[3]),n=ae(e,4);return{type:t,size:n,data:e.subarray(10,10+n)}},ce=function(e){for(var t=0,n=[];ne(e,t);){for(var r=ae(e,t+6),i=(t+=10)+r;t+8<i;){var a=ue(e.subarray(t)),o=de(a);o&&n.push(o),t+=a.size+10}re(e,t)&&(t+=10)}return n},de=function(e){return"PRIV"===e.type?pe(e):"W"===e.type[0]?he(e):fe(e)},pe=function(e){if(!(e.size<2)){var t=ge(e.data,!0),n=new Uint8Array(e.data.subarray(t.length+1));return{key:e.type,info:t,data:n.buffer}}},fe=function(e){if(!(e.size<2)){if("TXXX"===e.type){var t=1,n=ge(e.data.subarray(t),!0);t+=n.length+1;var r=ge(e.data.subarray(t));return{key:e.type,info:n,data:r}}var i=ge(e.data.subarray(1));return{key:e.type,data:i}}},he=function(e){if("WXXX"===e.type){if(e.size<2)return;var t=1,n=ge(e.data.subarray(t),!0);t+=n.length+1;var r=ge(e.data.subarray(t));return{key:e.type,info:n,data:r}}var i=ge(e.data);return{key:e.type,data:i}},ye=function(e){if(8===e.data.byteLength){var t=new Uint8Array(e.data),n=1&t[3],r=(t[4]<<23)+(t[5]<<15)+(t[6]<<7)+t[7];return r/=45,n&&(r+=47721858.84),Math.round(r)}},ge=function(e,t){void 0===t&&(t=!1);var n=function(){if(!navigator.userAgent.includes("PlayStation 4"))return te||void 0===self.TextDecoder||(te=new self.TextDecoder("utf-8")),te}();if(n){var r=n.decode(e);if(t){var i=r.indexOf("\0");return-1!==i?r.substring(0,i):r}return r.replace(/\0/g,"")}for(var a,o,s,l=e.length,u="",c=0;c<l;){if(0===(a=e[c++])&&t)return u;if(0!==a&&3!==a)switch(a>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:u+=String.fromCharCode(a);break;case 12:case 13:o=e[c++],u+=String.fromCharCode((31&a)<<6|63&o);break;case 14:o=e[c++],s=e[c++],u+=String.fromCharCode((15&a)<<12|(63&o)<<6|(63&s)<<0)}}return u};var ve=function(e){for(var t="",n=0;n<e.length;n++){var r=e[n].toString(16);r.length<2&&(r="0"+r),t+=r}return t},me=Math.pow(2,32)-1,be=[].push,ke={video:1,audio:2,id3:3,text:4};function Ee(e){return String.fromCharCode.apply(null,e)}function _e(e,t){var n=e[t]<<8|e[t+1];return n<0?65536+n:n}function Te(e,t){var n=Se(e,t);return n<0?4294967296+n:n}function Ae(e,t){var n=Te(e,t);return(n*=Math.pow(2,32))+Te(e,t+4)}function Se(e,t){return e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3]}function we(e,t,n){e[t]=n>>24,e[t+1]=n>>16&255,e[t+2]=n>>8&255,e[t+3]=255&n}function Ce(e,t){var n=[];if(!t.length)return n;for(var r=e.byteLength,i=0;i<r;){var a=Te(e,i),o=a>1?i+a:r;if(Ee(e.subarray(i+4,i+8))===t[0])if(1===t.length)n.push(e.subarray(i+8,o));else{var s=Ce(e.subarray(i+8,o),t.slice(1));s.length&&be.apply(n,s)}i=o}return n}function xe(e){var t=[],n=e[0],r=8,i=Te(e,r);r+=4;var a=0,o=0;0===n?(a=Te(e,r),o=Te(e,r+4),r+=8):(a=Ae(e,r),o=Ae(e,r+8),r+=16),r+=2;var s=e.length+o,l=_e(e,r);r+=2;for(var u=0;u<l;u++){var c=r,d=Te(e,c);c+=4;var p=2147483647&d;if(1==(2147483648&d)>>>31)return w.warn("SIDX has hierarchical references (not supported)"),null;var f=Te(e,c);c+=4,t.push({referenceSize:p,subsegmentDuration:f,info:{duration:f/i,start:s,end:s+p-1}}),s+=p,r=c+=4}return{earliestPresentationTime:a,timescale:i,version:n,referencesCount:l,references:t}}function Pe(e){for(var t=[],n=Ce(e,["moov","trak"]),i=0;i<n.length;i++){var a=n[i],o=Ce(a,["tkhd"])[0];if(o){var s=o[0],l=Te(o,0===s?12:20),u=Ce(a,["mdia","mdhd"])[0];if(u){var c=Te(u,0===(s=u[0])?12:20),d=Ce(a,["mdia","hdlr"])[0];if(d){var p=Ee(d.subarray(8,12)),f={soun:O,vide:L}[p];if(f){var h=Re(Ce(a,["mdia","minf","stbl","stsd"])[0]);t[l]={timescale:c,type:f},t[f]=r({timescale:c,id:l},h)}}}}}return Ce(e,["moov","mvex","trex"]).forEach((function(e){var n=Te(e,4),r=t[n];r&&(r.default={duration:Te(e,12),flags:Te(e,20)})})),t}function Re(e){var t=e.subarray(8),n=t.subarray(86),r=Ee(t.subarray(4,8)),i=r,a="enca"===r||"encv"===r;if(a){var o=Ce(t,[r])[0];Ce(o.subarray("enca"===r?28:78),["sinf"]).forEach((function(e){var t=Ce(e,["schm"])[0];if(t){var n=Ee(t.subarray(4,8));if("cbcs"===n||"cenc"===n){var r=Ce(e,["frma"])[0];r&&(i=Ee(r))}}}))}switch(i){case"avc1":case"avc2":case"avc3":case"avc4":var s=Ce(n,["avcC"])[0];i+="."+De(s[1])+De(s[2])+De(s[3]);break;case"mp4a":var l=Ce(t,[r])[0],u=Ce(l.subarray(28),["esds"])[0];if(u&&u.length>12){var c=4;if(3!==u[c++])break;c=Ie(u,c),c+=2;var d=u[c++];if(128&d&&(c+=2),64&d&&(c+=u[c++]),4!==u[c++])break;c=Ie(u,c);var p=u[c++];if(64!==p)break;if(i+="."+De(p),c+=12,5!==u[c++])break;c=Ie(u,c);var f=u[c++],h=(248&f)>>3;31===h&&(h+=1+((7&f)<<3)+((224&u[c])>>5)),i+="."+h}break;case"hvc1":case"hev1":var y=Ce(n,["hvcC"])[0],g=y[1],v=["","A","B","C"][g>>6],m=31&g,b=Te(y,2),k=(32&g)>>5?"H":"L",E=y[12],_=y.subarray(6,12);i+="."+v+m,i+="."+b.toString(16).toUpperCase(),i+="."+k+E;for(var T="",A=_.length;A--;){var S=_[A];(S||T)&&(T="."+S.toString(16).toUpperCase()+T)}i+=T;break;case"dvh1":case"dvhe":var w=Ce(n,["dvcC"])[0],C=w[2]>>1&127,x=w[2]<<5&32|w[3]>>3&31;i+="."+Oe(C)+"."+Oe(x);break;case"vp09":var P=Ce(n,["vpcC"])[0],R=P[4],I=P[5],D=P[6]>>4&15;i+="."+Oe(R)+"."+Oe(I)+"."+Oe(D);break;case"av01":var O=Ce(n,["av1C"])[0],L=O[1]>>>5,M=31&O[1],N=O[2]>>>7?"H":"M",U=(64&O[2])>>6,B=(32&O[2])>>5,F=2===L&&U?B?12:10:U?10:8,j=(16&O[2])>>4,H=(8&O[2])>>3,V=(4&O[2])>>2,G=3&O[2];i+="."+L+"."+Oe(M)+N+"."+Oe(F)+"."+j+"."+H+V+G+"."+Oe(1)+"."+Oe(1)+"."+Oe(1)+".0"}return{codec:i,encrypted:a}}function Ie(e,t){for(var n=t+5;128&e[t++]&&t<n;);return t}function De(e){return("0"+e.toString(16).toUpperCase()).slice(-2)}function Oe(e){return(e<10?"0":"")+e}function Le(e){var t=Ce(e,["schm"])[0];if(t){var n=Ee(t.subarray(4,8));if("cbcs"===n||"cenc"===n)return Ce(e,["schi","tenc"])[0]}return w.error("[eme] missing 'schm' box"),null}function Me(e){var t=Te(e,0),n=8;1&t&&(n+=4),4&t&&(n+=4);for(var r=0,i=Te(e,4),a=0;a<i;a++)256&t&&(r+=Te(e,n),n+=4),512&t&&(n+=4),1024&t&&(n+=4),2048&t&&(n+=4);return r}function Ne(e,t){var n=new Uint8Array(e.length+t.length);return n.set(e),n.set(t,e.length),n}function Ue(e,t){var n=[],r=t.samples,i=t.timescale,a=t.id,o=!1;return Ce(r,["moof"]).map((function(s){var l=s.byteOffset-8;Ce(s,["traf"]).map((function(s){var u=Ce(s,["tfdt"]).map((function(e){var t=e[0],n=Te(e,4);return 1===t&&(n*=Math.pow(2,32),n+=Te(e,8)),n/i}))[0];return void 0!==u&&(e=u),Ce(s,["tfhd"]).map((function(u){var c=Te(u,4),d=16777215&Te(u,0),p=0,f=0!=(16&d),h=0,y=0!=(32&d),g=8;c===a&&(0!=(1&d)&&(g+=8),0!=(2&d)&&(g+=4),0!=(8&d)&&(p=Te(u,g),g+=4),f&&(h=Te(u,g),g+=4),y&&(g+=4),"video"===t.type&&(o=function(e){if(!e)return!1;var t=e.indexOf("."),n=t<0?e:e.substring(0,t);return"hvc1"===n||"hev1"===n||"dvh1"===n||"dvhe"===n}(t.codec)),Ce(s,["trun"]).map((function(a){var s=a[0],u=16777215&Te(a,0),c=0!=(1&u),d=0,f=0!=(4&u),y=0!=(256&u),g=0,v=0!=(512&u),m=0,b=0!=(1024&u),k=0!=(2048&u),E=0,_=Te(a,4),T=8;c&&(d=Te(a,T),T+=4),f&&(T+=4);for(var A=d+l,S=0;S<_;S++){if(y?(g=Te(a,T),T+=4):g=p,v?(m=Te(a,T),T+=4):m=h,b&&(T+=4),k&&(E=0===s?Te(a,T):Se(a,T),T+=4),t.type===L)for(var w=0;w<m;){var C=Te(r,A);Be(o,r[A+=4])&&Fe(r.subarray(A,A+C),o?2:1,e+E/i,n),A+=C,w+=C+4}e+=g/i}})))}))}))})),n}function Be(e,t){if(e){var n=t>>1&63;return 39===n||40===n}return 6==(31&t)}function Fe(e,t,n,r){var i=je(e),a=0;a+=t;for(var o=0,s=0,l=0;a<i.length;){o=0;do{if(a>=i.length)break;o+=l=i[a++]}while(255===l);s=0;do{if(a>=i.length)break;s+=l=i[a++]}while(255===l);var u=i.length-a,c=a;if(s<u)a+=s;else if(s>u){w.error("Malformed SEI payload. "+s+" is too small, only "+u+" bytes left to parse.");break}if(4===o){if(181===i[c++]){var d=_e(i,c);if(c+=2,49===d){var p=Te(i,c);if(c+=4,1195456820===p){var f=i[c++];if(3===f){var h=i[c++],y=64&h,g=y?2+3*(31&h):0,v=new Uint8Array(g);if(y){v[0]=h;for(var m=1;m<g;m++)v[m]=i[c++]}r.push({type:f,payloadType:o,pts:n,bytes:v})}}}}}else if(5===o&&s>16){for(var b=[],k=0;k<16;k++){var E=i[c++].toString(16);b.push(1==E.length?"0"+E:E),3!==k&&5!==k&&7!==k&&9!==k||b.push("-")}for(var _=s-16,T=new Uint8Array(_),A=0;A<_;A++)T[A]=i[c++];r.push({payloadType:o,pts:n,uuid:b.join(""),userData:ge(T),userDataBytes:T})}}}function je(e){for(var t=e.byteLength,n=[],r=1;r<t-2;)0===e[r]&&0===e[r+1]&&3===e[r+2]?(n.push(r+2),r+=2):r++;if(0===n.length)return e;var i=t-n.length,a=new Uint8Array(i),o=0;for(r=0;r<i;o++,r++)o===n[0]&&(o++,n.shift()),a[r]=e[o];return a}var He={},Ve=function(){function e(e,t,n,r,i){void 0===r&&(r=[1]),void 0===i&&(i=null),this.uri=void 0,this.method=void 0,this.keyFormat=void 0,this.keyFormatVersions=void 0,this.encrypted=void 0,this.isCommonEncryption=void 0,this.iv=null,this.key=null,this.keyId=null,this.pssh=null,this.method=e,this.uri=t,this.keyFormat=n,this.keyFormatVersions=r,this.iv=i,this.encrypted=!!e&&"NONE"!==e,this.isCommonEncryption=this.encrypted&&"AES-128"!==e}e.clearKeyUriToKeyIdMap=function(){He={}};var t=e.prototype;return t.isSupported=function(){if(this.method){if("AES-128"===this.method||"NONE"===this.method)return!0;if("identity"===this.keyFormat)return"SAMPLE-AES"===this.method;switch(this.keyFormat){case z:case Y:case W:case K:return-1!==["ISO-23001-7","SAMPLE-AES","SAMPLE-AES-CENC","SAMPLE-AES-CTR"].indexOf(this.method)}}return!1},t.getDecryptData=function(t){if(!this.encrypted||!this.uri)return null;if("AES-128"===this.method&&this.uri&&!this.iv){"number"!=typeof t&&("AES-128"!==this.method||this.iv||w.warn('missing IV for initialization segment with method="'+this.method+'" - compliance issue'),t=0);var n=function(e){for(var t=new Uint8Array(16),n=12;n<16;n++)t[n]=e>>8*(15-n)&255;return t}(t);return new e(this.method,this.uri,"identity",this.keyFormatVersions,n)}var r=function(e){var t,n,r=e.split(":"),i=null;if("data"===r[0]&&2===r.length){var a=r[1].split(";"),o=a[a.length-1].split(",");if(2===o.length){var s="base64"===o[0],l=o[1];s?(a.splice(-1,1),i=j(l)):(t=H(l).subarray(0,16),(n=new Uint8Array(16)).set(t,16-t.length),i=n)}}return i}(this.uri);if(r)switch(this.keyFormat){case Y:this.pssh=r,r.length>=22&&(this.keyId=r.subarray(r.length-22,r.length-6));break;case W:var i=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);this.pssh=function(e,t,n){if(16!==e.byteLength)throw new RangeError("Invalid system id");var r,i,a;if(t){r=1,i=new Uint8Array(16*t.length);for(var o=0;o<t.length;o++){var s=t[o];if(16!==s.byteLength)throw new RangeError("Invalid key");i.set(s,16*o)}}else r=0,i=new Uint8Array;r>0?(a=new Uint8Array(4),t.length>0&&new DataView(a.buffer).setUint32(0,t.length,!1)):a=new Uint8Array;var l=new Uint8Array(4);return n&&n.byteLength>0&&new DataView(l.buffer).setUint32(0,n.byteLength,!1),function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];for(var i=n.length,a=8,o=i;o--;)a+=n[o].byteLength;var s=new Uint8Array(a);for(s[0]=a>>24&255,s[1]=a>>16&255,s[2]=a>>8&255,s[3]=255&a,s.set(e,4),o=0,a=8;o<i;o++)s.set(n[o],a),a+=n[o].byteLength;return s}([112,115,115,104],new Uint8Array([r,0,0,0]),e,a,i,l,n||new Uint8Array)}(i,null,r);var a=new Uint16Array(r.buffer,r.byteOffset,r.byteLength/2),o=String.fromCharCode.apply(null,Array.from(a)),s=o.substring(o.indexOf("<"),o.length),l=(new DOMParser).parseFromString(s,"text/xml").getElementsByTagName("KID")[0];if(l){var u=l.childNodes[0]?l.childNodes[0].nodeValue:l.getAttribute("VALUE");if(u){var c=j(u).subarray(0,16);!function(e){var t=function(e,t,n){var r=e[t];e[t]=e[n],e[n]=r};t(e,0,3),t(e,1,2),t(e,4,5),t(e,6,7)}(c),this.keyId=c}}break;default:var d=r.subarray(0,16);if(16!==d.length){var p=new Uint8Array(16);p.set(d,16-d.length),d=p}this.keyId=d}if(!this.keyId||16!==this.keyId.byteLength){var f=He[this.uri];if(!f){var h=Object.keys(He).length%Number.MAX_SAFE_INTEGER;f=new Uint8Array(16),new DataView(f.buffer,12,4).setUint32(0,h),He[this.uri]=f}this.keyId=f}return this},e}(),Ge=/\{\$([a-zA-Z0-9-_]+)\}/g;function Ke(e){return Ge.test(e)}function ze(e,t,n){if(null!==e.variableList||e.hasVariableRefs)for(var r=n.length;r--;){var i=n[r],a=t[i];a&&(t[i]=We(e,a))}}function We(e,t){if(null!==e.variableList||e.hasVariableRefs){var n=e.variableList;return t.replace(Ge,(function(t){var r=t.substring(2,t.length-1),i=null==n?void 0:n[r];return void 0===i?(e.playlistParsingError||(e.playlistParsingError=new Error('Missing preceding EXT-X-DEFINE tag for Variable Reference: "'+r+'"')),t):i}))}return t}function Ye(e,t,n){var r,i,a=e.variableList;if(a||(e.variableList=a={}),"QUERYPARAM"in t){r=t.QUERYPARAM;try{var o=new self.URL(n).searchParams;if(!o.has(r))throw new Error('"'+r+'" does not match any query parameter in URI: "'+n+'"');i=o.get(r)}catch(t){e.playlistParsingError||(e.playlistParsingError=new Error("EXT-X-DEFINE QUERYPARAM: "+t.message))}}else r=t.NAME,i=t.VALUE;r in a?e.playlistParsingError||(e.playlistParsingError=new Error('EXT-X-DEFINE duplicate Variable Name declarations: "'+r+'"')):a[r]=i||""}function Ze(e,t,n){var r=t.IMPORT;if(n&&r in n){var i=e.variableList;i||(e.variableList=i={}),i[r]=n[r]}else e.playlistParsingError||(e.playlistParsingError=new Error('EXT-X-DEFINE IMPORT attribute not found in Multivariant Playlist: "'+r+'"'))}function qe(e){if(void 0===e&&(e=!0),"undefined"!=typeof self)return(e||!self.MediaSource)&&self.ManagedMediaSource||self.MediaSource||self.WebKitMediaSource}var Xe={audio:{a3ds:1,"ac-3":.95,"ac-4":1,alac:.9,alaw:1,dra1:1,"dts+":1,"dts-":1,dtsc:1,dtse:1,dtsh:1,"ec-3":.9,enca:1,fLaC:.9,flac:.9,FLAC:.9,g719:1,g726:1,m4ae:1,mha1:1,mha2:1,mhm1:1,mhm2:1,mlpa:1,mp4a:1,"raw ":1,Opus:1,opus:1,samr:1,sawb:1,sawp:1,sevc:1,sqcp:1,ssmv:1,twos:1,ulaw:1},video:{avc1:1,avc2:1,avc3:1,avc4:1,avcp:1,av01:.8,drac:1,dva1:1,dvav:1,dvh1:.7,dvhe:.7,encv:1,hev1:.75,hvc1:.75,mjp2:1,mp4v:1,mvc1:1,mvc2:1,mvc3:1,mvc4:1,resv:1,rv60:1,s263:1,svc1:1,svc2:1,"vc-1":1,vp08:1,vp09:.9},text:{stpp:1,wvtt:1}};function Qe(e,t,n){return void 0===n&&(n=!0),!e.split(",").some((function(e){return!$e(e,t,n)}))}function $e(e,t,n){var r;void 0===n&&(n=!0);var i=qe(n);return null!=(r=null==i?void 0:i.isTypeSupported(Je(e,t)))&&r}function Je(e,t){return t+'/mp4;codecs="'+e+'"'}function et(e){if(e){var t=e.substring(0,4);return Xe.video[t]}return 2}function tt(e){return e.split(",").reduce((function(e,t){var n=Xe.video[t];return n?(2*n+e)/(e?3:2):(Xe.audio[t]+e)/(e?2:1)}),0)}var nt={},rt=/flac|opus/i;function it(e,t){return void 0===t&&(t=!0),e.replace(rt,(function(e){return function(e,t){if(void 0===t&&(t=!0),nt[e])return nt[e];for(var n={flac:["flac","fLaC","FLAC"],opus:["opus","Opus"]}[e],r=0;r<n.length;r++)if($e(n[r],"audio",t))return nt[e]=n[r],n[r];return e}(e.toLowerCase(),t)}))}function at(e,t){return e&&"mp4a"!==e?e:t?t.split(",")[0]:t}var ot=/#EXT-X-STREAM-INF:([^\r\n]*)(?:[\r\n](?:#[^\r\n]*)?)*([^\r\n]+)|#EXT-X-(SESSION-DATA|SESSION-KEY|DEFINE|CONTENT-STEERING|START):([^\r\n]*)[\r\n]+/g,st=/#EXT-X-MEDIA:(.*)/g,lt=/^#EXT(?:INF|-X-TARGETDURATION):/m,ut=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[\S ]*)/.source,/#EXT-X-BYTERANGE:*(.+)/.source,/#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/#.*/.source].join("|"),"g"),ct=new RegExp([/#(EXTM3U)/.source,/#EXT-X-(DATERANGE|DEFINE|KEY|MAP|PART|PART-INF|PLAYLIST-TYPE|PRELOAD-HINT|RENDITION-REPORT|SERVER-CONTROL|SKIP|START):(.+)/.source,/#EXT-X-(BITRATE|DISCONTINUITY-SEQUENCE|MEDIA-SEQUENCE|TARGETDURATION|VERSION): *(\d+)/.source,/#EXT-X-(DISCONTINUITY|ENDLIST|GAP|INDEPENDENT-SEGMENTS)/.source,/(#)([^:]*):(.*)/.source,/(#)(.*)(?:.*)\r?\n?/.source].join("|")),dt=function(){function e(){}return e.findGroup=function(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(r.id===t)return r}},e.resolve=function(e,t){return y.buildAbsoluteURL(t,e,{alwaysNormalize:!0})},e.isMediaPlaylist=function(e){return lt.test(e)},e.parseMasterPlaylist=function(t,n){var r,i={contentSteering:null,levels:[],playlistParsingError:null,sessionData:null,sessionKeys:null,startTimeOffset:null,variableList:null,hasVariableRefs:Ke(t)},a=[];for(ot.lastIndex=0;null!=(r=ot.exec(t));)if(r[1]){var o,s=new P(r[1]);ze(i,s,["CODECS","SUPPLEMENTAL-CODECS","ALLOWED-CPC","PATHWAY-ID","STABLE-VARIANT-ID","AUDIO","VIDEO","SUBTITLES","CLOSED-CAPTIONS","NAME"]);var l=We(i,r[2]),u={attrs:s,bitrate:s.decimalInteger("BANDWIDTH")||s.decimalInteger("AVERAGE-BANDWIDTH"),name:s.NAME,url:e.resolve(l,n)},c=s.decimalResolution("RESOLUTION");c&&(u.width=c.width,u.height=c.height),ht(s.CODECS,u),null!=(o=u.unknownCodecs)&&o.length||a.push(u),i.levels.push(u)}else if(r[3]){var d=r[3],p=r[4];switch(d){case"SESSION-DATA":var f=new P(p);ze(i,f,["DATA-ID","LANGUAGE","VALUE","URI"]);var h=f["DATA-ID"];h&&(null===i.sessionData&&(i.sessionData={}),i.sessionData[h]=f);break;case"SESSION-KEY":var y=pt(p,n,i);y.encrypted&&y.isSupported()?(null===i.sessionKeys&&(i.sessionKeys=[]),i.sessionKeys.push(y)):w.warn('[Keys] Ignoring invalid EXT-X-SESSION-KEY tag: "'+p+'"');break;case"DEFINE":var g=new P(p);ze(i,g,["NAME","VALUE","QUERYPARAM"]),Ye(i,g,n);break;case"CONTENT-STEERING":var v=new P(p);ze(i,v,["SERVER-URI","PATHWAY-ID"]),i.contentSteering={uri:e.resolve(v["SERVER-URI"],n),pathwayId:v["PATHWAY-ID"]||"."};break;case"START":i.startTimeOffset=ft(p)}}var m=a.length>0&&a.length<i.levels.length;return i.levels=m?a:i.levels,0===i.levels.length&&(i.playlistParsingError=new Error("no levels found in manifest")),i},e.parseMasterPlaylistMedia=function(t,n,r){var i,a={},o=r.levels,s={AUDIO:o.map((function(e){return{id:e.attrs.AUDIO,audioCodec:e.audioCodec}})),SUBTITLES:o.map((function(e){return{id:e.attrs.SUBTITLES,textCodec:e.textCodec}})),"CLOSED-CAPTIONS":[]},l=0;for(st.lastIndex=0;null!==(i=st.exec(t));){var u=new P(i[1]),c=u.TYPE;if(c){var d=s[c],p=a[c]||[];a[c]=p,ze(r,u,["URI","GROUP-ID","LANGUAGE","ASSOC-LANGUAGE","STABLE-RENDITION-ID","NAME","INSTREAM-ID","CHARACTERISTICS","CHANNELS"]);var f=u.LANGUAGE,h=u["ASSOC-LANGUAGE"],y=u.CHANNELS,g=u.CHARACTERISTICS,v=u["INSTREAM-ID"],m={attrs:u,bitrate:0,id:l++,groupId:u["GROUP-ID"]||"",name:u.NAME||f||"",type:c,default:u.bool("DEFAULT"),autoselect:u.bool("AUTOSELECT"),forced:u.bool("FORCED"),lang:f,url:u.URI?e.resolve(u.URI,n):""};if(h&&(m.assocLang=h),y&&(m.channels=y),g&&(m.characteristics=g),v&&(m.instreamId=v),null!=d&&d.length){var b=e.findGroup(d,m.groupId)||d[0];yt(m,b,"audioCodec"),yt(m,b,"textCodec")}p.push(m)}}return a},e.parseLevelPlaylist=function(e,t,n,r,i,a){var o,l,u,c=new F(t),d=c.fragments,p=null,f=0,h=0,y=0,v=0,m=null,b=new U(r,t),k=-1,E=!1,_=null;for(ut.lastIndex=0,c.m3u8=e,c.hasVariableRefs=Ke(e);null!==(o=ut.exec(e));){E&&(E=!1,(b=new U(r,t)).start=y,b.sn=f,b.cc=v,b.level=n,p&&(b.initSegment=p,b.rawProgramDateTime=p.rawProgramDateTime,p.rawProgramDateTime=null,_&&(b.setByteRange(_),_=null)));var T=o[1];if(T){b.duration=parseFloat(T);var A=(" "+o[2]).slice(1);b.title=A||null,b.tagList.push(A?["INF",T,A]:["INF",T])}else if(o[3]){if(g(b.duration)){b.start=y,u&&mt(b,u,c),b.sn=f,b.level=n,b.cc=v,d.push(b);var S=(" "+o[3]).slice(1);b.relurl=We(c,S),gt(b,m),m=b,y+=b.duration,f++,h=0,E=!0}}else if(o[4]){var C=(" "+o[4]).slice(1);m?b.setByteRange(C,m):b.setByteRange(C)}else if(o[5])b.rawProgramDateTime=(" "+o[5]).slice(1),b.tagList.push(["PROGRAM-DATE-TIME",b.rawProgramDateTime]),-1===k&&(k=d.length);else{if(!(o=o[0].match(ct))){w.warn("No matches on slow regex match for level playlist!");continue}for(l=1;l<o.length&&void 0===o[l];l++);var x=(" "+o[l]).slice(1),R=(" "+o[l+1]).slice(1),D=o[l+2]?(" "+o[l+2]).slice(1):"";switch(x){case"PLAYLIST-TYPE":c.type=R.toUpperCase();break;case"MEDIA-SEQUENCE":f=c.startSN=parseInt(R);break;case"SKIP":var O=new P(R);ze(c,O,["RECENTLY-REMOVED-DATERANGES"]);var L=O.decimalInteger("SKIPPED-SEGMENTS");if(g(L)){c.skippedSegments=L;for(var M=L;M--;)d.unshift(null);f+=L}var N=O.enumeratedString("RECENTLY-REMOVED-DATERANGES");N&&(c.recentlyRemovedDateranges=N.split("\t"));break;case"TARGETDURATION":c.targetduration=Math.max(parseInt(R),1);break;case"VERSION":c.version=parseInt(R);break;case"INDEPENDENT-SEGMENTS":case"EXTM3U":break;case"ENDLIST":c.live=!1;break;case"#":(R||D)&&b.tagList.push(D?[R,D]:[R]);break;case"DISCONTINUITY":v++,b.tagList.push(["DIS"]);break;case"GAP":b.gap=!0,b.tagList.push([x]);break;case"BITRATE":b.tagList.push([x,R]);break;case"DATERANGE":var j=new P(R);ze(c,j,["ID","CLASS","START-DATE","END-DATE","SCTE35-CMD","SCTE35-OUT","SCTE35-IN"]),ze(c,j,j.clientAttrs);var H=new I(j,c.dateRanges[j.ID]);H.isValid||c.skippedSegments?c.dateRanges[H.id]=H:w.warn('Ignoring invalid DATERANGE tag: "'+R+'"'),b.tagList.push(["EXT-X-DATERANGE",R]);break;case"DEFINE":var V=new P(R);ze(c,V,["NAME","VALUE","IMPORT","QUERYPARAM"]),"IMPORT"in V?Ze(c,V,a):Ye(c,V,t);break;case"DISCONTINUITY-SEQUENCE":v=parseInt(R);break;case"KEY":var G=pt(R,t,c);if(G.isSupported()){if("NONE"===G.method){u=void 0;break}u||(u={}),u[G.keyFormat]&&(u=s({},u)),u[G.keyFormat]=G}else w.warn('[Keys] Ignoring invalid EXT-X-KEY tag: "'+R+'"');break;case"START":c.startTimeOffset=ft(R);break;case"MAP":var K=new P(R);if(ze(c,K,["BYTERANGE","URI"]),b.duration){var z=new U(r,t);vt(z,K,n,u),p=z,b.initSegment=p,p.rawProgramDateTime&&!b.rawProgramDateTime&&(b.rawProgramDateTime=p.rawProgramDateTime)}else{var W=b.byteRangeEndOffset;if(W){var Y=b.byteRangeStartOffset;_=W-Y+"@"+Y}else _=null;vt(b,K,n,u),p=b,E=!0}break;case"SERVER-CONTROL":var Z=new P(R);c.canBlockReload=Z.bool("CAN-BLOCK-RELOAD"),c.canSkipUntil=Z.optionalFloat("CAN-SKIP-UNTIL",0),c.canSkipDateRanges=c.canSkipUntil>0&&Z.bool("CAN-SKIP-DATERANGES"),c.partHoldBack=Z.optionalFloat("PART-HOLD-BACK",0),c.holdBack=Z.optionalFloat("HOLD-BACK",0);break;case"PART-INF":var q=new P(R);c.partTarget=q.decimalFloatingPoint("PART-TARGET");break;case"PART":var X=c.partList;X||(X=c.partList=[]);var Q=h>0?X[X.length-1]:void 0,$=h++,J=new P(R);ze(c,J,["BYTERANGE","URI"]);var ee=new B(J,b,t,$,Q);X.push(ee),b.duration+=ee.duration;break;case"PRELOAD-HINT":var te=new P(R);ze(c,te,["URI"]),c.preloadHint=te;break;case"RENDITION-REPORT":var ne=new P(R);ze(c,ne,["URI"]),c.renditionReports=c.renditionReports||[],c.renditionReports.push(ne);break;default:w.warn("line parsed but not handled: "+o)}}}m&&!m.relurl?(d.pop(),y-=m.duration,c.partList&&(c.fragmentHint=m)):c.partList&&(gt(b,m),b.cc=v,c.fragmentHint=b,u&&mt(b,u,c));var re=d.length,ie=d[0],ae=d[re-1];if((y+=c.skippedSegments*c.targetduration)>0&&re&&ae){c.averagetargetduration=y/re;var oe=ae.sn;c.endSN="initSegment"!==oe?oe:0,c.live||(ae.endList=!0),ie&&(c.startCC=ie.cc)}else c.endSN=0,c.startCC=0;return c.fragmentHint&&(y+=c.fragmentHint.duration),c.totalduration=y,c.endCC=v,k>0&&function(e,t){for(var n=e[t],r=t;r--;){var i=e[r];if(!i)return;i.programDateTime=n.programDateTime-1e3*i.duration,n=i}}(d,k),c},e}();function pt(e,t,n){var r,i,a=new P(e);ze(n,a,["KEYFORMAT","KEYFORMATVERSIONS","URI","IV","URI"]);var o=null!=(r=a.METHOD)?r:"",s=a.URI,l=a.hexadecimalInteger("IV"),u=a.KEYFORMATVERSIONS,c=null!=(i=a.KEYFORMAT)?i:"identity";s&&a.IV&&!l&&w.error("Invalid IV: "+a.IV);var d=s?dt.resolve(s,t):"",p=(u||"1").split("/").map(Number).filter(Number.isFinite);return new Ve(o,d,c,p,l)}function ft(e){var t=new P(e).decimalFloatingPoint("TIME-OFFSET");return g(t)?t:null}function ht(e,t){var n=(e||"").split(/[ ,]+/).filter((function(e){return e}));["video","audio","text"].forEach((function(e){var r=n.filter((function(t){return function(e,t){var n=Xe[t];return!!n&&!!n[e.slice(0,4)]}(t,e)}));r.length&&(t[e+"Codec"]=r.join(","),n=n.filter((function(e){return-1===r.indexOf(e)})))})),t.unknownCodecs=n}function yt(e,t,n){var r=t[n];r&&(e[n]=r)}function gt(e,t){e.rawProgramDateTime?e.programDateTime=Date.parse(e.rawProgramDateTime):null!=t&&t.programDateTime&&(e.programDateTime=t.endProgramDateTime),g(e.programDateTime)||(e.programDateTime=null,e.rawProgramDateTime=null)}function vt(e,t,n,r){e.relurl=t.URI,t.BYTERANGE&&e.setByteRange(t.BYTERANGE),e.level=n,e.sn="initSegment",r&&(e.levelkeys=r),e.initSegment=null}function mt(e,t,n){e.levelkeys=t;var r=n.encryptedFragments;r.length&&r[r.length-1].levelkeys===t||!Object.keys(t).some((function(e){return t[e].isCommonEncryption}))||r.push(e)}var bt="manifest",kt="level",Et="audioTrack",_t="subtitleTrack",Tt="main",At="audio",St="subtitle";function wt(e){switch(e.type){case Et:return At;case _t:return St;default:return Tt}}function Ct(e,t){var n=e.url;return void 0!==n&&0!==n.indexOf("data:")||(n=t.url),n}var xt=function(){function e(e){this.hls=void 0,this.loaders=Object.create(null),this.variableList=null,this.hls=e,this.registerListeners()}var t=e.prototype;return t.startLoad=function(e){},t.stopLoad=function(){this.destroyInternalLoaders()},t.registerListeners=function(){var e=this.hls;e.on(b.MANIFEST_LOADING,this.onManifestLoading,this),e.on(b.LEVEL_LOADING,this.onLevelLoading,this),e.on(b.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.on(b.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},t.unregisterListeners=function(){var e=this.hls;e.off(b.MANIFEST_LOADING,this.onManifestLoading,this),e.off(b.LEVEL_LOADING,this.onLevelLoading,this),e.off(b.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.off(b.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},t.createInternalLoader=function(e){var t=this.hls.config,n=t.pLoader,r=t.loader,i=new(n||r)(t);return this.loaders[e.type]=i,i},t.getInternalLoader=function(e){return this.loaders[e.type]},t.resetInternalLoader=function(e){this.loaders[e]&&delete this.loaders[e]},t.destroyInternalLoaders=function(){for(var e in this.loaders){var t=this.loaders[e];t&&t.destroy(),this.resetInternalLoader(e)}},t.destroy=function(){this.variableList=null,this.unregisterListeners(),this.destroyInternalLoaders()},t.onManifestLoading=function(e,t){var n=t.url;this.variableList=null,this.load({id:null,level:0,responseType:"text",type:bt,url:n,deliveryDirectives:null})},t.onLevelLoading=function(e,t){var n=t.id,r=t.level,i=t.pathwayId,a=t.url,o=t.deliveryDirectives;this.load({id:n,level:r,pathwayId:i,responseType:"text",type:kt,url:a,deliveryDirectives:o})},t.onAudioTrackLoading=function(e,t){var n=t.id,r=t.groupId,i=t.url,a=t.deliveryDirectives;this.load({id:n,groupId:r,level:null,responseType:"text",type:Et,url:i,deliveryDirectives:a})},t.onSubtitleTrackLoading=function(e,t){var n=t.id,r=t.groupId,i=t.url,a=t.deliveryDirectives;this.load({id:n,groupId:r,level:null,responseType:"text",type:_t,url:i,deliveryDirectives:a})},t.load=function(e){var t,n,r,i=this,a=this.hls.config,o=this.getInternalLoader(e);if(o){var l=o.context;if(l&&l.url===e.url&&l.level===e.level)return void w.trace("[playlist-loader]: playlist request ongoing");w.log("[playlist-loader]: aborting previous loader for type: "+e.type),o.abort()}if(n=e.type===bt?a.manifestLoadPolicy.default:s({},a.playlistLoadPolicy.default,{timeoutRetry:null,errorRetry:null}),o=this.createInternalLoader(e),g(null==(t=e.deliveryDirectives)?void 0:t.part)&&(e.type===kt&&null!==e.level?r=this.hls.levels[e.level].details:e.type===Et&&null!==e.id?r=this.hls.audioTracks[e.id].details:e.type===_t&&null!==e.id&&(r=this.hls.subtitleTracks[e.id].details),r)){var u=r.partTarget,c=r.targetduration;if(u&&c){var d=1e3*Math.max(3*u,.8*c);n=s({},n,{maxTimeToFirstByteMs:Math.min(d,n.maxTimeToFirstByteMs),maxLoadTimeMs:Math.min(d,n.maxTimeToFirstByteMs)})}}var p=n.errorRetry||n.timeoutRetry||{},f={loadPolicy:n,timeout:n.maxLoadTimeMs,maxRetry:p.maxNumRetry||0,retryDelay:p.retryDelayMs||0,maxRetryDelay:p.maxRetryDelayMs||0},h={onSuccess:function(e,t,n,r){var a=i.getInternalLoader(n);i.resetInternalLoader(n.type);var o=e.data;0===o.indexOf("#EXTM3U")?(t.parsing.start=performance.now(),dt.isMediaPlaylist(o)?i.handleTrackOrLevelPlaylist(e,t,n,r||null,a):i.handleMasterPlaylist(e,t,n,r)):i.handleManifestParsingError(e,n,new Error("no EXTM3U delimiter"),r||null,t)},onError:function(e,t,n,r){i.handleNetworkError(t,n,!1,e,r)},onTimeout:function(e,t,n){i.handleNetworkError(t,n,!0,void 0,e)}};o.load(e,f,h)},t.handleMasterPlaylist=function(e,t,n,r){var i=this.hls,a=e.data,o=Ct(e,n),s=dt.parseMasterPlaylist(a,o);if(s.playlistParsingError)this.handleManifestParsingError(e,n,s.playlistParsingError,r,t);else{var l=s.contentSteering,u=s.levels,c=s.sessionData,d=s.sessionKeys,p=s.startTimeOffset,f=s.variableList;this.variableList=f;var h=dt.parseMasterPlaylistMedia(a,o,s),y=h.AUDIO,g=void 0===y?[]:y,v=h.SUBTITLES,m=h["CLOSED-CAPTIONS"];g.length&&(g.some((function(e){return!e.url}))||!u[0].audioCodec||u[0].attrs.AUDIO||(w.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),g.unshift({type:"main",name:"main",groupId:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new P({}),bitrate:0,url:""}))),i.trigger(b.MANIFEST_LOADED,{levels:u,audioTracks:g,subtitles:v,captions:m,contentSteering:l,url:o,stats:t,networkDetails:r,sessionData:c,sessionKeys:d,startTimeOffset:p,variableList:f})}},t.handleTrackOrLevelPlaylist=function(e,t,n,r,i){var a=this.hls,o=n.id,s=n.level,l=n.type,u=Ct(e,n),c=g(s)?s:g(o)?o:0,d=wt(n),p=dt.parseLevelPlaylist(e.data,u,c,d,0,this.variableList);if(l===bt){var f={attrs:new P({}),bitrate:0,details:p,name:"",url:u};a.trigger(b.MANIFEST_LOADED,{levels:[f],audioTracks:[],url:u,stats:t,networkDetails:r,sessionData:null,sessionKeys:null,contentSteering:null,startTimeOffset:null,variableList:null})}t.parsing.end=performance.now(),n.levelDetails=p,this.handlePlaylistLoaded(p,e,t,n,r,i)},t.handleManifestParsingError=function(e,t,n,r,i){this.hls.trigger(b.ERROR,{type:k.NETWORK_ERROR,details:E.MANIFEST_PARSING_ERROR,fatal:t.type===bt,url:e.url,err:n,error:n,reason:n.message,response:e,context:t,networkDetails:r,stats:i})},t.handleNetworkError=function(e,t,n,i,a){void 0===n&&(n=!1);var o="A network "+(n?"timeout":"error"+(i?" (status "+i.code+")":""))+" occurred while loading "+e.type;e.type===kt?o+=": "+e.level+" id: "+e.id:e.type!==Et&&e.type!==_t||(o+=" id: "+e.id+' group-id: "'+e.groupId+'"');var s=new Error(o);w.warn("[playlist-loader]: "+o);var l=E.UNKNOWN,u=!1,c=this.getInternalLoader(e);switch(e.type){case bt:l=n?E.MANIFEST_LOAD_TIMEOUT:E.MANIFEST_LOAD_ERROR,u=!0;break;case kt:l=n?E.LEVEL_LOAD_TIMEOUT:E.LEVEL_LOAD_ERROR,u=!1;break;case Et:l=n?E.AUDIO_TRACK_LOAD_TIMEOUT:E.AUDIO_TRACK_LOAD_ERROR,u=!1;break;case _t:l=n?E.SUBTITLE_TRACK_LOAD_TIMEOUT:E.SUBTITLE_LOAD_ERROR,u=!1}c&&this.resetInternalLoader(e.type);var d={type:k.NETWORK_ERROR,details:l,fatal:u,url:e.url,loader:c,context:e,error:s,networkDetails:t,stats:a};if(i){var p=(null==t?void 0:t.url)||e.url;d.response=r({url:p,data:void 0},i)}this.hls.trigger(b.ERROR,d)},t.handlePlaylistLoaded=function(e,t,n,r,i,a){var o=this.hls,s=r.type,l=r.level,u=r.id,c=r.groupId,d=r.deliveryDirectives,p=Ct(t,r),f=wt(r),h="number"==typeof r.level&&f===Tt?l:void 0;if(e.fragments.length){e.targetduration||(e.playlistParsingError=new Error("Missing Target Duration"));var y=e.playlistParsingError;if(y)o.trigger(b.ERROR,{type:k.NETWORK_ERROR,details:E.LEVEL_PARSING_ERROR,fatal:!1,url:p,error:y,reason:y.message,response:t,context:r,level:h,parent:f,networkDetails:i,stats:n});else switch(e.live&&a&&(a.getCacheAge&&(e.ageHeader=a.getCacheAge()||0),a.getCacheAge&&!isNaN(e.ageHeader)||(e.ageHeader=0)),s){case bt:case kt:o.trigger(b.LEVEL_LOADED,{details:e,level:h||0,id:u||0,stats:n,networkDetails:i,deliveryDirectives:d});break;case Et:o.trigger(b.AUDIO_TRACK_LOADED,{details:e,id:u||0,groupId:c||"",stats:n,networkDetails:i,deliveryDirectives:d});break;case _t:o.trigger(b.SUBTITLE_TRACK_LOADED,{details:e,id:u||0,groupId:c||"",stats:n,networkDetails:i,deliveryDirectives:d})}}else{var g=new Error("No Segments found in Playlist");o.trigger(b.ERROR,{type:k.NETWORK_ERROR,details:E.LEVEL_EMPTY_ERROR,fatal:!1,url:p,error:g,reason:g.message,response:t,context:r,level:h,parent:f,networkDetails:i,stats:n})}},e}();function Pt(e,t){var n;try{n=new Event("addtrack")}catch(e){(n=document.createEvent("Event")).initEvent("addtrack",!1,!1)}n.track=e,t.dispatchEvent(n)}function Rt(e,t){var n=e.mode;if("disabled"===n&&(e.mode="hidden"),e.cues&&!e.cues.getCueById(t.id))try{if(e.addCue(t),!e.cues.getCueById(t.id))throw new Error("addCue is failed for: "+t)}catch(n){w.debug("[texttrack-utils]: "+n);try{var r=new self.TextTrackCue(t.startTime,t.endTime,t.text);r.id=t.id,e.addCue(r)}catch(e){w.debug("[texttrack-utils]: Legacy TextTrackCue fallback failed: "+e)}}"disabled"===n&&(e.mode=n)}function It(e){var t=e.mode;if("disabled"===t&&(e.mode="hidden"),e.cues)for(var n=e.cues.length;n--;)e.removeCue(e.cues[n]);"disabled"===t&&(e.mode=t)}function Dt(e,t,n,r){var i=e.mode;if("disabled"===i&&(e.mode="hidden"),e.cues&&e.cues.length>0)for(var a=function(e,t,n){var r=[],i=function(e,t){if(t<e[0].startTime)return 0;var n=e.length-1;if(t>e[n].endTime)return-1;for(var r=0,i=n;r<=i;){var a=Math.floor((i+r)/2);if(t<e[a].startTime)i=a-1;else{if(!(t>e[a].startTime&&r<n))return a;r=a+1}}return e[r].startTime-t<t-e[i].startTime?r:i}(e,t);if(i>-1)for(var a=i,o=e.length;a<o;a++){var s=e[a];if(s.startTime>=t&&s.endTime<=n)r.push(s);else if(s.startTime>n)return r}return r}(e.cues,t,n),o=0;o<a.length;o++)r&&!r(a[o])||e.removeCue(a[o]);"disabled"===i&&(e.mode=i)}function Ot(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];"subtitles"!==r.kind&&"captions"!==r.kind||!r.label||t.push(e[n])}return t}var Lt="org.id3",Mt="https://aomedia.org/emsg/ID3";function Nt(){if("undefined"!=typeof self)return self.VTTCue||self.TextTrackCue}function Ut(e,t,n,i,a){var o=new e(t,n,"");try{o.value=i,a&&(o.type=a)}catch(s){o=new e(t,n,JSON.stringify(a?r({type:a},i):i))}return o}var Bt=function(){var e=Nt();try{e&&new e(0,Number.POSITIVE_INFINITY,"")}catch(e){return Number.MAX_VALUE}return Number.POSITIVE_INFINITY}();function Ft(e,t){return e.getTime()/1e3-t}var jt=function(){function e(e){this.hls=void 0,this.id3Track=null,this.media=null,this.dateRangeCuesAppended={},this.hls=e,this._registerListeners()}var t=e.prototype;return t.destroy=function(){this._unregisterListeners(),this.id3Track=null,this.media=null,this.dateRangeCuesAppended={},this.hls=null},t._registerListeners=function(){var e=this.hls;e.on(b.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(b.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(b.MANIFEST_LOADING,this.onManifestLoading,this),e.on(b.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.on(b.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(b.LEVEL_UPDATED,this.onLevelUpdated,this)},t._unregisterListeners=function(){var e=this.hls;e.off(b.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(b.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(b.MANIFEST_LOADING,this.onManifestLoading,this),e.off(b.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.off(b.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(b.LEVEL_UPDATED,this.onLevelUpdated,this)},t.onMediaAttached=function(e,t){this.media=t.media},t.onMediaDetaching=function(){this.id3Track&&(It(this.id3Track),this.id3Track=null,this.media=null,this.dateRangeCuesAppended={})},t.onManifestLoading=function(){this.dateRangeCuesAppended={}},t.createTrack=function(e){var t=this.getID3Track(e.textTracks);return t.mode="hidden",t},t.getID3Track=function(e){if(this.media){for(var t=0;t<e.length;t++){var n=e[t];if("metadata"===n.kind&&"id3"===n.label)return Pt(n,this.media),n}return this.media.addTextTrack("metadata","id3")}},t.onFragParsingMetadata=function(e,t){if(this.media){var n=this.hls.config,r=n.enableEmsgMetadataCues,i=n.enableID3MetadataCues;if(r||i){var a=t.samples;this.id3Track||(this.id3Track=this.createTrack(this.media));var o=Nt();if(o)for(var s=0;s<a.length;s++){var l=a[s].type;if((l!==Mt||r)&&i){var u=ce(a[s].data);if(u){var c=a[s].pts,d=c+a[s].duration;d>Bt&&(d=Bt),d-c<=0&&(d=c+.25);for(var p=0;p<u.length;p++){var f=u[p];if(!le(f)){this.updateId3CueEnds(c,l);var h=Ut(o,c,d,f,l);h&&this.id3Track.addCue(h)}}}}}}}},t.updateId3CueEnds=function(e,t){var n,r=null==(n=this.id3Track)?void 0:n.cues;if(r)for(var i=r.length;i--;){var a=r[i];a.type===t&&a.startTime<e&&a.endTime===Bt&&(a.endTime=e)}},t.onBufferFlushing=function(e,t){var n=t.startOffset,r=t.endOffset,i=t.type,a=this.id3Track,o=this.hls;if(o){var s=o.config,l=s.enableEmsgMetadataCues,u=s.enableID3MetadataCues;a&&(l||u)&&Dt(a,n,r,"audio"===i?function(e){return e.type===Lt&&u}:"video"===i?function(e){return e.type===Mt&&l}:function(e){return e.type===Lt&&u||e.type===Mt&&l})}},t.onLevelUpdated=function(e,t){var n=this,r=t.details;if(this.media&&r.hasProgramDateTime&&this.hls.config.enableDateRangeMetadataCues){var i=this.dateRangeCuesAppended,a=this.id3Track,o=r.dateRanges,s=Object.keys(o);if(a)for(var l=Object.keys(i).filter((function(e){return!s.includes(e)})),u=function(){var e=l[c];Object.keys(i[e].cues).forEach((function(t){a.removeCue(i[e].cues[t])})),delete i[e]},c=l.length;c--;)u();var d=r.fragments[r.fragments.length-1];if(0!==s.length&&g(null==d?void 0:d.programDateTime)){this.id3Track||(this.id3Track=this.createTrack(this.media));for(var p=d.programDateTime/1e3-d.start,f=Nt(),h=function(){var e=s[y],t=o[e],r=Ft(t.startDate,p),a=i[e],l=(null==a?void 0:a.cues)||{},u=(null==a?void 0:a.durationKnown)||!1,c=Bt,d=t.endDate;if(d)c=Ft(d,p),u=!0;else if(t.endOnNext&&!u){var h=s.reduce((function(e,n){if(n!==t.id){var r=o[n];if(r.class===t.class&&r.startDate>t.startDate&&(!e||t.startDate<e.startDate))return r}return e}),null);h&&(c=Ft(h.startDate,p),u=!0)}for(var g,v,m=Object.keys(t.attr),b=0;b<m.length;b++){var k=m[b];if("ID"!==(v=k)&&"CLASS"!==v&&"START-DATE"!==v&&"DURATION"!==v&&"END-DATE"!==v&&"END-ON-NEXT"!==v){var E=l[k];if(E)u&&!a.durationKnown&&(E.endTime=c);else if(f){var _=t.attr[k];R(k)&&(g=_,_=Uint8Array.from(g.replace(/^0x/,"").replace(/([\da-fA-F]{2}) ?/g,"0x$1 ").replace(/ +$/,"").split(" ")).buffer);var T=Ut(f,r,c,{key:k,data:_},"com.apple.quicktime.HLS");T&&(T.id=e,n.id3Track.addCue(T),l[k]=T)}}}i[e]={cues:l,dateRange:t,durationKnown:u}},y=0;y<s.length;y++)h()}}},e}(),Ht=function(){function e(e){var t=this;this.hls=void 0,this.config=void 0,this.media=null,this.levelDetails=null,this.currentTime=0,this.stallCount=0,this._latency=null,this.timeupdateHandler=function(){return t.timeupdate()},this.hls=e,this.config=e.config,this.registerListeners()}var t=e.prototype;return t.destroy=function(){this.unregisterListeners(),this.onMediaDetaching(),this.levelDetails=null,this.hls=this.timeupdateHandler=null},t.registerListeners=function(){this.hls.on(b.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(b.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.on(b.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(b.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.on(b.ERROR,this.onError,this)},t.unregisterListeners=function(){this.hls.off(b.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(b.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.off(b.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.off(b.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.off(b.ERROR,this.onError,this)},t.onMediaAttached=function(e,t){this.media=t.media,this.media.addEventListener("timeupdate",this.timeupdateHandler)},t.onMediaDetaching=function(){this.media&&(this.media.removeEventListener("timeupdate",this.timeupdateHandler),this.media=null)},t.onManifestLoading=function(){this.levelDetails=null,this._latency=null,this.stallCount=0},t.onLevelUpdated=function(e,t){var n=t.details;this.levelDetails=n,n.advanced&&this.timeupdate(),!n.live&&this.media&&this.media.removeEventListener("timeupdate",this.timeupdateHandler)},t.onError=function(e,t){var n;t.details===E.BUFFER_STALLED_ERROR&&(this.stallCount++,null!=(n=this.levelDetails)&&n.live&&w.warn("[playback-rate-controller]: Stall detected, adjusting target latency"))},t.timeupdate=function(){var e=this.media,t=this.levelDetails;if(e&&t){this.currentTime=e.currentTime;var n=this.computeLatency();if(null!==n){this._latency=n;var r=this.config,i=r.lowLatencyMode,a=r.maxLiveSyncPlaybackRate;if(i&&1!==a&&t.live){var o=this.targetLatency;if(null!==o){var s=n-o;if(s<Math.min(this.maxLatency,o+t.targetduration)&&s>.05&&this.forwardBufferLength>1){var l=Math.min(2,Math.max(1,a)),u=Math.round(2/(1+Math.exp(-.75*s-this.edgeStalled))*20)/20;e.playbackRate=Math.min(l,Math.max(1,u))}else 1!==e.playbackRate&&0!==e.playbackRate&&(e.playbackRate=1)}}}}},t.estimateLiveEdge=function(){var e=this.levelDetails;return null===e?null:e.edge+e.age},t.computeLatency=function(){var e=this.estimateLiveEdge();return null===e?null:e-this.currentTime},o(e,[{key:"latency",get:function(){return this._latency||0}},{key:"maxLatency",get:function(){var e=this.config,t=this.levelDetails;return void 0!==e.liveMaxLatencyDuration?e.liveMaxLatencyDuration:t?e.liveMaxLatencyDurationCount*t.targetduration:0}},{key:"targetLatency",get:function(){var e=this.levelDetails;if(null===e)return null;var t=e.holdBack,n=e.partHoldBack,r=e.targetduration,i=this.config,a=i.liveSyncDuration,o=i.liveSyncDurationCount,s=i.lowLatencyMode,l=this.hls.userConfig,u=s&&n||t;(l.liveSyncDuration||l.liveSyncDurationCount||0===u)&&(u=void 0!==a?a:o*r);var c=r;return u+Math.min(1*this.stallCount,c)}},{key:"liveSyncPosition",get:function(){var e=this.estimateLiveEdge(),t=this.targetLatency,n=this.levelDetails;if(null===e||null===t||null===n)return null;var r=n.edge,i=e-t-this.edgeStalled,a=r-n.totalduration,o=r-(this.config.lowLatencyMode&&n.partTarget||n.targetduration);return Math.min(Math.max(a,i),o)}},{key:"drift",get:function(){var e=this.levelDetails;return null===e?1:e.drift}},{key:"edgeStalled",get:function(){var e=this.levelDetails;if(null===e)return 0;var t=3*(this.config.lowLatencyMode&&e.partTarget||e.targetduration);return Math.max(e.age-t,0)}},{key:"forwardBufferLength",get:function(){var e=this.media,t=this.levelDetails;if(!e||!t)return 0;var n=e.buffered.length;return(n?e.buffered.end(n-1):t.edge)-this.currentTime}}]),e}(),Vt=["NONE","TYPE-0","TYPE-1",null],Gt=["SDR","PQ","HLG"];function Kt(e){var t=e.canSkipUntil,n=e.canSkipDateRanges,r=e.age;return t&&r<t/2?n?"v2":"YES":""}var zt=function(){function e(e,t,n){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=e,this.part=t,this.skip=n}return e.prototype.addDirectives=function(e){var t=new self.URL(e);return void 0!==this.msn&&t.searchParams.set("_HLS_msn",this.msn.toString()),void 0!==this.part&&t.searchParams.set("_HLS_part",this.part.toString()),this.skip&&t.searchParams.set("_HLS_skip",this.skip),t.href},e}(),Wt=function(){function e(e){this._attrs=void 0,this.audioCodec=void 0,this.bitrate=void 0,this.codecSet=void 0,this.url=void 0,this.frameRate=void 0,this.height=void 0,this.id=void 0,this.name=void 0,this.videoCodec=void 0,this.width=void 0,this.details=void 0,this.fragmentError=0,this.loadError=0,this.loaded=void 0,this.realBitrate=0,this.supportedPromise=void 0,this.supportedResult=void 0,this._avgBitrate=0,this._audioGroups=void 0,this._subtitleGroups=void 0,this._urlId=0,this.url=[e.url],this._attrs=[e.attrs],this.bitrate=e.bitrate,e.details&&(this.details=e.details),this.id=e.id||0,this.name=e.name,this.width=e.width||0,this.height=e.height||0,this.frameRate=e.attrs.optionalFloat("FRAME-RATE",0),this._avgBitrate=e.attrs.decimalInteger("AVERAGE-BANDWIDTH"),this.audioCodec=e.audioCodec,this.videoCodec=e.videoCodec,this.codecSet=[e.videoCodec,e.audioCodec].filter((function(e){return!!e})).map((function(e){return e.substring(0,4)})).join(","),this.addGroupId("audio",e.attrs.AUDIO),this.addGroupId("text",e.attrs.SUBTITLES)}var t=e.prototype;return t.hasAudioGroup=function(e){return Yt(this._audioGroups,e)},t.hasSubtitleGroup=function(e){return Yt(this._subtitleGroups,e)},t.addGroupId=function(e,t){if(t)if("audio"===e){var n=this._audioGroups;n||(n=this._audioGroups=[]),-1===n.indexOf(t)&&n.push(t)}else if("text"===e){var r=this._subtitleGroups;r||(r=this._subtitleGroups=[]),-1===r.indexOf(t)&&r.push(t)}},t.addFallback=function(){},o(e,[{key:"maxBitrate",get:function(){return Math.max(this.realBitrate,this.bitrate)}},{key:"averageBitrate",get:function(){return this._avgBitrate||this.realBitrate||this.bitrate}},{key:"attrs",get:function(){return this._attrs[0]}},{key:"codecs",get:function(){return this.attrs.CODECS||""}},{key:"pathwayId",get:function(){return this.attrs["PATHWAY-ID"]||"."}},{key:"videoRange",get:function(){return this.attrs["VIDEO-RANGE"]||"SDR"}},{key:"score",get:function(){return this.attrs.optionalFloat("SCORE",0)}},{key:"uri",get:function(){return this.url[0]||""}},{key:"audioGroups",get:function(){return this._audioGroups}},{key:"subtitleGroups",get:function(){return this._subtitleGroups}},{key:"urlId",get:function(){return 0},set:function(e){}},{key:"audioGroupIds",get:function(){return this.audioGroups?[this.audioGroupId]:void 0}},{key:"textGroupIds",get:function(){return this.subtitleGroups?[this.textGroupId]:void 0}},{key:"audioGroupId",get:function(){var e;return null==(e=this.audioGroups)?void 0:e[0]}},{key:"textGroupId",get:function(){var e;return null==(e=this.subtitleGroups)?void 0:e[0]}}]),e}();function Yt(e,t){return!(!t||!e)&&-1!==e.indexOf(t)}function Zt(e,t){var n=t.startPTS;if(g(n)){var r,i=0;t.sn>e.sn?(i=n-e.start,r=e):(i=e.start-n,r=t),r.duration!==i&&(r.duration=i)}else t.sn>e.sn?e.cc===t.cc&&e.minEndPTS?t.start=e.start+(e.minEndPTS-e.start):t.start=e.start+e.duration:t.start=Math.max(e.start-t.duration,0)}function qt(e,t,n,r,i,a){r-n<=0&&(w.warn("Fragment should have a positive duration",t),r=n+t.duration,a=i+t.duration);var o=n,s=r,l=t.startPTS,u=t.endPTS;if(g(l)){var c=Math.abs(l-n);g(t.deltaPTS)?t.deltaPTS=Math.max(c,t.deltaPTS):t.deltaPTS=c,o=Math.max(n,l),n=Math.min(n,l),i=Math.min(i,t.startDTS),s=Math.min(r,u),r=Math.max(r,u),a=Math.max(a,t.endDTS)}var d=n-t.start;0!==t.start&&(t.start=n),t.duration=r-t.start,t.startPTS=n,t.maxStartPTS=o,t.startDTS=i,t.endPTS=r,t.minEndPTS=s,t.endDTS=a;var p,f=t.sn;if(!e||f<e.startSN||f>e.endSN)return 0;var h=f-e.startSN,y=e.fragments;for(y[h]=t,p=h;p>0;p--)Zt(y[p],y[p-1]);for(p=h;p<y.length-1;p++)Zt(y[p],y[p+1]);return e.fragmentHint&&Zt(y[y.length-1],e.fragmentHint),e.PTSKnown=e.alignedSliding=!0,d}function Xt(e,t){for(var n=null,r=e.fragments,i=r.length-1;i>=0;i--){var a=r[i].initSegment;if(a){n=a;break}}e.fragmentHint&&delete e.fragmentHint.endPTS;var o,l,u,c,d,p=0;if(function(e,t,n){for(var r=t.skippedSegments,i=Math.max(e.startSN,t.startSN)-t.startSN,a=(e.fragmentHint?1:0)+(r?t.endSN:Math.min(e.endSN,t.endSN))-t.startSN,o=t.startSN-e.startSN,s=t.fragmentHint?t.fragments.concat(t.fragmentHint):t.fragments,l=e.fragmentHint?e.fragments.concat(e.fragmentHint):e.fragments,u=i;u<=a;u++){var c=l[o+u],d=s[u];r&&!d&&u<r&&(d=t.fragments[u]=c),c&&d&&n(c,d)}}(e,t,(function(e,r){e.relurl&&(p=e.cc-r.cc),g(e.startPTS)&&g(e.endPTS)&&(r.start=r.startPTS=e.startPTS,r.startDTS=e.startDTS,r.maxStartPTS=e.maxStartPTS,r.endPTS=e.endPTS,r.endDTS=e.endDTS,r.minEndPTS=e.minEndPTS,r.duration=e.endPTS-e.startPTS,r.duration&&(o=r),t.PTSKnown=t.alignedSliding=!0),r.elementaryStreams=e.elementaryStreams,r.loader=e.loader,r.stats=e.stats,e.initSegment&&(r.initSegment=e.initSegment,n=e.initSegment)})),n&&(t.fragmentHint?t.fragments.concat(t.fragmentHint):t.fragments).forEach((function(e){var t;!e||e.initSegment&&e.initSegment.relurl!==(null==(t=n)?void 0:t.relurl)||(e.initSegment=n)})),t.skippedSegments)if(t.deltaUpdateFailed=t.fragments.some((function(e){return!e})),t.deltaUpdateFailed){w.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(var f=t.skippedSegments;f--;)t.fragments.shift();t.startSN=t.fragments[0].sn,t.startCC=t.fragments[0].cc}else t.canSkipDateRanges&&(t.dateRanges=(l=e.dateRanges,u=t.dateRanges,c=t.recentlyRemovedDateranges,d=s({},l),c&&c.forEach((function(e){delete d[e]})),Object.keys(u).forEach((function(e){var t=new I(u[e].attr,d[e]);t.isValid?d[e]=t:w.warn('Ignoring invalid Playlist Delta Update DATERANGE tag: "'+JSON.stringify(u[e].attr)+'"')})),d));var h=t.fragments;if(p){w.warn("discontinuity sliding from playlist, take drift into account");for(var y=0;y<h.length;y++)h[y].cc+=p}t.skippedSegments&&(t.startCC=t.fragments[0].cc),function(e,t,n){if(e&&t)for(var r=0,i=0,a=e.length;i<=a;i++){var o=e[i],s=t[i+r];o&&s&&o.index===s.index&&o.fragment.sn===s.fragment.sn?n(o,s):r--}}(e.partList,t.partList,(function(e,t){t.elementaryStreams=e.elementaryStreams,t.stats=e.stats})),o?qt(t,o,o.startPTS,o.endPTS,o.startDTS,o.endDTS):Qt(e,t),h.length&&(t.totalduration=t.edge-h[0].start),t.driftStartTime=e.driftStartTime,t.driftStart=e.driftStart;var v=t.advancedDateTime;if(t.advanced&&v){var m=t.edge;t.driftStart||(t.driftStartTime=v,t.driftStart=m),t.driftEndTime=v,t.driftEnd=m}else t.driftEndTime=e.driftEndTime,t.driftEnd=e.driftEnd,t.advancedDateTime=e.advancedDateTime}function Qt(e,t){var n=t.startSN+t.skippedSegments-e.startSN,r=e.fragments;n<0||n>=r.length||$t(t,r[n].start)}function $t(e,t){if(t){for(var n=e.fragments,r=e.skippedSegments;r<n.length;r++)n[r].start+=t;e.fragmentHint&&(e.fragmentHint.start+=t)}}function Jt(e,t,n){var r;return null!=e&&e.details?en(null==(r=e.details)?void 0:r.partList,t,n):null}function en(e,t,n){if(e)for(var r=e.length;r--;){var i=e[r];if(i.index===n&&i.fragment.sn===t)return i}return null}function tn(e){e.forEach((function(e,t){var n=e.details;null!=n&&n.fragments&&n.fragments.forEach((function(e){e.level=t}))}))}function nn(e){switch(e.details){case E.FRAG_LOAD_TIMEOUT:case E.KEY_LOAD_TIMEOUT:case E.LEVEL_LOAD_TIMEOUT:case E.MANIFEST_LOAD_TIMEOUT:return!0}return!1}function rn(e,t){var n=nn(t);return e.default[(n?"timeout":"error")+"Retry"]}function an(e,t){var n="linear"===e.backoff?1:Math.pow(2,t);return Math.min(n*e.retryDelayMs,e.maxRetryDelayMs)}function on(e){return r(r({},e),{errorRetry:null,timeoutRetry:null})}function sn(e,t,n,r){if(!e)return!1;var i=null==r?void 0:r.code,a=t<e.maxNumRetry&&(function(e){return 0===e&&!1===navigator.onLine||!!e&&(e<400||e>499)}(i)||!!n);return e.shouldRetry?e.shouldRetry(e,t,n,r,a):a}var ln=function(e,t){for(var n=0,r=e.length-1,i=null,a=null;n<=r;){var o=t(a=e[i=(n+r)/2|0]);if(o>0)n=i+1;else{if(!(o<0))return a;r=i-1}}return null};function un(e,t,n,r){void 0===n&&(n=0),void 0===r&&(r=0);var i=null;if(e){i=t[e.sn-t[0].sn+1]||null;var a=e.endDTS-n;a>0&&a<15e-7&&(n+=15e-7)}else 0===n&&0===t[0].start&&(i=t[0]);if(i&&(!e||e.level===i.level)&&0===cn(n,r,i))return i;var o=ln(t,cn.bind(null,n,r));return!o||o===e&&i?i:o}function cn(e,t,n){if(void 0===e&&(e=0),void 0===t&&(t=0),n.start<=e&&n.start+n.duration>e)return 0;var r=Math.min(t,n.duration+(n.deltaPTS?n.deltaPTS:0));return n.start+n.duration-r<=e?1:n.start-r>e&&n.start?-1:0}function dn(e,t,n){var r=1e3*Math.min(t,n.duration+(n.deltaPTS?n.deltaPTS:0));return(n.endProgramDateTime||0)-r>e}var pn=function(){function e(e){this.hls=void 0,this.playlistError=0,this.penalizedRenditions={},this.log=void 0,this.warn=void 0,this.error=void 0,this.hls=e,this.log=w.log.bind(w,"[info]:"),this.warn=w.warn.bind(w,"[warning]:"),this.error=w.error.bind(w,"[error]:"),this.registerListeners()}var t=e.prototype;return t.registerListeners=function(){var e=this.hls;e.on(b.ERROR,this.onError,this),e.on(b.MANIFEST_LOADING,this.onManifestLoading,this),e.on(b.LEVEL_UPDATED,this.onLevelUpdated,this)},t.unregisterListeners=function(){var e=this.hls;e&&(e.off(b.ERROR,this.onError,this),e.off(b.ERROR,this.onErrorOut,this),e.off(b.MANIFEST_LOADING,this.onManifestLoading,this),e.off(b.LEVEL_UPDATED,this.onLevelUpdated,this))},t.destroy=function(){this.unregisterListeners(),this.hls=null,this.penalizedRenditions={}},t.startLoad=function(e){},t.stopLoad=function(){this.playlistError=0},t.getVariantLevelIndex=function(e){return(null==e?void 0:e.type)===Tt?e.level:this.hls.loadLevel},t.onManifestLoading=function(){this.playlistError=0,this.penalizedRenditions={}},t.onLevelUpdated=function(){this.playlistError=0},t.onError=function(e,t){var n,r;if(!t.fatal){var i=this.hls,a=t.context;switch(t.details){case E.FRAG_LOAD_ERROR:case E.FRAG_LOAD_TIMEOUT:case E.KEY_LOAD_ERROR:case E.KEY_LOAD_TIMEOUT:return void(t.errorAction=this.getFragRetryOrSwitchAction(t));case E.FRAG_PARSING_ERROR:if(null!=(n=t.frag)&&n.gap)return void(t.errorAction={action:0,flags:0});case E.FRAG_GAP:case E.FRAG_DECRYPT_ERROR:return t.errorAction=this.getFragRetryOrSwitchAction(t),void(t.errorAction.action=2);case E.LEVEL_EMPTY_ERROR:case E.LEVEL_PARSING_ERROR:var o,s,l=t.parent===Tt?t.level:i.loadLevel;return void(t.details===E.LEVEL_EMPTY_ERROR&&null!=(o=t.context)&&null!=(s=o.levelDetails)&&s.live?t.errorAction=this.getPlaylistRetryOrSwitchAction(t,l):(t.levelRetry=!1,t.errorAction=this.getLevelSwitchAction(t,l)));case E.LEVEL_LOAD_ERROR:case E.LEVEL_LOAD_TIMEOUT:return void("number"==typeof(null==a?void 0:a.level)&&(t.errorAction=this.getPlaylistRetryOrSwitchAction(t,a.level)));case E.AUDIO_TRACK_LOAD_ERROR:case E.AUDIO_TRACK_LOAD_TIMEOUT:case E.SUBTITLE_LOAD_ERROR:case E.SUBTITLE_TRACK_LOAD_TIMEOUT:if(a){var u=i.levels[i.loadLevel];if(u&&(a.type===Et&&u.hasAudioGroup(a.groupId)||a.type===_t&&u.hasSubtitleGroup(a.groupId)))return t.errorAction=this.getPlaylistRetryOrSwitchAction(t,i.loadLevel),t.errorAction.action=2,void(t.errorAction.flags=1)}return;case E.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED:var c=i.levels[i.loadLevel],d=null==c?void 0:c.attrs["HDCP-LEVEL"];return void(d?t.errorAction={action:2,flags:2,hdcpLevel:d}:this.keySystemError(t));case E.BUFFER_ADD_CODEC_ERROR:case E.REMUX_ALLOC_ERROR:case E.BUFFER_APPEND_ERROR:return void(t.errorAction=this.getLevelSwitchAction(t,null!=(r=t.level)?r:i.loadLevel));case E.INTERNAL_EXCEPTION:case E.BUFFER_APPENDING_ERROR:case E.BUFFER_FULL_ERROR:case E.LEVEL_SWITCH_ERROR:case E.BUFFER_STALLED_ERROR:case E.BUFFER_SEEK_OVER_HOLE:case E.BUFFER_NUDGE_ON_STALL:return void(t.errorAction={action:0,flags:0})}t.type===k.KEY_SYSTEM_ERROR&&this.keySystemError(t)}},t.keySystemError=function(e){var t=this.getVariantLevelIndex(e.frag);e.levelRetry=!1,e.errorAction=this.getLevelSwitchAction(e,t)},t.getPlaylistRetryOrSwitchAction=function(e,t){var n=rn(this.hls.config.playlistLoadPolicy,e),r=this.playlistError++;if(sn(n,r,nn(e),e.response))return{action:5,flags:0,retryConfig:n,retryCount:r};var i=this.getLevelSwitchAction(e,t);return n&&(i.retryConfig=n,i.retryCount=r),i},t.getFragRetryOrSwitchAction=function(e){var t=this.hls,n=this.getVariantLevelIndex(e.frag),r=t.levels[n],i=t.config,a=i.fragLoadPolicy,o=i.keyLoadPolicy,s=rn(e.details.startsWith("key")?o:a,e),l=t.levels.reduce((function(e,t){return e+t.fragmentError}),0);if(r&&(e.details!==E.FRAG_GAP&&r.fragmentError++,sn(s,l,nn(e),e.response)))return{action:5,flags:0,retryConfig:s,retryCount:l};var u=this.getLevelSwitchAction(e,n);return s&&(u.retryConfig=s,u.retryCount=l),u},t.getLevelSwitchAction=function(e,t){var n=this.hls;null==t&&(t=n.loadLevel);var r=this.hls.levels[t];if(r){var i,a,o=e.details;r.loadError++,o===E.BUFFER_APPEND_ERROR&&r.fragmentError++;var s=-1,l=n.levels,u=n.loadLevel,c=n.minAutoLevel,d=n.maxAutoLevel;n.autoLevelEnabled||(n.loadLevel=-1);for(var p,f=null==(i=e.frag)?void 0:i.type,h=(f===At&&o===E.FRAG_PARSING_ERROR||"audio"===e.sourceBufferName&&(o===E.BUFFER_ADD_CODEC_ERROR||o===E.BUFFER_APPEND_ERROR))&&l.some((function(e){var t=e.audioCodec;return r.audioCodec!==t})),y="video"===e.sourceBufferName&&(o===E.BUFFER_ADD_CODEC_ERROR||o===E.BUFFER_APPEND_ERROR)&&l.some((function(e){var t=e.codecSet,n=e.audioCodec;return r.codecSet!==t&&r.audioCodec===n})),g=null!=(a=e.context)?a:{},v=g.type,m=g.groupId,b=function(){var t=(k+u)%l.length;if(t!==u&&t>=c&&t<=d&&0===l[t].loadError){var n,i,a=l[t];if(o===E.FRAG_GAP&&e.frag){var p=l[t].details;if(p){var g=un(e.frag,p.fragments,e.frag.start);if(null!=g&&g.gap)return 0}}else{if(v===Et&&a.hasAudioGroup(m)||v===_t&&a.hasSubtitleGroup(m))return 0;if(f===At&&null!=(n=r.audioGroups)&&n.some((function(e){return a.hasAudioGroup(e)}))||f===St&&null!=(i=r.subtitleGroups)&&i.some((function(e){return a.hasSubtitleGroup(e)}))||h&&r.audioCodec===a.audioCodec||!h&&r.audioCodec!==a.audioCodec||y&&r.codecSet===a.codecSet)return 0}return s=t,1}},k=l.length;k--&&(0===(p=b())||1!==p););if(s>-1&&n.loadLevel!==s)return e.levelRetry=!0,this.playlistError=0,{action:2,flags:0,nextAutoLevel:s}}return{action:2,flags:1}},t.onErrorOut=function(e,t){var n;switch(null==(n=t.errorAction)?void 0:n.action){case 0:break;case 2:this.sendAlternateToPenaltyBox(t),t.errorAction.resolved||t.details===E.FRAG_GAP?/MediaSource readyState: ended/.test(t.error.message)&&(this.warn('MediaSource ended after "'+t.sourceBufferName+'" sourceBuffer append error. Attempting to recover from media error.'),this.hls.recoverMediaError()):t.fatal=!0}t.fatal&&this.hls.stopLoad()},t.sendAlternateToPenaltyBox=function(e){var t=this.hls,n=e.errorAction;if(n){var r=n.flags,i=n.hdcpLevel,a=n.nextAutoLevel;switch(r){case 0:this.switchLevel(e,a);break;case 2:i&&(t.maxHdcpLevel=Vt[Vt.indexOf(i)-1],n.resolved=!0),this.warn('Restricting playback to HDCP-LEVEL of "'+t.maxHdcpLevel+'" or lower')}n.resolved||this.switchLevel(e,a)}},t.switchLevel=function(e,t){void 0!==t&&e.errorAction&&(this.warn("switching to level "+t+" after "+e.details),this.hls.nextAutoLevel=t,e.errorAction.resolved=!0,this.hls.nextLoadLevel=this.hls.nextAutoLevel)},e}(),fn=function(){function e(e,t){this.hls=void 0,this.timer=-1,this.requestScheduled=-1,this.canLoad=!1,this.log=void 0,this.warn=void 0,this.log=w.log.bind(w,t+":"),this.warn=w.warn.bind(w,t+":"),this.hls=e}var t=e.prototype;return t.destroy=function(){this.clearTimer(),this.hls=this.log=this.warn=null},t.clearTimer=function(){-1!==this.timer&&(self.clearTimeout(this.timer),this.timer=-1)},t.startLoad=function(){this.canLoad=!0,this.requestScheduled=-1,this.loadPlaylist()},t.stopLoad=function(){this.canLoad=!1,this.clearTimer()},t.switchParams=function(e,t,n){var r=null==t?void 0:t.renditionReports;if(r){for(var i=-1,a=0;a<r.length;a++){var o=r[a],s=void 0;try{s=new self.URL(o.URI,t.url).href}catch(e){w.warn("Could not construct new URL for Rendition Report: "+e),s=o.URI||""}if(s===e){i=a;break}s===e.substring(0,s.length)&&(i=a)}if(-1!==i){var l=r[i],u=parseInt(l["LAST-MSN"])||(null==t?void 0:t.lastPartSn),c=parseInt(l["LAST-PART"])||(null==t?void 0:t.lastPartIndex);if(this.hls.config.lowLatencyMode){var d=Math.min(t.age-t.partTarget,t.targetduration);c>=0&&d>t.partTarget&&(c+=1)}var p=n&&Kt(n);return new zt(u,c>=0?c:void 0,p)}}},t.loadPlaylist=function(e){-1===this.requestScheduled&&(this.requestScheduled=self.performance.now())},t.shouldLoadPlaylist=function(e){return this.canLoad&&!!e&&!!e.url&&(!e.details||e.details.live)},t.shouldReloadPlaylist=function(e){return-1===this.timer&&-1===this.requestScheduled&&this.shouldLoadPlaylist(e)},t.playlistLoaded=function(e,t,n){var r=this,i=t.details,a=t.stats,o=self.performance.now(),s=a.loading.first?Math.max(0,o-a.loading.first):0;if(i.advancedDateTime=Date.now()-s,i.live||null!=n&&n.live){if(i.reloaded(n),n&&this.log("live playlist "+e+" "+(i.advanced?"REFRESHED "+i.lastPartSn+"-"+i.lastPartIndex:i.updated?"UPDATED":"MISSED")),n&&i.fragments.length>0&&Xt(n,i),!this.canLoad||!i.live)return;var l,u=void 0,c=void 0;if(i.canBlockReload&&i.endSN&&i.advanced){var d=this.hls.config.lowLatencyMode,p=i.lastPartSn,f=i.endSN,h=i.lastPartIndex,y=p===f;-1!==h?(u=y?f+1:p,c=y?d?0:h:h+1):u=f+1;var g=i.age,v=g+i.ageHeader,m=Math.min(v-i.partTarget,1.5*i.targetduration);if(m>0){if(n&&m>n.tuneInGoal)this.warn("CDN Tune-in goal increased from: "+n.tuneInGoal+" to: "+m+" with playlist age: "+i.age),m=0;else{var b=Math.floor(m/i.targetduration);u+=b,void 0!==c&&(c+=Math.round(m%i.targetduration/i.partTarget)),this.log("CDN Tune-in age: "+i.ageHeader+"s last advanced "+g.toFixed(2)+"s goal: "+m+" skip sn "+b+" to part "+c)}i.tuneInGoal=m}if(l=this.getDeliveryDirectives(i,t.deliveryDirectives,u,c),d||!y)return void this.loadPlaylist(l)}else(i.canBlockReload||i.canSkipUntil)&&(l=this.getDeliveryDirectives(i,t.deliveryDirectives,u,c));var k=this.hls.mainForwardBufferInfo,E=k?k.end-k.len:0,_=function(e,t){void 0===t&&(t=1/0);var n=1e3*e.targetduration;if(e.updated){var r=e.fragments;if(r.length&&4*n>t){var i=1e3*r[r.length-1].duration;i<n&&(n=i)}}else n/=2;return Math.round(n)}(i,1e3*(i.edge-E));i.updated&&o>this.requestScheduled+_&&(this.requestScheduled=a.loading.start),void 0!==u&&i.canBlockReload?this.requestScheduled=a.loading.first+_-(1e3*i.partTarget||1e3):-1===this.requestScheduled||this.requestScheduled+_<o?this.requestScheduled=o:this.requestScheduled-o<=0&&(this.requestScheduled+=_);var T=this.requestScheduled-o;T=Math.max(0,T),this.log("reload live playlist "+e+" in "+Math.round(T)+" ms"),this.timer=self.setTimeout((function(){return r.loadPlaylist(l)}),T)}else this.clearTimer()},t.getDeliveryDirectives=function(e,t,n,r){var i=Kt(e);return null!=t&&t.skip&&e.deltaUpdateFailed&&(n=t.msn,r=t.part,i=""),new zt(n,r,i)},t.checkRetry=function(e){var t=this,n=e.details,r=nn(e),i=e.errorAction,a=i||{},o=a.action,s=a.retryCount,l=void 0===s?0:s,u=a.retryConfig,c=!!i&&!!u&&(5===o||!i.resolved&&2===o);if(c){var d;if(this.requestScheduled=-1,l>=u.maxNumRetry)return!1;if(r&&null!=(d=e.context)&&d.deliveryDirectives)this.warn("Retrying playlist loading "+(l+1)+"/"+u.maxNumRetry+' after "'+n+'" without delivery-directives'),this.loadPlaylist();else{var p=an(u,l);this.timer=self.setTimeout((function(){return t.loadPlaylist()}),p),this.warn("Retrying playlist loading "+(l+1)+"/"+u.maxNumRetry+' after "'+n+'" in '+p+"ms")}e.levelRetry=!0,i.resolved=!0}return c},e}(),hn=function(){function e(e,t,n){void 0===t&&(t=0),void 0===n&&(n=0),this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=e,this.alpha_=e?Math.exp(Math.log(.5)/e):0,this.estimate_=t,this.totalWeight_=n}var t=e.prototype;return t.sample=function(e,t){var n=Math.pow(this.alpha_,e);this.estimate_=t*(1-n)+n*this.estimate_,this.totalWeight_+=e},t.getTotalWeight=function(){return this.totalWeight_},t.getEstimate=function(){if(this.alpha_){var e=1-Math.pow(this.alpha_,this.totalWeight_);if(e)return this.estimate_/e}return this.estimate_},e}(),yn=function(){function e(e,t,n,r){void 0===r&&(r=100),this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.defaultTTFB_=void 0,this.ttfb_=void 0,this.defaultEstimate_=n,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new hn(e),this.fast_=new hn(t),this.defaultTTFB_=r,this.ttfb_=new hn(e)}var t=e.prototype;return t.update=function(e,t){var n=this.slow_,r=this.fast_,i=this.ttfb_;n.halfLife!==e&&(this.slow_=new hn(e,n.getEstimate(),n.getTotalWeight())),r.halfLife!==t&&(this.fast_=new hn(t,r.getEstimate(),r.getTotalWeight())),i.halfLife!==e&&(this.ttfb_=new hn(e,i.getEstimate(),i.getTotalWeight()))},t.sample=function(e,t){var n=(e=Math.max(e,this.minDelayMs_))/1e3,r=8*t/n;this.fast_.sample(n,r),this.slow_.sample(n,r)},t.sampleTTFB=function(e){var t=e/1e3,n=Math.sqrt(2)*Math.exp(-Math.pow(t,2)/2);this.ttfb_.sample(n,Math.max(e,5))},t.canEstimate=function(){return this.fast_.getTotalWeight()>=this.minWeight_},t.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},t.getEstimateTTFB=function(){return this.ttfb_.getTotalWeight()>=this.minWeight_?this.ttfb_.getEstimate():this.defaultTTFB_},t.destroy=function(){},e}(),gn={supported:!0,configurations:[],decodingInfoResults:[{supported:!0,powerEfficient:!0,smooth:!0}]},vn={};function mn(e,t,n){var i=e.videoCodec,a=e.audioCodec;if(!i||!a||!n)return Promise.resolve(gn);var o={width:e.width,height:e.height,bitrate:Math.ceil(Math.max(.9*e.bitrate,e.averageBitrate)),framerate:e.frameRate||30},s=e.videoRange;"SDR"!==s&&(o.transferFunction=s.toLowerCase());var l=i.split(",").map((function(e){return{type:"media-source",video:r(r({},o),{},{contentType:Je(e,"video")})}}));return a&&e.audioGroups&&e.audioGroups.forEach((function(e){var n;e&&(null==(n=t.groups[e])||n.tracks.forEach((function(t){if(t.groupId===e){var n=t.channels||"",r=parseFloat(n);g(r)&&r>2&&l.push.apply(l,a.split(",").map((function(e){return{type:"media-source",audio:{contentType:Je(e,"audio"),channels:""+r}}})))}})))})),Promise.all(l.map((function(e){var t=function(e){var t=e.audio,n=e.video,r=n||t;if(r){var i=r.contentType.split('"')[1];if(n)return"r"+n.height+"x"+n.width+"f"+Math.ceil(n.framerate)+(n.transferFunction||"sd")+"_"+i+"_"+Math.ceil(n.bitrate/1e5);if(t)return"c"+t.channels+(t.spatialRendering?"s":"n")+"_"+i}return""}(e);return vn[t]||(vn[t]=n.decodingInfo(e))}))).then((function(e){return{supported:!e.some((function(e){return!e.supported})),configurations:l,decodingInfoResults:e}})).catch((function(e){return{supported:!1,configurations:l,decodingInfoResults:[],error:e}}))}function bn(e,t){w.log('[abr] start candidates with "'+e+'" ignored because '+t)}function kn(e,t,n){if("attrs"in e){var r=t.indexOf(e);if(-1!==r)return r}for(var i=0;i<t.length;i++)if(En(e,t[i],n))return i;return-1}function En(e,t,n){var r=e.groupId,i=e.name,a=e.lang,o=e.assocLang,s=e.characteristics,l=e.default,u=e.forced;return(void 0===r||t.groupId===r)&&(void 0===i||t.name===i)&&(void 0===a||t.lang===a)&&(void 0===a||t.assocLang===o)&&(void 0===l||t.default===l)&&(void 0===u||t.forced===u)&&(void 0===s||function(e,t){void 0===t&&(t="");var n=e.split(","),r=t.split(",");return n.length===r.length&&!n.some((function(e){return-1===r.indexOf(e)}))}(s,t.characteristics))&&(void 0===n||n(e,t))}function _n(e,t){var n=e.audioCodec,r=e.channels;return!(void 0!==n&&(t.audioCodec||"").substring(0,4)!==n.substring(0,4)||void 0!==r&&r!==(t.channels||"2"))}function Tn(e,t,n){for(var r=t;r;r--)if(n(e[r]))return r;for(var i=t+1;i<e.length;i++)if(n(e[i]))return i;return-1}var An=function(){function e(e){var t=this;this.hls=void 0,this.lastLevelLoadSec=0,this.lastLoadedFragLevel=-1,this.firstSelection=-1,this._nextAutoLevel=-1,this.nextAutoLevelKey="",this.audioTracksByGroup=null,this.codecTiers=null,this.timer=-1,this.fragCurrent=null,this.partCurrent=null,this.bitrateTestDelay=0,this.bwEstimator=void 0,this._abandonRulesCheck=function(){var e=t.fragCurrent,n=t.partCurrent,r=t.hls,i=r.autoLevelEnabled,a=r.media;if(e&&a){var o=performance.now(),s=n?n.stats:e.stats,l=n?n.duration:e.duration,u=o-s.loading.start,c=r.minAutoLevel;if(s.aborted||s.loaded&&s.loaded===s.total||e.level<=c)return t.clearTimer(),void(t._nextAutoLevel=-1);if(i&&!a.paused&&a.playbackRate&&a.readyState){var d=r.mainForwardBufferInfo;if(null!==d){var p=t.bwEstimator.getEstimateTTFB(),f=Math.abs(a.playbackRate);if(!(u<=Math.max(p,l/(2*f)*1e3))){var h=d.len/f,y=s.loading.first?s.loading.first-s.loading.start:-1,v=s.loaded&&y>-1,m=t.getBwEstimate(),k=r.levels,E=k[e.level],_=s.total||Math.max(s.loaded,Math.round(l*E.averageBitrate/8)),T=v?u-y:u;T<1&&v&&(T=Math.min(u,8*s.loaded/m));var A=v?1e3*s.loaded/T:0,S=A?(_-s.loaded)/A:8*_/m+p/1e3;if(!(S<=h)){var C,x=A?8*A:m,P=Number.POSITIVE_INFINITY;for(C=e.level-1;C>c;C--){var R=k[C].maxBitrate;if((P=t.getTimeToLoadFrag(p/1e3,x,l*R,!k[C].details))<h)break}if(!(P>=S||P>10*l)){r.nextLoadLevel=r.nextAutoLevel=C,v?t.bwEstimator.sample(u-Math.min(p,y),s.loaded):t.bwEstimator.sampleTTFB(u);var I=k[C].maxBitrate;t.getBwEstimate()*t.hls.config.abrBandWidthUpFactor>I&&t.resetEstimator(I),t.clearTimer(),w.warn("[abr] Fragment "+e.sn+(n?" part "+n.index:"")+" of level "+e.level+" is loading too slowly;\n      Time to underbuffer: "+h.toFixed(3)+" s\n      Estimated load time for current fragment: "+S.toFixed(3)+" s\n      Estimated load time for down switch fragment: "+P.toFixed(3)+" s\n      TTFB estimate: "+(0|y)+" ms\n      Current BW estimate: "+(g(m)?0|m:"Unknown")+" bps\n      New BW estimate: "+(0|t.getBwEstimate())+" bps\n      Switching to level "+C+" @ "+(0|I)+" bps"),r.trigger(b.FRAG_LOAD_EMERGENCY_ABORTED,{frag:e,part:n,stats:s})}}}}}}},this.hls=e,this.bwEstimator=this.initEstimator(),this.registerListeners()}var t=e.prototype;return t.resetEstimator=function(e){e&&(w.log("setting initial bwe to "+e),this.hls.config.abrEwmaDefaultEstimate=e),this.firstSelection=-1,this.bwEstimator=this.initEstimator()},t.initEstimator=function(){var e=this.hls.config;return new yn(e.abrEwmaSlowVoD,e.abrEwmaFastVoD,e.abrEwmaDefaultEstimate)},t.registerListeners=function(){var e=this.hls;e.on(b.MANIFEST_LOADING,this.onManifestLoading,this),e.on(b.FRAG_LOADING,this.onFragLoading,this),e.on(b.FRAG_LOADED,this.onFragLoaded,this),e.on(b.FRAG_BUFFERED,this.onFragBuffered,this),e.on(b.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(b.LEVEL_LOADED,this.onLevelLoaded,this),e.on(b.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(b.MAX_AUTO_LEVEL_UPDATED,this.onMaxAutoLevelUpdated,this),e.on(b.ERROR,this.onError,this)},t.unregisterListeners=function(){var e=this.hls;e&&(e.off(b.MANIFEST_LOADING,this.onManifestLoading,this),e.off(b.FRAG_LOADING,this.onFragLoading,this),e.off(b.FRAG_LOADED,this.onFragLoaded,this),e.off(b.FRAG_BUFFERED,this.onFragBuffered,this),e.off(b.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(b.LEVEL_LOADED,this.onLevelLoaded,this),e.off(b.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(b.MAX_AUTO_LEVEL_UPDATED,this.onMaxAutoLevelUpdated,this),e.off(b.ERROR,this.onError,this))},t.destroy=function(){this.unregisterListeners(),this.clearTimer(),this.hls=this._abandonRulesCheck=null,this.fragCurrent=this.partCurrent=null},t.onManifestLoading=function(e,t){this.lastLoadedFragLevel=-1,this.firstSelection=-1,this.lastLevelLoadSec=0,this.fragCurrent=this.partCurrent=null,this.onLevelsUpdated(),this.clearTimer()},t.onLevelsUpdated=function(){this.lastLoadedFragLevel>-1&&this.fragCurrent&&(this.lastLoadedFragLevel=this.fragCurrent.level),this._nextAutoLevel=-1,this.onMaxAutoLevelUpdated(),this.codecTiers=null,this.audioTracksByGroup=null},t.onMaxAutoLevelUpdated=function(){this.firstSelection=-1,this.nextAutoLevelKey=""},t.onFragLoading=function(e,t){var n,r=t.frag;this.ignoreFragment(r)||(r.bitrateTest||(this.fragCurrent=r,this.partCurrent=null!=(n=t.part)?n:null),this.clearTimer(),this.timer=self.setInterval(this._abandonRulesCheck,100))},t.onLevelSwitching=function(e,t){this.clearTimer()},t.onError=function(e,t){if(!t.fatal)switch(t.details){case E.BUFFER_ADD_CODEC_ERROR:case E.BUFFER_APPEND_ERROR:this.lastLoadedFragLevel=-1,this.firstSelection=-1;break;case E.FRAG_LOAD_TIMEOUT:var n=t.frag,r=this.fragCurrent,i=this.partCurrent;if(n&&r&&n.sn===r.sn&&n.level===r.level){var a=performance.now(),o=i?i.stats:n.stats,s=a-o.loading.start,l=o.loading.first?o.loading.first-o.loading.start:-1;if(o.loaded&&l>-1){var u=this.bwEstimator.getEstimateTTFB();this.bwEstimator.sample(s-Math.min(u,l),o.loaded)}else this.bwEstimator.sampleTTFB(s)}}},t.getTimeToLoadFrag=function(e,t,n,r){return e+n/t+(r?this.lastLevelLoadSec:0)},t.onLevelLoaded=function(e,t){var n=this.hls.config,r=t.stats.loading,i=r.end-r.start;g(i)&&(this.lastLevelLoadSec=i/1e3),t.details.live?this.bwEstimator.update(n.abrEwmaSlowLive,n.abrEwmaFastLive):this.bwEstimator.update(n.abrEwmaSlowVoD,n.abrEwmaFastVoD)},t.onFragLoaded=function(e,t){var n=t.frag,r=t.part,i=r?r.stats:n.stats;if(n.type===Tt&&this.bwEstimator.sampleTTFB(i.loading.first-i.loading.start),!this.ignoreFragment(n)){if(this.clearTimer(),n.level===this._nextAutoLevel&&(this._nextAutoLevel=-1),this.firstSelection=-1,this.hls.config.abrMaxWithRealBitrate){var a=r?r.duration:n.duration,o=this.hls.levels[n.level],s=(o.loaded?o.loaded.bytes:0)+i.loaded,l=(o.loaded?o.loaded.duration:0)+a;o.loaded={bytes:s,duration:l},o.realBitrate=Math.round(8*s/l)}if(n.bitrateTest){var u={stats:i,frag:n,part:r,id:n.type};this.onFragBuffered(b.FRAG_BUFFERED,u),n.bitrateTest=!1}else this.lastLoadedFragLevel=n.level}},t.onFragBuffered=function(e,t){var n=t.frag,r=t.part,i=null!=r&&r.stats.loaded?r.stats:n.stats;if(!i.aborted&&!this.ignoreFragment(n)){var a=i.parsing.end-i.loading.start-Math.min(i.loading.first-i.loading.start,this.bwEstimator.getEstimateTTFB());this.bwEstimator.sample(a,i.loaded),i.bwEstimate=this.getBwEstimate(),n.bitrateTest?this.bitrateTestDelay=a/1e3:this.bitrateTestDelay=0}},t.ignoreFragment=function(e){return e.type!==Tt||"initSegment"===e.sn},t.clearTimer=function(){this.timer>-1&&(self.clearInterval(this.timer),this.timer=-1)},t.getAutoLevelKey=function(){return this.getBwEstimate()+"_"+this.getStarvationDelay().toFixed(2)},t.getNextABRAutoLevel=function(){var e=this.fragCurrent,t=this.partCurrent,n=this.hls,r=n.maxAutoLevel,i=n.config,a=n.minAutoLevel,o=t?t.duration:e?e.duration:0,s=this.getBwEstimate(),l=this.getStarvationDelay(),u=i.abrBandWidthFactor,c=i.abrBandWidthUpFactor;if(l){var d=this.findBestLevel(s,a,r,l,0,u,c);if(d>=0)return d}var p=o?Math.min(o,i.maxStarvationDelay):i.maxStarvationDelay;if(!l){var f=this.bitrateTestDelay;f&&(p=(o?Math.min(o,i.maxLoadingDelay):i.maxLoadingDelay)-f,w.info("[abr] bitrate test took "+Math.round(1e3*f)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*p)+" ms"),u=c=1)}var h=this.findBestLevel(s,a,r,l,p,u,c);if(w.info("[abr] "+(l?"rebuffering expected":"buffer is empty")+", optimal quality level "+h),h>-1)return h;var y=n.levels[a],g=n.levels[n.loadLevel];return(null==y?void 0:y.bitrate)<(null==g?void 0:g.bitrate)?a:n.loadLevel},t.getStarvationDelay=function(){var e=this.hls,t=e.media;if(!t)return 1/0;var n=t&&0!==t.playbackRate?Math.abs(t.playbackRate):1,r=e.mainForwardBufferInfo;return(r?r.len:0)/n},t.getBwEstimate=function(){return this.bwEstimator.canEstimate()?this.bwEstimator.getEstimate():this.hls.config.abrEwmaDefaultEstimate},t.findBestLevel=function(e,t,n,r,i,a,o){var s,l=this,u=r+i,c=this.lastLoadedFragLevel,d=-1===c?this.hls.firstLevel:c,p=this.fragCurrent,f=this.partCurrent,h=this.hls,y=h.levels,v=h.allAudioTracks,m=h.loadLevel,b=h.config;if(1===y.length)return 0;var k,E=y[d],_=!(null==E||null==(s=E.details)||!s.live),T=-1===m||-1===c,A="SDR",S=(null==E?void 0:E.frameRate)||0,C=b.audioPreference,x=b.videoPreference,P=this.audioTracksByGroup||(this.audioTracksByGroup=function(e){return e.reduce((function(e,t){var n=e.groups[t.groupId];n||(n=e.groups[t.groupId]={tracks:[],channels:{2:0},hasDefault:!1,hasAutoSelect:!1}),n.tracks.push(t);var r=t.channels||"2";return n.channels[r]=(n.channels[r]||0)+1,n.hasDefault=n.hasDefault||t.default,n.hasAutoSelect=n.hasAutoSelect||t.autoselect,n.hasDefault&&(e.hasDefaultAudio=!0),n.hasAutoSelect&&(e.hasAutoSelectAudio=!0),e}),{hasDefaultAudio:!1,hasAutoSelectAudio:!1,groups:{}})}(v));if(T){if(-1!==this.firstSelection)return this.firstSelection;var R=this.codecTiers||(this.codecTiers=function(e,t,n,r){return e.slice(n,r+1).reduce((function(e,n){if(!n.codecSet)return e;var r=n.audioGroups,i=e[n.codecSet];i||(e[n.codecSet]=i={minBitrate:1/0,minHeight:1/0,minFramerate:1/0,maxScore:0,videoRanges:{SDR:0},channels:{2:0},hasDefaultAudio:!r,fragmentError:0}),i.minBitrate=Math.min(i.minBitrate,n.bitrate);var a=Math.min(n.height,n.width);return i.minHeight=Math.min(i.minHeight,a),i.minFramerate=Math.min(i.minFramerate,n.frameRate),i.maxScore=Math.max(i.maxScore,n.score),i.fragmentError+=n.fragmentError,i.videoRanges[n.videoRange]=(i.videoRanges[n.videoRange]||0)+1,r&&r.forEach((function(e){if(e){var n=t.groups[e];n&&(i.hasDefaultAudio=i.hasDefaultAudio||t.hasDefaultAudio?n.hasDefault:n.hasAutoSelect||!t.hasDefaultAudio&&!t.hasAutoSelectAudio,Object.keys(n.channels).forEach((function(e){i.channels[e]=(i.channels[e]||0)+n.channels[e]})))}})),e}),{})}(y,P,t,n)),I=function(e,t,n,r,i){for(var a=Object.keys(e),o=null==r?void 0:r.channels,s=null==r?void 0:r.audioCodec,l=o&&2===parseInt(o),u=!0,c=!1,d=1/0,p=1/0,f=1/0,h=0,y=[],v=function(e,t){var n=!1,r=[];return e&&(n="SDR"!==e,r=[e]),t&&(r=t.allowedVideoRanges||Gt.slice(0),r=(n=void 0!==t.preferHDR?t.preferHDR:function(){if("function"==typeof matchMedia){var e=matchMedia("(dynamic-range: high)"),t=matchMedia("bad query");if(e.media!==t.media)return!0===e.matches}return!1}())?r.filter((function(e){return"SDR"!==e})):["SDR"]),{preferHDR:n,allowedVideoRanges:r}}(t,i),m=v.preferHDR,b=v.allowedVideoRanges,k=function(){var t=e[a[E]];u=t.channels[2]>0,d=Math.min(d,t.minHeight),p=Math.min(p,t.minFramerate),f=Math.min(f,t.minBitrate);var n=b.filter((function(e){return t.videoRanges[e]>0}));n.length>0&&(c=!0,y=n)},E=a.length;E--;)k();d=g(d)?d:0,p=g(p)?p:0;var _=Math.max(1080,d),T=Math.max(30,p);return f=g(f)?f:n,n=Math.max(f,n),c||(t=void 0,y=[]),{codecSet:a.reduce((function(t,r){var i=e[r];if(r===t)return t;if(i.minBitrate>n)return bn(r,"min bitrate of "+i.minBitrate+" > current estimate of "+n),t;if(!i.hasDefaultAudio)return bn(r,"no renditions with default or auto-select sound found"),t;if(s&&r.indexOf(s.substring(0,4))%5!=0)return bn(r,'audio codec preference "'+s+'" not found'),t;if(o&&!l){if(!i.channels[o])return bn(r,"no renditions with "+o+" channel sound found (channels options: "+Object.keys(i.channels)+")"),t}else if((!s||l)&&u&&0===i.channels[2])return bn(r,"no renditions with stereo sound found"),t;return i.minHeight>_?(bn(r,"min resolution of "+i.minHeight+" > maximum of "+_),t):i.minFramerate>T?(bn(r,"min framerate of "+i.minFramerate+" > maximum of "+T),t):y.some((function(e){return i.videoRanges[e]>0}))?i.maxScore<h?(bn(r,"max score of "+i.maxScore+" < selected max of "+h),t):t&&(tt(r)>=tt(t)||i.fragmentError>e[t].fragmentError)?t:(h=i.maxScore,r):(bn(r,"no variants with VIDEO-RANGE of "+JSON.stringify(y)+" found"),t)}),void 0),videoRanges:y,preferHDR:m,minFramerate:p,minBitrate:f}}(R,A,e,C,x),D=I.codecSet,O=I.videoRanges,L=I.minFramerate,M=I.minBitrate,N=I.preferHDR;k=D,A=N?O[O.length-1]:O[0],S=L,e=Math.max(e,M),w.log("[abr] picked start tier "+JSON.stringify(I))}else k=null==E?void 0:E.codecSet,A=null==E?void 0:E.videoRange;for(var U,B=f?f.duration:p?p.duration:0,F=this.bwEstimator.getEstimateTTFB()/1e3,j=[],H=function(){var t,s=y[V],p=V>d;if(!s)return 0;if(b.useMediaCapabilities&&!s.supportedResult&&!s.supportedPromise){var h=navigator.mediaCapabilities;"function"==typeof(null==h?void 0:h.decodingInfo)&&function(e,t,n,r,i,a){var o=e.audioCodec?e.audioGroups:null,s=null==a?void 0:a.audioCodec,l=null==a?void 0:a.channels,u=l?parseInt(l):s?1/0:2,c=null;if(null!=o&&o.length)try{c=1===o.length&&o[0]?t.groups[o[0]].channels:o.reduce((function(e,n){if(n){var r=t.groups[n];if(!r)throw new Error("Audio track group "+n+" not found");Object.keys(r.channels).forEach((function(t){e[t]=(e[t]||0)+r.channels[t]}))}return e}),{2:0})}catch(e){return!0}return void 0!==e.videoCodec&&(e.width>1920&&e.height>1088||e.height>1920&&e.width>1088||e.frameRate>Math.max(r,30)||"SDR"!==e.videoRange&&e.videoRange!==n||e.bitrate>Math.max(i,8e6))||!!c&&g(u)&&Object.keys(c).some((function(e){return parseInt(e)>u}))}(s,P,A,S,e,C)?(s.supportedPromise=mn(s,P,h),s.supportedPromise.then((function(e){if(l.hls){s.supportedResult=e;var t=l.hls.levels,n=t.indexOf(s);e.error?w.warn('[abr] MediaCapabilities decodingInfo error: "'+e.error+'" for level '+n+" "+JSON.stringify(e)):e.supported||(w.warn("[abr] Unsupported MediaCapabilities decodingInfo result for level "+n+" "+JSON.stringify(e)),n>-1&&t.length>1&&(w.log("[abr] Removing unsupported level "+n),l.hls.removeLevel(n)))}}))):s.supportedResult=gn}if(k&&s.codecSet!==k||A&&s.videoRange!==A||p&&S>s.frameRate||!p&&S>0&&S<s.frameRate||s.supportedResult&&(null==(t=s.supportedResult.decodingInfoResults)||!t[0].smooth))return j.push(V),0;var v,x=s.details,R=(f?null==x?void 0:x.partTarget:null==x?void 0:x.averagetargetduration)||B;v=p?o*e:a*e;var I=B&&r>=2*B&&0===i?y[V].averageBitrate:y[V].maxBitrate,D=l.getTimeToLoadFrag(F,v,I*R,void 0===x);if(v>=I&&(V===c||0===s.loadError&&0===s.fragmentError)&&(D<=F||!g(D)||_&&!l.bitrateTestDelay||D<u)){var O=l.forcedAutoLevel;return V===m||-1!==O&&O===m||(j.length&&w.trace("[abr] Skipped level(s) "+j.join(",")+" of "+n+' max with CODECS and VIDEO-RANGE:"'+y[j[0]].codecs+'" '+y[j[0]].videoRange+'; not compatible with "'+E.codecs+'" '+A),w.info("[abr] switch candidate:"+d+"->"+V+" adjustedbw("+Math.round(v)+")-bitrate="+Math.round(v-I)+" ttfb:"+F.toFixed(1)+" avgDuration:"+R.toFixed(1)+" maxFetchDuration:"+u.toFixed(1)+" fetchDuration:"+D.toFixed(1)+" firstSelection:"+T+" codecSet:"+k+" videoRange:"+A+" hls.loadLevel:"+m)),T&&(l.firstSelection=V),{v:V}}},V=n;V>=t;V--)if(0!==(U=H())&&U)return U.v;return-1},o(e,[{key:"firstAutoLevel",get:function(){var e=this.hls,t=e.maxAutoLevel,n=e.minAutoLevel,r=this.getBwEstimate(),i=this.hls.config.maxStarvationDelay,a=this.findBestLevel(r,n,t,0,i,1,1);if(a>-1)return a;var o=this.hls.firstLevel,s=Math.min(Math.max(o,n),t);return w.warn("[abr] Could not find best starting auto level. Defaulting to first in playlist "+o+" clamped to "+s),s}},{key:"forcedAutoLevel",get:function(){return this.nextAutoLevelKey?-1:this._nextAutoLevel}},{key:"nextAutoLevel",get:function(){var e=this.forcedAutoLevel,t=this.bwEstimator.canEstimate(),n=this.lastLoadedFragLevel>-1;if(!(-1===e||t&&n&&this.nextAutoLevelKey!==this.getAutoLevelKey()))return e;var r=t&&n?this.getNextABRAutoLevel():this.firstAutoLevel;if(-1!==e){var i=this.hls.levels;if(i.length>Math.max(e,r)&&i[e].loadError<=i[r].loadError)return e}return this._nextAutoLevel=r,this.nextAutoLevelKey=this.getAutoLevelKey(),r},set:function(e){var t=this.hls,n=t.maxAutoLevel,r=t.minAutoLevel,i=Math.min(Math.max(e,r),n);this._nextAutoLevel!==i&&(this.nextAutoLevelKey="",this._nextAutoLevel=i)}}]),e}(),Sn=function(){function e(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}var t=e.prototype;return t.destroy=function(){this.onHandlerDestroying(),this.onHandlerDestroyed()},t.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},t.onHandlerDestroyed=function(){},t.hasInterval=function(){return!!this._tickInterval},t.hasNextTick=function(){return!!this._tickTimer},t.setInterval=function(e){return!this._tickInterval&&(this._tickCallCount=0,this._tickInterval=self.setInterval(this._boundTick,e),!0)},t.clearInterval=function(){return!!this._tickInterval&&(self.clearInterval(this._tickInterval),this._tickInterval=null,!0)},t.clearNextTick=function(){return!!this._tickTimer&&(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0)},t.tick=function(){this._tickCallCount++,1===this._tickCallCount&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)},t.tickImmediate=function(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)},t.doTick=function(){},e}(),wn="NOT_LOADED",Cn="APPENDING",xn="PARTIAL",Pn="OK",Rn=function(){function e(e){this.activePartLists=Object.create(null),this.endListFragments=Object.create(null),this.fragments=Object.create(null),this.timeRanges=Object.create(null),this.bufferPadding=.2,this.hls=void 0,this.hasGaps=!1,this.hls=e,this._registerListeners()}var t=e.prototype;return t._registerListeners=function(){var e=this.hls;e.on(b.BUFFER_APPENDED,this.onBufferAppended,this),e.on(b.FRAG_BUFFERED,this.onFragBuffered,this),e.on(b.FRAG_LOADED,this.onFragLoaded,this)},t._unregisterListeners=function(){var e=this.hls;e.off(b.BUFFER_APPENDED,this.onBufferAppended,this),e.off(b.FRAG_BUFFERED,this.onFragBuffered,this),e.off(b.FRAG_LOADED,this.onFragLoaded,this)},t.destroy=function(){this._unregisterListeners(),this.fragments=this.activePartLists=this.endListFragments=this.timeRanges=null},t.getAppendedFrag=function(e,t){var n=this.activePartLists[t];if(n)for(var r=n.length;r--;){var i=n[r];if(!i)break;var a=i.end;if(i.start<=e&&null!==a&&e<=a)return i}return this.getBufferedFrag(e,t)},t.getBufferedFrag=function(e,t){for(var n=this.fragments,r=Object.keys(n),i=r.length;i--;){var a=n[r[i]];if((null==a?void 0:a.body.type)===t&&a.buffered){var o=a.body;if(o.start<=e&&e<=o.end)return o}}return null},t.detectEvictedFragments=function(e,t,n,r){var i=this;this.timeRanges&&(this.timeRanges[e]=t);var a=(null==r?void 0:r.fragment.sn)||-1;Object.keys(this.fragments).forEach((function(r){var o=i.fragments[r];if(o&&!(a>=o.body.sn))if(o.buffered||o.loaded){var s=o.range[e];s&&s.time.some((function(e){var n=!i.isTimeBuffered(e.startPTS,e.endPTS,t);return n&&i.removeFragment(o.body),n}))}else o.body.type===n&&i.removeFragment(o.body)}))},t.detectPartialFragments=function(e){var t=this,n=this.timeRanges,r=e.frag,i=e.part;if(n&&"initSegment"!==r.sn){var a=Dn(r),o=this.fragments[a];if(!(!o||o.buffered&&r.gap)){var s=!r.relurl;Object.keys(n).forEach((function(e){var a=r.elementaryStreams[e];if(a){var l=n[e],u=s||!0===a.partial;o.range[e]=t.getBufferedTimes(r,i,u,l)}})),o.loaded=null,Object.keys(o.range).length?(o.buffered=!0,(o.body.endList=r.endList||o.body.endList)&&(this.endListFragments[o.body.type]=o),In(o)||this.removeParts(r.sn-1,r.type)):this.removeFragment(o.body)}}},t.removeParts=function(e,t){var n=this.activePartLists[t];n&&(this.activePartLists[t]=n.filter((function(t){return t.fragment.sn>=e})))},t.fragBuffered=function(e,t){var n=Dn(e),r=this.fragments[n];!r&&t&&(r=this.fragments[n]={body:e,appendedPTS:null,loaded:null,buffered:!1,range:Object.create(null)},e.gap&&(this.hasGaps=!0)),r&&(r.loaded=null,r.buffered=!0)},t.getBufferedTimes=function(e,t,n,r){for(var i={time:[],partial:n},a=e.start,o=e.end,s=e.minEndPTS||o,l=e.maxStartPTS||a,u=0;u<r.length;u++){var c=r.start(u)-this.bufferPadding,d=r.end(u)+this.bufferPadding;if(l>=c&&s<=d){i.time.push({startPTS:Math.max(a,r.start(u)),endPTS:Math.min(o,r.end(u))});break}if(a<d&&o>c){var p=Math.max(a,r.start(u)),f=Math.min(o,r.end(u));f>p&&(i.partial=!0,i.time.push({startPTS:p,endPTS:f}))}else if(o<=c)break}return i},t.getPartialFragment=function(e){var t,n,r,i=null,a=0,o=this.bufferPadding,s=this.fragments;return Object.keys(s).forEach((function(l){var u=s[l];u&&In(u)&&(n=u.body.start-o,r=u.body.end+o,e>=n&&e<=r&&(t=Math.min(e-n,r-e),a<=t&&(i=u.body,a=t)))})),i},t.isEndListAppended=function(e){var t=this.endListFragments[e];return void 0!==t&&(t.buffered||In(t))},t.getState=function(e){var t=Dn(e),n=this.fragments[t];return n?n.buffered?In(n)?xn:Pn:Cn:wn},t.isTimeBuffered=function(e,t,n){for(var r,i,a=0;a<n.length;a++){if(r=n.start(a)-this.bufferPadding,i=n.end(a)+this.bufferPadding,e>=r&&t<=i)return!0;if(t<=r)return!1}return!1},t.onFragLoaded=function(e,t){var n=t.frag,r=t.part;if("initSegment"!==n.sn&&!n.bitrateTest){var i=r?null:t,a=Dn(n);this.fragments[a]={body:n,appendedPTS:null,loaded:i,buffered:!1,range:Object.create(null)}}},t.onBufferAppended=function(e,t){var n=this,r=t.frag,i=t.part,a=t.timeRanges;if("initSegment"!==r.sn){var o=r.type;if(i){var s=this.activePartLists[o];s||(this.activePartLists[o]=s=[]),s.push(i)}this.timeRanges=a,Object.keys(a).forEach((function(e){var t=a[e];n.detectEvictedFragments(e,t,o,i)}))}},t.onFragBuffered=function(e,t){this.detectPartialFragments(t)},t.hasFragment=function(e){var t=Dn(e);return!!this.fragments[t]},t.hasParts=function(e){var t;return!(null==(t=this.activePartLists[e])||!t.length)},t.removeFragmentsInRange=function(e,t,n,r,i){var a=this;r&&!this.hasGaps||Object.keys(this.fragments).forEach((function(o){var s=a.fragments[o];if(s){var l=s.body;l.type!==n||r&&!l.gap||l.start<t&&l.end>e&&(s.buffered||i)&&a.removeFragment(l)}}))},t.removeFragment=function(e){var t=Dn(e);e.stats.loaded=0,e.clearElementaryStreamInfo();var n=this.activePartLists[e.type];if(n){var r=e.sn;this.activePartLists[e.type]=n.filter((function(e){return e.fragment.sn!==r}))}delete this.fragments[t],e.endList&&delete this.endListFragments[e.type]},t.removeAllFragments=function(){this.fragments=Object.create(null),this.endListFragments=Object.create(null),this.activePartLists=Object.create(null),this.hasGaps=!1},e}();function In(e){var t,n,r;return e.buffered&&(e.body.gap||(null==(t=e.range.video)?void 0:t.partial)||(null==(n=e.range.audio)?void 0:n.partial)||(null==(r=e.range.audiovideo)?void 0:r.partial))}function Dn(e){return e.type+"_"+e.level+"_"+e.sn}var On={length:0,start:function(){return 0},end:function(){return 0}},Ln=function(){function e(){}return e.isBuffered=function(t,n){try{if(t)for(var r=e.getBuffered(t),i=0;i<r.length;i++)if(n>=r.start(i)&&n<=r.end(i))return!0}catch(e){}return!1},e.bufferInfo=function(t,n,r){try{if(t){var i,a=e.getBuffered(t),o=[];for(i=0;i<a.length;i++)o.push({start:a.start(i),end:a.end(i)});return this.bufferedInfo(o,n,r)}}catch(e){}return{len:0,start:n,end:n,nextStart:void 0}},e.bufferedInfo=function(e,t,n){t=Math.max(0,t),e.sort((function(e,t){return e.start-t.start||t.end-e.end}));var r=[];if(n)for(var i=0;i<e.length;i++){var a=r.length;if(a){var o=r[a-1].end;e[i].start-o<n?e[i].end>o&&(r[a-1].end=e[i].end):r.push(e[i])}else r.push(e[i])}else r=e;for(var s,l=0,u=t,c=t,d=0;d<r.length;d++){var p=r[d].start,f=r[d].end;if(t+n>=p&&t<f)u=p,l=(c=f)-t;else if(t+n<p){s=p;break}}return{len:l,start:u||0,end:c||0,nextStart:s}},e.getBuffered=function(e){try{return e.buffered}catch(e){return w.log("failed to get media.buffered",e),On}},e}(),Mn=function(e,t,n,r,i,a){void 0===r&&(r=0),void 0===i&&(i=-1),void 0===a&&(a=!1),this.level=void 0,this.sn=void 0,this.part=void 0,this.id=void 0,this.size=void 0,this.partial=void 0,this.transmuxing={start:0,executeStart:0,executeEnd:0,end:0},this.buffering={audio:{start:0,executeStart:0,executeEnd:0,end:0},video:{start:0,executeStart:0,executeEnd:0,end:0},audiovideo:{start:0,executeStart:0,executeEnd:0,end:0}},this.level=e,this.sn=t,this.id=n,this.size=r,this.part=i,this.partial=a};function Nn(e,t){for(var n=0,r=e.length;n<r;n++){var i;if((null==(i=e[n])?void 0:i.cc)===t)return e[n]}return null}function Un(e,t){if(e){var n=e.start+t;e.start=e.startPTS=n,e.endPTS=n+e.duration}}function Bn(e,t){for(var n=t.fragments,r=0,i=n.length;r<i;r++)Un(n[r],e);t.fragmentHint&&Un(t.fragmentHint,e),t.alignedSliding=!0}function Fn(e,t){if(e.hasProgramDateTime&&t.hasProgramDateTime){var n=e.fragments,r=t.fragments;if(n.length&&r.length){var i,a,o=Math.min(t.endCC,e.endCC);t.startCC<o&&e.startCC<o&&(i=Nn(r,o),a=Nn(n,o)),i&&a||(a=Nn(n,(i=r[Math.floor(r.length/2)]).cc)||n[Math.floor(n.length/2)]);var s=i.programDateTime,l=a.programDateTime;s&&l&&Bn((l-s)/1e3-(a.start-i.start),e)}}}var jn=Math.pow(2,17),Hn=function(){function e(e){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=e}var t=e.prototype;return t.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},t.abort=function(){this.loader&&this.loader.abort()},t.load=function(e,t){var n=this,i=e.url;if(!i)return Promise.reject(new Kn({type:k.NETWORK_ERROR,details:E.FRAG_LOAD_ERROR,fatal:!1,frag:e,error:new Error("Fragment does not have a "+(i?"part list":"url")),networkDetails:null}));this.abort();var a=this.config,o=a.fLoader,s=a.loader;return new Promise((function(l,u){if(n.loader&&n.loader.destroy(),e.gap){if(e.tagList.some((function(e){return"GAP"===e[0]})))return void u(Gn(e));e.gap=!1}var c=n.loader=e.loader=o?new o(a):new s(a),d=Vn(e),p=on(a.fragLoadPolicy.default),f={loadPolicy:p,timeout:p.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0,highWaterMark:"initSegment"===e.sn?1/0:jn};e.stats=c.stats,c.load(d,f,{onSuccess:function(t,r,i,a){n.resetLoader(e,c);var o=t.data;i.resetIV&&e.decryptdata&&(e.decryptdata.iv=new Uint8Array(o.slice(0,16)),o=o.slice(16)),l({frag:e,part:null,payload:o,networkDetails:a})},onError:function(t,a,o,s){n.resetLoader(e,c),u(new Kn({type:k.NETWORK_ERROR,details:E.FRAG_LOAD_ERROR,fatal:!1,frag:e,response:r({url:i,data:void 0},t),error:new Error("HTTP Error "+t.code+" "+t.text),networkDetails:o,stats:s}))},onAbort:function(t,r,i){n.resetLoader(e,c),u(new Kn({type:k.NETWORK_ERROR,details:E.INTERNAL_ABORTED,fatal:!1,frag:e,error:new Error("Aborted"),networkDetails:i,stats:t}))},onTimeout:function(t,r,i){n.resetLoader(e,c),u(new Kn({type:k.NETWORK_ERROR,details:E.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,error:new Error("Timeout after "+f.timeout+"ms"),networkDetails:i,stats:t}))},onProgress:function(n,r,i,a){t&&t({frag:e,part:null,payload:i,networkDetails:a})}})}))},t.loadPart=function(e,t,n){var i=this;this.abort();var a=this.config,o=a.fLoader,s=a.loader;return new Promise((function(l,u){if(i.loader&&i.loader.destroy(),e.gap||t.gap)u(Gn(e,t));else{var c=i.loader=e.loader=o?new o(a):new s(a),d=Vn(e,t),p=on(a.fragLoadPolicy.default),f={loadPolicy:p,timeout:p.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0,highWaterMark:jn};t.stats=c.stats,c.load(d,f,{onSuccess:function(r,a,o,s){i.resetLoader(e,c),i.updateStatsFromPart(e,t);var u={frag:e,part:t,payload:r.data,networkDetails:s};n(u),l(u)},onError:function(n,a,o,s){i.resetLoader(e,c),u(new Kn({type:k.NETWORK_ERROR,details:E.FRAG_LOAD_ERROR,fatal:!1,frag:e,part:t,response:r({url:d.url,data:void 0},n),error:new Error("HTTP Error "+n.code+" "+n.text),networkDetails:o,stats:s}))},onAbort:function(n,r,a){e.stats.aborted=t.stats.aborted,i.resetLoader(e,c),u(new Kn({type:k.NETWORK_ERROR,details:E.INTERNAL_ABORTED,fatal:!1,frag:e,part:t,error:new Error("Aborted"),networkDetails:a,stats:n}))},onTimeout:function(n,r,a){i.resetLoader(e,c),u(new Kn({type:k.NETWORK_ERROR,details:E.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,part:t,error:new Error("Timeout after "+f.timeout+"ms"),networkDetails:a,stats:n}))}})}}))},t.updateStatsFromPart=function(e,t){var n=e.stats,r=t.stats,i=r.total;if(n.loaded+=r.loaded,i){var a=Math.round(e.duration/t.duration),o=Math.min(Math.round(n.loaded/i),a),s=(a-o)*Math.round(n.loaded/o);n.total=n.loaded+s}else n.total=Math.max(n.loaded,n.total);var l=n.loading,u=r.loading;l.start?l.first+=u.first-u.start:(l.start=u.start,l.first=u.first),l.end=u.end},t.resetLoader=function(e,t){e.loader=null,this.loader===t&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),t.destroy()},e}();function Vn(e,t){void 0===t&&(t=null);var n=t||e,r={frag:e,part:t,responseType:"arraybuffer",url:n.url,headers:{},rangeStart:0,rangeEnd:0},i=n.byteRangeStartOffset,a=n.byteRangeEndOffset;if(g(i)&&g(a)){var o,s=i,l=a;if("initSegment"===e.sn&&"AES-128"===(null==(o=e.decryptdata)?void 0:o.method)){var u=a-i;u%16&&(l=a+(16-u%16)),0!==i&&(r.resetIV=!0,s=i-16)}r.rangeStart=s,r.rangeEnd=l}return r}function Gn(e,t){var n=new Error("GAP "+(e.gap?"tag":"attribute")+" found"),r={type:k.MEDIA_ERROR,details:E.FRAG_GAP,fatal:!1,frag:e,error:n,networkDetails:null};return t&&(r.part=t),(t||e).stats.aborted=!0,new Kn(r)}var Kn=function(e){function t(t){var n;return(n=e.call(this,t.error.message)||this).data=void 0,n.data=t,n}return l(t,e),t}(p(Error)),zn=function(){function e(e,t){this.subtle=void 0,this.aesIV=void 0,this.subtle=e,this.aesIV=t}return e.prototype.decrypt=function(e,t){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},t,e)},e}(),Wn=function(){function e(e,t){this.subtle=void 0,this.key=void 0,this.subtle=e,this.key=t}return e.prototype.expandKey=function(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])},e}(),Yn=function(){function e(){this.rcon=[0,1,2,4,8,16,32,64,128,27,54],this.subMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.invSubMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.sBox=new Uint32Array(256),this.invSBox=new Uint32Array(256),this.key=new Uint32Array(0),this.ksRows=0,this.keySize=0,this.keySchedule=void 0,this.invKeySchedule=void 0,this.initTable()}var t=e.prototype;return t.uint8ArrayToUint32Array_=function(e){for(var t=new DataView(e),n=new Uint32Array(4),r=0;r<4;r++)n[r]=t.getUint32(4*r);return n},t.initTable=function(){var e=this.sBox,t=this.invSBox,n=this.subMix,r=n[0],i=n[1],a=n[2],o=n[3],s=this.invSubMix,l=s[0],u=s[1],c=s[2],d=s[3],p=new Uint32Array(256),f=0,h=0,y=0;for(y=0;y<256;y++)p[y]=y<128?y<<1:y<<1^283;for(y=0;y<256;y++){var g=h^h<<1^h<<2^h<<3^h<<4;g=g>>>8^255&g^99,e[f]=g,t[g]=f;var v=p[f],m=p[v],b=p[m],k=257*p[g]^16843008*g;r[f]=k<<24|k>>>8,i[f]=k<<16|k>>>16,a[f]=k<<8|k>>>24,o[f]=k,k=16843009*b^65537*m^257*v^16843008*f,l[g]=k<<24|k>>>8,u[g]=k<<16|k>>>16,c[g]=k<<8|k>>>24,d[g]=k,f?(f=v^p[p[p[b^v]]],h^=p[p[h]]):f=h=1}},t.expandKey=function(e){for(var t=this.uint8ArrayToUint32Array_(e),n=!0,r=0;r<t.length&&n;)n=t[r]===this.key[r],r++;if(!n){this.key=t;var i=this.keySize=t.length;if(4!==i&&6!==i&&8!==i)throw new Error("Invalid aes key size="+i);var a,o,s,l,u=this.ksRows=4*(i+6+1),c=this.keySchedule=new Uint32Array(u),d=this.invKeySchedule=new Uint32Array(u),p=this.sBox,f=this.rcon,h=this.invSubMix,y=h[0],g=h[1],v=h[2],m=h[3];for(a=0;a<u;a++)a<i?s=c[a]=t[a]:(l=s,a%i==0?(l=p[(l=l<<8|l>>>24)>>>24]<<24|p[l>>>16&255]<<16|p[l>>>8&255]<<8|p[255&l],l^=f[a/i|0]<<24):i>6&&a%i==4&&(l=p[l>>>24]<<24|p[l>>>16&255]<<16|p[l>>>8&255]<<8|p[255&l]),c[a]=s=(c[a-i]^l)>>>0);for(o=0;o<u;o++)a=u-o,l=3&o?c[a]:c[a-4],d[o]=o<4||a<=4?l:y[p[l>>>24]]^g[p[l>>>16&255]]^v[p[l>>>8&255]]^m[p[255&l]],d[o]=d[o]>>>0}},t.networkToHostOrderSwap=function(e){return e<<24|(65280&e)<<8|(16711680&e)>>8|e>>>24},t.decrypt=function(e,t,n){for(var r,i,a,o,s,l,u,c,d,p,f,h,y,g,v=this.keySize+6,m=this.invKeySchedule,b=this.invSBox,k=this.invSubMix,E=k[0],_=k[1],T=k[2],A=k[3],S=this.uint8ArrayToUint32Array_(n),w=S[0],C=S[1],x=S[2],P=S[3],R=new Int32Array(e),I=new Int32Array(R.length),D=this.networkToHostOrderSwap;t<R.length;){for(d=D(R[t]),p=D(R[t+1]),f=D(R[t+2]),h=D(R[t+3]),s=d^m[0],l=h^m[1],u=f^m[2],c=p^m[3],y=4,g=1;g<v;g++)r=E[s>>>24]^_[l>>16&255]^T[u>>8&255]^A[255&c]^m[y],i=E[l>>>24]^_[u>>16&255]^T[c>>8&255]^A[255&s]^m[y+1],a=E[u>>>24]^_[c>>16&255]^T[s>>8&255]^A[255&l]^m[y+2],o=E[c>>>24]^_[s>>16&255]^T[l>>8&255]^A[255&u]^m[y+3],s=r,l=i,u=a,c=o,y+=4;r=b[s>>>24]<<24^b[l>>16&255]<<16^b[u>>8&255]<<8^b[255&c]^m[y],i=b[l>>>24]<<24^b[u>>16&255]<<16^b[c>>8&255]<<8^b[255&s]^m[y+1],a=b[u>>>24]<<24^b[c>>16&255]<<16^b[s>>8&255]<<8^b[255&l]^m[y+2],o=b[c>>>24]<<24^b[s>>16&255]<<16^b[l>>8&255]<<8^b[255&u]^m[y+3],I[t]=D(r^w),I[t+1]=D(o^C),I[t+2]=D(a^x),I[t+3]=D(i^P),w=d,C=p,x=f,P=h,t+=4}return I.buffer},e}(),Zn=function(){function e(e,t){var n=(void 0===t?{}:t).removePKCS7Padding,r=void 0===n||n;if(this.logEnabled=!0,this.removePKCS7Padding=void 0,this.subtle=null,this.softwareDecrypter=null,this.key=null,this.fastAesKey=null,this.remainderData=null,this.currentIV=null,this.currentResult=null,this.useSoftware=void 0,this.useSoftware=e.enableSoftwareAES,this.removePKCS7Padding=r,r)try{var i=self.crypto;i&&(this.subtle=i.subtle||i.webkitSubtle)}catch(e){}null===this.subtle&&(this.useSoftware=!0)}var t=e.prototype;return t.destroy=function(){this.subtle=null,this.softwareDecrypter=null,this.key=null,this.fastAesKey=null,this.remainderData=null,this.currentIV=null,this.currentResult=null},t.isSync=function(){return this.useSoftware},t.flush=function(){var e=this.currentResult,t=this.remainderData;if(!e||t)return this.reset(),null;var n,r,i,a=new Uint8Array(e);return this.reset(),this.removePKCS7Padding?(i=(r=(n=a).byteLength)&&new DataView(n.buffer).getUint8(r-1))?ee(n,0,r-i):n:a},t.reset=function(){this.currentResult=null,this.currentIV=null,this.remainderData=null,this.softwareDecrypter&&(this.softwareDecrypter=null)},t.decrypt=function(e,t,n){var r=this;return this.useSoftware?new Promise((function(i,a){r.softwareDecrypt(new Uint8Array(e),t,n);var o=r.flush();o?i(o.buffer):a(new Error("[softwareDecrypt] Failed to decrypt data"))})):this.webCryptoDecrypt(new Uint8Array(e),t,n)},t.softwareDecrypt=function(e,t,n){var r=this.currentIV,i=this.currentResult,a=this.remainderData;this.logOnce("JS AES decrypt"),a&&(e=Ne(a,e),this.remainderData=null);var o=this.getValidChunk(e);if(!o.length)return null;r&&(n=r);var s=this.softwareDecrypter;s||(s=this.softwareDecrypter=new Yn),s.expandKey(t);var l=i;return this.currentResult=s.decrypt(o.buffer,0,n),this.currentIV=ee(o,-16).buffer,l||null},t.webCryptoDecrypt=function(e,t,n){var r=this,i=this.subtle;return this.key===t&&this.fastAesKey||(this.key=t,this.fastAesKey=new Wn(i,t)),this.fastAesKey.expandKey().then((function(t){return i?(r.logOnce("WebCrypto AES decrypt"),new zn(i,new Uint8Array(n)).decrypt(e.buffer,t)):Promise.reject(new Error("web crypto not initialized"))})).catch((function(i){return w.warn("[decrypter]: WebCrypto Error, disable WebCrypto API, "+i.name+": "+i.message),r.onWebCryptoError(e,t,n)}))},t.onWebCryptoError=function(e,t,n){this.useSoftware=!0,this.logEnabled=!0,this.softwareDecrypt(e,t,n);var r=this.flush();if(r)return r.buffer;throw new Error("WebCrypto and softwareDecrypt: failed to decrypt data")},t.getValidChunk=function(e){var t=e,n=e.length-e.length%16;return n!==e.length&&(t=ee(e,0,n),this.remainderData=ee(e,n)),t},t.logOnce=function(e){this.logEnabled&&(w.log("[decrypter]: "+e),this.logEnabled=!1)},e}(),qn="STOPPED",Xn="IDLE",Qn="KEY_LOADING",$n="FRAG_LOADING",Jn="FRAG_LOADING_WAITING_RETRY",er="WAITING_TRACK",tr="PARSING",nr="PARSED",rr="ENDED",ir="ERROR",ar="WAITING_INIT_PTS",or="WAITING_LEVEL",sr=function(e){function t(t,n,r,i,a){var o;return(o=e.call(this)||this).hls=void 0,o.fragPrevious=null,o.fragCurrent=null,o.fragmentTracker=void 0,o.transmuxer=null,o._state=qn,o.playlistType=void 0,o.media=null,o.mediaBuffer=null,o.config=void 0,o.bitrateTest=!1,o.lastCurrentTime=0,o.nextLoadPosition=0,o.startPosition=0,o.startTimeOffset=null,o.loadedmetadata=!1,o.retryDate=0,o.levels=null,o.fragmentLoader=void 0,o.keyLoader=void 0,o.levelLastLoaded=null,o.startFragRequested=!1,o.decrypter=void 0,o.initPTS=[],o.onvseeking=null,o.onvended=null,o.logPrefix="",o.log=void 0,o.warn=void 0,o.playlistType=a,o.logPrefix=i,o.log=w.log.bind(w,i+":"),o.warn=w.warn.bind(w,i+":"),o.hls=t,o.fragmentLoader=new Hn(t.config),o.keyLoader=r,o.fragmentTracker=n,o.config=t.config,o.decrypter=new Zn(t.config),t.on(b.MANIFEST_LOADED,o.onManifestLoaded,function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(o)),o}l(t,e);var n=t.prototype;return n.doTick=function(){this.onTickEnd()},n.onTickEnd=function(){},n.startLoad=function(e){},n.stopLoad=function(){this.fragmentLoader.abort(),this.keyLoader.abort(this.playlistType);var e=this.fragCurrent;null!=e&&e.loader&&(e.abortRequests(),this.fragmentTracker.removeFragment(e)),this.resetTransmuxer(),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=qn},n._streamEnded=function(e,t){if(t.live||e.nextStart||!e.end||!this.media)return!1;var n=t.partList;if(null!=n&&n.length){var r=n[n.length-1];return Ln.isBuffered(this.media,r.start+r.duration/2)}var i=t.fragments[t.fragments.length-1].type;return this.fragmentTracker.isEndListAppended(i)},n.getLevelDetails=function(){var e;if(this.levels&&null!==this.levelLastLoaded)return null==(e=this.levelLastLoaded)?void 0:e.details},n.onMediaAttached=function(e,t){var n=this.media=this.mediaBuffer=t.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),n.addEventListener("seeking",this.onvseeking),n.addEventListener("ended",this.onvended);var r=this.config;this.levels&&r.autoStartLoad&&this.state===qn&&this.startLoad(r.startPosition)},n.onMediaDetaching=function(){var e=this.media;null!=e&&e.ended&&(this.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),e&&this.onvseeking&&this.onvended&&(e.removeEventListener("seeking",this.onvseeking),e.removeEventListener("ended",this.onvended),this.onvseeking=this.onvended=null),this.keyLoader&&this.keyLoader.detach(),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()},n.onMediaSeeking=function(){var e=this.config,t=this.fragCurrent,n=this.media,r=this.mediaBuffer,i=this.state,a=n?n.currentTime:0,o=Ln.bufferInfo(r||n,a,e.maxBufferHole);if(this.log("media seeking to "+(g(a)?a.toFixed(3):a)+", state: "+i),this.state===rr)this.resetLoadingState();else if(t){var s=e.maxFragLookUpTolerance,l=t.start-s,u=t.start+t.duration+s;if(!o.len||u<o.start||l>o.end){var c=a>u;(a<l||c)&&(c&&t.loader&&(this.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),t.abortRequests(),this.resetLoadingState()),this.fragPrevious=null)}}n&&(this.fragmentTracker.removeFragmentsInRange(a,1/0,this.playlistType,!0),this.lastCurrentTime=a),this.loadedmetadata||o.len||(this.nextLoadPosition=this.startPosition=a),this.tickImmediate()},n.onMediaEnded=function(){this.startPosition=this.lastCurrentTime=0},n.onManifestLoaded=function(e,t){this.startTimeOffset=t.startTimeOffset,this.initPTS=[]},n.onHandlerDestroying=function(){this.hls.off(b.MANIFEST_LOADED,this.onManifestLoaded,this),this.stopLoad(),e.prototype.onHandlerDestroying.call(this),this.hls=null},n.onHandlerDestroyed=function(){this.state=qn,this.fragmentLoader&&this.fragmentLoader.destroy(),this.keyLoader&&this.keyLoader.destroy(),this.decrypter&&this.decrypter.destroy(),this.hls=this.log=this.warn=this.decrypter=this.keyLoader=this.fragmentLoader=this.fragmentTracker=null,e.prototype.onHandlerDestroyed.call(this)},n.loadFragment=function(e,t,n){this._loadFragForPlayback(e,t,n)},n._loadFragForPlayback=function(e,t,n){var r=this;this._doFragLoad(e,t,n,(function(t){if(r.fragContextChanged(e))return r.warn("Fragment "+e.sn+(t.part?" p: "+t.part.index:"")+" of level "+e.level+" was dropped during download."),void r.fragmentTracker.removeFragment(e);e.stats.chunkCount++,r._handleFragmentLoadProgress(t)})).then((function(t){if(t){var n=r.state;r.fragContextChanged(e)?(n===$n||!r.fragCurrent&&n===tr)&&(r.fragmentTracker.removeFragment(e),r.state=Xn):("payload"in t&&(r.log("Loaded fragment "+e.sn+" of level "+e.level),r.hls.trigger(b.FRAG_LOADED,t)),r._handleFragmentLoadComplete(t))}})).catch((function(t){r.state!==qn&&r.state!==ir&&(r.warn(t),r.resetFragmentLoading(e))}))},n.clearTrackerIfNeeded=function(e){var t,n=this.fragmentTracker;if(n.getState(e)===Cn){var r=e.type,i=this.getFwdBufferInfo(this.mediaBuffer,r),a=Math.max(e.duration,i?i.len:this.config.maxBufferLength);this.reduceMaxBufferLength(a)&&n.removeFragment(e)}else 0===(null==(t=this.mediaBuffer)?void 0:t.buffered.length)?n.removeAllFragments():n.hasParts(e.type)&&(n.detectPartialFragments({frag:e,part:null,stats:e.stats,id:e.type}),n.getState(e)===xn&&n.removeFragment(e))},n.checkLiveUpdate=function(e){if(e.updated&&!e.live){var t=e.fragments[e.fragments.length-1];this.fragmentTracker.detectPartialFragments({frag:t,part:null,stats:t.stats,id:t.type})}e.fragments[0]||(e.deltaUpdateFailed=!0)},n.flushMainBuffer=function(e,t,n){if(void 0===n&&(n=null),e-t){var r={startOffset:e,endOffset:t,type:n};this.hls.trigger(b.BUFFER_FLUSHING,r)}},n._loadInitSegment=function(e,t){var n=this;this._doFragLoad(e,t).then((function(t){if(!t||n.fragContextChanged(e)||!n.levels)throw new Error("init load aborted");return t})).then((function(t){var r=n.hls,i=t.payload,a=e.decryptdata;if(i&&i.byteLength>0&&null!=a&&a.key&&a.iv&&"AES-128"===a.method){var o=self.performance.now();return n.decrypter.decrypt(new Uint8Array(i),a.key.buffer,a.iv.buffer).catch((function(t){throw r.trigger(b.ERROR,{type:k.MEDIA_ERROR,details:E.FRAG_DECRYPT_ERROR,fatal:!1,error:t,reason:t.message,frag:e}),t})).then((function(i){var a=self.performance.now();return r.trigger(b.FRAG_DECRYPTED,{frag:e,payload:i,stats:{tstart:o,tdecrypt:a}}),t.payload=i,n.completeInitSegmentLoad(t)}))}return n.completeInitSegmentLoad(t)})).catch((function(t){n.state!==qn&&n.state!==ir&&(n.warn(t),n.resetFragmentLoading(e))}))},n.completeInitSegmentLoad=function(e){if(!this.levels)throw new Error("init load aborted, missing levels");var t=e.frag.stats;this.state=Xn,e.frag.data=new Uint8Array(e.payload),t.parsing.start=t.buffering.start=self.performance.now(),t.parsing.end=t.buffering.end=self.performance.now(),this.tick()},n.fragContextChanged=function(e){var t=this.fragCurrent;return!e||!t||e.sn!==t.sn||e.level!==t.level},n.fragBufferedComplete=function(e,t){var n,r,i,a,o=this.mediaBuffer?this.mediaBuffer:this.media;if(this.log("Buffered "+e.type+" sn: "+e.sn+(t?" part: "+t.index:"")+" of "+(this.playlistType===Tt?"level":"track")+" "+e.level+" (frag:["+(null!=(n=e.startPTS)?n:NaN).toFixed(3)+"-"+(null!=(r=e.endPTS)?r:NaN).toFixed(3)+"] > buffer:"+(o?function(e){for(var t="",n=e.length,r=0;r<n;r++)t+="["+e.start(r).toFixed(3)+"-"+e.end(r).toFixed(3)+"]";return t}(Ln.getBuffered(o)):"(detached)")+")"),"initSegment"!==e.sn){var s;if(e.type!==St){var l=e.elementaryStreams;if(!Object.keys(l).some((function(e){return!!l[e]})))return void(this.state=Xn)}var u=null==(s=this.levels)?void 0:s[e.level];null!=u&&u.fragmentError&&(this.log("Resetting level fragment error count of "+u.fragmentError+" on frag buffered"),u.fragmentError=0)}this.state=Xn,o&&(!this.loadedmetadata&&e.type==Tt&&o.buffered.length&&(null==(i=this.fragCurrent)?void 0:i.sn)===(null==(a=this.fragPrevious)?void 0:a.sn)&&(this.loadedmetadata=!0,this.seekToStartPos()),this.tick())},n.seekToStartPos=function(){},n._handleFragmentLoadComplete=function(e){var t=this.transmuxer;if(t){var n=e.frag,r=e.part,i=e.partsLoaded,a=!i||0===i.length||i.some((function(e){return!e})),o=new Mn(n.level,n.sn,n.stats.chunkCount+1,0,r?r.index:-1,!a);t.flush(o)}},n._handleFragmentLoadProgress=function(e){},n._doFragLoad=function(e,t,n,r){var i,a=this;void 0===n&&(n=null);var o=null==t?void 0:t.details;if(!this.levels||!o)throw new Error("frag load aborted, missing level"+(o?"":" detail")+"s");var s=null;if(!e.encrypted||null!=(i=e.decryptdata)&&i.key?!e.encrypted&&o.encryptedFragments.length&&this.keyLoader.loadClear(e,o.encryptedFragments):(this.log("Loading key for "+e.sn+" of ["+o.startSN+"-"+o.endSN+"], "+("[stream-controller]"===this.logPrefix?"level":"track")+" "+e.level),this.state=Qn,this.fragCurrent=e,s=this.keyLoader.load(e).then((function(e){if(!a.fragContextChanged(e.frag))return a.hls.trigger(b.KEY_LOADED,e),a.state===Qn&&(a.state=Xn),e})),this.hls.trigger(b.KEY_LOADING,{frag:e}),null===this.fragCurrent&&(s=Promise.reject(new Error("frag load aborted, context changed in KEY_LOADING")))),n=Math.max(e.start,n||0),this.config.lowLatencyMode&&"initSegment"!==e.sn){var l=o.partList;if(l&&r){n>e.end&&o.fragmentHint&&(e=o.fragmentHint);var u=this.getNextPart(l,e,n);if(u>-1){var c,d=l[u];return this.log("Loading part sn: "+e.sn+" p: "+d.index+" cc: "+e.cc+" of playlist ["+o.startSN+"-"+o.endSN+"] parts [0-"+u+"-"+(l.length-1)+"] "+("[stream-controller]"===this.logPrefix?"level":"track")+": "+e.level+", target: "+parseFloat(n.toFixed(3))),this.nextLoadPosition=d.start+d.duration,this.state=$n,c=s?s.then((function(n){return!n||a.fragContextChanged(n.frag)?null:a.doFragPartsLoad(e,d,t,r)})).catch((function(e){return a.handleFragLoadError(e)})):this.doFragPartsLoad(e,d,t,r).catch((function(e){return a.handleFragLoadError(e)})),this.hls.trigger(b.FRAG_LOADING,{frag:e,part:d,targetBufferTime:n}),null===this.fragCurrent?Promise.reject(new Error("frag load aborted, context changed in FRAG_LOADING parts")):c}if(!e.url||this.loadedEndOfParts(l,n))return Promise.resolve(null)}}this.log("Loading fragment "+e.sn+" cc: "+e.cc+" "+(o?"of ["+o.startSN+"-"+o.endSN+"] ":"")+("[stream-controller]"===this.logPrefix?"level":"track")+": "+e.level+", target: "+parseFloat(n.toFixed(3))),g(e.sn)&&!this.bitrateTest&&(this.nextLoadPosition=e.start+e.duration),this.state=$n;var p,f=this.config.progressive;return p=f&&s?s.then((function(t){return!t||a.fragContextChanged(null==t?void 0:t.frag)?null:a.fragmentLoader.load(e,r)})).catch((function(e){return a.handleFragLoadError(e)})):Promise.all([this.fragmentLoader.load(e,f?r:void 0),s]).then((function(e){var t=e[0];return!f&&t&&r&&r(t),t})).catch((function(e){return a.handleFragLoadError(e)})),this.hls.trigger(b.FRAG_LOADING,{frag:e,targetBufferTime:n}),null===this.fragCurrent?Promise.reject(new Error("frag load aborted, context changed in FRAG_LOADING")):p},n.doFragPartsLoad=function(e,t,n,r){var i=this;return new Promise((function(a,o){var s,l=[],u=null==(s=n.details)?void 0:s.partList;!function t(s){i.fragmentLoader.loadPart(e,s,r).then((function(r){l[s.index]=r;var o=r.part;i.hls.trigger(b.FRAG_LOADED,r);var c=Jt(n,e.sn,s.index+1)||en(u,e.sn,s.index+1);if(!c)return a({frag:e,part:o,partsLoaded:l});t(c)})).catch(o)}(t)}))},n.handleFragLoadError=function(e){if("data"in e){var t=e.data;e.data&&t.details===E.INTERNAL_ABORTED?this.handleFragLoadAborted(t.frag,t.part):this.hls.trigger(b.ERROR,t)}else this.hls.trigger(b.ERROR,{type:k.OTHER_ERROR,details:E.INTERNAL_EXCEPTION,err:e,error:e,fatal:!0});return null},n._handleTransmuxerFlush=function(e){var t=this.getCurrentContext(e);if(t&&this.state===tr){var n=t.frag,r=t.part,i=t.level,a=self.performance.now();n.stats.parsing.end=a,r&&(r.stats.parsing.end=a),this.updateLevelTiming(n,r,i,e.partial)}else this.fragCurrent||this.state===qn||this.state===ir||(this.state=Xn)},n.getCurrentContext=function(e){var t=this.levels,n=this.fragCurrent,r=e.level,i=e.sn,a=e.part;if(null==t||!t[r])return this.warn("Levels object was unset while buffering fragment "+i+" of level "+r+". The current chunk will not be buffered."),null;var o=t[r],s=a>-1?Jt(o,i,a):null,l=s?s.fragment:function(e,t,n){if(null==e||!e.details)return null;var r=e.details,i=r.fragments[t-r.startSN];return i||((i=r.fragmentHint)&&i.sn===t?i:t<r.startSN&&n&&n.sn===t?n:null)}(o,i,n);return l?(n&&n!==l&&(l.stats=n.stats),{frag:l,part:s,level:o}):null},n.bufferFragmentData=function(e,t,n,r,i){var a;if(e&&this.state===tr){var o=e.data1,s=e.data2,l=o;if(o&&s&&(l=Ne(o,s)),null!=(a=l)&&a.length){var u={type:e.type,frag:t,part:n,chunkMeta:r,parent:t.type,data:l};if(this.hls.trigger(b.BUFFER_APPENDING,u),e.dropped&&e.independent&&!n){if(i)return;this.flushBufferGap(t)}}}},n.flushBufferGap=function(e){var t=this.media;if(t)if(Ln.isBuffered(t,t.currentTime)){var n=t.currentTime,r=Ln.bufferInfo(t,n,0),i=e.duration,a=Math.min(2*this.config.maxFragLookUpTolerance,.25*i),o=Math.max(Math.min(e.start-a,r.end-a),n+a);e.start-o>a&&this.flushMainBuffer(o,e.start)}else this.flushMainBuffer(0,e.start)},n.getFwdBufferInfo=function(e,t){var n=this.getLoadPosition();return g(n)?this.getFwdBufferInfoAtPos(e,n,t):null},n.getFwdBufferInfoAtPos=function(e,t,n){var r=this.config.maxBufferHole,i=Ln.bufferInfo(e,t,r);if(0===i.len&&void 0!==i.nextStart){var a=this.fragmentTracker.getBufferedFrag(t,n);if(a&&i.nextStart<a.end)return Ln.bufferInfo(e,t,Math.max(i.nextStart,r))}return i},n.getMaxBufferLength=function(e){var t,n=this.config;return t=e?Math.max(8*n.maxBufferSize/e,n.maxBufferLength):n.maxBufferLength,Math.min(t,n.maxMaxBufferLength)},n.reduceMaxBufferLength=function(e){var t=this.config,n=e||t.maxBufferLength;return t.maxMaxBufferLength>=n&&(t.maxMaxBufferLength/=2,this.warn("Reduce max buffer length to "+t.maxMaxBufferLength+"s"),!0)},n.getAppendedFrag=function(e,t){var n=this.fragmentTracker.getAppendedFrag(e,Tt);return n&&"fragment"in n?n.fragment:n},n.getNextFragment=function(e,t){var n=t.fragments,r=n.length;if(!r)return null;var i,a=this.config,o=n[0].start;if(t.live){var s=a.initialLiveManifestSize;if(r<s)return this.warn("Not enough fragments to start playback (have: "+r+", need: "+s+")"),null;(!t.PTSKnown&&!this.startFragRequested&&-1===this.startPosition||e<o)&&(i=this.getInitialLiveFragment(t,n),this.startPosition=this.nextLoadPosition=i?this.hls.liveSyncPosition||i.start:e)}else e<=o&&(i=n[0]);if(!i){var l=a.lowLatencyMode?t.partEnd:t.fragmentEnd;i=this.getFragmentAtPosition(e,l,t)}return this.mapToInitFragWhenRequired(i)},n.isLoopLoading=function(e,t){var n=this.fragmentTracker.getState(e);return(n===Pn||n===xn&&!!e.gap)&&this.nextLoadPosition>t},n.getNextFragmentLoopLoading=function(e,t,n,r,i){var a=e.gap,o=this.getNextFragment(this.nextLoadPosition,t);if(null===o)return o;if(e=o,a&&e&&!e.gap&&n.nextStart){var s=this.getFwdBufferInfoAtPos(this.mediaBuffer?this.mediaBuffer:this.media,n.nextStart,r);if(null!==s&&n.len+s.len>=i)return this.log('buffer full after gaps in "'+r+'" playlist starting at sn: '+e.sn),null}return e},n.mapToInitFragWhenRequired=function(e){return null==e||!e.initSegment||null!=e&&e.initSegment.data||this.bitrateTest?e:e.initSegment},n.getNextPart=function(e,t,n){for(var r=-1,i=!1,a=!0,o=0,s=e.length;o<s;o++){var l=e[o];if(a=a&&!l.independent,r>-1&&n<l.start)break;var u=l.loaded;u?r=-1:(i||l.independent||a)&&l.fragment===t&&(r=o),i=u}return r},n.loadedEndOfParts=function(e,t){var n=e[e.length-1];return n&&t>n.start&&n.loaded},n.getInitialLiveFragment=function(e,t){var n=this.fragPrevious,r=null;if(n){if(e.hasProgramDateTime&&(this.log("Live playlist, switching playlist, load frag with same PDT: "+n.programDateTime),r=function(e,t,n){if(null===t||!Array.isArray(e)||!e.length||!g(t))return null;if(t<(e[0].programDateTime||0))return null;if(t>=(e[e.length-1].endProgramDateTime||0))return null;n=n||0;for(var r=0;r<e.length;++r){var i=e[r];if(dn(t,n,i))return i}return null}(t,n.endProgramDateTime,this.config.maxFragLookUpTolerance)),!r){var i=n.sn+1;if(i>=e.startSN&&i<=e.endSN){var a=t[i-e.startSN];n.cc===a.cc&&(r=a,this.log("Live playlist, switching playlist, load frag with next SN: "+r.sn))}r||(r=function(e,t){return ln(e,(function(e){return e.cc<t?1:e.cc>t?-1:0}))}(t,n.cc),r&&this.log("Live playlist, switching playlist, load frag with same CC: "+r.sn))}}else{var o=this.hls.liveSyncPosition;null!==o&&(r=this.getFragmentAtPosition(o,this.bitrateTest?e.fragmentEnd:e.edge,e))}return r},n.getFragmentAtPosition=function(e,t,n){var r,i=this.config,a=this.fragPrevious,o=n.fragments,s=n.endSN,l=n.fragmentHint,u=i.maxFragLookUpTolerance,c=n.partList,d=!!(i.lowLatencyMode&&null!=c&&c.length&&l);if(d&&l&&!this.bitrateTest&&(o=o.concat(l),s=l.sn),r=e<t?un(a,o,e,e>t-u?0:u):o[o.length-1]){var p=r.sn-n.startSN,f=this.fragmentTracker.getState(r);if((f===Pn||f===xn&&r.gap)&&(a=r),a&&r.sn===a.sn&&(!d||c[0].fragment.sn>r.sn)&&a&&r.level===a.level){var h=o[p+1];r=r.sn<s&&this.fragmentTracker.getState(h)!==Pn?h:null}}return r},n.synchronizeToLiveEdge=function(e){var t=this.config,n=this.media;if(n){var r=this.hls.liveSyncPosition,i=n.currentTime,a=e.fragments[0].start,o=e.edge,s=i>=a-t.maxFragLookUpTolerance&&i<=o;if(null!==r&&n.duration>r&&(i<r||!s)){var l=void 0!==t.liveMaxLatencyDuration?t.liveMaxLatencyDuration:t.liveMaxLatencyDurationCount*e.targetduration;(!s&&n.readyState<4||i<o-l)&&(this.loadedmetadata||(this.nextLoadPosition=r),n.readyState&&(this.warn("Playback: "+i.toFixed(3)+" is located too far from the end of live sliding playlist: "+o+", reset currentTime to : "+r.toFixed(3)),n.currentTime=r))}}},n.alignPlaylists=function(e,t,n){var r=e.fragments.length;if(!r)return this.warn("No fragments in live playlist"),0;var i=e.fragments[0].start,a=!t,o=e.alignedSliding&&g(i);if(a||!o&&!i){var s=this.fragPrevious;!function(e,t,n){t&&(function(e,t,n){if(function(e,t,n){return!(!t||!(n.endCC>n.startCC||e&&e.cc<n.startCC))}(e,n,t)){var r=function(e,t){var n=e.fragments,r=t.fragments;if(r.length&&n.length){var i=Nn(n,r[0].cc);if(i&&(!i||i.startPTS))return i;w.log("No frag in previous level to align on")}else w.log("No fragments to align")}(n,t);r&&g(r.start)&&(w.log("Adjusting PTS using last level due to CC increase within current level "+t.url),Bn(r.start,t))}}(e,n,t),!n.alignedSliding&&t&&Fn(n,t),n.alignedSliding||!t||n.skippedSegments||Qt(t,n))}(s,n,e);var l=e.fragments[0].start;return this.log("Live playlist sliding: "+l.toFixed(2)+" start-sn: "+(t?t.startSN:"na")+"->"+e.startSN+" prev-sn: "+(s?s.sn:"na")+" fragments: "+r),l}return i},n.waitForCdnTuneIn=function(e){return e.live&&e.canBlockReload&&e.partTarget&&e.tuneInGoal>Math.max(e.partHoldBack,3*e.partTarget)},n.setStartPosition=function(e,t){var n=this.startPosition;if(n<t&&(n=-1),-1===n||-1===this.lastCurrentTime){var r=null!==this.startTimeOffset,i=r?this.startTimeOffset:e.startTimeOffset;null!==i&&g(i)?(n=t+i,i<0&&(n+=e.totalduration),n=Math.min(Math.max(t,n),t+e.totalduration),this.log("Start time offset "+i+" found in "+(r?"multivariant":"media")+" playlist, adjust startPosition to "+n),this.startPosition=n):e.live?n=this.hls.liveSyncPosition||t:this.startPosition=n=0,this.lastCurrentTime=n}this.nextLoadPosition=n},n.getLoadPosition=function(){var e=this.media,t=0;return this.loadedmetadata&&e?t=e.currentTime:this.nextLoadPosition&&(t=this.nextLoadPosition),t},n.handleFragLoadAborted=function(e,t){this.transmuxer&&"initSegment"!==e.sn&&e.stats.aborted&&(this.warn("Fragment "+e.sn+(t?" part "+t.index:"")+" of level "+e.level+" was aborted"),this.resetFragmentLoading(e))},n.resetFragmentLoading=function(e){this.fragCurrent&&(this.fragContextChanged(e)||this.state===Jn)||(this.state=Xn)},n.onFragmentOrKeyLoadError=function(e,t){if(t.chunkMeta&&!t.frag){var n=this.getCurrentContext(t.chunkMeta);n&&(t.frag=n.frag)}var r=t.frag;if(r&&r.type===e&&this.levels)if(this.fragContextChanged(r)){var i;this.warn("Frag load error must match current frag to retry "+r.url+" > "+(null==(i=this.fragCurrent)?void 0:i.url))}else{var a=t.details===E.FRAG_GAP;a&&this.fragmentTracker.fragBuffered(r,!0);var o=t.errorAction,s=o||{},l=s.action,u=s.retryCount,c=void 0===u?0:u,d=s.retryConfig;if(o&&5===l&&d){this.resetStartWhenNotLoaded(this.levelLastLoaded);var p=an(d,c);this.warn("Fragment "+r.sn+" of "+e+" "+r.level+" errored with "+t.details+", retrying loading "+(c+1)+"/"+d.maxNumRetry+" in "+p+"ms"),o.resolved=!0,this.retryDate=self.performance.now()+p,this.state=Jn}else if(d&&o){if(this.resetFragmentErrors(e),!(c<d.maxNumRetry))return void w.warn(t.details+" reached or exceeded max retry ("+c+")");a||3===l||(o.resolved=!0)}else 2===(null==o?void 0:o.action)?this.state=or:this.state=ir;this.tickImmediate()}},n.reduceLengthAndFlushBuffer=function(e){if(this.state===tr||this.state===nr){var t=e.parent,n=this.getFwdBufferInfo(this.mediaBuffer,t),r=n&&n.len>.5;r&&this.reduceMaxBufferLength(n.len);var i=!r;return i&&this.warn("Buffer full error while media.currentTime is not buffered, flush "+t+" buffer"),e.frag&&(this.fragmentTracker.removeFragment(e.frag),this.nextLoadPosition=e.frag.start),this.resetLoadingState(),i}return!1},n.resetFragmentErrors=function(e){e===At&&(this.fragCurrent=null),this.loadedmetadata||(this.startFragRequested=!1),this.state!==qn&&(this.state=Xn)},n.afterBufferFlushed=function(e,t,n){if(e){var r=Ln.getBuffered(e);this.fragmentTracker.detectEvictedFragments(t,r,n),this.state===rr&&this.resetLoadingState()}},n.resetLoadingState=function(){this.log("Reset loading state"),this.fragCurrent=null,this.fragPrevious=null,this.state=Xn},n.resetStartWhenNotLoaded=function(e){if(!this.loadedmetadata){this.startFragRequested=!1;var t=e?e.details:null;null!=t&&t.live?(this.startPosition=-1,this.setStartPosition(t,0),this.resetLoadingState()):this.nextLoadPosition=this.startPosition}},n.resetWhenMissingContext=function(e){this.warn("The loading context changed while buffering fragment "+e.sn+" of level "+e.level+". This chunk will not be buffered."),this.removeUnbufferedFrags(),this.resetStartWhenNotLoaded(this.levelLastLoaded),this.resetLoadingState()},n.removeUnbufferedFrags=function(e){void 0===e&&(e=0),this.fragmentTracker.removeFragmentsInRange(e,1/0,this.playlistType,!1,!0)},n.updateLevelTiming=function(e,t,n,r){var i,a=this,o=n.details;if(o){if(!Object.keys(e.elementaryStreams).reduce((function(t,i){var s=e.elementaryStreams[i];if(s){var l=s.endPTS-s.startPTS;if(l<=0)return a.warn("Could not parse fragment "+e.sn+" "+i+" duration reliably ("+l+")"),t||!1;var u=r?0:qt(o,e,s.startPTS,s.endPTS,s.startDTS,s.endDTS);return a.hls.trigger(b.LEVEL_PTS_UPDATED,{details:o,level:n,drift:u,type:i,frag:e,start:s.startPTS,end:s.endPTS}),!0}return t}),!1)&&null===(null==(i=this.transmuxer)?void 0:i.error)){var s=new Error("Found no media in fragment "+e.sn+" of level "+e.level+" resetting transmuxer to fallback to playlist timing");if(0===n.fragmentError&&(n.fragmentError++,e.gap=!0,this.fragmentTracker.removeFragment(e),this.fragmentTracker.fragBuffered(e,!0)),this.warn(s.message),this.hls.trigger(b.ERROR,{type:k.MEDIA_ERROR,details:E.FRAG_PARSING_ERROR,fatal:!1,error:s,frag:e,reason:"Found no media in msn "+e.sn+' of level "'+n.url+'"'}),!this.hls)return;this.resetTransmuxer()}this.state=nr,this.hls.trigger(b.FRAG_PARSED,{frag:e,part:t})}else this.warn("level.details undefined")},n.resetTransmuxer=function(){this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null)},n.recoverWorkerError=function(e){"demuxerWorker"===e.event&&(this.fragmentTracker.removeAllFragments(),this.resetTransmuxer(),this.resetStartWhenNotLoaded(this.levelLastLoaded),this.resetLoadingState())},o(t,[{key:"state",get:function(){return this._state},set:function(e){var t=this._state;t!==e&&(this._state=e,this.log(t+"->"+e))}}]),t}(Sn),lr=function(){function e(){this.chunks=[],this.dataLength=0}var t=e.prototype;return t.push=function(e){this.chunks.push(e),this.dataLength+=e.length},t.flush=function(){var e,t=this.chunks,n=this.dataLength;return t.length?(e=1===t.length?t[0]:function(e,t){for(var n=new Uint8Array(t),r=0,i=0;i<e.length;i++){var a=e[i];n.set(a,r),r+=a.length}return n}(t,n),this.reset(),e):new Uint8Array(0)},t.reset=function(){this.chunks.length=0,this.dataLength=0},e}();function ur(e,t){return void 0===e&&(e=""),void 0===t&&(t=9e4),{type:e,id:-1,pid:-1,inputTimeScale:t,sequenceNumber:-1,samples:[],dropped:0}}var cr=function(){function e(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.basePTS=null,this.initPTS=null,this.lastPTS=null}var t=e.prototype;return t.resetInitSegment=function(e,t,n,r){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}},t.resetTimeStamp=function(e){this.initPTS=e,this.resetContiguity()},t.resetContiguity=function(){this.basePTS=null,this.lastPTS=null,this.frameIndex=0},t.canParse=function(e,t){return!1},t.appendFrame=function(e,t,n){},t.demux=function(e,t){this.cachedData&&(e=Ne(this.cachedData,e),this.cachedData=null);var n,r=ie(e,0),i=r?r.length:0,a=this._audioTrack,o=this._id3Track,s=r?se(r):void 0,l=e.length;for((null===this.basePTS||0===this.frameIndex&&g(s))&&(this.basePTS=dr(s,t,this.initPTS),this.lastPTS=this.basePTS),null===this.lastPTS&&(this.lastPTS=this.basePTS),r&&r.length>0&&o.samples.push({pts:this.lastPTS,dts:this.lastPTS,data:r,type:Lt,duration:Number.POSITIVE_INFINITY});i<l;){if(this.canParse(e,i)){var u=this.appendFrame(a,e,i);u?(this.frameIndex++,this.lastPTS=u.sample.pts,n=i+=u.length):i=l}else oe(e,i)?(r=ie(e,i),o.samples.push({pts:this.lastPTS,dts:this.lastPTS,data:r,type:Lt,duration:Number.POSITIVE_INFINITY}),n=i+=r.length):i++;if(i===l&&n!==l){var c=ee(e,n);this.cachedData?this.cachedData=Ne(this.cachedData,c):this.cachedData=c}}return{audioTrack:a,videoTrack:ur(),id3Track:o,textTrack:ur()}},t.demuxSampleAes=function(e,t,n){return Promise.reject(new Error("["+this+"] This demuxer does not support Sample-AES decryption"))},t.flush=function(e){var t=this.cachedData;return t&&(this.cachedData=null,this.demux(t,0)),{audioTrack:this._audioTrack,videoTrack:ur(),id3Track:this._id3Track,textTrack:ur()}},t.destroy=function(){},e}(),dr=function(e,t,n){return g(e)?90*e:9e4*t+(n?9e4*n.baseTime/n.timescale:0)};function pr(e,t){return 255===e[t]&&240==(246&e[t+1])}function fr(e,t){return 1&e[t+1]?7:9}function hr(e,t){return(3&e[t+3])<<11|e[t+4]<<3|(224&e[t+5])>>>5}function yr(e,t){return t+1<e.length&&pr(e,t)}function gr(e,t){if(yr(e,t)){var n=fr(e,t);if(t+n>=e.length)return!1;var r=hr(e,t);if(r<=n)return!1;var i=t+r;return i===e.length||yr(e,i)}return!1}function vr(e,t,n,r,i){if(!e.samplerate){var a=function(e,t,n,r){var i,a,o,s,l=navigator.userAgent.toLowerCase(),u=r,c=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];i=1+((192&t[n+2])>>>6);var d=(60&t[n+2])>>>2;if(!(d>c.length-1))return o=(1&t[n+2])<<2,o|=(192&t[n+3])>>>6,w.log("manifest codec:"+r+", ADTS type:"+i+", samplingIndex:"+d),/firefox/i.test(l)?d>=6?(i=5,s=new Array(4),a=d-3):(i=2,s=new Array(2),a=d):-1!==l.indexOf("android")?(i=2,s=new Array(2),a=d):(i=5,s=new Array(4),r&&(-1!==r.indexOf("mp4a.40.29")||-1!==r.indexOf("mp4a.40.5"))||!r&&d>=6?a=d-3:((r&&-1!==r.indexOf("mp4a.40.2")&&(d>=6&&1===o||/vivaldi/i.test(l))||!r&&1===o)&&(i=2,s=new Array(2)),a=d)),s[0]=i<<3,s[0]|=(14&d)>>1,s[1]|=(1&d)<<7,s[1]|=o<<3,5===i&&(s[1]|=(14&a)>>1,s[2]=(1&a)<<7,s[2]|=8,s[3]=0),{config:s,samplerate:c[d],channelCount:o,codec:"mp4a.40."+i,manifestCodec:u};var p=new Error("invalid ADTS sampling index:"+d);e.emit(b.ERROR,b.ERROR,{type:k.MEDIA_ERROR,details:E.FRAG_PARSING_ERROR,fatal:!0,error:p,reason:p.message})}(t,n,r,i);if(!a)return;e.config=a.config,e.samplerate=a.samplerate,e.channelCount=a.channelCount,e.codec=a.codec,e.manifestCodec=a.manifestCodec,w.log("parsed codec:"+e.codec+", rate:"+a.samplerate+", channels:"+a.channelCount)}}function mr(e){return 9216e4/e}function br(e,t,n,r,i){var a,o=r+i*mr(e.samplerate),s=function(e,t){var n=fr(e,t);if(t+n<=e.length){var r=hr(e,t)-n;if(r>0)return{headerLength:n,frameLength:r}}}(t,n);if(s){var l=s.frameLength,u=s.headerLength,c=u+l,d=Math.max(0,n+c-t.length);d?(a=new Uint8Array(c-u)).set(t.subarray(n+u,t.length),0):a=t.subarray(n+u,n+c);var p={unit:a,pts:o};return d||e.samples.push(p),{sample:p,length:c,missing:d}}var f=t.length-n;return(a=new Uint8Array(f)).set(t.subarray(n,t.length),0),{sample:{unit:a,pts:o},length:f,missing:-1}}var kr=null,Er=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],_r=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],Tr=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],Ar=[0,1,1,4];function Sr(e,t,n,r,i){if(!(n+24>t.length)){var a=wr(t,n);if(a&&n+a.frameLength<=t.length){var o=r+i*(9e4*a.samplesPerFrame/a.sampleRate),s={unit:t.subarray(n,n+a.frameLength),pts:o,dts:o};return e.config=[],e.channelCount=a.channelCount,e.samplerate=a.sampleRate,e.samples.push(s),{sample:s,length:a.frameLength,missing:0}}}}function wr(e,t){var n=e[t+1]>>3&3,r=e[t+1]>>1&3,i=e[t+2]>>4&15,a=e[t+2]>>2&3;if(1!==n&&0!==i&&15!==i&&3!==a){var o=e[t+2]>>1&1,s=e[t+3]>>6,l=1e3*Er[14*(3===n?3-r:3===r?3:4)+i-1],u=_r[3*(3===n?0:2===n?1:2)+a],c=3===s?1:2,d=Tr[n][r],p=Ar[r],f=8*d*p,h=Math.floor(d*l/u+o)*p;if(null===kr){var y=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);kr=y?parseInt(y[1]):0}return!!kr&&kr<=87&&2===r&&l>=224e3&&0===s&&(e[t+3]=128|e[t+3]),{sampleRate:u,channelCount:c,frameLength:h,samplesPerFrame:f}}}function Cr(e,t){return 255===e[t]&&224==(224&e[t+1])&&0!=(6&e[t+1])}function xr(e,t){return t+1<e.length&&Cr(e,t)}function Pr(e,t){if(t+1<e.length&&Cr(e,t)){var n=wr(e,t),r=4;null!=n&&n.frameLength&&(r=n.frameLength);var i=t+r;return i===e.length||xr(e,i)}return!1}var Rr=function(e){function t(t,n){var r;return(r=e.call(this)||this).observer=void 0,r.config=void 0,r.observer=t,r.config=n,r}l(t,e);var n=t.prototype;return n.resetInitSegment=function(t,n,r,i){e.prototype.resetInitSegment.call(this,t,n,r,i),this._audioTrack={container:"audio/adts",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"aac",samples:[],manifestCodec:n,duration:i,inputTimeScale:9e4,dropped:0}},t.probe=function(e){if(!e)return!1;var t=ie(e,0),n=(null==t?void 0:t.length)||0;if(Pr(e,n))return!1;for(var r=e.length;n<r;n++)if(gr(e,n))return w.log("ADTS sync word found !"),!0;return!1},n.canParse=function(e,t){return function(e,t){return function(e,t){return t+5<e.length}(e,t)&&pr(e,t)&&hr(e,t)<=e.length-t}(e,t)},n.appendFrame=function(e,t,n){vr(e,this.observer,t,n,e.manifestCodec);var r=br(e,t,n,this.basePTS,this.frameIndex);if(r&&0===r.missing)return r},t}(cr),Ir=/\/emsg[-/]ID3/i,Dr=function(){function e(e,t){this.remainderData=null,this.timeOffset=0,this.config=void 0,this.videoTrack=void 0,this.audioTrack=void 0,this.id3Track=void 0,this.txtTrack=void 0,this.config=t}var t=e.prototype;return t.resetTimeStamp=function(){},t.resetInitSegment=function(e,t,n,r){var i=this.videoTrack=ur("video",1),a=this.audioTrack=ur("audio",1),o=this.txtTrack=ur("text",1);if(this.id3Track=ur("id3",1),this.timeOffset=0,null!=e&&e.byteLength){var s=Pe(e);if(s.video){var l=s.video,u=l.id,c=l.timescale,d=l.codec;i.id=u,i.timescale=o.timescale=c,i.codec=d}if(s.audio){var p=s.audio,f=p.id,h=p.timescale,y=p.codec;a.id=f,a.timescale=h,a.codec=y}o.id=ke.text,i.sampleDuration=0,i.duration=a.duration=r}},t.resetContiguity=function(){this.remainderData=null},e.probe=function(e){return function(e){for(var t=e.byteLength,n=0;n<t;){var r=Te(e,n);if(r>8&&109===e[n+4]&&111===e[n+5]&&111===e[n+6]&&102===e[n+7])return!0;n=r>1?n+r:t}return!1}(e)},t.demux=function(e,t){this.timeOffset=t;var n=e,r=this.videoTrack,i=this.txtTrack;if(this.config.progressive){this.remainderData&&(n=Ne(this.remainderData,e));var a=function(e){var t={valid:null,remainder:null},n=Ce(e,["moof"]);if(n.length<2)return t.remainder=e,t;var r=n[n.length-1];return t.valid=ee(e,0,r.byteOffset-8),t.remainder=ee(e,r.byteOffset-8),t}(n);this.remainderData=a.remainder,r.samples=a.valid||new Uint8Array}else r.samples=n;var o=this.extractID3Track(r,t);return i.samples=Ue(t,r),{videoTrack:r,audioTrack:this.audioTrack,id3Track:o,textTrack:this.txtTrack}},t.flush=function(){var e=this.timeOffset,t=this.videoTrack,n=this.txtTrack;t.samples=this.remainderData||new Uint8Array,this.remainderData=null;var r=this.extractID3Track(t,this.timeOffset);return n.samples=Ue(e,t),{videoTrack:t,audioTrack:ur(),id3Track:r,textTrack:ur()}},t.extractID3Track=function(e,t){var n=this.id3Track;if(e.samples.length){var r=Ce(e.samples,["emsg"]);r&&r.forEach((function(e){var r=function(e){var t=e[0],n="",r="",i=0,a=0,o=0,s=0,l=0,u=0;if(0===t){for(;"\0"!==Ee(e.subarray(u,u+1));)n+=Ee(e.subarray(u,u+1)),u+=1;for(n+=Ee(e.subarray(u,u+1)),u+=1;"\0"!==Ee(e.subarray(u,u+1));)r+=Ee(e.subarray(u,u+1)),u+=1;r+=Ee(e.subarray(u,u+1)),u+=1,i=Te(e,12),a=Te(e,16),s=Te(e,20),l=Te(e,24),u=28}else if(1===t){i=Te(e,u+=4);var c=Te(e,u+=4),d=Te(e,u+=4);for(u+=4,o=Math.pow(2,32)*c+d,v(o)||(o=Number.MAX_SAFE_INTEGER,w.warn("Presentation time exceeds safe integer limit and wrapped to max safe integer in parsing emsg box")),s=Te(e,u),l=Te(e,u+=4),u+=4;"\0"!==Ee(e.subarray(u,u+1));)n+=Ee(e.subarray(u,u+1)),u+=1;for(n+=Ee(e.subarray(u,u+1)),u+=1;"\0"!==Ee(e.subarray(u,u+1));)r+=Ee(e.subarray(u,u+1)),u+=1;r+=Ee(e.subarray(u,u+1)),u+=1}return{schemeIdUri:n,value:r,timeScale:i,presentationTime:o,presentationTimeDelta:a,eventDuration:s,id:l,payload:e.subarray(u,e.byteLength)}}(e);if(Ir.test(r.schemeIdUri)){var i=g(r.presentationTime)?r.presentationTime/r.timeScale:t+r.presentationTimeDelta/r.timeScale,a=4294967295===r.eventDuration?Number.POSITIVE_INFINITY:r.eventDuration/r.timeScale;a<=.001&&(a=Number.POSITIVE_INFINITY);var o=r.payload;n.samples.push({data:o,len:o.byteLength,dts:i,pts:i,type:Mt,duration:a})}}))}return n},t.demuxSampleAes=function(e,t,n){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))},t.destroy=function(){},e}(),Or=function(e,t){var n=0,r=5;t+=r;for(var i=new Uint32Array(1),a=new Uint32Array(1),o=new Uint8Array(1);r>0;){o[0]=e[t];var s=Math.min(r,8),l=8-s;a[0]=4278190080>>>24+l<<l,i[0]=(o[0]&a[0])>>l,n=n?n<<s|i[0]:i[0],t+=1,r-=s}return n},Lr=function(e){function t(t){var n;return(n=e.call(this)||this).observer=void 0,n.observer=t,n}l(t,e);var n=t.prototype;return n.resetInitSegment=function(t,n,r,i){e.prototype.resetInitSegment.call(this,t,n,r,i),this._audioTrack={container:"audio/ac-3",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"ac3",samples:[],manifestCodec:n,duration:i,inputTimeScale:9e4,dropped:0}},n.canParse=function(e,t){return t+64<e.length},n.appendFrame=function(e,t,n){var r=Mr(e,t,n,this.basePTS,this.frameIndex);if(-1!==r)return{sample:e.samples[e.samples.length-1],length:r,missing:0}},t.probe=function(e){if(!e)return!1;var t=ie(e,0);if(!t)return!1;var n=t.length;return 11===e[n]&&119===e[n+1]&&void 0!==se(t)&&Or(e,n)<16},t}(cr);function Mr(e,t,n,r,i){if(n+8>t.length)return-1;if(11!==t[n]||119!==t[n+1])return-1;var a=t[n+4]>>6;if(a>=3)return-1;var o=[48e3,44100,32e3][a],s=63&t[n+4],l=2*[64,69,96,64,70,96,80,87,120,80,88,120,96,104,144,96,105,144,112,121,168,112,122,168,128,139,192,128,140,192,160,174,240,160,175,240,192,208,288,192,209,288,224,243,336,224,244,336,256,278,384,256,279,384,320,348,480,320,349,480,384,417,576,384,418,576,448,487,672,448,488,672,512,557,768,512,558,768,640,696,960,640,697,960,768,835,1152,768,836,1152,896,975,1344,896,976,1344,1024,1114,1536,1024,1115,1536,1152,1253,1728,1152,1254,1728,1280,1393,1920,1280,1394,1920][3*s+a];if(n+l>t.length)return-1;var u=t[n+6]>>5,c=0;2===u?c+=2:(1&u&&1!==u&&(c+=2),4&u&&(c+=2));var d=(t[n+6]<<8|t[n+7])>>12-c&1,p=[2,1,2,3,3,4,4,5][u]+d,f=t[n+5]>>3,h=7&t[n+5],y=new Uint8Array([a<<6|f<<1|h>>2,(3&h)<<6|u<<3|d<<2|s>>4,s<<4&224]),g=r+i*(1536/o*9e4),v=t.subarray(n,n+l);return e.config=y,e.channelCount=p,e.samplerate=o,e.samples.push({unit:v,pts:g}),l}var Nr=function(){function e(){this.VideoSample=null}var t=e.prototype;return t.createVideoSample=function(e,t,n,r){return{key:e,frame:!1,pts:t,dts:n,units:[],debug:r,length:0}},t.getLastNalUnit=function(e){var t,n,r=this.VideoSample;if(r&&0!==r.units.length||(r=e[e.length-1]),null!=(t=r)&&t.units){var i=r.units;n=i[i.length-1]}return n},t.pushAccessUnit=function(e,t){if(e.units.length&&e.frame){if(void 0===e.pts){var n=t.samples,r=n.length;if(!r)return void t.dropped++;var i=n[r-1];e.pts=i.pts,e.dts=i.dts}t.samples.push(e)}e.debug.length&&w.log(e.pts+"/"+e.dts+":"+e.debug)},e}(),Ur=function(){function e(e){this.data=void 0,this.bytesAvailable=void 0,this.word=void 0,this.bitsAvailable=void 0,this.data=e,this.bytesAvailable=e.byteLength,this.word=0,this.bitsAvailable=0}var t=e.prototype;return t.loadWord=function(){var e=this.data,t=this.bytesAvailable,n=e.byteLength-t,r=new Uint8Array(4),i=Math.min(4,t);if(0===i)throw new Error("no bytes available");r.set(e.subarray(n,n+i)),this.word=new DataView(r.buffer).getUint32(0),this.bitsAvailable=8*i,this.bytesAvailable-=i},t.skipBits=function(e){var t;e=Math.min(e,8*this.bytesAvailable+this.bitsAvailable),this.bitsAvailable>e?(this.word<<=e,this.bitsAvailable-=e):(e-=this.bitsAvailable,e-=(t=e>>3)<<3,this.bytesAvailable-=t,this.loadWord(),this.word<<=e,this.bitsAvailable-=e)},t.readBits=function(e){var t=Math.min(this.bitsAvailable,e),n=this.word>>>32-t;if(e>32&&w.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=t,this.bitsAvailable>0)this.word<<=t;else{if(!(this.bytesAvailable>0))throw new Error("no bits available");this.loadWord()}return(t=e-t)>0&&this.bitsAvailable?n<<t|this.readBits(t):n},t.skipLZ=function(){var e;for(e=0;e<this.bitsAvailable;++e)if(0!=(this.word&2147483648>>>e))return this.word<<=e,this.bitsAvailable-=e,e;return this.loadWord(),e+this.skipLZ()},t.skipUEG=function(){this.skipBits(1+this.skipLZ())},t.skipEG=function(){this.skipBits(1+this.skipLZ())},t.readUEG=function(){var e=this.skipLZ();return this.readBits(e+1)-1},t.readEG=function(){var e=this.readUEG();return 1&e?1+e>>>1:-1*(e>>>1)},t.readBoolean=function(){return 1===this.readBits(1)},t.readUByte=function(){return this.readBits(8)},t.readUShort=function(){return this.readBits(16)},t.readUInt=function(){return this.readBits(32)},t.skipScalingList=function(e){for(var t=8,n=8,r=0;r<e;r++)0!==n&&(n=(t+this.readEG()+256)%256),t=0===n?t:n},t.readSPS=function(){var e,t,n,r=0,i=0,a=0,o=0,s=this.readUByte.bind(this),l=this.readBits.bind(this),u=this.readUEG.bind(this),c=this.readBoolean.bind(this),d=this.skipBits.bind(this),p=this.skipEG.bind(this),f=this.skipUEG.bind(this),h=this.skipScalingList.bind(this);s();var y=s();if(l(5),d(3),s(),f(),100===y||110===y||122===y||244===y||44===y||83===y||86===y||118===y||128===y){var g=u();if(3===g&&d(1),f(),f(),d(1),c())for(t=3!==g?8:12,n=0;n<t;n++)c()&&h(n<6?16:64)}f();var v=u();if(0===v)u();else if(1===v)for(d(1),p(),p(),e=u(),n=0;n<e;n++)p();f(),d(1);var m=u(),b=u(),k=l(1);0===k&&d(1),d(1),c()&&(r=u(),i=u(),a=u(),o=u());var E=[1,1];if(c()&&c())switch(s()){case 1:E=[1,1];break;case 2:E=[12,11];break;case 3:E=[10,11];break;case 4:E=[16,11];break;case 5:E=[40,33];break;case 6:E=[24,11];break;case 7:E=[20,11];break;case 8:E=[32,11];break;case 9:E=[80,33];break;case 10:E=[18,11];break;case 11:E=[15,11];break;case 12:E=[64,33];break;case 13:E=[160,99];break;case 14:E=[4,3];break;case 15:E=[3,2];break;case 16:E=[2,1];break;case 255:E=[s()<<8|s(),s()<<8|s()]}return{width:Math.ceil(16*(m+1)-2*r-2*i),height:(2-k)*(b+1)*16-(k?2:4)*(a+o),pixelRatio:E}},t.readSliceType=function(){return this.readUByte(),this.readUEG(),this.readUEG()},e}(),Br=function(e){function t(){return e.apply(this,arguments)||this}l(t,e);var n=t.prototype;return n.parseAVCPES=function(e,t,n,r,i){var a,o=this,s=this.parseAVCNALu(e,n.data),l=this.VideoSample,u=!1;n.data=null,l&&s.length&&!e.audFound&&(this.pushAccessUnit(l,e),l=this.VideoSample=this.createVideoSample(!1,n.pts,n.dts,"")),s.forEach((function(r){var s;switch(r.type){case 1:var c=!1;a=!0;var d,p=r.data;if(u&&p.length>4){var f=new Ur(p).readSliceType();2!==f&&4!==f&&7!==f&&9!==f||(c=!0)}c&&null!=(d=l)&&d.frame&&!l.key&&(o.pushAccessUnit(l,e),l=o.VideoSample=null),l||(l=o.VideoSample=o.createVideoSample(!0,n.pts,n.dts,"")),l.frame=!0,l.key=c;break;case 5:a=!0,null!=(s=l)&&s.frame&&!l.key&&(o.pushAccessUnit(l,e),l=o.VideoSample=null),l||(l=o.VideoSample=o.createVideoSample(!0,n.pts,n.dts,"")),l.key=!0,l.frame=!0;break;case 6:a=!0,Fe(r.data,1,n.pts,t.samples);break;case 7:var h,y;a=!0,u=!0;var g=r.data,v=new Ur(g).readSPS();if(!e.sps||e.width!==v.width||e.height!==v.height||(null==(h=e.pixelRatio)?void 0:h[0])!==v.pixelRatio[0]||(null==(y=e.pixelRatio)?void 0:y[1])!==v.pixelRatio[1]){e.width=v.width,e.height=v.height,e.pixelRatio=v.pixelRatio,e.sps=[g],e.duration=i;for(var m=g.subarray(1,4),b="avc1.",k=0;k<3;k++){var E=m[k].toString(16);E.length<2&&(E="0"+E),b+=E}e.codec=b}break;case 8:a=!0,e.pps=[r.data];break;case 9:a=!0,e.audFound=!0,l&&o.pushAccessUnit(l,e),l=o.VideoSample=o.createVideoSample(!1,n.pts,n.dts,"");break;case 12:a=!0;break;default:a=!1,l&&(l.debug+="unknown NAL "+r.type+" ")}l&&a&&l.units.push(r)})),r&&l&&(this.pushAccessUnit(l,e),this.VideoSample=null)},n.parseAVCNALu=function(e,t){var n,r,i=t.byteLength,a=e.naluState||0,o=a,s=[],l=0,u=-1,c=0;for(-1===a&&(u=0,c=31&t[0],a=0,l=1);l<i;)if(n=t[l++],a)if(1!==a)if(n)if(1===n){if(r=l-a-1,u>=0){var d={data:t.subarray(u,r),type:c};s.push(d)}else{var p=this.getLastNalUnit(e.samples);p&&(o&&l<=4-o&&p.state&&(p.data=p.data.subarray(0,p.data.byteLength-o)),r>0&&(p.data=Ne(p.data,t.subarray(0,r)),p.state=0))}l<i?(u=l,c=31&t[l],a=0):a=-1}else a=0;else a=3;else a=n?0:2;else a=n?0:1;if(u>=0&&a>=0){var f={data:t.subarray(u,i),type:c,state:a};s.push(f)}if(0===s.length){var h=this.getLastNalUnit(e.samples);h&&(h.data=Ne(h.data,t))}return e.naluState=a,s},t}(Nr),Fr=function(){function e(e,t,n){this.keyData=void 0,this.decrypter=void 0,this.keyData=n,this.decrypter=new Zn(t,{removePKCS7Padding:!1})}var t=e.prototype;return t.decryptBuffer=function(e){return this.decrypter.decrypt(e,this.keyData.key.buffer,this.keyData.iv.buffer)},t.decryptAacSample=function(e,t,n){var r=this,i=e[t].unit;if(!(i.length<=16)){var a=i.subarray(16,i.length-i.length%16),o=a.buffer.slice(a.byteOffset,a.byteOffset+a.length);this.decryptBuffer(o).then((function(a){var o=new Uint8Array(a);i.set(o,16),r.decrypter.isSync()||r.decryptAacSamples(e,t+1,n)}))}},t.decryptAacSamples=function(e,t,n){for(;;t++){if(t>=e.length)return void n();if(!(e[t].unit.length<32||(this.decryptAacSample(e,t,n),this.decrypter.isSync())))return}},t.getAvcEncryptedData=function(e){for(var t=16*Math.floor((e.length-48)/160)+16,n=new Int8Array(t),r=0,i=32;i<e.length-16;i+=160,r+=16)n.set(e.subarray(i,i+16),r);return n},t.getAvcDecryptedUnit=function(e,t){for(var n=new Uint8Array(t),r=0,i=32;i<e.length-16;i+=160,r+=16)e.set(n.subarray(r,r+16),i);return e},t.decryptAvcSample=function(e,t,n,r,i){var a=this,o=je(i.data),s=this.getAvcEncryptedData(o);this.decryptBuffer(s.buffer).then((function(s){i.data=a.getAvcDecryptedUnit(o,s),a.decrypter.isSync()||a.decryptAvcSamples(e,t,n+1,r)}))},t.decryptAvcSamples=function(e,t,n,r){if(e instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;t++,n=0){if(t>=e.length)return void r();for(var i=e[t].units;!(n>=i.length);n++){var a=i[n];if(!(a.data.length<=48||1!==a.type&&5!==a.type||(this.decryptAvcSample(e,t,n,r,a),this.decrypter.isSync())))return}}},e}(),jr=188,Hr=function(){function e(e,t,n){this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.sampleAes=null,this.pmtParsed=!1,this.audioCodec=void 0,this.videoCodec=void 0,this._duration=0,this._pmtId=-1,this._videoTrack=void 0,this._audioTrack=void 0,this._id3Track=void 0,this._txtTrack=void 0,this.aacOverFlow=null,this.remainderData=null,this.videoParser=void 0,this.observer=e,this.config=t,this.typeSupported=n,this.videoParser=new Br}e.probe=function(t){var n=e.syncOffset(t);return n>0&&w.warn("MPEG2-TS detected but first sync word found @ offset "+n),-1!==n},e.syncOffset=function(e){for(var t=e.length,n=Math.min(940,t-jr)+1,r=0;r<n;){for(var i=!1,a=-1,o=0,s=r;s<t;s+=jr){if(71!==e[s]||t-s!==jr&&71!==e[s+jr]){if(o)return-1;break}if(o++,-1===a&&0!==(a=s)&&(n=Math.min(a+18612,e.length-jr)+1),i||(i=0===Vr(e,s)),i&&o>1&&(0===a&&o>2||s+jr>n))return a}r++}return-1},e.createTrack=function(e,t){return{container:"video"===e||"audio"===e?"video/mp2t":void 0,type:e,id:ke[e],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:"audio"===e?t:void 0}};var t=e.prototype;return t.resetInitSegment=function(t,n,r,i){this.pmtParsed=!1,this._pmtId=-1,this._videoTrack=e.createTrack("video"),this._audioTrack=e.createTrack("audio",i),this._id3Track=e.createTrack("id3"),this._txtTrack=e.createTrack("text"),this._audioTrack.segmentCodec="aac",this.aacOverFlow=null,this.remainderData=null,this.audioCodec=n,this.videoCodec=r,this._duration=i},t.resetTimeStamp=function(){},t.resetContiguity=function(){var e=this._audioTrack,t=this._videoTrack,n=this._id3Track;e&&(e.pesData=null),t&&(t.pesData=null),n&&(n.pesData=null),this.aacOverFlow=null,this.remainderData=null},t.demux=function(t,n,r,i){var a;void 0===r&&(r=!1),void 0===i&&(i=!1),r||(this.sampleAes=null);var o=this._videoTrack,s=this._audioTrack,l=this._id3Track,u=this._txtTrack,c=o.pid,d=o.pesData,p=s.pid,f=l.pid,h=s.pesData,y=l.pesData,g=null,v=this.pmtParsed,m=this._pmtId,_=t.length;if(this.remainderData&&(_=(t=Ne(this.remainderData,t)).length,this.remainderData=null),_<jr&&!i)return this.remainderData=t,{audioTrack:s,videoTrack:o,id3Track:l,textTrack:u};var T=Math.max(0,e.syncOffset(t));(_-=(_-T)%jr)<t.byteLength&&!i&&(this.remainderData=new Uint8Array(t.buffer,_,t.buffer.byteLength-_));for(var A=0,S=T;S<_;S+=jr)if(71===t[S]){var C=!!(64&t[S+1]),x=Vr(t,S),P=void 0;if((48&t[S+3])>>4>1){if((P=S+5+t[S+4])===S+jr)continue}else P=S+4;switch(x){case c:C&&(d&&(a=Wr(d))&&this.videoParser.parseAVCPES(o,u,a,!1,this._duration),d={data:[],size:0}),d&&(d.data.push(t.subarray(P,S+jr)),d.size+=S+jr-P);break;case p:if(C){if(h&&(a=Wr(h)))switch(s.segmentCodec){case"aac":this.parseAACPES(s,a);break;case"mp3":this.parseMPEGPES(s,a);break;case"ac3":this.parseAC3PES(s,a)}h={data:[],size:0}}h&&(h.data.push(t.subarray(P,S+jr)),h.size+=S+jr-P);break;case f:C&&(y&&(a=Wr(y))&&this.parseID3PES(l,a),y={data:[],size:0}),y&&(y.data.push(t.subarray(P,S+jr)),y.size+=S+jr-P);break;case 0:C&&(P+=t[P]+1),m=this._pmtId=Gr(t,P);break;case m:C&&(P+=t[P]+1);var R=Kr(t,P,this.typeSupported,r);(c=R.videoPid)>0&&(o.pid=c,o.segmentCodec=R.segmentVideoCodec),(p=R.audioPid)>0&&(s.pid=p,s.segmentCodec=R.segmentAudioCodec),(f=R.id3Pid)>0&&(l.pid=f),null===g||v||(w.warn("MPEG-TS PMT found at "+S+" after unknown PID '"+g+"'. Backtracking to sync byte @"+T+" to parse all TS packets."),g=null,S=T-188),v=this.pmtParsed=!0;break;case 17:case 8191:break;default:g=x}}else A++;if(A>0){var I=new Error("Found "+A+" TS packet/s that do not start with 0x47");this.observer.emit(b.ERROR,b.ERROR,{type:k.MEDIA_ERROR,details:E.FRAG_PARSING_ERROR,fatal:!1,error:I,reason:I.message})}o.pesData=d,s.pesData=h,l.pesData=y;var D={audioTrack:s,videoTrack:o,id3Track:l,textTrack:u};return i&&this.extractRemainingSamples(D),D},t.flush=function(){var e,t=this.remainderData;return this.remainderData=null,e=t?this.demux(t,-1,!1,!0):{videoTrack:this._videoTrack,audioTrack:this._audioTrack,id3Track:this._id3Track,textTrack:this._txtTrack},this.extractRemainingSamples(e),this.sampleAes?this.decrypt(e,this.sampleAes):e},t.extractRemainingSamples=function(e){var t,n=e.audioTrack,r=e.videoTrack,i=e.id3Track,a=e.textTrack,o=r.pesData,s=n.pesData,l=i.pesData;if(o&&(t=Wr(o))?(this.videoParser.parseAVCPES(r,a,t,!0,this._duration),r.pesData=null):r.pesData=o,s&&(t=Wr(s))){switch(n.segmentCodec){case"aac":this.parseAACPES(n,t);break;case"mp3":this.parseMPEGPES(n,t);break;case"ac3":this.parseAC3PES(n,t)}n.pesData=null}else null!=s&&s.size&&w.log("last AAC PES packet truncated,might overlap between fragments"),n.pesData=s;l&&(t=Wr(l))?(this.parseID3PES(i,t),i.pesData=null):i.pesData=l},t.demuxSampleAes=function(e,t,n){var r=this.demux(e,n,!0,!this.config.progressive),i=this.sampleAes=new Fr(this.observer,this.config,t);return this.decrypt(r,i)},t.decrypt=function(e,t){return new Promise((function(n){var r=e.audioTrack,i=e.videoTrack;r.samples&&"aac"===r.segmentCodec?t.decryptAacSamples(r.samples,0,(function(){i.samples?t.decryptAvcSamples(i.samples,0,0,(function(){n(e)})):n(e)})):i.samples&&t.decryptAvcSamples(i.samples,0,0,(function(){n(e)}))}))},t.destroy=function(){this._duration=0},t.parseAACPES=function(e,t){var n,r,i,a=0,o=this.aacOverFlow,s=t.data;if(o){this.aacOverFlow=null;var l=o.missing,u=o.sample.unit.byteLength;if(-1===l)s=Ne(o.sample.unit,s);else{var c=u-l;o.sample.unit.set(s.subarray(0,l),c),e.samples.push(o.sample),a=o.missing}}for(n=a,r=s.length;n<r-1&&!yr(s,n);n++);if(n!==a){var d,p=n<r-1;d=p?"AAC PES did not start with ADTS header,offset:"+n:"No ADTS header found in AAC PES";var f=new Error(d);if(w.warn("parsing error: "+d),this.observer.emit(b.ERROR,b.ERROR,{type:k.MEDIA_ERROR,details:E.FRAG_PARSING_ERROR,fatal:!1,levelRetry:p,error:f,reason:d}),!p)return}if(vr(e,this.observer,s,n,this.audioCodec),void 0!==t.pts)i=t.pts;else{if(!o)return void w.warn("[tsdemuxer]: AAC PES unknown PTS");var h=mr(e.samplerate);i=o.sample.pts+h}for(var y,g=0;n<r;){if(n+=(y=br(e,s,n,i,g)).length,y.missing){this.aacOverFlow=y;break}for(g++;n<r-1&&!yr(s,n);n++);}},t.parseMPEGPES=function(e,t){var n=t.data,r=n.length,i=0,a=0,o=t.pts;if(void 0!==o)for(;a<r;)if(xr(n,a)){var s=Sr(e,n,a,o,i);if(!s)break;a+=s.length,i++}else a++;else w.warn("[tsdemuxer]: MPEG PES unknown PTS")},t.parseAC3PES=function(e,t){var n=t.data,r=t.pts;if(void 0!==r)for(var i,a=n.length,o=0,s=0;s<a&&(i=Mr(e,n,s,r,o++))>0;)s+=i;else w.warn("[tsdemuxer]: AC3 PES unknown PTS")},t.parseID3PES=function(e,t){if(void 0!==t.pts){var n=s({},t,{type:this._videoTrack?Mt:Lt,duration:Number.POSITIVE_INFINITY});e.samples.push(n)}else w.warn("[tsdemuxer]: ID3 PES unknown PTS")},e}();function Vr(e,t){return((31&e[t+1])<<8)+e[t+2]}function Gr(e,t){return(31&e[t+10])<<8|e[t+11]}function Kr(e,t,n,r){var i={audioPid:-1,videoPid:-1,id3Pid:-1,segmentVideoCodec:"avc",segmentAudioCodec:"aac"},a=t+3+((15&e[t+1])<<8|e[t+2])-4;for(t+=12+((15&e[t+10])<<8|e[t+11]);t<a;){var o=Vr(e,t),s=(15&e[t+3])<<8|e[t+4];switch(e[t]){case 207:if(!r){zr("ADTS AAC");break}case 15:-1===i.audioPid&&(i.audioPid=o);break;case 21:-1===i.id3Pid&&(i.id3Pid=o);break;case 219:if(!r){zr("H.264");break}case 27:-1===i.videoPid&&(i.videoPid=o,i.segmentVideoCodec="avc");break;case 3:case 4:n.mpeg||n.mp3?-1===i.audioPid&&(i.audioPid=o,i.segmentAudioCodec="mp3"):w.log("MPEG audio found, not supported in this browser");break;case 193:if(!r){zr("AC-3");break}case 129:n.ac3?-1===i.audioPid&&(i.audioPid=o,i.segmentAudioCodec="ac3"):w.log("AC-3 audio found, not supported in this browser");break;case 6:if(-1===i.audioPid&&s>0)for(var l=t+5,u=s;u>2;){106===e[l]&&(!0!==n.ac3?w.log("AC-3 audio found, not supported in this browser for now"):(i.audioPid=o,i.segmentAudioCodec="ac3"));var c=e[l+1]+2;l+=c,u-=c}break;case 194:case 135:w.warn("Unsupported EC-3 in M2TS found");break;case 36:w.warn("Unsupported HEVC in M2TS found")}t+=s+5}return i}function zr(e){w.log(e+" with AES-128-CBC encryption found in unencrypted stream")}function Wr(e){var t,n,r,i,a,o=0,s=e.data;if(!e||0===e.size)return null;for(;s[0].length<19&&s.length>1;)s[0]=Ne(s[0],s[1]),s.splice(1,1);if(1===((t=s[0])[0]<<16)+(t[1]<<8)+t[2]){if((n=(t[4]<<8)+t[5])&&n>e.size-6)return null;var l=t[7];192&l&&(i=536870912*(14&t[9])+4194304*(255&t[10])+16384*(254&t[11])+128*(255&t[12])+(254&t[13])/2,64&l?i-(a=536870912*(14&t[14])+4194304*(255&t[15])+16384*(254&t[16])+128*(255&t[17])+(254&t[18])/2)>54e5&&(w.warn(Math.round((i-a)/9e4)+"s delta between PTS and DTS, align them"),i=a):a=i);var u=(r=t[8])+9;if(e.size<=u)return null;e.size-=u;for(var c=new Uint8Array(e.size),d=0,p=s.length;d<p;d++){var f=(t=s[d]).byteLength;if(u){if(u>f){u-=f;continue}t=t.subarray(u),f-=u,u=0}c.set(t,o),o+=f}return n&&(n-=r+3),{data:c,pts:i,dts:a,len:n}}return null}var Yr=function(e){function t(){return e.apply(this,arguments)||this}l(t,e);var n=t.prototype;return n.resetInitSegment=function(t,n,r,i){e.prototype.resetInitSegment.call(this,t,n,r,i),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"mp3",samples:[],manifestCodec:n,duration:i,inputTimeScale:9e4,dropped:0}},t.probe=function(e){if(!e)return!1;var t=ie(e,0),n=(null==t?void 0:t.length)||0;if(t&&11===e[n]&&119===e[n+1]&&void 0!==se(t)&&Or(e,n)<=16)return!1;for(var r=e.length;n<r;n++)if(Pr(e,n))return w.log("MPEG Audio sync word found !"),!0;return!1},n.canParse=function(e,t){return function(e,t){return Cr(e,t)&&4<=e.length-t}(e,t)},n.appendFrame=function(e,t,n){if(null!==this.basePTS)return Sr(e,t,n,this.basePTS,this.frameIndex)},t}(cr),Zr=function(){function e(){}return e.getSilentFrame=function(e,t){if("mp4a.40.2"===e){if(1===t)return new Uint8Array([0,200,0,128,35,128]);if(2===t)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(6===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224])}else{if(1===t)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(2===t)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(3===t)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}},e}(),qr=Math.pow(2,32)-1,Xr=function(){function e(){}return e.init=function(){var t;for(t in e.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],".mp3":[],dac3:[],"ac-3":[],mvex:[],mvhd:[],pasp:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[]},e.types)e.types.hasOwnProperty(t)&&(e.types[t]=[t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2),t.charCodeAt(3)]);var n=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),r=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]);e.HDLR_TYPES={video:n,audio:r};var i=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),a=new Uint8Array([0,0,0,0,0,0,0,0]);e.STTS=e.STSC=e.STCO=a,e.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),e.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),e.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),e.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var o=new Uint8Array([105,115,111,109]),s=new Uint8Array([97,118,99,49]),l=new Uint8Array([0,0,0,1]);e.FTYP=e.box(e.types.ftyp,o,l,o,s),e.DINF=e.box(e.types.dinf,e.box(e.types.dref,i))},e.box=function(e){for(var t=8,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];for(var a=r.length,o=a;a--;)t+=r[a].byteLength;var s=new Uint8Array(t);for(s[0]=t>>24&255,s[1]=t>>16&255,s[2]=t>>8&255,s[3]=255&t,s.set(e,4),a=0,t=8;a<o;a++)s.set(r[a],t),t+=r[a].byteLength;return s},e.hdlr=function(t){return e.box(e.types.hdlr,e.HDLR_TYPES[t])},e.mdat=function(t){return e.box(e.types.mdat,t)},e.mdhd=function(t,n){n*=t;var r=Math.floor(n/(qr+1)),i=Math.floor(n%(qr+1));return e.box(e.types.mdhd,new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,t>>24&255,t>>16&255,t>>8&255,255&t,r>>24,r>>16&255,r>>8&255,255&r,i>>24,i>>16&255,i>>8&255,255&i,85,196,0,0]))},e.mdia=function(t){return e.box(e.types.mdia,e.mdhd(t.timescale,t.duration),e.hdlr(t.type),e.minf(t))},e.mfhd=function(t){return e.box(e.types.mfhd,new Uint8Array([0,0,0,0,t>>24,t>>16&255,t>>8&255,255&t]))},e.minf=function(t){return"audio"===t.type?e.box(e.types.minf,e.box(e.types.smhd,e.SMHD),e.DINF,e.stbl(t)):e.box(e.types.minf,e.box(e.types.vmhd,e.VMHD),e.DINF,e.stbl(t))},e.moof=function(t,n,r){return e.box(e.types.moof,e.mfhd(t),e.traf(r,n))},e.moov=function(t){for(var n=t.length,r=[];n--;)r[n]=e.trak(t[n]);return e.box.apply(null,[e.types.moov,e.mvhd(t[0].timescale,t[0].duration)].concat(r).concat(e.mvex(t)))},e.mvex=function(t){for(var n=t.length,r=[];n--;)r[n]=e.trex(t[n]);return e.box.apply(null,[e.types.mvex].concat(r))},e.mvhd=function(t,n){n*=t;var r=Math.floor(n/(qr+1)),i=Math.floor(n%(qr+1)),a=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,t>>24&255,t>>16&255,t>>8&255,255&t,r>>24,r>>16&255,r>>8&255,255&r,i>>24,i>>16&255,i>>8&255,255&i,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return e.box(e.types.mvhd,a)},e.sdtp=function(t){var n,r,i=t.samples||[],a=new Uint8Array(4+i.length);for(n=0;n<i.length;n++)r=i[n].flags,a[n+4]=r.dependsOn<<4|r.isDependedOn<<2|r.hasRedundancy;return e.box(e.types.sdtp,a)},e.stbl=function(t){return e.box(e.types.stbl,e.stsd(t),e.box(e.types.stts,e.STTS),e.box(e.types.stsc,e.STSC),e.box(e.types.stsz,e.STSZ),e.box(e.types.stco,e.STCO))},e.avc1=function(t){var n,r,i,a=[],o=[];for(n=0;n<t.sps.length;n++)i=(r=t.sps[n]).byteLength,a.push(i>>>8&255),a.push(255&i),a=a.concat(Array.prototype.slice.call(r));for(n=0;n<t.pps.length;n++)i=(r=t.pps[n]).byteLength,o.push(i>>>8&255),o.push(255&i),o=o.concat(Array.prototype.slice.call(r));var s=e.box(e.types.avcC,new Uint8Array([1,a[3],a[4],a[5],255,224|t.sps.length].concat(a).concat([t.pps.length]).concat(o))),l=t.width,u=t.height,c=t.pixelRatio[0],d=t.pixelRatio[1];return e.box(e.types.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,l>>8&255,255&l,u>>8&255,255&u,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),s,e.box(e.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),e.box(e.types.pasp,new Uint8Array([c>>24,c>>16&255,c>>8&255,255&c,d>>24,d>>16&255,d>>8&255,255&d])))},e.esds=function(e){var t=e.config.length;return new Uint8Array([0,0,0,0,3,23+t,0,1,0,4,15+t,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([t]).concat(e.config).concat([6,1,2]))},e.audioStsd=function(e){var t=e.samplerate;return new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,e.channelCount,0,16,0,0,0,0,t>>8&255,255&t,0,0])},e.mp4a=function(t){return e.box(e.types.mp4a,e.audioStsd(t),e.box(e.types.esds,e.esds(t)))},e.mp3=function(t){return e.box(e.types[".mp3"],e.audioStsd(t))},e.ac3=function(t){return e.box(e.types["ac-3"],e.audioStsd(t),e.box(e.types.dac3,t.config))},e.stsd=function(t){return"audio"===t.type?"mp3"===t.segmentCodec&&"mp3"===t.codec?e.box(e.types.stsd,e.STSD,e.mp3(t)):"ac3"===t.segmentCodec?e.box(e.types.stsd,e.STSD,e.ac3(t)):e.box(e.types.stsd,e.STSD,e.mp4a(t)):e.box(e.types.stsd,e.STSD,e.avc1(t))},e.tkhd=function(t){var n=t.id,r=t.duration*t.timescale,i=t.width,a=t.height,o=Math.floor(r/(qr+1)),s=Math.floor(r%(qr+1));return e.box(e.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,n>>24&255,n>>16&255,n>>8&255,255&n,0,0,0,0,o>>24,o>>16&255,o>>8&255,255&o,s>>24,s>>16&255,s>>8&255,255&s,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,i>>8&255,255&i,0,0,a>>8&255,255&a,0,0]))},e.traf=function(t,n){var r=e.sdtp(t),i=t.id,a=Math.floor(n/(qr+1)),o=Math.floor(n%(qr+1));return e.box(e.types.traf,e.box(e.types.tfhd,new Uint8Array([0,0,0,0,i>>24,i>>16&255,i>>8&255,255&i])),e.box(e.types.tfdt,new Uint8Array([1,0,0,0,a>>24,a>>16&255,a>>8&255,255&a,o>>24,o>>16&255,o>>8&255,255&o])),e.trun(t,r.length+16+20+8+16+8+8),r)},e.trak=function(t){return t.duration=t.duration||4294967295,e.box(e.types.trak,e.tkhd(t),e.mdia(t))},e.trex=function(t){var n=t.id;return e.box(e.types.trex,new Uint8Array([0,0,0,0,n>>24,n>>16&255,n>>8&255,255&n,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},e.trun=function(t,n){var r,i,a,o,s,l,u=t.samples||[],c=u.length,d=12+16*c,p=new Uint8Array(d);for(n+=8+d,p.set(["video"===t.type?1:0,0,15,1,c>>>24&255,c>>>16&255,c>>>8&255,255&c,n>>>24&255,n>>>16&255,n>>>8&255,255&n],0),r=0;r<c;r++)a=(i=u[r]).duration,o=i.size,s=i.flags,l=i.cts,p.set([a>>>24&255,a>>>16&255,a>>>8&255,255&a,o>>>24&255,o>>>16&255,o>>>8&255,255&o,s.isLeading<<2|s.dependsOn,s.isDependedOn<<6|s.hasRedundancy<<4|s.paddingValue<<1|s.isNonSync,61440&s.degradPrio,15&s.degradPrio,l>>>24&255,l>>>16&255,l>>>8&255,255&l],12+16*r);return e.box(e.types.trun,p)},e.initSegment=function(t){e.types||e.init();var n=e.moov(t);return Ne(e.FTYP,n)},e}();Xr.types=void 0,Xr.HDLR_TYPES=void 0,Xr.STTS=void 0,Xr.STSC=void 0,Xr.STCO=void 0,Xr.STSZ=void 0,Xr.VMHD=void 0,Xr.SMHD=void 0,Xr.STSD=void 0,Xr.FTYP=void 0,Xr.DINF=void 0;function Qr(e,t,n,r){void 0===n&&(n=1),void 0===r&&(r=!1);var i=e*t*n;return r?Math.round(i):i}function $r(e,t){return void 0===t&&(t=!1),Qr(e,1e3,1/9e4,t)}var Jr=null,ei=null,ti=function(){function e(e,t,n,r){if(this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.ISGenerated=!1,this._initPTS=null,this._initDTS=null,this.nextAvcDts=null,this.nextAudioPts=null,this.videoSampleDuration=null,this.isAudioContiguous=!1,this.isVideoContiguous=!1,this.videoTrackConfig=void 0,this.observer=e,this.config=t,this.typeSupported=n,this.ISGenerated=!1,null===Jr){var i=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);Jr=i?parseInt(i[1]):0}if(null===ei){var a=navigator.userAgent.match(/Safari\/(\d+)/i);ei=a?parseInt(a[1]):0}}var t=e.prototype;return t.destroy=function(){this.config=this.videoTrackConfig=this._initPTS=this._initDTS=null},t.resetTimeStamp=function(e){w.log("[mp4-remuxer]: initPTS & initDTS reset"),this._initPTS=this._initDTS=e},t.resetNextTimestamp=function(){w.log("[mp4-remuxer]: reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1},t.resetInitSegment=function(){w.log("[mp4-remuxer]: ISGenerated flag reset"),this.ISGenerated=!1,this.videoTrackConfig=void 0},t.getVideoStartPts=function(e){var t=!1,n=e.reduce((function(e,n){var r=n.pts-e;return r<-4294967296?(t=!0,ni(e,n.pts)):r>0?e:n.pts}),e[0].pts);return t&&w.debug("PTS rollover detected"),n},t.remux=function(e,t,n,r,i,a,o,s){var l,u,c,d,p,f,h=i,y=i,g=e.pid>-1,v=t.pid>-1,m=t.samples.length,b=e.samples.length>0,k=o&&m>0||m>1;if((!g||b)&&(!v||k)||this.ISGenerated||o){if(this.ISGenerated){var E,_,T,A,S=this.videoTrackConfig;!S||t.width===S.width&&t.height===S.height&&(null==(E=t.pixelRatio)?void 0:E[0])===(null==(_=S.pixelRatio)?void 0:_[0])&&(null==(T=t.pixelRatio)?void 0:T[1])===(null==(A=S.pixelRatio)?void 0:A[1])||this.resetInitSegment()}else c=this.generateIS(e,t,i,a);var C,x=this.isVideoContiguous,P=-1;if(k&&(P=function(e){for(var t=0;t<e.length;t++)if(e[t].key)return t;return-1}(t.samples),!x&&this.config.forceKeyFrameOnDiscontinuity))if(f=!0,P>0){w.warn("[mp4-remuxer]: Dropped "+P+" out of "+m+" video samples due to a missing keyframe");var R=this.getVideoStartPts(t.samples);t.samples=t.samples.slice(P),t.dropped+=P,C=y+=(t.samples[0].pts-R)/t.inputTimeScale}else-1===P&&(w.warn("[mp4-remuxer]: No keyframe found out of "+m+" video samples"),f=!1);if(this.ISGenerated){if(b&&k){var I=this.getVideoStartPts(t.samples),D=(ni(e.samples[0].pts,I)-I)/t.inputTimeScale;h+=Math.max(0,D),y+=Math.max(0,-D)}if(b){if(e.samplerate||(w.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),c=this.generateIS(e,t,i,a)),u=this.remuxAudio(e,h,this.isAudioContiguous,a,v||k||s===At?y:void 0),k){var O=u?u.endPTS-u.startPTS:0;t.inputTimeScale||(w.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),c=this.generateIS(e,t,i,a)),l=this.remuxVideo(t,y,x,O)}}else k&&(l=this.remuxVideo(t,y,x,0));l&&(l.firstKeyFrame=P,l.independent=-1!==P,l.firstKeyFramePTS=C)}}return this.ISGenerated&&this._initPTS&&this._initDTS&&(n.samples.length&&(p=ri(n,i,this._initPTS,this._initDTS)),r.samples.length&&(d=ii(r,i,this._initPTS))),{audio:u,video:l,initSegment:c,independent:f,text:d,id3:p}},t.generateIS=function(e,t,n,r){var i,a,o,s=e.samples,l=t.samples,u=this.typeSupported,c={},d=this._initPTS,p=!d||r,f="audio/mp4";if(p&&(i=a=1/0),e.config&&s.length){switch(e.timescale=e.samplerate,e.segmentCodec){case"mp3":u.mpeg?(f="audio/mpeg",e.codec=""):u.mp3&&(e.codec="mp3");break;case"ac3":e.codec="ac-3"}c.audio={id:"audio",container:f,codec:e.codec,initSegment:"mp3"===e.segmentCodec&&u.mpeg?new Uint8Array(0):Xr.initSegment([e]),metadata:{channelCount:e.channelCount}},p&&(o=e.inputTimeScale,d&&o===d.timescale?p=!1:i=a=s[0].pts-Math.round(o*n))}if(t.sps&&t.pps&&l.length){if(t.timescale=t.inputTimeScale,c.video={id:"main",container:"video/mp4",codec:t.codec,initSegment:Xr.initSegment([t]),metadata:{width:t.width,height:t.height}},p)if(o=t.inputTimeScale,d&&o===d.timescale)p=!1;else{var h=this.getVideoStartPts(l),y=Math.round(o*n);a=Math.min(a,ni(l[0].dts,h)-y),i=Math.min(i,h-y)}this.videoTrackConfig={width:t.width,height:t.height,pixelRatio:t.pixelRatio}}if(Object.keys(c).length)return this.ISGenerated=!0,p?(this._initPTS={baseTime:i,timescale:o},this._initDTS={baseTime:a,timescale:o}):i=o=void 0,{tracks:c,initPTS:i,timescale:o}},t.remuxVideo=function(e,t,n,r){var i,a,o=e.inputTimeScale,l=e.samples,u=[],c=l.length,d=this._initPTS,p=this.nextAvcDts,f=8,h=this.videoSampleDuration,y=Number.POSITIVE_INFINITY,g=Number.NEGATIVE_INFINITY,v=!1;if(!n||null===p){var m=t*o,_=l[0].pts-ni(l[0].dts,l[0].pts);Jr&&null!==p&&Math.abs(m-_-p)<15e3?n=!0:p=m-_}for(var T=d.baseTime*o/d.timescale,A=0;A<c;A++){var S=l[A];S.pts=ni(S.pts-T,p),S.dts=ni(S.dts-T,p),S.dts<l[A>0?A-1:A].dts&&(v=!0)}v&&l.sort((function(e,t){var n=e.dts-t.dts,r=e.pts-t.pts;return n||r})),i=l[0].dts;var C=l[l.length-1].dts-i,x=C?Math.round(C/(c-1)):h||e.inputTimeScale/30;if(n){var P=i-p,R=P>x,I=P<-1;if((R||I)&&(R?w.warn("AVC: "+$r(P,!0)+" ms ("+P+"dts) hole between fragments detected at "+t.toFixed(3)):w.warn("AVC: "+$r(-P,!0)+" ms ("+P+"dts) overlapping between fragments detected at "+t.toFixed(3)),!I||p>=l[0].pts||Jr)){i=p;var D=l[0].pts-P;if(R)l[0].dts=i,l[0].pts=D;else for(var O=0;O<l.length&&!(l[O].dts>D);O++)l[O].dts-=P,l[O].pts-=P;w.log("Video: Initial PTS/DTS adjusted: "+$r(D,!0)+"/"+$r(i,!0)+", delta: "+$r(P,!0)+" ms")}}for(var L=0,M=0,N=i=Math.max(0,i),U=0;U<c;U++){for(var B=l[U],F=B.units,j=F.length,H=0,V=0;V<j;V++)H+=F[V].data.length;M+=H,L+=j,B.length=H,B.dts<N?(B.dts=N,N+=x/4|0||1):N=B.dts,y=Math.min(B.pts,y),g=Math.max(B.pts,g)}a=l[c-1].dts;var G,K=M+4*L+8;try{G=new Uint8Array(K)}catch(e){return void this.observer.emit(b.ERROR,b.ERROR,{type:k.MUX_ERROR,details:E.REMUX_ALLOC_ERROR,fatal:!1,error:e,bytes:K,reason:"fail allocating video mdat "+K})}var z=new DataView(G.buffer);z.setUint32(0,K),G.set(Xr.types.mdat,4);for(var W=!1,Y=Number.POSITIVE_INFINITY,Z=Number.POSITIVE_INFINITY,q=Number.NEGATIVE_INFINITY,X=Number.NEGATIVE_INFINITY,Q=0;Q<c;Q++){for(var $=l[Q],J=$.units,ee=0,te=0,ne=J.length;te<ne;te++){var re=J[te],ie=re.data,ae=re.data.byteLength;z.setUint32(f,ae),f+=4,G.set(ie,f),f+=ae,ee+=4+ae}var oe=void 0;if(Q<c-1)h=l[Q+1].dts-$.dts,oe=l[Q+1].pts-$.pts;else{var se=this.config,le=Q>0?$.dts-l[Q-1].dts:x;if(oe=Q>0?$.pts-l[Q-1].pts:x,se.stretchShortVideoTrack&&null!==this.nextAudioPts){var ue=Math.floor(se.maxBufferHole*o),ce=(r?y+r*o:this.nextAudioPts)-$.pts;ce>ue?((h=ce-le)<0?h=le:W=!0,w.log("[mp4-remuxer]: It is approximately "+ce/90+" ms to the next segment; using duration "+h/90+" ms for the last video frame.")):h=le}else h=le}var de=Math.round($.pts-$.dts);Y=Math.min(Y,h),q=Math.max(q,h),Z=Math.min(Z,oe),X=Math.max(X,oe),u.push(new oi($.key,h,ee,de))}if(u.length)if(Jr){if(Jr<70){var pe=u[0].flags;pe.dependsOn=2,pe.isNonSync=0}}else if(ei&&X-Z<q-Y&&x/q<.025&&0===u[0].cts){w.warn("Found irregular gaps in sample duration. Using PTS instead of DTS to determine MP4 sample duration.");for(var fe=i,he=0,ye=u.length;he<ye;he++){var ge=fe+u[he].duration,ve=fe+u[he].cts;if(he<ye-1){var me=ge+u[he+1].cts;u[he].duration=me-ve}else u[he].duration=he?u[he-1].duration:x;u[he].cts=0,fe=ge}}h=W||!h?x:h,this.nextAvcDts=p=a+h,this.videoSampleDuration=h,this.isVideoContiguous=!0;var be={data1:Xr.moof(e.sequenceNumber++,i,s({},e,{samples:u})),data2:G,startPTS:y/o,endPTS:(g+h)/o,startDTS:i/o,endDTS:p/o,type:"video",hasAudio:!1,hasVideo:!0,nb:u.length,dropped:e.dropped};return e.samples=[],e.dropped=0,be},t.getSamplesPerFrame=function(e){switch(e.segmentCodec){case"mp3":return 1152;case"ac3":return 1536;default:return 1024}},t.remuxAudio=function(e,t,n,r,i){var a=e.inputTimeScale,o=a/(e.samplerate?e.samplerate:a),l=this.getSamplesPerFrame(e),u=l*o,c=this._initPTS,d="mp3"===e.segmentCodec&&this.typeSupported.mpeg,p=[],f=void 0!==i,h=e.samples,y=d?0:8,g=this.nextAudioPts||-1,v=t*a,m=c.baseTime*a/c.timescale;if(this.isAudioContiguous=n=n||h.length&&g>0&&(r&&Math.abs(v-g)<9e3||Math.abs(ni(h[0].pts-m,v)-g)<20*u),h.forEach((function(e){e.pts=ni(e.pts-m,v)})),!n||g<0){if(h=h.filter((function(e){return e.pts>=0})),!h.length)return;g=0===i?0:r&&!f?Math.max(0,v):h[0].pts}if("aac"===e.segmentCodec)for(var _=this.config.maxAudioFramesDrift,T=0,A=g;T<h.length;T++){var S=h[T],C=S.pts,x=C-A,P=Math.abs(1e3*x/a);if(x<=-_*u&&f)0===T&&(w.warn("Audio frame @ "+(C/a).toFixed(3)+"s overlaps nextAudioPts by "+Math.round(1e3*x/a)+" ms."),this.nextAudioPts=g=A=C);else if(x>=_*u&&P<1e4&&f){var R=Math.round(x/u);(A=C-R*u)<0&&(R--,A+=u),0===T&&(this.nextAudioPts=g=A),w.warn("[mp4-remuxer]: Injecting "+R+" audio frame @ "+(A/a).toFixed(3)+"s due to "+Math.round(1e3*x/a)+" ms gap.");for(var I=0;I<R;I++){var D=Math.max(A,0),O=Zr.getSilentFrame(e.manifestCodec||e.codec,e.channelCount);O||(w.log("[mp4-remuxer]: Unable to get silent frame for given audio codec; duplicating last frame instead."),O=S.unit.subarray()),h.splice(T,0,{unit:O,pts:D}),A+=u,T++}}S.pts=A,A+=u}for(var L,M=null,N=null,U=0,B=h.length;B--;)U+=h[B].unit.byteLength;for(var F=0,j=h.length;F<j;F++){var H=h[F],V=H.unit,G=H.pts;if(null!==N)p[F-1].duration=Math.round((G-N)/o);else{if(n&&"aac"===e.segmentCodec&&(G=g),M=G,!(U>0))return;U+=y;try{L=new Uint8Array(U)}catch(e){return void this.observer.emit(b.ERROR,b.ERROR,{type:k.MUX_ERROR,details:E.REMUX_ALLOC_ERROR,fatal:!1,error:e,bytes:U,reason:"fail allocating audio mdat "+U})}d||(new DataView(L.buffer).setUint32(0,U),L.set(Xr.types.mdat,4))}L.set(V,y);var K=V.byteLength;y+=K,p.push(new oi(!0,l,K,0)),N=G}var z=p.length;if(z){var W=p[p.length-1];this.nextAudioPts=g=N+o*W.duration;var Y=d?new Uint8Array(0):Xr.moof(e.sequenceNumber++,M/o,s({},e,{samples:p}));e.samples=[];var Z=M/a,q=g/a,X={data1:Y,data2:L,startPTS:Z,endPTS:q,startDTS:Z,endDTS:q,type:"audio",hasAudio:!0,hasVideo:!1,nb:z};return this.isAudioContiguous=!0,X}},t.remuxEmptyAudio=function(e,t,n,r){var i=e.inputTimeScale,a=i/(e.samplerate?e.samplerate:i),o=this.nextAudioPts,s=this._initDTS,l=9e4*s.baseTime/s.timescale,u=(null!==o?o:r.startDTS*i)+l,c=r.endDTS*i+l,d=1024*a,p=Math.ceil((c-u)/d),f=Zr.getSilentFrame(e.manifestCodec||e.codec,e.channelCount);if(w.warn("[mp4-remuxer]: remux empty Audio"),f){for(var h=[],y=0;y<p;y++){var g=u+y*d;h.push({unit:f,pts:g,dts:g})}return e.samples=h,this.remuxAudio(e,t,n,!1)}w.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec")},e}();function ni(e,t){var n;if(null===t)return e;for(n=t<e?-8589934592:8589934592;Math.abs(e-t)>4294967296;)e+=n;return e}function ri(e,t,n,r){var i=e.samples.length;if(i){for(var a=e.inputTimeScale,o=0;o<i;o++){var s=e.samples[o];s.pts=ni(s.pts-n.baseTime*a/n.timescale,t*a)/a,s.dts=ni(s.dts-r.baseTime*a/r.timescale,t*a)/a}var l=e.samples;return e.samples=[],{samples:l}}}function ii(e,t,n){var r=e.samples.length;if(r){for(var i=e.inputTimeScale,a=0;a<r;a++){var o=e.samples[a];o.pts=ni(o.pts-n.baseTime*i/n.timescale,t*i)/i}e.samples.sort((function(e,t){return e.pts-t.pts}));var s=e.samples;return e.samples=[],{samples:s}}}var ai,oi=function(e,t,n,r){this.size=void 0,this.duration=void 0,this.cts=void 0,this.flags=void 0,this.duration=t,this.size=n,this.cts=r,this.flags={isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:e?2:1,isNonSync:e?0:1}},si=function(){function e(){this.emitInitSegment=!1,this.audioCodec=void 0,this.videoCodec=void 0,this.initData=void 0,this.initPTS=null,this.initTracks=void 0,this.lastEndTime=null}var t=e.prototype;return t.destroy=function(){},t.resetTimeStamp=function(e){this.initPTS=e,this.lastEndTime=null},t.resetNextTimestamp=function(){this.lastEndTime=null},t.resetInitSegment=function(e,t,n,r){this.audioCodec=t,this.videoCodec=n,this.generateInitSegment(function(e,t){if(!e||!t)return e;var n=t.keyId;return n&&t.isCommonEncryption&&Ce(e,["moov","trak"]).forEach((function(e){var t=Ce(e,["mdia","minf","stbl","stsd"])[0].subarray(8),r=Ce(t,["enca"]),i=r.length>0;i||(r=Ce(t,["encv"])),r.forEach((function(e){Ce(i?e.subarray(28):e.subarray(78),["sinf"]).forEach((function(e){var t=Le(e);if(t){var r=t.subarray(8,24);r.some((function(e){return 0!==e}))||(w.log("[eme] Patching keyId in 'enc"+(i?"a":"v")+">sinf>>tenc' box: "+ve(r)+" -> "+ve(n)),t.set(n,8))}}))}))})),e}(e,r)),this.emitInitSegment=!0},t.generateInitSegment=function(e){var t=this.audioCodec,n=this.videoCodec;if(null==e||!e.byteLength)return this.initTracks=void 0,void(this.initData=void 0);var r=this.initData=Pe(e);r.audio&&(t=li(r.audio,O)),r.video&&(n=li(r.video,L));var i={};r.audio&&r.video?i.audiovideo={container:"video/mp4",codec:t+","+n,initSegment:e,id:"main"}:r.audio?i.audio={container:"audio/mp4",codec:t,initSegment:e,id:"audio"}:r.video?i.video={container:"video/mp4",codec:n,initSegment:e,id:"main"}:w.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=i},t.remux=function(e,t,n,r,i,a){var o,s,l=this.initPTS,u=this.lastEndTime,c={audio:void 0,video:void 0,text:r,id3:n,initSegment:void 0};g(u)||(u=this.lastEndTime=i||0);var d=t.samples;if(null==d||!d.length)return c;var p={initPTS:void 0,timescale:1},f=this.initData;if(null!=(o=f)&&o.length||(this.generateInitSegment(d),f=this.initData),null==(s=f)||!s.length)return w.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),c;this.emitInitSegment&&(p.tracks=this.initTracks,this.emitInitSegment=!1);var h=function(e,t){for(var n=0,r=0,i=0,a=Ce(e,["moof","traf"]),o=0;o<a.length;o++){var s=a[o],l=Ce(s,["tfhd"])[0],u=t[Te(l,4)];if(u){var c=u.default,d=Te(l,0)|(null==c?void 0:c.flags),p=null==c?void 0:c.duration;8&d&&(p=Te(l,2&d?12:8));for(var f=u.timescale||9e4,h=Ce(s,["trun"]),y=0;y<h.length;y++)!(n=Me(h[y]))&&p&&(n=p*Te(h[y],4)),u.type===L?r+=n/f:u.type===O&&(i+=n/f)}}if(0===r&&0===i){for(var v=1/0,m=0,b=0,k=Ce(e,["sidx"]),E=0;E<k.length;E++){var _=xe(k[E]);if(null!=_&&_.references){v=Math.min(v,_.earliestPresentationTime/_.timescale);var T=_.references.reduce((function(e,t){return e+t.info.duration||0}),0);b=(m=Math.max(m,T+_.earliestPresentationTime/_.timescale))-v}}if(b&&g(b))return b}return r||i}(d,f),y=function(e,t){return Ce(t,["moof","traf"]).reduce((function(t,n){var r=Ce(n,["tfdt"])[0],i=r[0],a=Ce(n,["tfhd"]).reduce((function(t,n){var a=Te(n,4),o=e[a];if(o){var s=Te(r,4);if(1===i){if(s===me)return w.warn("[mp4-demuxer]: Ignoring assumed invalid signed 64-bit track fragment decode time"),t;s*=me+1,s+=Te(r,8)}var l=s/(o.timescale||9e4);if(g(l)&&(null===t||l<t))return l}return t}),null);return null!==a&&g(a)&&(null===t||a<t)?a:t}),null)}(f,d),v=null===y?i:y;(function(e,t,n,r){if(null===e)return!0;var i=Math.max(r,1),a=t-e.baseTime/e.timescale;return Math.abs(a-n)>i}(l,v,i,h)||p.timescale!==l.timescale&&a)&&(p.initPTS=v-i,l&&1===l.timescale&&w.warn("Adjusting initPTS by "+(p.initPTS-l.baseTime)),this.initPTS=l={baseTime:p.initPTS,timescale:1});var m=e?v-l.baseTime/l.timescale:u,b=m+h;!function(e,t,n){Ce(t,["moof","traf"]).forEach((function(t){Ce(t,["tfhd"]).forEach((function(r){var i=Te(r,4),a=e[i];if(a){var o=a.timescale||9e4;Ce(t,["tfdt"]).forEach((function(e){var t=e[0],r=n*o;if(r){var i=Te(e,4);if(0===t)i-=r,we(e,4,i=Math.max(i,0));else{i*=Math.pow(2,32),i+=Te(e,8),i-=r,i=Math.max(i,0);var a=Math.floor(i/(me+1)),s=Math.floor(i%(me+1));we(e,4,a),we(e,8,s)}}}))}}))}))}(f,d,l.baseTime/l.timescale),h>0?this.lastEndTime=b:(w.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var k=!!f.audio,E=!!f.video,_="";k&&(_+="audio"),E&&(_+="video");var T={data1:d,startPTS:m,startDTS:m,endPTS:b,endDTS:b,type:_,hasAudio:k,hasVideo:E,nb:1,dropped:0};return c.audio="audio"===T.type?T:void 0,c.video="audio"!==T.type?T:void 0,c.initSegment=p,c.id3=ri(n,i,l,l),r.samples.length&&(c.text=ii(r,i,l)),c},e}();function li(e,t){var n=null==e?void 0:e.codec;if(n&&n.length>4)return n;if(t===O){if("ec-3"===n||"ac-3"===n||"alac"===n)return n;if("fLaC"===n||"Opus"===n)return it(n,!1);var r="mp4a.40.5";return w.info('Parsed audio codec "'+n+'" or audio object type not handled. Using "'+r+'"'),r}return w.warn('Unhandled video codec "'+n+'"'),"hvc1"===n||"hev1"===n?"hvc1.1.6.L120.90":"av01"===n?"av01.0.04M.08":"avc1.42e01e"}try{ai=self.performance.now.bind(self.performance)}catch(e){w.debug("Unable to use Performance API on this environment"),ai=null==V?void 0:V.Date.now}var ui=[{demux:Dr,remux:si},{demux:Hr,remux:ti},{demux:Rr,remux:ti},{demux:Yr,remux:ti}];ui.splice(2,0,{demux:Lr,remux:ti});var ci=function(){function e(e,t,n,r,i){this.async=!1,this.observer=void 0,this.typeSupported=void 0,this.config=void 0,this.vendor=void 0,this.id=void 0,this.demuxer=void 0,this.remuxer=void 0,this.decrypter=void 0,this.probe=void 0,this.decryptionPromise=null,this.transmuxConfig=void 0,this.currentTransmuxState=void 0,this.observer=e,this.typeSupported=t,this.config=n,this.vendor=r,this.id=i}var t=e.prototype;return t.configure=function(e){this.transmuxConfig=e,this.decrypter&&this.decrypter.reset()},t.push=function(e,t,n,r){var i=this,a=n.transmuxing;a.executeStart=ai();var o=new Uint8Array(e),s=this.currentTransmuxState,l=this.transmuxConfig;r&&(this.currentTransmuxState=r);var u=r||s,c=u.contiguous,d=u.discontinuity,p=u.trackSwitch,f=u.accurateTimeOffset,h=u.timeOffset,y=u.initSegmentChange,g=l.audioCodec,v=l.videoCodec,m=l.defaultInitPts,_=l.duration,T=l.initSegmentData,A=function(e,t){var n=null;return e.byteLength>0&&null!=(null==t?void 0:t.key)&&null!==t.iv&&null!=t.method&&(n=t),n}(o,t);if(A&&"AES-128"===A.method){var S=this.getDecrypter();if(!S.isSync())return this.decryptionPromise=S.webCryptoDecrypt(o,A.key.buffer,A.iv.buffer).then((function(e){var t=i.push(e,null,n);return i.decryptionPromise=null,t})),this.decryptionPromise;var C=S.softwareDecrypt(o,A.key.buffer,A.iv.buffer);if(n.part>-1&&(C=S.flush()),!C)return a.executeEnd=ai(),di(n);o=new Uint8Array(C)}var x=this.needsProbing(d,p);if(x){var P=this.configureTransmuxer(o);if(P)return w.warn("[transmuxer] "+P.message),this.observer.emit(b.ERROR,b.ERROR,{type:k.MEDIA_ERROR,details:E.FRAG_PARSING_ERROR,fatal:!1,error:P,reason:P.message}),a.executeEnd=ai(),di(n)}(d||p||y||x)&&this.resetInitSegment(T,g,v,_,t),(d||y||x)&&this.resetInitialTimestamp(m),c||this.resetContiguity();var R=this.transmux(o,A,h,f,n),I=this.currentTransmuxState;return I.contiguous=!0,I.discontinuity=!1,I.trackSwitch=!1,a.executeEnd=ai(),R},t.flush=function(e){var t=this,n=e.transmuxing;n.executeStart=ai();var r=this.decrypter,i=this.currentTransmuxState,a=this.decryptionPromise;if(a)return a.then((function(){return t.flush(e)}));var o=[],s=i.timeOffset;if(r){var l=r.flush();l&&o.push(this.push(l,null,e))}var u=this.demuxer,c=this.remuxer;if(!u||!c)return n.executeEnd=ai(),[di(e)];var d=u.flush(s);return pi(d)?d.then((function(n){return t.flushRemux(o,n,e),o})):(this.flushRemux(o,d,e),o)},t.flushRemux=function(e,t,n){var r=t.audioTrack,i=t.videoTrack,a=t.id3Track,o=t.textTrack,s=this.currentTransmuxState,l=s.accurateTimeOffset,u=s.timeOffset;w.log("[transmuxer.ts]: Flushed fragment "+n.sn+(n.part>-1?" p: "+n.part:"")+" of level "+n.level);var c=this.remuxer.remux(r,i,a,o,u,l,!0,this.id);e.push({remuxResult:c,chunkMeta:n}),n.transmuxing.executeEnd=ai()},t.resetInitialTimestamp=function(e){var t=this.demuxer,n=this.remuxer;t&&n&&(t.resetTimeStamp(e),n.resetTimeStamp(e))},t.resetContiguity=function(){var e=this.demuxer,t=this.remuxer;e&&t&&(e.resetContiguity(),t.resetNextTimestamp())},t.resetInitSegment=function(e,t,n,r,i){var a=this.demuxer,o=this.remuxer;a&&o&&(a.resetInitSegment(e,t,n,r),o.resetInitSegment(e,t,n,i))},t.destroy=function(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)},t.transmux=function(e,t,n,r,i){return t&&"SAMPLE-AES"===t.method?this.transmuxSampleAes(e,t,n,r,i):this.transmuxUnencrypted(e,n,r,i)},t.transmuxUnencrypted=function(e,t,n,r){var i=this.demuxer.demux(e,t,!1,!this.config.progressive),a=i.audioTrack,o=i.videoTrack,s=i.id3Track,l=i.textTrack;return{remuxResult:this.remuxer.remux(a,o,s,l,t,n,!1,this.id),chunkMeta:r}},t.transmuxSampleAes=function(e,t,n,r,i){var a=this;return this.demuxer.demuxSampleAes(e,t,n).then((function(e){return{remuxResult:a.remuxer.remux(e.audioTrack,e.videoTrack,e.id3Track,e.textTrack,n,r,!1,a.id),chunkMeta:i}}))},t.configureTransmuxer=function(e){for(var t,n=this.config,r=this.observer,i=this.typeSupported,a=this.vendor,o=0,s=ui.length;o<s;o++){var l;if(null!=(l=ui[o].demux)&&l.probe(e)){t=ui[o];break}}if(!t)return new Error("Failed to find demuxer by probing fragment data");var u=this.demuxer,c=this.remuxer,d=t.remux,p=t.demux;c&&c instanceof d||(this.remuxer=new d(r,n,i,a)),u&&u instanceof p||(this.demuxer=new p(r,n,i),this.probe=p.probe)},t.needsProbing=function(e,t){return!this.demuxer||!this.remuxer||e||t},t.getDecrypter=function(){var e=this.decrypter;return e||(e=this.decrypter=new Zn(this.config)),e},e}(),di=function(e){return{remuxResult:{},chunkMeta:e}};function pi(e){return"then"in e&&e.then instanceof Function}var fi=function(e,t,n,r,i){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=e,this.videoCodec=t,this.initSegmentData=n,this.duration=r,this.defaultInitPts=i||null},hi=function(e,t,n,r,i,a){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.initSegmentChange=void 0,this.discontinuity=e,this.contiguous=t,this.accurateTimeOffset=n,this.trackSwitch=r,this.timeOffset=i,this.initSegmentChange=a},yi={exports:{}};!function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}function i(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function a(e,t,r,a,o){if("function"!=typeof r)throw new TypeError("The listener must be a function");var s=new i(r,a||e,o),l=n?n+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],s]:e._events[l].push(s):(e._events[l]=s,e._eventsCount++),e}function o(e,t){0==--e._eventsCount?e._events=new r:delete e._events[t]}function s(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),s.prototype.eventNames=function(){var e,r,i=[];if(0===this._eventsCount)return i;for(r in e=this._events)t.call(e,r)&&i.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(e)):i},s.prototype.listeners=function(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var i=0,a=r.length,o=new Array(a);i<a;i++)o[i]=r[i].fn;return o},s.prototype.listenerCount=function(e){var t=n?n+e:e,r=this._events[t];return r?r.fn?1:r.length:0},s.prototype.emit=function(e,t,r,i,a,o){var s=n?n+e:e;if(!this._events[s])return!1;var l,u,c=this._events[s],d=arguments.length;if(c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),d){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,t),!0;case 3:return c.fn.call(c.context,t,r),!0;case 4:return c.fn.call(c.context,t,r,i),!0;case 5:return c.fn.call(c.context,t,r,i,a),!0;case 6:return c.fn.call(c.context,t,r,i,a,o),!0}for(u=1,l=new Array(d-1);u<d;u++)l[u-1]=arguments[u];c.fn.apply(c.context,l)}else{var p,f=c.length;for(u=0;u<f;u++)switch(c[u].once&&this.removeListener(e,c[u].fn,void 0,!0),d){case 1:c[u].fn.call(c[u].context);break;case 2:c[u].fn.call(c[u].context,t);break;case 3:c[u].fn.call(c[u].context,t,r);break;case 4:c[u].fn.call(c[u].context,t,r,i);break;default:if(!l)for(p=1,l=new Array(d-1);p<d;p++)l[p-1]=arguments[p];c[u].fn.apply(c[u].context,l)}}return!0},s.prototype.on=function(e,t,n){return a(this,e,t,n,!1)},s.prototype.once=function(e,t,n){return a(this,e,t,n,!0)},s.prototype.removeListener=function(e,t,r,i){var a=n?n+e:e;if(!this._events[a])return this;if(!t)return o(this,a),this;var s=this._events[a];if(s.fn)s.fn!==t||i&&!s.once||r&&s.context!==r||o(this,a);else{for(var l=0,u=[],c=s.length;l<c;l++)(s[l].fn!==t||i&&!s[l].once||r&&s[l].context!==r)&&u.push(s[l]);u.length?this._events[a]=1===u.length?u[0]:u:o(this,a)}return this},s.prototype.removeAllListeners=function(e){var t;return e?(t=n?n+e:e,this._events[t]&&o(this,t)):(this._events=new r,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=n,s.EventEmitter=s,e.exports=s}(yi);var gi=function(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}(yi.exports);function vi(e,t){if(!((n=t.remuxResult).audio||n.video||n.text||n.id3||n.initSegment))return!1;var n,r=[],i=t.remuxResult,a=i.audio,o=i.video;return a&&mi(r,a),o&&mi(r,o),e.postMessage({event:"transmuxComplete",data:t},r),!0}function mi(e,t){t.data1&&e.push(t.data1.buffer),t.data2&&e.push(t.data2.buffer)}function bi(e,t,n){t.reduce((function(t,n){return vi(e,n)||t}),!1)||e.postMessage({event:"transmuxComplete",data:t[0]}),e.postMessage({event:"flush",data:n})}void 0!==t&&t&&function(e){var t=new gi,n=function(t,n){e.postMessage({event:t,data:n})};t.on(b.FRAG_DECRYPTED,n),t.on(b.ERROR,n);e.addEventListener("message",(function(r){var i=r.data;switch(i.cmd){case"init":var a=JSON.parse(i.config);e.transmuxer=new ci(t,i.typeSupported,a,i.vendor,i.id),S(a.debug,i.id),function(){var e=function(e){w[e]=function(t){n("workerLog",{logType:e,message:t})}};for(var t in w)e(t)}(),n("init",null);break;case"configure":e.transmuxer.configure(i.config);break;case"demux":var o=e.transmuxer.push(i.data,i.decryptdata,i.chunkMeta,i.state);pi(o)?(e.transmuxer.async=!0,o.then((function(t){vi(e,t)})).catch((function(e){n(b.ERROR,{type:k.MEDIA_ERROR,details:E.FRAG_PARSING_ERROR,chunkMeta:i.chunkMeta,fatal:!1,error:e,err:e,reason:"transmuxer-worker push error"})}))):(e.transmuxer.async=!1,vi(e,o));break;case"flush":var s=i.chunkMeta,l=e.transmuxer.flush(s);pi(l)||e.transmuxer.async?(pi(l)||(l=Promise.resolve(l)),l.then((function(t){bi(e,t,s)})).catch((function(e){n(b.ERROR,{type:k.MEDIA_ERROR,details:E.FRAG_PARSING_ERROR,chunkMeta:i.chunkMeta,fatal:!1,error:e,err:e,reason:"transmuxer-worker flush error"})}))):bi(e,l,s)}}))}(self);var ki=function(){function t(t,n,r,i){var a=this;this.error=null,this.hls=void 0,this.id=void 0,this.observer=void 0,this.frag=null,this.part=null,this.useWorker=void 0,this.workerContext=null,this.onwmsg=void 0,this.transmuxer=null,this.onTransmuxComplete=void 0,this.onFlush=void 0;var o=t.config;this.hls=t,this.id=n,this.useWorker=!!o.enableWorker,this.onTransmuxComplete=r,this.onFlush=i;var s=function(e,t){(t=t||{}).frag=a.frag,t.id=a.id,e===b.ERROR&&(a.error=t.error),a.hls.trigger(e,t)};this.observer=new gi,this.observer.on(b.FRAG_DECRYPTED,s),this.observer.on(b.ERROR,s);var l,u,c,d,p=qe(o.preferManagedMediaSource)||{isTypeSupported:function(){return!1}},f={mpeg:p.isTypeSupported("audio/mpeg"),mp3:p.isTypeSupported('audio/mp4; codecs="mp3"'),ac3:p.isTypeSupported('audio/mp4; codecs="ac-3"')},h=navigator.vendor;if(!this.useWorker||"undefined"==typeof Worker||(o.workerPath,0))this.transmuxer=new ci(this.observer,f,o,h,n);else try{o.workerPath?(w.log("loading Web Worker "+o.workerPath+' for "'+n+'"'),this.workerContext=(c=o.workerPath,d=new self.URL(c,self.location.href).href,{worker:new self.Worker(d),scriptURL:d})):(w.log('injecting Web Worker for "'+n+'"'),this.workerContext=(l=new self.Blob(["var exports={};var module={exports:exports};function define(f){f()};define.amd=true;("+e.toString()+")(true);"],{type:"text/javascript"}),u=self.URL.createObjectURL(l),{worker:new self.Worker(u),objectURL:u})),this.onwmsg=function(e){return a.onWorkerMessage(e)};var y=this.workerContext.worker;y.addEventListener("message",this.onwmsg),y.onerror=function(e){var t=new Error(e.message+"  ("+e.filename+":"+e.lineno+")");o.enableWorker=!1,w.warn('Error in "'+n+'" Web Worker, fallback to inline'),a.hls.trigger(b.ERROR,{type:k.OTHER_ERROR,details:E.INTERNAL_EXCEPTION,fatal:!1,event:"demuxerWorker",error:t})},y.postMessage({cmd:"init",typeSupported:f,vendor:h,id:n,config:JSON.stringify(o)})}catch(e){w.warn('Error setting up "'+n+'" Web Worker, fallback to inline',e),this.resetWorker(),this.error=null,this.transmuxer=new ci(this.observer,f,o,h,n)}}var n=t.prototype;return n.resetWorker=function(){if(this.workerContext){var e=this.workerContext,t=e.worker,n=e.objectURL;n&&self.URL.revokeObjectURL(n),t.removeEventListener("message",this.onwmsg),t.onerror=null,t.terminate(),this.workerContext=null}},n.destroy=function(){if(this.workerContext)this.resetWorker(),this.onwmsg=void 0;else{var e=this.transmuxer;e&&(e.destroy(),this.transmuxer=null)}var t=this.observer;t&&t.removeAllListeners(),this.frag=null,this.observer=null,this.hls=null},n.push=function(e,t,n,r,i,a,o,s,l,u){var c,d,p=this;l.transmuxing.start=self.performance.now();var f=this.transmuxer,h=a?a.start:i.start,y=i.decryptdata,g=this.frag,v=!(g&&i.cc===g.cc),m=!(g&&l.level===g.level),b=g?l.sn-g.sn:-1,k=this.part?l.part-this.part.index:-1,E=0===b&&l.id>1&&l.id===(null==g?void 0:g.stats.chunkCount),_=!m&&(1===b||0===b&&(1===k||E&&k<=0)),T=self.performance.now();(m||b||0===i.stats.parsing.start)&&(i.stats.parsing.start=T),!a||!k&&_||(a.stats.parsing.start=T);var A=!(g&&(null==(c=i.initSegment)?void 0:c.url)===(null==(d=g.initSegment)?void 0:d.url)),S=new hi(v,_,s,m,h,A);if(!_||v||A){w.log("[transmuxer-interface, "+i.type+"]: Starting new transmux session for sn: "+l.sn+" p: "+l.part+" level: "+l.level+" id: "+l.id+"\n        discontinuity: "+v+"\n        trackSwitch: "+m+"\n        contiguous: "+_+"\n        accurateTimeOffset: "+s+"\n        timeOffset: "+h+"\n        initSegmentChange: "+A);var C=new fi(n,r,t,o,u);this.configureTransmuxer(C)}if(this.frag=i,this.part=a,this.workerContext)this.workerContext.worker.postMessage({cmd:"demux",data:e,decryptdata:y,chunkMeta:l,state:S},e instanceof ArrayBuffer?[e]:[]);else if(f){var x=f.push(e,y,l,S);pi(x)?(f.async=!0,x.then((function(e){p.handleTransmuxComplete(e)})).catch((function(e){p.transmuxerError(e,l,"transmuxer-interface push error")}))):(f.async=!1,this.handleTransmuxComplete(x))}},n.flush=function(e){var t=this;e.transmuxing.start=self.performance.now();var n=this.transmuxer;if(this.workerContext)this.workerContext.worker.postMessage({cmd:"flush",chunkMeta:e});else if(n){var r=n.flush(e);pi(r)||n.async?(pi(r)||(r=Promise.resolve(r)),r.then((function(n){t.handleFlushResult(n,e)})).catch((function(n){t.transmuxerError(n,e,"transmuxer-interface flush error")}))):this.handleFlushResult(r,e)}},n.transmuxerError=function(e,t,n){this.hls&&(this.error=e,this.hls.trigger(b.ERROR,{type:k.MEDIA_ERROR,details:E.FRAG_PARSING_ERROR,chunkMeta:t,fatal:!1,error:e,err:e,reason:n}))},n.handleFlushResult=function(e,t){var n=this;e.forEach((function(e){n.handleTransmuxComplete(e)})),this.onFlush(t)},n.onWorkerMessage=function(e){var t=e.data,n=this.hls;switch(t.event){case"init":var r,i=null==(r=this.workerContext)?void 0:r.objectURL;i&&self.URL.revokeObjectURL(i);break;case"transmuxComplete":this.handleTransmuxComplete(t.data);break;case"flush":this.onFlush(t.data);break;case"workerLog":w[t.data.logType]&&w[t.data.logType](t.data.message);break;default:t.data=t.data||{},t.data.frag=this.frag,t.data.id=this.id,n.trigger(t.event,t.data)}},n.configureTransmuxer=function(e){var t=this.transmuxer;this.workerContext?this.workerContext.worker.postMessage({cmd:"configure",config:e}):t&&t.configure(e)},n.handleTransmuxComplete=function(e){e.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(e)},t}();function Ei(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!_i(e[n].attrs,t[n].attrs))return!1;return!0}function _i(e,t,n){var r=e["STABLE-RENDITION-ID"];return r&&!n?r===t["STABLE-RENDITION-ID"]:!(n||["LANGUAGE","NAME","CHARACTERISTICS","AUTOSELECT","DEFAULT","FORCED","ASSOC-LANGUAGE"]).some((function(n){return e[n]!==t[n]}))}function Ti(e,t){return t.label.toLowerCase()===e.name.toLowerCase()&&(!t.language||t.language.toLowerCase()===(e.lang||"").toLowerCase())}var Ai=function(e){function t(t,n,r){var i;return(i=e.call(this,t,n,r,"[audio-stream-controller]",At)||this).videoBuffer=null,i.videoTrackCC=-1,i.waitingVideoCC=-1,i.bufferedTrack=null,i.switchingTrack=null,i.trackId=-1,i.waitingData=null,i.mainDetails=null,i.flushing=!1,i.bufferFlushed=!1,i.cachedTrackLoadedData=null,i._registerListeners(),i}l(t,e);var n=t.prototype;return n.onHandlerDestroying=function(){this._unregisterListeners(),e.prototype.onHandlerDestroying.call(this),this.mainDetails=null,this.bufferedTrack=null,this.switchingTrack=null},n._registerListeners=function(){var e=this.hls;e.on(b.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(b.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(b.MANIFEST_LOADING,this.onManifestLoading,this),e.on(b.LEVEL_LOADED,this.onLevelLoaded,this),e.on(b.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),e.on(b.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(b.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.on(b.ERROR,this.onError,this),e.on(b.BUFFER_RESET,this.onBufferReset,this),e.on(b.BUFFER_CREATED,this.onBufferCreated,this),e.on(b.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(b.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(b.INIT_PTS_FOUND,this.onInitPtsFound,this),e.on(b.FRAG_BUFFERED,this.onFragBuffered,this)},n._unregisterListeners=function(){var e=this.hls;e.off(b.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(b.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(b.MANIFEST_LOADING,this.onManifestLoading,this),e.off(b.LEVEL_LOADED,this.onLevelLoaded,this),e.off(b.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),e.off(b.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(b.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.off(b.ERROR,this.onError,this),e.off(b.BUFFER_RESET,this.onBufferReset,this),e.off(b.BUFFER_CREATED,this.onBufferCreated,this),e.off(b.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(b.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(b.INIT_PTS_FOUND,this.onInitPtsFound,this),e.off(b.FRAG_BUFFERED,this.onFragBuffered,this)},n.onInitPtsFound=function(e,t){var n=t.frag,r=t.id,i=t.initPTS,a=t.timescale;if("main"===r){var o=n.cc;this.initPTS[n.cc]={baseTime:i,timescale:a},this.log("InitPTS for cc: "+o+" found from main: "+i),this.videoTrackCC=o,this.state===ar&&this.tick()}},n.startLoad=function(e){if(!this.levels)return this.startPosition=e,void(this.state=qn);var t=this.lastCurrentTime;this.stopLoad(),this.setInterval(100),t>0&&-1===e?(this.log("Override startPosition with lastCurrentTime @"+t.toFixed(3)),e=t,this.state=Xn):(this.loadedmetadata=!1,this.state=er),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=e,this.tick()},n.doTick=function(){switch(this.state){case Xn:this.doTickIdle();break;case er:var t,n=this.levels,r=this.trackId,i=null==n||null==(t=n[r])?void 0:t.details;if(i){if(this.waitForCdnTuneIn(i))break;this.state=ar}break;case Jn:var a,o=performance.now(),s=this.retryDate;if(!s||o>=s||null!=(a=this.media)&&a.seeking){var l=this.levels,u=this.trackId;this.log("RetryDate reached, switch back to IDLE state"),this.resetStartWhenNotLoaded((null==l?void 0:l[u])||null),this.state=Xn}break;case ar:var c=this.waitingData;if(c){var d=c.frag,p=c.part,f=c.cache,h=c.complete;if(void 0!==this.initPTS[d.cc]){this.waitingData=null,this.waitingVideoCC=-1,this.state=$n;var y={frag:d,part:p,payload:f.flush(),networkDetails:null};this._handleFragmentLoadProgress(y),h&&e.prototype._handleFragmentLoadComplete.call(this,y)}else if(this.videoTrackCC!==this.waitingVideoCC)this.log("Waiting fragment cc ("+d.cc+") cancelled because video is at cc "+this.videoTrackCC),this.clearWaitingFragment();else{var g=this.getLoadPosition(),v=Ln.bufferInfo(this.mediaBuffer,g,this.config.maxBufferHole);cn(v.end,this.config.maxFragLookUpTolerance,d)<0&&(this.log("Waiting fragment cc ("+d.cc+") @ "+d.start+" cancelled because another fragment at "+v.end+" is needed"),this.clearWaitingFragment())}}else this.state=Xn}this.onTickEnd()},n.clearWaitingFragment=function(){var e=this.waitingData;e&&(this.fragmentTracker.removeFragment(e.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=Xn)},n.resetLoadingState=function(){this.clearWaitingFragment(),e.prototype.resetLoadingState.call(this)},n.onTickEnd=function(){var e=this.media;null!=e&&e.readyState&&(this.lastCurrentTime=e.currentTime)},n.doTickIdle=function(){var e=this.hls,t=this.levels,n=this.media,r=this.trackId,i=e.config;if((n||!this.startFragRequested&&i.startFragPrefetch)&&null!=t&&t[r]){var a=t[r],o=a.details;if(!o||o.live&&this.levelLastLoaded!==a||this.waitForCdnTuneIn(o))this.state=er;else{var s=this.mediaBuffer?this.mediaBuffer:this.media;this.bufferFlushed&&s&&(this.bufferFlushed=!1,this.afterBufferFlushed(s,O,At));var l=this.getFwdBufferInfo(s,At);if(null!==l){var u=this.bufferedTrack,c=this.switchingTrack;if(!c&&this._streamEnded(l,o))return e.trigger(b.BUFFER_EOS,{type:"audio"}),void(this.state=rr);var d=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,Tt),p=l.len,f=this.getMaxBufferLength(null==d?void 0:d.len),h=o.fragments,y=h[0].start,g=this.flushing?this.getLoadPosition():l.end;if(c&&n){var v=this.getLoadPosition();u&&!_i(c.attrs,u.attrs)&&(g=v),o.PTSKnown&&v<y&&(l.end>y||l.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),n.currentTime=y+.05)}if(!(p>=f&&!c&&g<h[h.length-1].start)){var m=this.getNextFragment(g,o),k=!1;if(m&&this.isLoopLoading(m,g)&&(k=!!m.gap,m=this.getNextFragmentLoopLoading(m,o,l,Tt,f)),m){var E=d&&m.start>d.end+o.targetduration;if(E||(null==d||!d.len)&&l.len){var _=this.getAppendedFrag(m.start,Tt);if(null===_)return;if(k||(k=!!_.gap||!!E&&0===d.len),E&&!k||k&&l.nextStart&&l.nextStart<_.end)return}this.loadFragment(m,a,g)}else this.bufferFlushed=!0}}}}},n.getMaxBufferLength=function(t){var n=e.prototype.getMaxBufferLength.call(this);return t?Math.min(Math.max(n,t),this.config.maxMaxBufferLength):n},n.onMediaDetaching=function(){this.videoBuffer=null,this.bufferFlushed=this.flushing=!1,e.prototype.onMediaDetaching.call(this)},n.onAudioTracksUpdated=function(e,t){var n=t.audioTracks;this.resetTransmuxer(),this.levels=n.map((function(e){return new Wt(e)}))},n.onAudioTrackSwitching=function(e,t){var n=!!t.url;this.trackId=t.id;var r=this.fragCurrent;r&&(r.abortRequests(),this.removeUnbufferedFrags(r.start)),this.resetLoadingState(),n?this.setInterval(100):this.resetTransmuxer(),n?(this.switchingTrack=t,this.state=Xn,this.flushAudioIfNeeded(t)):(this.switchingTrack=null,this.bufferedTrack=t,this.state=qn),this.tick()},n.onManifestLoading=function(){this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0,this.bufferFlushed=this.flushing=!1,this.levels=this.mainDetails=this.waitingData=this.bufferedTrack=this.cachedTrackLoadedData=this.switchingTrack=null,this.startFragRequested=!1,this.trackId=this.videoTrackCC=this.waitingVideoCC=-1},n.onLevelLoaded=function(e,t){this.mainDetails=t.details,null!==this.cachedTrackLoadedData&&(this.hls.trigger(b.AUDIO_TRACK_LOADED,this.cachedTrackLoadedData),this.cachedTrackLoadedData=null)},n.onAudioTrackLoaded=function(e,t){var n;if(null!=this.mainDetails){var r=this.levels,i=t.details,a=t.id;if(r){this.log("Audio track "+a+" loaded ["+i.startSN+","+i.endSN+"]"+(i.lastPartSn?"[part-"+i.lastPartSn+"-"+i.lastPartIndex+"]":"")+",duration:"+i.totalduration);var o=r[a],s=0;if(i.live||null!=(n=o.details)&&n.live){this.checkLiveUpdate(i);var l,u=this.mainDetails;if(i.deltaUpdateFailed||!u)return;!o.details&&i.hasProgramDateTime&&u.hasProgramDateTime?(Fn(i,u),s=i.fragments[0].start):s=this.alignPlaylists(i,o.details,null==(l=this.levelLastLoaded)?void 0:l.details)}o.details=i,this.levelLastLoaded=o,this.startFragRequested||!this.mainDetails&&i.live||this.setStartPosition(this.mainDetails||i,s),this.state!==er||this.waitForCdnTuneIn(i)||(this.state=Xn),this.tick()}else this.warn("Audio tracks were reset while loading level "+a)}else this.cachedTrackLoadedData=t},n._handleFragmentLoadProgress=function(e){var t,n=e.frag,r=e.part,i=e.payload,a=this.config,o=this.trackId,s=this.levels;if(s){var l=s[o];if(l){var u=l.details;if(!u)return this.warn("Audio track details undefined on fragment load progress"),void this.removeUnbufferedFrags(n.start);var c=a.defaultAudioCodec||l.audioCodec||"mp4a.40.2",d=this.transmuxer;d||(d=this.transmuxer=new ki(this.hls,At,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));var p=this.initPTS[n.cc],f=null==(t=n.initSegment)?void 0:t.data;if(void 0!==p){var h=r?r.index:-1,y=-1!==h,g=new Mn(n.level,n.sn,n.stats.chunkCount,i.byteLength,h,y);d.push(i,f,c,"",n,r,u.totalduration,!1,g,p)}else this.log("Unknown video PTS for cc "+n.cc+", waiting for video PTS before demuxing audio frag "+n.sn+" of ["+u.startSN+" ,"+u.endSN+"],track "+o),(this.waitingData=this.waitingData||{frag:n,part:r,cache:new lr,complete:!1}).cache.push(new Uint8Array(i)),this.waitingVideoCC=this.videoTrackCC,this.state=ar}else this.warn("Audio track is undefined on fragment load progress")}else this.warn("Audio tracks were reset while fragment load was in progress. Fragment "+n.sn+" of level "+n.level+" will not be buffered")},n._handleFragmentLoadComplete=function(t){this.waitingData?this.waitingData.complete=!0:e.prototype._handleFragmentLoadComplete.call(this,t)},n.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},n.onBufferCreated=function(e,t){var n=t.tracks.audio;n&&(this.mediaBuffer=n.buffer||null),t.tracks.video&&(this.videoBuffer=t.tracks.video.buffer||null)},n.onFragBuffered=function(e,t){var n=t.frag,i=t.part;if(n.type===At)if(this.fragContextChanged(n))this.warn("Fragment "+n.sn+(i?" p: "+i.index:"")+" of level "+n.level+" finished buffering, but was aborted. state: "+this.state+", audioSwitch: "+(this.switchingTrack?this.switchingTrack.name:"false"));else{if("initSegment"!==n.sn){this.fragPrevious=n;var a=this.switchingTrack;a&&(this.bufferedTrack=a,this.switchingTrack=null,this.hls.trigger(b.AUDIO_TRACK_SWITCHED,r({},a)))}this.fragBufferedComplete(n,i)}else if(!this.loadedmetadata&&n.type===Tt){var o=this.videoBuffer||this.media;o&&Ln.getBuffered(o).length&&(this.loadedmetadata=!0)}},n.onError=function(t,n){var r;if(n.fatal)this.state=ir;else switch(n.details){case E.FRAG_GAP:case E.FRAG_PARSING_ERROR:case E.FRAG_DECRYPT_ERROR:case E.FRAG_LOAD_ERROR:case E.FRAG_LOAD_TIMEOUT:case E.KEY_LOAD_ERROR:case E.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(At,n);break;case E.AUDIO_TRACK_LOAD_ERROR:case E.AUDIO_TRACK_LOAD_TIMEOUT:case E.LEVEL_PARSING_ERROR:n.levelRetry||this.state!==er||(null==(r=n.context)?void 0:r.type)!==Et||(this.state=Xn);break;case E.BUFFER_APPEND_ERROR:case E.BUFFER_FULL_ERROR:if(!n.parent||"audio"!==n.parent)return;if(n.details===E.BUFFER_APPEND_ERROR)return void this.resetLoadingState();this.reduceLengthAndFlushBuffer(n)&&(this.bufferedTrack=null,e.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio"));break;case E.INTERNAL_EXCEPTION:this.recoverWorkerError(n)}},n.onBufferFlushing=function(e,t){t.type!==L&&(this.flushing=!0)},n.onBufferFlushed=function(e,t){var n=t.type;if(n!==L){this.flushing=!1,this.bufferFlushed=!0,this.state===rr&&(this.state=Xn);var r=this.mediaBuffer||this.media;r&&(this.afterBufferFlushed(r,n,At),this.tick())}},n._handleTransmuxComplete=function(e){var t,n="audio",r=this.hls,i=e.remuxResult,a=e.chunkMeta,o=this.getCurrentContext(a);if(o){var l=o.frag,u=o.part,c=o.level,d=c.details,p=i.audio,f=i.text,h=i.id3,y=i.initSegment;if(!this.fragContextChanged(l)&&d){if(this.state=tr,this.switchingTrack&&p&&this.completeAudioSwitch(this.switchingTrack),null!=y&&y.tracks){var g=l.initSegment||l;this._bufferInitSegment(c,y.tracks,g,a),r.trigger(b.FRAG_PARSING_INIT_SEGMENT,{frag:g,id:n,tracks:y.tracks})}if(p){var v=p.startPTS,m=p.endPTS,k=p.startDTS,E=p.endDTS;u&&(u.elementaryStreams[O]={startPTS:v,endPTS:m,startDTS:k,endDTS:E}),l.setElementaryStreamInfo(O,v,m,k,E),this.bufferFragmentData(p,l,u,a)}if(null!=h&&null!=(t=h.samples)&&t.length){var _=s({id:n,frag:l,details:d},h);r.trigger(b.FRAG_PARSING_METADATA,_)}if(f){var T=s({id:n,frag:l,details:d},f);r.trigger(b.FRAG_PARSING_USERDATA,T)}}else this.fragmentTracker.removeFragment(l)}else this.resetWhenMissingContext(a)},n._bufferInitSegment=function(e,t,n,r){if(this.state===tr){t.video&&delete t.video;var i=t.audio;if(i){i.id="audio";var a=e.audioCodec;this.log("Init audio buffer, container:"+i.container+", codecs[level/parsed]=["+a+"/"+i.codec+"]"),a&&1===a.split(",").length&&(i.levelCodec=a),this.hls.trigger(b.BUFFER_CODECS,t);var o=i.initSegment;if(null!=o&&o.byteLength){var s={type:"audio",frag:n,part:null,chunkMeta:r,parent:n.type,data:o};this.hls.trigger(b.BUFFER_APPENDING,s)}this.tickImmediate()}}},n.loadFragment=function(t,n,r){var i,a=this.fragmentTracker.getState(t);if(this.fragCurrent=t,this.switchingTrack||a===wn||a===xn)if("initSegment"===t.sn)this._loadInitSegment(t,n);else if(null!=(i=n.details)&&i.live&&!this.initPTS[t.cc]){this.log("Waiting for video PTS in continuity counter "+t.cc+" of live stream before loading audio fragment "+t.sn+" of level "+this.trackId),this.state=ar;var o=this.mainDetails;o&&o.fragments[0].start!==n.details.fragments[0].start&&Fn(n.details,o)}else this.startFragRequested=!0,e.prototype.loadFragment.call(this,t,n,r);else this.clearTrackerIfNeeded(t)},n.flushAudioIfNeeded=function(t){var n=this.media,r=this.bufferedTrack,i=null==r?void 0:r.attrs,a=t.attrs;n&&i&&(i.CHANNELS!==a.CHANNELS||r.name!==t.name||r.lang!==t.lang)&&(this.log("Switching audio track : flushing all audio"),e.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio"),this.bufferedTrack=null)},n.completeAudioSwitch=function(e){var t=this.hls;this.flushAudioIfNeeded(e),this.bufferedTrack=e,this.switchingTrack=null,t.trigger(b.AUDIO_TRACK_SWITCHED,r({},e))},t}(sr),Si=function(e){function t(t){var n;return(n=e.call(this,t,"[audio-track-controller]")||this).tracks=[],n.groupIds=null,n.tracksInGroup=[],n.trackId=-1,n.currentTrack=null,n.selectDefaultTrack=!0,n.registerListeners(),n}l(t,e);var n=t.prototype;return n.registerListeners=function(){var e=this.hls;e.on(b.MANIFEST_LOADING,this.onManifestLoading,this),e.on(b.MANIFEST_PARSED,this.onManifestParsed,this),e.on(b.LEVEL_LOADING,this.onLevelLoading,this),e.on(b.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(b.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.on(b.ERROR,this.onError,this)},n.unregisterListeners=function(){var e=this.hls;e.off(b.MANIFEST_LOADING,this.onManifestLoading,this),e.off(b.MANIFEST_PARSED,this.onManifestParsed,this),e.off(b.LEVEL_LOADING,this.onLevelLoading,this),e.off(b.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(b.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.off(b.ERROR,this.onError,this)},n.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.currentTrack=null,e.prototype.destroy.call(this)},n.onManifestLoading=function(){this.tracks=[],this.tracksInGroup=[],this.groupIds=null,this.currentTrack=null,this.trackId=-1,this.selectDefaultTrack=!0},n.onManifestParsed=function(e,t){this.tracks=t.audioTracks||[]},n.onAudioTrackLoaded=function(e,t){var n=t.id,r=t.groupId,i=t.details,a=this.tracksInGroup[n];if(a&&a.groupId===r){var o=a.details;a.details=t.details,this.log("Audio track "+n+' "'+a.name+'" lang:'+a.lang+" group:"+r+" loaded ["+i.startSN+"-"+i.endSN+"]"),n===this.trackId&&this.playlistLoaded(n,t,o)}else this.warn("Audio track with id:"+n+" and group:"+r+" not found in active group "+(null==a?void 0:a.groupId))},n.onLevelLoading=function(e,t){this.switchLevel(t.level)},n.onLevelSwitching=function(e,t){this.switchLevel(t.level)},n.switchLevel=function(e){var t=this.hls.levels[e];if(t){var n=t.audioGroups||null,r=this.groupIds,i=this.currentTrack;if(!n||(null==r?void 0:r.length)!==(null==n?void 0:n.length)||null!=n&&n.some((function(e){return-1===(null==r?void 0:r.indexOf(e))}))){this.groupIds=n,this.trackId=-1,this.currentTrack=null;var a=this.tracks.filter((function(e){return!n||-1!==n.indexOf(e.groupId)}));if(a.length)this.selectDefaultTrack&&!a.some((function(e){return e.default}))&&(this.selectDefaultTrack=!1),a.forEach((function(e,t){e.id=t}));else if(!i&&!this.tracksInGroup.length)return;this.tracksInGroup=a;var o=this.hls.config.audioPreference;if(!i&&o){var s=kn(o,a,_n);if(s>-1)i=a[s];else{var l=kn(o,this.tracks);i=this.tracks[l]}}var u=this.findTrackId(i);-1===u&&i&&(u=this.findTrackId(null));var c={audioTracks:a};this.log("Updating audio tracks, "+a.length+" track(s) found in group(s): "+(null==n?void 0:n.join(","))),this.hls.trigger(b.AUDIO_TRACKS_UPDATED,c);var d=this.trackId;if(-1!==u&&-1===d)this.setAudioTrack(u);else if(a.length&&-1===d){var p,f=new Error("No audio track selected for current audio group-ID(s): "+(null==(p=this.groupIds)?void 0:p.join(","))+" track count: "+a.length);this.warn(f.message),this.hls.trigger(b.ERROR,{type:k.MEDIA_ERROR,details:E.AUDIO_TRACK_LOAD_ERROR,fatal:!0,error:f})}}else this.shouldReloadPlaylist(i)&&this.setAudioTrack(this.trackId)}},n.onError=function(e,t){!t.fatal&&t.context&&(t.context.type!==Et||t.context.id!==this.trackId||this.groupIds&&-1===this.groupIds.indexOf(t.context.groupId)||(this.requestScheduled=-1,this.checkRetry(t)))},n.setAudioOption=function(e){var t=this.hls;if(t.config.audioPreference=e,e){var n=this.allAudioTracks;if(this.selectDefaultTrack=!1,n.length){var r=this.currentTrack;if(r&&En(e,r,_n))return r;var i=kn(e,this.tracksInGroup,_n);if(i>-1){var a=this.tracksInGroup[i];return this.setAudioTrack(i),a}if(r){var o=t.loadLevel;-1===o&&(o=t.firstAutoLevel);var s=function(e,t,n,r,i){var a=t[r],o=t.reduce((function(e,t,n){var r=t.uri;return(e[r]||(e[r]=[])).push(n),e}),{})[a.uri];o.length>1&&(r=Math.max.apply(Math,o));var s=a.videoRange,l=a.frameRate,u=a.codecSet.substring(0,4),c=Tn(t,r,(function(t){if(t.videoRange!==s||t.frameRate!==l||t.codecSet.substring(0,4)!==u)return!1;var r=t.audioGroups,a=n.filter((function(e){return!r||-1!==r.indexOf(e.groupId)}));return kn(e,a,i)>-1}));return c>-1?c:Tn(t,r,(function(t){var r=t.audioGroups,a=n.filter((function(e){return!r||-1!==r.indexOf(e.groupId)}));return kn(e,a,i)>-1}))}(e,t.levels,n,o,_n);if(-1===s)return null;t.nextLoadLevel=s}if(e.channels||e.audioCodec){var l=kn(e,n);if(l>-1)return n[l]}}}return null},n.setAudioTrack=function(e){var t=this.tracksInGroup;if(e<0||e>=t.length)this.warn("Invalid audio track id: "+e);else{this.clearTimer(),this.selectDefaultTrack=!1;var n=this.currentTrack,i=t[e],a=i.details&&!i.details.live;if(!(e===this.trackId&&i===n&&a||(this.log("Switching to audio-track "+e+' "'+i.name+'" lang:'+i.lang+" group:"+i.groupId+" channels:"+i.channels),this.trackId=e,this.currentTrack=i,this.hls.trigger(b.AUDIO_TRACK_SWITCHING,r({},i)),a))){var o=this.switchParams(i.url,null==n?void 0:n.details,i.details);this.loadPlaylist(o)}}},n.findTrackId=function(e){for(var t=this.tracksInGroup,n=0;n<t.length;n++){var r=t[n];if((!this.selectDefaultTrack||r.default)&&(!e||En(e,r,_n)))return n}if(e){for(var i=e.name,a=e.lang,o=e.assocLang,s=e.characteristics,l=e.audioCodec,u=e.channels,c=0;c<t.length;c++)if(En({name:i,lang:a,assocLang:o,characteristics:s,audioCodec:l,channels:u},t[c],_n))return c;for(var d=0;d<t.length;d++){var p=t[d];if(_i(e.attrs,p.attrs,["LANGUAGE","ASSOC-LANGUAGE","CHARACTERISTICS"]))return d}for(var f=0;f<t.length;f++){var h=t[f];if(_i(e.attrs,h.attrs,["LANGUAGE"]))return f}}return-1},n.loadPlaylist=function(t){var n=this.currentTrack;if(this.shouldLoadPlaylist(n)&&n){e.prototype.loadPlaylist.call(this);var r=n.id,i=n.groupId,a=n.url;if(t)try{a=t.addDirectives(a)}catch(e){this.warn("Could not construct new URL with HLS Delivery Directives: "+e)}this.log("loading audio-track playlist "+r+' "'+n.name+'" lang:'+n.lang+" group:"+i),this.clearTimer(),this.hls.trigger(b.AUDIO_TRACK_LOADING,{url:a,id:r,groupId:i,deliveryDirectives:t||null})}},o(t,[{key:"allAudioTracks",get:function(){return this.tracks}},{key:"audioTracks",get:function(){return this.tracksInGroup}},{key:"audioTrack",get:function(){return this.trackId},set:function(e){this.selectDefaultTrack=!1,this.setAudioTrack(e)}}]),t}(fn),wi=function(e){function t(t,n,r){var i;return(i=e.call(this,t,n,r,"[subtitle-stream-controller]",St)||this).currentTrackId=-1,i.tracksBuffered=[],i.mainDetails=null,i._registerListeners(),i}l(t,e);var n=t.prototype;return n.onHandlerDestroying=function(){this._unregisterListeners(),e.prototype.onHandlerDestroying.call(this),this.mainDetails=null},n._registerListeners=function(){var e=this.hls;e.on(b.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(b.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(b.MANIFEST_LOADING,this.onManifestLoading,this),e.on(b.LEVEL_LOADED,this.onLevelLoaded,this),e.on(b.ERROR,this.onError,this),e.on(b.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.on(b.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.on(b.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.on(b.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),e.on(b.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(b.FRAG_BUFFERED,this.onFragBuffered,this)},n._unregisterListeners=function(){var e=this.hls;e.off(b.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(b.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(b.MANIFEST_LOADING,this.onManifestLoading,this),e.off(b.LEVEL_LOADED,this.onLevelLoaded,this),e.off(b.ERROR,this.onError,this),e.off(b.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.off(b.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.off(b.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.off(b.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),e.off(b.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(b.FRAG_BUFFERED,this.onFragBuffered,this)},n.startLoad=function(e){this.stopLoad(),this.state=Xn,this.setInterval(500),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=e,this.tick()},n.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments()},n.onMediaDetaching=function(){this.tracksBuffered=[],e.prototype.onMediaDetaching.call(this)},n.onLevelLoaded=function(e,t){this.mainDetails=t.details},n.onSubtitleFragProcessed=function(e,t){var n=t.frag,r=t.success;if(this.fragPrevious=n,this.state=Xn,r){var i=this.tracksBuffered[this.currentTrackId];if(i){for(var a,o=n.start,s=0;s<i.length;s++)if(o>=i[s].start&&o<=i[s].end){a=i[s];break}var l=n.start+n.duration;a?a.end=l:(a={start:o,end:l},i.push(a)),this.fragmentTracker.fragBuffered(n),this.fragBufferedComplete(n,null)}}},n.onBufferFlushing=function(e,t){var n=t.startOffset,r=t.endOffset;if(0===n&&r!==Number.POSITIVE_INFINITY){var i=r-1;if(i<=0)return;t.endOffsetSubtitles=Math.max(0,i),this.tracksBuffered.forEach((function(e){for(var t=0;t<e.length;)if(e[t].end<=i)e.shift();else{if(!(e[t].start<i))break;e[t].start=i,t++}})),this.fragmentTracker.removeFragmentsInRange(n,i,St)}},n.onFragBuffered=function(e,t){var n;this.loadedmetadata||t.frag.type!==Tt||null!=(n=this.media)&&n.buffered.length&&(this.loadedmetadata=!0)},n.onError=function(e,t){var n=t.frag;(null==n?void 0:n.type)===St&&(this.fragCurrent&&this.fragCurrent.abortRequests(),this.state!==qn&&(this.state=Xn))},n.onSubtitleTracksUpdated=function(e,t){var n=this,r=t.subtitleTracks;this.levels&&Ei(this.levels,r)?this.levels=r.map((function(e){return new Wt(e)})):(this.tracksBuffered=[],this.levels=r.map((function(e){var t=new Wt(e);return n.tracksBuffered[t.id]=[],t})),this.fragmentTracker.removeFragmentsInRange(0,Number.POSITIVE_INFINITY,St),this.fragPrevious=null,this.mediaBuffer=null)},n.onSubtitleTrackSwitch=function(e,t){var n;if(this.currentTrackId=t.id,null!=(n=this.levels)&&n.length&&-1!==this.currentTrackId){var r=this.levels[this.currentTrackId];null!=r&&r.details?this.mediaBuffer=this.mediaBufferTimeRanges:this.mediaBuffer=null,r&&this.setInterval(500)}else this.clearInterval()},n.onSubtitleTrackLoaded=function(e,t){var n,r=this.currentTrackId,i=this.levels,a=t.details,o=t.id;if(i){var s=i[r];if(!(o>=i.length||o!==r)&&s){this.log("Subtitle track "+o+" loaded ["+a.startSN+","+a.endSN+"]"+(a.lastPartSn?"[part-"+a.lastPartSn+"-"+a.lastPartIndex+"]":"")+",duration:"+a.totalduration),this.mediaBuffer=this.mediaBufferTimeRanges;var l=0;if(a.live||null!=(n=s.details)&&n.live){var u=this.mainDetails;if(a.deltaUpdateFailed||!u)return;var c,d=u.fragments[0];s.details?0===(l=this.alignPlaylists(a,s.details,null==(c=this.levelLastLoaded)?void 0:c.details))&&d&&$t(a,l=d.start):a.hasProgramDateTime&&u.hasProgramDateTime?(Fn(a,u),l=a.fragments[0].start):d&&$t(a,l=d.start)}s.details=a,this.levelLastLoaded=s,this.startFragRequested||!this.mainDetails&&a.live||this.setStartPosition(this.mainDetails||a,l),this.tick(),a.live&&!this.fragCurrent&&this.media&&this.state===Xn&&(un(null,a.fragments,this.media.currentTime,0)||(this.warn("Subtitle playlist not aligned with playback"),s.details=void 0))}}else this.warn("Subtitle tracks were reset while loading level "+o)},n._handleFragmentLoadComplete=function(e){var t=this,n=e.frag,r=e.payload,i=n.decryptdata,a=this.hls;if(!this.fragContextChanged(n)&&r&&r.byteLength>0&&null!=i&&i.key&&i.iv&&"AES-128"===i.method){var o=performance.now();this.decrypter.decrypt(new Uint8Array(r),i.key.buffer,i.iv.buffer).catch((function(e){throw a.trigger(b.ERROR,{type:k.MEDIA_ERROR,details:E.FRAG_DECRYPT_ERROR,fatal:!1,error:e,reason:e.message,frag:n}),e})).then((function(e){var t=performance.now();a.trigger(b.FRAG_DECRYPTED,{frag:n,payload:e,stats:{tstart:o,tdecrypt:t}})})).catch((function(e){t.warn(e.name+": "+e.message),t.state=Xn}))}},n.doTick=function(){if(this.media){if(this.state===Xn){var e=this.currentTrackId,t=this.levels,n=null==t?void 0:t[e];if(!n||!t.length||!n.details)return;var r=this.config,i=this.getLoadPosition(),a=Ln.bufferedInfo(this.tracksBuffered[this.currentTrackId]||[],i,r.maxBufferHole),o=a.end,s=a.len,l=this.getFwdBufferInfo(this.media,Tt),u=n.details;if(s>this.getMaxBufferLength(null==l?void 0:l.len)+u.levelTargetDuration)return;var c=u.fragments,d=c.length,p=u.edge,f=null,h=this.fragPrevious;if(o<p){var y=r.maxFragLookUpTolerance,g=o>p-y?0:y;!(f=un(h,c,Math.max(c[0].start,o),g))&&h&&h.start<c[0].start&&(f=c[0])}else f=c[d-1];if(!f)return;if("initSegment"!==(f=this.mapToInitFragWhenRequired(f)).sn){var v=c[f.sn-u.startSN-1];v&&v.cc===f.cc&&this.fragmentTracker.getState(v)===wn&&(f=v)}this.fragmentTracker.getState(f)===wn&&this.loadFragment(f,n,o)}}else this.state=Xn},n.getMaxBufferLength=function(t){var n=e.prototype.getMaxBufferLength.call(this);return t?Math.max(n,t):n},n.loadFragment=function(t,n,r){this.fragCurrent=t,"initSegment"===t.sn?this._loadInitSegment(t,n):(this.startFragRequested=!0,e.prototype.loadFragment.call(this,t,n,r))},o(t,[{key:"mediaBufferTimeRanges",get:function(){return new Ci(this.tracksBuffered[this.currentTrackId]||[])}}]),t}(sr),Ci=function(e){this.buffered=void 0;var t=function(t,n,r){if((n>>>=0)>r-1)throw new DOMException("Failed to execute '"+t+"' on 'TimeRanges': The index provided ("+n+") is greater than the maximum bound ("+r+")");return e[n][t]};this.buffered={get length(){return e.length},end:function(n){return t("end",n,e.length)},start:function(n){return t("start",n,e.length)}}},xi=function(e){function t(t){var n;return(n=e.call(this,t,"[subtitle-track-controller]")||this).media=null,n.tracks=[],n.groupIds=null,n.tracksInGroup=[],n.trackId=-1,n.currentTrack=null,n.selectDefaultTrack=!0,n.queuedDefaultTrack=-1,n.asyncPollTrackChange=function(){return n.pollTrackChange(0)},n.useTextTrackPolling=!1,n.subtitlePollingInterval=-1,n._subtitleDisplay=!0,n.onTextTracksChanged=function(){if(n.useTextTrackPolling||self.clearInterval(n.subtitlePollingInterval),n.media&&n.hls.config.renderTextTracksNatively){for(var e=null,t=Ot(n.media.textTracks),r=0;r<t.length;r++)if("hidden"===t[r].mode)e=t[r];else if("showing"===t[r].mode){e=t[r];break}var i=n.findTrackForTextTrack(e);n.subtitleTrack!==i&&n.setSubtitleTrack(i)}},n.registerListeners(),n}l(t,e);var n=t.prototype;return n.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.currentTrack=null,this.onTextTracksChanged=this.asyncPollTrackChange=null,e.prototype.destroy.call(this)},n.registerListeners=function(){var e=this.hls;e.on(b.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(b.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(b.MANIFEST_LOADING,this.onManifestLoading,this),e.on(b.MANIFEST_PARSED,this.onManifestParsed,this),e.on(b.LEVEL_LOADING,this.onLevelLoading,this),e.on(b.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(b.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.on(b.ERROR,this.onError,this)},n.unregisterListeners=function(){var e=this.hls;e.off(b.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(b.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(b.MANIFEST_LOADING,this.onManifestLoading,this),e.off(b.MANIFEST_PARSED,this.onManifestParsed,this),e.off(b.LEVEL_LOADING,this.onLevelLoading,this),e.off(b.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(b.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.off(b.ERROR,this.onError,this)},n.onMediaAttached=function(e,t){this.media=t.media,this.media&&(this.queuedDefaultTrack>-1&&(this.subtitleTrack=this.queuedDefaultTrack,this.queuedDefaultTrack=-1),this.useTextTrackPolling=!(this.media.textTracks&&"onchange"in this.media.textTracks),this.useTextTrackPolling?this.pollTrackChange(500):this.media.textTracks.addEventListener("change",this.asyncPollTrackChange))},n.pollTrackChange=function(e){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.onTextTracksChanged,e)},n.onMediaDetaching=function(){this.media&&(self.clearInterval(this.subtitlePollingInterval),this.useTextTrackPolling||this.media.textTracks.removeEventListener("change",this.asyncPollTrackChange),this.trackId>-1&&(this.queuedDefaultTrack=this.trackId),Ot(this.media.textTracks).forEach((function(e){It(e)})),this.subtitleTrack=-1,this.media=null)},n.onManifestLoading=function(){this.tracks=[],this.groupIds=null,this.tracksInGroup=[],this.trackId=-1,this.currentTrack=null,this.selectDefaultTrack=!0},n.onManifestParsed=function(e,t){this.tracks=t.subtitleTracks},n.onSubtitleTrackLoaded=function(e,t){var n=t.id,r=t.groupId,i=t.details,a=this.tracksInGroup[n];if(a&&a.groupId===r){var o=a.details;a.details=t.details,this.log("Subtitle track "+n+' "'+a.name+'" lang:'+a.lang+" group:"+r+" loaded ["+i.startSN+"-"+i.endSN+"]"),n===this.trackId&&this.playlistLoaded(n,t,o)}else this.warn("Subtitle track with id:"+n+" and group:"+r+" not found in active group "+(null==a?void 0:a.groupId))},n.onLevelLoading=function(e,t){this.switchLevel(t.level)},n.onLevelSwitching=function(e,t){this.switchLevel(t.level)},n.switchLevel=function(e){var t=this.hls.levels[e];if(t){var n=t.subtitleGroups||null,r=this.groupIds,i=this.currentTrack;if(!n||(null==r?void 0:r.length)!==(null==n?void 0:n.length)||null!=n&&n.some((function(e){return-1===(null==r?void 0:r.indexOf(e))}))){this.groupIds=n,this.trackId=-1,this.currentTrack=null;var a=this.tracks.filter((function(e){return!n||-1!==n.indexOf(e.groupId)}));if(a.length)this.selectDefaultTrack&&!a.some((function(e){return e.default}))&&(this.selectDefaultTrack=!1),a.forEach((function(e,t){e.id=t}));else if(!i&&!this.tracksInGroup.length)return;this.tracksInGroup=a;var o=this.hls.config.subtitlePreference;if(!i&&o){this.selectDefaultTrack=!1;var s=kn(o,a);if(s>-1)i=a[s];else{var l=kn(o,this.tracks);i=this.tracks[l]}}var u=this.findTrackId(i);-1===u&&i&&(u=this.findTrackId(null));var c={subtitleTracks:a};this.log("Updating subtitle tracks, "+a.length+' track(s) found in "'+(null==n?void 0:n.join(","))+'" group-id'),this.hls.trigger(b.SUBTITLE_TRACKS_UPDATED,c),-1!==u&&-1===this.trackId&&this.setSubtitleTrack(u)}else this.shouldReloadPlaylist(i)&&this.setSubtitleTrack(this.trackId)}},n.findTrackId=function(e){for(var t=this.tracksInGroup,n=this.selectDefaultTrack,r=0;r<t.length;r++){var i=t[r];if((!n||i.default)&&(n||e)&&(!e||En(i,e)))return r}if(e){for(var a=0;a<t.length;a++){var o=t[a];if(_i(e.attrs,o.attrs,["LANGUAGE","ASSOC-LANGUAGE","CHARACTERISTICS"]))return a}for(var s=0;s<t.length;s++){var l=t[s];if(_i(e.attrs,l.attrs,["LANGUAGE"]))return s}}return-1},n.findTrackForTextTrack=function(e){if(e)for(var t=this.tracksInGroup,n=0;n<t.length;n++)if(Ti(t[n],e))return n;return-1},n.onError=function(e,t){!t.fatal&&t.context&&(t.context.type!==_t||t.context.id!==this.trackId||this.groupIds&&-1===this.groupIds.indexOf(t.context.groupId)||this.checkRetry(t))},n.setSubtitleOption=function(e){if(this.hls.config.subtitlePreference=e,e){var t=this.allSubtitleTracks;if(this.selectDefaultTrack=!1,t.length){var n=this.currentTrack;if(n&&En(e,n))return n;var r=kn(e,this.tracksInGroup);if(r>-1){var i=this.tracksInGroup[r];return this.setSubtitleTrack(r),i}if(n)return null;var a=kn(e,t);if(a>-1)return t[a]}}return null},n.loadPlaylist=function(t){e.prototype.loadPlaylist.call(this);var n=this.currentTrack;if(this.shouldLoadPlaylist(n)&&n){var r=n.id,i=n.groupId,a=n.url;if(t)try{a=t.addDirectives(a)}catch(e){this.warn("Could not construct new URL with HLS Delivery Directives: "+e)}this.log("Loading subtitle playlist for id "+r),this.hls.trigger(b.SUBTITLE_TRACK_LOADING,{url:a,id:r,groupId:i,deliveryDirectives:t||null})}},n.toggleTrackModes=function(){var e=this.media;if(e){var t,n=Ot(e.textTracks),r=this.currentTrack;if(r&&((t=n.filter((function(e){return Ti(r,e)}))[0])||this.warn('Unable to find subtitle TextTrack with name "'+r.name+'" and language "'+r.lang+'"')),[].slice.call(n).forEach((function(e){"disabled"!==e.mode&&e!==t&&(e.mode="disabled")})),t){var i=this.subtitleDisplay?"showing":"hidden";t.mode!==i&&(t.mode=i)}}},n.setSubtitleTrack=function(e){var t=this.tracksInGroup;if(this.media)if(e<-1||e>=t.length||!g(e))this.warn("Invalid subtitle track id: "+e);else{this.clearTimer(),this.selectDefaultTrack=!1;var n=this.currentTrack,r=t[e]||null;if(this.trackId=e,this.currentTrack=r,this.toggleTrackModes(),r){var i=!!r.details&&!r.details.live;if(e!==this.trackId||r!==n||!i){this.log("Switching to subtitle-track "+e+(r?' "'+r.name+'" lang:'+r.lang+" group:"+r.groupId:""));var a=r.id,o=r.groupId,s=void 0===o?"":o,l=r.name,u=r.type,c=r.url;this.hls.trigger(b.SUBTITLE_TRACK_SWITCH,{id:a,groupId:s,name:l,type:u,url:c});var d=this.switchParams(r.url,null==n?void 0:n.details,r.details);this.loadPlaylist(d)}}else this.hls.trigger(b.SUBTITLE_TRACK_SWITCH,{id:e})}else this.queuedDefaultTrack=e},o(t,[{key:"subtitleDisplay",get:function(){return this._subtitleDisplay},set:function(e){this._subtitleDisplay=e,this.trackId>-1&&this.toggleTrackModes()}},{key:"allSubtitleTracks",get:function(){return this.tracks}},{key:"subtitleTracks",get:function(){return this.tracksInGroup}},{key:"subtitleTrack",get:function(){return this.trackId},set:function(e){this.selectDefaultTrack=!1,this.setSubtitleTrack(e)}}]),t}(fn),Pi=function(){function e(e){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=e}var t=e.prototype;return t.append=function(e,t,n){var r=this.queues[t];r.push(e),1!==r.length||n||this.executeNext(t)},t.insertAbort=function(e,t){this.queues[t].unshift(e),this.executeNext(t)},t.appendBlocker=function(e){var t,n=new Promise((function(e){t=e})),r={execute:t,onStart:function(){},onComplete:function(){},onError:function(){}};return this.append(r,e),n},t.executeNext=function(e){var t=this.queues[e];if(t.length){var n=t[0];try{n.execute()}catch(t){w.warn('[buffer-operation-queue]: Exception executing "'+e+'" SourceBuffer operation: '+t),n.onError(t);var r=this.buffers[e];null!=r&&r.updating||this.shiftAndExecuteNext(e)}}},t.shiftAndExecuteNext=function(e){this.queues[e].shift(),this.executeNext(e)},t.current=function(e){return this.queues[e][0]},e}(),Ri=/(avc[1234]|hvc1|hev1|dvh[1e]|vp09|av01)(?:\.[^.,]+)+/,Ii=function(){function e(e){var t=this;this.details=null,this._objectUrl=null,this.operationQueue=void 0,this.listeners=void 0,this.hls=void 0,this.bufferCodecEventsExpected=0,this._bufferCodecEventsTotal=0,this.media=null,this.mediaSource=null,this.lastMpegAudioChunk=null,this.appendSource=void 0,this.appendErrors={audio:0,video:0,audiovideo:0},this.tracks={},this.pendingTracks={},this.sourceBuffer=void 0,this.log=void 0,this.warn=void 0,this.error=void 0,this._onEndStreaming=function(e){t.hls&&t.hls.pauseBuffering()},this._onStartStreaming=function(e){t.hls&&t.hls.resumeBuffering()},this._onMediaSourceOpen=function(){var e=t.media,n=t.mediaSource;t.log("Media source opened"),e&&(e.removeEventListener("emptied",t._onMediaEmptied),t.updateMediaElementDuration(),t.hls.trigger(b.MEDIA_ATTACHED,{media:e,mediaSource:n})),n&&n.removeEventListener("sourceopen",t._onMediaSourceOpen),t.checkPendingTracks()},this._onMediaSourceClose=function(){t.log("Media source closed")},this._onMediaSourceEnded=function(){t.log("Media source ended")},this._onMediaEmptied=function(){var e=t.mediaSrc,n=t._objectUrl;e!==n&&w.error("Media element src was set while attaching MediaSource ("+n+" > "+e+")")},this.hls=e;var n,r="[buffer-controller]";this.appendSource=(n=qe(e.config.preferManagedMediaSource),"undefined"!=typeof self&&n===self.ManagedMediaSource),this.log=w.log.bind(w,r),this.warn=w.warn.bind(w,r),this.error=w.error.bind(w,r),this._initSourceBuffer(),this.registerListeners()}var t=e.prototype;return t.hasSourceTypes=function(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0},t.destroy=function(){this.unregisterListeners(),this.details=null,this.lastMpegAudioChunk=null,this.hls=null},t.registerListeners=function(){var e=this.hls;e.on(b.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(b.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(b.MANIFEST_LOADING,this.onManifestLoading,this),e.on(b.MANIFEST_PARSED,this.onManifestParsed,this),e.on(b.BUFFER_RESET,this.onBufferReset,this),e.on(b.BUFFER_APPENDING,this.onBufferAppending,this),e.on(b.BUFFER_CODECS,this.onBufferCodecs,this),e.on(b.BUFFER_EOS,this.onBufferEos,this),e.on(b.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(b.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(b.FRAG_PARSED,this.onFragParsed,this),e.on(b.FRAG_CHANGED,this.onFragChanged,this)},t.unregisterListeners=function(){var e=this.hls;e.off(b.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(b.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(b.MANIFEST_LOADING,this.onManifestLoading,this),e.off(b.MANIFEST_PARSED,this.onManifestParsed,this),e.off(b.BUFFER_RESET,this.onBufferReset,this),e.off(b.BUFFER_APPENDING,this.onBufferAppending,this),e.off(b.BUFFER_CODECS,this.onBufferCodecs,this),e.off(b.BUFFER_EOS,this.onBufferEos,this),e.off(b.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(b.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(b.FRAG_PARSED,this.onFragParsed,this),e.off(b.FRAG_CHANGED,this.onFragChanged,this)},t._initSourceBuffer=function(){this.sourceBuffer={},this.operationQueue=new Pi(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]},this.appendErrors={audio:0,video:0,audiovideo:0},this.lastMpegAudioChunk=null},t.onManifestLoading=function(){this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=0,this.details=null},t.onManifestParsed=function(e,t){var n=2;(t.audio&&!t.video||!t.altAudio)&&(n=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=n,this.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},t.onMediaAttaching=function(e,t){var n=this.media=t.media,r=qe(this.appendSource);if(n&&r){var i,a=this.mediaSource=new r;this.log("created media source: "+(null==(i=a.constructor)?void 0:i.name)),a.addEventListener("sourceopen",this._onMediaSourceOpen),a.addEventListener("sourceended",this._onMediaSourceEnded),a.addEventListener("sourceclose",this._onMediaSourceClose),this.appendSource&&(a.addEventListener("startstreaming",this._onStartStreaming),a.addEventListener("endstreaming",this._onEndStreaming));var o=this._objectUrl=self.URL.createObjectURL(a);if(this.appendSource)try{n.removeAttribute("src");var s=self.ManagedMediaSource;n.disableRemotePlayback=n.disableRemotePlayback||s&&a instanceof s,Di(n),function(e,t){var n=self.document.createElement("source");n.type="video/mp4",n.src=t,e.appendChild(n)}(n,o),n.load()}catch(e){n.src=o}else n.src=o;n.addEventListener("emptied",this._onMediaEmptied)}},t.onMediaDetaching=function(){var e=this.media,t=this.mediaSource,n=this._objectUrl;if(t){if(this.log("media source detaching"),"open"===t.readyState)try{t.endOfStream()}catch(e){this.warn("onMediaDetaching: "+e.message+" while calling endOfStream")}this.onBufferReset(),t.removeEventListener("sourceopen",this._onMediaSourceOpen),t.removeEventListener("sourceended",this._onMediaSourceEnded),t.removeEventListener("sourceclose",this._onMediaSourceClose),this.appendSource&&(t.removeEventListener("startstreaming",this._onStartStreaming),t.removeEventListener("endstreaming",this._onEndStreaming)),e&&(e.removeEventListener("emptied",this._onMediaEmptied),n&&self.URL.revokeObjectURL(n),this.mediaSrc===n?(e.removeAttribute("src"),this.appendSource&&Di(e),e.load()):this.warn("media|source.src was changed by a third party - skip cleanup")),this.mediaSource=null,this.media=null,this._objectUrl=null,this.bufferCodecEventsExpected=this._bufferCodecEventsTotal,this.pendingTracks={},this.tracks={}}this.hls.trigger(b.MEDIA_DETACHED,void 0)},t.onBufferReset=function(){var e=this;this.getSourceBufferTypes().forEach((function(t){e.resetBuffer(t)})),this._initSourceBuffer()},t.resetBuffer=function(e){var t=this.sourceBuffer[e];try{var n;t&&(this.removeBufferListeners(e),this.sourceBuffer[e]=void 0,null!=(n=this.mediaSource)&&n.sourceBuffers.length&&this.mediaSource.removeSourceBuffer(t))}catch(t){this.warn("onBufferReset "+e,t)}},t.onBufferCodecs=function(e,t){var n=this,r=this.getSourceBufferTypes().length,i=Object.keys(t);if(i.forEach((function(e){if(r){var i=n.tracks[e];if(i&&"function"==typeof i.buffer.changeType){var a,o=t[e],s=o.id,l=o.codec,u=o.levelCodec,c=o.container,d=o.metadata,p=at(i.codec,i.levelCodec),f=null==p?void 0:p.replace(Ri,"$1"),h=at(l,u),y=null==(a=h)?void 0:a.replace(Ri,"$1");if(h&&f!==y){"audio"===e.slice(0,5)&&(h=it(h,n.appendSource));var g=c+";codecs="+h;n.appendChangeType(e,g),n.log("switching codec "+p+" to "+h),n.tracks[e]={buffer:i.buffer,codec:l,container:c,levelCodec:u,metadata:d,id:s}}}}else n.pendingTracks[e]=t[e]})),!r){var a=Math.max(this.bufferCodecEventsExpected-1,0);this.bufferCodecEventsExpected!==a&&(this.log(a+" bufferCodec event(s) expected "+i.join(",")),this.bufferCodecEventsExpected=a),this.mediaSource&&"open"===this.mediaSource.readyState&&this.checkPendingTracks()}},t.appendChangeType=function(e,t){var n=this,r=this.operationQueue,i={execute:function(){var i=n.sourceBuffer[e];i&&(n.log("changing "+e+" sourceBuffer type to "+t),i.changeType(t)),r.shiftAndExecuteNext(e)},onStart:function(){},onComplete:function(){},onError:function(t){n.warn("Failed to change "+e+" SourceBuffer type",t)}};r.append(i,e,!!this.pendingTracks[e])},t.onBufferAppending=function(e,t){var n=this,r=this.hls,i=this.operationQueue,a=this.tracks,o=t.data,s=t.type,l=t.frag,u=t.part,c=t.chunkMeta,d=c.buffering[s],p=self.performance.now();d.start=p;var f=l.stats.buffering,h=u?u.stats.buffering:null;0===f.start&&(f.start=p),h&&0===h.start&&(h.start=p);var y=a.audio,g=!1;"audio"===s&&"audio/mpeg"===(null==y?void 0:y.container)&&(g=!this.lastMpegAudioChunk||1===c.id||this.lastMpegAudioChunk.sn!==c.sn,this.lastMpegAudioChunk=c);var v=l.start,m={execute:function(){if(d.executeStart=self.performance.now(),g){var e=n.sourceBuffer[s];if(e){var t=v-e.timestampOffset;Math.abs(t)>=.1&&(n.log("Updating audio SourceBuffer timestampOffset to "+v+" (delta: "+t+") sn: "+l.sn+")"),e.timestampOffset=v)}}n.appendExecutor(o,s)},onStart:function(){},onComplete:function(){var e=self.performance.now();d.executeEnd=d.end=e,0===f.first&&(f.first=e),h&&0===h.first&&(h.first=e);var t=n.sourceBuffer,r={};for(var i in t)r[i]=Ln.getBuffered(t[i]);n.appendErrors[s]=0,"audio"===s||"video"===s?n.appendErrors.audiovideo=0:(n.appendErrors.audio=0,n.appendErrors.video=0),n.hls.trigger(b.BUFFER_APPENDED,{type:s,frag:l,part:u,chunkMeta:c,parent:l.type,timeRanges:r})},onError:function(e){var t={type:k.MEDIA_ERROR,parent:l.type,details:E.BUFFER_APPEND_ERROR,sourceBufferName:s,frag:l,part:u,chunkMeta:c,error:e,err:e,fatal:!1};if(e.code===DOMException.QUOTA_EXCEEDED_ERR)t.details=E.BUFFER_FULL_ERROR;else{var i=++n.appendErrors[s];t.details=E.BUFFER_APPEND_ERROR,n.warn("Failed "+i+"/"+r.config.appendErrorMaxRetry+' times to append segment in "'+s+'" sourceBuffer'),i>=r.config.appendErrorMaxRetry&&(t.fatal=!0)}r.trigger(b.ERROR,t)}};i.append(m,s,!!this.pendingTracks[s])},t.onBufferFlushing=function(e,t){var n=this,r=this.operationQueue,i=function(e){return{execute:n.removeExecutor.bind(n,e,t.startOffset,t.endOffset),onStart:function(){},onComplete:function(){n.hls.trigger(b.BUFFER_FLUSHED,{type:e})},onError:function(t){n.warn("Failed to remove from "+e+" SourceBuffer",t)}}};t.type?r.append(i(t.type),t.type):this.getSourceBufferTypes().forEach((function(e){r.append(i(e),e)}))},t.onFragParsed=function(e,t){var n=this,r=t.frag,i=t.part,a=[],o=i?i.elementaryStreams:r.elementaryStreams;o[M]?a.push("audiovideo"):(o[O]&&a.push("audio"),o[L]&&a.push("video")),0===a.length&&this.warn("Fragments must have at least one ElementaryStreamType set. type: "+r.type+" level: "+r.level+" sn: "+r.sn),this.blockBuffers((function(){var e=self.performance.now();r.stats.buffering.end=e,i&&(i.stats.buffering.end=e);var t=i?i.stats:r.stats;n.hls.trigger(b.FRAG_BUFFERED,{frag:r,part:i,stats:t,id:r.type})}),a)},t.onFragChanged=function(e,t){this.trimBuffers()},t.onBufferEos=function(e,t){var n=this;this.getSourceBufferTypes().reduce((function(e,r){var i=n.sourceBuffer[r];return!i||t.type&&t.type!==r||(i.ending=!0,i.ended||(i.ended=!0,n.log(r+" sourceBuffer now EOS"))),e&&!(i&&!i.ended)}),!0)&&(this.log("Queueing mediaSource.endOfStream()"),this.blockBuffers((function(){n.getSourceBufferTypes().forEach((function(e){var t=n.sourceBuffer[e];t&&(t.ending=!1)}));var e=n.mediaSource;e&&"open"===e.readyState?(n.log("Calling mediaSource.endOfStream()"),e.endOfStream()):e&&n.log("Could not call mediaSource.endOfStream(). mediaSource.readyState: "+e.readyState)})))},t.onLevelUpdated=function(e,t){var n=t.details;n.fragments.length&&(this.details=n,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration())},t.trimBuffers=function(){var e=this.hls,t=this.details,n=this.media;if(n&&null!==t&&this.getSourceBufferTypes().length){var r=e.config,i=n.currentTime,a=t.levelTargetDuration,o=t.live&&null!==r.liveBackBufferLength?r.liveBackBufferLength:r.backBufferLength;if(g(o)&&o>0){var s=Math.max(o,a),l=Math.floor(i/a)*a-s;this.flushBackBuffer(i,a,l)}if(g(r.frontBufferFlushThreshold)&&r.frontBufferFlushThreshold>0){var u=Math.max(r.maxBufferLength,r.frontBufferFlushThreshold),c=Math.max(u,a),d=Math.floor(i/a)*a+c;this.flushFrontBuffer(i,a,d)}}},t.flushBackBuffer=function(e,t,n){var r=this,i=this.details,a=this.sourceBuffer;this.getSourceBufferTypes().forEach((function(o){var s=a[o];if(s){var l=Ln.getBuffered(s);if(l.length>0&&n>l.start(0)){if(r.hls.trigger(b.BACK_BUFFER_REACHED,{bufferEnd:n}),null!=i&&i.live)r.hls.trigger(b.LIVE_BACK_BUFFER_REACHED,{bufferEnd:n});else if(s.ended&&l.end(l.length-1)-e<2*t)return void r.log("Cannot flush "+o+" back buffer while SourceBuffer is in ended state");r.hls.trigger(b.BUFFER_FLUSHING,{startOffset:0,endOffset:n,type:o})}}}))},t.flushFrontBuffer=function(e,t,n){var r=this,i=this.sourceBuffer;this.getSourceBufferTypes().forEach((function(a){var o=i[a];if(o){var s=Ln.getBuffered(o),l=s.length;if(l<2)return;var u=s.start(l-1),c=s.end(l-1);if(n>u||e>=u&&e<=c)return;if(o.ended&&e-c<2*t)return void r.log("Cannot flush "+a+" front buffer while SourceBuffer is in ended state");r.hls.trigger(b.BUFFER_FLUSHING,{startOffset:u,endOffset:1/0,type:a})}}))},t.updateMediaElementDuration=function(){if(this.details&&this.media&&this.mediaSource&&"open"===this.mediaSource.readyState){var e=this.details,t=this.hls,n=this.media,r=this.mediaSource,i=e.fragments[0].start+e.totalduration,a=n.duration,o=g(r.duration)?r.duration:0;e.live&&t.config.liveDurationInfinity?(r.duration=1/0,this.updateSeekableRange(e)):(i>o&&i>a||!g(a))&&(this.log("Updating Media Source duration to "+i.toFixed(3)),r.duration=i)}},t.updateSeekableRange=function(e){var t=this.mediaSource,n=e.fragments;if(n.length&&e.live&&null!=t&&t.setLiveSeekableRange){var r=Math.max(0,n[0].start),i=Math.max(r,r+e.totalduration);this.log("Media Source duration is set to "+t.duration+". Setting seekable range to "+r+"-"+i+"."),t.setLiveSeekableRange(r,i)}},t.checkPendingTracks=function(){var e=this.bufferCodecEventsExpected,t=this.operationQueue,n=this.pendingTracks,r=Object.keys(n).length;if(r&&(!e||2===r||"audiovideo"in n)){this.createSourceBuffers(n),this.pendingTracks={};var i=this.getSourceBufferTypes();if(i.length)this.hls.trigger(b.BUFFER_CREATED,{tracks:this.tracks}),i.forEach((function(e){t.executeNext(e)}));else{var a=new Error("could not create source buffer for media codec(s)");this.hls.trigger(b.ERROR,{type:k.MEDIA_ERROR,details:E.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,error:a,reason:a.message})}}},t.createSourceBuffers=function(e){var t=this,n=this.sourceBuffer,r=this.mediaSource;if(!r)throw Error("createSourceBuffers called when mediaSource was null");var i=function(i){if(!n[i]){var a,o=e[i];if(!o)throw Error("source buffer exists for track "+i+", however track does not");var s=-1===(null==(a=o.levelCodec)?void 0:a.indexOf(","))?o.levelCodec:o.codec;s&&"audio"===i.slice(0,5)&&(s=it(s,t.appendSource));var l=o.container+";codecs="+s;t.log("creating sourceBuffer("+l+")");try{var u=n[i]=r.addSourceBuffer(l),c=i;t.addBufferListener(c,"updatestart",t._onSBUpdateStart),t.addBufferListener(c,"updateend",t._onSBUpdateEnd),t.addBufferListener(c,"error",t._onSBUpdateError),t.appendSource&&t.addBufferListener(c,"bufferedchange",(function(e,n){var r=n.removedRanges;null!=r&&r.length&&t.hls.trigger(b.BUFFER_FLUSHED,{type:i})})),t.tracks[i]={buffer:u,codec:s,container:o.container,levelCodec:o.levelCodec,metadata:o.metadata,id:o.id}}catch(e){t.error("error while trying to add sourceBuffer: "+e.message),t.hls.trigger(b.ERROR,{type:k.MEDIA_ERROR,details:E.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:e,sourceBufferName:i,mimeType:l})}}};for(var a in e)i(a)},t._onSBUpdateStart=function(e){this.operationQueue.current(e).onStart()},t._onSBUpdateEnd=function(e){var t;if("closed"!==(null==(t=this.mediaSource)?void 0:t.readyState)){var n=this.operationQueue;n.current(e).onComplete(),n.shiftAndExecuteNext(e)}else this.resetBuffer(e)},t._onSBUpdateError=function(e,t){var n,r=new Error(e+" SourceBuffer error. MediaSource readyState: "+(null==(n=this.mediaSource)?void 0:n.readyState));this.error(""+r,t),this.hls.trigger(b.ERROR,{type:k.MEDIA_ERROR,details:E.BUFFER_APPENDING_ERROR,sourceBufferName:e,error:r,fatal:!1});var i=this.operationQueue.current(e);i&&i.onError(r)},t.removeExecutor=function(e,t,n){var r=this.media,i=this.mediaSource,a=this.operationQueue,o=this.sourceBuffer[e];if(!r||!i||!o)return this.warn("Attempting to remove from the "+e+" SourceBuffer, but it does not exist"),void a.shiftAndExecuteNext(e);var s=g(r.duration)?r.duration:1/0,l=g(i.duration)?i.duration:1/0,u=Math.max(0,t),c=Math.min(n,s,l);c>u&&(!o.ending||o.ended)?(o.ended=!1,this.log("Removing ["+u+","+c+"] from the "+e+" SourceBuffer"),o.remove(u,c)):a.shiftAndExecuteNext(e)},t.appendExecutor=function(e,t){var n=this.sourceBuffer[t];if(n)n.ended=!1,n.appendBuffer(e);else if(!this.pendingTracks[t])throw new Error("Attempting to append to the "+t+" SourceBuffer, but it does not exist")},t.blockBuffers=function(e,t){var n=this;if(void 0===t&&(t=this.getSourceBufferTypes()),!t.length)return this.log("Blocking operation requested, but no SourceBuffers exist"),void Promise.resolve().then(e);var r=this.operationQueue,i=t.map((function(e){return r.appendBlocker(e)}));Promise.all(i).then((function(){e(),t.forEach((function(e){var t=n.sourceBuffer[e];null!=t&&t.updating||r.shiftAndExecuteNext(e)}))}))},t.getSourceBufferTypes=function(){return Object.keys(this.sourceBuffer)},t.addBufferListener=function(e,t,n){var r=this.sourceBuffer[e];if(r){var i=n.bind(this,e);this.listeners[e].push({event:t,listener:i}),r.addEventListener(t,i)}},t.removeBufferListeners=function(e){var t=this.sourceBuffer[e];t&&this.listeners[e].forEach((function(e){t.removeEventListener(e.event,e.listener)}))},o(e,[{key:"mediaSrc",get:function(){var e,t=(null==(e=this.media)?void 0:e.firstChild)||this.media;return null==t?void 0:t.src}}]),e}();function Di(e){var t=e.querySelectorAll("source");[].slice.call(t).forEach((function(t){e.removeChild(t)}))}var Oi={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,128:174,129:176,130:189,131:191,132:8482,133:162,134:163,135:9834,136:224,137:32,138:232,139:226,140:234,141:238,142:244,143:251,144:193,145:201,146:211,147:218,148:220,149:252,150:8216,151:161,152:42,153:8217,154:9473,155:169,156:8480,157:8226,158:8220,159:8221,160:192,161:194,162:199,163:200,164:202,165:203,166:235,167:206,168:207,169:239,170:212,171:217,172:249,173:219,174:171,175:187,176:195,177:227,178:205,179:204,180:236,181:210,182:242,183:213,184:245,185:123,186:125,187:92,188:94,189:95,190:124,191:8764,192:196,193:228,194:214,195:246,196:223,197:165,198:164,199:9475,200:197,201:229,202:216,203:248,204:9487,205:9491,206:9495,207:9499},Li=function(e){var t=e;return Oi.hasOwnProperty(e)&&(t=Oi[e]),String.fromCharCode(t)},Mi=15,Ni=100,Ui={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},Bi={17:2,18:4,21:6,22:8,23:10,19:13,20:15},Fi={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},ji={25:2,26:4,29:6,30:8,31:10,27:13,28:15},Hi=["white","green","blue","cyan","red","yellow","magenta","black","transparent"],Vi=function(){function e(){this.time=null,this.verboseLevel=0}return e.prototype.log=function(e,t){if(this.verboseLevel>=e){var n="function"==typeof t?t():t;w.log(this.time+" ["+e+"] "+n)}},e}(),Gi=function(e){for(var t=[],n=0;n<e.length;n++)t.push(e[n].toString(16));return t},Ki=function(){function e(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1}var t=e.prototype;return t.reset=function(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1},t.setStyles=function(e){for(var t=["foreground","underline","italics","background","flash"],n=0;n<t.length;n++){var r=t[n];e.hasOwnProperty(r)&&(this[r]=e[r])}},t.isDefault=function(){return"white"===this.foreground&&!this.underline&&!this.italics&&"black"===this.background&&!this.flash},t.equals=function(e){return this.foreground===e.foreground&&this.underline===e.underline&&this.italics===e.italics&&this.background===e.background&&this.flash===e.flash},t.copy=function(e){this.foreground=e.foreground,this.underline=e.underline,this.italics=e.italics,this.background=e.background,this.flash=e.flash},t.toString=function(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash},e}(),zi=function(){function e(){this.uchar=" ",this.penState=new Ki}var t=e.prototype;return t.reset=function(){this.uchar=" ",this.penState.reset()},t.setChar=function(e,t){this.uchar=e,this.penState.copy(t)},t.setPenState=function(e){this.penState.copy(e)},t.equals=function(e){return this.uchar===e.uchar&&this.penState.equals(e.penState)},t.copy=function(e){this.uchar=e.uchar,this.penState.copy(e.penState)},t.isEmpty=function(){return" "===this.uchar&&this.penState.isDefault()},e}(),Wi=function(){function e(e){this.chars=[],this.pos=0,this.currPenState=new Ki,this.cueStartTime=null,this.logger=void 0;for(var t=0;t<Ni;t++)this.chars.push(new zi);this.logger=e}var t=e.prototype;return t.equals=function(e){for(var t=0;t<Ni;t++)if(!this.chars[t].equals(e.chars[t]))return!1;return!0},t.copy=function(e){for(var t=0;t<Ni;t++)this.chars[t].copy(e.chars[t])},t.isEmpty=function(){for(var e=!0,t=0;t<Ni;t++)if(!this.chars[t].isEmpty()){e=!1;break}return e},t.setCursor=function(e){this.pos!==e&&(this.pos=e),this.pos<0?(this.logger.log(3,"Negative cursor position "+this.pos),this.pos=0):this.pos>Ni&&(this.logger.log(3,"Too large cursor position "+this.pos),this.pos=Ni)},t.moveCursor=function(e){var t=this.pos+e;if(e>1)for(var n=this.pos+1;n<t+1;n++)this.chars[n].setPenState(this.currPenState);this.setCursor(t)},t.backSpace=function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)},t.insertChar=function(e){var t=this;e>=144&&this.backSpace();var n=Li(e);this.pos>=Ni?this.logger.log(0,(function(){return"Cannot insert "+e.toString(16)+" ("+n+") at position "+t.pos+". Skipping it!"})):(this.chars[this.pos].setChar(n,this.currPenState),this.moveCursor(1))},t.clearFromPos=function(e){var t;for(t=e;t<Ni;t++)this.chars[t].reset()},t.clear=function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()},t.clearToEndOfRow=function(){this.clearFromPos(this.pos)},t.getTextString=function(){for(var e=[],t=!0,n=0;n<Ni;n++){var r=this.chars[n].uchar;" "!==r&&(t=!1),e.push(r)}return t?"":e.join("")},t.setPenStyles=function(e){this.currPenState.setStyles(e),this.chars[this.pos].setPenState(this.currPenState)},e}(),Yi=function(){function e(e){this.rows=[],this.currRow=14,this.nrRollUpRows=null,this.lastOutputScreen=null,this.logger=void 0;for(var t=0;t<Mi;t++)this.rows.push(new Wi(e));this.logger=e}var t=e.prototype;return t.reset=function(){for(var e=0;e<Mi;e++)this.rows[e].clear();this.currRow=14},t.equals=function(e){for(var t=!0,n=0;n<Mi;n++)if(!this.rows[n].equals(e.rows[n])){t=!1;break}return t},t.copy=function(e){for(var t=0;t<Mi;t++)this.rows[t].copy(e.rows[t])},t.isEmpty=function(){for(var e=!0,t=0;t<Mi;t++)if(!this.rows[t].isEmpty()){e=!1;break}return e},t.backSpace=function(){this.rows[this.currRow].backSpace()},t.clearToEndOfRow=function(){this.rows[this.currRow].clearToEndOfRow()},t.insertChar=function(e){this.rows[this.currRow].insertChar(e)},t.setPen=function(e){this.rows[this.currRow].setPenStyles(e)},t.moveCursor=function(e){this.rows[this.currRow].moveCursor(e)},t.setCursor=function(e){this.logger.log(2,"setCursor: "+e),this.rows[this.currRow].setCursor(e)},t.setPAC=function(e){this.logger.log(2,(function(){return"pacData = "+JSON.stringify(e)}));var t=e.row-1;if(this.nrRollUpRows&&t<this.nrRollUpRows-1&&(t=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==t){for(var n=0;n<Mi;n++)this.rows[n].clear();var r=this.currRow+1-this.nrRollUpRows,i=this.lastOutputScreen;if(i){var a=i.rows[r].cueStartTime,o=this.logger.time;if(null!==a&&null!==o&&a<o)for(var s=0;s<this.nrRollUpRows;s++)this.rows[t-this.nrRollUpRows+s+1].copy(i.rows[r+s])}}this.currRow=t;var l=this.rows[this.currRow];if(null!==e.indent){var u=e.indent,c=Math.max(u-1,0);l.setCursor(e.indent),e.color=l.chars[c].penState.foreground}var d={foreground:e.color,underline:e.underline,italics:e.italics,background:"black",flash:!1};this.setPen(d)},t.setBkgData=function(e){this.logger.log(2,(function(){return"bkgData = "+JSON.stringify(e)})),this.backSpace(),this.setPen(e),this.insertChar(32)},t.setRollUpRows=function(e){this.nrRollUpRows=e},t.rollUp=function(){var e=this;if(null!==this.nrRollUpRows){this.logger.log(1,(function(){return e.getDisplayText()}));var t=this.currRow+1-this.nrRollUpRows,n=this.rows.splice(t,1)[0];n.clear(),this.rows.splice(this.currRow,0,n),this.logger.log(2,"Rolling up")}else this.logger.log(3,"roll_up but nrRollUpRows not set yet")},t.getDisplayText=function(e){e=e||!1;for(var t=[],n="",r=-1,i=0;i<Mi;i++){var a=this.rows[i].getTextString();a&&(r=i+1,e?t.push("Row "+r+": '"+a+"'"):t.push(a.trim()))}return t.length>0&&(n=e?"["+t.join(" | ")+"]":t.join("\n")),n},t.getTextAndFormat=function(){return this.rows},e}(),Zi=function(){function e(e,t,n){this.chNr=void 0,this.outputFilter=void 0,this.mode=void 0,this.verbose=void 0,this.displayedMemory=void 0,this.nonDisplayedMemory=void 0,this.lastOutputScreen=void 0,this.currRollUpRow=void 0,this.writeScreen=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chNr=e,this.outputFilter=t,this.mode=null,this.verbose=0,this.displayedMemory=new Yi(n),this.nonDisplayedMemory=new Yi(n),this.lastOutputScreen=new Yi(n),this.currRollUpRow=this.displayedMemory.rows[14],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=n}var t=e.prototype;return t.reset=function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[14],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null},t.getHandler=function(){return this.outputFilter},t.setHandler=function(e){this.outputFilter=e},t.setPAC=function(e){this.writeScreen.setPAC(e)},t.setBkgData=function(e){this.writeScreen.setBkgData(e)},t.setMode=function(e){e!==this.mode&&(this.mode=e,this.logger.log(2,(function(){return"MODE="+e})),"MODE_POP-ON"===this.mode?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),"MODE_ROLL-UP"!==this.mode&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=e)},t.insertChars=function(e){for(var t=this,n=0;n<e.length;n++)this.writeScreen.insertChar(e[n]);var r=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";this.logger.log(2,(function(){return r+": "+t.writeScreen.getDisplayText(!0)})),"MODE_PAINT-ON"!==this.mode&&"MODE_ROLL-UP"!==this.mode||(this.logger.log(1,(function(){return"DISPLAYED: "+t.displayedMemory.getDisplayText(!0)})),this.outputDataUpdate())},t.ccRCL=function(){this.logger.log(2,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")},t.ccBS=function(){this.logger.log(2,"BS - BackSpace"),"MODE_TEXT"!==this.mode&&(this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate())},t.ccAOF=function(){},t.ccAON=function(){},t.ccDER=function(){this.logger.log(2,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()},t.ccRU=function(e){this.logger.log(2,"RU("+e+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(e)},t.ccFON=function(){this.logger.log(2,"FON - Flash On"),this.writeScreen.setPen({flash:!0})},t.ccRDC=function(){this.logger.log(2,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")},t.ccTR=function(){this.logger.log(2,"TR"),this.setMode("MODE_TEXT")},t.ccRTD=function(){this.logger.log(2,"RTD"),this.setMode("MODE_TEXT")},t.ccEDM=function(){this.logger.log(2,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)},t.ccCR=function(){this.logger.log(2,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)},t.ccENM=function(){this.logger.log(2,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()},t.ccEOC=function(){var e=this;if(this.logger.log(2,"EOC - End Of Caption"),"MODE_POP-ON"===this.mode){var t=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=t,this.writeScreen=this.nonDisplayedMemory,this.logger.log(1,(function(){return"DISP: "+e.displayedMemory.getDisplayText()}))}this.outputDataUpdate(!0)},t.ccTO=function(e){this.logger.log(2,"TO("+e+") - Tab Offset"),this.writeScreen.moveCursor(e)},t.ccMIDROW=function(e){var t={flash:!1};if(t.underline=e%2==1,t.italics=e>=46,t.italics)t.foreground="white";else{var n=Math.floor(e/2)-16;t.foreground=["white","green","blue","cyan","red","yellow","magenta"][n]}this.logger.log(2,"MIDROW: "+JSON.stringify(t)),this.writeScreen.setPen(t)},t.outputDataUpdate=function(e){void 0===e&&(e=!1);var t=this.logger.time;null!==t&&this.outputFilter&&(null!==this.cueStartTime||this.displayedMemory.isEmpty()?this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,t,this.lastOutputScreen),e&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:t):this.cueStartTime=t,this.lastOutputScreen.copy(this.displayedMemory))},t.cueSplitAtTime=function(e){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,e,this.displayedMemory),this.cueStartTime=e))},e}(),qi=function(){function e(e,t,n){this.channels=void 0,this.currentChannel=0,this.cmdHistory={a:null,b:null},this.logger=void 0;var r=this.logger=new Vi;this.channels=[null,new Zi(e,t,r),new Zi(e+1,n,r)]}var t=e.prototype;return t.getHandler=function(e){return this.channels[e].getHandler()},t.setHandler=function(e,t){this.channels[e].setHandler(t)},t.addData=function(e,t){var n,r,i,a=!1;this.logger.time=e;for(var o=0;o<t.length;o+=2)if(r=127&t[o],i=127&t[o+1],0!==r||0!==i){if(this.logger.log(3,"["+Gi([t[o],t[o+1]])+"] -> ("+Gi([r,i])+")"),(n=this.parseCmd(r,i))||(n=this.parseMidrow(r,i)),n||(n=this.parsePAC(r,i)),n||(n=this.parseBackgroundAttributes(r,i)),!n&&(a=this.parseChars(r,i))){var s=this.currentChannel;s&&s>0?this.channels[s].insertChars(a):this.logger.log(2,"No channel found yet. TEXT-MODE?")}n||a||this.logger.log(2,"Couldn't parse cleaned data "+Gi([r,i])+" orig: "+Gi([t[o],t[o+1]]))}},t.parseCmd=function(e,t){var n=this.cmdHistory;if(!((20===e||28===e||21===e||29===e)&&t>=32&&t<=47||(23===e||31===e)&&t>=33&&t<=35))return!1;if(Qi(e,t,n))return Xi(null,null,n),this.logger.log(3,"Repeated command ("+Gi([e,t])+") is dropped"),!0;var r=20===e||21===e||23===e?1:2,i=this.channels[r];return 20===e||21===e||28===e||29===e?32===t?i.ccRCL():33===t?i.ccBS():34===t?i.ccAOF():35===t?i.ccAON():36===t?i.ccDER():37===t?i.ccRU(2):38===t?i.ccRU(3):39===t?i.ccRU(4):40===t?i.ccFON():41===t?i.ccRDC():42===t?i.ccTR():43===t?i.ccRTD():44===t?i.ccEDM():45===t?i.ccCR():46===t?i.ccENM():47===t&&i.ccEOC():i.ccTO(t-32),Xi(e,t,n),this.currentChannel=r,!0},t.parseMidrow=function(e,t){var n=0;if((17===e||25===e)&&t>=32&&t<=47){if((n=17===e?1:2)!==this.currentChannel)return this.logger.log(0,"Mismatch channel in midrow parsing"),!1;var r=this.channels[n];return!!r&&(r.ccMIDROW(t),this.logger.log(3,"MIDROW ("+Gi([e,t])+")"),!0)}return!1},t.parsePAC=function(e,t){var n,r=this.cmdHistory;if(!((e>=17&&e<=23||e>=25&&e<=31)&&t>=64&&t<=127||(16===e||24===e)&&t>=64&&t<=95))return!1;if(Qi(e,t,r))return Xi(null,null,r),!0;var i=e<=23?1:2;n=t>=64&&t<=95?1===i?Ui[e]:Fi[e]:1===i?Bi[e]:ji[e];var a=this.channels[i];return!!a&&(a.setPAC(this.interpretPAC(n,t)),Xi(e,t,r),this.currentChannel=i,!0)},t.interpretPAC=function(e,t){var n,r={color:null,italics:!1,indent:null,underline:!1,row:e};return n=t>95?t-96:t-64,r.underline=1==(1&n),n<=13?r.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(n/2)]:n<=15?(r.italics=!0,r.color="white"):r.indent=4*Math.floor((n-16)/2),r},t.parseChars=function(e,t){var n,r,i=null,a=null;if(e>=25?(n=2,a=e-8):(n=1,a=e),a>=17&&a<=19?(r=17===a?t+80:18===a?t+112:t+144,this.logger.log(2,"Special char '"+Li(r)+"' in channel "+n),i=[r]):e>=32&&e<=127&&(i=0===t?[e]:[e,t]),i){var o=Gi(i);this.logger.log(3,"Char codes =  "+o.join(",")),Xi(e,t,this.cmdHistory)}return i},t.parseBackgroundAttributes=function(e,t){var n;if(!((16===e||24===e)&&t>=32&&t<=47||(23===e||31===e)&&t>=45&&t<=47))return!1;var r={};16===e||24===e?(n=Math.floor((t-32)/2),r.background=Hi[n],t%2==1&&(r.background=r.background+"_semi")):45===t?r.background="transparent":(r.foreground="black",47===t&&(r.underline=!0));var i=e<=23?1:2;return this.channels[i].setBkgData(r),Xi(e,t,this.cmdHistory),!0},t.reset=function(){for(var e=0;e<Object.keys(this.channels).length;e++){var t=this.channels[e];t&&t.reset()}this.cmdHistory={a:null,b:null}},t.cueSplitAtTime=function(e){for(var t=0;t<this.channels.length;t++){var n=this.channels[t];n&&n.cueSplitAtTime(e)}},e}();function Xi(e,t,n){n.a=e,n.b=t}function Qi(e,t,n){return n.a===e&&n.b===t}var $i=function(){function e(e,t){this.timelineController=void 0,this.cueRanges=[],this.trackName=void 0,this.startTime=null,this.endTime=null,this.screen=null,this.timelineController=e,this.trackName=t}var t=e.prototype;return t.dispatchCue=function(){null!==this.startTime&&(this.timelineController.addCues(this.trackName,this.startTime,this.endTime,this.screen,this.cueRanges),this.startTime=null)},t.newCue=function(e,t,n){(null===this.startTime||this.startTime>e)&&(this.startTime=e),this.endTime=t,this.screen=n,this.timelineController.createCaptionsTrack(this.trackName)},t.reset=function(){this.cueRanges=[],this.startTime=null},e}(),Ji=function(){if(null!=V&&V.VTTCue)return self.VTTCue;var e=["","lr","rl"],t=["start","middle","end","left","right"];function n(e,t){if("string"!=typeof t)return!1;if(!Array.isArray(e))return!1;var n=t.toLowerCase();return!!~e.indexOf(n)&&n}function r(e){return n(t,e)}function i(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];for(var i=1;i<arguments.length;i++){var a=arguments[i];for(var o in a)e[o]=a[o]}return e}function a(t,a,o){var s=this,l={enumerable:!0};s.hasBeenReset=!1;var u="",c=!1,d=t,p=a,f=o,h=null,y="",g=!0,v="auto",m="start",b=50,k="middle",E=50,_="middle";Object.defineProperty(s,"id",i({},l,{get:function(){return u},set:function(e){u=""+e}})),Object.defineProperty(s,"pauseOnExit",i({},l,{get:function(){return c},set:function(e){c=!!e}})),Object.defineProperty(s,"startTime",i({},l,{get:function(){return d},set:function(e){if("number"!=typeof e)throw new TypeError("Start time must be set to a number.");d=e,this.hasBeenReset=!0}})),Object.defineProperty(s,"endTime",i({},l,{get:function(){return p},set:function(e){if("number"!=typeof e)throw new TypeError("End time must be set to a number.");p=e,this.hasBeenReset=!0}})),Object.defineProperty(s,"text",i({},l,{get:function(){return f},set:function(e){f=""+e,this.hasBeenReset=!0}})),Object.defineProperty(s,"region",i({},l,{get:function(){return h},set:function(e){h=e,this.hasBeenReset=!0}})),Object.defineProperty(s,"vertical",i({},l,{get:function(){return y},set:function(t){var r=function(t){return n(e,t)}(t);if(!1===r)throw new SyntaxError("An invalid or illegal string was specified.");y=r,this.hasBeenReset=!0}})),Object.defineProperty(s,"snapToLines",i({},l,{get:function(){return g},set:function(e){g=!!e,this.hasBeenReset=!0}})),Object.defineProperty(s,"line",i({},l,{get:function(){return v},set:function(e){if("number"!=typeof e&&"auto"!==e)throw new SyntaxError("An invalid number or illegal string was specified.");v=e,this.hasBeenReset=!0}})),Object.defineProperty(s,"lineAlign",i({},l,{get:function(){return m},set:function(e){var t=r(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");m=t,this.hasBeenReset=!0}})),Object.defineProperty(s,"position",i({},l,{get:function(){return b},set:function(e){if(e<0||e>100)throw new Error("Position must be between 0 and 100.");b=e,this.hasBeenReset=!0}})),Object.defineProperty(s,"positionAlign",i({},l,{get:function(){return k},set:function(e){var t=r(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");k=t,this.hasBeenReset=!0}})),Object.defineProperty(s,"size",i({},l,{get:function(){return E},set:function(e){if(e<0||e>100)throw new Error("Size must be between 0 and 100.");E=e,this.hasBeenReset=!0}})),Object.defineProperty(s,"align",i({},l,{get:function(){return _},set:function(e){var t=r(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");_=t,this.hasBeenReset=!0}})),s.displayState=void 0}return a.prototype.getCueAsHTML=function(){return self.WebVTT.convertCueToDOMTree(self,this.text)},a}(),ea=function(){function e(){}return e.prototype.decode=function(e,t){if(!e)return"";if("string"!=typeof e)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))},e}();function ta(e){function t(e,t,n,r){return 3600*(0|e)+60*(0|t)+(0|n)+parseFloat(r||0)}var n=e.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return n?parseFloat(n[2])>59?t(n[2],n[3],0,n[4]):t(n[1],n[2],n[3],n[4]):null}var na=function(){function e(){this.values=Object.create(null)}var t=e.prototype;return t.set=function(e,t){this.get(e)||""===t||(this.values[e]=t)},t.get=function(e,t,n){return n?this.has(e)?this.values[e]:t[n]:this.has(e)?this.values[e]:t},t.has=function(e){return e in this.values},t.alt=function(e,t,n){for(var r=0;r<n.length;++r)if(t===n[r]){this.set(e,t);break}},t.integer=function(e,t){/^-?\d+$/.test(t)&&this.set(e,parseInt(t,10))},t.percent=function(e,t){if(/^([\d]{1,3})(\.[\d]*)?%$/.test(t)){var n=parseFloat(t);if(n>=0&&n<=100)return this.set(e,n),!0}return!1},e}();function ra(e,t,n,r){var i=r?e.split(r):[e];for(var a in i)if("string"==typeof i[a]){var o=i[a].split(n);2===o.length&&t(o[0],o[1])}}var ia=new Ji(0,0,""),aa="middle"===ia.align?"middle":"center";function oa(e,t,n){var r=e;function i(){var t=ta(e);if(null===t)throw new Error("Malformed timestamp: "+r);return e=e.replace(/^[^\sa-zA-Z-]+/,""),t}function a(){e=e.replace(/^\s+/,"")}if(a(),t.startTime=i(),a(),"--\x3e"!==e.slice(0,3))throw new Error("Malformed time stamp (time stamps must be separated by '--\x3e'): "+r);e=e.slice(3),a(),t.endTime=i(),a(),function(e,t){var r=new na;ra(e,(function(e,t){var i;switch(e){case"region":for(var a=n.length-1;a>=0;a--)if(n[a].id===t){r.set(e,n[a].region);break}break;case"vertical":r.alt(e,t,["rl","lr"]);break;case"line":i=t.split(","),r.integer(e,i[0]),r.percent(e,i[0])&&r.set("snapToLines",!1),r.alt(e,i[0],["auto"]),2===i.length&&r.alt("lineAlign",i[1],["start",aa,"end"]);break;case"position":i=t.split(","),r.percent(e,i[0]),2===i.length&&r.alt("positionAlign",i[1],["start",aa,"end","line-left","line-right","auto"]);break;case"size":r.percent(e,t);break;case"align":r.alt(e,t,["start",aa,"end","left","right"])}}),/:/,/\s/),t.region=r.get("region",null),t.vertical=r.get("vertical","");var i=r.get("line","auto");"auto"===i&&-1===ia.line&&(i=-1),t.line=i,t.lineAlign=r.get("lineAlign","start"),t.snapToLines=r.get("snapToLines",!0),t.size=r.get("size",100),t.align=r.get("align",aa);var a=r.get("position","auto");"auto"===a&&50===ia.position&&(a="start"===t.align||"left"===t.align?0:"end"===t.align||"right"===t.align?100:50),t.position=a}(e,t)}function sa(e){return e.replace(/<br(?: \/)?>/gi,"\n")}var la=function(){function e(){this.state="INITIAL",this.buffer="",this.decoder=new ea,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}var t=e.prototype;return t.parse=function(e){var t=this;function n(){var e=t.buffer,n=0;for(e=sa(e);n<e.length&&"\r"!==e[n]&&"\n"!==e[n];)++n;var r=e.slice(0,n);return"\r"===e[n]&&++n,"\n"===e[n]&&++n,t.buffer=e.slice(n),r}e&&(t.buffer+=t.decoder.decode(e,{stream:!0}));try{var r="";if("INITIAL"===t.state){if(!/\r\n|\n/.test(t.buffer))return this;var i=(r=n()).match(/^(ï»¿)?WEBVTT([ \t].*)?$/);if(null==i||!i[0])throw new Error("Malformed WebVTT signature.");t.state="HEADER"}for(var a=!1;t.buffer;){if(!/\r\n|\n/.test(t.buffer))return this;switch(a?a=!1:r=n(),t.state){case"HEADER":/:/.test(r)?ra(r,(function(e,t){}),/:/):r||(t.state="ID");continue;case"NOTE":r||(t.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(r)){t.state="NOTE";break}if(!r)continue;if(t.cue=new Ji(0,0,""),t.state="CUE",-1===r.indexOf("--\x3e")){t.cue.id=r;continue}case"CUE":if(!t.cue){t.state="BADCUE";continue}try{oa(r,t.cue,t.regionList)}catch(e){t.cue=null,t.state="BADCUE";continue}t.state="CUETEXT";continue;case"CUETEXT":var o=-1!==r.indexOf("--\x3e");if(!r||o&&(a=!0)){t.oncue&&t.cue&&t.oncue(t.cue),t.cue=null,t.state="ID";continue}if(null===t.cue)continue;t.cue.text&&(t.cue.text+="\n"),t.cue.text+=r;continue;case"BADCUE":r||(t.state="ID")}}}catch(e){"CUETEXT"===t.state&&t.cue&&t.oncue&&t.oncue(t.cue),t.cue=null,t.state="INITIAL"===t.state?"BADWEBVTT":"BADCUE"}return this},t.flush=function(){var e=this;try{if((e.cue||"HEADER"===e.state)&&(e.buffer+="\n\n",e.parse()),"INITIAL"===e.state||"BADWEBVTT"===e.state)throw new Error("Malformed WebVTT signature.")}catch(t){e.onparsingerror&&e.onparsingerror(t)}return e.onflush&&e.onflush(),this},e}(),ua=/\r\n|\n\r|\n|\r/g,ca=function(e,t,n){return void 0===n&&(n=0),e.slice(n,n+t.length)===t},da=function(e){for(var t=5381,n=e.length;n;)t=33*t^e.charCodeAt(--n);return(t>>>0).toString()};function pa(e,t,n){return da(e.toString())+da(t.toString())+da(n)}var fa="stpp.ttml.im1t",ha=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,ya=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,ga={left:"start",center:"center",right:"end",start:"start",end:"end"};function va(e,t,n,r){var i=Ce(new Uint8Array(e),["mdat"]);if(0!==i.length){var a,o,l,u=i.map((function(e){return ge(e)})),c=(a=t.baseTime,1,void 0===(o=t.timescale)&&(o=1),void 0===l&&(l=!1),Qr(a,1,1/o,l));try{u.forEach((function(e){return n(function(e,t){var n=(new DOMParser).parseFromString(e,"text/xml").getElementsByTagName("tt")[0];if(!n)throw new Error("Invalid ttml");var r={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},i=Object.keys(r).reduce((function(e,t){return e[t]=n.getAttribute("ttp:"+t)||r[t],e}),{}),a="preserve"!==n.getAttribute("xml:space"),o=ba(ma(n,"styling","style")),l=ba(ma(n,"layout","region")),u=ma(n,"body","[begin]");return[].map.call(u,(function(e){var n=ka(e,a);if(!n||!e.hasAttribute("begin"))return null;var r=Ta(e.getAttribute("begin"),i),u=Ta(e.getAttribute("dur"),i),c=Ta(e.getAttribute("end"),i);if(null===r)throw _a(e);if(null===c){if(null===u)throw _a(e);c=r+u}var d=new Ji(r-t,c-t,n);d.id=pa(d.startTime,d.endTime,d.text);var p=function(e,t,n){var r="http://www.w3.org/ns/ttml#styling",i=null,a=null!=e&&e.hasAttribute("style")?e.getAttribute("style"):null;return a&&n.hasOwnProperty(a)&&(i=n[a]),["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"].reduce((function(n,a){var o=Ea(t,r,a)||Ea(e,r,a)||Ea(i,r,a);return o&&(n[a]=o),n}),{})}(l[e.getAttribute("region")],o[e.getAttribute("style")],o),f=p.textAlign;if(f){var h=ga[f];h&&(d.lineAlign=h),d.align=f}return s(d,p),d})).filter((function(e){return null!==e}))}(e,c))}))}catch(e){r(e)}}else r(new Error("Could not parse IMSC1 mdat"))}function ma(e,t,n){var r=e.getElementsByTagName(t)[0];return r?[].slice.call(r.querySelectorAll(n)):[]}function ba(e){return e.reduce((function(e,t){var n=t.getAttribute("xml:id");return n&&(e[n]=t),e}),{})}function ka(e,t){return[].slice.call(e.childNodes).reduce((function(e,n,r){var i;return"br"===n.nodeName&&r?e+"\n":null!=(i=n.childNodes)&&i.length?ka(n,t):t?e+n.textContent.trim().replace(/\s+/g," "):e+n.textContent}),"")}function Ea(e,t,n){return e&&e.hasAttributeNS(t,n)?e.getAttributeNS(t,n):null}function _a(e){return new Error("Could not parse ttml timestamp "+e)}function Ta(e,t){if(!e)return null;var n=ta(e);return null===n&&(ha.test(e)?n=function(e,t){var n=ha.exec(e),r=(0|n[4])+(0|n[5])/t.subFrameRate;return 3600*(0|n[1])+60*(0|n[2])+(0|n[3])+r/t.frameRate}(e,t):ya.test(e)&&(n=function(e,t){var n=ya.exec(e),r=Number(n[1]);switch(n[2]){case"h":return 3600*r;case"m":return 60*r;case"ms":return 1e3*r;case"f":return r/t.frameRate;case"t":return r/t.tickRate}return r}(e,t))),n}var Aa=function(){function e(e){this.hls=void 0,this.media=null,this.config=void 0,this.enabled=!0,this.Cues=void 0,this.textTracks=[],this.tracks=[],this.initPTS=[],this.unparsedVttFrags=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.cea608Parser1=void 0,this.cea608Parser2=void 0,this.lastCc=-1,this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs={ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!0}},this.captionsProperties=void 0,this.hls=e,this.config=e.config,this.Cues=e.config.cueHandler,this.captionsProperties={textTrack1:{label:this.config.captionsTextTrack1Label,languageCode:this.config.captionsTextTrack1LanguageCode},textTrack2:{label:this.config.captionsTextTrack2Label,languageCode:this.config.captionsTextTrack2LanguageCode},textTrack3:{label:this.config.captionsTextTrack3Label,languageCode:this.config.captionsTextTrack3LanguageCode},textTrack4:{label:this.config.captionsTextTrack4Label,languageCode:this.config.captionsTextTrack4LanguageCode}},e.on(b.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(b.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(b.MANIFEST_LOADING,this.onManifestLoading,this),e.on(b.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(b.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.on(b.FRAG_LOADING,this.onFragLoading,this),e.on(b.FRAG_LOADED,this.onFragLoaded,this),e.on(b.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),e.on(b.FRAG_DECRYPTED,this.onFragDecrypted,this),e.on(b.INIT_PTS_FOUND,this.onInitPtsFound,this),e.on(b.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),e.on(b.BUFFER_FLUSHING,this.onBufferFlushing,this)}var t=e.prototype;return t.destroy=function(){var e=this.hls;e.off(b.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(b.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(b.MANIFEST_LOADING,this.onManifestLoading,this),e.off(b.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(b.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.off(b.FRAG_LOADING,this.onFragLoading,this),e.off(b.FRAG_LOADED,this.onFragLoaded,this),e.off(b.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),e.off(b.FRAG_DECRYPTED,this.onFragDecrypted,this),e.off(b.INIT_PTS_FOUND,this.onInitPtsFound,this),e.off(b.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),e.off(b.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=null,this.cea608Parser1=this.cea608Parser2=void 0},t.initCea608Parsers=function(){if(this.config.enableCEA708Captions&&(!this.cea608Parser1||!this.cea608Parser2)){var e=new $i(this,"textTrack1"),t=new $i(this,"textTrack2"),n=new $i(this,"textTrack3"),r=new $i(this,"textTrack4");this.cea608Parser1=new qi(1,e,t),this.cea608Parser2=new qi(3,n,r)}},t.addCues=function(e,t,n,r,i){for(var a,o,s,l,u=!1,c=i.length;c--;){var d=i[c],p=(a=d[0],o=d[1],s=t,l=n,Math.min(o,l)-Math.max(a,s));if(p>=0&&(d[0]=Math.min(d[0],t),d[1]=Math.max(d[1],n),u=!0,p/(n-t)>.5))return}if(u||i.push([t,n]),this.config.renderTextTracksNatively){var f=this.captionsTracks[e];this.Cues.newCue(f,t,n,r)}else{var h=this.Cues.newCue(null,t,n,r);this.hls.trigger(b.CUES_PARSED,{type:"captions",cues:h,track:e})}},t.onInitPtsFound=function(e,t){var n=this,r=t.frag,i=t.id,a=t.initPTS,o=t.timescale,s=this.unparsedVttFrags;"main"===i&&(this.initPTS[r.cc]={baseTime:a,timescale:o}),s.length&&(this.unparsedVttFrags=[],s.forEach((function(e){n.onFragLoaded(b.FRAG_LOADED,e)})))},t.getExistingTrack=function(e,t){var n=this.media;if(n)for(var r=0;r<n.textTracks.length;r++){var i=n.textTracks[r];if(wa(i,{name:e,lang:t,attrs:{}}))return i}return null},t.createCaptionsTrack=function(e){this.config.renderTextTracksNatively?this.createNativeTrack(e):this.createNonNativeTrack(e)},t.createNativeTrack=function(e){if(!this.captionsTracks[e]){var t=this.captionsProperties,n=this.captionsTracks,r=this.media,i=t[e],a=i.label,o=i.languageCode,s=this.getExistingTrack(a,o);if(s)n[e]=s,It(n[e]),Pt(n[e],r);else{var l=this.createTextTrack("captions",a,o);l&&(l[e]=!0,n[e]=l)}}},t.createNonNativeTrack=function(e){if(!this.nonNativeCaptionsTracks[e]){var t=this.captionsProperties[e];if(t){var n={_id:e,label:t.label,kind:"captions",default:!!t.media&&!!t.media.default,closedCaptions:t.media};this.nonNativeCaptionsTracks[e]=n,this.hls.trigger(b.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[n]})}}},t.createTextTrack=function(e,t,n){var r=this.media;if(r)return r.addTextTrack(e,t,n)},t.onMediaAttaching=function(e,t){this.media=t.media,this._cleanTracks()},t.onMediaDetaching=function(){var e=this.captionsTracks;Object.keys(e).forEach((function(t){It(e[t]),delete e[t]})),this.nonNativeCaptionsTracks={}},t.onManifestLoading=function(){this.lastCc=-1,this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs={ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!0}},this._cleanTracks(),this.tracks=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.textTracks=[],this.unparsedVttFrags=[],this.initPTS=[],this.cea608Parser1&&this.cea608Parser2&&(this.cea608Parser1.reset(),this.cea608Parser2.reset())},t._cleanTracks=function(){var e=this.media;if(e){var t=e.textTracks;if(t)for(var n=0;n<t.length;n++)It(t[n])}},t.onSubtitleTracksUpdated=function(e,t){var n=this,r=t.subtitleTracks||[],i=r.some((function(e){return e.textCodec===fa}));if(this.config.enableWebVTT||i&&this.config.enableIMSC1){if(Ei(this.tracks,r))return void(this.tracks=r);if(this.textTracks=[],this.tracks=r,this.config.renderTextTracksNatively){var a=this.media,o=a?Ot(a.textTracks):null;if(this.tracks.forEach((function(e,t){var r;if(o){for(var i=null,a=0;a<o.length;a++)if(o[a]&&wa(o[a],e)){i=o[a],o[a]=null;break}i&&(r=i)}if(r)It(r);else{var s=Sa(e);(r=n.createTextTrack(s,e.name,e.lang))&&(r.mode="disabled")}r&&n.textTracks.push(r)})),null!=o&&o.length){var s=o.filter((function(e){return null!==e})).map((function(e){return e.label}));s.length&&w.warn("Media element contains unused subtitle tracks: "+s.join(", ")+". Replace media element for each source to clear TextTracks and captions menu.")}}else if(this.tracks.length){var l=this.tracks.map((function(e){return{label:e.name,kind:e.type.toLowerCase(),default:e.default,subtitleTrack:e}}));this.hls.trigger(b.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:l})}}},t.onManifestLoaded=function(e,t){var n=this;this.config.enableCEA708Captions&&t.captions&&t.captions.forEach((function(e){var t=/(?:CC|SERVICE)([1-4])/.exec(e.instreamId);if(t){var r="textTrack"+t[1],i=n.captionsProperties[r];i&&(i.label=e.name,e.lang&&(i.languageCode=e.lang),i.media=e)}}))},t.closedCaptionsForLevel=function(e){var t=this.hls.levels[e.level];return null==t?void 0:t.attrs["CLOSED-CAPTIONS"]},t.onFragLoading=function(e,t){this.initCea608Parsers();var n=this.cea608Parser1,r=this.cea608Parser2,i=this.lastCc,a=this.lastSn,o=this.lastPartIndex;if(this.enabled&&n&&r&&t.frag.type===Tt){var s,l,u=t.frag,c=u.cc,d=u.sn,p=null!=(s=null==t||null==(l=t.part)?void 0:l.index)?s:-1;d===a+1||d===a&&p===o+1||c===i||(n.reset(),r.reset()),this.lastCc=c,this.lastSn=d,this.lastPartIndex=p}},t.onFragLoaded=function(e,t){var n=t.frag,r=t.payload;if(n.type===St)if(r.byteLength){var i=n.decryptdata,a="stats"in t;if(null==i||!i.encrypted||a){var o=this.tracks[n.level],s=this.vttCCs;s[n.cc]||(s[n.cc]={start:n.start,prevCC:this.prevCC,new:!0},this.prevCC=n.cc),o&&o.textCodec===fa?this._parseIMSC1(n,r):this._parseVTTs(t)}}else this.hls.trigger(b.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:n,error:new Error("Empty subtitle payload")})},t._parseIMSC1=function(e,t){var n=this,r=this.hls;va(t,this.initPTS[e.cc],(function(t){n._appendCues(t,e.level),r.trigger(b.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:e})}),(function(t){w.log("Failed to parse IMSC1: "+t),r.trigger(b.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:e,error:t})}))},t._parseVTTs=function(e){var t,n=this,r=e.frag,i=e.payload,a=this.initPTS,o=this.unparsedVttFrags,s=a.length-1;if(a[r.cc]||-1!==s){var l=this.hls;!function(e,t,n,r,i,a,o){var s,l,u,c=new la,d=ge(new Uint8Array(e)).trim().replace(ua,"\n").split("\n"),p=[],f=t?(s=t.baseTime,void 0===(l=t.timescale)&&(l=1),Qr(s,9e4,1/l)):0,h="00:00.000",y=0,v=0,m=!0;c.oncue=function(e){var a=n[r],o=n.ccOffset,s=(y-f)/9e4;if(null!=a&&a.new&&(void 0!==v?o=n.ccOffset=a.start:function(e,t,n){var r=e[t],i=e[r.prevCC];if(!i||!i.new&&r.new)return e.ccOffset=e.presentationOffset=r.start,void(r.new=!1);for(;null!=(a=i)&&a.new;){var a;e.ccOffset+=r.start-i.start,r.new=!1,i=e[(r=i).prevCC]}e.presentationOffset=n}(n,r,s)),s){if(!t)return void(u=new Error("Missing initPTS for VTT MPEGTS"));o=s-n.presentationOffset}var l=e.endTime-e.startTime,c=ni(9e4*(e.startTime+o-v),9e4*i)/9e4;e.startTime=Math.max(c,0),e.endTime=Math.max(c+l,0);var d=e.text.trim();e.text=decodeURIComponent(encodeURIComponent(d)),e.id||(e.id=pa(e.startTime,e.endTime,d)),e.endTime>0&&p.push(e)},c.onparsingerror=function(e){u=e},c.onflush=function(){u?o(u):a(p)},d.forEach((function(e){if(m){if(ca(e,"X-TIMESTAMP-MAP=")){m=!1,e.slice(16).split(",").forEach((function(e){ca(e,"LOCAL:")?h=e.slice(6):ca(e,"MPEGTS:")&&(y=parseInt(e.slice(7)))}));try{v=function(e){var t=parseInt(e.slice(-3)),n=parseInt(e.slice(-6,-4)),r=parseInt(e.slice(-9,-7)),i=e.length>9?parseInt(e.substring(0,e.indexOf(":"))):0;if(!(g(t)&&g(n)&&g(r)&&g(i)))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+e);return t+=1e3*n,(t+=6e4*r)+36e5*i}(h)/1e3}catch(e){u=e}return}""===e&&(m=!1)}c.parse(e+"\n")})),c.flush()}(null!=(t=r.initSegment)&&t.data?Ne(r.initSegment.data,new Uint8Array(i)):i,this.initPTS[r.cc],this.vttCCs,r.cc,r.start,(function(e){n._appendCues(e,r.level),l.trigger(b.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:r})}),(function(t){var a="Missing initPTS for VTT MPEGTS"===t.message;a?o.push(e):n._fallbackToIMSC1(r,i),w.log("Failed to parse VTT cue: "+t),a&&s>r.cc||l.trigger(b.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:r,error:t})}))}else o.push(e)},t._fallbackToIMSC1=function(e,t){var n=this,r=this.tracks[e.level];r.textCodec||va(t,this.initPTS[e.cc],(function(){r.textCodec=fa,n._parseIMSC1(e,t)}),(function(){r.textCodec="wvtt"}))},t._appendCues=function(e,t){var n=this.hls;if(this.config.renderTextTracksNatively){var r=this.textTracks[t];if(!r||"disabled"===r.mode)return;e.forEach((function(e){return Rt(r,e)}))}else{var i=this.tracks[t];if(!i)return;var a=i.default?"default":"subtitles"+t;n.trigger(b.CUES_PARSED,{type:"subtitles",cues:e,track:a})}},t.onFragDecrypted=function(e,t){t.frag.type===St&&this.onFragLoaded(b.FRAG_LOADED,t)},t.onSubtitleTracksCleared=function(){this.tracks=[],this.captionsTracks={}},t.onFragParsingUserdata=function(e,t){this.initCea608Parsers();var n=this.cea608Parser1,r=this.cea608Parser2;if(this.enabled&&n&&r){var i=t.frag,a=t.samples;if(i.type!==Tt||"NONE"!==this.closedCaptionsForLevel(i))for(var o=0;o<a.length;o++){var s=a[o].bytes;if(s){var l=this.extractCea608Data(s);n.addData(a[o].pts,l[0]),r.addData(a[o].pts,l[1])}}}},t.onBufferFlushing=function(e,t){var n=t.startOffset,r=t.endOffset,i=t.endOffsetSubtitles,a=t.type,o=this.media;if(o&&!(o.currentTime<r)){if(!a||"video"===a){var s=this.captionsTracks;Object.keys(s).forEach((function(e){return Dt(s[e],n,r)}))}if(this.config.renderTextTracksNatively&&0===n&&void 0!==i){var l=this.textTracks;Object.keys(l).forEach((function(e){return Dt(l[e],n,i)}))}}},t.extractCea608Data=function(e){for(var t=[[],[]],n=31&e[0],r=2,i=0;i<n;i++){var a=e[r++],o=127&e[r++],s=127&e[r++];if((0!==o||0!==s)&&0!=(4&a)){var l=3&a;0!==l&&1!==l||(t[l].push(o),t[l].push(s))}}return t},e}();function Sa(e){return e.characteristics&&/transcribes-spoken-dialog/gi.test(e.characteristics)&&/describes-music-and-sound/gi.test(e.characteristics)?"captions":"subtitles"}function wa(e,t){return!!e&&e.kind===Sa(t)&&Ti(t,e)}var Ca=function(){function e(e){this.hls=void 0,this.autoLevelCapping=void 0,this.firstLevel=void 0,this.media=void 0,this.restrictedLevels=void 0,this.timer=void 0,this.clientRect=void 0,this.streamController=void 0,this.hls=e,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.firstLevel=-1,this.media=null,this.restrictedLevels=[],this.timer=void 0,this.clientRect=null,this.registerListeners()}var t=e.prototype;return t.setStreamController=function(e){this.streamController=e},t.destroy=function(){this.hls&&this.unregisterListener(),this.timer&&this.stopCapping(),this.media=null,this.clientRect=null,this.hls=this.streamController=null},t.registerListeners=function(){var e=this.hls;e.on(b.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),e.on(b.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(b.MANIFEST_PARSED,this.onManifestParsed,this),e.on(b.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(b.BUFFER_CODECS,this.onBufferCodecs,this),e.on(b.MEDIA_DETACHING,this.onMediaDetaching,this)},t.unregisterListener=function(){var e=this.hls;e.off(b.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),e.off(b.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(b.MANIFEST_PARSED,this.onManifestParsed,this),e.off(b.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(b.BUFFER_CODECS,this.onBufferCodecs,this),e.off(b.MEDIA_DETACHING,this.onMediaDetaching,this)},t.onFpsDropLevelCapping=function(e,t){var n=this.hls.levels[t.droppedLevel];this.isLevelAllowed(n)&&this.restrictedLevels.push({bitrate:n.bitrate,height:n.height,width:n.width})},t.onMediaAttaching=function(e,t){this.media=t.media instanceof HTMLVideoElement?t.media:null,this.clientRect=null,this.timer&&this.hls.levels.length&&this.detectPlayerSize()},t.onManifestParsed=function(e,t){var n=this.hls;this.restrictedLevels=[],this.firstLevel=t.firstLevel,n.config.capLevelToPlayerSize&&t.video&&this.startCapping()},t.onLevelsUpdated=function(e,t){this.timer&&g(this.autoLevelCapping)&&this.detectPlayerSize()},t.onBufferCodecs=function(e,t){this.hls.config.capLevelToPlayerSize&&t.video&&this.startCapping()},t.onMediaDetaching=function(){this.stopCapping()},t.detectPlayerSize=function(){if(this.media){if(this.mediaHeight<=0||this.mediaWidth<=0)return void(this.clientRect=null);var e=this.hls.levels;if(e.length){var t=this.hls,n=this.getMaxLevel(e.length-1);n!==this.autoLevelCapping&&w.log("Setting autoLevelCapping to "+n+": "+e[n].height+"p@"+e[n].bitrate+" for media "+this.mediaWidth+"x"+this.mediaHeight),t.autoLevelCapping=n,t.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=t.autoLevelCapping}}},t.getMaxLevel=function(t){var n=this,r=this.hls.levels;if(!r.length)return-1;var i=r.filter((function(e,r){return n.isLevelAllowed(e)&&r<=t}));return this.clientRect=null,e.getMaxLevelByMediaSize(i,this.mediaWidth,this.mediaHeight)},t.startCapping=function(){this.timer||(this.autoLevelCapping=Number.POSITIVE_INFINITY,self.clearInterval(this.timer),this.timer=self.setInterval(this.detectPlayerSize.bind(this),1e3),this.detectPlayerSize())},t.stopCapping=function(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)},t.getDimensions=function(){if(this.clientRect)return this.clientRect;var e=this.media,t={width:0,height:0};if(e){var n=e.getBoundingClientRect();t.width=n.width,t.height=n.height,t.width||t.height||(t.width=n.right-n.left||e.width||0,t.height=n.bottom-n.top||e.height||0)}return this.clientRect=t,t},t.isLevelAllowed=function(e){return!this.restrictedLevels.some((function(t){return e.bitrate===t.bitrate&&e.width===t.width&&e.height===t.height}))},e.getMaxLevelByMediaSize=function(e,t,n){if(null==e||!e.length)return-1;for(var r,i,a=e.length-1,o=Math.max(t,n),s=0;s<e.length;s+=1){var l=e[s];if((l.width>=o||l.height>=o)&&(r=l,!(i=e[s+1])||r.width!==i.width||r.height!==i.height)){a=s;break}}return a},o(e,[{key:"mediaWidth",get:function(){return this.getDimensions().width*this.contentScaleFactor}},{key:"mediaHeight",get:function(){return this.getDimensions().height*this.contentScaleFactor}},{key:"contentScaleFactor",get:function(){var e=1;if(!this.hls.config.ignoreDevicePixelRatio)try{e=self.devicePixelRatio}catch(e){}return e}}]),e}(),xa=function(){function e(e){this.hls=void 0,this.isVideoPlaybackQualityAvailable=!1,this.timer=void 0,this.media=null,this.lastTime=void 0,this.lastDroppedFrames=0,this.lastDecodedFrames=0,this.streamController=void 0,this.hls=e,this.registerListeners()}var t=e.prototype;return t.setStreamController=function(e){this.streamController=e},t.registerListeners=function(){this.hls.on(b.MEDIA_ATTACHING,this.onMediaAttaching,this)},t.unregisterListeners=function(){this.hls.off(b.MEDIA_ATTACHING,this.onMediaAttaching,this)},t.destroy=function(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null},t.onMediaAttaching=function(e,t){var n=this.hls.config;if(n.capLevelOnFPSDrop){var r=t.media instanceof self.HTMLVideoElement?t.media:null;this.media=r,r&&"function"==typeof r.getVideoPlaybackQuality&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),n.fpsDroppedMonitoringPeriod)}},t.checkFPS=function(e,t,n){var r=performance.now();if(t){if(this.lastTime){var i=r-this.lastTime,a=n-this.lastDroppedFrames,o=t-this.lastDecodedFrames,s=1e3*a/i,l=this.hls;if(l.trigger(b.FPS_DROP,{currentDropped:a,currentDecoded:o,totalDroppedFrames:n}),s>0&&a>l.config.fpsDroppedMonitoringThreshold*o){var u=l.currentLevel;w.warn("drop FPS ratio greater than max allowed value for currentLevel: "+u),u>0&&(-1===l.autoLevelCapping||l.autoLevelCapping>=u)&&(u-=1,l.trigger(b.FPS_DROP_LEVEL_CAPPING,{level:u,droppedLevel:l.currentLevel}),l.autoLevelCapping=u,this.streamController.nextLevelSwitch())}}this.lastTime=r,this.lastDroppedFrames=n,this.lastDecodedFrames=t}},t.checkFPSInterval=function(){var e=this.media;if(e)if(this.isVideoPlaybackQualityAvailable){var t=e.getVideoPlaybackQuality();this.checkFPS(e,t.totalVideoFrames,t.droppedVideoFrames)}else this.checkFPS(e,e.webkitDecodedFrameCount,e.webkitDroppedFrameCount)},e}(),Pa="[eme]",Ra=function(){function e(t){this.hls=void 0,this.config=void 0,this.media=null,this.keyFormatPromise=null,this.keySystemAccessPromises={},this._requestLicenseFailureCount=0,this.mediaKeySessions=[],this.keyIdToKeySessionPromise={},this.setMediaKeysQueue=e.CDMCleanupPromise?[e.CDMCleanupPromise]:[],this.onMediaEncrypted=this._onMediaEncrypted.bind(this),this.onWaitingForKey=this._onWaitingForKey.bind(this),this.debug=w.debug.bind(w,Pa),this.log=w.log.bind(w,Pa),this.warn=w.warn.bind(w,Pa),this.error=w.error.bind(w,Pa),this.hls=t,this.config=t.config,this.registerListeners()}var t=e.prototype;return t.destroy=function(){this.unregisterListeners(),this.onMediaDetached();var e=this.config;e.requestMediaKeySystemAccessFunc=null,e.licenseXhrSetup=e.licenseResponseCallback=void 0,e.drmSystems=e.drmSystemOptions={},this.hls=this.onMediaEncrypted=this.onWaitingForKey=this.keyIdToKeySessionPromise=null,this.config=null},t.registerListeners=function(){this.hls.on(b.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(b.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(b.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(b.MANIFEST_LOADED,this.onManifestLoaded,this)},t.unregisterListeners=function(){this.hls.off(b.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(b.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(b.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.off(b.MANIFEST_LOADED,this.onManifestLoaded,this)},t.getLicenseServerUrl=function(e){var t=this.config,n=t.drmSystems,r=t.widevineLicenseUrl,i=n[e];if(i)return i.licenseUrl;if(e===G.WIDEVINE&&r)return r;throw new Error('no license server URL configured for key-system "'+e+'"')},t.getServerCertificateUrl=function(e){var t=this.config.drmSystems[e];if(t)return t.serverCertificateUrl;this.log('No Server Certificate in config.drmSystems["'+e+'"]')},t.attemptKeySystemAccess=function(e){var t=this,n=this.hls.levels,r=function(e,t,n){return!!e&&n.indexOf(e)===t},i=n.map((function(e){return e.audioCodec})).filter(r),a=n.map((function(e){return e.videoCodec})).filter(r);return i.length+a.length===0&&a.push("avc1.42e01e"),new Promise((function(n,r){!function e(o){var s=o.shift();t.getMediaKeysPromise(s,i,a).then((function(e){return n({keySystem:s,mediaKeys:e})})).catch((function(t){o.length?e(o):r(t instanceof Ma?t:new Ma({type:k.KEY_SYSTEM_ERROR,details:E.KEY_SYSTEM_NO_ACCESS,error:t,fatal:!0},t.message))}))}(e)}))},t.requestMediaKeySystemAccess=function(e,t){var n=this.config.requestMediaKeySystemAccessFunc;if("function"!=typeof n){var r="Configured requestMediaKeySystemAccess is not a function "+n;return null===J&&"http:"===self.location.protocol&&(r="navigator.requestMediaKeySystemAccess is not available over insecure protocol "+location.protocol),Promise.reject(new Error(r))}return n(e,t)},t.getMediaKeysPromise=function(e,t,n){var r=this,i=function(e,t,n,r){var i;switch(e){case G.FAIRPLAY:i=["cenc","sinf"];break;case G.WIDEVINE:case G.PLAYREADY:i=["cenc"];break;case G.CLEARKEY:i=["cenc","keyids"];break;default:throw new Error("Unknown key-system: "+e)}return function(e,t,n,r){return[{initDataTypes:e,persistentState:r.persistentState||"optional",distinctiveIdentifier:r.distinctiveIdentifier||"optional",sessionTypes:r.sessionTypes||[r.sessionType||"temporary"],audioCapabilities:t.map((function(e){return{contentType:'audio/mp4; codecs="'+e+'"',robustness:r.audioRobustness||"",encryptionScheme:r.audioEncryptionScheme||null}})),videoCapabilities:n.map((function(e){return{contentType:'video/mp4; codecs="'+e+'"',robustness:r.videoRobustness||"",encryptionScheme:r.videoEncryptionScheme||null}}))}]}(i,t,n,r)}(e,t,n,this.config.drmSystemOptions),a=this.keySystemAccessPromises[e],o=null==a?void 0:a.keySystemAccess;if(!o){this.log('Requesting encrypted media "'+e+'" key-system access with config: '+JSON.stringify(i)),o=this.requestMediaKeySystemAccess(e,i);var s=this.keySystemAccessPromises[e]={keySystemAccess:o};return o.catch((function(t){r.log('Failed to obtain access to key-system "'+e+'": '+t)})),o.then((function(t){r.log('Access for key-system "'+t.keySystem+'" obtained');var n=r.fetchServerCertificate(e);return r.log('Create media-keys for "'+e+'"'),s.mediaKeys=t.createMediaKeys().then((function(t){return r.log('Media-keys created for "'+e+'"'),n.then((function(n){return n?r.setMediaKeysServerCertificate(t,e,n):t}))})),s.mediaKeys.catch((function(t){r.error('Failed to create media-keys for "'+e+'"}: '+t)})),s.mediaKeys}))}return o.then((function(){return a.mediaKeys}))},t.createMediaKeySessionContext=function(e){var t=e.decryptdata,n=e.keySystem,r=e.mediaKeys;this.log('Creating key-system session "'+n+'" keyId: '+ve(t.keyId||[]));var i=r.createSession(),a={decryptdata:t,keySystem:n,mediaKeys:r,mediaKeysSession:i,keyStatus:"status-pending"};return this.mediaKeySessions.push(a),a},t.renewKeySession=function(e){var t=e.decryptdata;if(t.pssh){var n=this.createMediaKeySessionContext(e),r=this.getKeyIdString(t);this.keyIdToKeySessionPromise[r]=this.generateRequestWithPreferredKeySession(n,"cenc",t.pssh,"expired")}else this.warn("Could not renew expired session. Missing pssh initData.");this.removeSession(e)},t.getKeyIdString=function(e){if(!e)throw new Error("Could not read keyId of undefined decryptdata");if(null===e.keyId)throw new Error("keyId is null");return ve(e.keyId)},t.updateKeySession=function(e,t){var n,r=e.mediaKeysSession;return this.log('Updating key-session "'+r.sessionId+'" for keyID '+ve((null==(n=e.decryptdata)?void 0:n.keyId)||[])+"\n      } (data length: "+(t?t.byteLength:t)+")"),r.update(t)},t.selectKeySystemFormat=function(e){var t=Object.keys(e.levelkeys||{});return this.keyFormatPromise||(this.log("Selecting key-system from fragment (sn: "+e.sn+" "+e.type+": "+e.level+") key formats "+t.join(", ")),this.keyFormatPromise=this.getKeyFormatPromise(t)),this.keyFormatPromise},t.getKeyFormatPromise=function(e){var t=this;return new Promise((function(n,r){var i=Q(t.config),a=e.map(Z).filter((function(e){return!!e&&-1!==i.indexOf(e)}));return t.getKeySystemSelectionPromise(a).then((function(e){var t=e.keySystem,i=X(t);i?n(i):r(new Error('Unable to find format for key-system "'+t+'"'))})).catch(r)}))},t.loadKey=function(e){var t=this,n=e.keyInfo.decryptdata,r=this.getKeyIdString(n),i="(keyId: "+r+' format: "'+n.keyFormat+'" method: '+n.method+" uri: "+n.uri+")";this.log("Starting session for key "+i);var a=this.keyIdToKeySessionPromise[r];return a||(a=this.keyIdToKeySessionPromise[r]=this.getKeySystemForKeyPromise(n).then((function(r){var a=r.keySystem,o=r.mediaKeys;return t.throwIfDestroyed(),t.log("Handle encrypted media sn: "+e.frag.sn+" "+e.frag.type+": "+e.frag.level+" using key "+i),t.attemptSetMediaKeys(a,o).then((function(){t.throwIfDestroyed();var e=t.createMediaKeySessionContext({keySystem:a,mediaKeys:o,decryptdata:n});return t.generateRequestWithPreferredKeySession(e,"cenc",n.pssh,"playlist-key")}))}))).catch((function(e){return t.handleError(e)})),a},t.throwIfDestroyed=function(e){if(!this.hls)throw new Error("invalid state")},t.handleError=function(e){this.hls&&(this.error(e.message),e instanceof Ma?this.hls.trigger(b.ERROR,e.data):this.hls.trigger(b.ERROR,{type:k.KEY_SYSTEM_ERROR,details:E.KEY_SYSTEM_NO_KEYS,error:e,fatal:!0}))},t.getKeySystemForKeyPromise=function(e){var t=this.getKeyIdString(e),n=this.keyIdToKeySessionPromise[t];if(!n){var r=Z(e.keyFormat),i=r?[r]:Q(this.config);return this.attemptKeySystemAccess(i)}return n},t.getKeySystemSelectionPromise=function(e){if(e.length||(e=Q(this.config)),0===e.length)throw new Ma({type:k.KEY_SYSTEM_ERROR,details:E.KEY_SYSTEM_NO_CONFIGURED_LICENSE,fatal:!0},"Missing key-system license configuration options "+JSON.stringify({drmSystems:this.config.drmSystems}));return this.attemptKeySystemAccess(e)},t._onMediaEncrypted=function(e){var t=this,n=e.initDataType,r=e.initData;if(this.debug('"'+e.type+'" event: init data type: "'+n+'"'),null!==r){var i,a;if("sinf"===n&&this.config.drmSystems[G.FAIRPLAY]){var o=Ee(new Uint8Array(r));try{var s=j(JSON.parse(o).sinf),l=Le(new Uint8Array(s));if(!l)return;i=l.subarray(8,24),a=G.FAIRPLAY}catch(e){return void this.warn('Failed to parse sinf "encrypted" event message initData')}}else{var u=function(e){if(!(e instanceof ArrayBuffer)||e.byteLength<32)return null;var t={version:0,systemId:"",kids:null,data:null},n=new DataView(e),r=n.getUint32(0);if(e.byteLength!==r&&r>44)return null;if(1886614376!==n.getUint32(4))return null;if(t.version=n.getUint32(8)>>>24,t.version>1)return null;t.systemId=ve(new Uint8Array(e,12,16));var i=n.getUint32(28);if(0===t.version){if(r-32<i)return null;t.data=new Uint8Array(e,32,i)}else if(1===t.version){t.kids=[];for(var a=0;a<i;a++)t.kids.push(new Uint8Array(e,32+16*a,16))}return t}(r);if(null===u)return;0===u.version&&u.systemId===q&&u.data&&(i=u.data.subarray(8,24)),a=function(e){if(e===q)return G.WIDEVINE}(u.systemId)}if(a&&i){for(var c,d=ve(i),p=this.keyIdToKeySessionPromise,f=this.mediaKeySessions,h=p[d],y=function(){var e=f[g],a=e.decryptdata;if(a.pssh||!a.keyId)return 0;var o=ve(a.keyId);return d===o||-1!==a.uri.replace(/-/g,"").indexOf(d)?(h=p[o],delete p[o],a.pssh=new Uint8Array(r),a.keyId=i,h=p[d]=h.then((function(){return t.generateRequestWithPreferredKeySession(e,n,r,"encrypted-event-key-match")})),1):void 0},g=0;g<f.length&&(0===(c=y())||1!==c);g++);h||(h=p[d]=this.getKeySystemSelectionPromise([a]).then((function(e){var a,o=e.keySystem,s=e.mediaKeys;t.throwIfDestroyed();var l=new Ve("ISO-23001-7",d,null!=(a=X(o))?a:"");return l.pssh=new Uint8Array(r),l.keyId=i,t.attemptSetMediaKeys(o,s).then((function(){t.throwIfDestroyed();var e=t.createMediaKeySessionContext({decryptdata:l,keySystem:o,mediaKeys:s});return t.generateRequestWithPreferredKeySession(e,n,r,"encrypted-event-no-match")}))}))),h.catch((function(e){return t.handleError(e)}))}}},t._onWaitingForKey=function(e){this.log('"'+e.type+'" event')},t.attemptSetMediaKeys=function(e,t){var n=this,r=this.setMediaKeysQueue.slice();this.log('Setting media-keys for "'+e+'"');var i=Promise.all(r).then((function(){if(!n.media)throw new Error("Attempted to set mediaKeys without media element attached");return n.media.setMediaKeys(t)}));return this.setMediaKeysQueue.push(i),i.then((function(){n.log('Media-keys set for "'+e+'"'),r.push(i),n.setMediaKeysQueue=n.setMediaKeysQueue.filter((function(e){return-1===r.indexOf(e)}))}))},t.generateRequestWithPreferredKeySession=function(e,t,n,r){var i,a,o=this,s=null==(i=this.config.drmSystems)||null==(a=i[e.keySystem])?void 0:a.generateRequest;if(s)try{var l=s.call(this.hls,t,n,e);if(!l)throw new Error("Invalid response from configured generateRequest filter");t=l.initDataType,n=e.decryptdata.pssh=l.initData?new Uint8Array(l.initData):null}catch(e){var u;if(this.warn(e.message),null!=(u=this.hls)&&u.config.debug)throw e}if(null===n)return this.log('Skipping key-session request for "'+r+'" (no initData)'),Promise.resolve(e);var c=this.getKeyIdString(e.decryptdata);this.log('Generating key-session request for "'+r+'": '+c+" (init data type: "+t+" length: "+(n?n.byteLength:null)+")");var d=new gi,p=e._onmessage=function(t){var n=e.mediaKeysSession;if(n){var r=t.messageType,i=t.message;o.log('"'+r+'" message event for session "'+n.sessionId+'" message size: '+i.byteLength),"license-request"===r||"license-renewal"===r?o.renewLicense(e,i).catch((function(e){o.handleError(e),d.emit("error",e)})):"license-release"===r?e.keySystem===G.FAIRPLAY&&(o.updateKeySession(e,H("acknowledged")),o.removeSession(e)):o.warn('unhandled media key message type "'+r+'"')}else d.emit("error",new Error("invalid state"))},f=e._onkeystatuseschange=function(t){if(e.mediaKeysSession){o.onKeyStatusChange(e);var n=e.keyStatus;d.emit("keyStatus",n),"expired"===n&&(o.warn(e.keySystem+" expired for key "+c),o.renewKeySession(e))}else d.emit("error",new Error("invalid state"))};e.mediaKeysSession.addEventListener("message",p),e.mediaKeysSession.addEventListener("keystatuseschange",f);var h=new Promise((function(e,t){d.on("error",t),d.on("keyStatus",(function(n){n.startsWith("usable")?e():"output-restricted"===n?t(new Ma({type:k.KEY_SYSTEM_ERROR,details:E.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED,fatal:!1},"HDCP level output restricted")):"internal-error"===n?t(new Ma({type:k.KEY_SYSTEM_ERROR,details:E.KEY_SYSTEM_STATUS_INTERNAL_ERROR,fatal:!0},'key status changed to "'+n+'"')):"expired"===n?t(new Error("key expired while generating request")):o.warn('unhandled key status change "'+n+'"')}))}));return e.mediaKeysSession.generateRequest(t,n).then((function(){var t;o.log('Request generated for key-session "'+(null==(t=e.mediaKeysSession)?void 0:t.sessionId)+'" keyId: '+c)})).catch((function(e){throw new Ma({type:k.KEY_SYSTEM_ERROR,details:E.KEY_SYSTEM_NO_SESSION,error:e,fatal:!1},"Error generating key-session request: "+e)})).then((function(){return h})).catch((function(t){throw d.removeAllListeners(),o.removeSession(e),t})).then((function(){return d.removeAllListeners(),e}))},t.onKeyStatusChange=function(e){var t=this;e.mediaKeysSession.keyStatuses.forEach((function(n,r){t.log('key status change "'+n+'" for keyStatuses keyId: '+ve("buffer"in r?new Uint8Array(r.buffer,r.byteOffset,r.byteLength):new Uint8Array(r))+" session keyId: "+ve(new Uint8Array(e.decryptdata.keyId||[]))+" uri: "+e.decryptdata.uri),e.keyStatus=n}))},t.fetchServerCertificate=function(e){var t=this.config,n=new(0,t.loader)(t),i=this.getServerCertificateUrl(e);return i?(this.log('Fetching server certificate for "'+e+'"'),new Promise((function(a,o){var s={responseType:"arraybuffer",url:i},l=t.certLoadPolicy.default,u={loadPolicy:l,timeout:l.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},c={onSuccess:function(e,t,n,r){a(e.data)},onError:function(t,n,a,l){o(new Ma({type:k.KEY_SYSTEM_ERROR,details:E.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:a,response:r({url:s.url,data:void 0},t)},'"'+e+'" certificate request failed ('+i+"). Status: "+t.code+" ("+t.text+")"))},onTimeout:function(t,n,r){o(new Ma({type:k.KEY_SYSTEM_ERROR,details:E.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:r,response:{url:s.url,data:void 0}},'"'+e+'" certificate request timed out ('+i+")"))},onAbort:function(e,t,n){o(new Error("aborted"))}};n.load(s,u,c)}))):Promise.resolve()},t.setMediaKeysServerCertificate=function(e,t,n){var r=this;return new Promise((function(i,a){e.setServerCertificate(n).then((function(a){r.log("setServerCertificate "+(a?"success":"not supported by CDM")+" ("+(null==n?void 0:n.byteLength)+') on "'+t+'"'),i(e)})).catch((function(e){a(new Ma({type:k.KEY_SYSTEM_ERROR,details:E.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED,error:e,fatal:!0},e.message))}))}))},t.renewLicense=function(e,t){var n=this;return this.requestLicense(e,new Uint8Array(t)).then((function(t){return n.updateKeySession(e,new Uint8Array(t)).catch((function(e){throw new Ma({type:k.KEY_SYSTEM_ERROR,details:E.KEY_SYSTEM_SESSION_UPDATE_FAILED,error:e,fatal:!0},e.message)}))}))},t.unpackPlayReadyKeyMessage=function(e,t){var n=String.fromCharCode.apply(null,new Uint16Array(t.buffer));if(!n.includes("PlayReadyKeyMessage"))return e.setRequestHeader("Content-Type","text/xml; charset=utf-8"),t;var r=(new DOMParser).parseFromString(n,"application/xml"),i=r.querySelectorAll("HttpHeader");if(i.length>0)for(var a,o=0,s=i.length;o<s;o++){var l,u,c=null==(l=(a=i[o]).querySelector("name"))?void 0:l.textContent,d=null==(u=a.querySelector("value"))?void 0:u.textContent;c&&d&&e.setRequestHeader(c,d)}var p=r.querySelector("Challenge"),f=null==p?void 0:p.textContent;if(!f)throw new Error("Cannot find <Challenge> in key message");return H(atob(f))},t.setupLicenseXHR=function(e,t,n,r){var i=this,a=this.config.licenseXhrSetup;return a?Promise.resolve().then((function(){if(!n.decryptdata)throw new Error("Key removed");return a.call(i.hls,e,t,n,r)})).catch((function(o){if(!n.decryptdata)throw o;return e.open("POST",t,!0),a.call(i.hls,e,t,n,r)})).then((function(n){return e.readyState||e.open("POST",t,!0),{xhr:e,licenseChallenge:n||r}})):(e.open("POST",t,!0),Promise.resolve({xhr:e,licenseChallenge:r}))},t.requestLicense=function(e,t){var n=this,r=this.config.keyLoadPolicy.default;return new Promise((function(i,a){var o=n.getLicenseServerUrl(e.keySystem);n.log("Sending license request to URL: "+o);var s=new XMLHttpRequest;s.responseType="arraybuffer",s.onreadystatechange=function(){if(!n.hls||!e.mediaKeysSession)return a(new Error("invalid state"));if(4===s.readyState)if(200===s.status){n._requestLicenseFailureCount=0;var l=s.response;n.log("License received "+(l instanceof ArrayBuffer?l.byteLength:l));var u=n.config.licenseResponseCallback;if(u)try{l=u.call(n.hls,s,o,e)}catch(e){n.error(e)}i(l)}else{var c=r.errorRetry,d=c?c.maxNumRetry:0;if(n._requestLicenseFailureCount++,n._requestLicenseFailureCount>d||s.status>=400&&s.status<500)a(new Ma({type:k.KEY_SYSTEM_ERROR,details:E.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0,networkDetails:s,response:{url:o,data:void 0,code:s.status,text:s.statusText}},"License Request XHR failed ("+o+"). Status: "+s.status+" ("+s.statusText+")"));else{var p=d-n._requestLicenseFailureCount+1;n.warn("Retrying license request, "+p+" attempts left"),n.requestLicense(e,t).then(i,a)}}},e.licenseXhr&&e.licenseXhr.readyState!==XMLHttpRequest.DONE&&e.licenseXhr.abort(),e.licenseXhr=s,n.setupLicenseXHR(s,o,e,t).then((function(t){var r=t.xhr,i=t.licenseChallenge;e.keySystem==G.PLAYREADY&&(i=n.unpackPlayReadyKeyMessage(r,i)),r.send(i)}))}))},t.onMediaAttached=function(e,t){if(this.config.emeEnabled){var n=t.media;this.media=n,n.addEventListener("encrypted",this.onMediaEncrypted),n.addEventListener("waitingforkey",this.onWaitingForKey)}},t.onMediaDetached=function(){var t=this,n=this.media,r=this.mediaKeySessions;n&&(n.removeEventListener("encrypted",this.onMediaEncrypted),n.removeEventListener("waitingforkey",this.onWaitingForKey),this.media=null),this._requestLicenseFailureCount=0,this.setMediaKeysQueue=[],this.mediaKeySessions=[],this.keyIdToKeySessionPromise={},Ve.clearKeyUriToKeyIdMap();var i=r.length;e.CDMCleanupPromise=Promise.all(r.map((function(e){return t.removeSession(e)})).concat(null==n?void 0:n.setMediaKeys(null).catch((function(e){t.log("Could not clear media keys: "+e)})))).then((function(){i&&(t.log("finished closing key sessions and clearing media keys"),r.length=0)})).catch((function(e){t.log("Could not close sessions and clear media keys: "+e)}))},t.onManifestLoading=function(){this.keyFormatPromise=null},t.onManifestLoaded=function(e,t){var n=t.sessionKeys;if(n&&this.config.emeEnabled&&!this.keyFormatPromise){var r=n.reduce((function(e,t){return-1===e.indexOf(t.keyFormat)&&e.push(t.keyFormat),e}),[]);this.log("Selecting key-system from session-keys "+r.join(", ")),this.keyFormatPromise=this.getKeyFormatPromise(r)}},t.removeSession=function(e){var t=this,n=e.mediaKeysSession,r=e.licenseXhr;if(n){this.log("Remove licenses and keys and close session "+n.sessionId),e._onmessage&&(n.removeEventListener("message",e._onmessage),e._onmessage=void 0),e._onkeystatuseschange&&(n.removeEventListener("keystatuseschange",e._onkeystatuseschange),e._onkeystatuseschange=void 0),r&&r.readyState!==XMLHttpRequest.DONE&&r.abort(),e.mediaKeysSession=e.decryptdata=e.licenseXhr=void 0;var i=this.mediaKeySessions.indexOf(e);return i>-1&&this.mediaKeySessions.splice(i,1),n.remove().catch((function(e){t.log("Could not remove session: "+e)})).then((function(){return n.close()})).catch((function(e){t.log("Could not close session: "+e)}))}},e}();Ra.CDMCleanupPromise=void 0;var Ia,Da,Oa,La,Ma=function(e){function t(t,n){var r;return(r=e.call(this,n)||this).data=void 0,t.error||(t.error=new Error(n)),r.data=t,t.err=t.error,r}return l(t,e),t}(p(Error));!function(e){e.MANIFEST="m",e.AUDIO="a",e.VIDEO="v",e.MUXED="av",e.INIT="i",e.CAPTION="c",e.TIMED_TEXT="tt",e.KEY="k",e.OTHER="o"}(Ia||(Ia={})),function(e){e.DASH="d",e.HLS="h",e.SMOOTH="s",e.OTHER="o"}(Da||(Da={})),function(e){e.OBJECT="CMCD-Object",e.REQUEST="CMCD-Request",e.SESSION="CMCD-Session",e.STATUS="CMCD-Status"}(Oa||(Oa={}));var Na=((La={})[Oa.OBJECT]=["br","d","ot","tb"],La[Oa.REQUEST]=["bl","dl","mtp","nor","nrr","su"],La[Oa.SESSION]=["cid","pr","sf","sid","st","v"],La[Oa.STATUS]=["bs","rtp"],La),Ua=function e(t,n){this.value=void 0,this.params=void 0,Array.isArray(t)&&(t=t.map((function(t){return t instanceof e?t:new e(t)}))),this.value=t,this.params=n},Ba=function(e){this.description=void 0,this.description=e},Fa="Dict";var ja="Bare Item",Ha="Boolean",Va="Byte Sequence",Ga="Decimal",Ka="Integer",za=/[\x00-\x1f\x7f]+/,Wa="Token",Ya="Key";function Za(e,t,n){return function(e,t,n,r){return new Error("failed to "+e+' "'+(i=t,(Array.isArray(i)?JSON.stringify(i):i instanceof Map?"Map{}":i instanceof Set?"Set{}":"object"==typeof i?JSON.stringify(i):String(i))+'" as ')+n,{cause:r});var i}("serialize",e,t,n)}function qa(e){if(function(e){return e<-999999999999999||999999999999999<e}(e))throw Za(e,Ka);return e.toString()}function Xa(e,t){if(e<0)return-Xa(-e,t);var n=Math.pow(10,t);if(Math.abs(e*n%1-.5)<Number.EPSILON){var r=Math.floor(e*n);return(r%2==0?r:r+1)/n}return Math.round(e*n)/n}function Qa(e){var t=Xa(e,3);if(Math.floor(Math.abs(t)).toString().length>12)throw Za(e,Ga);var n=t.toString();return n.includes(".")?n:n+".0"}var $a="String";function Ja(e){var t,n=(t=e).description||t.toString().slice(7,-1);if(!1===/^([a-zA-Z*])([!#$%&'*+\-.^_`|~\w:/]*)$/.test(n))throw Za(n,Wa);return n}function eo(e){switch(typeof e){case"number":if(!g(e))throw Za(e,ja);return Number.isInteger(e)?qa(e):Qa(e);case"string":return function(e){if(za.test(e))throw Za(e,$a);return'"'+e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')+'"'}(e);case"symbol":return Ja(e);case"boolean":return function(e){if("boolean"!=typeof e)throw Za(e,Ha);return e?"?1":"?0"}(e);case"object":if(e instanceof Date)return function(e){return"@"+qa(e.getTime()/1e3)}(e);if(e instanceof Uint8Array)return function(e){if(!1===ArrayBuffer.isView(e))throw Za(e,Va);return":"+(t=e,btoa(String.fromCharCode.apply(String,t))+":");var t}(e);if(e instanceof Ba)return Ja(e);default:throw Za(e,ja)}}function to(e){if(!1===/^[a-z*][a-z0-9\-_.*]*$/.test(e))throw Za(e,Ya);return e}function no(e){return null==e?"":Object.entries(e).map((function(e){var t=e[0],n=e[1];return!0===n?";"+to(t):";"+to(t)+"="+eo(n)})).join("")}function ro(e){return e instanceof Ua?""+eo(e.value)+no(e.params):eo(e)}var io=function(e){return"ot"===e||"sf"===e||"st"===e},ao=function(e){return"number"==typeof e?g(e):null!=e&&""!==e&&!1!==e},oo=function(e){return Math.round(e)},so=function(e){return 100*oo(e/100)},lo={br:oo,d:oo,bl:so,dl:so,mtp:so,nor:function(e,t){return null!=t&&t.baseUrl&&(e=function(e,t){var n=new URL(e),r=new URL(t);if(n.origin!==r.origin)return e;for(var i=n.pathname.split("/").slice(1),a=r.pathname.split("/").slice(1,-1);i[0]===a[0];)i.shift(),a.shift();for(;a.length;)a.shift(),i.unshift("..");return i.join("/")}(e,t.baseUrl)),encodeURIComponent(e)},rtp:so,tb:oo};function uo(e,t){return void 0===t&&(t={}),e?function(e,t){return function(e,t){var n;if(void 0===t&&(t={whitespace:!0}),"object"!=typeof e)throw Za(e,Fa);var r=e instanceof Map?e.entries():Object.entries(e),i=null!=(n=t)&&n.whitespace?" ":"";return Array.from(r).map((function(e){var t=e[0],n=e[1];n instanceof Ua==0&&(n=new Ua(n));var r,i=to(t);return!0===n.value?i+=no(n.params):(i+="=",Array.isArray(n.value)?i+="("+(r=n).value.map(ro).join(" ")+")"+no(r.params):i+=ro(n)),i})).join(","+i)}(e,t)}(function(e,t){var n={};if(null==e||"object"!=typeof e)return n;var r=Object.keys(e).sort(),i=s({},lo,null==t?void 0:t.formatters),a=null==t?void 0:t.filter;return r.forEach((function(r){if(null==a||!a(r)){var o=e[r],s=i[r];s&&(o=s(o,t)),"v"===r&&1===o||"pr"==r&&1===o||ao(o)&&(io(r)&&"string"==typeof o&&(o=new Ba(o)),n[r]=o)}})),n}(e,t),s({whitespace:!1},t)):""}var co=/CMCD=[^&#]+/;var po=function(){function e(e){var t=this;this.hls=void 0,this.config=void 0,this.media=void 0,this.sid=void 0,this.cid=void 0,this.useHeaders=!1,this.includeKeys=void 0,this.initialized=!1,this.starved=!1,this.buffering=!0,this.audioBuffer=void 0,this.videoBuffer=void 0,this.onWaiting=function(){t.initialized&&(t.starved=!0),t.buffering=!0},this.onPlaying=function(){t.initialized||(t.initialized=!0),t.buffering=!1},this.applyPlaylistData=function(e){try{t.apply(e,{ot:Ia.MANIFEST,su:!t.initialized})}catch(e){w.warn("Could not generate manifest CMCD data.",e)}},this.applyFragmentData=function(e){try{var n=e.frag,r=t.hls.levels[n.level],i=t.getObjectType(n),a={d:1e3*n.duration,ot:i};i!==Ia.VIDEO&&i!==Ia.AUDIO&&i!=Ia.MUXED||(a.br=r.bitrate/1e3,a.tb=t.getTopBandwidth(i)/1e3,a.bl=t.getBufferLength(i)),t.apply(e,a)}catch(e){w.warn("Could not generate segment CMCD data.",e)}},this.hls=e;var n=this.config=e.config,r=n.cmcd;null!=r&&(n.pLoader=this.createPlaylistLoader(),n.fLoader=this.createFragmentLoader(),this.sid=r.sessionId||function(){try{return crypto.randomUUID()}catch(r){try{var e=URL.createObjectURL(new Blob),t=e.toString();return URL.revokeObjectURL(e),t.slice(t.lastIndexOf("/")+1)}catch(e){var n=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=(n+16*Math.random())%16|0;return n=Math.floor(n/16),("x"==e?t:3&t|8).toString(16)}))}}}(),this.cid=r.contentId,this.useHeaders=!0===r.useHeaders,this.includeKeys=r.includeKeys,this.registerListeners())}var t=e.prototype;return t.registerListeners=function(){var e=this.hls;e.on(b.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(b.MEDIA_DETACHED,this.onMediaDetached,this),e.on(b.BUFFER_CREATED,this.onBufferCreated,this)},t.unregisterListeners=function(){var e=this.hls;e.off(b.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(b.MEDIA_DETACHED,this.onMediaDetached,this),e.off(b.BUFFER_CREATED,this.onBufferCreated,this)},t.destroy=function(){this.unregisterListeners(),this.onMediaDetached(),this.hls=this.config=this.audioBuffer=this.videoBuffer=null,this.onWaiting=this.onPlaying=null},t.onMediaAttached=function(e,t){this.media=t.media,this.media.addEventListener("waiting",this.onWaiting),this.media.addEventListener("playing",this.onPlaying)},t.onMediaDetached=function(){this.media&&(this.media.removeEventListener("waiting",this.onWaiting),this.media.removeEventListener("playing",this.onPlaying),this.media=null)},t.onBufferCreated=function(e,t){var n,r;this.audioBuffer=null==(n=t.tracks.audio)?void 0:n.buffer,this.videoBuffer=null==(r=t.tracks.video)?void 0:r.buffer},t.createData=function(){var e;return{v:1,sf:Da.HLS,sid:this.sid,cid:this.cid,pr:null==(e=this.media)?void 0:e.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}},t.apply=function(e,t){void 0===t&&(t={}),s(t,this.createData());var n=t.ot===Ia.INIT||t.ot===Ia.VIDEO||t.ot===Ia.MUXED;this.starved&&n&&(t.bs=!0,t.su=!0,this.starved=!1),null==t.su&&(t.su=this.buffering);var r=this.includeKeys;r&&(t=Object.keys(t).reduce((function(e,n){return r.includes(n)&&(e[n]=t[n]),e}),{})),this.useHeaders?(e.headers||(e.headers={}),function(e,t,n){s(e,function(e,t){var n;if(void 0===t&&(t={}),!e)return{};var r=Object.entries(e),i=Object.entries(Na).concat(Object.entries((null==(n=t)?void 0:n.customHeaderMap)||{})),a=r.reduce((function(e,t){var n,r=t[0],a=t[1],o=(null==(n=i.find((function(e){return e[1].includes(r)})))?void 0:n[0])||Oa.REQUEST;return null!=e[o]||(e[o]={}),e[o][r]=a,e}),{});return Object.entries(a).reduce((function(e,n){var r=n[0],i=n[1];return e[r]=uo(i,t),e}),{})}(t,n))}(e.headers,t)):e.url=function(e,t,n){var r=function(e,t){if(void 0===t&&(t={}),!e)return"";var n=uo(e,t);return"CMCD="+encodeURIComponent(n)}(t,n);if(!r)return e;if(co.test(e))return e.replace(co,r);var i=e.includes("?")?"&":"?";return""+e+i+r}(e.url,t)},t.getObjectType=function(e){var t=e.type;return"subtitle"===t?Ia.TIMED_TEXT:"initSegment"===e.sn?Ia.INIT:"audio"===t?Ia.AUDIO:"main"===t?this.hls.audioTracks.length?Ia.VIDEO:Ia.MUXED:void 0},t.getTopBandwidth=function(e){var t,n=0,r=this.hls;if(e===Ia.AUDIO)t=r.audioTracks;else{var i=r.maxAutoLevel,a=i>-1?i+1:r.levels.length;t=r.levels.slice(0,a)}for(var o,s=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return f(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?f(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(t);!(o=s()).done;){var l=o.value;l.bitrate>n&&(n=l.bitrate)}return n>0?n:NaN},t.getBufferLength=function(e){var t=this.hls.media,n=e===Ia.AUDIO?this.audioBuffer:this.videoBuffer;return n&&t?1e3*Ln.bufferInfo(n,t.currentTime,this.config.maxBufferHole).len:NaN},t.createPlaylistLoader=function(){var e=this.config.pLoader,t=this.applyPlaylistData,n=e||this.config.loader;return function(){function e(e){this.loader=void 0,this.loader=new n(e)}var r=e.prototype;return r.destroy=function(){this.loader.destroy()},r.abort=function(){this.loader.abort()},r.load=function(e,n,r){t(e),this.loader.load(e,n,r)},o(e,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),e}()},t.createFragmentLoader=function(){var e=this.config.fLoader,t=this.applyFragmentData,n=e||this.config.loader;return function(){function e(e){this.loader=void 0,this.loader=new n(e)}var r=e.prototype;return r.destroy=function(){this.loader.destroy()},r.abort=function(){this.loader.abort()},r.load=function(e,n,r){t(e),this.loader.load(e,n,r)},o(e,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),e}()},e}(),fo=function(){function e(e){this.hls=void 0,this.log=void 0,this.loader=null,this.uri=null,this.pathwayId=".",this.pathwayPriority=null,this.timeToLoad=300,this.reloadTimer=-1,this.updated=0,this.started=!1,this.enabled=!0,this.levels=null,this.audioTracks=null,this.subtitleTracks=null,this.penalizedPathways={},this.hls=e,this.log=w.log.bind(w,"[content-steering]:"),this.registerListeners()}var t=e.prototype;return t.registerListeners=function(){var e=this.hls;e.on(b.MANIFEST_LOADING,this.onManifestLoading,this),e.on(b.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(b.MANIFEST_PARSED,this.onManifestParsed,this),e.on(b.ERROR,this.onError,this)},t.unregisterListeners=function(){var e=this.hls;e&&(e.off(b.MANIFEST_LOADING,this.onManifestLoading,this),e.off(b.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(b.MANIFEST_PARSED,this.onManifestParsed,this),e.off(b.ERROR,this.onError,this))},t.startLoad=function(){if(this.started=!0,this.clearTimeout(),this.enabled&&this.uri){if(this.updated){var e=1e3*this.timeToLoad-(performance.now()-this.updated);if(e>0)return void this.scheduleRefresh(this.uri,e)}this.loadSteeringManifest(this.uri)}},t.stopLoad=function(){this.started=!1,this.loader&&(this.loader.destroy(),this.loader=null),this.clearTimeout()},t.clearTimeout=function(){-1!==this.reloadTimer&&(self.clearTimeout(this.reloadTimer),this.reloadTimer=-1)},t.destroy=function(){this.unregisterListeners(),this.stopLoad(),this.hls=null,this.levels=this.audioTracks=this.subtitleTracks=null},t.removeLevel=function(e){var t=this.levels;t&&(this.levels=t.filter((function(t){return t!==e})))},t.onManifestLoading=function(){this.stopLoad(),this.enabled=!0,this.timeToLoad=300,this.updated=0,this.uri=null,this.pathwayId=".",this.levels=this.audioTracks=this.subtitleTracks=null},t.onManifestLoaded=function(e,t){var n=t.contentSteering;null!==n&&(this.pathwayId=n.pathwayId,this.uri=n.uri,this.started&&this.startLoad())},t.onManifestParsed=function(e,t){this.audioTracks=t.audioTracks,this.subtitleTracks=t.subtitleTracks},t.onError=function(e,t){var n=t.errorAction;if(2===(null==n?void 0:n.action)&&1===n.flags){var r=this.levels,i=this.pathwayPriority,a=this.pathwayId;if(t.context){var o=t.context,s=o.groupId,l=o.pathwayId,u=o.type;s&&r?a=this.getPathwayForGroupId(s,u,a):l&&(a=l)}a in this.penalizedPathways||(this.penalizedPathways[a]=performance.now()),!i&&r&&(i=r.reduce((function(e,t){return-1===e.indexOf(t.pathwayId)&&e.push(t.pathwayId),e}),[])),i&&i.length>1&&(this.updatePathwayPriority(i),n.resolved=this.pathwayId!==a),n.resolved||w.warn("Could not resolve "+t.details+' ("'+t.error.message+'") with content-steering for Pathway: '+a+" levels: "+(r?r.length:r)+" priorities: "+JSON.stringify(i)+" penalized: "+JSON.stringify(this.penalizedPathways))}},t.filterParsedLevels=function(e){this.levels=e;var t=this.getLevelsForPathway(this.pathwayId);if(0===t.length){var n=e[0].pathwayId;this.log("No levels found in Pathway "+this.pathwayId+'. Setting initial Pathway to "'+n+'"'),t=this.getLevelsForPathway(n),this.pathwayId=n}return t.length!==e.length?(this.log("Found "+t.length+"/"+e.length+' levels in Pathway "'+this.pathwayId+'"'),t):e},t.getLevelsForPathway=function(e){return null===this.levels?[]:this.levels.filter((function(t){return e===t.pathwayId}))},t.updatePathwayPriority=function(e){var t;this.pathwayPriority=e;var n=this.penalizedPathways,r=performance.now();Object.keys(n).forEach((function(e){r-n[e]>3e5&&delete n[e]}));for(var i=0;i<e.length;i++){var a=e[i];if(!(a in n)){if(a===this.pathwayId)return;var o=this.hls.nextLoadLevel,s=this.hls.levels[o];if((t=this.getLevelsForPathway(a)).length>0){this.log('Setting Pathway to "'+a+'"'),this.pathwayId=a,tn(t),this.hls.trigger(b.LEVELS_UPDATED,{levels:t});var l=this.hls.levels[o];s&&l&&this.levels&&(l.attrs["STABLE-VARIANT-ID"]!==s.attrs["STABLE-VARIANT-ID"]&&l.bitrate!==s.bitrate&&this.log("Unstable Pathways change from bitrate "+s.bitrate+" to "+l.bitrate),this.hls.nextLoadLevel=o);break}}}},t.getPathwayForGroupId=function(e,t,n){for(var r=this.getLevelsForPathway(n).concat(this.levels||[]),i=0;i<r.length;i++)if(t===Et&&r[i].hasAudioGroup(e)||t===_t&&r[i].hasSubtitleGroup(e))return r[i].pathwayId;return n},t.clonePathways=function(e){var t=this,n=this.levels;if(n){var r={},i={};e.forEach((function(e){var a=e.ID,o=e["BASE-ID"],s=e["URI-REPLACEMENT"];if(!n.some((function(e){return e.pathwayId===a}))){var l=t.getLevelsForPathway(o).map((function(e){var t=new P(e.attrs);t["PATHWAY-ID"]=a;var n=t.AUDIO&&t.AUDIO+"_clone_"+a,o=t.SUBTITLES&&t.SUBTITLES+"_clone_"+a;n&&(r[t.AUDIO]=n,t.AUDIO=n),o&&(i[t.SUBTITLES]=o,t.SUBTITLES=o);var l=yo(e.uri,t["STABLE-VARIANT-ID"],"PER-VARIANT-URIS",s),u=new Wt({attrs:t,audioCodec:e.audioCodec,bitrate:e.bitrate,height:e.height,name:e.name,url:l,videoCodec:e.videoCodec,width:e.width});if(e.audioGroups)for(var c=1;c<e.audioGroups.length;c++)u.addGroupId("audio",e.audioGroups[c]+"_clone_"+a);if(e.subtitleGroups)for(var d=1;d<e.subtitleGroups.length;d++)u.addGroupId("text",e.subtitleGroups[d]+"_clone_"+a);return u}));n.push.apply(n,l),ho(t.audioTracks,r,s,a),ho(t.subtitleTracks,i,s,a)}}))}},t.loadSteeringManifest=function(e){var t,n=this,r=this.hls.config,i=r.loader;this.loader&&this.loader.destroy(),this.loader=new i(r);try{t=new self.URL(e)}catch(t){return this.enabled=!1,void this.log("Failed to parse Steering Manifest URI: "+e)}if("data:"!==t.protocol){var a=0|(this.hls.bandwidthEstimate||r.abrEwmaDefaultEstimate);t.searchParams.set("_HLS_pathway",this.pathwayId),t.searchParams.set("_HLS_throughput",""+a)}var o={responseType:"json",url:t.href},s=r.steeringManifestLoadPolicy.default,l=s.errorRetry||s.timeoutRetry||{},u={loadPolicy:s,timeout:s.maxLoadTimeMs,maxRetry:l.maxNumRetry||0,retryDelay:l.retryDelayMs||0,maxRetryDelay:l.maxRetryDelayMs||0},c={onSuccess:function(e,r,i,a){n.log('Loaded steering manifest: "'+t+'"');var o=e.data;if(1===o.VERSION){n.updated=performance.now(),n.timeToLoad=o.TTL;var s=o["RELOAD-URI"],l=o["PATHWAY-CLONES"],u=o["PATHWAY-PRIORITY"];if(s)try{n.uri=new self.URL(s,t).href}catch(e){return n.enabled=!1,void n.log("Failed to parse Steering Manifest RELOAD-URI: "+s)}n.scheduleRefresh(n.uri||i.url),l&&n.clonePathways(l);var c={steeringManifest:o,url:t.toString()};n.hls.trigger(b.STEERING_MANIFEST_LOADED,c),u&&n.updatePathwayPriority(u)}else n.log("Steering VERSION "+o.VERSION+" not supported!")},onError:function(e,t,r,i){if(n.log("Error loading steering manifest: "+e.code+" "+e.text+" ("+t.url+")"),n.stopLoad(),410===e.code)return n.enabled=!1,void n.log("Steering manifest "+t.url+" no longer available");var a=1e3*n.timeToLoad;if(429!==e.code)n.scheduleRefresh(n.uri||t.url,a);else{var o=n.loader;if("function"==typeof(null==o?void 0:o.getResponseHeader)){var s=o.getResponseHeader("Retry-After");s&&(a=1e3*parseFloat(s))}n.log("Steering manifest "+t.url+" rate limited")}},onTimeout:function(e,t,r){n.log("Timeout loading steering manifest ("+t.url+")"),n.scheduleRefresh(n.uri||t.url)}};this.log("Requesting steering manifest: "+t),this.loader.load(o,u,c)},t.scheduleRefresh=function(e,t){var n=this;void 0===t&&(t=1e3*this.timeToLoad),this.clearTimeout(),this.reloadTimer=self.setTimeout((function(){var t,r=null==(t=n.hls)?void 0:t.media;!r||r.ended?n.scheduleRefresh(e,1e3*n.timeToLoad):n.loadSteeringManifest(e)}),t)},e}();function ho(e,t,n,r){e&&Object.keys(t).forEach((function(i){var a=e.filter((function(e){return e.groupId===i})).map((function(e){var a=s({},e);return a.details=void 0,a.attrs=new P(a.attrs),a.url=a.attrs.URI=yo(e.url,e.attrs["STABLE-RENDITION-ID"],"PER-RENDITION-URIS",n),a.groupId=a.attrs["GROUP-ID"]=t[i],a.attrs["PATHWAY-ID"]=r,a}));e.push.apply(e,a)}))}function yo(e,t,n,r){var i,a=r.HOST,o=r.PARAMS,s=r[n];t&&(i=null==s?void 0:s[t])&&(e=i);var l=new self.URL(e);return a&&!i&&(l.host=a),o&&Object.keys(o).sort().forEach((function(e){e&&l.searchParams.set(e,o[e])})),l.href}var go=/^age:\s*[\d.]+\s*$/im,vo=function(){function e(e){this.xhrSetup=void 0,this.requestTimeout=void 0,this.retryTimeout=void 0,this.retryDelay=void 0,this.config=null,this.callbacks=null,this.context=null,this.loader=null,this.stats=void 0,this.xhrSetup=e&&e.xhrSetup||null,this.stats=new D,this.retryDelay=0}var t=e.prototype;return t.destroy=function(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null,this.context=null,this.xhrSetup=null,this.stats=null},t.abortInternal=function(){var e=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),e&&(e.onreadystatechange=null,e.onprogress=null,4!==e.readyState&&(this.stats.aborted=!0,e.abort()))},t.abort=function(){var e;this.abortInternal(),null!=(e=this.callbacks)&&e.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)},t.load=function(e,t,n){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=e,this.config=t,this.callbacks=n,this.loadInternal()},t.loadInternal=function(){var e=this,t=this.config,n=this.context;if(t&&n){var r=this.loader=new self.XMLHttpRequest,i=this.stats;i.loading.first=0,i.loaded=0,i.aborted=!1;var a=this.xhrSetup;a?Promise.resolve().then((function(){if(!e.stats.aborted)return a(r,n.url)})).catch((function(e){return r.open("GET",n.url,!0),a(r,n.url)})).then((function(){e.stats.aborted||e.openAndSendXhr(r,n,t)})).catch((function(t){e.callbacks.onError({code:r.status,text:t.message},n,r,i)})):this.openAndSendXhr(r,n,t)}},t.openAndSendXhr=function(e,t,n){e.readyState||e.open("GET",t.url,!0);var r=t.headers,i=n.loadPolicy,a=i.maxTimeToFirstByteMs,o=i.maxLoadTimeMs;if(r)for(var s in r)e.setRequestHeader(s,r[s]);t.rangeEnd&&e.setRequestHeader("Range","bytes="+t.rangeStart+"-"+(t.rangeEnd-1)),e.onreadystatechange=this.readystatechange.bind(this),e.onprogress=this.loadprogress.bind(this),e.responseType=t.responseType,self.clearTimeout(this.requestTimeout),n.timeout=a&&g(a)?a:o,this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),n.timeout),e.send()},t.readystatechange=function(){var e=this.context,t=this.loader,n=this.stats;if(e&&t){var r=t.readyState,i=this.config;if(!n.aborted&&r>=2&&(0===n.loading.first&&(n.loading.first=Math.max(self.performance.now(),n.loading.start),i.timeout!==i.loadPolicy.maxLoadTimeMs&&(self.clearTimeout(this.requestTimeout),i.timeout=i.loadPolicy.maxLoadTimeMs,this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),i.loadPolicy.maxLoadTimeMs-(n.loading.first-n.loading.start)))),4===r)){self.clearTimeout(this.requestTimeout),t.onreadystatechange=null,t.onprogress=null;var a=t.status,o="text"!==t.responseType;if(a>=200&&a<300&&(o&&t.response||null!==t.responseText)){n.loading.end=Math.max(self.performance.now(),n.loading.first);var s=o?t.response:t.responseText,l="arraybuffer"===t.responseType?s.byteLength:s.length;if(n.loaded=n.total=l,n.bwEstimate=8e3*n.total/(n.loading.end-n.loading.first),!this.callbacks)return;var u=this.callbacks.onProgress;if(u&&u(n,e,s,t),!this.callbacks)return;var c={url:t.responseURL,data:s,code:a};this.callbacks.onSuccess(c,n,e,t)}else{var d=i.loadPolicy.errorRetry;sn(d,n.retry,!1,{url:e.url,data:void 0,code:a})?this.retry(d):(w.error(a+" while loading "+e.url),this.callbacks.onError({code:a,text:t.statusText},e,t,n))}}}},t.loadtimeout=function(){var e,t=null==(e=this.config)?void 0:e.loadPolicy.timeoutRetry;if(sn(t,this.stats.retry,!0))this.retry(t);else{var n;w.warn("timeout while loading "+(null==(n=this.context)?void 0:n.url));var r=this.callbacks;r&&(this.abortInternal(),r.onTimeout(this.stats,this.context,this.loader))}},t.retry=function(e){var t=this.context,n=this.stats;this.retryDelay=an(e,n.retry),n.retry++,w.warn((status?"HTTP Status "+status:"Timeout")+" while loading "+(null==t?void 0:t.url)+", retrying "+n.retry+"/"+e.maxNumRetry+" in "+this.retryDelay+"ms"),this.abortInternal(),this.loader=null,self.clearTimeout(this.retryTimeout),this.retryTimeout=self.setTimeout(this.loadInternal.bind(this),this.retryDelay)},t.loadprogress=function(e){var t=this.stats;t.loaded=e.loaded,e.lengthComputable&&(t.total=e.total)},t.getCacheAge=function(){var e=null;if(this.loader&&go.test(this.loader.getAllResponseHeaders())){var t=this.loader.getResponseHeader("age");e=t?parseFloat(t):null}return e},t.getResponseHeader=function(e){return this.loader&&new RegExp("^"+e+":\\s*[\\d.]+\\s*$","im").test(this.loader.getAllResponseHeaders())?this.loader.getResponseHeader(e):null},e}(),mo=/(\d+)-(\d+)\/(\d+)/,bo=function(){function e(e){this.fetchSetup=void 0,this.requestTimeout=void 0,this.request=null,this.response=null,this.controller=void 0,this.context=null,this.config=null,this.callbacks=null,this.stats=void 0,this.loader=null,this.fetchSetup=e.fetchSetup||ko,this.controller=new self.AbortController,this.stats=new D}var t=e.prototype;return t.destroy=function(){this.loader=this.callbacks=this.context=this.config=this.request=null,this.abortInternal(),this.response=null,this.fetchSetup=this.controller=this.stats=null},t.abortInternal=function(){this.controller&&!this.stats.loading.end&&(this.stats.aborted=!0,this.controller.abort())},t.abort=function(){var e;this.abortInternal(),null!=(e=this.callbacks)&&e.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)},t.load=function(e,t,n){var r=this,i=this.stats;if(i.loading.start)throw new Error("Loader can only be used once.");i.loading.start=self.performance.now();var a=function(e,t){var n={method:"GET",mode:"cors",credentials:"same-origin",signal:t,headers:new self.Headers(s({},e.headers))};return e.rangeEnd&&n.headers.set("Range","bytes="+e.rangeStart+"-"+String(e.rangeEnd-1)),n}(e,this.controller.signal),o=n.onProgress,l="arraybuffer"===e.responseType,u=l?"byteLength":"length",c=t.loadPolicy,d=c.maxTimeToFirstByteMs,p=c.maxLoadTimeMs;this.context=e,this.config=t,this.callbacks=n,this.request=this.fetchSetup(e,a),self.clearTimeout(this.requestTimeout),t.timeout=d&&g(d)?d:p,this.requestTimeout=self.setTimeout((function(){r.abortInternal(),n.onTimeout(i,e,r.response)}),t.timeout),self.fetch(this.request).then((function(a){r.response=r.loader=a;var s=Math.max(self.performance.now(),i.loading.start);if(self.clearTimeout(r.requestTimeout),t.timeout=p,r.requestTimeout=self.setTimeout((function(){r.abortInternal(),n.onTimeout(i,e,r.response)}),p-(s-i.loading.start)),!a.ok){var u=a.status,c=a.statusText;throw new _o(c||"fetch, bad network response",u,a)}return i.loading.first=s,i.total=function(e){var t=e.get("Content-Range");if(t){var n=function(e){var t=mo.exec(e);if(t)return parseInt(t[2])-parseInt(t[1])+1}(t);if(g(n))return n}var r=e.get("Content-Length");if(r)return parseInt(r)}(a.headers)||i.total,o&&g(t.highWaterMark)?r.loadProgressively(a,i,e,t.highWaterMark,o):l?a.arrayBuffer():"json"===e.responseType?a.json():a.text()})).then((function(a){var s=r.response;if(!s)throw new Error("loader destroyed");self.clearTimeout(r.requestTimeout),i.loading.end=Math.max(self.performance.now(),i.loading.first);var l=a[u];l&&(i.loaded=i.total=l);var c={url:s.url,data:a,code:s.status};o&&!g(t.highWaterMark)&&o(i,e,a,s),n.onSuccess(c,i,e,s)})).catch((function(t){if(self.clearTimeout(r.requestTimeout),!i.aborted){var a=t&&t.code||0,o=t?t.message:null;n.onError({code:a,text:o},e,t?t.details:null,i)}}))},t.getCacheAge=function(){var e=null;if(this.response){var t=this.response.headers.get("age");e=t?parseFloat(t):null}return e},t.getResponseHeader=function(e){return this.response?this.response.headers.get(e):null},t.loadProgressively=function(e,t,n,r,i){void 0===r&&(r=0);var a=new lr,o=e.body.getReader();return function s(){return o.read().then((function(o){if(o.done)return a.dataLength&&i(t,n,a.flush(),e),Promise.resolve(new ArrayBuffer(0));var l=o.value,u=l.length;return t.loaded+=u,u<r||a.dataLength?(a.push(l),a.dataLength>=r&&i(t,n,a.flush(),e)):i(t,n,l,e),s()})).catch((function(){return Promise.reject()}))}()},e}();function ko(e,t){return new self.Request(e.url,t)}var Eo,_o=function(e){function t(t,n,r){var i;return(i=e.call(this,t)||this).code=void 0,i.details=void 0,i.code=n,i.details=r,i}return l(t,e),t}(p(Error)),To=/\s/,Ao=r(r({autoStartLoad:!0,startPosition:-1,defaultAudioCodec:void 0,debug:!1,capLevelOnFPSDrop:!1,capLevelToPlayerSize:!1,ignoreDevicePixelRatio:!1,preferManagedMediaSource:!0,initialLiveManifestSize:1,maxBufferLength:30,backBufferLength:1/0,frontBufferFlushThreshold:1/0,maxBufferSize:6e7,maxBufferHole:.1,highBufferWatchdogPeriod:2,nudgeOffset:.1,nudgeMaxRetry:3,maxFragLookUpTolerance:.25,liveSyncDurationCount:3,liveMaxLatencyDurationCount:1/0,liveSyncDuration:void 0,liveMaxLatencyDuration:void 0,maxLiveSyncPlaybackRate:1,liveDurationInfinity:!1,liveBackBufferLength:null,maxMaxBufferLength:600,enableWorker:!0,workerPath:null,enableSoftwareAES:!0,startLevel:void 0,startFragPrefetch:!1,fpsDroppedMonitoringPeriod:5e3,fpsDroppedMonitoringThreshold:.2,appendErrorMaxRetry:3,loader:vo,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:An,bufferController:Ii,capLevelController:Ca,errorController:pn,fpsController:xa,stretchShortVideoTrack:!1,maxAudioFramesDrift:1,forceKeyFrameOnDiscontinuity:!0,abrEwmaFastLive:3,abrEwmaSlowLive:9,abrEwmaFastVoD:3,abrEwmaSlowVoD:9,abrEwmaDefaultEstimate:5e5,abrEwmaDefaultEstimateMax:5e6,abrBandWidthFactor:.95,abrBandWidthUpFactor:.7,abrMaxWithRealBitrate:!1,maxStarvationDelay:4,maxLoadingDelay:4,minAutoBitrate:0,emeEnabled:!1,widevineLicenseUrl:void 0,drmSystems:{},drmSystemOptions:{},requestMediaKeySystemAccessFunc:J,testBandwidth:!0,progressive:!1,lowLatencyMode:!0,cmcd:void 0,enableDateRangeMetadataCues:!0,enableEmsgMetadataCues:!0,enableID3MetadataCues:!0,useMediaCapabilities:!0,certLoadPolicy:{default:{maxTimeToFirstByteMs:8e3,maxLoadTimeMs:2e4,timeoutRetry:null,errorRetry:null}},keyLoadPolicy:{default:{maxTimeToFirstByteMs:8e3,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:1,retryDelayMs:1e3,maxRetryDelayMs:2e4,backoff:"linear"},errorRetry:{maxNumRetry:8,retryDelayMs:1e3,maxRetryDelayMs:2e4,backoff:"linear"}}},manifestLoadPolicy:{default:{maxTimeToFirstByteMs:1/0,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:2,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:1,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},playlistLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:2,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:2,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},fragLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:12e4,timeoutRetry:{maxNumRetry:4,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:6,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},steeringManifestLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:2,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:1,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},manifestLoadingTimeOut:1e4,manifestLoadingMaxRetry:1,manifestLoadingRetryDelay:1e3,manifestLoadingMaxRetryTimeout:64e3,levelLoadingTimeOut:1e4,levelLoadingMaxRetry:4,levelLoadingRetryDelay:1e3,levelLoadingMaxRetryTimeout:64e3,fragLoadingTimeOut:2e4,fragLoadingMaxRetry:6,fragLoadingRetryDelay:1e3,fragLoadingMaxRetryTimeout:64e3},{cueHandler:{newCue:function(e,t,n,r){for(var i,a,o,s,l,u=[],c=self.VTTCue||self.TextTrackCue,d=0;d<r.rows.length;d++)if(o=!0,s=0,l="",!(i=r.rows[d]).isEmpty()){for(var p,f=0;f<i.chars.length;f++)To.test(i.chars[f].uchar)&&o?s++:(l+=i.chars[f].uchar,o=!1);i.cueStartTime=t,t===n&&(n+=1e-4),s>=16?s--:s++;var h=sa(l.trim()),y=pa(t,n,h);null!=e&&null!=(p=e.cues)&&p.getCueById(y)||((a=new c(t,n,h)).id=y,a.line=d+1,a.align="left",a.position=10+Math.min(80,10*Math.floor(8*s/32)),u.push(a))}return e&&u.length&&(u.sort((function(e,t){return"auto"===e.line||"auto"===t.line?0:e.line>8&&t.line>8?t.line-e.line:e.line-t.line})),u.forEach((function(t){return Rt(e,t)}))),u}},enableWebVTT:!0,enableIMSC1:!0,enableCEA708Captions:!0,captionsTextTrack1Label:"English",captionsTextTrack1LanguageCode:"en",captionsTextTrack2Label:"Spanish",captionsTextTrack2LanguageCode:"es",captionsTextTrack3Label:"Unknown CC",captionsTextTrack3LanguageCode:"",captionsTextTrack4Label:"Unknown CC",captionsTextTrack4LanguageCode:"",renderTextTracksNatively:!0}),{},{subtitleStreamController:wi,subtitleTrackController:xi,timelineController:Aa,audioStreamController:Ai,audioTrackController:Si,emeController:Ra,cmcdController:po,contentSteeringController:fo});function So(e){return e&&"object"==typeof e?Array.isArray(e)?e.map(So):Object.keys(e).reduce((function(t,n){return t[n]=So(e[n]),t}),{}):e}var wo=function(e){function t(t,n){var r;return(r=e.call(this,t,"[level-controller]")||this)._levels=[],r._firstLevel=-1,r._maxAutoLevel=-1,r._startLevel=void 0,r.currentLevel=null,r.currentLevelIndex=-1,r.manualLevelIndex=-1,r.steering=void 0,r.onParsedComplete=void 0,r.steering=n,r._registerListeners(),r}l(t,e);var n=t.prototype;return n._registerListeners=function(){var e=this.hls;e.on(b.MANIFEST_LOADING,this.onManifestLoading,this),e.on(b.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(b.LEVEL_LOADED,this.onLevelLoaded,this),e.on(b.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(b.FRAG_BUFFERED,this.onFragBuffered,this),e.on(b.ERROR,this.onError,this)},n._unregisterListeners=function(){var e=this.hls;e.off(b.MANIFEST_LOADING,this.onManifestLoading,this),e.off(b.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(b.LEVEL_LOADED,this.onLevelLoaded,this),e.off(b.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(b.FRAG_BUFFERED,this.onFragBuffered,this),e.off(b.ERROR,this.onError,this)},n.destroy=function(){this._unregisterListeners(),this.steering=null,this.resetLevels(),e.prototype.destroy.call(this)},n.stopLoad=function(){this._levels.forEach((function(e){e.loadError=0,e.fragmentError=0})),e.prototype.stopLoad.call(this)},n.resetLevels=function(){this._startLevel=void 0,this.manualLevelIndex=-1,this.currentLevelIndex=-1,this.currentLevel=null,this._levels=[],this._maxAutoLevel=-1},n.onManifestLoading=function(e,t){this.resetLevels()},n.onManifestLoaded=function(e,t){var n=this.hls.config.preferManagedMediaSource,r=[],i={},a={},o=!1,s=!1,l=!1;t.levels.forEach((function(e){var t,u,c=e.attrs,d=e.audioCodec,p=e.videoCodec;-1!==(null==(t=d)?void 0:t.indexOf("mp4a.40.34"))&&(Eo||(Eo=/chrome|firefox/i.test(navigator.userAgent)),Eo&&(e.audioCodec=d=void 0)),d&&(e.audioCodec=d=it(d,n)),0===(null==(u=p)?void 0:u.indexOf("avc1"))&&(p=e.videoCodec=function(e){var t=e.split(".");if(t.length>2){var n=t.shift()+".";return(n+=parseInt(t.shift()).toString(16))+("000"+parseInt(t.shift()).toString(16)).slice(-4)}return e}(p));var f=e.width,h=e.height,y=e.unknownCodecs;if(o||(o=!(!f||!h)),s||(s=!!p),l||(l=!!d),!(null!=y&&y.length||d&&!Qe(d,"audio",n)||p&&!Qe(p,"video",n))){var g=c.CODECS,v=c["FRAME-RATE"],m=c["HDCP-LEVEL"],b=c["PATHWAY-ID"],k=c.RESOLUTION,E=c["VIDEO-RANGE"],_=(b||".")+"-"+e.bitrate+"-"+k+"-"+v+"-"+g+"-"+E+"-"+m;if(i[_])if(i[_].uri===e.url||e.attrs["PATHWAY-ID"])i[_].addGroupId("audio",c.AUDIO),i[_].addGroupId("text",c.SUBTITLES);else{var T=a[_]+=1;e.attrs["PATHWAY-ID"]=new Array(T+1).join(".");var A=new Wt(e);i[_]=A,r.push(A)}else{var S=new Wt(e);i[_]=S,a[_]=1,r.push(S)}}})),this.filterAndSortMediaOptions(r,t,o,s,l)},n.filterAndSortMediaOptions=function(e,t,n,r,i){var a=this,o=[],s=[],l=e;if((n||r)&&i&&(l=l.filter((function(e){var t,n=e.videoCodec,r=e.videoRange,i=e.width,a=e.height;return(!!n||!(!i||!a))&&!!(t=r)&&Gt.indexOf(t)>-1}))),0!==l.length){if(t.audioTracks){var u=this.hls.config.preferManagedMediaSource;Co(o=t.audioTracks.filter((function(e){return!e.audioCodec||Qe(e.audioCodec,"audio",u)})))}t.subtitles&&Co(s=t.subtitles);var c=l.slice(0);l.sort((function(e,t){if(e.attrs["HDCP-LEVEL"]!==t.attrs["HDCP-LEVEL"])return(e.attrs["HDCP-LEVEL"]||"")>(t.attrs["HDCP-LEVEL"]||"")?1:-1;if(n&&e.height!==t.height)return e.height-t.height;if(e.frameRate!==t.frameRate)return e.frameRate-t.frameRate;if(e.videoRange!==t.videoRange)return Gt.indexOf(e.videoRange)-Gt.indexOf(t.videoRange);if(e.videoCodec!==t.videoCodec){var r=et(e.videoCodec),i=et(t.videoCodec);if(r!==i)return i-r}if(e.uri===t.uri&&e.codecSet!==t.codecSet){var a=tt(e.codecSet),o=tt(t.codecSet);if(a!==o)return o-a}return e.averageBitrate!==t.averageBitrate?e.averageBitrate-t.averageBitrate:0}));var d=c[0];if(this.steering&&(l=this.steering.filterParsedLevels(l)).length!==c.length)for(var p=0;p<c.length;p++)if(c[p].pathwayId===l[0].pathwayId){d=c[p];break}this._levels=l;for(var f=0;f<l.length;f++)if(l[f]===d){var h;this._firstLevel=f;var y=d.bitrate,g=this.hls.bandwidthEstimate;if(this.log("manifest loaded, "+l.length+" level(s) found, first bitrate: "+y),void 0===(null==(h=this.hls.userConfig)?void 0:h.abrEwmaDefaultEstimate)){var v=Math.min(y,this.hls.config.abrEwmaDefaultEstimateMax);v>g&&g===Ao.abrEwmaDefaultEstimate&&(this.hls.bandwidthEstimate=v)}break}var m=i&&!r,_={levels:l,audioTracks:o,subtitleTracks:s,sessionData:t.sessionData,sessionKeys:t.sessionKeys,firstLevel:this._firstLevel,stats:t.stats,audio:i,video:r,altAudio:!m&&o.some((function(e){return!!e.url}))};this.hls.trigger(b.MANIFEST_PARSED,_),(this.hls.config.autoStartLoad||this.hls.forceStartLoad)&&this.hls.startLoad(this.hls.config.startPosition)}else Promise.resolve().then((function(){if(a.hls){t.levels.length&&a.warn("One or more CODECS in variant not supported: "+JSON.stringify(t.levels[0].attrs));var e=new Error("no level with compatible codecs found in manifest");a.hls.trigger(b.ERROR,{type:k.MEDIA_ERROR,details:E.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:t.url,error:e,reason:e.message})}}))},n.onError=function(e,t){!t.fatal&&t.context&&t.context.type===kt&&t.context.level===this.level&&this.checkRetry(t)},n.onFragBuffered=function(e,t){var n=t.frag;if(void 0!==n&&n.type===Tt){var r=n.elementaryStreams;if(!Object.keys(r).some((function(e){return!!r[e]})))return;var i=this._levels[n.level];null!=i&&i.loadError&&(this.log("Resetting level error count of "+i.loadError+" on frag buffered"),i.loadError=0)}},n.onLevelLoaded=function(e,t){var n,r,i=t.level,a=t.details,o=this._levels[i];if(!o)return this.warn("Invalid level index "+i),void(null!=(r=t.deliveryDirectives)&&r.skip&&(a.deltaUpdateFailed=!0));i===this.currentLevelIndex?(0===o.fragmentError&&(o.loadError=0),this.playlistLoaded(i,t,o.details)):null!=(n=t.deliveryDirectives)&&n.skip&&(a.deltaUpdateFailed=!0)},n.loadPlaylist=function(t){e.prototype.loadPlaylist.call(this);var n=this.currentLevelIndex,r=this.currentLevel;if(r&&this.shouldLoadPlaylist(r)){var i=r.uri;if(t)try{i=t.addDirectives(i)}catch(e){this.warn("Could not construct new URL with HLS Delivery Directives: "+e)}var a=r.attrs["PATHWAY-ID"];this.log("Loading level index "+n+(void 0!==(null==t?void 0:t.msn)?" at sn "+t.msn+" part "+t.part:"")+" with"+(a?" Pathway "+a:"")+" "+i),this.clearTimer(),this.hls.trigger(b.LEVEL_LOADING,{url:i,level:n,pathwayId:r.attrs["PATHWAY-ID"],id:0,deliveryDirectives:t||null})}},n.removeLevel=function(e){var t,n=this,r=this._levels.filter((function(t,r){return r!==e||(n.steering&&n.steering.removeLevel(t),t===n.currentLevel&&(n.currentLevel=null,n.currentLevelIndex=-1,t.details&&t.details.fragments.forEach((function(e){return e.level=-1}))),!1)}));tn(r),this._levels=r,this.currentLevelIndex>-1&&null!=(t=this.currentLevel)&&t.details&&(this.currentLevelIndex=this.currentLevel.details.fragments[0].level),this.hls.trigger(b.LEVELS_UPDATED,{levels:r})},n.onLevelsUpdated=function(e,t){var n=t.levels;this._levels=n},n.checkMaxAutoUpdated=function(){var e=this.hls,t=e.autoLevelCapping,n=e.maxAutoLevel,r=e.maxHdcpLevel;this._maxAutoLevel!==n&&(this._maxAutoLevel=n,this.hls.trigger(b.MAX_AUTO_LEVEL_UPDATED,{autoLevelCapping:t,levels:this.levels,maxAutoLevel:n,minAutoLevel:this.hls.minAutoLevel,maxHdcpLevel:r}))},o(t,[{key:"levels",get:function(){return 0===this._levels.length?null:this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(e){var t=this._levels;if(0!==t.length){if(e<0||e>=t.length){var n=new Error("invalid level idx"),r=e<0;if(this.hls.trigger(b.ERROR,{type:k.OTHER_ERROR,details:E.LEVEL_SWITCH_ERROR,level:e,fatal:r,error:n,reason:n.message}),r)return;e=Math.min(e,t.length-1)}var i=this.currentLevelIndex,a=this.currentLevel,o=a?a.attrs["PATHWAY-ID"]:void 0,s=t[e],l=s.attrs["PATHWAY-ID"];if(this.currentLevelIndex=e,this.currentLevel=s,i!==e||!s.details||!a||o!==l){this.log("Switching to level "+e+" ("+(s.height?s.height+"p ":"")+(s.videoRange?s.videoRange+" ":"")+(s.codecSet?s.codecSet+" ":"")+"@"+s.bitrate+")"+(l?" with Pathway "+l:"")+" from level "+i+(o?" with Pathway "+o:""));var u={level:e,attrs:s.attrs,details:s.details,bitrate:s.bitrate,averageBitrate:s.averageBitrate,maxBitrate:s.maxBitrate,realBitrate:s.realBitrate,width:s.width,height:s.height,codecSet:s.codecSet,audioCodec:s.audioCodec,videoCodec:s.videoCodec,audioGroups:s.audioGroups,subtitleGroups:s.subtitleGroups,loaded:s.loaded,loadError:s.loadError,fragmentError:s.fragmentError,name:s.name,id:s.id,uri:s.uri,url:s.url,urlId:0,audioGroupIds:s.audioGroupIds,textGroupIds:s.textGroupIds};this.hls.trigger(b.LEVEL_SWITCHING,u);var c=s.details;if(!c||c.live){var d=this.switchParams(s.uri,null==a?void 0:a.details,c);this.loadPlaylist(d)}}}}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(e){this.manualLevelIndex=e,void 0===this._startLevel&&(this._startLevel=e),-1!==e&&(this.level=e)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(e){this._firstLevel=e}},{key:"startLevel",get:function(){if(void 0===this._startLevel){var e=this.hls.config.startLevel;return void 0!==e?e:this.hls.firstAutoLevel}return this._startLevel},set:function(e){this._startLevel=e}},{key:"nextLoadLevel",get:function(){return-1!==this.manualLevelIndex?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(e){this.level=e,-1===this.manualLevelIndex&&(this.hls.nextAutoLevel=e)}}]),t}(fn);function Co(e){var t={};e.forEach((function(e){var n=e.groupId||"";e.id=t[n]=t[n]||0,t[n]++}))}var xo=function(){function e(e){this.config=void 0,this.keyUriToKeyInfo={},this.emeController=null,this.config=e}var t=e.prototype;return t.abort=function(e){for(var t in this.keyUriToKeyInfo){var n=this.keyUriToKeyInfo[t].loader;if(n){var r;if(e&&e!==(null==(r=n.context)?void 0:r.frag.type))return;n.abort()}}},t.detach=function(){for(var e in this.keyUriToKeyInfo){var t=this.keyUriToKeyInfo[e];(t.mediaKeySessionContext||t.decryptdata.isCommonEncryption)&&delete this.keyUriToKeyInfo[e]}},t.destroy=function(){for(var e in this.detach(),this.keyUriToKeyInfo){var t=this.keyUriToKeyInfo[e].loader;t&&t.destroy()}this.keyUriToKeyInfo={}},t.createKeyLoadError=function(e,t,n,r,i){return void 0===t&&(t=E.KEY_LOAD_ERROR),new Kn({type:k.NETWORK_ERROR,details:t,fatal:!1,frag:e,response:i,error:n,networkDetails:r})},t.loadClear=function(e,t){var n=this;if(this.emeController&&this.config.emeEnabled)for(var r=e.sn,i=e.cc,a=function(){var e=t[o];if(i<=e.cc&&("initSegment"===r||"initSegment"===e.sn||r<e.sn))return n.emeController.selectKeySystemFormat(e).then((function(t){e.setKeyFormat(t)})),1},o=0;o<t.length&&!a();o++);},t.load=function(e){var t=this;return!e.decryptdata&&e.encrypted&&this.emeController?this.emeController.selectKeySystemFormat(e).then((function(n){return t.loadInternal(e,n)})):this.loadInternal(e)},t.loadInternal=function(e,t){var n,r;t&&e.setKeyFormat(t);var i=e.decryptdata;if(!i){var a=new Error(t?"Expected frag.decryptdata to be defined after setting format "+t:"Missing decryption data on fragment in onKeyLoading");return Promise.reject(this.createKeyLoadError(e,E.KEY_LOAD_ERROR,a))}var o=i.uri;if(!o)return Promise.reject(this.createKeyLoadError(e,E.KEY_LOAD_ERROR,new Error('Invalid key URI: "'+o+'"')));var s,l=this.keyUriToKeyInfo[o];if(null!=(n=l)&&n.decryptdata.key)return i.key=l.decryptdata.key,Promise.resolve({frag:e,keyInfo:l});if(null!=(r=l)&&r.keyLoadPromise)switch(null==(s=l.mediaKeySessionContext)?void 0:s.keyStatus){case void 0:case"status-pending":case"usable":case"usable-in-future":return l.keyLoadPromise.then((function(t){return i.key=t.keyInfo.decryptdata.key,{frag:e,keyInfo:l}}))}switch(l=this.keyUriToKeyInfo[o]={decryptdata:i,keyLoadPromise:null,loader:null,mediaKeySessionContext:null},i.method){case"ISO-23001-7":case"SAMPLE-AES":case"SAMPLE-AES-CENC":case"SAMPLE-AES-CTR":return"identity"===i.keyFormat?this.loadKeyHTTP(l,e):this.loadKeyEME(l,e);case"AES-128":return this.loadKeyHTTP(l,e);default:return Promise.reject(this.createKeyLoadError(e,E.KEY_LOAD_ERROR,new Error('Key supplied with unsupported METHOD: "'+i.method+'"')))}},t.loadKeyEME=function(e,t){var n={frag:t,keyInfo:e};if(this.emeController&&this.config.emeEnabled){var r=this.emeController.loadKey(n);if(r)return(e.keyLoadPromise=r.then((function(t){return e.mediaKeySessionContext=t,n}))).catch((function(t){throw e.keyLoadPromise=null,t}))}return Promise.resolve(n)},t.loadKeyHTTP=function(e,t){var n=this,i=this.config,a=new(0,i.loader)(i);return t.keyLoader=e.loader=a,e.keyLoadPromise=new Promise((function(o,s){var l={keyInfo:e,frag:t,responseType:"arraybuffer",url:e.decryptdata.uri},u=i.keyLoadPolicy.default,c={loadPolicy:u,timeout:u.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},d={onSuccess:function(e,t,r,i){var a=r.frag,l=r.keyInfo,u=r.url;if(!a.decryptdata||l!==n.keyUriToKeyInfo[u])return s(n.createKeyLoadError(a,E.KEY_LOAD_ERROR,new Error("after key load, decryptdata unset or changed"),i));l.decryptdata.key=a.decryptdata.key=new Uint8Array(e.data),a.keyLoader=null,l.loader=null,o({frag:a,keyInfo:l})},onError:function(e,i,a,o){n.resetLoader(i),s(n.createKeyLoadError(t,E.KEY_LOAD_ERROR,new Error("HTTP Error "+e.code+" loading key "+e.text),a,r({url:l.url,data:void 0},e)))},onTimeout:function(e,r,i){n.resetLoader(r),s(n.createKeyLoadError(t,E.KEY_LOAD_TIMEOUT,new Error("key loading timed out"),i))},onAbort:function(e,r,i){n.resetLoader(r),s(n.createKeyLoadError(t,E.INTERNAL_ABORTED,new Error("key loading aborted"),i))}};a.load(l,c,d)}))},t.resetLoader=function(e){var t=e.frag,n=e.keyInfo,r=e.url,i=n.loader;t.keyLoader===i&&(t.keyLoader=null,n.loader=null),delete this.keyUriToKeyInfo[r],i&&i.destroy()},e}();function Po(){return self.SourceBuffer||self.WebKitSourceBuffer}function Ro(){if(!qe())return!1;var e=Po();return!e||e.prototype&&"function"==typeof e.prototype.appendBuffer&&"function"==typeof e.prototype.remove}var Io=function(){function e(e,t,n,r){this.config=void 0,this.media=null,this.fragmentTracker=void 0,this.hls=void 0,this.nudgeRetry=0,this.stallReported=!1,this.stalled=null,this.moved=!1,this.seeking=!1,this.config=e,this.media=t,this.fragmentTracker=n,this.hls=r}var t=e.prototype;return t.destroy=function(){this.media=null,this.hls=this.fragmentTracker=null},t.poll=function(e,t){var n=this.config,r=this.media,i=this.stalled;if(null!==r){var a=r.currentTime,o=r.seeking,s=this.seeking&&!o,l=!this.seeking&&o;if(this.seeking=o,a===e)if(l||s)this.stalled=null;else if(r.paused&&!o||r.ended||0===r.playbackRate||!Ln.getBuffered(r).length)this.nudgeRetry=0;else{var u=Ln.bufferInfo(r,a,0),c=u.nextStart||0;if(o){var d=u.len>2,p=!c||t&&t.start<=a||c-a>2&&!this.fragmentTracker.getPartialFragment(a);if(d||p)return;this.moved=!1}if(!this.moved&&null!==this.stalled){var f;if(!(u.len>0||c))return;var h=Math.max(c,u.start||0)-a,y=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,g=(null==y||null==(f=y.details)?void 0:f.live)?2*y.details.targetduration:2,v=this.fragmentTracker.getPartialFragment(a);if(h>0&&(h<=g||v))return void(r.paused||this._trySkipBufferHole(v))}var m=self.performance.now();if(null!==i){var b=m-i;if(o||!(b>=250)||(this._reportStall(u),this.media)){var k=Ln.bufferInfo(r,a,n.maxBufferHole);this._tryFixBufferStall(k,b)}}else this.stalled=m}else if(this.moved=!0,o||(this.nudgeRetry=0),null!==i){if(this.stallReported){var E=self.performance.now()-i;w.warn("playback not stuck anymore @"+a+", after "+Math.round(E)+"ms"),this.stallReported=!1}this.stalled=null}}},t._tryFixBufferStall=function(e,t){var n=this.config,r=this.fragmentTracker,i=this.media;if(null!==i){var a=i.currentTime,o=r.getPartialFragment(a);if(o&&(this._trySkipBufferHole(o)||!this.media))return;(e.len>n.maxBufferHole||e.nextStart&&e.nextStart-a<n.maxBufferHole)&&t>1e3*n.highBufferWatchdogPeriod&&(w.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())}},t._reportStall=function(e){var t=this.hls,n=this.media;if(!this.stallReported&&n){this.stallReported=!0;var r=new Error("Playback stalling at @"+n.currentTime+" due to low buffer ("+JSON.stringify(e)+")");w.warn(r.message),t.trigger(b.ERROR,{type:k.MEDIA_ERROR,details:E.BUFFER_STALLED_ERROR,fatal:!1,error:r,buffer:e.len})}},t._trySkipBufferHole=function(e){var t=this.config,n=this.hls,r=this.media;if(null===r)return 0;var i=r.currentTime,a=Ln.bufferInfo(r,i,0),o=i<a.start?a.start:a.nextStart;if(o){var s=a.len<=t.maxBufferHole,l=a.len>0&&a.len<1&&r.readyState<3,u=o-i;if(u>0&&(s||l)){if(u>t.maxBufferHole){var c=this.fragmentTracker,d=!1;if(0===i){var p=c.getAppendedFrag(0,Tt);p&&o<p.end&&(d=!0)}if(!d){var f=e||c.getAppendedFrag(i,Tt);if(f){for(var h=!1,y=f.end;y<o;){var g=c.getPartialFragment(y);if(!g){h=!0;break}y+=g.duration}if(h)return 0}}}var v=Math.max(o+.05,i+.1);if(w.warn("skipping hole, adjusting currentTime from "+i+" to "+v),this.moved=!0,this.stalled=null,r.currentTime=v,e&&!e.gap){var m=new Error("fragment loaded with buffer holes, seeking from "+i+" to "+v);n.trigger(b.ERROR,{type:k.MEDIA_ERROR,details:E.BUFFER_SEEK_OVER_HOLE,fatal:!1,error:m,reason:m.message,frag:e})}return v}}return 0},t._tryNudgeBuffer=function(){var e=this.config,t=this.hls,n=this.media,r=this.nudgeRetry;if(null!==n){var i=n.currentTime;if(this.nudgeRetry++,r<e.nudgeMaxRetry){var a=i+(r+1)*e.nudgeOffset,o=new Error("Nudging 'currentTime' from "+i+" to "+a);w.warn(o.message),n.currentTime=a,t.trigger(b.ERROR,{type:k.MEDIA_ERROR,details:E.BUFFER_NUDGE_ON_STALL,error:o,fatal:!1})}else{var s=new Error("Playhead still not moving while enough data buffered @"+i+" after "+e.nudgeMaxRetry+" nudges");w.error(s.message),t.trigger(b.ERROR,{type:k.MEDIA_ERROR,details:E.BUFFER_STALLED_ERROR,error:s,fatal:!0})}}},e}(),Do=function(e){function t(t,n,r){var i;return(i=e.call(this,t,n,r,"[stream-controller]",Tt)||this).audioCodecSwap=!1,i.gapController=null,i.level=-1,i._forceStartLoad=!1,i.altAudio=!1,i.audioOnly=!1,i.fragPlaying=null,i.onvplaying=null,i.onvseeked=null,i.fragLastKbps=0,i.couldBacktrack=!1,i.backtrackFragment=null,i.audioCodecSwitch=!1,i.videoBuffer=null,i._registerListeners(),i}l(t,e);var n=t.prototype;return n._registerListeners=function(){var e=this.hls;e.on(b.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(b.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(b.MANIFEST_LOADING,this.onManifestLoading,this),e.on(b.MANIFEST_PARSED,this.onManifestParsed,this),e.on(b.LEVEL_LOADING,this.onLevelLoading,this),e.on(b.LEVEL_LOADED,this.onLevelLoaded,this),e.on(b.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.on(b.ERROR,this.onError,this),e.on(b.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(b.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.on(b.BUFFER_CREATED,this.onBufferCreated,this),e.on(b.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(b.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(b.FRAG_BUFFERED,this.onFragBuffered,this)},n._unregisterListeners=function(){var e=this.hls;e.off(b.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(b.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(b.MANIFEST_LOADING,this.onManifestLoading,this),e.off(b.MANIFEST_PARSED,this.onManifestParsed,this),e.off(b.LEVEL_LOADED,this.onLevelLoaded,this),e.off(b.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.off(b.ERROR,this.onError,this),e.off(b.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(b.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.off(b.BUFFER_CREATED,this.onBufferCreated,this),e.off(b.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(b.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(b.FRAG_BUFFERED,this.onFragBuffered,this)},n.onHandlerDestroying=function(){this._unregisterListeners(),e.prototype.onHandlerDestroying.call(this)},n.startLoad=function(e){if(this.levels){var t=this.lastCurrentTime,n=this.hls;if(this.stopLoad(),this.setInterval(100),this.level=-1,!this.startFragRequested){var r=n.startLevel;-1===r&&(n.config.testBandwidth&&this.levels.length>1?(r=0,this.bitrateTest=!0):r=n.firstAutoLevel),n.nextLoadLevel=r,this.level=n.loadLevel,this.loadedmetadata=!1}t>0&&-1===e&&(this.log("Override startPosition with lastCurrentTime @"+t.toFixed(3)),e=t),this.state=Xn,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=e,this.tick()}else this._forceStartLoad=!0,this.state=qn},n.stopLoad=function(){this._forceStartLoad=!1,e.prototype.stopLoad.call(this)},n.doTick=function(){switch(this.state){case or:var e=this.levels,t=this.level,n=null==e?void 0:e[t],r=null==n?void 0:n.details;if(r&&(!r.live||this.levelLastLoaded===n)){if(this.waitForCdnTuneIn(r))break;this.state=Xn;break}if(this.hls.nextLoadLevel!==this.level){this.state=Xn;break}break;case Jn:var i,a=self.performance.now(),o=this.retryDate;if(!o||a>=o||null!=(i=this.media)&&i.seeking){var s=this.levels,l=this.level,u=null==s?void 0:s[l];this.resetStartWhenNotLoaded(u||null),this.state=Xn}}this.state===Xn&&this.doTickIdle(),this.onTickEnd()},n.onTickEnd=function(){e.prototype.onTickEnd.call(this),this.checkBuffer(),this.checkFragmentChanged()},n.doTickIdle=function(){var e=this.hls,t=this.levelLastLoaded,n=this.levels,r=this.media;if(null!==t&&(r||!this.startFragRequested&&e.config.startFragPrefetch)&&(!this.altAudio||!this.audioOnly)){var i=e.nextLoadLevel;if(null!=n&&n[i]){var a=n[i],o=this.getMainFwdBufferInfo();if(null!==o){var s=this.getLevelDetails();if(s&&this._streamEnded(o,s)){var l={};return this.altAudio&&(l.type="video"),this.hls.trigger(b.BUFFER_EOS,l),void(this.state=rr)}e.loadLevel!==i&&-1===e.manualLevel&&this.log("Adapting to level "+i+" from level "+this.level),this.level=e.nextLoadLevel=i;var u=a.details;if(!u||this.state===or||u.live&&this.levelLastLoaded!==a)return this.level=i,void(this.state=or);var c=o.len,d=this.getMaxBufferLength(a.maxBitrate);if(!(c>=d)){this.backtrackFragment&&this.backtrackFragment.start>o.end&&(this.backtrackFragment=null);var p=this.backtrackFragment?this.backtrackFragment.start:o.end,f=this.getNextFragment(p,u);if(this.couldBacktrack&&!this.fragPrevious&&f&&"initSegment"!==f.sn&&this.fragmentTracker.getState(f)!==Pn){var h,y=(null!=(h=this.backtrackFragment)?h:f).sn-u.startSN,g=u.fragments[y-1];g&&f.cc===g.cc&&(f=g,this.fragmentTracker.removeFragment(g))}else this.backtrackFragment&&o.len&&(this.backtrackFragment=null);if(f&&this.isLoopLoading(f,p)){if(!f.gap){var v=this.audioOnly&&!this.altAudio?O:L,m=(v===L?this.videoBuffer:this.mediaBuffer)||this.media;m&&this.afterBufferFlushed(m,v,Tt)}f=this.getNextFragmentLoopLoading(f,u,o,Tt,d)}f&&(!f.initSegment||f.initSegment.data||this.bitrateTest||(f=f.initSegment),this.loadFragment(f,a,p))}}}}},n.loadFragment=function(t,n,r){var i=this.fragmentTracker.getState(t);this.fragCurrent=t,i===wn||i===xn?"initSegment"===t.sn?this._loadInitSegment(t,n):this.bitrateTest?(this.log("Fragment "+t.sn+" of level "+t.level+" is being downloaded to test bitrate and will not be buffered"),this._loadBitrateTestFrag(t,n)):(this.startFragRequested=!0,e.prototype.loadFragment.call(this,t,n,r)):this.clearTrackerIfNeeded(t)},n.getBufferedFrag=function(e){return this.fragmentTracker.getBufferedFrag(e,Tt)},n.followingBufferedFrag=function(e){return e?this.getBufferedFrag(e.end+.5):null},n.immediateLevelSwitch=function(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},n.nextLevelSwitch=function(){var e=this.levels,t=this.media;if(null!=t&&t.readyState){var n,r=this.getAppendedFrag(t.currentTime);r&&r.start>1&&this.flushMainBuffer(0,r.start-1);var i=this.getLevelDetails();if(null!=i&&i.live){var a=this.getMainFwdBufferInfo();if(!a||a.len<2*i.targetduration)return}if(!t.paused&&e){var o=e[this.hls.nextLoadLevel],s=this.fragLastKbps;n=s&&this.fragCurrent?this.fragCurrent.duration*o.maxBitrate/(1e3*s)+1:0}else n=0;var l=this.getBufferedFrag(t.currentTime+n);if(l){var u=this.followingBufferedFrag(l);if(u){this.abortCurrentFrag();var c=u.maxStartPTS?u.maxStartPTS:u.start,d=u.duration,p=Math.max(l.end,c+Math.min(Math.max(d-this.config.maxFragLookUpTolerance,d*(this.couldBacktrack?.5:.125)),d*(this.couldBacktrack?.75:.25)));this.flushMainBuffer(p,Number.POSITIVE_INFINITY)}}}},n.abortCurrentFrag=function(){var e=this.fragCurrent;switch(this.fragCurrent=null,this.backtrackFragment=null,e&&(e.abortRequests(),this.fragmentTracker.removeFragment(e)),this.state){case Qn:case $n:case Jn:case tr:case nr:this.state=Xn}this.nextLoadPosition=this.getLoadPosition()},n.flushMainBuffer=function(t,n){e.prototype.flushMainBuffer.call(this,t,n,this.altAudio?"video":null)},n.onMediaAttached=function(t,n){e.prototype.onMediaAttached.call(this,t,n);var r=n.media;this.onvplaying=this.onMediaPlaying.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),r.addEventListener("playing",this.onvplaying),r.addEventListener("seeked",this.onvseeked),this.gapController=new Io(this.config,r,this.fragmentTracker,this.hls)},n.onMediaDetaching=function(){var t=this.media;t&&this.onvplaying&&this.onvseeked&&(t.removeEventListener("playing",this.onvplaying),t.removeEventListener("seeked",this.onvseeked),this.onvplaying=this.onvseeked=null,this.videoBuffer=null),this.fragPlaying=null,this.gapController&&(this.gapController.destroy(),this.gapController=null),e.prototype.onMediaDetaching.call(this)},n.onMediaPlaying=function(){this.tick()},n.onMediaSeeked=function(){var e=this.media,t=e?e.currentTime:null;g(t)&&this.log("Media seeked to "+t.toFixed(3));var n=this.getMainFwdBufferInfo();null!==n&&0!==n.len?this.tick():this.warn('Main forward buffer length on "seeked" event '+(n?n.len:"empty")+")")},n.onManifestLoading=function(){this.log("Trigger BUFFER_RESET"),this.hls.trigger(b.BUFFER_RESET,void 0),this.fragmentTracker.removeAllFragments(),this.couldBacktrack=!1,this.startPosition=this.lastCurrentTime=this.fragLastKbps=0,this.levels=this.fragPlaying=this.backtrackFragment=this.levelLastLoaded=null,this.altAudio=this.audioOnly=this.startFragRequested=!1},n.onManifestParsed=function(e,t){var n,r,i=!1,a=!1;t.levels.forEach((function(e){var t=e.audioCodec;t&&(i=i||-1!==t.indexOf("mp4a.40.2"),a=a||-1!==t.indexOf("mp4a.40.5"))})),this.audioCodecSwitch=i&&a&&!("function"==typeof(null==(r=Po())||null==(n=r.prototype)?void 0:n.changeType)),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=t.levels,this.startFragRequested=!1},n.onLevelLoading=function(e,t){var n=this.levels;if(n&&this.state===Xn){var r=n[t.level];(!r.details||r.details.live&&this.levelLastLoaded!==r||this.waitForCdnTuneIn(r.details))&&(this.state=or)}},n.onLevelLoaded=function(e,t){var n,r=this.levels,i=t.level,a=t.details,o=a.totalduration;if(r){this.log("Level "+i+" loaded ["+a.startSN+","+a.endSN+"]"+(a.lastPartSn?"[part-"+a.lastPartSn+"-"+a.lastPartIndex+"]":"")+", cc ["+a.startCC+", "+a.endCC+"] duration:"+o);var s=r[i],l=this.fragCurrent;!l||this.state!==$n&&this.state!==Jn||l.level!==t.level&&l.loader&&this.abortCurrentFrag();var u=0;if(a.live||null!=(n=s.details)&&n.live){var c;if(this.checkLiveUpdate(a),a.deltaUpdateFailed)return;u=this.alignPlaylists(a,s.details,null==(c=this.levelLastLoaded)?void 0:c.details)}if(s.details=a,this.levelLastLoaded=s,this.hls.trigger(b.LEVEL_UPDATED,{details:a,level:i}),this.state===or){if(this.waitForCdnTuneIn(a))return;this.state=Xn}this.startFragRequested?a.live&&this.synchronizeToLiveEdge(a):this.setStartPosition(a,u),this.tick()}else this.warn("Levels were reset while loading level "+i)},n._handleFragmentLoadProgress=function(e){var t,n=e.frag,r=e.part,i=e.payload,a=this.levels;if(a){var o=a[n.level],s=o.details;if(!s)return this.warn("Dropping fragment "+n.sn+" of level "+n.level+" after level details were reset"),void this.fragmentTracker.removeFragment(n);var l=o.videoCodec,u=s.PTSKnown||!s.live,c=null==(t=n.initSegment)?void 0:t.data,d=this._getAudioCodec(o),p=this.transmuxer=this.transmuxer||new ki(this.hls,Tt,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),f=r?r.index:-1,h=-1!==f,y=new Mn(n.level,n.sn,n.stats.chunkCount,i.byteLength,f,h),g=this.initPTS[n.cc];p.push(i,c,d,l,n,r,s.totalduration,u,y,g)}else this.warn("Levels were reset while fragment load was in progress. Fragment "+n.sn+" of level "+n.level+" will not be buffered")},n.onAudioTrackSwitching=function(e,t){var n=this.altAudio;if(!t.url){if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var r=this.fragCurrent;r&&(this.log("Switching to main audio track, cancel main fragment load"),r.abortRequests(),this.fragmentTracker.removeFragment(r)),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();var i=this.hls;n&&(i.trigger(b.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:null}),this.fragmentTracker.removeAllFragments()),i.trigger(b.AUDIO_TRACK_SWITCHED,t)}},n.onAudioTrackSwitched=function(e,t){var n=t.id,r=!!this.hls.audioTracks[n].url;if(r){var i=this.videoBuffer;i&&this.mediaBuffer!==i&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=i)}this.altAudio=r,this.tick()},n.onBufferCreated=function(e,t){var n,r,i=t.tracks,a=!1;for(var o in i){var s=i[o];if("main"===s.id){if(r=o,n=s,"video"===o){var l=i[o];l&&(this.videoBuffer=l.buffer)}}else a=!0}a&&n?(this.log("Alternate track found, use "+r+".buffered to schedule main fragment loading"),this.mediaBuffer=n.buffer):this.mediaBuffer=this.media},n.onFragBuffered=function(e,t){var n=t.frag,r=t.part;if(!n||n.type===Tt){if(this.fragContextChanged(n))return this.warn("Fragment "+n.sn+(r?" p: "+r.index:"")+" of level "+n.level+" finished buffering, but was aborted. state: "+this.state),void(this.state===nr&&(this.state=Xn));var i=r?r.stats:n.stats;this.fragLastKbps=Math.round(8*i.total/(i.buffering.end-i.loading.first)),"initSegment"!==n.sn&&(this.fragPrevious=n),this.fragBufferedComplete(n,r)}},n.onError=function(e,t){var n;if(t.fatal)this.state=ir;else switch(t.details){case E.FRAG_GAP:case E.FRAG_PARSING_ERROR:case E.FRAG_DECRYPT_ERROR:case E.FRAG_LOAD_ERROR:case E.FRAG_LOAD_TIMEOUT:case E.KEY_LOAD_ERROR:case E.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(Tt,t);break;case E.LEVEL_LOAD_ERROR:case E.LEVEL_LOAD_TIMEOUT:case E.LEVEL_PARSING_ERROR:t.levelRetry||this.state!==or||(null==(n=t.context)?void 0:n.type)!==kt||(this.state=Xn);break;case E.BUFFER_APPEND_ERROR:case E.BUFFER_FULL_ERROR:if(!t.parent||"main"!==t.parent)return;if(t.details===E.BUFFER_APPEND_ERROR)return void this.resetLoadingState();this.reduceLengthAndFlushBuffer(t)&&this.flushMainBuffer(0,Number.POSITIVE_INFINITY);break;case E.INTERNAL_EXCEPTION:this.recoverWorkerError(t)}},n.checkBuffer=function(){var e=this.media,t=this.gapController;if(e&&t&&e.readyState){if(this.loadedmetadata||!Ln.getBuffered(e).length){var n=this.state!==Xn?this.fragCurrent:null;t.poll(this.lastCurrentTime,n)}this.lastCurrentTime=e.currentTime}},n.onFragLoadEmergencyAborted=function(){this.state=Xn,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()},n.onBufferFlushed=function(e,t){var n=t.type;if(n!==O||this.audioOnly&&!this.altAudio){var r=(n===L?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(r,n,Tt),this.tick()}},n.onLevelsUpdated=function(e,t){this.level>-1&&this.fragCurrent&&(this.level=this.fragCurrent.level),this.levels=t.levels},n.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},n.seekToStartPos=function(){var e=this.media;if(e){var t=e.currentTime,n=this.startPosition;if(n>=0&&t<n){if(e.seeking)return void this.log("could not seek to "+n+", already seeking at "+t);var r=Ln.getBuffered(e),i=(r.length?r.start(0):0)-n;i>0&&(i<this.config.maxBufferHole||i<this.config.maxFragLookUpTolerance)&&(this.log("adjusting start position by "+i+" to match buffer start"),n+=i,this.startPosition=n),this.log("seek to target start position "+n+" from current time "+t),e.currentTime=n}}},n._getAudioCodec=function(e){var t=this.config.defaultAudioCodec||e.audioCodec;return this.audioCodecSwap&&t&&(this.log("Swapping audio codec"),t=-1!==t.indexOf("mp4a.40.5")?"mp4a.40.2":"mp4a.40.5"),t},n._loadBitrateTestFrag=function(e,t){var n=this;e.bitrateTest=!0,this._doFragLoad(e,t).then((function(r){var i=n.hls;if(r&&!n.fragContextChanged(e)){t.fragmentError=0,n.state=Xn,n.startFragRequested=!1,n.bitrateTest=!1;var a=e.stats;a.parsing.start=a.parsing.end=a.buffering.start=a.buffering.end=self.performance.now(),i.trigger(b.FRAG_LOADED,r),e.bitrateTest=!1}}))},n._handleTransmuxComplete=function(e){var t,n="main",r=this.hls,i=e.remuxResult,a=e.chunkMeta,o=this.getCurrentContext(a);if(o){var s=o.frag,l=o.part,u=o.level,c=i.video,d=i.text,p=i.id3,f=i.initSegment,h=u.details,y=this.altAudio?void 0:i.audio;if(this.fragContextChanged(s))this.fragmentTracker.removeFragment(s);else{if(this.state=tr,f){if(null!=f&&f.tracks){var v=s.initSegment||s;this._bufferInitSegment(u,f.tracks,v,a),r.trigger(b.FRAG_PARSING_INIT_SEGMENT,{frag:v,id:n,tracks:f.tracks})}var m=f.initPTS,k=f.timescale;g(m)&&(this.initPTS[s.cc]={baseTime:m,timescale:k},r.trigger(b.INIT_PTS_FOUND,{frag:s,id:n,initPTS:m,timescale:k}))}if(c&&h&&"initSegment"!==s.sn){var E=h.fragments[s.sn-1-h.startSN],_=s.sn===h.startSN,T=!E||s.cc>E.cc;if(!1!==i.independent){var A=c.startPTS,S=c.endPTS,w=c.startDTS,C=c.endDTS;if(l)l.elementaryStreams[c.type]={startPTS:A,endPTS:S,startDTS:w,endDTS:C};else if(c.firstKeyFrame&&c.independent&&1===a.id&&!T&&(this.couldBacktrack=!0),c.dropped&&c.independent){var x=this.getMainFwdBufferInfo(),P=(x?x.end:this.getLoadPosition())+this.config.maxBufferHole,R=c.firstKeyFramePTS?c.firstKeyFramePTS:A;if(!_&&P<R-this.config.maxBufferHole&&!T)return void this.backtrack(s);T&&(s.gap=!0),s.setElementaryStreamInfo(c.type,s.start,S,s.start,C,!0)}else _&&A>2&&(s.gap=!0);s.setElementaryStreamInfo(c.type,A,S,w,C),this.backtrackFragment&&(this.backtrackFragment=s),this.bufferFragmentData(c,s,l,a,_||T)}else{if(!_&&!T)return void this.backtrack(s);s.gap=!0}}if(y){var I=y.startPTS,D=y.endPTS,L=y.startDTS,M=y.endDTS;l&&(l.elementaryStreams[O]={startPTS:I,endPTS:D,startDTS:L,endDTS:M}),s.setElementaryStreamInfo(O,I,D,L,M),this.bufferFragmentData(y,s,l,a)}if(h&&null!=p&&null!=(t=p.samples)&&t.length){var N={id:n,frag:s,details:h,samples:p.samples};r.trigger(b.FRAG_PARSING_METADATA,N)}if(h&&d){var U={id:n,frag:s,details:h,samples:d.samples};r.trigger(b.FRAG_PARSING_USERDATA,U)}}}else this.resetWhenMissingContext(a)},n._bufferInitSegment=function(e,t,n,r){var i=this;if(this.state===tr){this.audioOnly=!!t.audio&&!t.video,this.altAudio&&!this.audioOnly&&delete t.audio;var a=t.audio,o=t.video,s=t.audiovideo;if(a){var l=e.audioCodec,u=navigator.userAgent.toLowerCase();this.audioCodecSwitch&&(l&&(l=-1!==l.indexOf("mp4a.40.5")?"mp4a.40.2":"mp4a.40.5"),1!==a.metadata.channelCount&&-1===u.indexOf("firefox")&&(l="mp4a.40.5")),l&&-1!==l.indexOf("mp4a.40.5")&&-1!==u.indexOf("android")&&"audio/mpeg"!==a.container&&(l="mp4a.40.2",this.log("Android: force audio codec to "+l)),e.audioCodec&&e.audioCodec!==l&&this.log('Swapping manifest audio codec "'+e.audioCodec+'" for "'+l+'"'),a.levelCodec=l,a.id="main",this.log("Init audio buffer, container:"+a.container+", codecs[selected/level/parsed]=["+(l||"")+"/"+(e.audioCodec||"")+"/"+a.codec+"]")}o&&(o.levelCodec=e.videoCodec,o.id="main",this.log("Init video buffer, container:"+o.container+", codecs[level/parsed]=["+(e.videoCodec||"")+"/"+o.codec+"]")),s&&this.log("Init audiovideo buffer, container:"+s.container+", codecs[level/parsed]=["+e.codecs+"/"+s.codec+"]"),this.hls.trigger(b.BUFFER_CODECS,t),Object.keys(t).forEach((function(e){var a=t[e].initSegment;null!=a&&a.byteLength&&i.hls.trigger(b.BUFFER_APPENDING,{type:e,data:a,frag:n,part:null,chunkMeta:r,parent:n.type})})),this.tickImmediate()}},n.getMainFwdBufferInfo=function(){return this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,Tt)},n.backtrack=function(e){this.couldBacktrack=!0,this.backtrackFragment=e,this.resetTransmuxer(),this.flushBufferGap(e),this.fragmentTracker.removeFragment(e),this.fragPrevious=null,this.nextLoadPosition=e.start,this.state=Xn},n.checkFragmentChanged=function(){var e=this.media,t=null;if(e&&e.readyState>1&&!1===e.seeking){var n=e.currentTime;if(Ln.isBuffered(e,n)?t=this.getAppendedFrag(n):Ln.isBuffered(e,n+.1)&&(t=this.getAppendedFrag(n+.1)),t){this.backtrackFragment=null;var r=this.fragPlaying,i=t.level;r&&t.sn===r.sn&&r.level===i||(this.fragPlaying=t,this.hls.trigger(b.FRAG_CHANGED,{frag:t}),r&&r.level===i||this.hls.trigger(b.LEVEL_SWITCHED,{level:i}))}}},o(t,[{key:"nextLevel",get:function(){var e=this.nextBufferedFrag;return e?e.level:-1}},{key:"currentFrag",get:function(){var e=this.media;return e?this.fragPlaying||this.getAppendedFrag(e.currentTime):null}},{key:"currentProgramDateTime",get:function(){var e=this.media;if(e){var t=e.currentTime,n=this.currentFrag;if(n&&g(t)&&g(n.programDateTime)){var r=n.programDateTime+1e3*(t-n.start);return new Date(r)}}return null}},{key:"currentLevel",get:function(){var e=this.currentFrag;return e?e.level:-1}},{key:"nextBufferedFrag",get:function(){var e=this.currentFrag;return e?this.followingBufferedFrag(e):null}},{key:"forceStartLoad",get:function(){return this._forceStartLoad}}]),t}(sr),Oo=function(){function e(t){void 0===t&&(t={}),this.config=void 0,this.userConfig=void 0,this.coreComponents=void 0,this.networkControllers=void 0,this.started=!1,this._emitter=new gi,this._autoLevelCapping=-1,this._maxHdcpLevel=null,this.abrController=void 0,this.bufferController=void 0,this.capLevelController=void 0,this.latencyController=void 0,this.levelController=void 0,this.streamController=void 0,this.audioTrackController=void 0,this.subtitleTrackController=void 0,this.emeController=void 0,this.cmcdController=void 0,this._media=null,this.url=null,this.triggeringException=void 0,S(t.debug||!1,"Hls instance");var n=this.config=function(e,t){if((t.liveSyncDurationCount||t.liveMaxLatencyDurationCount)&&(t.liveSyncDuration||t.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");if(void 0!==t.liveMaxLatencyDurationCount&&(void 0===t.liveSyncDurationCount||t.liveMaxLatencyDurationCount<=t.liveSyncDurationCount))throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be greater than "liveSyncDurationCount"');if(void 0!==t.liveMaxLatencyDuration&&(void 0===t.liveSyncDuration||t.liveMaxLatencyDuration<=t.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be greater than "liveSyncDuration"');var n=So(e),i=["TimeOut","MaxRetry","RetryDelay","MaxRetryTimeout"];return["manifest","level","frag"].forEach((function(e){var r=("level"===e?"playlist":e)+"LoadPolicy",a=void 0===t[r],o=[];i.forEach((function(i){var s=e+"Loading"+i,l=t[s];if(void 0!==l&&a){o.push(s);var u=n[r].default;switch(t[r]={default:u},i){case"TimeOut":u.maxLoadTimeMs=l,u.maxTimeToFirstByteMs=l;break;case"MaxRetry":u.errorRetry.maxNumRetry=l,u.timeoutRetry.maxNumRetry=l;break;case"RetryDelay":u.errorRetry.retryDelayMs=l,u.timeoutRetry.retryDelayMs=l;break;case"MaxRetryTimeout":u.errorRetry.maxRetryDelayMs=l,u.timeoutRetry.maxRetryDelayMs=l}}})),o.length&&w.warn('hls.js config: "'+o.join('", "')+'" setting(s) are deprecated, use "'+r+'": '+JSON.stringify(t[r]))})),r(r({},n),t)}(e.DefaultConfig,t);this.userConfig=t,n.progressive&&function(e){var t=e.loader;t!==bo&&t!==vo?(w.log("[config]: Custom loader detected, cannot enable progressive streaming"),e.progressive=!1):function(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(e){}return!1}()&&(e.loader=bo,e.progressive=!0,e.enableSoftwareAES=!0,w.log("[config]: Progressive streaming enabled, using FetchLoader"))}(n);var i=n.abrController,a=n.bufferController,o=n.capLevelController,s=n.errorController,l=n.fpsController,u=new s(this),c=this.abrController=new i(this),d=this.bufferController=new a(this),p=this.capLevelController=new o(this),f=new l(this),h=new xt(this),y=new jt(this),g=n.contentSteeringController,v=g?new g(this):null,m=this.levelController=new wo(this,v),k=new Rn(this),E=new xo(this.config),_=this.streamController=new Do(this,k,E);p.setStreamController(_),f.setStreamController(_);var T=[h,m,_];v&&T.splice(1,0,v),this.networkControllers=T;var A=[c,d,p,f,y,k];this.audioTrackController=this.createController(n.audioTrackController,T);var C=n.audioStreamController;C&&T.push(new C(this,k,E)),this.subtitleTrackController=this.createController(n.subtitleTrackController,T);var x=n.subtitleStreamController;x&&T.push(new x(this,k,E)),this.createController(n.timelineController,A),E.emeController=this.emeController=this.createController(n.emeController,A),this.cmcdController=this.createController(n.cmcdController,A),this.latencyController=this.createController(Ht,A),this.coreComponents=A,T.push(u);var P=u.onErrorOut;"function"==typeof P&&this.on(b.ERROR,P,u)}e.isMSESupported=function(){return Ro()},e.isSupported=function(){return function(){if(!Ro())return!1;var e=qe();return"function"==typeof(null==e?void 0:e.isTypeSupported)&&(["avc1.42E01E,mp4a.40.2","av01.0.01M.08","vp09.00.50.08"].some((function(t){return e.isTypeSupported(Je(t,"video"))}))||["mp4a.40.2","fLaC"].some((function(t){return e.isTypeSupported(Je(t,"audio"))})))}()},e.getMediaSource=function(){return qe()};var t=e.prototype;return t.createController=function(e,t){if(e){var n=new e(this);return t&&t.push(n),n}return null},t.on=function(e,t,n){void 0===n&&(n=this),this._emitter.on(e,t,n)},t.once=function(e,t,n){void 0===n&&(n=this),this._emitter.once(e,t,n)},t.removeAllListeners=function(e){this._emitter.removeAllListeners(e)},t.off=function(e,t,n,r){void 0===n&&(n=this),this._emitter.off(e,t,n,r)},t.listeners=function(e){return this._emitter.listeners(e)},t.emit=function(e,t,n){return this._emitter.emit(e,t,n)},t.trigger=function(e,t){if(this.config.debug)return this.emit(e,e,t);try{return this.emit(e,e,t)}catch(t){if(w.error("An internal error happened while handling event "+e+'. Error message: "'+t.message+'". Here is a stacktrace:',t),!this.triggeringException){this.triggeringException=!0;var n=e===b.ERROR;this.trigger(b.ERROR,{type:k.OTHER_ERROR,details:E.INTERNAL_EXCEPTION,fatal:n,event:e,error:t}),this.triggeringException=!1}}return!1},t.listenerCount=function(e){return this._emitter.listenerCount(e)},t.destroy=function(){w.log("destroy"),this.trigger(b.DESTROYING,void 0),this.detachMedia(),this.removeAllListeners(),this._autoLevelCapping=-1,this.url=null,this.networkControllers.forEach((function(e){return e.destroy()})),this.networkControllers.length=0,this.coreComponents.forEach((function(e){return e.destroy()})),this.coreComponents.length=0;var e=this.config;e.xhrSetup=e.fetchSetup=void 0,this.userConfig=null},t.attachMedia=function(e){w.log("attachMedia"),this._media=e,this.trigger(b.MEDIA_ATTACHING,{media:e})},t.detachMedia=function(){w.log("detachMedia"),this.trigger(b.MEDIA_DETACHING,void 0),this._media=null},t.loadSource=function(e){this.stopLoad();var t=this.media,n=this.url,r=this.url=y.buildAbsoluteURL(self.location.href,e,{alwaysNormalize:!0});this._autoLevelCapping=-1,this._maxHdcpLevel=null,w.log("loadSource:"+r),t&&n&&(n!==r||this.bufferController.hasSourceTypes())&&(this.detachMedia(),this.attachMedia(t)),this.trigger(b.MANIFEST_LOADING,{url:e})},t.startLoad=function(e){void 0===e&&(e=-1),w.log("startLoad("+e+")"),this.started=!0,this.networkControllers.forEach((function(t){t.startLoad(e)}))},t.stopLoad=function(){w.log("stopLoad"),this.started=!1,this.networkControllers.forEach((function(e){e.stopLoad()}))},t.resumeBuffering=function(){this.started&&this.networkControllers.forEach((function(e){"fragmentLoader"in e&&e.startLoad(-1)}))},t.pauseBuffering=function(){this.networkControllers.forEach((function(e){"fragmentLoader"in e&&e.stopLoad()}))},t.swapAudioCodec=function(){w.log("swapAudioCodec"),this.streamController.swapAudioCodec()},t.recoverMediaError=function(){w.log("recoverMediaError");var e=this._media;this.detachMedia(),e&&this.attachMedia(e)},t.removeLevel=function(e){this.levelController.removeLevel(e)},t.setAudioOption=function(e){var t;return null==(t=this.audioTrackController)?void 0:t.setAudioOption(e)},t.setSubtitleOption=function(e){var t;return null==(t=this.subtitleTrackController)||t.setSubtitleOption(e),null},o(e,[{key:"levels",get:function(){return this.levelController.levels||[]}},{key:"currentLevel",get:function(){return this.streamController.currentLevel},set:function(e){w.log("set currentLevel:"+e),this.levelController.manualLevel=e,this.streamController.immediateLevelSwitch()}},{key:"nextLevel",get:function(){return this.streamController.nextLevel},set:function(e){w.log("set nextLevel:"+e),this.levelController.manualLevel=e,this.streamController.nextLevelSwitch()}},{key:"loadLevel",get:function(){return this.levelController.level},set:function(e){w.log("set loadLevel:"+e),this.levelController.manualLevel=e}},{key:"nextLoadLevel",get:function(){return this.levelController.nextLoadLevel},set:function(e){this.levelController.nextLoadLevel=e}},{key:"firstLevel",get:function(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)},set:function(e){w.log("set firstLevel:"+e),this.levelController.firstLevel=e}},{key:"startLevel",get:function(){var e=this.levelController.startLevel;return-1===e&&this.abrController.forcedAutoLevel>-1?this.abrController.forcedAutoLevel:e},set:function(e){w.log("set startLevel:"+e),-1!==e&&(e=Math.max(e,this.minAutoLevel)),this.levelController.startLevel=e}},{key:"capLevelToPlayerSize",get:function(){return this.config.capLevelToPlayerSize},set:function(e){var t=!!e;t!==this.config.capLevelToPlayerSize&&(t?this.capLevelController.startCapping():(this.capLevelController.stopCapping(),this.autoLevelCapping=-1,this.streamController.nextLevelSwitch()),this.config.capLevelToPlayerSize=t)}},{key:"autoLevelCapping",get:function(){return this._autoLevelCapping},set:function(e){this._autoLevelCapping!==e&&(w.log("set autoLevelCapping:"+e),this._autoLevelCapping=e,this.levelController.checkMaxAutoUpdated())}},{key:"bandwidthEstimate",get:function(){var e=this.abrController.bwEstimator;return e?e.getEstimate():NaN},set:function(e){this.abrController.resetEstimator(e)}},{key:"ttfbEstimate",get:function(){var e=this.abrController.bwEstimator;return e?e.getEstimateTTFB():NaN}},{key:"maxHdcpLevel",get:function(){return this._maxHdcpLevel},set:function(e){(function(e){return Vt.indexOf(e)>-1})(e)&&this._maxHdcpLevel!==e&&(this._maxHdcpLevel=e,this.levelController.checkMaxAutoUpdated())}},{key:"autoLevelEnabled",get:function(){return-1===this.levelController.manualLevel}},{key:"manualLevel",get:function(){return this.levelController.manualLevel}},{key:"minAutoLevel",get:function(){var e=this.levels,t=this.config.minAutoBitrate;if(!e)return 0;for(var n=e.length,r=0;r<n;r++)if(e[r].maxBitrate>=t)return r;return 0}},{key:"maxAutoLevel",get:function(){var e,t=this.levels,n=this.autoLevelCapping,r=this.maxHdcpLevel;if(e=-1===n&&null!=t&&t.length?t.length-1:n,r)for(var i=e;i--;){var a=t[i].attrs["HDCP-LEVEL"];if(a&&a<=r)return i}return e}},{key:"firstAutoLevel",get:function(){return this.abrController.firstAutoLevel}},{key:"nextAutoLevel",get:function(){return this.abrController.nextAutoLevel},set:function(e){this.abrController.nextAutoLevel=e}},{key:"playingDate",get:function(){return this.streamController.currentProgramDateTime}},{key:"mainForwardBufferInfo",get:function(){return this.streamController.getMainFwdBufferInfo()}},{key:"allAudioTracks",get:function(){var e=this.audioTrackController;return e?e.allAudioTracks:[]}},{key:"audioTracks",get:function(){var e=this.audioTrackController;return e?e.audioTracks:[]}},{key:"audioTrack",get:function(){var e=this.audioTrackController;return e?e.audioTrack:-1},set:function(e){var t=this.audioTrackController;t&&(t.audioTrack=e)}},{key:"allSubtitleTracks",get:function(){var e=this.subtitleTrackController;return e?e.allSubtitleTracks:[]}},{key:"subtitleTracks",get:function(){var e=this.subtitleTrackController;return e?e.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var e=this.subtitleTrackController;return e?e.subtitleTrack:-1},set:function(e){var t=this.subtitleTrackController;t&&(t.subtitleTrack=e)}},{key:"media",get:function(){return this._media}},{key:"subtitleDisplay",get:function(){var e=this.subtitleTrackController;return!!e&&e.subtitleDisplay},set:function(e){var t=this.subtitleTrackController;t&&(t.subtitleDisplay=e)}},{key:"lowLatencyMode",get:function(){return this.config.lowLatencyMode},set:function(e){this.config.lowLatencyMode=e}},{key:"liveSyncPosition",get:function(){return this.latencyController.liveSyncPosition}},{key:"latency",get:function(){return this.latencyController.latency}},{key:"maxLatency",get:function(){return this.latencyController.maxLatency}},{key:"targetLatency",get:function(){return this.latencyController.targetLatency}},{key:"drift",get:function(){return this.latencyController.drift}},{key:"forceStartLoad",get:function(){return this.streamController.forceStartLoad}}],[{key:"version",get:function(){return"1.5.8"}},{key:"Events",get:function(){return b}},{key:"ErrorTypes",get:function(){return k}},{key:"ErrorDetails",get:function(){return E}},{key:"DefaultConfig",get:function(){return e.defaultConfig?e.defaultConfig:Ao},set:function(t){e.defaultConfig=t}}]),e}();return Oo.defaultConfig=void 0,Oo},module.exports=n()}(!1)},150:(e,t,n)=>{!function(){var e="undefined"!=typeof window?window:n.g,r={};for(var i in function(e,t,module){var n;function r(e){var t=0;return function(){return t<e.length?{done:!1,value:e[t++]}:{done:!0}}}var i="function"==typeof Object.defineProperties?Object.defineProperty:function(e,t,n){return e==Array.prototype||e==Object.prototype||(e[t]=n.value),e};var a=function(n){n=["object"==typeof globalThis&&globalThis,n,"object"==typeof e&&e,"object"==typeof self&&self,"object"==typeof t&&t];for(var r=0;r<n.length;++r){var i=n[r];if(i&&i.Math==Math)return i}throw Error("Cannot find global object")}(this);function o(e,t){if(t)e:{var n=a;e=e.split(".");for(var r=0;r<e.length-1;r++){var o=e[r];if(!(o in n))break e;n=n[o]}(t=t(r=n[e=e[e.length-1]]))!=r&&null!=t&&i(n,e,{configurable:!0,writable:!0,value:t})}}function s(e){return(e={next:e})[Symbol.iterator]=function(){return this},e}function l(e){var t="undefined"!=typeof Symbol&&Symbol.iterator&&e[Symbol.iterator];return t?t.call(e):{next:r(e)}}function u(e){if(!(e instanceof Array)){e=l(e);for(var t,n=[];!(t=e.next()).done;)n.push(t.value);e=n}return e}o("Symbol",(function(e){function t(e,t){this.g=e,i(this,"description",{configurable:!0,writable:!0,value:t})}if(e)return e;t.prototype.toString=function(){return this.g};var n="jscomp_symbol_"+(1e9*Math.random()>>>0)+"_",r=0;return function e(i){if(this instanceof e)throw new TypeError("Symbol is not a constructor");return new t(n+(i||"")+"_"+r++,i)}})),o("Symbol.iterator",(function(e){if(e)return e;e=Symbol("Symbol.iterator");for(var t="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),n=0;n<t.length;n++){var o=a[t[n]];"function"==typeof o&&"function"!=typeof o.prototype[e]&&i(o.prototype,e,{configurable:!0,writable:!0,value:function(){return s(r(this))}})}return e}));var c,d="function"==typeof Object.create?Object.create:function(e){function t(){}return t.prototype=e,new t};if("function"==typeof Object.setPrototypeOf)c=Object.setPrototypeOf;else{var p;e:{var f={};try{f.__proto__={a:!0},p=f.a;break e}catch(e){}p=!1}c=p?function(e,t){if(e.__proto__=t,e.__proto__!==t)throw new TypeError(e+" is not extensible");return e}:null}var h=c;function y(e,t){if(e.prototype=d(t.prototype),e.prototype.constructor=e,h)h(e,t);else for(var n in t)if("prototype"!=n)if(Object.defineProperties){var r=Object.getOwnPropertyDescriptor(t,n);r&&Object.defineProperty(e,n,r)}else e[n]=t[n];e.Hj=t.prototype}function g(){this.o=!1,this.l=null,this.h=void 0,this.g=1,this.j=this.m=0,this.A=this.i=null}function v(e){if(e.o)throw new TypeError("Generator is already running");e.o=!0}function m(e,t){e.i={$f:t,lg:!0},e.g=e.m||e.j}function b(e,t,n){return e.g=n,{value:t}}function k(e){e.g=0}function E(e,t,n){e.m=t,null!=n&&(e.j=n)}function _(e,t){e.m=0,e.j=t||0}function T(e,t,n){e.g=t,e.m=n||0}function A(e,t){return e.m=t||0,t=e.i.$f,e.i=null,t}function S(e){e.A=[e.i],e.m=0,e.j=0}function w(e,t){var n=e.A.splice(0)[0];(n=e.i=e.i||n)?n.lg?e.g=e.m||e.j:null!=n.u&&e.j<n.u?(e.g=n.u,e.i=null):e.g=e.j:e.g=t}function C(e){this.g=new g,this.h=e}function x(e,t,n,r){try{var i=t.call(e.g.l,n);if(!(i instanceof Object))throw new TypeError("Iterator result "+i+" is not an object");if(!i.done)return e.g.o=!1,i;var a=i.value}catch(t){return e.g.l=null,m(e.g,t),P(e)}return e.g.l=null,r.call(e.g,a),P(e)}function P(e){for(;e.g.g;)try{var t=e.h(e.g);if(t)return e.g.o=!1,{value:t.value,done:!1}}catch(t){e.g.h=void 0,m(e.g,t)}if(e.g.o=!1,e.g.i){if(t=e.g.i,e.g.i=null,t.lg)throw t.$f;return{value:t.return,done:!0}}return{value:void 0,done:!0}}function R(e){this.next=function(t){return v(e.g),e.g.l?t=x(e,e.g.l.next,t,e.g.s):(e.g.s(t),t=P(e)),t},this.throw=function(t){return v(e.g),e.g.l?t=x(e,e.g.l.throw,t,e.g.s):(m(e.g,t),t=P(e)),t},this.return=function(t){return function(e,t){v(e.g);var n=e.g.l;return n?x(e,"return"in n?n.return:function(e){return{value:e,done:!0}},t,e.g.return):(e.g.return(t),P(e))}(e,t)},this[Symbol.iterator]=function(){return this}}function I(e){return function(e){function t(t){return e.next(t)}function n(t){return e.throw(t)}return new Promise((function(r,i){!function e(a){a.done?r(a.value):Promise.resolve(a.value).then(t,n).then(e,i)}(e.next())}))}(new R(new C(e)))}function D(){for(var e=Number(this),t=[],n=e;n<arguments.length;n++)t[n-e]=arguments[n];return t}function O(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function L(e,t){e instanceof String&&(e+="");var n=0,r=!1,i={next:function(){if(!r&&n<e.length){var i=n++;return{value:t(i,e[i]),done:!1}}return r=!0,{done:!0,value:void 0}}};return i[Symbol.iterator]=function(){return i},i}function M(e,t,n){e instanceof String&&(e=String(e));for(var r=e.length,i=0;i<r;i++){var a=e[i];if(t.call(n,a,i,e))return{ig:i,v:a}}return{ig:-1,v:void 0}}function N(e,t,n){if(null==e)throw new TypeError("The 'this' value for String.prototype."+n+" must not be null or undefined");if(t instanceof RegExp)throw new TypeError("First argument to String.prototype."+n+" must not be a regular expression");return e+""}g.prototype.s=function(e){this.h=e},g.prototype.return=function(e){this.i={return:e},this.g=this.j},g.prototype.u=function(e){this.g=e},o("Promise",(function(e){function t(e){this.h=0,this.i=void 0,this.g=[],this.o=!1;var t=this.j();try{e(t.resolve,t.reject)}catch(e){t.reject(e)}}function n(){this.g=null}function r(e){return e instanceof t?e:new t((function(t){t(e)}))}if(e)return e;n.prototype.h=function(e){if(null==this.g){this.g=[];var t=this;this.i((function(){t.l()}))}this.g.push(e)};var i=a.setTimeout;n.prototype.i=function(e){i(e,0)},n.prototype.l=function(){for(;this.g&&this.g.length;){var e=this.g;this.g=[];for(var t=0;t<e.length;++t){var n=e[t];e[t]=null;try{n()}catch(e){this.j(e)}}}this.g=null},n.prototype.j=function(e){this.i((function(){throw e}))},t.prototype.j=function(){function e(e){return function(r){n||(n=!0,e.call(t,r))}}var t=this,n=!1;return{resolve:e(this.F),reject:e(this.l)}},t.prototype.F=function(e){if(e===this)this.l(new TypeError("A Promise cannot resolve to itself"));else if(e instanceof t)this.H(e);else{e:switch(typeof e){case"object":var n=null!=e;break e;case"function":n=!0;break e;default:n=!1}n?this.C(e):this.m(e)}},t.prototype.C=function(e){var t=void 0;try{t=e.then}catch(e){return void this.l(e)}"function"==typeof t?this.I(t,e):this.m(e)},t.prototype.l=function(e){this.s(2,e)},t.prototype.m=function(e){this.s(1,e)},t.prototype.s=function(e,t){if(0!=this.h)throw Error("Cannot settle("+e+", "+t+"): Promise already settled in state"+this.h);this.h=e,this.i=t,2===this.h&&this.G(),this.A()},t.prototype.G=function(){var e=this;i((function(){if(e.B()){var t=a.console;void 0!==t&&t.error(e.i)}}),1)},t.prototype.B=function(){if(this.o)return!1;var e=a.CustomEvent,t=a.Event,n=a.dispatchEvent;return void 0===n||("function"==typeof e?e=new e("unhandledrejection",{cancelable:!0}):"function"==typeof t?e=new t("unhandledrejection",{cancelable:!0}):(e=a.document.createEvent("CustomEvent")).initCustomEvent("unhandledrejection",!1,!0,e),e.promise=this,e.reason=this.i,n(e))},t.prototype.A=function(){if(null!=this.g){for(var e=0;e<this.g.length;++e)o.h(this.g[e]);this.g=null}};var o=new n;return t.prototype.H=function(e){var t=this.j();e.Fd(t.resolve,t.reject)},t.prototype.I=function(e,t){var n=this.j();try{e.call(t,n.resolve,n.reject)}catch(e){n.reject(e)}},t.prototype.then=function(e,n){function r(e,t){return"function"==typeof e?function(t){try{i(e(t))}catch(e){a(e)}}:t}var i,a,o=new t((function(e,t){i=e,a=t}));return this.Fd(r(e,i),r(n,a)),o},t.prototype.catch=function(e){return this.then(void 0,e)},t.prototype.Fd=function(e,t){function n(){switch(r.h){case 1:e(r.i);break;case 2:t(r.i);break;default:throw Error("Unexpected state: "+r.h)}}var r=this;null==this.g?o.h(n):this.g.push(n),this.o=!0},t.resolve=r,t.reject=function(e){return new t((function(t,n){n(e)}))},t.race=function(e){return new t((function(t,n){for(var i=l(e),a=i.next();!a.done;a=i.next())r(a.value).Fd(t,n)}))},t.all=function(e){var n=l(e),i=n.next();return i.done?r([]):new t((function(e,t){function a(t){return function(n){o[t]=n,0==--s&&e(o)}}var o=[],s=0;do{o.push(void 0),s++,r(i.value).Fd(a(o.length-1),t),i=n.next()}while(!i.done)}))},t})),o("WeakMap",(function(e){function t(e){if(this.g=(u+=Math.random()+1).toString(),e){e=l(e);for(var t;!(t=e.next()).done;)t=t.value,this.set(t[0],t[1])}}function n(){}function r(e){var t=typeof e;return"object"===t&&null!==e||"function"===t}function a(e){if(!O(e,s)){var t=new n;i(e,s,{value:t})}}function o(e){var t=Object[e];t&&(Object[e]=function(e){return e instanceof n?e:(Object.isExtensible(e)&&a(e),t(e))})}if(function(){if(!e||!Object.seal)return!1;try{var t=Object.seal({}),n=Object.seal({}),r=new e([[t,2],[n,3]]);return 2==r.get(t)&&3==r.get(n)&&(r.delete(t),r.set(n,4),!r.has(t)&&4==r.get(n))}catch(e){return!1}}())return e;var s="$jscomp_hidden_"+Math.random();o("freeze"),o("preventExtensions"),o("seal");var u=0;return t.prototype.set=function(e,t){if(!r(e))throw Error("Invalid WeakMap key");if(a(e),!O(e,s))throw Error("WeakMap key fail: "+e);return e[s][this.g]=t,this},t.prototype.get=function(e){return r(e)&&O(e,s)?e[s][this.g]:void 0},t.prototype.has=function(e){return r(e)&&O(e,s)&&O(e[s],this.g)},t.prototype.delete=function(e){return!!(r(e)&&O(e,s)&&O(e[s],this.g))&&delete e[s][this.g]},t})),o("Map",(function(e){function t(){var e={};return e.Ab=e.next=e.head=e}function n(e,t){var n=e.g;return s((function(){if(n){for(;n.head!=e.g;)n=n.Ab;for(;n.next!=n.head;)return n=n.next,{done:!1,value:t(n)};n=null}return{done:!0,value:void 0}}))}function r(e,t){var n=t&&typeof t;"object"==n||"function"==n?a.has(t)?n=a.get(t):(n=""+ ++o,a.set(t,n)):n="p_"+t;var r=e.h[n];if(r&&O(e.h,n))for(e=0;e<r.length;e++){var i=r[e];if(t!=t&&i.key!=i.key||t===i.key)return{id:n,list:r,index:e,entry:i}}return{id:n,list:r,index:-1,entry:void 0}}function i(e){if(this.h={},this.g=t(),this.size=0,e){e=l(e);for(var n;!(n=e.next()).done;)n=n.value,this.set(n[0],n[1])}}if(function(){if(!e||"function"!=typeof e||!e.prototype.entries||"function"!=typeof Object.seal)return!1;try{var t=Object.seal({x:4}),n=new e(l([[t,"s"]]));if("s"!=n.get(t)||1!=n.size||n.get({x:4})||n.set({x:4},"t")!=n||2!=n.size)return!1;var r=n.entries(),i=r.next();return!i.done&&i.value[0]==t&&"s"==i.value[1]&&!((i=r.next()).done||4!=i.value[0].x||"t"!=i.value[1]||!r.next().done)}catch(e){return!1}}())return e;var a=new WeakMap;i.prototype.set=function(e,t){var n=r(this,e=0===e?0:e);return n.list||(n.list=this.h[n.id]=[]),n.entry?n.entry.value=t:(n.entry={next:this.g,Ab:this.g.Ab,head:this.g,key:e,value:t},n.list.push(n.entry),this.g.Ab.next=n.entry,this.g.Ab=n.entry,this.size++),this},i.prototype.delete=function(e){return!(!(e=r(this,e)).entry||!e.list)&&(e.list.splice(e.index,1),e.list.length||delete this.h[e.id],e.entry.Ab.next=e.entry.next,e.entry.next.Ab=e.entry.Ab,e.entry.head=null,this.size--,!0)},i.prototype.clear=function(){this.h={},this.g=this.g.Ab=t(),this.size=0},i.prototype.has=function(e){return!!r(this,e).entry},i.prototype.get=function(e){return(e=r(this,e).entry)&&e.value},i.prototype.entries=function(){return n(this,(function(e){return[e.key,e.value]}))},i.prototype.keys=function(){return n(this,(function(e){return e.key}))},i.prototype.values=function(){return n(this,(function(e){return e.value}))},i.prototype.forEach=function(e,t){for(var n,r=this.entries();!(n=r.next()).done;)n=n.value,e.call(t,n[1],n[0],this)},i.prototype[Symbol.iterator]=i.prototype.entries;var o=0;return i})),o("Set",(function(e){function t(e){if(this.g=new Map,e){e=l(e);for(var t;!(t=e.next()).done;)this.add(t.value)}this.size=this.g.size}return function(){if(!e||"function"!=typeof e||!e.prototype.entries||"function"!=typeof Object.seal)return!1;try{var t=Object.seal({x:4}),n=new e(l([t]));if(!n.has(t)||1!=n.size||n.add(t)!=n||1!=n.size||n.add({x:4})!=n||2!=n.size)return!1;var r=n.entries(),i=r.next();return!i.done&&i.value[0]==t&&i.value[1]==t&&(!(i=r.next()).done&&i.value[0]!=t&&4==i.value[0].x&&i.value[1]==i.value[0]&&r.next().done)}catch(e){return!1}}()?e:(t.prototype.add=function(e){return e=0===e?0:e,this.g.set(e,e),this.size=this.g.size,this},t.prototype.delete=function(e){return e=this.g.delete(e),this.size=this.g.size,e},t.prototype.clear=function(){this.g.clear(),this.size=0},t.prototype.has=function(e){return this.g.has(e)},t.prototype.entries=function(){return this.g.entries()},t.prototype.values=function(){return this.g.values()},t.prototype.keys=t.prototype.values,t.prototype[Symbol.iterator]=t.prototype.values,t.prototype.forEach=function(e,t){var n=this;this.g.forEach((function(r){return e.call(t,r,r,n)}))},t)})),o("Array.prototype.keys",(function(e){return e||function(){return L(this,(function(e){return e}))}})),o("Array.prototype.findIndex",(function(e){return e||function(e,t){return M(this,e,t).ig}})),o("Object.is",(function(e){return e||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}})),o("Array.prototype.includes",(function(e){return e||function(e,t){var n=this;n instanceof String&&(n=String(n));var r=n.length;for(0>(t=t||0)&&(t=Math.max(t+r,0));t<r;t++){var i=n[t];if(i===e||Object.is(i,e))return!0}return!1}})),o("String.prototype.includes",(function(e){return e||function(e,t){return-1!==N(this,e,"includes").indexOf(e,t||0)}})),o("Array.prototype.find",(function(e){return e||function(e,t){return M(this,e,t).v}})),o("String.prototype.startsWith",(function(e){return e||function(e,t){var n=N(this,e,"startsWith"),r=n.length,i=e.length;t=Math.max(0,Math.min(0|t,n.length));for(var a=0;a<i&&t<r;)if(n[t++]!=e[a++])return!1;return a>=i}})),o("WeakSet",(function(e){function t(e){if(this.g=new WeakMap,e){e=l(e);for(var t;!(t=e.next()).done;)this.add(t.value)}}return function(){if(!e||!Object.seal)return!1;try{var t=Object.seal({}),n=Object.seal({}),r=new e([t]);return!(!r.has(t)||r.has(n))&&(r.delete(t),r.add(n),!r.has(t)&&r.has(n))}catch(e){return!1}}()?e:(t.prototype.add=function(e){return this.g.set(e,!0),this},t.prototype.has=function(e){return this.g.has(e)},t.prototype.delete=function(e){return this.g.delete(e)},t)})),o("Array.from",(function(e){return e||function(e,t,n){t=null!=t?t:function(e){return e};var r=[],i="undefined"!=typeof Symbol&&Symbol.iterator&&e[Symbol.iterator];if("function"==typeof i){e=i.call(e);for(var a=0;!(i=e.next()).done;)r.push(t.call(n,i.value,a++))}else for(i=e.length,a=0;a<i;a++)r.push(t.call(n,e[a],a));return r}}));var U="function"==typeof Object.assign?Object.assign:function(e,t){for(var n=1;n<arguments.length;n++){var r=arguments[n];if(r)for(var i in r)O(r,i)&&(e[i]=r[i])}return e};o("Object.assign",(function(e){return e||U})),o("Array.prototype.values",(function(e){return e||function(){return L(this,(function(e,t){return t}))}})),o("Promise.prototype.finally",(function(e){return e||function(e){return this.then((function(t){return Promise.resolve(e()).then((function(){return t}))}),(function(t){return Promise.resolve(e()).then((function(){throw t}))}))}})),o("Array.prototype.entries",(function(e){return e||function(){return L(this,(function(e,t){return[e,t]}))}})),o("String.prototype.repeat",(function(e){return e||function(e){var t=N(this,null,"repeat");if(0>e||1342177279<e)throw new RangeError("Invalid count value");e|=0;for(var n="";e;)1&e&&(n+=t),(e>>>=1)&&(t+=t);return n}})),o("Number.isNaN",(function(e){return e||function(e){return"number"==typeof e&&isNaN(e)}})),o("Number.isFinite",(function(e){return e||function(e){return"number"==typeof e&&(!isNaN(e)&&1/0!==e&&-1/0!==e)}})),o("Object.values",(function(e){return e||function(e){var t,n=[];for(t in e)O(e,t)&&n.push(e[t]);return n}})),o("Math.log2",(function(e){return e||function(e){return Math.log(e)/Math.LN2}})),o("Number.MAX_SAFE_INTEGER",(function(){return 9007199254740991})),o("Math.trunc",(function(e){return e||function(e){if(e=Number(e),isNaN(e)||1/0===e||-1/0===e||0===e)return e;var t=Math.floor(Math.abs(e));return 0>e?-t:t}})),o("Object.entries",(function(e){return e||function(e){var t,n=[];for(t in e)O(e,t)&&n.push([t,e[t]]);return n}}));var B=this||self;function F(e,t){e=e.split(".");var n,r=B;e[0]in r||void 0===r.execScript||r.execScript("var "+e[0]);for(;e.length&&(n=e.shift());)e.length||void 0===t?r=r[n]&&r[n]!==Object.prototype[n]?r[n]:r[n]={}:r[n]=t}function j(){}function H(){}function V(e){this.g=Math.exp(Math.log(.5)/e),this.i=this.h=0}function G(e){return e.h/(1-Math.pow(e.g,e.i))}function K(){this.h=new V(2),this.j=new V(5),this.g=0,this.i=128e3,this.l=16e3}function z(){}function W(){}function Y(){}function Z(e){var t=D.apply(1,arguments);X.has(e)||(X.add(e),Y.apply(z,u(t)))}function q(){}V.prototype.sample=function(e,t){var n=Math.pow(this.g,e);t=t*(1-n)+n*this.h,isNaN(t)||(this.h=t,this.i+=e)},K.prototype.configure=function(e){this.i=e.minTotalBytes,this.l=e.minBytes,this.h.g=Math.exp(Math.log(.5)/e.fastHalfLife),this.j.g=Math.exp(Math.log(.5)/e.slowHalfLife)},K.prototype.sample=function(e,t){if(!(t<this.l)){var n=8e3*t/e;e/=1e3,this.g+=t,this.h.sample(e,n),this.j.sample(e,n)}},K.prototype.getBandwidthEstimate=function(e){return this.g<this.i?e:Math.min(G(this.h),G(this.j))};var X=new Set;function Q(){this.g={}}function $(){this.g=new Q}function J(e,t,n,r){this.target=e,this.type=t,this.listener=n,this.g=function(e,t){if(null==t)return!1;if("boolean"==typeof t)return t;var n=new Set(["passive","capture"]);return Object.keys(t).filter((function(e){return!n.has(e)})),function(e){var t=ee;if(null==t){t=!1;try{var n={},r={get:function(){return t=!0,!1}};Object.defineProperty(n,"passive",r),Object.defineProperty(n,"capture",r),r=function(){},e.addEventListener("test",r,n),e.removeEventListener("test",r,n)}catch(e){t=!1}ee=t}return t||!1}(e)?t:t.capture||!1}(e,r),this.target.addEventListener(t,n,this.g)}e.console&&(Y=function(){return console.warn.apply(console,u(D.apply(0,arguments)))},W=function(){console.error.apply(console,u(D.apply(0,arguments)))}),(n=Q.prototype).push=function(e,t){this.g.hasOwnProperty(e)?this.g[e].push(t):this.g[e]=[t]},n.get=function(e){return(e=this.g[e])?e.slice():null},n.remove=function(e,t){e in this.g&&(this.g[e]=this.g[e].filter((function(e){return e!=t})),0==this.g[e].length&&delete this.g[e])},n.forEach=function(e){for(var t in this.g)e(t,this.g[t])},n.size=function(){return Object.keys(this.g).length},n.keys=function(){return Object.keys(this.g)},(n=$.prototype).release=function(){this.ib(),this.g=null},n.D=function(e,t,n,r){this.g&&(e=new J(e,t,n,r),this.g.push(t,e))},n.na=function(e,t,n,r){var i=this;this.D(e,t,(function r(a){i.Lb(e,t,r),n(a)}),r)},n.Lb=function(e,t,n){if(this.g)for(var r=this.g.get(t)||[],i=(r=l(r)).next();!i.done;i=r.next())(i=i.value).target!=e||n!=i.listener&&n||(i.Lb(),this.g.remove(t,i))},n.ib=function(){if(this.g){var e,t=this.g,n=[];for(e in t.g)n.push.apply(n,u(t.g[e]));for(n=(t=l(n)).next();!n.done;n=t.next())n.value.Lb();this.g.g={}}},F("shaka.util.EventManager",$),$.prototype.removeAll=$.prototype.ib,$.prototype.unlisten=$.prototype.Lb,$.prototype.listenOnce=$.prototype.na,$.prototype.listen=$.prototype.D,$.prototype.release=$.prototype.release,J.prototype.Lb=function(){this.target.removeEventListener(this.type,this.listener,this.g),this.listener=this.target=null,this.g=!1};var ee=void 0;function te(t){if(re.has(t))return re.get(t);if(e.ManagedMediaSource){var n=ManagedMediaSource.isTypeSupported(t);return re.set(t,n),n}return!!e.MediaSource&&(n=MediaSource.isTypeSupported(t),re.set(t,n),n)}function ne(){return!!e.SourceBuffer&&!!SourceBuffer.prototype&&!!SourceBuffer.prototype.changeType}var re=new Map;function ie(e,t){this.g=e,this.h=t}function ae(e,t){var n=new ie(5,0),r=le,i=r.g,a=n.h-i.h;(0<(n.g-i.g||a)?r.i:r.h)(r.g,n,e,t)}function oe(e,t,n,r){Y([n,"has been deprecated and will be removed in",t,". We are currently at version",e,". Additional information:",r].join(" "))}function se(e,t,n,r){W([n,"has been deprecated and has been removed in",t,". We are now at version",e,". Additional information:",r].join(" "))}ie.prototype.toString=function(){return"v"+this.g+"."+this.h};var le=null;function ue(){}function ce(){}function de(){}function pe(e,t){if(!e&&!t)return!0;if(!e||!t||e.byteLength!=t.byteLength)return!1;if(fe(e)==fe(t)&&(e.byteOffset||0)==(t.byteOffset||0))return!0;var n=ye(e);t=ye(t);for(var r=0;r<e.byteLength;r++)if(n[r]!=t[r])return!1;return!0}function fe(e){return e instanceof ArrayBuffer?e:e.buffer}function he(e){return e instanceof ArrayBuffer?e:0==e.byteOffset&&e.byteLength==e.buffer.byteLength?e.buffer:new Uint8Array(e).buffer}function ye(e,t,n){return me(e,void 0===t?0:t,n=void 0===n?1/0:n,Uint8Array)}function ge(e,t,n){return me(e,void 0===t?0:t,n=void 0===n?1/0:n,Uint16Array)}function ve(e,t,n){return me(e,void 0===t?0:t,n=void 0===n?1/0:n,DataView)}function me(e,t,n,r){var i=fe(e),a=1;"BYTES_PER_ELEMENT"in r&&(a=r.BYTES_PER_ELEMENT);var o=((e.byteOffset||0)+e.byteLength)/a;return new r(i,e=Math.floor(Math.max(0,Math.min(((e.byteOffset||0)+t)/a,o))),Math.floor(Math.min(e+Math.max(n,0),o))-e)}function be(){}function ke(e){this.l=new ce,(e=Ee[e.toLowerCase()])&&(this.l=e()),this.h=new ue,(e=_e)&&(this.h=e())}ue.prototype.extract=function(){},ue.prototype.decode=function(){return[]},ue.prototype.clear=function(){},ue.prototype.getStreams=function(){return[]},ce.prototype.init=function(){},ce.prototype.parse=function(){return[]},F("shaka.util.BufferUtils",de),de.toDataView=ve,de.toUint16=ge,de.toUint8=ye,de.toArrayBuffer=he,de.equal=pe,be.prototype.init=function(){},be.prototype.i=function(){},be.prototype.g=function(){},be.prototype.j=function(){},F("shaka.media.IClosedCaptionParser",be),ke.prototype.init=function(e,t){void 0!==t&&t||(this.g(),this.l.init(e))},ke.prototype.i=function(e){for(var t=(e=l(e=this.l.parse(e))).next();!t.done;t=e.next()){var n=ye((t=t.value).packet);0<n.length&&this.h.extract(n,t.pts)}return this.h.decode()},ke.prototype.g=function(){this.h.clear()},ke.prototype.j=function(){return this.h.getStreams()},F("shaka.media.ClosedCaptionParser",ke),ke.findDecoder=function(){return _e},ke.unregisterDecoder=function(){_e=null},ke.registerDecoder=function(e){_e=e},ke.findParser=function(e){return Ee[e]},ke.unregisterParser=function(e){delete Ee[e]},ke.registerParser=function(e,t){Ee[e]=t};var Ee={},_e=null;function Te(e,t){return!("number"!=typeof e||"number"!=typeof t||!isNaN(e)||!isNaN(t))||e===t}function Ae(e,t){-1<(t=e.indexOf(t))&&e.splice(t,1)}function Se(e,t,n){if(n||(n=Te),e.length!=t.length)return!1;t=t.slice();for(var r={},i=(e=l(e)).next();!i.done;r={oe:r.oe},i=e.next()){if(r.oe=i.value,-1==(i=t.findIndex(function(e){return function(t){return n(e.oe,t)}}(r))))return!1;t[i]=t[t.length-1],t.pop()}return 0==t.length}function we(e,t,n){if(n||(n=Te),e.length!=t.length)return!1;for(var r=0;r<e.length;r++)if(!n(e[r],t[r]))return!1;return!0}function Ce(e,t,n){this.startTime=e,this.endTime=t,this.payload=n,this.region=new ze,this.position=null,this.positionAlign=Re,this.size=0,this.textAlign=Ie,this.direction=Me,this.writingMode=Ne,this.lineInterpretation=Ue,this.line=null,this.lineHeight="",this.lineAlign=Be,this.displayAlign=Oe,this.fontSize=this.border=this.backgroundImage=this.backgroundColor=this.color="",this.fontWeight=Ve,this.fontStyle=Ge,this.linePadding=this.letterSpacing=this.fontFamily="",this.opacity=1,this.textCombineUpright="",this.textDecoration=[],this.textStrokeWidth=this.textStrokeColor=this.textShadow="",this.wrapLine=!0,this.id="",this.nestedCues=[],this.lineBreak=this.isContainer=!1,this.rubyTag=null,this.cellResolution={Sb:32,rows:15}}function xe(e,t){return(e=new Ce(e,t,"")).lineBreak=!0,e}function Pe(e,t){if(e.startTime!=t.startTime||e.endTime!=t.endTime||e.payload!=t.payload)return!1;for(var n in e)if("startTime"!=n&&"endTime"!=n&&"payload"!=n)if("nestedCues"==n){if(!we(e.nestedCues,t.nestedCues,Pe))return!1}else if("region"==n||"cellResolution"==n){for(var r in e[n])if(e[n][r]!=t[n][r])return!1}else if(Array.isArray(e[n])){if(!we(e[n],t[n]))return!1}else if(e[n]!=t[n])return!1;return!0}Ce.prototype.clone=function(){var e,t=new Ce(0,0,"");for(e in this)t[e]=this[e],t[e]&&t[e].constructor==Array&&(t[e]=t[e].slice());return t},F("shaka.text.Cue",Ce),Ce.equal=Pe,Ce.prototype.clone=Ce.prototype.clone;var Re="auto";Ce.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:Re};var Ie="center",De={LEFT:"left",RIGHT:"right",CENTER:Ie,START:"start",END:"end"};Ce.textAlign=De;var Oe="after",Le={BEFORE:"before",CENTER:"center",AFTER:Oe};Ce.displayAlign=Le;var Me="ltr";Ce.direction={HORIZONTAL_LEFT_TO_RIGHT:Me,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var Ne="horizontal-tb";Ce.writingMode={HORIZONTAL_TOP_TO_BOTTOM:Ne,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};var Ue=0;Ce.lineInterpretation={LINE_NUMBER:Ue,PERCENTAGE:1};var Be="start",Fe={CENTER:"center",START:Be,END:"end"};Ce.lineAlign=Fe;var je={white:"white",lime:"lime",cyan:"cyan",red:"red",yellow:"yellow",magenta:"magenta",blue:"blue",black:"black"};Ce.defaultTextColor=je;var He={bg_white:"white",bg_lime:"lime",bg_cyan:"cyan",bg_red:"red",bg_yellow:"yellow",bg_magenta:"magenta",bg_blue:"blue",bg_black:"black"};Ce.defaultTextBackgroundColor=He;var Ve=400;Ce.fontWeight={NORMAL:Ve,BOLD:700};var Ge="normal",Ke={NORMAL:Ge,ITALIC:"italic",OBLIQUE:"oblique"};function ze(){this.id="",this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0,this.height=this.width=100,this.viewportAnchorUnits=this.widthUnits=this.heightUnits=We,this.scroll=Ye}Ce.fontStyle=Ke,Ce.textDecoration={UNDERLINE:"underline",LINE_THROUGH:"lineThrough",OVERLINE:"overline"},F("shaka.text.CueRegion",ze);var We=1;ze.units={PX:0,PERCENTAGE:We,LINES:2};var Ye="";function Ze(){}function qe(e,t,n){Qe[e.toLowerCase().split(";")[0]+"-"+n]={priority:n,he:t}}function Xe(e,t){for(var n=e.toLowerCase().split(";")[0],r=l([tt,et,Je,$e]),i=r.next();!i.done;i=r.next())if(i=Qe[n+"-"+i.value]){var a=i.he(),o=a.isSupported(e,t);if(a.destroy(),o)return i.he}return null}ze.scrollMode={NONE:Ye,UP:"up"},Ze.prototype.destroy=function(){},F("shaka.transmuxer.TransmuxerEngine",Ze),Ze.findTransmuxer=Xe,Ze.unregisterTransmuxer=function(e,t){delete Qe[e.toLowerCase().split(";")[0]+"-"+t]},Ze.registerTransmuxer=qe,Ze.prototype.destroy=Ze.prototype.destroy;var Qe={},$e=1,Je=2,et=3,tt=4;Ze.PluginPriority={FALLBACK:$e,PREFERRED_SECONDARY:Je,PREFERRED:et,APPLICATION:tt};var nt=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$");function rt(e){var t;e instanceof rt?(it(this,e.kb),this.jc=e.jc,at(this,e.wb),ot(this,e.yc),this.Ma=e.Ma,st(this,e.g.clone()),this.Tb=e.Tb):e&&(t=String(e).match(nt))?(it(this,t[1]||"",!0),this.jc=lt(t[2]||""),at(this,t[3]||"",!0),ot(this,t[4]),this.Ma=lt(t[5]||"",!0),st(this,t[6]||"",!0),this.Tb=lt(t[7]||"")):this.g=new gt(null)}function it(e,t,n){e.kb=n?lt(t,!0):t,e.kb&&(e.kb=e.kb.replace(/:$/,""))}function at(e,t,n){e.wb=n?lt(t,!0):t}function ot(e,t){if(t){if(t=Number(t),isNaN(t)||0>t)throw Error("Bad port number "+t);e.yc=t}else e.yc=null}function st(e,t,n){t instanceof gt?e.g=t:(n||(t=ut(t,ht)),e.g=new gt(t))}function lt(e,t){return e?t?decodeURI(e):decodeURIComponent(e):""}function ut(e,t,n){return null!=e?(e=encodeURI(e).replace(t,ct),n&&(e=e.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),e):null}function ct(e){return"%"+((e=e.charCodeAt(0))>>4&15).toString(16)+(15&e).toString(16)}(n=rt.prototype).kb="",n.jc="",n.wb="",n.yc=null,n.Ma="",n.Tb="",n.toString=function(){var e=[],t=this.kb;if(t&&e.push(ut(t,dt,!0),":"),t=this.wb){e.push("//");var n=this.jc;n&&e.push(ut(n,dt,!0),"@"),e.push(encodeURIComponent(t).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),null!=(t=this.yc)&&e.push(":",String(t))}return(t=this.Ma)&&(this.wb&&"/"!=t.charAt(0)&&e.push("/"),e.push(ut(t,"/"==t.charAt(0)?ft:pt,!0))),(t=this.g.toString())&&e.push("?",t),(t=this.Tb)&&e.push("#",ut(t,yt)),e.join("")},n.resolve=function(e){var t=this.clone();"data"===t.kb&&(t=new rt);var n=!!e.kb;n?it(t,e.kb):n=!!e.jc,n?t.jc=e.jc:n=!!e.wb,n?at(t,e.wb):n=null!=e.yc;var r=e.Ma;if(n)ot(t,e.yc);else if(n=!!e.Ma){if("/"!=r.charAt(0))if(this.wb&&!this.Ma)r="/"+r;else{var i=t.Ma.lastIndexOf("/");-1!=i&&(r=t.Ma.substr(0,i+1)+r)}if(".."==r||"."==r)r="";else if(-1!=r.indexOf("./")||-1!=r.indexOf("/.")){i=0==r.lastIndexOf("/",0),r=r.split("/");for(var a=[],o=0;o<r.length;){var s=r[o++];"."==s?i&&o==r.length&&a.push(""):".."==s?((1<a.length||1==a.length&&""!=a[0])&&a.pop(),i&&o==r.length&&a.push("")):(a.push(s),i=!0)}r=a.join("/")}}return n?t.Ma=r:n=""!==e.g.toString(),n?st(t,e.g.clone()):n=!!e.Tb,n&&(t.Tb=e.Tb),t},n.clone=function(){return new rt(this)};var dt=/[#\/\?@]/g,pt=/[#\?:]/g,ft=/[#\?]/g,ht=/[#\?@]/g,yt=/#/g;function gt(e){this.g=e||null}function vt(e){if(!e.Ca&&(e.Ca={},e.Wc=0,e.g))for(var t=e.g.split("&"),n=0;n<t.length;n++){var r=t[n].indexOf("="),i=null;if(0<=r){var a=t[n].substring(0,r);i=t[n].substring(r+1)}else a=t[n];a=decodeURIComponent(a.replace(/\+/g," ")),i=i||"",e.add(a,decodeURIComponent(i.replace(/\+/g," ")))}}function mt(e){return vt(e),e.Wc}function bt(e,t,n){var r=D.apply(3,arguments);if(this.severity=e,this.category=t,this.code=n,this.data=r,this.handled=!1,this.message="Shaka Error "+this.code,kt)try{throw Error(this.message||"Shaka Error")}catch(e){this.stack=e.stack}}(n=gt.prototype).Ca=null,n.Wc=null,n.add=function(e,t){vt(this),this.g=null;var n=this.Ca.hasOwnProperty(e)?this.Ca[e]:null;return n||(this.Ca[e]=n=[]),n.push(t),this.Wc++,this},n.set=function(e,t){return vt(this),this.g=null,this.Ca.hasOwnProperty(e)?this.Ca[e]=[t]:this.add(e,t),this},n.get=function(e){return vt(this),this.Ca[e]||[]},n.toString=function(){if(this.g)return this.g;if(!this.Ca)return"";var e,t=[];for(e in this.Ca)for(var n=encodeURIComponent(e),r=this.Ca[e],i=0;i<r.length;i++){var a=n;""!==r[i]&&(a+="="+encodeURIComponent(r[i])),t.push(a)}return this.g=t.join("&")},n.clone=function(){var e=new gt;if(e.g=this.g,this.Ca){var t,n={};for(t in this.Ca)n[t]=this.Ca[t].concat();e.Ca=n,e.Wc=this.Wc}return e},bt.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null,"  ")},F("shaka.util.Error",bt);var kt=!0;function Et(e){this.h=e,this.g=void 0}function _t(e){this.h=e,this.g=null}function Tt(e){this.h=e,this.g=null}function At(){var t=e.ManagedMediaSource||e.MediaSource;return!(!t||!t.isTypeSupported)}function St(e){return""!=Vt().canPlayType(e)}function wt(){return!!navigator.userAgent.match(/Edge?\//)}function Ct(){return!!navigator.userAgent.match(/Edge\//)}function xt(){return Ht("Xbox One")}function Pt(){return Ht("Tizen")}function Rt(){return Ht("Tizen 3")}function It(){return Ht("Tizen 2")}function Dt(){return Ht("Web0S")}function Ot(){return Dt()&&38===Mt()}function Lt(){return Ht("CrKey")}function Mt(){if(!Ht("Chrome")||Ct())return null;var e=navigator.userAgent.match(/Chrome\/(\d+)/);return e?parseInt(e[1],10):null}function Nt(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!Pt()&&!Ht("PC=EOS")&&!Ht("PC=APL")&&!Ht("VirginMedia")&&!Ht("SOPOpenBrowser")&&!Bt()&&!Ht("AFT")&&!Ht("WPE")&&!Ht("DT_STB_BCM")}function Ut(){return Ht("PlayStation 5")}function Bt(){return Ht("PlayStation 4")}function Ft(){return Ht("Hisense")||Ht("VIDAA")}function jt(){if(!Nt())return null;var e=navigator.userAgent.match(/Version\/(\d+)/);return e||(e=navigator.userAgent.match(/OS (\d+)(?:_\d+)?/))?parseInt(e[1],10):null}function Ht(e){return(navigator.userAgent||"").includes(e)}function Vt(){return Kt||(Gt||(Gt=new Tt((function(){Kt=null}))),(Kt=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(Kt=document.createElement("video")),Gt.U(1),Kt)}bt.Severity={RECOVERABLE:1,CRITICAL:2},bt.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9,ADS:10},bt.Code={UNSUPPORTED_SCHEME:1e3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,REQUEST_FILTER_ERROR:1006,RESPONSE_FILTER_ERROR:1007,MALFORMED_TEST_URI:1008,UNEXPECTED_TEST_REQUEST:1009,ATTEMPTS_EXHAUSTED:1010,SEGMENT_MISSING:1011,INVALID_TEXT_HEADER:2e3,INVALID_TEXT_CUE:2001,UNABLE_TO_DETECT_ENCODING:2003,BAD_ENCODING:2004,INVALID_XML:2005,INVALID_MP4_TTML:2007,INVALID_MP4_VTT:2008,UNABLE_TO_EXTRACT_CUE_START_TIME:2009,INVALID_MP4_CEA:2010,TEXT_COULD_NOT_GUESS_MIME_TYPE:2011,CANNOT_ADD_EXTERNAL_TEXT_TO_SRC_EQUALS:2012,TEXT_ONLY_WEBVTT_SRC_EQUALS:2013,MISSING_TEXT_PLUGIN:2014,CHAPTERS_TRACK_FAILED:2015,UNSUPPORTED_EXTERNAL_THUMBNAILS_URI:2017,BUFFER_READ_OUT_OF_BOUNDS:3e3,JS_INTEGER_OVERFLOW:3001,EBML_OVERFLOW:3002,EBML_BAD_FLOATING_POINT_SIZE:3003,MP4_SIDX_WRONG_BOX_TYPE:3004,MP4_SIDX_INVALID_TIMESCALE:3005,MP4_SIDX_TYPE_NOT_SUPPORTED:3006,WEBM_CUES_ELEMENT_MISSING:3007,WEBM_EBML_HEADER_ELEMENT_MISSING:3008,WEBM_SEGMENT_ELEMENT_MISSING:3009,WEBM_INFO_ELEMENT_MISSING:3010,WEBM_DURATION_ELEMENT_MISSING:3011,WEBM_CUE_TRACK_POSITIONS_ELEMENT_MISSING:3012,WEBM_CUE_TIME_ELEMENT_MISSING:3013,MEDIA_SOURCE_OPERATION_FAILED:3014,MEDIA_SOURCE_OPERATION_THREW:3015,VIDEO_ERROR:3016,QUOTA_EXCEEDED_ERROR:3017,TRANSMUXING_FAILED:3018,CONTENT_TRANSFORMATION_FAILED:3019,MSS_MISSING_DATA_FOR_TRANSMUXING:3020,MSS_TRANSMUXING_CODEC_UNKNOWN:3021,MSS_TRANSMUXING_FAILED:3022,TRANSMUXING_NO_VIDEO_DATA:3023,UNABLE_TO_GUESS_MANIFEST_TYPE:4e3,DASH_INVALID_XML:4001,DASH_NO_SEGMENT_INFO:4002,DASH_EMPTY_ADAPTATION_SET:4003,DASH_EMPTY_PERIOD:4004,DASH_WEBM_MISSING_INIT:4005,DASH_UNSUPPORTED_CONTAINER:4006,DASH_PSSH_BAD_ENCODING:4007,DASH_NO_COMMON_KEY_SYSTEM:4008,DASH_MULTIPLE_KEY_IDS_NOT_SUPPORTED:4009,DASH_CONFLICTING_KEY_IDS:4010,RESTRICTIONS_CANNOT_BE_MET:4012,HLS_PLAYLIST_HEADER_MISSING:4015,INVALID_HLS_TAG:4016,HLS_INVALID_PLAYLIST_HIERARCHY:4017,DASH_DUPLICATE_REPRESENTATION_ID:4018,HLS_MULTIPLE_MEDIA_INIT_SECTIONS_FOUND:4020,HLS_REQUIRED_ATTRIBUTE_MISSING:4023,HLS_REQUIRED_TAG_MISSING:4024,HLS_COULD_NOT_GUESS_CODECS:4025,HLS_KEYFORMATS_NOT_SUPPORTED:4026,DASH_UNSUPPORTED_XLINK_ACTUATE:4027,DASH_XLINK_DEPTH_LIMIT:4028,CONTENT_UNSUPPORTED_BY_BROWSER:4032,CANNOT_ADD_EXTERNAL_TEXT_TO_LIVE_STREAM:4033,NO_VARIANTS:4036,PERIOD_FLATTENING_FAILED:4037,INCONSISTENT_DRM_ACROSS_PERIODS:4038,HLS_VARIABLE_NOT_FOUND:4039,HLS_MSE_ENCRYPTED_MP2T_NOT_SUPPORTED:4040,HLS_MSE_ENCRYPTED_LEGACY_APPLE_MEDIA_KEYS_NOT_SUPPORTED:4041,NO_WEB_CRYPTO_API:4042,CANNOT_ADD_EXTERNAL_THUMBNAILS_TO_LIVE_STREAM:4045,MSS_INVALID_XML:4046,MSS_LIVE_CONTENT_NOT_SUPPORTED:4047,AES_128_INVALID_IV_LENGTH:4048,AES_128_INVALID_KEY_LENGTH:4049,DASH_CONFLICTING_AES_128:4050,DASH_UNSUPPORTED_AES_128:4051,STREAMING_ENGINE_STARTUP_INVALID_STATE:5006,NO_RECOGNIZED_KEY_SYSTEMS:6e3,REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE:6001,FAILED_TO_CREATE_CDM:6002,FAILED_TO_ATTACH_TO_VIDEO:6003,INVALID_SERVER_CERTIFICATE:6004,FAILED_TO_CREATE_SESSION:6005,FAILED_TO_GENERATE_LICENSE_REQUEST:6006,LICENSE_REQUEST_FAILED:6007,LICENSE_RESPONSE_REJECTED:6008,ENCRYPTED_CONTENT_WITHOUT_DRM_INFO:6010,NO_LICENSE_SERVER_GIVEN:6012,OFFLINE_SESSION_REMOVED:6013,EXPIRED:6014,SERVER_CERTIFICATE_REQUIRED:6015,INIT_DATA_TRANSFORM_ERROR:6016,SERVER_CERTIFICATE_REQUEST_FAILED:6017,MIN_HDCP_VERSION_NOT_MATCH:6018,ERROR_CHECKING_HDCP_VERSION:6019,LOAD_INTERRUPTED:7e3,OPERATION_ABORTED:7001,NO_VIDEO_ELEMENT:7002,OBJECT_DESTROYED:7003,CONTENT_NOT_LOADED:7004,SRC_EQUALS_PRELOAD_NOT_SUPPORTED:7005,CAST_API_UNAVAILABLE:8e3,NO_CAST_RECEIVERS:8001,ALREADY_CASTING:8002,UNEXPECTED_CAST_ERROR:8003,CAST_CANCELED_BY_USER:8004,CAST_CONNECTION_TIMED_OUT:8005,CAST_RECEIVER_APP_UNAVAILABLE:8006,STORAGE_NOT_SUPPORTED:9e3,INDEXED_DB_ERROR:9001,DEPRECATED_OPERATION_ABORTED:9002,REQUESTED_ITEM_NOT_FOUND:9003,MALFORMED_OFFLINE_URI:9004,CANNOT_STORE_LIVE_OFFLINE:9005,NO_INIT_DATA_FOR_OFFLINE:9007,LOCAL_PLAYER_INSTANCE_REQUIRED:9008,NEW_KEY_OPERATION_NOT_SUPPORTED:9011,KEY_NOT_FOUND:9012,MISSING_STORAGE_CELL:9013,STORAGE_LIMIT_REACHED:9014,DOWNLOAD_SIZE_CALLBACK_ERROR:9015,MODIFY_OPERATION_NOT_SUPPORTED:9016,INDEXED_DB_INIT_TIMED_OUT:9017,CS_IMA_SDK_MISSING:1e4,CS_AD_MANAGER_NOT_INITIALIZED:10001,SS_IMA_SDK_MISSING:10002,SS_AD_MANAGER_NOT_INITIALIZED:10003,CURRENT_DAI_REQUEST_NOT_FINISHED:10004,MT_AD_MANAGER_NOT_INITIALIZED:10005},Et.prototype.value=function(){return null==this.g&&(this.g=this.h()),this.g},_t.prototype.U=function(t){var n=this;this.stop();var r=!0,i=null;return this.g=function(){e.clearTimeout(i),r=!1},i=e.setTimeout((function(){r&&n.h()}),1e3*t),this},_t.prototype.stop=function(){this.g&&(this.g(),this.g=null)},Tt.prototype.hc=function(){return this.stop(),this.h(),this},Tt.prototype.U=function(e){var t=this;return this.stop(),this.g=new _t((function(){t.h()})).U(e),this},Tt.prototype.Pa=function(e){var t=this;return this.stop(),this.g=new _t((function(){t.g.U(e),t.h()})).U(e),this},Tt.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)},F("shaka.util.Timer",Tt),Tt.prototype.stop=Tt.prototype.stop,Tt.prototype.tickEvery=Tt.prototype.Pa,Tt.prototype.tickAfter=Tt.prototype.U,Tt.prototype.tickNow=Tt.prototype.hc;var Gt=null,Kt=null;function zt(){}function Wt(t){if(!t)return"";if(239==(t=ye(t))[0]&&187==t[1]&&191==t[2]&&(t=t.subarray(3)),e.TextDecoder&&!Bt())return(t=(new TextDecoder).decode(t)).includes("�")&&W('Decoded string contains an "unknown character" codepoint.  That probably means the UTF8 encoding was incorrect!'),t;for(var n="",r=0;r<t.length;++r){var i=65533;if(0==(128&t[r])?i=t[r]:t.length>=r+2&&192==(224&t[r])&&128==(192&t[r+1])?(i=(31&t[r])<<6|63&t[r+1],r+=1):t.length>=r+3&&224==(240&t[r])&&128==(192&t[r+1])&&128==(192&t[r+2])?(i=(15&t[r])<<12|(63&t[r+1])<<6|63&t[r+2],r+=2):t.length>=r+4&&240==(241&t[r])&&128==(192&t[r+1])&&128==(192&t[r+2])&&128==(192&t[r+3])&&(i=(7&t[r])<<18|(63&t[r+1])<<12|(63&t[r+2])<<6|63&t[r+3],r+=3),65535>=i)n+=String.fromCharCode(i);else{var a=1023&(i-=65536);n+=String.fromCharCode(55296+(i>>10)),n+=String.fromCharCode(56320+a)}}return n}function Yt(e,t,n){if(!e)return"";if(!n&&0!=e.byteLength%2)throw new bt(2,2,2004);n=Math.floor(e.byteLength/2);var r=new Uint16Array(n);e=ve(e);for(var i=0;i<n;i++)r[i]=e.getUint16(2*i,t);return Qt(r)}function Zt(e){function t(e){return n.byteLength<=e||32<=n[e]&&126>=n[e]}if(!e)return"";var n=ye(e);if(239==n[0]&&187==n[1]&&191==n[2])return Wt(n);if(254==n[0]&&255==n[1])return Yt(n.subarray(2),!1);if(255==n[0]&&254==n[1])return Yt(n.subarray(2),!0);if(0==n[0]&&0==n[2])return Yt(e,!1);if(0==n[1]&&0==n[3])return Yt(e,!0);if(t(0)&&t(1)&&t(2)&&t(3))return Wt(e);throw new bt(2,2,2003)}function qt(t){if(e.TextEncoder&&!Bt()){var n=new TextEncoder;return he(n.encode(t))}t=encodeURIComponent(t),t=unescape(t),n=new Uint8Array(t.length);for(var r=0;r<t.length;r++)n[r]=t[r].charCodeAt(0);return he(n)}function Xt(e,t){for(var n=new ArrayBuffer(2*e.length),r=new DataView(n),i=0;i<e.length;++i)r.setUint16(2*i,e.charCodeAt(i),t);return n}function Qt(e){return Jt.value()(e)}function $t(e){var t={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'","&apos;":"'","&nbsp;":" ","&lrm;":"‎","&rlm;":"‏"},n=/&(?:amp|lt|gt|quot|apos|#(0+)?39|nbsp|lrm|rlm);/g,r=RegExp(n.source);return e&&r.test(e)?e.replace(n,(function(e){return t[e]||"'"})):e||""}F("shaka.util.StringUtils",zt),zt.resetFromCharCode=function(){Jt.g=void 0},zt.toUTF16=Xt,zt.toUTF8=qt,zt.fromBytesAutoDetect=Zt,zt.fromUTF16=Yt,zt.fromUTF8=Wt;var Jt=new Et((function(){function e(e){try{var t=new Uint8Array(e);return 0<String.fromCharCode.apply(null,t).length}catch(e){return!1}}for(var t={Db:65536};0<t.Db;(t={Db:t.Db}).Db/=2)if(e(t.Db))return function(e){return function(t){for(var n="",r=0;r<t.length;r+=e.Db)n+=String.fromCharCode.apply(null,t.subarray(r,r+e.Db));return n}}(t);return null}));function en(){}function tn(e){return e=Qt(ye(e)),btoa(e)}function nn(e,t){return t=null==t||t,e=tn(e).replace(/\+/g,"-").replace(/\//g,"_"),t?e:e.replace(/[=]*$/,"")}function rn(t){t=e.atob(t.replace(/-/g,"+").replace(/_/g,"/"));for(var n=new Uint8Array(t.length),r=0;r<t.length;++r)n[r]=t.charCodeAt(r);return n}function an(t){for(var n=t.length/2,r=new Uint8Array(n),i=0;i<n;i++)r[i]=e.parseInt(t.substr(2*i,2),16);return r}function on(e){var t=ye(e);e="";for(var n=(t=l(t)).next();!n.done;n=t.next())1==(n=(n=n.value).toString(16)).length&&(n="0"+n),e+=n;return e}function sn(){for(var e=D.apply(0,arguments),t=0,n=0;n<e.length;++n)t+=e[n].byteLength;t=new Uint8Array(t);for(var r=n=0;r<e.length;++r){var i=e[r];i instanceof Uint8Array?t.set(i,n):t.set(ye(i),n),n+=i.byteLength}return t}function ln(e,t){if(0==t.length)return e;if(1==e.length&&1==t.length){var n=new rt(e[0]);return t=new rt(t[0]),[n.resolve(t).toString()]}t=t.map((function(e){return new rt(e)})),n=[];for(var r=(e=l(e)).next();!r.done;r=e.next()){r=new rt(r.value);for(var i=l(t),a=i.next();!a.done;a=i.next())n.push(r.resolve(a.value).toString())}return n}function un(e,t,n){return{keySystem:e,encryptionScheme:t,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:n||[],keyIds:new Set}}function cn(t,n){n=void 0===n?"cenc":n;var r=[],i=[],a=[];t.forEach((function(e,t){var n=t;22!=n.length&&(n=nn(an(t),!1));var o=e;22!=o.length&&(o=nn(an(e),!1)),e={kty:"oct",kid:n,k:o},r.push(e),i.push(e.kid),a.push(t)})),t=JSON.stringify({keys:r});var o=JSON.stringify({kids:i});return o=[{initData:ye(qt(o)),initDataType:"keyids"}],{keySystem:"org.w3.clearkey",encryptionScheme:n,licenseServerUri:"data:application/json;base64,"+e.btoa(t),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:o,keyIds:new Set(a)}}function dn(e,t){if(1==t.length)return t[0];if(null!=(e=pn(e,t)))return e;throw new bt(2,4,4025,t)}function pn(e,t){for(var n=l(gn[e]),r=n.next();!r.done;r=n.next()){r=r.value;for(var i=l(t),a=i.next();!a.done;a=i.next())if(a=a.value,r.test(a.trim()))return a.trim()}return e==hn?"":null}function fn(e,t){for(var n=[],r=(e=l(gn[e])).next();!r.done;r=e.next()){r=r.value;for(var i=l(t),a=i.next();!a.done;a=i.next())a=a.value,r.test(a.trim())&&n.push(a.trim())}return n}F("shaka.util.Uint8ArrayUtils",en),en.concat=sn,en.toHex=on,en.fromHex=an,en.fromBase64=rn,en.toBase64=nn,en.toStandardBase64=tn;var hn="text",yn={fa:"video",S:"audio",ma:hn,ve:"image",Hi:"application"},gn={audio:[/^vorbis$/,/^Opus$/,/^opus$/,/^fLaC$/,/^flac$/,/^mp4a/,/^[ae]c-3$/,/^ac-4$/,/^dts[cex]$/,/^iamf/],video:[/^avc/,/^hev/,/^hvc/,/^vvc/,/^vvi/,/^vp0?[89]/,/^av01/,/^dvh/,/^dva/,/^dav/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function vn(){}function mn(e,t){var n=e;return t&&!Rn.includes(e)&&(n+='; codecs="'+t+'"'),n}function bn(e,t){return t&&(e+='; codecs="'+t+'"'),e}function kn(e,t,n){var r=mn(e,t);return Xe(t=bn(e,t))?(e=Xe(t))?(n=(e=e()).convertCodecs(n,t),e.destroy()):n=t:n="video/mp2t"!=e&&"audio"==n?r.replace("video","audio"):r,n}function En(e,t,n){var r=[t];return Pn.forEach((function(t,i){var a=e[i];"codecs"==i?Rn.includes(e.mimeType)||r.push('codecs="'+n+'"'):a&&r.push(t+'="'+a+'"')})),"PQ"==e.hdr&&r.push('eotf="smpte2084"'),r.join(";")}function _n(e){return e.split(";")[0].split("/")[1]}function Tn(e){var t=xn(e);switch(e=t[0],t=t[1].toLowerCase(),!0){case"mp4a"===e&&"69"===t:case"mp4a"===e&&"6b"===t:case"mp4a"===e&&"40.34"===t:return"mp3";case"mp4a"===e&&"66"===t:case"mp4a"===e&&"67"===t:case"mp4a"===e&&"68"===t:case"mp4a"===e&&"40.2"===t:case"mp4a"===e&&"40.02"===t:case"mp4a"===e&&"40.5"===t:case"mp4a"===e&&"40.05"===t:case"mp4a"===e&&"40.29"===t:case"mp4a"===e&&"40.42"===t:return"aac";case"mp4a"===e&&"a5"===t:return"ac-3";case"mp4a"===e&&"a6"===t:return"ec-3";case"mp4a"===e&&"b2"===t:return"dtsx";case"mp4a"===e&&"a9"===t:return"dtsc";case"avc1"===e:case"avc3"===e:return"avc";case"hvc1"===e:case"hev1"===e:return"hevc";case"dvh1"===e:case"dvhe"===e:return"dovi"}return e}function An(e){for(var t=[],n=(e=l(e.split(","))).next();!n.done;n=e.next())n=xn(n.value),t.push(n[0]);return t.sort().join(",")}function Sn(e){return e.split(";")[0]}function wn(e){return(e=e.split(/ *; */)).shift(),(e=e.find((function(e){return e.startsWith("codecs=")})))?e.split("=")[1].replace(/^"|"$/g,""):""}function Cn(e){return"application/x-mpegurl"===e||"application/vnd.apple.mpegurl"===e}function xn(e){var t=(e=e.split("."))[0];return e.shift(),[t,e.join(".")]}F("shaka.util.MimeUtils",vn),vn.getFullTypeWithAllCodecs=bn,vn.getFullType=mn;var Pn=(new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels"),Rn=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"];function In(e){this.i=null,this.j=e,this.B=!1,this.l=this.s=0,this.m=1/0,this.h=this.g=null,this.C="",this.A=function(){},this.o=new Map}function Dn(e){return!!Mn[e]||("application/cea-608"==e||"application/cea-708"==e)&&!!_e}function On(e,t,n){if(e.C=t,t=e.o.get(t))for(var r=l(t.keys()),i=r.next();!i.done;i=r.next())(i=t.get(i.value).filter((function(e){return e.endTime<=n})))&&e.j.append(i)}function Ln(e,t,n){t.startTime+=n,t.endTime+=n;for(var r=(t=l(t.nestedCues)).next();!r.done;r=t.next())Ln(e,r.value,n)}In.prototype.destroy=function(){return this.j=this.i=null,this.o.clear(),Promise.resolve()},In.prototype.remove=function(e,t){var n=this;return I((function(r){if(1==r.g)return b(r,Promise.resolve(),2);!n.j||!n.j.remove(e,t)||null==n.g||t<=n.g||e>=n.h||(e<=n.g&&t>=n.h?n.g=n.h=null:e<=n.g&&t<n.h?n.g=t:e>n.g&&t>=n.h&&(n.h=e)),k(r)}))},F("shaka.text.TextEngine",In),In.prototype.destroy=In.prototype.destroy,In.findParser=function(e){return Mn[e]},In.unregisterParser=function(e){delete Mn[e]},In.registerParser=function(e,t){Mn[e]=t};var Mn={};function Nn(e,t){return e.concat(t)}function Un(){}function Bn(e){return null!=e}function Fn(){}function jn(e,t){return e=Gn(e),t=Gn(t),e.split("-")[0]==t.split("-")[0]}function Hn(e,t){return e=Gn(e),t=Gn(t),e=e.split("-"),t=t.split("-"),e[0]==t[0]&&1==e.length&&2==t.length}function Vn(e,t){return e=Gn(e),t=Gn(t),e=e.split("-"),t=t.split("-"),2==e.length&&2==t.length&&e[0]==t[0]}function Gn(e){var t=(e=l(e.split("-x-"))).next().value;t=void 0===t?"":t,e=void 0===(e=e.next().value)?"":e;var n=l(t.split("-"));return t=void 0===(t=n.next().value)?"":t,n=void 0===(n=n.next().value)?"":n,e=e?"x-"+e:"",t=t.toLowerCase(),t=Zn.get(t)||t,((n=n.toUpperCase())?t+"-"+n:t)+(e?"-"+e:"")}function Kn(e,t){return e=Gn(e),(t=Gn(t))==e?4:Hn(t,e)?3:Vn(t,e)?2:Hn(e,t)?1:0}function zn(e){var t=e.indexOf("-");return e=(e=0<=t?e.substring(0,t):e).toLowerCase(),Zn.get(e)||e}function Wn(e){return e.language?Gn(e.language):e.audio&&e.audio.language?Gn(e.audio.language):e.video&&e.video.language?Gn(e.video.language):"und"}function Yn(e,t){e=Gn(e);var n=new Set,r=l(t);for(t=r.next();!t.done;t=r.next())n.add(Gn(t.value));for(t=(r=l(n)).next();!t.done;t=r.next())if((t=t.value)==e)return t;for(t=(r=l(n)).next();!t.done;t=r.next())if(Hn(t=t.value,e))return t;for(t=(r=l(n)).next();!t.done;t=r.next())if(Vn(t=t.value,e))return t;for(t=(n=l(n)).next();!t.done;t=n.next())if(Hn(e,t=t.value))return t;return null}F("shaka.util.LanguageUtils",Fn),Fn.findClosestLocale=Yn,Fn.getLocaleForVariant=Wn,Fn.getLocaleForText=function(e){return Gn(e.language||"und")},Fn.getBase=zn,Fn.relatedness=Kn,Fn.areSiblings=function(e,t){var n=zn(e),r=zn(t);return e!=n&&t!=r&&n==r},Fn.normalize=Gn,Fn.isSiblingOf=Vn,Fn.isParentOf=Hn,Fn.areLanguageCompatible=jn,Fn.areLocaleCompatible=function(e,t){return(e=Gn(e))==(t=Gn(t))};var Zn=new Map([["aar","aa"],["abk","ab"],["afr","af"],["aka","ak"],["alb","sq"],["amh","am"],["ara","ar"],["arg","an"],["arm","hy"],["asm","as"],["ava","av"],["ave","ae"],["aym","ay"],["aze","az"],["bak","ba"],["bam","bm"],["baq","eu"],["bel","be"],["ben","bn"],["bih","bh"],["bis","bi"],["bod","bo"],["bos","bs"],["bre","br"],["bul","bg"],["bur","my"],["cat","ca"],["ces","cs"],["cha","ch"],["che","ce"],["chi","zh"],["chu","cu"],["chv","cv"],["cor","kw"],["cos","co"],["cre","cr"],["cym","cy"],["cze","cs"],["dan","da"],["deu","de"],["div","dv"],["dut","nl"],["dzo","dz"],["ell","el"],["eng","en"],["epo","eo"],["est","et"],["eus","eu"],["ewe","ee"],["fao","fo"],["fas","fa"],["fij","fj"],["fin","fi"],["fra","fr"],["fre","fr"],["fry","fy"],["ful","ff"],["geo","ka"],["ger","de"],["gla","gd"],["gle","ga"],["glg","gl"],["glv","gv"],["gre","el"],["grn","gn"],["guj","gu"],["hat","ht"],["hau","ha"],["heb","he"],["her","hz"],["hin","hi"],["hmo","ho"],["hrv","hr"],["hun","hu"],["hye","hy"],["ibo","ig"],["ice","is"],["ido","io"],["iii","ii"],["iku","iu"],["ile","ie"],["ina","ia"],["ind","id"],["ipk","ik"],["isl","is"],["ita","it"],["jav","jv"],["jpn","ja"],["kal","kl"],["kan","kn"],["kas","ks"],["kat","ka"],["kau","kr"],["kaz","kk"],["khm","km"],["kik","ki"],["kin","rw"],["kir","ky"],["kom","kv"],["kon","kg"],["kor","ko"],["kua","kj"],["kur","ku"],["lao","lo"],["lat","la"],["lav","lv"],["lim","li"],["lin","ln"],["lit","lt"],["ltz","lb"],["lub","lu"],["lug","lg"],["mac","mk"],["mah","mh"],["mal","ml"],["mao","mi"],["mar","mr"],["may","ms"],["mkd","mk"],["mlg","mg"],["mlt","mt"],["mon","mn"],["mri","mi"],["msa","ms"],["mya","my"],["nau","na"],["nav","nv"],["nbl","nr"],["nde","nd"],["ndo","ng"],["nep","ne"],["nld","nl"],["nno","nn"],["nob","nb"],["nor","no"],["nya","ny"],["oci","oc"],["oji","oj"],["ori","or"],["orm","om"],["oss","os"],["pan","pa"],["per","fa"],["pli","pi"],["pol","pl"],["por","pt"],["pus","ps"],["que","qu"],["roh","rm"],["ron","ro"],["rum","ro"],["run","rn"],["rus","ru"],["sag","sg"],["san","sa"],["sin","si"],["slk","sk"],["slo","sk"],["slv","sl"],["sme","se"],["smo","sm"],["sna","sn"],["snd","sd"],["som","so"],["sot","st"],["spa","es"],["sqi","sq"],["srd","sc"],["srp","sr"],["ssw","ss"],["sun","su"],["swa","sw"],["swe","sv"],["tah","ty"],["tam","ta"],["tat","tt"],["tel","te"],["tgk","tg"],["tgl","tl"],["tha","th"],["tib","bo"],["tir","ti"],["ton","to"],["tsn","tn"],["tso","ts"],["tuk","tk"],["tur","tr"],["twi","tw"],["uig","ug"],["ukr","uk"],["urd","ur"],["uzb","uz"],["ven","ve"],["vie","vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);function qn(e){var t=new WeakSet;return function e(n){switch(typeof n){case"undefined":case"boolean":case"number":case"string":case"symbol":case"function":return n;default:if(!n||n.buffer instanceof ArrayBuffer)return n;if(t.has(n))return null;var r=n.constructor==Array;if(n.constructor!=Object&&!r)return null;t.add(n);var i,a=r?[]:{};for(i in n)a[i]=e(n[i]);return r&&(a.length=n.length),a}}(e)}function Xn(e){var t,n={};for(t in e)n[t]=e[t];return n}function Qn(){}function $n(e,t,n,r){var i=e.variants;if((t.length||n.length)&&(i=function(e,t,n){for(var r={},i=(t=l(t)).next();!i.done;r={ue:r.ue},i=t.next())if(r.ue=i.value,i=e.filter(function(e){return function(t){return t.video&&t.video.codecs.startsWith(e.ue)}}(r)),i.length){e=i;break}for(r={},n=l(n),t=n.next();!t.done;r={ne:r.ne},t=n.next())if(r.ne=t.value,t=e.filter(function(e){return function(t){return t.audio&&t.audio.codecs.startsWith(e.ne)}}(r)),t.length){e=t;break}return e}(i,t,n)),r.length){for(t=new Q,i=(n=l(i)).next();!i.done;i=n.next())i=i.value,t.push(String(i.video.width||0),i);var a=[];t.forEach((function(e,t){e=0;for(var n=[],i={},o=(t=l(t)).next();!o.done;i={Rc:i.Rc},o=t.next())i.Rc=o.value,(o=r.filter(function(e){return function(t){return e.Rc.decodingInfos[0][t]}}(i)).length)>e?(e=o,n=[i.Rc]):o==e&&n.push(i.Rc);a.push.apply(a,u(n))})),i=a}n=new Set,t=new Set;var o=l(i);for(i=o.next();!i.done;i=o.next())(i=i.value).audio&&n.add(i.audio),i.video&&t.add(i.video);n=Array.from(n).sort((function(e,t){return e.bandwidth-t.bandwidth}));var s=[];for(i=new Map,o=(n=l(n)).next();!o.done;o=n.next()){var c=(o=o.value).language+(o.channelsCount||0)+(o.audioSamplingRate||0)+o.roles.join(",")+o.label+o.groupId+o.fastSwitching,d=i.get(c)||[];if(d.length){var p=d[d.length-1],f=Tn(p.codecs),h=Tn(o.codecs);f==h&&o.bandwidth>p.bandwidth&&(d.push(o),s.push(o.id))}else d.push(o),s.push(o.id);i.set(c,d)}n=Array.from(t).sort((function(e,t){return e.bandwidth&&t.bandwidth?e.bandwidth-t.bandwidth:e.width-t.width})),t=ne();var y=[];for(i=new Map,o=(n=l(n)).next();!o.done;o=n.next()){if(o=o.value,c=Math.round(o.frameRate||0)+(o.hdr||"")+o.fastSwitching,(d=i.get(c)||[]).length){if(p=d[d.length-1],!t&&(f=Tn(p.codecs))!==(h=Tn(o.codecs)))continue;o.width>p.width||o.height>p.height?(d.push(o),y.push(o.id)):o.width==p.width&&o.height==p.height&&((f=Tn(p.codecs))==(h=Tn(o.codecs))&&o.bandwidth>p.bandwidth&&(d.push(o),y.push(o.id)))}else d.push(o),y.push(o.id);i.set(c,d)}e.variants=e.variants.filter((function(e){var t=e.audio;return e=e.video,!(t&&!s.includes(t.id)||e&&!y.includes(e.id))}))}function Jn(e,t,n){function r(e,t,n){return e>=t&&e<=n}var i=e.video;if(i&&i.width&&i.height){var a=i.width,o=i.height;if(o>a&&(a=(o=l([o,a])).next().value,o=o.next().value),!r(a,t.minWidth,Math.min(t.maxWidth,n.width))||!r(o,t.minHeight,Math.min(t.maxHeight,n.height))||!r(i.width*i.height,t.minPixels,t.maxPixels))return!1}return!(e&&e.video&&e.video.frameRate&&!r(e.video.frameRate,t.minFrameRate,t.maxFrameRate)||!r(e.bandwidth,t.minBandwidth,t.maxBandwidth))}function er(e,t,n){for(var r=!1,i=(e=l(e)).next();!i.done;i=e.next()){var a=(i=i.value).allowedByApplication;i.allowedByApplication=Jn(i,t,n),a!=i.allowedByApplication&&(r=!0)}return r}function tr(e,t,n){return n=void 0===n?[]:n,I((function(r){return 1==r.g?b(r,nr(e,t,0<t.offlineSessionIds.length,n),2):(function(e){e.textStreams=e.textStreams.filter((function(e){return Dn(e=mn(e.mimeType,e.codecs))}))}(t),b(r,function(e){var t,n,r,i,a,o,s;return I((function(u){switch(u.g){case 1:t=[],n=l(e.imageStreams),r=n.next();case 2:if(r.done){u.u(4);break}if(i=r.value,"application/mp4"==(a=i.mimeType)&&"mjpg"==i.codecs&&(a="image/jpg"),Ar.has(a)){u.u(5);break}if(!(o=Sr.get(a))){Ar.set(a,!1),u.u(5);break}return b(u,function(e){return new Promise((function(t){var n=new Image;n.src=e,"decode"in n?n.decode().then((function(){t(!0)})).catch((function(){t(!1)})):n.onload=n.onerror=function(){t(2===n.height)}}))}(o),7);case 7:s=u.h,Ar.set(a,s);case 5:Ar.get(a)&&t.push(i),r=n.next(),u.u(2);break;case 4:e.imageStreams=t,k(u)}}))}(t),0))}))}function nr(e,t,n,r){var i,a;return I((function(o){if(1==o.g)return b(o,or(t.variants,n,!1,r),2);i=null,e&&(a=e.g)&&(i=a.keySystem),t.variants=t.variants.filter((function(e){var t=function(e,t){var n=xt(),r=Ht("Firefox")&&Ht("Android"),i=e.video,a=i&&i.width||0,o=i&&i.height||0;if(n&&i&&(1920<a||1080<o)&&(i.codecs.includes("avc1.")||i.codecs.includes("avc3.")))return!1;if(i){if(n=ur(i.codecs),i.codecs.includes(",")){if(n=ur(n=dn("video",a=i.codecs.split(","))),a=lr(a=dn("audio",a),i.mimeType),!te(o=kn(i.mimeType,a,"audio")))return!1;n=[n,a].join()}if(!te(a=kn(i.mimeType,n,"video")))return!1;i.codecs=n}if(i=e.audio,r&&i&&i.encrypted&&i.codecs.toLowerCase().includes("opus"))return!1;if(i){if(r=lr(i.codecs,i.mimeType),!te(n=kn(i.mimeType,r,"audio")))return!1;i.codecs=r}return e.decodingInfos.some((function(e){return!(!e.supported||t&&(e=e.keySystemAccess)&&e.keySystem!=t)}))}(e,i);if(!t){var n=[];e.audio&&n.push(Er(e.audio)),e.video&&n.push(Er(e.video))}return t})),k(o)}))}function rr(e){var t=[];for(n in e)t.push(n);t.sort();for(var n=[],r=(t=l(t)).next();!r.done;r=t.next()){var i=r.value;r=JSON.stringify(i),(i=e[i])instanceof Object?(i=rr(i),n.push(r+":"+i)):(i=JSON.stringify(i),n.push(r+":"+i))}return"{"+n.join(",")+"}"}function ir(e,t){var n,r,i,a,o,s,u;return I((function(c){if(1==c.g){for(n=function(e,t){if(e){var n=Xn(e);return n.supported=e.supported&&t.supported,n.powerEfficient=e.powerEfficient&&t.powerEfficient,n.smooth=e.smooth&&t.smooth,t.keySystemAccess&&!n.keySystemAccess&&(n.keySystemAccess=t.keySystemAccess),n}return t},r=null,i=[],a={},o=l(t),s=o.next();!s.done;a={Dc:a.Dc,Ec:a.Ec},s=o.next())u=s.value,a.Ec=rr(u),a.Dc=_r,a.Dc[a.Ec]?r=n(r,a.Dc[a.Ec]):i.push(ar(u).then(function(e){return function(t){for(var i=null,a=(t=l(t||[])).next();!a.done;a=t.next())i=n(i,a.value);i&&(e.Dc[e.Ec]=i,r=n(r,i))}}(a)));return b(c,Promise.all(i),2)}r&&e.decodingInfos.push(r),k(c)}))}function ar(e){var t=[""];e.video&&(t=wn(e.video.contentType).split(","));var n=[""];e.audio&&(n=wn(e.audio.contentType).split(","));for(var r=[],i=(t=l(t)).next();!i.done;i=t.next()){i=i.value;for(var a={},o=l(n),s=o.next();!s.done;a={Nb:a.Nb},s=o.next())s=s.value,a.Nb=qn(e),e.video&&(a.Nb.video.contentType=mn(Sn(a.Nb.video.contentType),i)),e.audio&&(a.Nb.audio.contentType=mn(Sn(a.Nb.audio.contentType),s)),r.push(new Promise(function(e){return function(t,n){navigator.mediaCapabilities.decodingInfo(e.Nb).then((function(e){t(e)})).catch(n)}}(a)))}return Promise.all(r).catch((function(){return JSON.stringify(e),null}))}function or(e,t,n,r){var i,a,o,s,u,c,d,p,f,h,y,g,v,m,k,E;return I((function(_){switch(_.g){case 1:if(e.some((function(e){return e.decodingInfos.length})))return _.return();i={},a=l(r),o=a.next();case 2:if(o.done){_.u(4);break}i.pe=o.value,s=!1,u=l(e),c=u.next();case 5:if(c.done){_.u(7);break}d=c.value,p=sr(d,t,n).filter((T=i,function(e){return((e=e[0]).keySystemConfiguration&&e.keySystemConfiguration.keySystem)===T.pe})),f=l(p),h=f.next();case 8:if(h.done){_.u(10);break}return y=h.value,b(_,ir(d,y),9);case 9:h=f.next(),_.u(8);break;case 10:d.decodingInfos.length&&(s=!0),c=u.next(),_.u(5);break;case 7:if(s)return _.return();i={pe:i.pe},o=a.next(),_.u(2);break;case 4:g=l(e),c=g.next();case 12:if(c.done){_.u(0);break}v=c.value,m=sr(v,t,n).filter((function(e){return!(e=(e=e[0]).keySystemConfiguration&&e.keySystemConfiguration.keySystem)||!r.includes(e)})),k=l(m),h=k.next();case 15:if(h.done){c=g.next(),_.u(12);break}return E=h.value,b(_,ir(v,E),16);case 16:h=k.next(),_.u(15)}var T}))}function sr(e,t,n){var r=e.audio,i=e.video,a=[],o=[];if(i)for(var s=l(i.fullMimeTypes),u=s.next();!u.done;u=s.next()){var c=wn(u=u.value);if(c.includes(",")&&!r){var d=c.split(","),p=Sn(u);c=dn("video",d),p=kn(p,d=lr(d=dn("audio",d),p),"audio"),o.push({contentType:p,channels:2,bitrate:e.bandwidth||1,samplerate:1,spatialRendering:!1})}if(c=ur(c),u={contentType:kn(Sn(u),c,"video"),width:i.width||64,height:i.height||64,bitrate:i.bandwidth||e.bandwidth||1,framerate:i.frameRate||1},i.hdr)switch(i.hdr){case"SDR":u.transferFunction="srgb";break;case"PQ":u.transferFunction="pq";break;case"HLG":u.transferFunction="hlg"}a.push(u)}if(r)for(u=(s=l(r.fullMimeTypes)).next();!u.done;u=s.next())u=kn(u=Sn(c=u.value),c=lr(wn(c),u),"audio"),o.push({contentType:u,channels:r.channelsCount||2,bitrate:r.bandwidth||e.bandwidth||1,samplerate:r.audioSamplingRate||1,spatialRendering:r.spatialAudio});for(s=[],0==a.length&&a.push(null),0==o.length&&o.push(null),u=(a=l(a)).next();!u.done;u=a.next())for(u=u.value,p=(c=l(o)).next();!p.done;p=c.next())p=p.value,d={type:n?"file":"media-source"},u&&(d.video=u),p&&(d.audio=p),s.push(d);if(!(o=(e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[])).length)return[s];e=[],n=new Map;for(var f=(o=l(o)).next();!f.done;f=o.next())a=f.value,n.get(a.keySystem)||n.set(a.keySystem,[]),n.get(a.keySystem).push(a);for(o=t?"required":"optional",t=t?["persistent-license"]:["temporary"],u=(a=l(n.keys())).next();!u.done;u=a.next()){for(u=u.value,c=[],d=(p=l(s)).next();!d.done;d=p.next()){d=Object.assign({},d.value);var h=n.get(u),y={keySystem:u,initDataType:"cenc",persistentState:o,distinctiveIdentifier:"optional",sessionTypes:t};for(f=(h=l(h)).next();!f.done;f=h.next()){if((f=f.value).initData&&f.initData.length){for(var g=new Set,v=l(f.initData),m=v.next();!m.done;m=v.next())g.add(m.value.initDataType);y.initDataType=f.initData[0].initDataType}f.distinctiveIdentifierRequired&&(y.distinctiveIdentifier="required"),f.persistentStateRequired&&(y.persistentState="required"),f.sessionType&&(y.sessionTypes=[f.sessionType]),r&&(""!=f.audioRobustness?y.audio?y.audio.robustness=y.audio.robustness||f.audioRobustness:y.audio={robustness:f.audioRobustness}:y.audio||(y.audio={})),i&&(""!=f.videoRobustness?y.video?y.video.robustness=y.video.robustness||f.videoRobustness:y.video={robustness:f.videoRobustness}:y.video||(y.video={}))}d.keySystemConfiguration=y,c.push(d)}e.push(c)}return e}function lr(e,t){return"flac"==e.toLowerCase()?jt()?"fLaC":"flac":"opus"===e.toLowerCase()?jt()&&"mp4"==_n(t)?"Opus":"opus":e}function ur(e){if(e.includes("avc1")){var t=e.split(".");if(3==t.length)return e=t.shift()+".",(e+=parseInt(t.shift(),10).toString(16))+("000"+parseInt(t.shift(),10).toString(16)).slice(-4)}else if("vp9"==e)return"vp09.00.41.08";return e}function cr(e){var t=e.audio,n=e.video,r=t?t.mimeType:null,i=n?n.mimeType:null,a=t?t.codecs:null,o=n?n.codecs:null,s=[];o&&s.push(o),a&&s.push(a);var u=[];n&&u.push(n.mimeType),t&&u.push(t.mimeType),u=u[0]||null;var c=[];t&&c.push(t.kind),n&&c.push(n.kind),c=c[0]||null;var d=new Set;if(t)for(var p=l(t.roles),f=p.next();!f.done;f=p.next())d.add(f.value);if(n)for(f=(p=l(n.roles)).next();!f.done;f=p.next())d.add(f.value);return e={id:e.id,active:!1,type:"variant",bandwidth:e.bandwidth,language:e.language,label:null,kind:c,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,videoLayout:null,mimeType:u,audioMimeType:r,videoMimeType:i,codecs:s.join(", "),audioCodec:a,videoCodec:o,primary:e.primary,roles:Array.from(d),audioRoles:null,forced:!1,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:null,accessibilityPurpose:null,originalLanguage:null},n&&(e.videoId=n.id,e.originalVideoId=n.originalId,e.width=n.width||null,e.height=n.height||null,e.frameRate=n.frameRate||null,e.pixelAspectRatio=n.pixelAspectRatio||null,e.videoBandwidth=n.bandwidth||null,e.hdr=n.hdr||null,e.videoLayout=n.videoLayout||null),t&&(e.audioId=t.id,e.originalAudioId=t.originalId,e.channelsCount=t.channelsCount,e.audioSamplingRate=t.audioSamplingRate,e.audioBandwidth=t.bandwidth||null,e.spatialAudio=t.spatialAudio,e.label=t.label,e.audioRoles=t.roles,e.accessibilityPurpose=t.accessibilityPurpose,e.originalLanguage=t.originalLanguage),e}function dr(e){return{id:e.id,active:!1,type:hn,bandwidth:0,language:e.language,label:e.label,kind:e.kind||null,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,videoLayout:null,mimeType:e.mimeType,audioMimeType:null,videoMimeType:null,codecs:e.codecs||null,audioCodec:null,videoCodec:null,primary:e.primary,roles:e.roles,audioRoles:null,forced:e.forced,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:e.originalId,originalImageId:null,accessibilityPurpose:e.accessibilityPurpose,originalLanguage:e.originalLanguage}}function pr(e){var t=e.width||null,n=e.height||null,r=null;e.segmentIndex&&(r=e.segmentIndex.get(0));var i=e.tilesLayout;return r&&(i=r.tilesLayout||i),i&&null!=t&&(t/=Number(i.split("x")[0])),i&&null!=n&&(n/=Number(i.split("x")[1])),{id:e.id,active:!1,type:"image",bandwidth:e.bandwidth||0,language:"",label:null,kind:null,width:t,height:n,frameRate:null,pixelAspectRatio:null,hdr:null,videoLayout:null,mimeType:e.mimeType,audioMimeType:null,videoMimeType:null,codecs:e.codecs||null,audioCodec:null,videoCodec:null,primary:!1,roles:[],audioRoles:null,forced:!1,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:i||null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:e.originalId,accessibilityPurpose:null,originalLanguage:null}}function fr(e){return e.__shaka_id||(e.__shaka_id=Tr++),e.__shaka_id}function hr(e){var t=gr(e);return t.active="disabled"!=e.mode,t.type="text",t.originalTextId=e.id,"captions"==e.kind&&(t.mimeType="unknown"),"subtitles"==e.kind&&(t.mimeType="text/vtt"),e.kind&&(t.roles=[e.kind]),"forced"==e.kind&&(t.forced=!0),t}function yr(e){var t=gr(e);return t.active=e.enabled,t.type="variant",t.originalAudioId=e.id,"main"==e.kind&&(t.primary=!0),e.kind&&(t.roles=[e.kind],t.audioRoles=[e.kind],t.label=e.label),t}function gr(e){var t=e.language;return{id:fr(e),active:!1,type:"",bandwidth:0,language:Gn(t||"und"),label:e.label,kind:e.kind,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,videoLayout:null,mimeType:null,audioMimeType:null,videoMimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],forced:!1,audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:null,accessibilityPurpose:null,originalLanguage:t}}function vr(e){return e.allowedByApplication&&e.allowedByKeySystem&&0==e.disabledUntilTime}function mr(e){return e.filter((function(e){return vr(e)}))}function br(e,t,n,r){var i=e,a=e.filter((function(e){return e.primary}));a.length&&(i=a);var o=i.length?i[0].language:"";if(i=i.filter((function(e){return e.language==o})),t){var s=Yn(Gn(t),e.map((function(e){return e.language})));s&&(i=e.filter((function(e){return Gn(e.language)==s})))}if(i=i.filter((function(e){return e.forced==r})),n){if((e=kr(i,n)).length)return e}else if(e=i.filter((function(e){return 0==e.roles.length})),e.length)return e;return e=i.map((function(e){return e.roles})).reduce(Nn,[]),e.length?kr(i,e[0]):i}function kr(e,t){return e.filter((function(e){return e.roles.includes(t)}))}function Er(e){return"audio"==e.type?"type=audio codecs="+e.codecs+" bandwidth="+e.bandwidth+" channelsCount="+e.channelsCount+" audioSamplingRate="+e.audioSamplingRate:"video"==e.type?"type=video codecs="+e.codecs+" bandwidth="+e.bandwidth+" frameRate="+e.frameRate+" width="+e.width+" height="+e.height:"unexpected stream type"}F("shaka.util.StreamUtils",Qn),Qn.meetsRestrictions=Jn;var _r={},Tr=0,Ar=(new Map).set("image/svg+xml",!0).set("image/png",!0).set("image/jpeg",!0).set("image/jpg",!0),Sr=(new Map).set("image/webp","data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA").set("image/avif","data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A=");function wr(){var e=this;this.s=null,this.o=!1,this.i=new K,this.F=new $,navigator.connection&&navigator.connection.addEventListener&&this.F.D(navigator.connection,"change",(function(){if(e.o&&e.g.useNetworkInformation){e.i=new K,e.g&&e.i.configure(e.g.advanced);var t=e.chooseVariant();t&&navigator.onLine&&e.s(t,e.g.clearBufferSwitch,e.g.safeMarginSwitch)}})),this.m=[],this.B=1,this.G=!1,this.h=this.l=this.g=this.A=null,this.C=new Tt((function(){if(e.g.restrictToElementSize){var t=e.chooseVariant();t&&e.s(t,e.g.clearBufferSwitch,e.g.safeMarginSwitch)}})),this.j=null}function Cr(e){if(e.G){if(Date.now()-e.A<1e3*e.g.switchInterval)return}else{var t=e.i;if(!(t.g>=t.i))return;e.G=!0}t=e.chooseVariant(),e.getBandwidthEstimate(),t&&e.s(t,e.g.clearBufferSwitch,e.g.safeMarginSwitch)}function xr(e,t,n,r,i){if(e.j){var a=e.j.fg();a&&(n=n.filter((function(e){return!e.bandwidth||!a||e.bandwidth<=a})))}return t&&(n=n.filter((function(e){return Jn(e,t,{width:i,height:r})}))),n.sort((function(e,t){return e.bandwidth-t.bandwidth}))}(n=wr.prototype).stop=function(){this.s=null,this.o=!1,this.m=[],this.B=1,this.l=this.A=null,this.h&&(this.h.disconnect(),this.h=null),this.C.stop(),this.j=null},n.release=function(){this.F.release(),this.C=null},n.init=function(e){this.s=e},n.chooseVariant=function(t){t=void 0!==t&&t;var n=1/0,r=1/0;if(this.g.restrictToScreenSize&&(r=this.g.ignoreDevicePixelRatio?1:e.devicePixelRatio,n=e.screen.height*r,r*=e.screen.width),this.h&&this.g.restrictToElementSize){var i=this.g.ignoreDevicePixelRatio?1:e.devicePixelRatio;n=Math.min(n,this.l.clientHeight*i),r=Math.min(r,this.l.clientWidth*i)}var a=this.m.filter((function(e){return!(e.audio&&e.audio.fastSwitching||e.video&&e.video.fastSwitching)}));if(a.length||(a=this.m),i=a,t&&a.length!=this.m.length&&(i=this.m.filter((function(e){return!!(e.audio&&e.audio.fastSwitching||e.video&&e.video.fastSwitching)}))),t=xr(this,this.g.restrictions,i,1/0,1/0),1/0!=n||1/0!=r){for(t=function(e){for(var t=[],n=(e=l(e)).next();!n.done;n=e.next())(n=n.value.video)&&n.height&&n.width&&t.push({height:n.height,width:n.width});return t.sort((function(e,t){return e.width-t.width}))}(t),a=(t=l(t)).next();!a.done;a=t.next())if((a=a.value).height>=n&&a.width>=r){n=a.height,r=a.width;break}t=xr(this,this.g.restrictions,i,n,r)}for(n=this.getBandwidthEstimate(),i.length&&!t.length&&(t=[(t=xr(this,null,i,1/0,1/0))[0]]),r=t[0]||null,i=0;i<t.length;i++){a=t[i];for(var o=isNaN(this.B)?1:Math.abs(this.B),s=o*a.bandwidth/this.g.bandwidthDowngradeTarget,u={bandwidth:1/0},c=i+1;c<t.length;c++)if(a.bandwidth!=t[c].bandwidth){u=t[c];break}o=o*u.bandwidth/this.g.bandwidthUpgradeTarget,n>=s&&n<=o&&r.bandwidth!=a.bandwidth&&(r=a)}return this.A=Date.now(),r},n.enable=function(){this.o=!0},n.disable=function(){this.o=!1},n.segmentDownloaded=function(e,t,n){this.i.sample(e,t),n&&null!=this.A&&this.o&&Cr(this)},n.trySuggestStreams=function(){null!=this.A&&this.o&&Cr(this)},n.getBandwidthEstimate=function(){var e=this.g.defaultBandwidthEstimate;return navigator.connection&&navigator.connection.downlink&&this.g.useNetworkInformation&&(e=1e6*navigator.connection.downlink),e=this.i.getBandwidthEstimate(e),this.j?this.j.getBandwidthEstimate(e):e},n.setVariants=function(e){this.m=e},n.playbackRateChanged=function(e){this.B=e},n.setMediaElement=function(t){var n=this;this.l=t,this.h&&(this.h.disconnect(),this.h=null),this.l&&"ResizeObserver"in e&&(this.h=new ResizeObserver((function(){n.C.U(Pr)})),this.h.observe(this.l))},n.setCmsdManager=function(e){this.j=e},n.configure=function(e){this.g=e,this.i&&this.g&&this.i.configure(this.g.advanced)},F("shaka.abr.SimpleAbrManager",wr),wr.prototype.configure=wr.prototype.configure,wr.prototype.setCmsdManager=wr.prototype.setCmsdManager,wr.prototype.setMediaElement=wr.prototype.setMediaElement,wr.prototype.playbackRateChanged=wr.prototype.playbackRateChanged,wr.prototype.setVariants=wr.prototype.setVariants,wr.prototype.getBandwidthEstimate=wr.prototype.getBandwidthEstimate,wr.prototype.trySuggestStreams=wr.prototype.trySuggestStreams,wr.prototype.segmentDownloaded=wr.prototype.segmentDownloaded,wr.prototype.disable=wr.prototype.disable,wr.prototype.enable=wr.prototype.enable,wr.prototype.chooseVariant=wr.prototype.chooseVariant,wr.prototype.init=wr.prototype.init,wr.prototype.release=wr.prototype.release,wr.prototype.stop=wr.prototype.stop;var Pr=1;function Rr(e,t,n,r){for(n=void 0===n||n,r=void 0!==r&&r,this.h=e,this.g=new Set([e]),t=(e=l(t=t||[])).next();!t.done;t=e.next())this.add(t.value,n,r)}function Ir(e,t,n,r){var i;if(!(i=!!e.audio!=!!t.audio||!!e.video!=!!t.video||e.language!=t.language)&&(i=e.audio&&t.audio)){i=e.audio;var a=t.audio;i=!!((!i.channelsCount||!a.channelsCount||2<i.channelsCount||2<a.channelsCount)&&i.channelsCount!=a.channelsCount||n&&!Dr(i,a)||!Or(i.roles,a.roles)||r&&i.groupId!==a.groupId)}return!(r=i)&&(r=e.video&&t.video)&&(e=e.video,t=t.video,r=!((!n||Dr(e,t))&&Or(e.roles,t.roles))),!r}function Dr(e,t){if(e.mimeType!=t.mimeType)return!1;if(e=e.codecs.split(",").map((function(e){return An(e)})),t=t.codecs.split(",").map((function(e){return An(e)})),e.length!=t.length)return!1;e.sort(),t.sort();for(var n=0;n<e.length;n++)if(e[n]!=t[n])return!1;return!0}function Or(e,t){if(e=new Set(e),t=new Set(t),e.delete("main"),t.delete("main"),e.size!=t.size)return!1;for(var n=(e=l(e)).next();!n.done;n=e.next())if(!t.has(n.value))return!1;return!0}function Lr(e,t,n){t=void 0===t?"reload":t,n=void 0!==n&&n,this.i=e,this.h=t,this.g=n,this.j=new Mr(e.language,"",e.audio&&e.audio.channelsCount?e.audio.channelsCount:0,"",!1,"","","",t,n)}function Mr(e,t,n,r,i,a,o,s,l,u){this.s=e,this.A=t,this.h=n,this.i=r,this.B=i,this.l=a,this.g=void 0===o?"":o,this.j=void 0===s?"":s,this.m=void 0===l?"reload":l,this.o=void 0!==u&&u}function Nr(){this.g=Fr,this.i=(new Map).set(Fr,2).set(Br,1),this.h=0}function Ur(e,t,n){e.i.set(Fr,n).set(Br,t)}F("shaka.config.AutoShowText",{NEVER:0,ALWAYS:1,IF_PREFERRED_TEXT_LANGUAGE:2,IF_SUBTITLES_MAY_BE_NEEDED:3}),F("shaka.config.CodecSwitchingStrategy",{ij:"reload",Qg:"smooth"}),Rr.prototype.add=function(e,t,n){return!!Ir(this.h,e,void 0===t||t,void 0!==n&&n)&&(this.g.add(e),!0)},Rr.prototype.values=function(){return this.g.values()},Lr.prototype.create=function(e){var t=this,n="smooth"==this.h&&ne(),r=e.filter((function(e){return Ir(t.i,e,!n,t.g)}));return r.length?new Rr(r[0],r,!n,this.g):this.j.create(e)},Mr.prototype.create=function(t){var n=[];n=function(e,t){t=Gn(t);var n=Yn(t,e.map((function(e){return Wn(e)})));return n?e.filter((function(e){return n==Wn(e)})):[]}(t,this.s);var r=t.filter((function(e){return e.primary}));return t=function(e,t){return e.filter((function(e){return!!e.audio&&(t?e.audio.roles.includes(t):0==e.audio.roles.length)}))}(n=n.length?n:r.length?r:t,this.A),t.length&&(n=t),this.l&&(t=function(e,t){return e.filter((function(e){return!e.video||!e.video.videoLayout||e.video.videoLayout==t}))}(n,this.l),t.length&&(n=t)),this.i&&(t=function(t,n){return"AUTO"==n&&(n=e.matchMedia("(color-gamut: p3)").matches?"PQ":"SDR"),t.filter((function(e){return!e.video||!e.video.hdr||e.video.hdr==n}))}(n,this.i),t.length&&(n=t)),this.h&&(t=function(e,t){return e.filter((function(e){return!e.audio||!e.audio.channelsCount||e.audio.channelsCount==t}))}(n,this.h),t.length&&(n=t)),this.g&&(t=function(e,t){return e.filter((function(e){return!(!e.audio||!e.audio.label)&&e.audio.label.toLowerCase()==t.toLowerCase()}))}(n,this.g),t.length&&(n=t)),this.j&&(t=function(e,t){return e.filter((function(e){return!(!e.video||!e.video.label)&&e.video.label.toLowerCase()==t.toLowerCase()}))}(n,this.j),t.length&&(n=t)),t=function(e,t){return e.filter((function(e){return!e.audio||e.audio.spatialAudio==t}))}(n,this.B),t.length&&(n=t),new Rr(n[0],n,!("smooth"==this.m&&ne()),this.o)};var Br=0,Fr=1;function jr(e,t){var n={maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:3e4,stallTimeout:5e3,connectionTimeout:1e4};this.l=null==e.maxAttempts?n.maxAttempts:e.maxAttempts,this.j=null==e.baseDelay?n.baseDelay:e.baseDelay,this.o=null==e.fuzzFactor?n.fuzzFactor:e.fuzzFactor,this.m=null==e.backoffFactor?n.backoffFactor:e.backoffFactor,this.g=0,this.h=this.j,(this.i=void 0!==t&&t)&&(this.g=1)}function Hr(e){var t,n;return I((function(r){if(1==r.g){if(e.g>=e.l){if(!e.i)throw new bt(2,7,1010);e.g=1,e.h=e.j}return t=e.g,e.g++,0==t?r.return():(n=e.h*(1+(2*Math.random()-1)*e.o),b(r,new Promise((function(e){new Tt(e).U(n/1e3)})),2))}e.h*=e.m,k(r)}))}function Vr(){var e,t,n=new Promise((function(n,r){e=n,t=r}));return n.resolve=e,n.reject=t,n}function Gr(e,t){this.promise=e,this.i=t,this.g=!1}function Kr(e){return new Gr(Promise.reject(e),(function(){return Promise.resolve()}))}function zr(){var e=Promise.reject(new bt(2,7,7001));return e.catch((function(){})),new Gr(e,(function(){return Promise.resolve()}))}function Wr(e){return new Gr(Promise.resolve(e),(function(){return Promise.resolve()}))}function Yr(e){return new Gr(e,(function(){return e.catch((function(){}))}))}function Zr(e){return new Gr(Promise.all(e.map((function(e){return e.promise}))),(function(){return Promise.all(e.map((function(e){return e.abort()})))}))}function qr(t,n){if(n)if(n instanceof Map)for(var r=l(n.keys()),i=r.next();!i.done;i=r.next())i=i.value,Object.defineProperty(this,i,{value:n.get(i),writable:!0,enumerable:!0});else for(r in n)Object.defineProperty(this,r,{value:n[r],writable:!0,enumerable:!0});this.defaultPrevented=this.cancelable=this.bubbles=!1,this.timeStamp=e.performance&&e.performance.now?e.performance.now():Date.now(),this.type=t,this.isTrusted=!1,this.target=this.currentTarget=null,this.g=!1}function Xr(e){var t,n=new qr(e.type);for(t in e)Object.defineProperty(n,t,{value:e[t],writable:!0,enumerable:!0});return n}Vr.prototype.resolve=function(){},Vr.prototype.reject=function(){},Gr.prototype.abort=function(){return this.g=!0,this.i()},Gr.prototype.finally=function(e){return this.promise.then((function(){return e(!0)}),(function(){return e(!1)})),this},Gr.prototype.va=function(e,t){function n(n){return function(s){if(i.g&&n)a.reject(o);else{var l=n?e:t;l?r=function(e,t,n){try{var r=e(t);return r&&r.promise&&r.abort?(n.resolve(r.promise),function(){return r.abort()}):(n.resolve(r),function(){return Promise.resolve(r).then((function(){}),(function(){}))})}catch(e){return n.reject(e),function(){return Promise.resolve()}}}(l,s,a):(n?a.resolve:a.reject)(s)}}}function r(){return a.reject(o),i.abort()}var i=this,a=new Vr,o=new bt(2,7,7001);return this.promise.then(n(!0),n(!1)),new Gr(a,(function(){return r()}))},F("shaka.util.AbortableOperation",Gr),Gr.prototype.chain=Gr.prototype.va,Gr.prototype.finally=Gr.prototype.finally,Gr.all=Zr,Gr.prototype.abort=Gr.prototype.abort,Gr.notAbortable=Yr,Gr.completed=Wr,Gr.aborted=zr,Gr.failed=Kr,qr.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)},qr.prototype.stopImmediatePropagation=function(){this.g=!0},qr.prototype.stopPropagation=function(){},F("shaka.util.FakeEvent",qr);var Qr={Ji:"abrstatuschanged",Ki:"adaptation",Li:"buffering",Mi:"complete",Ni:"downloadfailed",Oi:"downloadheadersreceived",Pi:"drmsessionupdate",Ri:"emsg",hj:"prft",Error:"error",Si:"expirationupdated",Ti:"firstquartile",Ui:"gapjumped",Xi:"keystatuschanged",Zi:"loaded",$i:"loading",bj:"manifestparsed",cj:"manifestupdated",dj:"mediaqualitychanged",Metadata:"metadata",ej:"midpoint",fj:"nospatialvideoinfo",gj:"onstatechange",jj:"ratechange",kj:"segmentappended",lj:"sessiondata",mj:"spatialvideoinfo",nj:"stalldetected",oj:"started",pj:"statechanged",qj:"streaming",rj:"textchanged",sj:"texttrackvisibility",tj:"thirdquartile",uj:"timelineregionadded",vj:"timelineregionenter",wj:"timelineregionexit",xj:"trackschanged",zj:"unloading",Bj:"variantchanged"};function $r(){this.ia=new Q,this.Vd=this}function Jr(){this.g=[]}function ei(e,t){e.g.push(t.finally((function(){Ae(e.g,t)})))}function ti(e,t,n,r,i,a){$r.call(this),this.i=!1,this.m=new Jr,this.g=new Set,this.h=new Set,this.l=e||null,this.j=t||null,this.s=n||null,this.A=r||null,this.C=i||null,this.B=a||null,this.o=!1}function ni(e,t,n,r){n=n||ui;var i=ci[e];(!i||n>=i.priority)&&(ci[e]={priority:n,he:t,ci:void 0!==r&&r})}function ri(e,t,n){return{uris:e,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:t,licenseRequestType:null,sessionId:null,drmInfo:null,initData:null,initDataType:null,streamDataCallback:void 0===n?null:n}}function ii(e,t,n,r,i,a,o,s){e.o&&(n.uris[a]=n.uris[a].replace("http://","https://")),0<a&&e.C&&e.C(t,r,n.uris[a],n.uris[a-1]);var l=new rt(n.uris[a]),u=l.kb,c=!1;u||(it(l,u=(u=location.protocol).slice(0,-1)),n.uris[a]=l.toString()),u=u.toLowerCase();var d=(u=ci[u])?u.he:null;if(!d)return Kr(new bt(2,1,1e3,l));var p,f=u.ci,h=null,y=null,g=!1,v=!1;return Yr(Hr(i)).va((function(){if(e.i)return zr();p=Date.now();var i=0;n.requestStartTime=Date.now();var o=d(n.uris[a],n,t,(function(a,o,l){h&&h.stop(),y&&y.U(u/1e3),e.l&&t==li&&(i++,n.packetNumber=i,e.l(a,o,ai(r),n),c=!0,s.g=l)}),(function(r){e.j&&e.j(r,n,t),v=!0,n.timeToFirstByte=Date.now()-n.requestStartTime}));if(!f)return o;var l=n.retryParameters.connectionTimeout;l&&(h=new Tt((function(){g=!0,o.abort()}))).U(l/1e3);var u=n.retryParameters.stallTimeout;return u&&(y=new Tt((function(){g=!0,o.abort()}))),o})).va((function(r){h&&h.stop(),y&&y.stop(),null==r.timeMs&&(r.timeMs=Date.now()-p);var i={response:r,Jh:c};return!v&&e.j&&e.j(r.headers,n,t),i}),(function(l){if(h&&h.stop(),y&&y.stop(),e.s){var u=null,c=0;l instanceof bt&&(u=l,1001==l.code&&(c=l.data[1])),e.s(n,u,c,g)}if(e.i)return zr();if(g&&(l=new bt(1,1,1003,n.uris[a],t)),l instanceof bt){if(7001==l.code)throw l;if(1010==l.code)throw o;if(1==l.severity)return u=new qr("retry",u=(new Map).set("error",l)),e.dispatchEvent(u),a=(a+1)%n.uris.length,ii(e,t,n,r,i,a,l,s)}throw l}))}function ai(e){if(e){var t=e.segment;if(e=e.stream,t&&e&&e.fastSwitching&&t.md)return!1}return!0}function oi(){this.g=0}function si(e,t,n){Gr.call(this,e,t),this.h=n}$r.prototype.addEventListener=function(e,t){this.ia&&this.ia.push(e,t)},$r.prototype.removeEventListener=function(e,t){this.ia&&this.ia.remove(e,t)},$r.prototype.dispatchEvent=function(e){if(!this.ia)return!0;var t=this.ia.get(e.type)||[],n=this.ia.get("All");for(n&&(t=t.concat(n)),n=(t=l(t)).next();!n.done;n=t.next()){n=n.value,e.target=this.Vd,e.currentTarget=this.Vd;try{n.handleEvent?n.handleEvent(e):n.call(this,e)}catch(e){}if(e.g)break}return e.defaultPrevented},$r.prototype.release=function(){this.ia=null},Jr.prototype.destroy=function(){for(var e=[],t=l(this.g),n=t.next();!n.done;n=t.next())(n=n.value).promise.catch((function(){})),e.push(n.abort());return this.g=[],Promise.all(e)},y(ti,$r),(n=ti.prototype).Ef=function(e){this.o=e},n.fi=function(e){this.g.add(e)},n.Ci=function(e){this.g.delete(e)},n.bh=function(){this.g.clear()},n.gi=function(e){this.h.add(e)},n.Di=function(e){this.h.delete(e)},n.dh=function(){this.h.clear()},n.destroy=function(){return this.i=!0,this.g.clear(),this.h.clear(),$r.prototype.release.call(this),this.m.destroy()},n.request=function(e,t,n){var r=this,i=new oi;if(this.i){var a=Promise.reject(new bt(2,7,7001));return a.catch((function(){})),new si(a,(function(){return Promise.resolve()}),i)}t.method=t.method||"GET",t.headers=t.headers||{},t.retryParameters=t.retryParameters?qn(t.retryParameters):{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:3e4,stallTimeout:5e3,connectionTimeout:1e4},t.uris=qn(t.uris),a=function(e,t,n,r){function i(e){a=a.va((function(){return n.body&&(n.body=he(n.body)),e(t,n,r)}))}var a=Wr(void 0);e.A&&i(e.A);for(var o=(e=l(e.g)).next();!o.done;o=e.next())i(o.value);return a.va(void 0,(function(e){if(e instanceof bt&&7001==e.code)throw e;throw new bt(2,1,1006,e)}))}(this,e,t,n);var o=a.va((function(){return ii(r,e,t,n,new jr(t.retryParameters,!1),0,null,i)})),s=o.va((function(t){return function(e,t,n,r){for(var i=Wr(void 0),a={},o=(e=l(e.h)).next();!o.done;a={re:a.re},o=e.next())a.re=o.value,i=i.va(function(e){return function(){var i=n.response;return i.data&&(i.data=he(i.data)),e.re(t,i,r)}}(a));return i.va((function(){return n}),(function(e){var t=2;if(e instanceof bt){if(7001==e.code)throw e;t=e.severity}throw new bt(t,1,1007,e)}))}(r,e,t,n)})),u=Date.now(),c=0;a.promise.then((function(){c=Date.now()-u}),(function(){}));var d=0;o.promise.then((function(){d=Date.now()}),(function(){}));var p=s.va((function(i){var a=Date.now()-d,o=i.response;return o.timeMs+=c,o.timeMs+=a,i.Jh||!r.l||o.fromCache||"HEAD"==t.method||e!=li||r.l(o.timeMs,o.data.byteLength,ai(n)),r.B&&r.B(e,o,n),o}),(function(e){throw e&&(e.severity=2),e}));return a=new si(p.promise,(function(){return p.abort()}),i),ei(this.m,a),a},F("shaka.net.NetworkingEngine",ti),ti.prototype.request=ti.prototype.request,ti.prototype.destroy=ti.prototype.destroy,ti.makeRequest=ri,ti.defaultRetryParameters=function(){return{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:3e4,stallTimeout:5e3,connectionTimeout:1e4}},ti.prototype.clearAllResponseFilters=ti.prototype.dh,ti.prototype.unregisterResponseFilter=ti.prototype.Di,ti.prototype.registerResponseFilter=ti.prototype.gi,ti.prototype.clearAllRequestFilters=ti.prototype.bh,ti.prototype.unregisterRequestFilter=ti.prototype.Ci,ti.prototype.registerRequestFilter=ti.prototype.fi,ti.unregisterScheme=function(e){delete ci[e]},ti.registerScheme=ni,ti.prototype.setForceHTTPS=ti.prototype.Ef,ti.NumBytesRemainingClass=oi,y(si,Gr),ti.PendingRequest=si;var li=1;ti.RequestType={MANIFEST:0,SEGMENT:li,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6,ADS:7,CONTENT_STEERING:8},ti.AdvancedRequestType={INIT_SEGMENT:0,MEDIA_SEGMENT:1,MEDIA_PLAYLIST:2,MASTER_PLAYLIST:3,MPD:4,MSS:5};var ui=3;ti.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:ui};var ci={};function di(e){this.g=!1,this.h=new Vr,this.i=e}function pi(e,t){if(e.g){if(t instanceof bt&&7003==t.code)throw t;throw new bt(2,7,7003,t)}}function fi(e,t){for(var n=[],r=(e=l(e)).next();!r.done;r=e.next())n.push(t(r.value));return n}function hi(e){for(var t=new Map,n=l(Object.keys(e)),r=n.next();!r.done;r=n.next())r=r.value,t.set(r,e[r]);return t}function yi(e){var t={};return e.forEach((function(e,n){t[n]=e})),t}function gi(e,t){this.h=ve(e),this.i=t==mi,this.g=0}function vi(){return new bt(2,3,3e3)}di.prototype.destroy=function(){var e=this;return this.g?this.h:(this.g=!0,this.i().then((function(){e.h.resolve()}),(function(){e.h.resolve()})))},(n=gi.prototype).ka=function(){return this.g<this.h.byteLength},n.wa=function(){return this.g},n.getLength=function(){return this.h.byteLength},n.P=function(){try{var e=this.h.getUint8(this.g);return this.g+=1,e}catch(e){throw vi()}},n.ra=function(){try{var e=this.h.getUint16(this.g,this.i);return this.g+=2,e}catch(e){throw vi()}},n.M=function(){try{var e=this.h.getUint32(this.g,this.i);return this.g+=4,e}catch(e){throw vi()}},n.tg=function(){try{var e=this.h.getInt32(this.g,this.i);return this.g+=4,e}catch(e){throw vi()}},n.zc=function(){try{if(this.i)var e=this.h.getUint32(this.g,!0),t=this.h.getUint32(this.g+4,!0);else t=this.h.getUint32(this.g,!1),e=this.h.getUint32(this.g+4,!1)}catch(e){throw vi()}if(2097151<t)throw new bt(2,3,3001);return this.g+=8,t*Math.pow(2,32)+e},n.sb=function(e){if(this.g+e>this.h.byteLength)throw vi();var t=ye(this.h,this.g,e);return this.g+=e,t},n.skip=function(e){if(this.g+e>this.h.byteLength)throw vi();this.g+=e},n.ni=function(e){if(this.g<e)throw vi();this.g-=e},n.seek=function(e){if(0>e||e>this.h.byteLength)throw vi();this.g=e},n.dc=function(){for(var e=this.g;this.ka()&&0!=this.h.getUint8(this.g);)this.g+=1;return e=ye(this.h,e,this.g-e),this.g+=1,Wt(e)},F("shaka.util.DataViewReader",gi),gi.prototype.readTerminatedString=gi.prototype.dc,gi.prototype.seek=gi.prototype.seek,gi.prototype.rewind=gi.prototype.ni,gi.prototype.skip=gi.prototype.skip,gi.prototype.readBytes=gi.prototype.sb,gi.prototype.readUint64=gi.prototype.zc,gi.prototype.readInt32=gi.prototype.tg,gi.prototype.readUint32=gi.prototype.M,gi.prototype.readUint16=gi.prototype.ra,gi.prototype.readUint8=gi.prototype.P,gi.prototype.getLength=gi.prototype.getLength,gi.prototype.getPosition=gi.prototype.wa,gi.prototype.hasMoreData=gi.prototype.ka;var mi=1;function bi(){this.i=[],this.h=[],this.g=!1}function ki(e){for(var t=Ci(e);e.reader.ka()&&!e.parser.g;)e.parser.xc(e.start+t,e.reader,e.partialOkay)}function Ei(e){for(var t=Ci(e),n=e.reader.M(),r=0;r<n&&(e.parser.xc(e.start+t,e.reader,e.partialOkay),!e.parser.g);r++);}function _i(e){var t=Ci(e);for(e.reader.skip(78);e.reader.ka()&&!e.parser.g;)e.parser.xc(e.start+t,e.reader,e.partialOkay)}function Ti(e){var t=Ci(e);e.reader.skip(8);var n=e.reader.ra();for(e.reader.skip(6),2==n?e.reader.skip(48):e.reader.skip(12),1==n&&e.reader.skip(16);e.reader.ka()&&!e.parser.g;)e.parser.xc(e.start+t,e.reader,e.partialOkay)}function Ai(e){return function(t){e(t.reader.sb(t.reader.getLength()-t.reader.wa()))}}function Si(e){for(var t=0,n=(e=l(e)).next();!n.done;n=e.next())t=t<<8|n.value.charCodeAt(0);return t}function wi(e){return String.fromCharCode(e>>24&255,e>>16&255,e>>8&255,255&e)}function Ci(e){return 8+(e.has64BitSize?8:0)+(null!=e.flags?4:0)}gi.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:mi},(n=bi.prototype).box=function(e,t){return e=Si(e),this.i[e]=xi,this.h[e]=t,this},n.O=function(e,t){return e=Si(e),this.i[e]=Pi,this.h[e]=t,this},n.stop=function(){this.g=!0},n.parse=function(e,t,n){for(e=new gi(e,0),this.g=!1;e.ka()&&!this.g;)this.xc(0,e,t,n)},n.xc=function(e,t,n,r){var i=t.wa();if(r&&i+8>t.getLength())this.g=!0;else{var a=t.M(),o=t.M(),s=wi(o),l=!1;switch(a){case 0:a=t.getLength()-i;break;case 1:if(r&&t.wa()+8>t.getLength())return void(this.g=!0);a=t.zc(),l=!0}var u=this.h[o];if(u){var c=null,d=null;if(this.i[o]==Pi){if(r&&t.wa()+4>t.getLength())return void(this.g=!0);c=(d=t.M())>>>24,d&=16777215}o=i+a,n&&o>t.getLength()&&(o=t.getLength()),r&&o>t.getLength()?this.g=!0:(r=o-t.wa(),u({name:s,parser:this,partialOkay:n||!1,version:c,flags:d,reader:t=new gi(t=0<r?t.sb(r):new Uint8Array(0),0),size:a,start:i+e,has64BitSize:l}))}else t.skip(Math.min(i+a-t.wa(),t.getLength()-t.wa()))}},F("shaka.util.Mp4Parser",bi),bi.headerSize=Ci,bi.typeToString=wi,bi.allData=Ai,bi.audioSampleEntry=Ti,bi.visualSampleEntry=_i,bi.sampleDescription=Ei,bi.children=ki,bi.prototype.parseNext=bi.prototype.xc,bi.prototype.parse=bi.prototype.parse,bi.prototype.stop=bi.prototype.stop,bi.prototype.fullBox=bi.prototype.O,bi.prototype.box=bi.prototype.box;var xi=0,Pi=1;function Ri(e){var t=this;this.g=[],this.h=[],this.data=[],(new bi).box("moov",ki).box("moof",ki).O("pssh",(function(e){if(!(1<e.version)){var n=ye(e.reader.h,-12,e.size);if(t.data.push(n),t.g.push(on(e.reader.sb(16))),0<e.version){n=e.reader.M();for(var r=0;r<n;r++){var i=on(e.reader.sb(16));t.h.push(i)}}}})).parse(e)}function Ii(e,t,n,r){var i=e.length,a=t.length+16+i;0<r&&(a+=4+16*n.size);var o=new Uint8Array(a),s=ve(o),u=0;if(s.setUint32(u,a),u+=4,s.setUint32(u,1886614376),u+=4,1>r?s.setUint32(u,0):s.setUint32(u,16777216),u+=4,o.set(t,u),u+=t.length,0<r)for(s.setUint32(u,n.size),u+=4,n=(t=l(n)).next();!n.done;n=t.next())n=an(n.value),o.set(n,u),u+=n.length;return s.setUint32(u,i),o.set(e,u+4),o}function Di(e,t){return Oi(e=Zt(e),t)}function Oi(e,t){return e=function(e){function t(i,a){a=void 0!==a&&a;for(var o=[];e[r];)if(60==e.charCodeAt(r)){if(47===e.charCodeAt(r+1)){a=r+2,r=e.indexOf(">",r);var s=(a=e.substring(a,r)).indexOf(i);if(-1==s){var l=i.indexOf(".");0<l&&(s=a.indexOf(i.substring(0,l)))}if(-1==s)throw i=e.substring(0,r).split("\n"),Error("Unexpected close tag\nLine: "+(i.length-1)+"\nColumn: "+(i[i.length-1].length+1)+"\nChar: "+e[r]);r+1&&(r+=1);break}if(33===e.charCodeAt(r+1)){if(45==e.charCodeAt(r+2)){for(;-1!==r&&(62!==e.charCodeAt(r)||45!=e.charCodeAt(r-1)||45!=e.charCodeAt(r-2)||-1==r);)r=e.indexOf(">",r+1);-1===r&&(r=e.length)}else if(91===e.charCodeAt(r+2)&&91===e.charCodeAt(r+8)&&"cdata"===e.substr(r+3,5).toLowerCase()){-1==(s=e.indexOf("]]>",r))?(o.push(e.substr(r+9)),r=e.length):(o.push(e.substring(r+9,s)),r=s+3);continue}r++;continue}e:{l=a,r++;var c=n(),d={};for(s=[];62!==e.charCodeAt(r)&&e[r];){var p=e.charCodeAt(r);if(64<p&&91>p||96<p&&123>p){p=n();for(var f=e.charCodeAt(r);f&&39!==f&&34!==f&&!(64<f&&91>f||96<f&&123>f)&&62!==f;)r++,f=e.charCodeAt(r);var h=r+1;if(r=e.indexOf(e[r],h),h=e.slice(h,r),39===f||34===f){if(-1===r){for(l={tagName:c,attributes:d,children:s,parent:null},c=0;c<s.length;c++)"string"!=typeof s[c]&&(s[c].parent=l);s=l;break e}}else h=null,r--;p.startsWith("xmlns:")&&na.set(h,p.split(":")[1]),"tt"===c&&"xml:space"===p&&"preserve"===h&&(l=!0),d[p]=h}r++}for(47!==e.charCodeAt(r-1)?(r++,s=t(c,l)):r++,l={tagName:c,attributes:d,children:s,parent:null},c=s.length,d=0;d<c;d++)"string"!=typeof(p=s[d])?p.parent=l:d==c-1&&"\n"==p&&s.pop();s=l}if(o.push(s),"string"==typeof s)break;"?"===s.tagName[0]&&s.children&&(o.push.apply(o,u(s.children)),s.children=[])}else s=r,-2===(r=e.indexOf("<",r)-1)&&(r=e.length),s=e.slice(s,r+1),a?0<s.length&&o.push(s):(o.length&&1==s.length&&"\n"==s[0]||0<s.trim().length)&&o.push(s),r++;return o}function n(){for(var t=r;-1==="\r\n\t>/= ".indexOf(e[r])&&e[r];)r++;return e.slice(t,r)}var r=0;return t("")}(e),!t&&e.length?e[0]:(e=e.find((function(e){return e.tagName===t})))?e:null}function Li(e){return na.has(e)?na.get(e):""}function Mi(e){return"string"==typeof e}function Ni(e,t){var n=[];if(!e.children)return[];for(var r=(e=l(e.children)).next();!r.done;r=e.next())(r=r.value).tagName===t&&n.push(r);return n}function Ui(e){return"string"==typeof e?$t(e):""===(e=e.children.reduce((function(e,t){return"string"==typeof t?e+t:e}),""))?null:$t(e)}function Bi(e){return Array.from(e.children).every((function(e){return"string"==typeof e}))?((e=Ui(e))&&(e=e.trim()),e):null}function Fi(e,t,n){if(n=void 0===n?[]:n,e.tagName===t&&n.push(e),e.children)for(var r=(e=l(e.children)).next();!r.done;r=e.next())Fi(r.value,t,n);return n}function ji(e,t){return 1!=(e=Ni(e,t)).length?null:e[0]}function Hi(e,t,n){return 1!=(e=Ki(e,t,n)).length?null:e[0]}function Vi(e,t,n,r){r=void 0===r?null:r;var i=null;return null!=(e=e.attributes[t])&&(i=n(e)),null==i?r:i}function Gi(e,t,n){return t=Li(t),e.attributes[t+":"+n]||null}function Ki(e,t,n){t=Li(t);var r=[];if(e.children)for(var i=(e=l(e.children)).next();!i.done;i=e.next())(i=i.value)&&i.tagName===t+":"+n&&r.push(i);return r}function zi(e,t,n){for(var r=(t=l(t)).next();!r.done;r=t.next())if(r=Gi(e,r.value,n))return r;return null}function Wi(e){return e?(/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(e)&&(e+="Z"),e=Date.parse(e),isNaN(e)?null:e/1e3):null}function Yi(e){return e&&(e=RegExp("^P(?:([0-9]*)Y)?(?:([0-9]*)M)?(?:([0-9]*)D)?(?:T(?:([0-9]*)H)?(?:([0-9]*)M)?(?:([0-9.]*)S)?)?$").exec(e))?(e=31536e3*Number(e[1]||null)+2592e3*Number(e[2]||null)+86400*Number(e[3]||null)+3600*Number(e[4]||null)+60*Number(e[5]||null)+Number(e[6]||null),isFinite(e)?e:null):null}function Zi(e){var t=/([0-9]+)-([0-9]+)/.exec(e);return t?(e=Number(t[1]),isFinite(e)?(t=Number(t[2]),isFinite(t)?{start:e,end:t}:null):null):null}function qi(e){return 0==(e=Number(e))%1?e:null}function Xi(e){return 0==(e=Number(e))%1&&0<e?e:null}function Qi(e){return 0==(e=Number(e))%1&&0<=e?e:null}function $i(e){return e=Number(e),isNaN(e)?null:e}function Ji(e){return!!e&&"true"===e.toLowerCase()}function ea(e){var t,n=(t=e.match(/^(\d+)\/(\d+)$/))?Number(t[1])/Number(t[2]):Number(e);return isNaN(n)?null:n}function ta(e,t,n){t=void 0===t||t,n=void 0===n||n;var r,i=document.createElement(e.tagName);for(r in e.attributes)i.setAttribute(r,e.attributes[r]);if(t&&e.parent&&"?xml"!=e.parent.tagName&&ta(e.parent,!0,!1).appendChild(i),n)for(t=(e=l(e.children)).next();!t.done;t=e.next())n=void 0,n="string"==typeof(t=t.value)?new Text(t):ta(t,!1,!0),i.appendChild(n);return i}var na=new Map([]);function ra(e){var t=this;this.C=e,this.H=new Set,this.m=this.s=null,this.ia=this.da=!1,this.I=0,this.g=null,this.B=new $,this.i=new Map,this.A=new Map,this.l=new Vr,this.h=null,this.o=function(n){2==n.severity&&t.l.reject(n),e.onError(n)},this.aa=new Map,this.ea=new Map,this.L=new Tt((function(){return function(e){var t=e.aa,n=e.ea;n.clear(),t.forEach((function(e,t){return n.set(t,e)})),t=Array.from(n.values()),t.length&&t.every((function(e){return"expired"==e}))&&e.o(new bt(2,6,6014)),e.C.fe(yi(n))}(t)})),this.T=!1,this.N=[],this.Y=!1,this.K=new Tt((function(){!function(e){e.i.forEach((function(t,n){var r=t.lf,i=n.expiration;isNaN(i)&&(i=1/0),i!=r&&(e.C.onExpirationUpdated(n.sessionId,i),t.lf=i)}))}(t)})),this.l.catch((function(){})),this.j=new di((function(){return function(e){return I((function(t){switch(t.g){case 1:return e.B.release(),e.B=null,e.l.reject(),e.K.stop(),e.K=null,e.L.stop(),e.L=null,b(t,va(e),2);case 2:if(!e.m){t.u(3);break}return E(t,4),b(t,e.m.setMediaKeys(null),6);case 6:T(t,5);break;case 4:A(t);case 5:e.m=null;case 3:e.g=null,e.H.clear(),e.s=null,e.A=new Map,e.h=null,e.o=function(){},e.C=null,e.ba=!1,e.G=null,k(t)}}))}(t)})),this.ba=!1,this.F=this.G=null}function ia(e,t,n){e.A=new Map;for(var r=(n=l(n)).next();!r.done;r=n.next())e.A.set(r.value,{initData:null,initDataType:null});for(r=(n=l(e.h.persistentSessionsMetadata)).next();!r.done;r=n.next())r=r.value,e.A.set(r.sessionId,{initData:r.initData,initDataType:r.initDataType});return e.T=0<e.A.size,aa(e,t)}function aa(e,t){var n,r,i,a,o,s,u,c,d,p,f,h,y,g,v;return I((function(m){if(1==m.g){if(n=function(e){return e=hi(e.h.clearKeys),0==e.size?null:cn(e)}(e))for(r=l(t),i=r.next();!i.done;i=r.next())(a=i.value).video&&(a.video.drmInfos=[n]),a.audio&&(a.audio.drmInfos=[n]);for((o=t.some((function(e){return!!(e.video&&e.video.drmInfos.length||e.audio&&e.audio.drmInfos.length)})))||(s=hi(e.h.servers),function(e,t){var n=[];for(t.forEach((function(e,t){n.push({keySystem:t,licenseServerUri:e,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",initData:[],keyIds:new Set})})),e=l(e),t=e.next();!t.done;t=e.next())(t=t.value).video&&(t.video.drmInfos=n),t.audio&&(t.audio.drmInfos=n)}(t,s)),u=new Set,c=l(t),i=c.next();!i.done;i=c.next())for(d=i.value,p=ka(d),f=l(p),h=f.next();!h.done;h=f.next())y=h.value,u.add(y);for(g=l(u),h=g.next();!h.done;h=g.next())Ta(h.value,hi(e.h.servers),hi(e.h.advanced||{}),e.h.keySystemsMapping);return b(m,or(t,e.T,e.ba,e.h.preferredKeySystems),2)}return pi(e.j),o||Object.keys(e.h.servers).length?(v=da(e,void 0,t),m.return(o?v:v.catch((function(){})))):(e.da=!0,m.return(Promise.resolve()))}))}function oa(e){var t;return I((function(n){switch(n.g){case 1:if(e.m.mediaKeys)return n.return();if(!e.G){n.u(2);break}return b(n,e.G,3);case 3:return pi(e.j),n.return();case 2:return E(n,4),e.G=e.m.setMediaKeys(e.s),b(n,e.G,6);case 6:T(n,5);break;case 4:t=A(n),e.o(new bt(2,6,6003,t.message));case 5:pi(e.j),k(n)}}))}function sa(e){var t,n,r,i;return I((function(a){if(1==a.g)return e.A.size?(e.A.forEach((function(t,n){ha(e,n,t)})),b(a,e.l,3)):a.u(2);if(2!=a.g){if(0<(e.g&&e.g.keyIds||new Set([])).size&&function(e){for(var t=l(e.g&&e.g.keyIds||new Set([])),n=t.next();!n.done;n=t.next())if("usable"!==e.aa.get(n.value))return!1;return!0}(e))return a.return(e.l);e.l=new Vr,e.l.catch((function(){}))}for(t=(e.g?e.g.initData:[])||[],n=l(t),r=n.next();!r.done;r=n.next())i=r.value,la(e,i.initDataType,i.initData);return Ea(e)&&e.l.resolve(),a.return(e.l)}))}function la(e,t,n){if(n.length){for(var r=e.i.values(),i=(r=l(r)).next();!i.done;i=r.next())if(pe(n,i.value.initData)&&e.h.ignoreDuplicateInitData)return;0<e.i.size&&Ea(e)&&(e.l.resolve(),e.l=new Vr,e.l.catch((function(){}))),function(e,t,n,r){try{var i=e.s.createSession(r)}catch(t){return void e.o(new bt(2,6,6005,t.message))}e.B.D(i,"message",(function(t){e.m&&e.h.delayLicenseRequestUntilPlayed&&e.m.paused&&!e.Y?e.N.push(t):ya(e,t)})),e.B.D(i,"keystatuseschange",(function(t){return ga(e,t)})),e.i.set(i,{initData:n,initDataType:t,loaded:!1,lf:1/0,bb:null,type:r});try{n=e.h.initDataTransform(n,t,e.g)}catch(n){return t=n,n instanceof bt||(t=new bt(2,6,6016,n)),void e.o(t)}e.h.logLicenseExchange&&nn(n),i.generateRequest(t,n).catch((function(t){if(!e.j.g){e.i.delete(i);var n=t.errorCode;if(n&&n.systemCode){var r=n.systemCode;0>r&&(r+=Math.pow(2,32)),r="0x"+r.toString(16)}e.o(new bt(2,6,6006,t.message,t,r))}}))}(e,t,n,e.g.sessionType)}}function ua(e){return!!e&&!!e.match(/^com\.(microsoft|chromecast)\.playready/)}function ca(e){return e=fi(e=e.i.keys(),(function(e){return e.sessionId})),Array.from(e)}function da(e,t,n){var r,i,a,o,s,u,c,d,p,f,h,y,g,v;return I((function(m){switch(m.g){case 1:if(r=new Map,n.length){i=function(e,t,n){for(var r=l(t),i=r.next();!i.done;i=r.next()){var a=l(ka(i.value));for(i=a.next();!i.done;i=a.next())i=i.value,n.has(i.keySystem)||n.set(i.keySystem,[]),n.get(i.keySystem).push(i)}if(1==n.size&&n.has(""))throw new bt(2,6,6e3);for(r={},e=l(e.h.preferredKeySystems),i=e.next();!i.done;r={qe:r.qe},i=e.next())for(r.qe=i.value,a=l(t),i=a.next();!i.done;i=a.next())if(i=i.value.decodingInfos.find(function(e){return function(t){return t.supported&&null!=t.keySystemAccess&&t.keySystemAccess.keySystem==e.qe}}(r)))return i.keySystemAccess;for(e=l([!0,!1]),i=e.next();!i.done;i=e.next())for(r=i.value,a=l(t),i=a.next();!i.done;i=a.next()){var o=l(i.value.decodingInfos);for(i=o.next();!i.done;i=o.next()){var s=i.value;if(s.supported&&s.keySystemAccess){var u=l(i=n.get(s.keySystemAccess.keySystem));for(i=u.next();!i.done;i=u.next())if(!!i.value.licenseServerUri==r)return s.keySystemAccess}}}return null}(e,n,r),m.u(2);break}return b(m,function(e,t){var n,r,i,a,o,s,u,c,d,p,f,h,y,g,v;return I((function(m){switch(m.g){case 1:if(1==t.size&&t.has(""))throw new bt(2,6,6e3);for(r=l(t.values()),i=r.next();!i.done;i=r.next())0==(a=i.value).audioCapabilities.length&&delete a.audioCapabilities,0==a.videoCapabilities.length&&delete a.videoCapabilities;o=l(e.h.preferredKeySystems),s=o.next();case 2:if(s.done){m.u(4);break}if(u=s.value,!t.has(u)){m.u(3);break}return c=t.get(u),E(m,6),b(m,navigator.requestMediaKeySystemAccess(u,[c]),8);case 8:return n=m.h,m.return(n);case 6:A(m);case 7:pi(e.j);case 3:s=o.next(),m.u(2);break;case 4:d=l([!0,!1]),p=d.next();case 9:if(p.done){m.u(11);break}f=p.value,h=l(t.keys()),s=h.next();case 12:if(s.done){p=d.next(),m.u(9);break}if(y=s.value,g=t.get(y),v=g.drmInfos.some((function(e){return!!e.licenseServerUri})),v!=f){m.u(13);break}return E(m,15),b(m,navigator.requestMediaKeySystemAccess(y,[g]),17);case 17:return n=m.h,m.return(n);case 15:A(m);case 16:pi(e.j);case 13:s=h.next(),m.u(12);break;case 11:return m.return(n)}}))}(e,t),3);case 3:i=m.h;case 2:if(!(a=i))throw new bt(2,6,6001);for(pi(e.j),E(m,4),e.H.clear(),o=a.getConfiguration(),s=o.audioCapabilities||[],u=o.videoCapabilities||[],c=l(s),d=c.next();!d.done;d=c.next())p=d.value,e.H.add(p.contentType.toLowerCase());for(f=l(u),d=f.next();!d.done;d=f.next())h=d.value,e.H.add(h.contentType.toLowerCase());if(n.length){var k=a.keySystem,_=r.get(a.keySystem),S=[],w=[],C=[],x=[],P=[],R=new Set;_a(_,S,w,x,C,P,R);var D=e.T?"persistent-license":"temporary";for(k={keySystem:k,encryptionScheme:S[0],licenseServerUri:w[0],distinctiveIdentifierRequired:_[0].distinctiveIdentifierRequired,persistentStateRequired:_[0].persistentStateRequired,sessionType:_[0].sessionType||D,audioRobustness:_[0].audioRobustness||"",videoRobustness:_[0].videoRobustness||"",serverCertificate:x[0],serverCertificateUri:C[0],initData:P,keyIds:R},S=(_=l(_)).next();!S.done;S=_.next())(S=S.value).distinctiveIdentifierRequired&&(k.distinctiveIdentifierRequired=S.distinctiveIdentifierRequired),S.persistentStateRequired&&(k.persistentStateRequired=S.persistentStateRequired);_=k}else _=a.keySystem,k=t.get(a.keySystem),S=[],w=[],C=[],x=[],P=[],R=new Set,_a(k.drmInfos,S,w,x,C,P,R),_={keySystem:_,encryptionScheme:S[0],licenseServerUri:w[0],distinctiveIdentifierRequired:"required"==k.distinctiveIdentifier,persistentStateRequired:"required"==k.persistentState,sessionType:k.sessionTypes[0]||"temporary",audioRobustness:(k.audioCapabilities?k.audioCapabilities[0].robustness:"")||"",videoRobustness:(k.videoCapabilities?k.videoCapabilities[0].robustness:"")||"",serverCertificate:x[0],serverCertificateUri:C[0],initData:P,keyIds:R};if(e.g=_,!e.g.licenseServerUri)throw new bt(2,6,6012,e.g.keySystem);return b(m,a.createMediaKeys(),6);case 6:if(y=m.h,pi(e.j),e.s=y,""==e.h.minHdcpVersion||!("getStatusForPolicy"in e.s)){m.u(7);break}return E(m,8),b(m,e.s.getStatusForPolicy({minHdcpVersion:e.h.minHdcpVersion}),10);case 10:if("usable"!=m.h)throw new bt(2,6,6018);pi(e.j),T(m,7,4);break;case 8:if((g=A(m,4))instanceof bt)throw g;throw new bt(2,6,6019,g.message);case 7:return e.da=!0,b(m,function(e){var t,n;return I((function(r){switch(r.g){case 1:if(!e.s||!e.g)return r.return();if(!e.g.serverCertificateUri||e.g.serverCertificate&&e.g.serverCertificate.length){r.u(2);break}return t=ri([e.g.serverCertificateUri],e.h.retryParameters),E(r,3),b(r,e.C.zb.request(5,t).promise,5);case 5:n=r.h,e.g.serverCertificate=ye(n.data),T(r,4);break;case 3:throw new bt(2,6,6017,A(r));case 4:if(e.j.g)return r.return();case 2:return e.g.serverCertificate&&e.g.serverCertificate.length?(E(r,6),b(r,e.s.setServerCertificate(e.g.serverCertificate),8)):r.return();case 8:T(r,0);break;case 6:throw new bt(2,6,6004,A(r).message)}}))}(e),11);case 11:pi(e.j),T(m,0);break;case 4:if(v=A(m),pi(e.j,v),e.g=null,e.H.clear(),v instanceof bt)throw v;throw new bt(2,6,6002,v.message)}}))}function pa(e){Ea(e)&&e.l.resolve()}function fa(e,t){new Tt((function(){t.loaded=!0,pa(e)})).U(Sa)}function ha(e,t,n){var r,i,a,o,s,l,u;return I((function(c){switch(c.g){case 1:try{r=e.s.createSession("persistent-license")}catch(t){return i=new bt(2,6,6005,t.message),e.o(i),c.return(Promise.reject(i))}return e.B.D(r,"message",(function(t){e.m&&e.h.delayLicenseRequestUntilPlayed&&e.m.paused&&!e.Y?e.N.push(t):ya(e,t)})),e.B.D(r,"keystatuseschange",(function(t){return ga(e,t)})),a={initData:n.initData,initDataType:n.initDataType,loaded:!1,lf:1/0,bb:null,type:"persistent-license"},e.i.set(r,a),E(c,2),b(c,r.load(t),4);case 4:return o=c.h,pi(e.j),o||(e.i.delete(r),s=e.h.persistentSessionOnlinePlayback?1:2,e.o(new bt(s,6,6013)),a.loaded=!0),fa(e,a),pa(e),c.return(r);case 2:l=A(c),pi(e.j,l),e.i.delete(r),u=e.h.persistentSessionOnlinePlayback?1:2,e.o(new bt(u,6,6005,l.message)),a.loaded=!0,pa(e);case 3:return c.return(Promise.resolve())}}))}function ya(e,t){var n,r,i,a,o,s,u,c,d,p,f,h;I((function(y){switch(y.g){case 1:if(n=t.target,e.h.logLicenseExchange&&nn(t.message),r=e.i.get(n),i=e.g.licenseServerUri,a=e.h.advanced[e.g.keySystem],"individualization-request"==t.messageType&&a&&a.individualizationServer&&(i=a.individualizationServer),(o=ri([i],e.h.retryParameters)).body=t.message,o.method="POST",o.licenseRequestType=t.messageType,o.sessionId=n.sessionId,o.drmInfo=e.g,r&&(o.initData=r.initData,o.initDataType=r.initDataType),ua(e.g.keySystem)){var g=Yt(o.body,!0,!0);if(g.includes("PlayReadyKeyMessage")){for(var v=Fi(g=Oi(g,"PlayReadyKeyMessage"),"HttpHeader"),m=(v=l(v)).next();!m.done;m=v.next()){var _=m.value;m=Fi(_,"name")[0],_=Fi(_,"value")[0],o.headers[Ui(m)]=Ui(_)}g=Fi(g,"Challenge")[0],o.body=rn(Ui(g))}else o.headers["Content-Type"]="text/xml; charset=utf-8"}return s=Date.now(),E(y,2),b(y,e.C.zb.request(2,o).promise,4);case 4:u=y.h,T(y,3);break;case 2:return c=A(y),e.j.g?y.return():(d=new bt(2,6,6007,c),1==e.i.size?(e.o(d),r&&r.bb&&r.bb.reject(d)):(r&&r.bb&&r.bb.reject(d),e.i.delete(n),Ea(e)&&(e.l.resolve(),e.L.U(.1))),y.return());case 3:return e.j.g?y.return():(e.I+=(Date.now()-s)/1e3,e.h.logLicenseExchange&&nn(u.data),E(y,5),b(y,n.update(u.data),7));case 7:T(y,6);break;case 5:return p=A(y),f=new bt(2,6,6008,p.message),e.o(f),r&&r.bb&&r.bb.reject(f),y.return();case 6:if(e.j.g)return y.return();h=new qr("drmsessionupdate"),e.C.onEvent(h),r&&(r.bb&&r.bb.resolve(),fa(e,r)),k(y)}}))}function ga(e,t){t=t.target;var n=e.i.get(t),r=!1;t.keyStatuses.forEach((function(t,i){if("string"==typeof i){var a=i;i=t,t=a}if(ua(e.g.keySystem)&&16==i.byteLength&&(wt()||Bt())){var o=(a=ve(i)).getUint32(0,!0),s=a.getUint16(4,!0),l=a.getUint16(6,!0);a.setUint32(0,o,!1),a.setUint16(4,s,!1),a.setUint16(6,l,!1)}"status-pending"!=t&&(n.loaded=!0),"expired"==t&&(r=!0),i=on(i).slice(0,32),e.aa.set(i,t)}));var i=t.expiration-Date.now();(0>i||r&&1e3>i)&&n&&!n.bb&&(e.i.delete(t),t.close().catch((function(){}))),Ea(e)&&(e.l.resolve(),e.L.U(wa))}function va(e){var t;return I((function(n){return t=Array.from(e.i.entries()),e.i.clear(),b(n,Promise.all(t.map((function(t){var n=(t=l(t)).next().value,r=t.next().value;return I((function(t){return 1==t.g?(E(t,2),e.ia||e.A.has(n.sessionId)||"persistent-license"!==r.type||e.h.persistentSessionOnlinePlayback?b(t,function(e){var t;return I((function(n){return 1==n.g?(t=new Promise((function(e,t){new Tt(t).U(Aa)})),E(n,2),b(n,Promise.race([Promise.all([e.close(),e.closed]),t]),4)):2!=n.g?T(n,0):(A(n),void k(n))}))}(n),5):b(t,n.remove(),5)):2!=t.g?T(t,0):(A(t),void k(t))}))}))),0)}))}function ma(e,t){return!e.length||!t.length||e===t||0<ba(e,t).length}function ba(e,t){if(!e.length)return t;if(!t.length)return e;for(var n=[],r=(e=l(e)).next();!r.done;r=e.next()){r=r.value;for(var i=l(t),a=i.next();!a.done;a=i.next())if(a=a.value,r.keySystem==a.keySystem){i=new Map;for(var o=l((r.initData||[]).concat(a.initData||[])),s=o.next();!s.done;s=o.next())s=s.value,i.set(s.keyId,s);i=Array.from(i.values()),o=r.keyIds&&a.keyIds?new Set([].concat(u(r.keyIds),u(a.keyIds))):r.keyIds||a.keyIds,n.push({keySystem:r.keySystem,licenseServerUri:r.licenseServerUri||a.licenseServerUri,distinctiveIdentifierRequired:r.distinctiveIdentifierRequired||a.distinctiveIdentifierRequired,persistentStateRequired:r.persistentStateRequired||a.persistentStateRequired,videoRobustness:r.videoRobustness||a.videoRobustness,audioRobustness:r.audioRobustness||a.audioRobustness,serverCertificate:r.serverCertificate||a.serverCertificate,serverCertificateUri:r.serverCertificateUri||a.serverCertificateUri,initData:i,keyIds:o});break}}return n}function ka(e){return(e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[])}function Ea(e){return function(e,t){for(var n=(e=l(e)).next();!n.done;n=e.next())if(!t(n.value))return!1;return!0}(e=e.i.values(),(function(e){return e.loaded}))}function _a(t,n,r,i,a,o,s){for(var c=[],d={},p=(t=l(t)).next();!p.done;d={la:d.la},p=t.next()){if(d.la=p.value,n.includes(d.la.encryptionScheme)||n.push(d.la.encryptionScheme),"org.w3.clearkey"==d.la.keySystem&&d.la.licenseServerUri.startsWith("data:application/json;base64,")?c.includes(d.la.licenseServerUri)||c.push(d.la.licenseServerUri):r.includes(d.la.licenseServerUri)||r.push(d.la.licenseServerUri),a.includes(d.la.serverCertificateUri)||a.push(d.la.serverCertificateUri),d.la.serverCertificate&&(i.some(function(e){return function(t){return pe(t,e.la.serverCertificate)}}(d))||i.push(d.la.serverCertificate)),d.la.initData){p={};for(var f=l(d.la.initData),h=f.next();!h.done;p={vd:p.vd},h=f.next())p.vd=h.value,o.some(function(e){return function(t){var n=e.vd;return!(!t.keyId||t.keyId!=n.keyId)||t.initDataType==n.initDataType&&pe(t.initData,n.initData)}}(p))||o.push(p.vd)}if(d.la.keyIds)for(f=(p=l(d.la.keyIds)).next();!f.done;f=p.next())s.add(f.value)}if(1==c.length)r.push(c[0]);else if(0<c.length){for(n=[],i=(c=l(c)).next();!i.done;i=c.next())i=e.atob(i.value.split("data:application/json;base64,").pop()),i=JSON.parse(i),n.push.apply(n,u(i.keys));c=JSON.stringify({keys:n}),r.push("data:application/json;base64,"+e.btoa(c))}}function Ta(t,n,r,i){var a=t.keySystem;!a||"org.w3.clearkey"==a&&t.licenseServerUri||(n.size&&(n=n.get(a)||"",t.licenseServerUri=n),t.keyIds||(t.keyIds=new Set),(r=r.get(a))&&(t.distinctiveIdentifierRequired||(t.distinctiveIdentifierRequired=r.distinctiveIdentifierRequired),t.persistentStateRequired||(t.persistentStateRequired=r.persistentStateRequired),t.videoRobustness||(t.videoRobustness=r.videoRobustness),t.audioRobustness||(t.audioRobustness=r.audioRobustness),t.serverCertificate||(t.serverCertificate=r.serverCertificate),r.sessionType&&(t.sessionType=r.sessionType),t.serverCertificateUri||(t.serverCertificateUri=r.serverCertificateUri)),i[a]&&(t.keySystem=i[a]),e.cast&&e.cast.__platform__&&"com.microsoft.playready"==a&&(t.keySystem="com.chromecast.playready"))}(n=ra.prototype).destroy=function(){return this.j.destroy()},n.configure=function(e){this.h=e,this.K&&this.K.Pa(this.h.updateExpirationTime)},n.Sc=function(e){var t=this;return I((function(n){if(1==n.g)return t.s?(t.m=e,t.B.na(t.m,"play",(function(){for(var e=l(t.N),n=e.next();!n.done;n=e.next())ya(t,n.value);t.Y=!0,t.N=[]})),"webkitCurrentPlaybackTargetIsWireless"in t.m&&t.B.D(t.m,"webkitcurrentplaybacktargetiswirelesschanged",(function(){return va(t)})),t.F=t.g&&t.g.initData.find((function(e){return 0<e.initData.length}))||null,t.F||"com.apple.fps"!==t.g.keySystem||t.A.size?b(n,oa(t),2):n.u(2)):(t.B.na(e,"encrypted",(function(){t.o(new bt(2,6,6010))})),n.return());sa(t).catch((function(){})),t.F||t.A.size||t.h.parseInbandPsshEnabled||t.B.D(t.m,"encrypted",(function(e){return function(e,t){return I((function(n){if(1==n.g)return b(n,oa(e),2);la(e,t.initDataType,ye(t.initData)),k(n)}))}(t,e)})),k(n)}))},n.Te=function(){var e=this,t=this.i.keys();return t=fi(t,(function(t){var n=e.i.get(t);return{sessionId:t.sessionId,sessionType:n.type,initData:n.initData,initDataType:n.initDataType}})),Array.from(t)},n.cd=function(){for(var e=1/0,t=this.i.keys(),n=(t=l(t)).next();!n.done;n=t.next())n=n.value,isNaN(n.expiration)||(e=Math.min(e,n.expiration));return e},n.Kd=function(){return yi(this.ea)};var Aa=1,Sa=5,wa=.5,Ca=new Et((function(){return he(new Uint8Array([0]))}));function xa(e,t,n){this.h=e,this.i=t,this.g=n}function Pa(e,t){return I((function(n){if(1==n.g)return b(n,tr(e.g,t,e.h.drm.preferredKeySystems),2);if($n(t,e.h.preferredVideoCodecs,e.h.preferredAudioCodecs,e.h.preferredDecodingAttributes),!t.variants.some(vr))throw new bt(2,4,4032);return n.return(Ra(e,t))}))}function Ra(e,t){var n=er(t.variants,e.h.restrictions,e.i);if(t){var r=e.g?e.g.g:null;if(r&&e.g.s)for(var i=l(t.variants),a=i.next();!a.done;a=i.next())a=a.value,Ia(e,r.keySystem,a.video),Ia(e,r.keySystem,a.audio);Da(e,t)}return n}function Ia(e,t,n){if(n)for(var r=(n=l(n.drmInfos)).next();!r.done;r=n.next())if((r=r.value).keySystem==t)for(var i=(r=l(r.initData||[])).next();!i.done;i=r.next())i=i.value,la(e.g,i.initDataType,i.initData)}function Da(e,t){e=e.g?e.g.Kd():{};var n=Object.keys(e);n=n.length&&"00"==n[0];for(var r=!1,i=!1,a=new Set,o=new Set,s=(t=l(t.variants)).next();!s.done;s=t.next()){var u=[];(s=s.value).audio&&u.push(s.audio),s.video&&u.push(s.video);for(var c=(u=l(u)).next();!c.done;c=u.next())if((c=c.value).keyIds.size)for(var d=(c=l(c.keyIds)).next();!d.done;d=c.next()){d=d.value;var p=e[n?"00":d];p?Oa.includes(p)&&o.add(p):a.add(d)}s.allowedByApplication?s.allowedByKeySystem&&(r=!0):i=!0}if(!r)throw new bt(2,4,4012,e={hasAppRestrictions:i,missingKeys:Array.from(a),restrictedKeyStatuses:Array.from(o)})}var Oa=["output-restricted","internal-error"];function La(){}function Ma(e,t){if(t){var n=Na[t.toLowerCase()];if(n)return n}throw new bt(2,4,4e3,e,t)}F("shaka.media.ManifestParser",La),La.unregisterParserByMime=function(e){delete Na[e]},La.registerParserByMime=function(e,t){Na[e]=t},La.registerParserByExtension=function(){ae("ManifestParser.registerParserByExtension","Please use an ManifestParser with registerParserByMime function.")},La.AccessibilityPurpose={Aj:"visually impaired",Vi:"hard of hearing"};var Na={};function Ua(e,t,n,r,i){var a=Fa.value(),o=e.subarray(n.start,n.start+n.size),s=ve(o),u=new Uint8Array(n.size+a.byteLength);for(u.set(o,0),(o=ve(u)).setUint32(4,i),u.set(a,n.size),i=s.getUint32(4),o.setUint32(n.size+16,i),Ba(u,0,u.byteLength),i=new Uint8Array(e.byteLength+u.byteLength),n=xt()?n.start:n.start+n.size,a=e.subarray(n),i.set(e.subarray(0,n)),i.set(u,n),i.set(a,n+u.byteLength),r=(e=l(r)).next();!r.done;r=e.next())Ba(i,(r=r.value).start,r.size+u.byteLength);return u=ve(i,t.start),t=Ci(t),e=u.getUint32(t),u.setUint32(t,e+1),i}function Ba(e,t,n){0!=(t=(e=ve(e,t)).getUint32(0))&&(1==t?(e.setUint32(8,n>>32),e.setUint32(12,4294967295&n)):e.setUint32(0,n))}var Fa=new Et((function(){return new Uint8Array([0,0,0,80,115,105,110,102,0,0,0,12,102,114,109,97,0,0,0,0,0,0,0,20,115,99,104,109,0,0,0,0,99,101,110,99,0,1,0,0,0,0,0,40,115,99,104,105,0,0,0,32,116,101,110,99,0,0,0,0,0,0,1,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0])}));function ja(e,t,n,r,i,a,o){this.$=e,this.Aa=t,this.ja=n,this.gf=void 0===r?null:r,this.timescale=void 0===i?null:i,this.g=void 0===a?null:a,this.aesKey=void 0===o?null:o,this.mimeType=this.codecs=null}function Ha(e,t){return e===t||(e&&t?e.Yb()==t.Yb()&&e.Vb()==t.Vb()&&we(e.$().sort(),t.$().sort())&&pe(e.ed(),t.ed()):e==t)}function Va(e,t,n,r,i,a,o,s,u,c,d,p,f,h,y,g){for(c=void 0===c?[]:c,h=void 0===h?Ka:h,this.startTime=e,this.i=this.endTime=t,this.C=n,this.Aa=r,this.ja=i,this.ca=a,this.timestampOffset=o,this.appendWindowStart=s,this.appendWindowEnd=u,this.g=c,this.tilesLayout=void 0===d?"":d,this.A=void 0===p?null:p,this.h=void 0===f?null:f,this.status=h,this.preload=!1,this.l=!0,this.m=!1,this.aesKey=void 0===y?null:y,this.s=null,this.j=0,this.o=void 0!==g&&g,this.Wd=this.md=!1,t=(e=l(this.g)).next();!t.done;t=e.next())t.value.pg();this.o&&this.g.length&&this.g[this.g.length-1].og(),this.B=this.mimeType=this.codecs=null}function Ga(e,t){e.ca=t;for(var n=(e=l(e.g)).next();!n.done;n=e.next())Ga(n.value,t)}ja.prototype.Yb=function(){return this.Aa},ja.prototype.Vb=function(){return this.ja},ja.prototype.ed=function(){return this.g},F("shaka.media.InitSegmentReference",ja),ja.prototype.getEndByte=ja.prototype.Vb,ja.prototype.getStartByte=ja.prototype.Yb,(n=Va.prototype).$=function(){return this.C()},n.getStartTime=function(){return this.startTime},n.nh=function(){return this.endTime},n.Yb=function(){return this.Aa},n.Vb=function(){return this.ja},n.Eh=function(){return this.tilesLayout},n.Dh=function(){return this.A},n.Zb=function(){return this.status},n.Wh=function(){this.status=za},n.ff=function(){this.preload=!0},n.Qh=function(){return this.preload},n.Zd=function(){this.l=!1},n.Nh=function(){return this.l},n.pg=function(){this.md=!0},n.Ph=function(){return this.md},n.og=function(){this.Wd=!0},n.Oh=function(){return this.Wd},n.ng=function(){this.m=!0},n.Kh=function(){return this.m},n.Gg=function(e){this.s=e},n.Ch=function(){return this.s},n.offset=function(e){this.startTime+=e,this.endTime+=e,this.i+=e;for(var t=l(this.g),n=t.next();!n.done;n=t.next())(n=n.value).startTime+=e,n.endTime+=e,n.i+=e},n.Hf=function(e){null==this.h?W("Sync attempted without sync time!"):(e=this.h-e-this.startTime,.001<=Math.abs(e)&&this.offset(e))},n.zi=function(e){this.B=e},n.ed=function(){return this.B},F("shaka.media.SegmentReference",Va),Va.prototype.getSegmentData=Va.prototype.ed,Va.prototype.setSegmentData=Va.prototype.zi,Va.prototype.syncAgainst=Va.prototype.Hf,Va.prototype.offset=Va.prototype.offset,Va.prototype.getThumbnailSprite=Va.prototype.Ch,Va.prototype.setThumbnailSprite=Va.prototype.Gg,Va.prototype.hasByterangeOptimization=Va.prototype.Kh,Va.prototype.markAsByterangeOptimization=Va.prototype.ng,Va.prototype.isLastPartial=Va.prototype.Oh,Va.prototype.markAsLastPartial=Va.prototype.og,Va.prototype.isPartial=Va.prototype.Ph,Va.prototype.markAsPartial=Va.prototype.pg,Va.prototype.isIndependent=Va.prototype.Nh,Va.prototype.markAsNonIndependent=Va.prototype.Zd,Va.prototype.isPreload=Va.prototype.Qh,Va.prototype.markAsPreload=Va.prototype.ff,Va.prototype.markAsUnavailable=Va.prototype.Wh,Va.prototype.getStatus=Va.prototype.Zb,Va.prototype.getTileDuration=Va.prototype.Dh,Va.prototype.getTilesLayout=Va.prototype.Eh,Va.prototype.getEndByte=Va.prototype.Vb,Va.prototype.getStartByte=Va.prototype.Yb,Va.prototype.getEndTime=Va.prototype.nh,Va.prototype.getStartTime=Va.prototype.getStartTime,Va.prototype.getUris=Va.prototype.$;var Ka=0,za=1;function Wa(e){return!e||1==e.length&&1e-6>e.end(0)-e.start(0)?null:e.length?e.end(e.length-1):null}function Ya(e,t){return!(!e||!e.length||1==e.length&&1e-6>e.end(0)-e.start(0)||t>e.end(e.length-1))&&t>=e.start(0)}function Za(e,t){if(!e||!e.length||1==e.length&&1e-6>e.end(0)-e.start(0))return 0;for(var n=0,r=(e=l(qa(e))).next();!r.done;r=e.next()){var i=r.value;r=i.start,(i=i.end)>t&&(n+=i-Math.max(r,t))}return n}function qa(e){if(!e)return[];for(var t=[],n=0;n<e.length;n++)t.push({start:e.start(n),end:e.end(n)});return t}function Xa(){}function Qa(e,t){return t+10<=e.length&&73===e[t]&&68===e[t+1]&&51===e[t+2]&&255>e[t+3]&&255>e[t+4]&&128>e[t+6]&&128>e[t+7]&&128>e[t+8]&&128>e[t+9]}function $a(e,t){return t+10<=e.length&&51===e[t]&&68===e[t+1]&&73===e[t+2]&&255>e[t+3]&&255>e[t+4]&&128>e[t+6]&&128>e[t+7]&&128>e[t+8]&&128>e[t+9]}function Ja(e,t){var n=(127&e[t])<<21;return n|=(127&e[t+1])<<14,(n|=(127&e[t+2])<<7)|127&e[t+3]}function eo(e){var t={key:e.type,description:"",data:"",mimeType:null,pictureType:null};if("APIC"===e.type){if(2>e.size||3!==e.data[0])return null;var n=e.data.subarray(1).indexOf(0);if(-1===n)return null;var r=Wt(ye(e.data,1,n)),i=e.data[2+n],a=e.data.subarray(3+n).indexOf(0);if(-1===a)return null;var o,s=Wt(ye(e.data,3+n,a));return o="--\x3e"===r?Wt(ye(e.data,4+n+a)):he(e.data.subarray(4+n+a)),t.mimeType=r,t.pictureType=i,t.description=s,t.data=o,t}return"TXXX"===e.type||"WXXX"===e.type?2>e.size||3!==e.data[0]||-1===(r=e.data.subarray(1).indexOf(0))?null:(n=Wt(ye(e.data,1,r)),e=Wt(ye(e.data,2+r)).replace(/\0*$/,""),t.description=n,t.data=e,t):"PRIV"===e.type?2>e.size||-1===(n=e.data.indexOf(0))?null:(n=Wt(ye(e.data,0,n)),t.description=n,"com.apple.streaming.transportStreamTimestamp"==n?(n=e.data.subarray(n.length+1),e=1&n[3],n=(n[4]<<23)+(n[5]<<15)+(n[6]<<7)+n[7],n/=45,e&&(n+=47721858.84),t.data=n):(e=he(e.data.subarray(n.length+1)),t.data=e),t):"T"===e.type[0]?2>e.size||3!==e.data[0]?null:(e=Wt(e.data.subarray(1)).replace(/\0*$/,""),t.data=e,t):"W"===e.type[0]?(e=Wt(e.data).replace(/\0*$/,""),t.data=e,t):e.data?(t.data=he(e.data),t):null}function to(e){for(var t=0,n=[];Qa(e,t);){var r=Ja(e,t+6);for(e[t+5]>>6&1&&(t+=10),r=(t+=10)+r;t+10<r;){var i=e.subarray(t),a=Ja(i,4);(a=eo(i={type:String.fromCharCode(i[0],i[1],i[2],i[3]),size:a,data:i.subarray(10,10+a)}))&&n.push(a),t+=i.size+10}$a(e,t)&&(t+=10)}return n}function no(e,t){for(var n=t=void 0===t?0:t,r=0;Qa(e,t);)e[t+5]>>6&1&&(r+=10),r+=10,r+=Ja(e,t+6),$a(e,t+10)&&(r+=10),t+=r;return 0<r?e.subarray(n,n+r):new Uint8Array([])}function ro(e,t){var n=null,r=null,i=null,a=e.M();return 1&t&&(i=e.zc()),2&t&&e.skip(4),8&t&&(n=e.M()),16&t&&(r=e.M()),{trackId:a,Yf:n,hh:r,Cj:i}}function io(e,t){return 1==t?(t=e.M(),e=e.M(),{baseMediaDecodeTime:t*Math.pow(2,32)+e}):{baseMediaDecodeTime:e.M()}}function ao(e,t){return 1==t?(e.skip(8),e.skip(8)):(e.skip(4),e.skip(4)),t=e.M(),e.skip(4),e=e.ra(),{timescale:t,language:String.fromCharCode(96+(e>>10))+String.fromCharCode(96+((960&e)>>5))+String.fromCharCode(96+(31&e))}}function oo(e,t,n){var r=e.M(),i=[],a=null;1&n&&(a=e.M()),4&n&&e.skip(4);for(var o=0;o<r;o++){var s={yf:null,sampleSize:null,ie:null};256&n&&(s.yf=e.M()),512&n&&(s.sampleSize=e.M()),1024&n&&e.skip(4),2048&n&&(s.ie=0==t?e.M():e.tg()),i.push(s)}return{Gj:r,xg:i,gh:a}}function so(e,t){1==t?(e.skip(8),e.skip(8)):(e.skip(4),e.skip(4));var n=e.M();return 1==t?e.skip(8):e.skip(4),e.skip(4),e.skip(8),e.skip(2),e.skip(2),e.skip(2),e.skip(2),e.skip(36),{trackId:n,width:t=e.ra()+e.ra()/16,height:e=e.ra()+e.ra()/16}}function lo(e){return{Ea:wi(e=e.M())}}function uo(e,t){return t=void 0!==t&&t,e=e.toString(16).toUpperCase(),t?e:("0"+e).slice(-2)}function co(e){return(10>e?"0":"")+e}function po(e,t){if(this.j=e,void 0!==t&&t){t=new Uint8Array(e.byteLength);for(var n=0,r=0;r<e.byteLength;r++)2<=r&&3==e[r]&&0==e[r-1]&&0==e[r-2]||(t[n]=e[r],n++);this.j=ye(t,0,n)}this.i=this.j.byteLength,this.g=this.h=0}function fo(e){var t=e.j.byteLength-e.i,n=new Uint8Array(4),r=Math.min(4,e.i);0!==r&&(n.set(e.j.subarray(t,t+r)),e.h=new gi(n,0).M(),e.g=8*r,e.i-=r)}function ho(e,t){if(e.g<=t){t-=e.g;var n=Math.floor(t/8);t-=8*n,e.g-=n,fo(e)}e.h<<=t,e.g-=t}function yo(e,t){var n=Math.min(e.g,t),r=e.h>>>32-n;return e.g-=n,0<e.g?e.h<<=n:0<e.i&&fo(e),0<(n=t-n)?r<<n|yo(e,n):r}function go(e){var t;for(t=0;t<e.g;++t)if(0!=(e.h&2147483648>>>t))return e.h<<=t,e.g-=t,t;return fo(e),t+go(e)}function vo(e){ho(e,1+go(e))}function mo(e){return yo(e,go(e)+1)-1}function bo(e){return 1&(e=mo(e))?1+e>>>1:-1*(e>>>1)}function ko(e){return 1===yo(e,1)}function Eo(e){return yo(e,8)}function _o(e,t){for(var n=8,r=8,i=0;i<t;i++)0!==r&&(r=(n+(r=bo(e))+256)%256),n=0===r?n:r}function To(e){return Eo(e),mo(e),mo(e)}function Ao(){this.G=null,this.H=!1,this.m=this.I=null,this.j=[],this.g=[],this.A=this.B=null,this.i=[],this.h=[],this.C=null,this.l=[],this.F=this.o=this.s=null}function So(e,t){if(1!=(t[0]<<16|t[1]<<8|t[2]))return null;var n={data:new Uint8Array(0),packetLength:t[4]<<8|t[5],pts:null,dts:null,nalus:[]};if(n.packetLength&&n.packetLength>t.byteLength-6)return null;var r=t[7];if(192&r){var i=536870912*(14&t[9])+4194304*(255&t[10])+16384*(254&t[11])+128*(255&t[12])+(254&t[13])/2;null==e.s&&(e.s=i),n.pts=wo(i,e.s),e.s=n.pts,n.dts=n.pts,64&r&&(r=536870912*(14&t[14])+4194304*(255&t[15])+16384*(254&t[16])+128*(255&t[17])+(254&t[18])/2,null==e.o&&(e.o=r),n.dts=wo(r,e.o)),e.o=n.dts}return e=t[8]+9,t.byteLength<=e?null:(n.data=t.subarray(e),n)}function wo(e,t){var n=1;for(e>t&&(n=-1);4294967296<Math.abs(t-e);)e+=8589934592*n;return e}function Co(e){return!(0>xo(e))}function xo(e){for(var t=Math.min(1e3,e.length-564),n=0;n<t;){if(71==e[n]&&71==e[n+188]&&71==e[n+376])return n;n++}return-1}Va.Status={Ii:Ka,yj:za,aj:2},F("shaka.util.Id3Utils",Xa),Xa.getID3Data=no,Xa.getID3Frames=to,F("shaka.util.ExpGolomb",po),(n=Ao.prototype).clearData=function(){this.j=[],this.g=[],this.i=[],this.h=[],this.l=[]},n.parse=function(e){if(564>e.length)return this;for(var t=Math.max(0,xo(e)),n=e.length-(e.length+t)%188,r=!1,i=t;i<n;i+=188)if(71==e[i]){var a=!!(64&e[i+1]),o=((31&e[i+1])<<8)+e[i+2];if(1<(48&e[i+3])>>4){var s=i+5+e[i+4];if(s==i+188)continue}else s=i+4;switch(o){case 0:a&&(s+=e[s]+1),this.G=(31&e[s+10])<<8|e[s+11];break;case 17:case 8191:break;case this.G:a&&(s+=e[s]+1),o={audio:-1,video:-1,Sd:-1,audioCodec:"",videoCodec:""};var l=s+3+((15&(a=e)[s+1])<<8|a[s+2])-4;for(s+=12+((15&a[s+10])<<8|a[s+11]);s<l;){var u=(31&a[s+1])<<8|a[s+2],c=(15&a[s+3])<<8|a[s+4];switch(a[s]){case 6:if(0<c)for(var d=s+5,p=c;2<p;){var f=a[d+1]+2;switch(a[d]){case 5:var h=Qt(a.subarray(d+2,d+f));-1==o.audio&&"Opus"===h?(o.audio=u,o.audioCodec="opus"):-1==o.video&&"AV01"===h&&(o.video=u,o.videoCodec="av1");break;case 106:-1==o.audio&&(o.audio=u,o.audioCodec="ac3");break;case 122:-1==o.audio&&(o.audio=u,o.audioCodec="ec3");break;case 124:-1==o.audio&&(o.audio=u,o.audioCodec="aac");break;case 127:"opus"==o.audioCodec&&(h=null,128===a[d+2]&&(h=a[d+3]),null!=h&&(this.F={channelCount:0==(15&h)?2:15&h,ah:h,sampleRate:48e3}))}d+=f,p-=f}break;case 15:-1==o.audio&&(o.audio=u,o.audioCodec="aac");break;case 17:-1==o.audio&&(o.audio=u,o.audioCodec="aac-loas");break;case 21:-1==o.Sd&&(o.Sd=u);break;case 27:-1==o.video&&(o.video=u,o.videoCodec="avc");break;case 3:case 4:-1==o.audio&&(o.audio=u,o.audioCodec="mp3");break;case 36:-1==o.video&&(o.video=u,o.videoCodec="hvc");break;case 129:-1==o.audio&&(o.audio=u,o.audioCodec="ac3");break;case 132:case 135:-1==o.audio&&(o.audio=u,o.audioCodec="ec3")}s+=c+5}-1!=(a=o).video&&(this.I=a.video,this.m=a.videoCodec),-1!=a.audio&&(this.B=a.audio,this.A=a.audioCodec),-1!=a.Sd&&(this.C=a.Sd),r&&!this.H&&(r=!1,i=t-188),this.H=!0;break;case this.I:s=e.subarray(s,i+188),a?this.j.push([s]):this.j.length&&this.j[this.j.length-1]&&this.j[this.j.length-1].push(s);break;case this.B:s=e.subarray(s,i+188),a?this.i.push([s]):this.i.length&&this.i[this.i.length-1]&&this.i[this.i.length-1].push(s);break;case this.C:s=e.subarray(s,i+188),a?this.l.push([s]):this.l.length&&this.l[this.l.length-1]&&this.l[this.l.length-1].push(s);break;default:r=!0}}return this},n.bi=function(e){return ae("TsParser.parseAvcNalus","Please use parseNalus function instead."),this.qf(e)},n.qf=function(e,t,n){var r=e.pts?e.pts/9e4:null,i=(e=e.data).byteLength,a=1;"hvc"==this.m&&(a=2);for(var o,s=n||0,l=[],u=-1,c=0,d=0;d<i;++d){var p=e[d];if(p){if(2<=s&&1==p){if(t&&!l.length&&-1==u&&(p=d-(3<s?3:s),n&&0!=p&&(p=e.subarray(0,p),t.data=sn(t.data,p),t.fullData=sn(t.fullData,p))),0<=u?(s=d-((3<s?3:s)+1),l.push({data:e.subarray(u+a,s+1),fullData:e.subarray(u,s+1),type:c,time:r})):t&&!l.length&&(0<(u=d-s)&&(u=e.subarray(0,u),t.data=sn(t.data,u),t.fullData=sn(t.fullData,u))),d>=i-a)return l;u=++d,c="hvc"==this.m?e[d]>>1&63:31&e[d]}s=0}else s++;d>=i-1&&0<=u&&0<=s&&(o={data:e.subarray(u+a,i),fullData:e.subarray(u,i),type:c,time:r})}return o&&l.push(o),!l.length&&t&&(t.data=sn(t.data,e),t.fullData=sn(t.fullData,e)),l},n.getMetadata=function(){for(var e=[],t=l(this.l),n=t.next();!n.done;n=t.next())(n=So(this,n=sn.apply(en,u(n.value))))&&e.push({cueTime:n.pts?n.pts/9e4:null,data:n.data,frames:to(n.data),dts:n.dts,pts:n.pts});return e},n.Gb=function(){if(this.i.length&&!this.h.length){for(var e=!1,t=l(this.i),n=t.next();!n.done;n=t.next()){var r=sn.apply(en,u(n.value)),i=So(this,r);n=this.h.length?this.h[this.h.length-1]:null,i&&null!=i.pts&&null!=i.dts&&(!n||n.pts!=i.pts&&n.dts!=i.dts)?(this.h.length&&i.dts<(n.dts||0)&&(e=!0),this.h.push(i)):this.h.length&&(r=i?i.data:r)&&((n=this.h.pop()).data=sn(n.data,r),this.h.push(n))}e&&(this.h=this.h.sort((function(e,t){var n=(e.pts||0)-(t.pts||0);return(e.dts||0)-(t.dts||0)||n})))}return this.h},n.uc=function(e){if(e=void 0===e||e,this.j.length&&!this.g.length){for(var t=!1,n=l(this.j),r=n.next();!r.done;r=n.next()){var i=sn.apply(en,u(r.value)),a=So(this,i);r=this.g.length?this.g[this.g.length-1]:null,a&&null!=a.pts&&null!=a.dts&&(!r||r.pts!=a.pts&&r.dts!=a.dts)?(this.g.length&&a.dts<(r.dts||0)&&(t=!0),this.g.push(a)):this.g.length&&(i=a?a.data:i)&&((r=this.g.pop()).data=sn(r.data,i),this.g.push(r))}if(e){var o;for(r=(n=l(this.g)).next();!r.done;r=n.next())(r=r.value).nalus=this.qf(r,o,void 0),r.nalus.length&&(o=r.nalus[r.nalus.length-1]);this.g=this.g.filter((function(e){return e.nalus.length}))}t&&(this.g=this.g.sort((function(e,t){var n=(e.pts||0)-(t.pts||0);return(e.dts||0)-(t.dts||0)||n})))}return e?this.g:(e=this.g,this.g=[],e)},n.getStartTime=function(e){if("audio"==e){e=null;var t=this.Gb();return t.length&&(e=t[0],e=Math.min(e.dts,e.pts)/9e4),e}return"video"==e?(e=null,(t=this.uc(!1)).length&&(e=t[0],e=Math.min(e.dts,e.pts)/9e4),e):null},n.bd=function(){return{audio:this.A,video:this.m}},n.Od=function(){for(var e=[],t=l(this.uc()),n=t.next();!n.done;n=t.next())e.push.apply(e,u(n.value.nalus));return e},n.Hh=function(){ae("TsParser.getVideoResolution","Please use getVideoInfo function instead.");var e=this.Xe();return{height:e.height,width:e.width}},n.Xe=function(){return"hvc"==this.m?function(e){var t={height:null,width:null,Ea:null};if(!(e=e.Od()).length)return t;if(!(e=e.find((function(e){return 33==e.type}))))return t;var n=new po(e.fullData,!0);Eo(n),Eo(n),yo(n,4);var r=yo(n,3);ko(n);var i=yo(n,2),a=yo(n,1),o=yo(n,5),s=yo(n,32);e=Eo(n);for(var l=Eo(n),u=Eo(n),c=Eo(n),d=Eo(n),p=Eo(n),f=Eo(n),h=[],y=[],g=0;g<r;g++)h.push(ko(n)),y.push(ko(n));if(0<r)for(g=r;8>g;g++)yo(n,2);for(g=0;g<r;g++)h[g]&&yo(n,88),y[g]&&Eo(n);mo(n),3==(r=mo(n))&&yo(n,1),h=mo(n),y=mo(n);var v=g=0,m=0,b=0;return ko(n)&&(g+=mo(n),v+=mo(n),m+=mo(n),b+=mo(n)),t.width=String(h-(g+v)*(1===r||2===r?2:1)),t.height=String(y-(m+b)*(1===r?2:1)),n=function(e){for(var t=0,n=0;32>n;n++)t|=(e>>n&1)<<31-n;return t>>>0}(s),a=1==a?"H":"L",i="hvc1."+["","A","B","C"][i]+o,i+="."+n.toString(16).toUpperCase(),i+="."+a+f,p&&(i+="."+p.toString(16).toUpperCase()),d&&(i+="."+d.toString(16).toUpperCase()),c&&(i+="."+c.toString(16).toUpperCase()),u&&(i+="."+u.toString(16).toUpperCase()),l&&(i+="."+l.toString(16).toUpperCase()),e&&(i+="."+e.toString(16).toUpperCase()),t.Ea=i,t}(this):function(e){var t={height:null,width:null,Ea:null};if(!(e=e.Od()).length)return t;if(!(e=e.find((function(e){return 7==e.type}))))return t;var n=Eo(e=new po(e.data)),r=Eo(e),i=Eo(e);if(vo(e),Po.includes(n)){var a=mo(e);if(3===a&&ho(e,1),vo(e),vo(e),ho(e,1),ko(e)){a=3!==a?8:12;for(var o=0;o<a;o++)ko(e)&&_o(e,6>o?16:64)}}if(vo(e),0===(a=mo(e)))mo(e);else if(1===a)for(ho(e,1),vo(e),vo(e),a=mo(e),o=0;o<a;o++)vo(e);vo(e),ho(e,1),a=mo(e),o=mo(e);var s=yo(e,1);0===s&&ho(e,1),ho(e,1);var l=0,u=0,c=0,d=0;return ko(e)&&(l=mo(e),u=mo(e),c=mo(e),d=mo(e)),t.height=String((2-s)*(o+1)*16-2*c-2*d),t.width=String(16*(a+1)-2*l-2*u),t.Ea="avc1."+("0"+n.toString(16).toUpperCase()).slice(-2)+("0"+r.toString(16).toUpperCase()).slice(-2)+("0"+i.toString(16).toUpperCase()).slice(-2),t}(this)},F("shaka.util.TsParser",Ao),Ao.syncOffset=xo,Ao.probe=Co,Ao.prototype.getVideoInfo=Ao.prototype.Xe,Ao.prototype.getVideoResolution=Ao.prototype.Hh,Ao.prototype.getVideoNalus=Ao.prototype.Od,Ao.prototype.getCodecs=Ao.prototype.bd,Ao.prototype.getStartTime=Ao.prototype.getStartTime,Ao.prototype.getVideoData=Ao.prototype.uc,Ao.prototype.getAudioData=Ao.prototype.Gb,Ao.prototype.getMetadata=Ao.prototype.getMetadata,Ao.prototype.parseNalus=Ao.prototype.qf,Ao.prototype.parseAvcNalus=Ao.prototype.bi,Ao.prototype.parse=Ao.prototype.parse,Ao.prototype.clearData=Ao.prototype.clearData,Ao.Timescale=9e4;var Po=[100,110,122,244,44,83,86,118,128,138,139,134];function Ro(e,t,n){this.g=null,this.o=-1,this.l=e,this.i=t,this.m=n,this.j=!1;e:{if("undefined"==typeof libDPIModule&&Y("Could not find LCEVC Library dependencies on this page"),"undefined"!=typeof LCEVCdec)this.h=LCEVCdec;else{if("undefined"==typeof LcevcDil){Y("Could not find LCEVC Library on this page"),e=!1;break e}this.h=LcevcDil,this.j=!0,ae("LcevcDil","lcevc_dil.js is deprecated, please use lcevc_dec.js instead")}void 0===this.h.SupportObject?(Y("Could not find LCEVC Library on this page"),e=!1):(this.h.SupportObject.SupportStatus||Y(this.h.SupportObject.SupportError),e=void 0!==this.h&&"undefined"!=typeof libDPIModule&&this.i instanceof HTMLCanvasElement&&this.h.SupportObject.SupportStatus)}e&&!this.g&&this.h.SupportObject.webGLSupport(this.i)&&(this.i.classList.remove("shaka-hidden"),this.g=this.j?new this.h.LcevcDil(this.l,this.i,this.m):new this.h.LCEVCdec(this.l,this.i,this.m))}function Io(e){e.g&&e.i.classList.add("shaka-hidden")}function Do(e,t,n){var r=Oo,i=Bo;switch(t.mimeType){case"video/webm":r=Lo;break;case"video/mp4":r=Mo}switch(n){case"DASH":i=Uo;break;case"HLS":i=No}e.g&&(e.o=t.id,e.g.setLevelSwitching(t.id,!0),e.g.setContainerFormat(r),e.j||e.g.setStreamingFormat(i))}Ro.prototype.release=function(){this.g&&(this.g.close(),this.g=null)},F("shaka.lcevc.Dec",Ro),Ro.prototype.release=Ro.prototype.release;var Oo=0,Lo=1,Mo=2,No=0,Uo=1,Bo=-1;function Fo(e,t,n,r){var i=this;this.i=e,this.A=null,this.F=t,this.h={},this.G={},this.qa={},this.g=null,this.ba=!1,this.ta=n||function(){},this.T=r||null,this.j={},this.o=new $,this.m={},this.H=null,this.L=new Vr,this.N="",this.da=!1,this.l=jo(this,this.L),this.C=!1,this.I=new di((function(){return function(e){var t,n,r,i,a,o,s;return I((function(u){if(1==u.g){for(n in t=[],e.j)for(r=e.j[n],i=r[0],e.j[n]=r.slice(0,1),i&&t.push(i.p.catch(Un)),a=l(r.slice(1)),o=a.next();!o.done;o=a.next())o.value.p.reject(new bt(2,7,7003,void 0));for(s in e.g&&t.push(e.g.destroy()),e.F&&t.push(e.F.destroy()),e.m)t.push(e.m[s].destroy());return b(u,Promise.all(t),2)}e.o&&(e.o.release(),e.o=null),e.i&&(e.i.removeAttribute("src"),e.i.load(),e.i=null),e.A=null,e.l=null,e.g=null,e.F=null,e.h={},e.m={},e.H=null,e.j={},e.T=null,e.K=null,k(u)}))}(i)})),this.B=!1,this.aa="UNKNOWN",this.pa=this.sa=!1,this.ia=new Vr,this.s=!1,this.ea=!0,this.K=this.Y=null}function jo(t,n){if(e.ManagedMediaSource){t.i.disableRemotePlayback=!0;var r=new ManagedMediaSource;return t.o.D(r,"startstreaming",(function(){t.ea=!0})),t.o.D(r,"endstreaming",(function(){t.ea=!1})),t.o.na(r,"sourceopen",(function(){URL.revokeObjectURL(t.N),n.resolve()})),t.o.na(t.i,"playing",(function(){t.da=!0})),t.N=as(r),t.i.src=t.N,r}return r=new MediaSource,t.o.na(r,"sourceopen",(function(){URL.revokeObjectURL(t.N),n.resolve()})),t.o.na(t.i,"playing",(function(){t.da=!0})),t.N=as(r),t.i.src=t.N,r}function Ho(e,t,n,r){var i,a,o,s,u,c,d,p,f,h,y,g;return I((function(v){switch(v.g){case 1:return i=yn,a=j,o=H,b(v,function(e,t){var n,r,i,a,o,s,u,c,d,p;return I((function(f){if(1==f.g)return e.createSegmentIndex?b(f,e.createSegmentIndex(),2):f.u(2);if(!e.segmentIndex)return f.return(!1);if(0==e.segmentIndex.getNumReferences())return f.return(!0);for(n=yn,r=new Set,i=l(e.segmentIndex),a=i.next();!a.done;a=i.next())if(o=a.value,s=o.mimeType||e.mimeType||"",u=o.codecs||e.codecs||"",c=s+":"+u,!r.has(c))if(r.add(c),t==n.ma){if(!Dn(mn(s,u)))return f.return(!1)}else if(t==n.fa?u=ur(u):t==n.S&&(u=lr(u,s)),d=En(e,s,u),p=bn(s,u),!te(d)&&!Xe(p))return f.return(!1);return f.return(!0)}))}(n,t),2);case 2:if(o.call(a,v.h,"Type negotiation should happen before MediaSourceEngine.init!"),s=mn(n.mimeType,r),t==i.ma){Vo(e,s,e.B,n.external),v.u(0);break}if(u=e.A.forceTransmux,(!te(s)||!e.B&&Rn.includes(s))&&(u=!0),c=bn(n.mimeType,r),!u){v.u(4);break}if(d=pn(i.S,(r||"").split(",")),p=pn(i.fa,(r||"").split(",")),!d||!p){v.u(5);break}return e.s=!0,b(v,Ho(e,i.S,n,d),6);case 6:return b(v,Ho(e,i.fa,n,p),7);case 7:return v.return();case 5:(f=Xe(c))&&(h=f(),e.m[t]=h,s=h.convertCodecs(t,c));case 4:y=s+e.A.addExtraFeaturesToSourceBuffer(s),pi(e.I);try{g=e.l.addSourceBuffer(y)}catch(t){throw new bt(2,3,3015,t,"The mediaSource_ status was "+e.l.readyState+" expected 'open'")}e.B&&(g.mode=os),e.o.D(g,"error",(function(){e.j[t][0].p.reject(new bt(2,3,3014,e.i.error?e.i.error.code:0))})),e.o.D(g,"updateend",(function(){return Jo(e,t)})),e.h[t]=g,e.G[t]=s,e.qa[t]=!!n.drmInfos.length,k(v)}}))}function Vo(e,t,n,r){e.g||(e.g=new In(e.F),e.g&&(e.g.A=e.A.modifyCueCallback));var i=e.g;r=r||e.ba,e=e.aa,"application/cea-608"==t||"application/cea-708"==t?i.i=null:(i.i=(0,Mn[t])(),i.i.setSequenceMode?i.i.setSequenceMode(n):ae("Text parsers w/ setSequenceMode",'Text parsers should have a "setSequenceMode" method!'),i.i.setManifestType?i.i.setManifestType(e):ae("Text parsers w/ setManifestType",'Text parsers should have a "setManifestType" method!'),i.B=r)}function Go(e){return!e.C&&(!e.l||"ended"==e.l.readyState)}function Ko(e,t){return e.C||!Object.keys(e.h).length?e=null:t==hn?e=e.g.g:e=!(e=Wo(e,t))||1==e.length&&1e-6>e.end(0)-e.start(0)?null:1==e.length&&0>e.start(0)?0:e.length?e.start(0):null,e}function zo(e,t){return e.C?null:t==hn?e.g.h:Wa(Wo(e,t))}function Wo(e,t){try{return e.h[t].buffered}catch(e){return null}}function Yo(e,t,n,r,i,a,o,s,u,c){var d,p,f,h,y,g,v,m,E,_;return o=void 0!==o&&o,s=void 0!==s&&s,u=void 0!==u&&u,c=void 0!==c&&c,I((function(T){switch(T.g){case 1:if(t!=(d=yn).ma){T.u(2);break}if(!e.B){T.u(3);break}return b(T,e.ia,4);case 4:p=T.h,e.g.s=p;case 3:return b(T,function(e,t,n,r,i){var a,o,s,u,c,d,p;return I((function(f){if(1==f.g)return b(f,Promise.resolve(),2);if(!e.i||!e.j)return f.return();if(null==n||null==r)return e.i.parseInit(ye(t)),f.return();for(a=e.B?n:e.s,o={periodStart:e.s,segmentStart:n,segmentEnd:r,vttOffset:a},s=e.i.parseMedia(ye(t),o,i),u=l(s),c=u.next();!c.done;c=u.next())d=c.value,e.A(d,i||null,o);p=s.filter((function(t){return t.startTime>=e.l&&t.startTime<e.m})),e.j.append(p),null==e.g&&(e.g=Math.max(n,e.l)),e.h=Math.min(r,e.m),k(f)}))}(e.g,n,r?r.startTime:null,r?r.endTime:null,r?r.$()[0]:null),5);case 5:return T.return();case 2:if(c||!e.s){T.u(6);break}return b(T,Yo(e,d.S,n,r,i,a,o,s,u,!0),7);case 7:return b(T,Yo(e,d.fa,n,r,i,a,o,s,u,!0),8);case 8:return T.return();case 6:if(!e.h[t])return T.return();if(f=e.h[t].timestampOffset,h=e.G[t],e.m[t]&&(h=e.m[t].getOriginalMimeType()),r&&(y=function(e,t,n,r,i,a){var o=null,s=ye(n);if(Rn.includes(i))(a=to(s)).length&&r&&((t=a.find((function(e){return"com.apple.streaming.transportStreamTimestamp"===e.description})))&&t.data&&(o=Math.round(t.data)/1e3),e.ta([{cueTime:r.startTime,data:s,frames:a,dts:r.startTime,pts:r.startTime}],0,r.endTime));else if(i.includes("/mp4")&&r&&0==r.timestampOffset&&r.ca&&r.ca.timescale){var l=r.ca.timescale;if(!isNaN(l)){var u=0,c=!1;(new bi).box("moof",ki).box("traf",ki).O("tfdt",(function(e){u=io(e.reader,e.version).baseMediaDecodeTime/l,c=!0,e.parser.stop()})).parse(n,!0),c&&(o=u)}}else i.includes("/mp4")||i.includes("/webm")||!Co(s)||(e.K?e.K.clearData():e.K=new Ao,null!=(t=(s=e.K.parse(s)).getStartTime(t))&&(o=t),(s=s.getMetadata()).length&&e.ta(s,a,r?r.endTime:null));return o}(e,t,n,r,h,f),null!=y&&(g=r.startTime-y,(.001<=Math.abs(f-g)||o||s)&&(!u||0<g||!f)&&(f=g,e.pa&&(es(e,t,(function(){return Qo(e,t)})),es(e,t,(function(){return $o(e,t,f)})))),v=t==d.fa||!(d.fa in e.h),e.B&&v&&e.ia.resolve(f))),a&&t==d.fa&&(e.g||Vo(e,"application/cea-608",e.B,!1),e.H||(m=h.split(";",1)[0],e.H=new ke(m)),r?(E=e.H.i(n)).length&&function(e,t,n,r,i){for(var a=n+" "+r,o=new Map,s=(t=l(t)).next();!s.done;s=t.next()){var u=s.value;s=u.stream,u=u.cue,o.has(s)||o.set(s,new Map),o.get(s).has(a)||o.get(s).set(a,[]),Ln(e,u,i),u.startTime>=e.l&&u.startTime<e.m&&(o.get(s).get(a).push(u),s==e.C&&e.j.append([u]))}for(a=(i=l(o.keys())).next();!a.done;a=i.next())for(a=a.value,e.o.has(a)||e.o.set(a,new Map),s=(t=l(o.get(a).keys())).next();!s.done;s=t.next())s=s.value,u=o.get(a).get(s),e.o.get(a).set(s,u);e.g=null==e.g?Math.max(n,e.l):Math.min(e.g,Math.max(n,e.l)),e.h=Math.max(e.h,Math.min(r,e.m))}(e.g,E,r.startTime,r.endTime,f):e.H.init(n,s)),!e.m[t]){T.u(9);break}return b(T,e.m[t].transmux(n,i,r,e.l.duration,t),10);case 10:n=T.h;case 9:return n=function(e,t,n,r){var i=e.qa[r];return e.A.insertFakeEncryptionInInit&&null==n&&i&&(Pt()||xt()||Ht("SOPOpenBrowser"))&&"mp4"==_n(e.G[r])&&(t=function(e){function t(){i=!0}function n(e){a.push(e),ki(e)}e=ye(e);var r,i=!1,a=[],o=[];if((new bi).box("moov",n).box("trak",n).box("mdia",n).box("minf",n).box("stbl",n).O("stsd",(function(e){r=e,a.push(e),Ei(e)})).O("encv",t).O("enca",t).O("dvav",(function(e){o.push({box:e,Za:1701733238})})).O("dva1",(function(e){o.push({box:e,Za:1701733238})})).O("dvh1",(function(e){o.push({box:e,Za:1701733238})})).O("dvhe",(function(e){o.push({box:e,Za:1701733238})})).O("hev1",(function(e){o.push({box:e,Za:1701733238})})).O("hvc1",(function(e){o.push({box:e,Za:1701733238})})).O("avc1",(function(e){o.push({box:e,Za:1701733238})})).O("avc3",(function(e){o.push({box:e,Za:1701733238})})).O("ac-3",(function(e){o.push({box:e,Za:1701733217})})).O("ec-3",(function(e){o.push({box:e,Za:1701733217})})).O("ac-4",(function(e){o.push({box:e,Za:1701733217})})).O("mp4a",(function(e){o.push({box:e,Za:1701733217})})).parse(e),i)return e;if(0==o.length||!r)throw on(e),new bt(2,3,3019);o.reverse();for(var s=l(o),u=s.next();!u.done;u=s.next())u=u.value,e=Ua(e,r,u.box,a,u.Za);return e}(t)),t}(e,n,r?r.startTime:null,t),r&&e.B&&t!=d.ma&&(o||s)&&(_=r.startTime,es(e,t,(function(){return Qo(e,t)})),es(e,t,(function(){return $o(e,t,_)}))),b(T,es(e,t,(function(){var r=n;if("video"==t&&e.T){var i=e.T;i.g&&i.g.appendBuffer(r,"video",i.o,-f)}e.h[t].appendBuffer(r)})),11);case 11:k(T)}}))}function Zo(e,t){var n;return I((function(r){return 1==r.g?t==(n=yn).ma?e.g?b(r,e.g.remove(0,1/0),0):r.return():b(r,es(e,t,(function(){return Xo(e,t,0,e.l.duration)})),4):e.s?b(r,es(e,n.S,(function(){return Xo(e,n.S,0,e.l.duration)})),0):r.u(0)}))}function qo(e,t,n,r,i,a,o,s,l){var u,c;return I((function(d){return 1==d.g?t==(u=yn).ma?(a||(e.g.s=n),function(e,t,n){e.l=t,e.m=n}(e.g,r,i),d.return()):(c=[],b(d,function(e,t,n,r,i){var a,o,s,l,u,c,d,p,f,h,y,g,v,m,k;return I((function(E){return 1==E.g?t==(a=yn).ma?E.return(!1):(o=An(wn(e.G[t])),s=Sn(e.G[t]),u=!1,c=mn(n,r),d=e.A.forceTransmux,(!te(c)||!e.B&&Rn.includes(c))&&(d=!0),d&&(p=bn(n,r),f=Xe(p))&&(l=f(),h=pn(a.S,(r||"").split(",")),y=pn(a.fa,(r||"").split(",")),h&&y?(u=!0,g=y,t==a.S&&(g=h),c=l.convertCodecs(t,bn(n,g))):c=l.convertCodecs(t,p)),v=An(wn(c)),m=Sn(c),o===v&&s===m?E.return(!1):(k=!0,(e.s||u&&l&&!e.m[t])&&(k=!1),k&&"smooth"===e.A.codecSwitchingStrategy&&ne()?b(E,function(e,t,n,r){return es(e,t,(function(){t!==hn&&(ne()&&(e.m[t]&&(e.m[t].destroy(),delete e.m[t]),r&&(e.m[t]=r),e.h[t].changeType(n+e.A.addExtraFeaturesToSourceBuffer(n)),e.G[t]=n),Jo(e,t))}))}(e,t,c,l),3):(l&&l.destroy(),b(E,is(e,i),3)))):E.return(!0)}))}(e,t,o,s,l),2)):(d.h||(c.push(es(e,t,(function(){return Qo(e,t)}))),e.s&&c.push(es(e,u.S,(function(){return Qo(e,u.S)})))),a||(c.push(es(e,t,(function(){return $o(e,t,n)}))),e.s&&c.push(es(e,u.S,(function(){return $o(e,u.S,n)})))),c.push(es(e,t,(function(){e.h[t].appendWindowStart=0,e.h[t].appendWindowEnd=i,e.h[t].appendWindowStart=r,Jo(e,t)}))),e.s&&c.push(es(e,u.S,(function(){var t=u.S;e.h[t].appendWindowStart=0,e.h[t].appendWindowEnd=i,e.h[t].appendWindowStart=r,Jo(e,t)}))),b(d,Promise.all(c),0))}))}function Xo(e,t,n,r){r<=n?Jo(e,t):e.h[t].remove(n,r)}function Qo(e,t){var n=e.h[t].appendWindowStart,r=e.h[t].appendWindowEnd;e.h[t].abort(),e.h[t].appendWindowStart=n,e.h[t].appendWindowEnd=r,Jo(e,t)}function $o(e,t,n){0>n&&(n+=.001),e.h[t].timestampOffset=n,Jo(e,t)}function Jo(e,t){if(!e.C){var n=e.j[t][0];n&&(n.p.resolve(),ns(e,t))}}function es(e,t,n){return pi(e.I),n={start:n,p:new Vr},e.j[t].push(n),1==e.j[t].length&&rs(e,t),n.p}function ts(e,t){var n,r,i,a,o;return I((function(s){switch(s.g){case 1:for(i in pi(e.I),n=[],r={},e.h)r.Jc=new Vr,a={start:function(e){return function(){return e.Jc.resolve()}}(r),p:r.Jc},e.j[i].push(a),n.push(r.Jc),1==e.j[i].length&&a.start(),r={Jc:r.Jc};return E(s,2),b(s,Promise.all(n),4);case 4:T(s,3);break;case 2:throw A(s);case 3:return E(s,5,6),b(s,t(),6);case 6:for(o in S(s),e.h)ns(e,o);w(s,0);break;case 5:throw new bt(2,3,3015,A(s),e.i.error||"No error in the media element")}}))}function ns(e,t){e.j[t].shift(),rs(e,t)}function rs(e,t){var n=e.j[t][0];if(n)try{n.start()}catch(r){"QuotaExceededError"==r.name?n.p.reject(new bt(2,3,3017,t)):n.p.reject(new bt(2,3,3015,r,e.i.error||"No error in the media element")),ns(e,t)}}function is(e,t){return ts(e,(function(){return function(e,t){var n,r,i,a,o,s,u,c,d,p,f,h,y,g,v,m,k,E,T,A,C,x,P;return I((function(R){switch(R.g){case 1:for(s in n=yn,e.C=!0,e.s=!1,r=e.i.currentTime,i=e.i.autoplay,a=e.i.paused,e.da&&(e.i.autoplay=!1),_(R,2),e.o.ib(),o=[],e.m)o.push(e.m[s].destroy());for(u in e.j)for(c=e.j[u],d=c[0],e.j[u]=c.slice(0,1),d&&o.push(d.p.catch(Un)),p=l(c.slice(1)),f=p.next();!f.done;f=p.next())f.value.p.reject(new bt(2,7,7003,void 0));for(h in e.h){y=e.h[h];try{e.l.removeSourceBuffer(y)}catch(e){}}return b(R,Promise.all(o),4);case 4:return e.m={},e.h={},g=e.l.duration,e.L=new Vr,e.l=jo(e,e.L),b(R,e.L,5);case 5:!isNaN(g)&&g?e.l.duration=g:!isNaN(e.Y)&&e.Y&&(e.l.duration=e.Y),v=new Vr,m=e.l.sourceBuffers,k=t.size,E=0,T=function(){++E===k&&(v.resolve(),e.o.Lb(m,"addsourcebuffer",T))},e.o.D(m,"addsourcebuffer",T),A=l(t.keys()),C=A.next();case 6:return C.done?(e.i.currentTime=r,b(R,v,2)):(x=C.value,P=t.get(x),b(R,Ho(e,x,P,P.codecs),9));case 9:e.s?(e.j[n.S]=[],e.j[n.fa]=[]):e.j[x]=[],C=A.next(),R.u(6);break;case 2:S(R),e.C=!1,pi(e.I),e.o.na(e.i,"canplaythrough",(function(){e.I.g||(e.i.autoplay=i,a||e.i.play())})),w(R,0)}}))}(e,t)}))}(n=Fo.prototype).destroy=function(){return this.I.destroy()},n.init=function(e,t,n,r){t=void 0!==t&&t,n=void 0===n?"UNKNOWN":n,r=void 0!==r&&r;var i,a,o,s,u,c=this;return I((function(d){switch(d.g){case 1:return i=yn,b(d,c.L,2);case 2:c.B=t,c.aa=n,c.sa=r,c.pa=!c.B&&"HLS"==c.aa&&!c.sa,c.K=null,a=l(e.keys()),o=a.next();case 3:if(o.done){d.u(0);break}return s=o.value,u=e.get(s),b(d,Ho(c,s,u,u.codecs),6);case 6:c.s?(c.j[i.S]=[],c.j[i.fa]=[]):c.j[s]=[],o=a.next(),d.u(3)}}))},n.configure=function(e){this.A=e,this.g&&(this.g.A=e.modifyCueCallback)},n.ob=function(){var e={total:this.C?[]:qa(this.i.buffered),audio:this.C?[]:qa(Wo(this,"audio")),video:this.C?[]:qa(Wo(this,"video")),text:[]};if(this.g){var t=this.g.g,n=this.g.h;null!=t&&null!=n&&e.text.push({start:t,end:n})}return e},n.remove=function(e,t,n){var r,i=this;return I((function(a){return 1==a.g?e==(r=yn).ma?b(a,i.g.remove(t,n),0):b(a,es(i,e,(function(){return Xo(i,e,t,n)})),4):i.s?b(a,es(i,r.S,(function(){return Xo(i,r.S,t,n)})),0):a.u(0)}))},n.flush=function(e){var t,n=this;return I((function(r){return 1==r.g?e==(t=yn).ma?r.return():b(r,es(n,e,(function(){n.i.currentTime-=.001,Jo(n,e)})),2):n.s?b(r,es(n,t.S,(function(){var e=t.S;n.i.currentTime-=.001,Jo(n,e)})),0):r.u(0)}))},n.endOfStream=function(e){var t=this;return I((function(n){return b(n,ts(t,(function(){Go(t)||"closed"===t.l.readyState||(e?t.l.endOfStream(e):t.l.endOfStream())})),0)}))},n.ab=function(e){var t=this;return I((function(n){return b(n,ts(t,(function(){if(e<t.l.duration)for(var n in t.h){var r={start:function(){},p:new Vr};t.j[n].unshift(r)}t.l.duration=e,t.Y=e})),0)}))},n.getDuration=function(){return this.l.duration};var as=e.URL.createObjectURL,os="sequence";function ss(e,t,n){this.i=e,this.s=t,this.m=this.j=1/0,this.g=1,this.h=this.l=null,this.A=0,this.F=!0,this.G=0,this.C=void 0===n||n,this.H=0,this.o=!1,this.B=null}function ls(e,t,n){this.j=n,this.l=e,this.s=cs(e),this.g=e.g.currentTime,this.m=Date.now()/1e3,this.h=!1,this.o=0,this.A=t,this.i=function(){}}function us(e){this.g=e}function cs(e){if(e.g.paused||0==e.g.playbackRate||0==e.g.buffered.length)var t=!1;else e:{t=e.g.currentTime;for(var n=(e=l(qa(e.g.buffered))).next();!n.done;n=e.next())if(!(t<(n=n.value).start-.1||t>n.end-.5)){t=!0;break e}t=!1}return t}function ds(e,t,n,r,i){var a=this;this.A=i,this.g=e,this.B=t,this.s=n,this.l=new $,this.j=!1,this.F=e.readyState,this.C=this.i=0,this.h=r,this.o=!1,this.l.D(e,"waiting",(function(){return ps(a)})),this.m=new Tt((function(){ps(a)})).Pa(this.s.gapJumpTimerTime)}function ps(e){if(0!=e.g.readyState){if(e.g.seeking){if(!e.j)return}else e.j=!1;if(!e.g.paused||e.g.currentTime==e.i&&(e.g.autoplay||e.g.currentTime!=e.i)){var t;if(e.g.readyState!=e.F&&(e.F=e.g.readyState),!(t=!e.h)){var n=(t=e.h).l,r=cs(n),i=n.g.currentTime,a=Date.now()/1e3;t.g==i&&t.s==r||(t.m=a,t.g=i,t.s=r,t.h=!1),(r=(i=a-t.m)>=t.A&&r&&!t.h)&&(t.i(t.g,i),t.h=!0,t.g=n.g.currentTime,t.o++,t.j(new qr("stalldetected"))),t=!r}t&&(t=e.g.currentTime,r=function(e,t,n){return!e||!e.length||1==e.length&&1e-6>e.end(0)-e.start(0)?null:0<=(e=qa(e).findIndex((function(e,r,i){return e.start>t&&(0==r||i[r-1].end-t<=n)})))?e:null}(n=e.g.buffered,t,e.s.gapDetectionThreshold),null!=r&&(0!=r||e.o))&&(i=n.start(r),(Ct()||xt())&&(i=Math.ceil(100*(i+.01))/100),i>=e.B.pb()||.001>i-t||(0!=r&&n.end(r-1),e.g.currentTime=i,t==e.i&&(e.i=i),e.C++,e.A(new qr("gapjumped"))))}}}function fs(e,t,n,r){t==HTMLMediaElement.HAVE_NOTHING||e.readyState>=t?r():(t=hs.value().get(t),n.na(e,t,r))}(n=ss.prototype).getDuration=function(){return this.j},n.th=function(){return this.g},n.Eg=function(e){this.i=e},n.ab=function(e){this.j=e},n.xh=function(){return this.i},n.Cg=function(e){this.A=e},n.Bc=function(e){this.F=e},n.ke=function(e){this.m=e},n.Nd=function(){return this.m},n.Df=function(e){this.s=e},n.mh=function(){return this.s},n.sg=function(e,t){if(0!=e.length){var n=e[e.length-1].end+t;this.de(e[0].start+t),this.g=e.reduce((function(e,t){return Math.max(e,t.end-t.start)}),this.g),this.h=Math.max(this.h,n),null!=this.i&&this.C&&!this.o&&(this.i=(Date.now()+this.A)/1e3-this.h-this.g)}},n.ld=function(e){if(0!=e.length){for(var t=e[0].startTime,n=e[0].endTime,r=(Date.now()+this.A)/1e3,i=(e=l(e)).next();!i.done;i=e.next())r<(i=i.value).startTime||(t=Math.min(t,i.startTime),n=Math.max(n,i.endTime),this.g=Math.max(this.g,i.endTime-i.startTime));this.de(t),this.h=Math.max(this.h,n),null!=this.i&&this.C&&!this.o&&(this.i=r-this.h-this.g)}},n.Xd=function(){this.o=!0},n.Rh=function(){return this.o},n.Dg=function(e){this.B=e},n.qh=function(){return this.B},n.de=function(e){this.l=null==this.l?e:Math.min(this.l,e)},n.hf=function(e){this.g=Math.max(this.g,e)},n.offset=function(e){null!=this.l&&(this.l+=e),null!=this.h&&(this.h+=e)},n.R=function(){return 1/0==this.j&&!this.F},n.ac=function(){return 1/0!=this.j&&!this.F},n.qb=function(){return Math.max(this.G,this.Hb()-this.m)},n.Ig=function(e){this.G=e},n.Hb=function(){return this.R()||this.ac()?Math.min(Math.max(0,(Date.now()+this.A)/1e3-this.g-this.i)+this.H,this.j):this.h?Math.min(this.h,this.j):this.j},n.dd=function(e){var t=Math.max(this.l,this.G);return 1/0==this.m?Math.ceil(1e3*t)/1e3:Math.max(t,Math.min(this.Hb()-this.m+e,this.pb()))},n.Xb=function(){return this.dd(0)},n.pb=function(){return Math.max(0,this.Hb()-(this.R()||this.ac()?this.s:0))},n.Mg=function(){return!(null==this.i||null!=this.h&&this.C)},n.Bg=function(e){this.H=e},F("shaka.media.PresentationTimeline",ss),ss.prototype.setAvailabilityTimeOffset=ss.prototype.Bg,ss.prototype.usingPresentationStartTime=ss.prototype.Mg,ss.prototype.getSeekRangeEnd=ss.prototype.pb,ss.prototype.getSeekRangeStart=ss.prototype.Xb,ss.prototype.getSafeSeekRangeStart=ss.prototype.dd,ss.prototype.getSegmentAvailabilityEnd=ss.prototype.Hb,ss.prototype.setUserSeekStart=ss.prototype.Ig,ss.prototype.getSegmentAvailabilityStart=ss.prototype.qb,ss.prototype.isInProgress=ss.prototype.ac,ss.prototype.isLive=ss.prototype.R,ss.prototype.offset=ss.prototype.offset,ss.prototype.notifyMaxSegmentDuration=ss.prototype.hf,ss.prototype.notifyMinSegmentStartTime=ss.prototype.de,ss.prototype.getInitialProgramDateTime=ss.prototype.qh,ss.prototype.setInitialProgramDateTime=ss.prototype.Dg,ss.prototype.isStartTimeLocked=ss.prototype.Rh,ss.prototype.lockStartTime=ss.prototype.Xd,ss.prototype.notifySegments=ss.prototype.ld,ss.prototype.notifyTimeRange=ss.prototype.sg,ss.prototype.getDelay=ss.prototype.mh,ss.prototype.setDelay=ss.prototype.Df,ss.prototype.getSegmentAvailabilityDuration=ss.prototype.Nd,ss.prototype.setSegmentAvailabilityDuration=ss.prototype.ke,ss.prototype.setStatic=ss.prototype.Bc,ss.prototype.setClockOffset=ss.prototype.Cg,ss.prototype.getPresentationStartTime=ss.prototype.xh,ss.prototype.setDuration=ss.prototype.ab,ss.prototype.setPresentationStartTime=ss.prototype.Eg,ss.prototype.getMaxSegmentDuration=ss.prototype.th,ss.prototype.getDuration=ss.prototype.getDuration,ls.prototype.release=function(){this.j=this.l=null,this.i=function(){}},ds.prototype.release=function(){this.l&&(this.l.release(),this.l=null),null!=this.m&&(this.m.stop(),this.m=null),this.h&&(this.h.release(),this.h=null),this.g=this.B=this.A=null},ds.prototype.mf=function(){this.o=!0,ps(this)};var hs=new Et((function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])}));function ys(e,t,n,r){var i=this;this.g=e,this.m=t,this.s=n,this.l=null,this.j=function(){return null==i.l&&(i.l=r()),i.l},this.o=!1,this.h=new $,this.i=new ks(e),fs(this.g,HTMLMediaElement.HAVE_METADATA,this.h,(function(){ms(i,i.j())}))}function gs(e){return e.o?e.g.currentTime:e.j()}function vs(e,t){0<e.g.readyState?Es(e.i,t):fs(e.g,HTMLMediaElement.HAVE_METADATA,e.h,(function(){ms(e,e.j())}))}function ms(e,t){.001>Math.abs(e.g.currentTime-t)?bs(e):(e.h.na(e.g,"seeking",(function(){bs(e)})),Es(e.i,e.g.currentTime&&0!=e.g.currentTime?e.g.currentTime:t))}function bs(e){e.o=!0,e.h.D(e.g,"seeking",(function(){return e.m()})),e.s(e.g.currentTime)}function ks(e){var t=this;this.h=e,this.m=10,this.l=this.j=this.i=0,this.g=new Tt((function(){0>=t.i||t.h.currentTime!=t.j?t.g.stop():(t.h.currentTime=t.l,t.i--)}))}function Es(e,t){e.j=e.h.currentTime,e.l=t,e.i=e.m,e.h.currentTime=t,e.g.Pa(.1)}function _s(e){this.g=e,this.j=!1,this.h=null,this.i=new $}function Ts(e,t,n,r,i,a){var o=this;this.i=e,this.g=t.presentationTimeline,this.B=t.minBufferTime||0,this.l=n,this.A=i,this.s=null,this.o=function(e,t,n){if(!t.stallEnabled)return null;var r=t.stallSkip;return t=new ls(new us(e),t.stallThreshold,n),function(e,t){e.i=t}(t,(function(){r?e.currentTime+=r:(e.pause(),e.play())})),t}(e,n,a),this.j=new ds(e,t.presentationTimeline,n,this.o,a),this.h=new ys(e,(function(){var e=o.j;e.j=!0,e.o=!1;var t=gs(o.h);return e=Ss(o,t),.001<Math.abs(e-t)&&(t=Date.now()/1e3,!o.s||o.s<t-1)?(o.s=t,vs(o.h,e),e=void 0):(o.A(),e=void 0),e}),(function(e){var t=o.j;t.g.seeking&&!t.j&&(t.j=!0,t.i=e)}),(function(){var e=r;return null==e?e=1/0>o.g.getDuration()?o.g.Xb():o.g.pb():0>e&&(e=o.g.pb()+e),As(o,ws(o,e))})),this.m=new Tt((function(){if(0!=o.i.readyState&&!o.i.paused){var e=gs(o.h),t=o.g.Xb(),n=o.g.pb();3>n-t&&(t=n-3),e<t&&(e=Ss(o,e),o.i.currentTime=e)}}))}function As(e,t){var n=e.g.getDuration();return t>=n?n-e.l.durationBackoff:t}function Ss(e,t){var n=Math.max(e.B,e.l.rebufferingGoal),r=e.l.safeSeekOffset,i=e.g.Xb(),a=e.g.pb(),o=e.g.getDuration();3>a-i&&(i=a-3);var s=e.g.dd(n),l=e.g.dd(r);return n=e.g.dd(n+r),t>=o?As(e,t):t>a?a:t<i?Ya(e.i.buffered,l)?l:n:t>=s||Ya(e.i.buffered,t)?t:n}function ws(e,t){var n=e.g.Xb();return t<n?n:t>(e=e.g.pb())?e:t}function Cs(e){this.g=e,this.m=null,this.j=0,this.o=!1}function xs(e,t,n){return new Cs([e=new Va(e,e+t,(function(){return n}),0,null,null,e,e,e+t)])}function Ps(e,t,n,r){this.i=e,this.h=t,this.g=n,this.reverse=r}function Rs(){Cs.call(this,[]),this.h=[]}function Is(e){var t=this;this.g=e,this.j=!1,this.i=this.g.Md(),this.h=new Tt((function(){t.g.qg(.25*t.i)}))}function Ds(e){e.h.stop();var t=e.j?0:e.i;if(0<=t)try{return void(e.g.Md()!=t&&e.g.Ff(t))}catch(e){}e.h.Pa(.25),0!=e.g.Md()&&e.g.Ff(0)}function Os(e){var t=this;this.h=e,this.g=new Set,this.i=new Tt((function(){Ls(t,!1)})).Pa(.25)}function Ls(e,t){for(var n=l(e.g),r=n.next();!r.done;r=n.next())r.value.j(e.h.currentTime,t)}function Ms(){this.g=null,this.h=[]}function Ns(e,t){var n=0;e.g&&e.g.state==t&&(n+=e.g.duration);for(var r=(e=l(e.h)).next();!r.done;r=e.next())n+=(r=r.value).state==t?r.duration:0;return n}function Us(){this.i=this.h=null,this.g=[]}function Bs(e,t,n){e.i!=t&&(e.i=t,e.g.push({timestamp:Date.now()/1e3,id:t.id,type:"text",fromAdaptation:n,bandwidth:null}))}function Fs(){this.Ed=this.A=this.B=this.G=this.C=this.s=this.j=this.F=this.m=this.i=this.L=this.N=this.H=this.I=this.K=this.l=this.o=NaN,this.g=new Ms,this.h=new Us}function js(e,t,n){this.m=e,this.h=t,this.l=0,this.j=n,this.g=new Map,this.i=new Map}function Hs(e,t){e.j=t;for(var n=(e=l(e.g.values())).next();!n.done;n=e.next())n.value.g=t}function Vs(e,t,n){if(n=void 0!==n&&n,e.h.segmentIndex&&(t=e.h.segmentIndex.xb(Math.max(t,e.l),!0))){var r=t.next().value;if(n&&(r=t.next().value),r){for(;e.g.size<e.m&&null!=r&&(n=!0,r.preload&&null!=r.ja&&(n=!1),2==r.Zb()&&(n=!1),n&&r.ca&&Gs(e,r.ca),n&&!e.g.has(r)&&(Xs(n=new qs(e.j),r,e.h),e.g.set(r,n)),e.l=r.startTime,!(e.h.fastSwitching&&r.md&&r.Wd));)r=t.next().value;Ws(e)}}}function Gs(e,t){if(e.h.segmentIndex&&!Array.from(e.i.keys()).some((function(e){return Ha(e,t)}))){var n=new qs(e.j);Xs(n,t,e.h),e.i.set(t,n)}}function Ks(e,t){for(var n=(t=l(t.keys())).next();!n.done;n=t.next())(n=n.value)&&Zs(e,n)}function zs(e){Ks(e,e.g),Ks(e,e.i),e.l=0}function Ws(e){for(var t=Array.from(e.g.keys()),n={},r=l(e.i.keys()),i=r.next();!i.done;n={wd:n.wd},i=r.next())n.wd=i.value,t.some(function(e){return function(t){return Ha(t.ca,e.wd)}}(n))||Zs(e,n.wd)}function Ys(e,t){e.m=t;for(var n=Array.from(e.g.keys());n.length>t;){var r=n.pop();r&&Zs(e,r)}Ws(e)}function Zs(e,t){var n=e.g;t instanceof ja&&(n=e.i),e=n.get(t),n.delete(t),e&&e.abort()}function qs(e){this.g=e,this.ge=this.Gf=null}function Xs(e,t,n){var r=new Uint8Array(0);e.ge=e.g(t,n,(function(t){return I((function(n){if(1==n.g)return r=0<r.byteLength?sn(r,t):t,e.Gf?b(n,e.Gf(r),3):n.u(0);r=new Uint8Array(0),k(n)}))}))}function Qs(e){$r.call(this);var t=this;this.g=new Set,this.i=e,this.h=new Tt((function(){for(var e=t.i(),n=l(t.g),r=n.next();!r.done;r=n.next())(r=r.value).endTime<e.start&&(t.g.delete(r),r=new qr("regionremove",new Map([["region",r]])),t.dispatchEvent(r))})).Pa(2)}function $s(e){$r.call(this),this.g=new Map,this.h=e}function Js(e,t,n,r,i){return e=ri(e,r,i),0==t&&null==n||(e.headers.Range=n?"bytes="+t+"-"+n:"bytes="+t+"-"),e}function el(e,t){var n=this;this.g=t,this.m=e,this.h=null,this.B=1,this.s=this.j=null,this.H=0,this.F=!1,this.i=new Map,this.C=!1,this.I=null,this.A=!1,this.l=new di((function(){return function(e){var t,n,r,i,a,o;return I((function(s){if(1==s.g){for(t=[],n=l(e.i.values()),r=n.next();!r.done;r=n.next())yl(i=r.value),t.push(gl(i));for(a=l(e.o.values()),o=a.next();!o.done;o=a.next())zs(o.value);return b(s,Promise.all(t),2)}e.i.clear(),e.o.clear(),e.g=null,e.m=null,e.h=null,k(s)}))}(n)})),this.K=Date.now()/1e3,this.o=new Map,this.G={projection:null,hfov:null}}function tl(e,t){var n=0>e.g.eb(),r=e.i.get("video");r&&r.Z&&r.Z.je(n),(r=e.i.get("audio"))&&r.Z&&r.Z.je(n),(r=e.i.get(hn))&&r.Z&&r.Z.je(n),(n=e.i.get("video"))&&(r=n.stream)&&(t?(t=r.trickModeVideo)&&!n.fc&&(il(e,t,!1,0,!1),n.fc=r):(t=n.fc)&&(n.fc=null,il(e,t,!0,0,!1)))}function nl(e,t,n,r,i,a){n=void 0!==n&&n,r=void 0===r?0:r,i=void 0!==i&&i,a=void 0!==a&&a,e.j=t,e.C&&(t.video&&il(e,t.video,n,r,i,a),t.audio&&il(e,t.audio,n,r,i,a))}function rl(e,t){I((function(n){if(1==n.g)return e.s=t,e.C?t.segmentIndex?n.u(2):b(n,t.createSegmentIndex(),2):n.return();il(e,t,!0,0,!1),k(n)}))}function il(e,t,n,r,i,a){var o=e.i.get(t.type);o||t.type!=hn?o&&(o.fc&&(t.trickModeVideo?(o.fc=t,t=t.trickModeVideo):o.fc=null),o.stream!=t||i)&&(e.o.has(t)?o.X=e.o.get(t):o.X&&function(e,t){t&&t!==e.h&&(zs(e),e.h=t)}(o.X,t),t.type==hn&&(i=mn(t.mimeType,t.codecs),Vo(e.g.W,i,e.m.sequenceMode,t.external)),e.o.has(o.stream)||o.stream.closeSegmentIndex&&o.stream.closeSegmentIndex(),o.stream=t,o.Z=null,o.Qf=!!a,n&&(o.Uc?o.me=!0:o.Na?(o.Mb=!0,o.Id=r,o.me=!0):(yl(o),fl(e,o,!0,r).catch((function(t){e.g&&e.g.onError(t)})))),function(e,t){var n,r;return I((function(i){if(1==i.g)return t.$a?(n=t.stream,r=t.$a,n.segmentIndex?i.u(2):b(i,n.createSegmentIndex(),2)):i.return();if(t.$a!=r||t.stream!=n)return i.return();var a=e.g.Ld(),o=zo(e.g.W,t.type),s=t.stream.segmentIndex.find(t.La?t.La.endTime:a),l=null==s?null:t.stream.segmentIndex.get(s);s=l&&l.ja?l.ja-l.Aa:null,l&&!s&&(s=(l.endTime-l.getStartTime())*(t.stream.bandwidth||0)/8),s?((l=l.ca)&&(s+=(l.ja?l.ja-l.Aa:null)||0),a=8*s/(l=e.g.getBandwidthEstimate())<(o||0)-a-Math.max(e.m.minBufferTime||0,e.h.rebufferingGoal)||t.$a.h.g>s):a=!1,a&&t.$a.abort(),k(i)}))}(e,o).catch((function(t){e.g&&e.g.onError(t)}))):function(e,t){var n,r,i,a,o;I((function(s){switch(s.g){case 1:return n=yn,e.H++,r=e.H,E(s,2),b(s,Zo(e.g.W,n.ma),4);case 4:T(s,3);break;case 2:i=A(s),e.g&&e.g.onError(i);case 3:a=mn(t.mimeType,t.codecs),Vo(e.g.W,a,e.m.sequenceMode,t.external),(e.g.W.F.isTextVisible()||e.h.alwaysStreamText)&&e.H==r&&(o=ol(e,t),e.i.set(n.ma,o),hl(e,o,0)),k(s)}}))}(e,t)}function al(e,t){t.Uc||t.Mb||(t.Na?(t.Mb=!0,t.Id=0):null==Ko(e.g.W,t.type)?null==t.ub&&hl(e,t,0):(yl(t),fl(e,t,!1,0).catch((function(t){e.g&&e.g.onError(t)}))))}function ol(e,t){return{stream:t,type:t.type,Z:null,X:sl(e,t),La:null,bc:null,df:null,bf:null,af:null,fc:null,endOfStream:!1,Na:!1,ub:null,Mb:!1,Id:0,me:!1,Uc:!1,od:!0,wf:!1,gd:!1,$a:null}}function sl(e,t){if("video"===t.type&&e.h.disableVideoPrefetch||"audio"===t.type&&e.h.disableAudioPrefetch||t.type===hn&&("application/cea-608"==t.mimeType||"application/cea-708"==t.mimeType)||t.type===hn&&e.h.disableTextPrefetch)return null;if(e.o.has(t))return e.o.get(t);var n=e.i.get(t.type);return(n=n&&n.X)&&t===n.h?n:0<e.h.segmentPrefetchLimit?new js(e.h.segmentPrefetchLimit,t,(function(t,n,r){return pl(t,n,r||null,e.h.retryParameters,e.g.zb)})):null}function ll(t,n){var r,i,a,o,s;return I((function(u){switch(u.g){case 1:if(pi(t.l),n.Na||null==n.ub||n.Uc)return u.return();if(n.ub=null,!n.Mb){u.u(2);break}return b(u,fl(t,n,n.me,n.Id),3);case 3:return u.return();case 2:if(n.stream.segmentIndex){u.u(4);break}return r=n.stream,b(u,n.stream.createSegmentIndex(),5);case 5:if(r!=n.stream)return r.closeSegmentIndex&&r.closeSegmentIndex(),n.Na||n.ub||hl(t,n,0),u.return();case 4:E(u,6),i=function(t,n){if(cl(n))return function(e,t){var n=zo(e,"video")||0;On(e.g,t,n)}(t.g.W,n.stream.originalId||""),null;if(n.type==hn&&function(e){e.g&&On(e.g,"",0)}(t.g.W),!t.g.W.ea&&n.type!=hn)return t.h.updateIntervalSeconds/2;var r=t.g.Ld();if("audio"===n.type)for(var i=l(t.o.keys()),a=i.next();!a.done;a=i.next())(a=t.o.get(a.value)).Ia(r,!0),Vs(a,r);i=n.La?n.La.endTime:r,a=function(e,t,n){return e.C?0:t==hn?null==(e=e.g).h||e.h<n?0:e.h-Math.max(n,e.g):Za(e=Wo(e,t),n)}(t.g.W,n.type,r);var o=Math.max(1,Math.max(t.m.minBufferTime||0,t.h.rebufferingGoal,t.h.bufferingGoal)*t.B),s=t.m.presentationTimeline.getDuration()-i,u=zo(t.g.W,n.type);if(1e-6>s&&u)return n.endOfStream=!0,"video"==n.type&&(t=t.i.get(hn))&&cl(t)&&(t.endOfStream=!0),null;if(n.endOfStream=!1,a>=o)return t.h.updateIntervalSeconds/2;if(a=function(e,t,n,r){if(t.Z)return t.Z.current();if(t.La||r)return t.Z=t.stream.segmentIndex.xb(t.La?t.La.endTime:r,!1,0>e.g.eb()),t.Z&&t.Z.next().value;r=e.h.inaccurateManifestTolerance;var i=Math.max(n-r,0);e=0>e.g.eb();var a=null;return r&&(t.Z=t.stream.segmentIndex.xb(i,!1,e),a=t.Z&&t.Z.next().value),a||(t.Z=t.stream.segmentIndex.xb(n,!1,e),a=t.Z&&t.Z.next().value),a}(t,n,r,u),!a)return t.h.updateIntervalSeconds;for(o=1/0,s=l(s=Array.from(t.i.values())),u=s.next();!u.done;u=s.next())cl(u=u.value)||u.Z&&!u.Z.current()||(o=Math.min(o,u.La?u.La.endTime:r));return i>=o+t.m.presentationTimeline.g?t.h.updateIntervalSeconds:(n.X&&n.Z&&!t.o.has(n.stream)&&(n.X.Ia(r),Vs(n.X,a.startTime)),function(t,n,r,i){var a,o,s,l,u,c,d,p,f,h,y,g,v,m,_;return I((function(S){switch(S.g){case 1:if(a=yn,o=n.stream,s=n.Z,n.Na=!0,E(S,2),2==i.Zb())throw new bt(1,1,1011);return b(S,function(e,t,n){var r,i,a,o,s,l,u,c,d,p,f,h,y;return I((function(g){switch(g.g){case 1:if(r=yn,i=[],a=Math.max(0,n.appendWindowStart-.1),o=n.appendWindowEnd+.01,s=An(t.stream.codecs),l=Sn(t.stream.mimeType),(u=n.timestampOffset)==t.df&&a==t.bf&&o==t.af&&s==t.cf&&l==t.mg){g.u(2);break}if(c=t.cf&&t.mg&&function(e,t,n,r){if(t==hn)var i=!1;else{i=An(wn(e.G[t]));var a=Sn(e.G[t]),o=mn(n,r),s=e.A.forceTransmux;(!te(o)||!e.B&&Rn.includes(o))&&(s=!0),n=bn(n,r),s&&(s=Xe(n))&&(o=(s=s()).convertCodecs(t,n),s.destroy()),t=An(wn(o)),o=Sn(o),i=i!==t||a!==o}return!!i&&("smooth"!==e.A.codecSwitchingStrategy||!ne()||e.s)}(e.g.W,t.type,l,s),!c){g.u(3);break}if(d=null,t.type===r.fa?d=e.i.get(r.S):t.type===r.S&&(d=e.i.get(r.fa)),!d){g.u(3);break}return b(g,gl(d).catch((function(){})),5);case 5:d.bc=null,al(e,d);case 3:return p=function(){var i,c,d;return I((function(p){if(1==p.g)return i=new Map,e.j.audio&&i.set(r.S,e.j.audio),e.j.video&&i.set(r.fa,e.j.video),E(p,2),t.bf=a,t.af=o,t.cf=s,t.mg=l,t.df=u,c=e.m.sequenceMode||"HLS"==e.m.type,b(p,qo(e.g.W,t.type,u,a,o,c,n.mimeType||t.stream.mimeType,n.codecs||t.stream.codecs,i),4);if(2!=p.g)return T(p,0);throw d=A(p),t.bf=null,t.af=null,t.cf=null,t.df=null,d}))},b(g,p(),2);case 2:return Ha(n.ca,t.bc)||(t.bc=n.ca,n.l&&n.ca&&(f=dl(e,t,n.ca),h=function(){var i,a,o,s,l,u;return I((function(c){switch(c.g){case 1:return E(c,2),b(c,f,4);case 4:return i=c.h,pi(e.l),a=null,o=new Map,s={projection:null,hfov:null},(new bi).box("moov",ki).box("trak",ki).box("mdia",ki).O("mdhd",(function(e){a=ao(e.reader,e.version).timescale})).box("hdlr",(function(e){switch((e=e.reader).skip(8),e.dc()){case"soun":o.set(r.S,a);break;case"vide":o.set(r.fa,a)}a=null})).box("minf",ki).box("stbl",ki).O("stsd",Ei).box("encv",_i).box("avc1",_i).box("avc3",_i).box("hev1",_i).box("hvc1",_i).box("dvav",_i).box("dva1",_i).box("dvh1",_i).box("dvhe",_i).box("vexu",ki).box("proj",ki).O("prji",(function(e){e=e.reader.dc(),s.projection=e})).box("hfov",(function(e){e=e.reader.M()/1e3,s.hfov=e})).parse(i),function(e,t){if(e.G.projection!=t.projection||e.G.hfov!=t.hfov){if(null!=t.projection||null!=t.hfov){var n=(new Map).set("detail",t);n=new qr("spatialvideoinfo",n)}else n=new qr("nospatialvideoinfo");n.cancelable=!0,e.g.onEvent(n),e.G=t}}(e,s),o.has(t.type)?n.ca.timescale=o.get(t.type):null!=a&&(n.ca.timescale=a),l=t.stream.closedCaptions&&0<t.stream.closedCaptions.size,b(c,e.g.Sf(t.type,i),5);case 5:return b(c,Yo(e.g.W,t.type,i,null,t.stream,l),6);case 6:T(c,0);break;case 2:throw u=A(c),t.bc=null,u}}))},e.g.Zh(n.startTime,n.ca),i.push(h()))),e.m.sequenceMode&&(y=t.La?t.La.j:null,n.j!=y&&i.push(function(e,t,n){var r;return I((function(i){return 1==i.g?t==(r=yn).ma?i.return():(t==r.fa&&(e.ia=new Vr),es(e,t,(function(){return Qo(e,t)})),e.s&&es(e,r.S,(function(){return Qo(e,r.S)})),b(i,es(e,t,(function(){return $o(e,t,n)})),2)):e.s?b(i,es(e,r.S,(function(){return $o(e,r.S,n)})),0):i.u(0)}))}(e.g.W,t.type,n.startTime))),b(g,Promise.all(i),0)}}))}(t,n,i),4);case 4:return pi(t.l),t.A?S.return():(l="video/mp4"==o.mimeType||"audio/mp4"==o.mimeType,u=e.ReadableStream,t.h.lowLatencyMode&&u&&l&&("HLS"!=t.m.type||i.m)?(d=new Uint8Array(0),f=p=!1,y=function(e){var a,s,l;return I((function(u){switch(u.g){case 1:if(p)return u.return();if(f=!0,pi(t.l),t.A)return u.return();if(E(u,2),d=function(e,t){var n=new Uint8Array(e.length+t.length);return n.set(e),n.set(t,e.length),n}(d,e),a=!1,s=0,(new bi).box("mdat",(function(e){s=e.size+e.start,a=!0})).parse(d,!1,!0),!a){u.u(4);break}return l=d.subarray(0,s),d=d.subarray(s),b(u,ul(t,n,r,o,i,l,!0),5);case 5:n.X&&n.Z&&Vs(n.X,i.startTime,!0);case 4:T(u,0);break;case 2:h=A(u),k(u)}}))},b(S,dl(t,n,i,y),9)):b(S,dl(t,n,i),7));case 7:return c=S.h,pi(t.l),t.A?S.return():(pi(t.l),n.Mb?(n.Na=!1,hl(t,n,0),S.return()):b(S,ul(t,n,r,o,i,c),6));case 9:if(g=S.h,h)throw h;if(f){S.u(10);break}return p=!0,pi(t.l),t.A?S.return():n.Mb?(n.Na=!1,hl(t,n,0),S.return()):b(S,ul(t,n,r,o,i,g),10);case 10:n.X&&n.Z&&Vs(n.X,i.startTime,!0);case 6:if(pi(t.l),t.A)return S.return();n.La=i,s.next(),n.Na=!1,n.wf=!1,v=t.g.W.ob(),m=v[n.type],JSON.stringify(m),n.Mb||t.g.mf(i,n.stream),hl(t,n,0),T(S,0);break;case 2:if(_=A(S),pi(t.l,_),t.A)return S.return();if(n.Na=!1,7001==_.code)n.Na=!1,yl(n),hl(t,n,0),S.u(0);else if(n.type==a.ma&&t.h.ignoreTextStreamFailures)t.i.delete(a.ma),S.u(0);else{if(3017!=_.code)return n.gd=!0,1==_.category&&n.X&&Zs(n.X,i),_.severity=2,b(S,vl(t,n,_),0);(function(e,t,n){if(!Array.from(e.i.values()).some((function(e){return e!=t&&e.wf}))){if(0<e.h.maxDisabledTime&&e.g.Jd(t.stream,e.h.maxDisabledTime))return;var r=Math.round(100*e.B);if(20<r)e.B-=.2;else{if(!(4<r))return t.gd=!0,e.A=!0,void e.g.onError(n);e.B-=.04}t.wf=!0}hl(e,t,4)})(t,n,_),S.u(0)}}}))}(t,n,r,a).catch((function(){})),null)}(t,n),null!=i&&(hl(t,n,i),n.gd=!1),T(u,7);break;case 6:return a=A(u),b(u,vl(t,n,a),8);case 8:return u.return();case 7:if(o=Array.from(t.i.values()),!t.C||!o.every((function(e){return e.endOfStream}))){u.u(0);break}return b(u,t.g.W.endOfStream(),10);case 10:pi(t.l),0!=(s=t.g.W.getDuration())&&s<t.m.presentationTimeline.getDuration()&&t.m.presentationTimeline.ab(s),k(u)}}))}function ul(e,t,n,r,i,a,o){var s,l,u,c,d,p;return o=void 0!==o&&o,I((function(f){switch(f.g){case 1:return s=r.closedCaptions&&0<r.closedCaptions.size,u=null!=r.emsgSchemeIdUris&&0<r.emsgSchemeIdUris.length||e.h.dispatchAllEmsgBoxes,c=e.h.parsePrftBox&&!e.F,(u||c)&&(l=new bi),u&&l.O("emsg",(function(t){var n=r.emsgSchemeIdUris;if(0===t.version)var a=t.reader.dc(),o=t.reader.dc(),s=t.reader.M(),l=t.reader.M(),u=t.reader.M(),c=t.reader.M(),d=i.startTime+l/s;else s=t.reader.M(),l=(d=t.reader.zc()/s+i.timestampOffset)-i.startTime,u=t.reader.M(),c=t.reader.M(),a=t.reader.dc(),o=t.reader.dc();t=t.reader.sb(t.reader.getLength()-t.reader.wa()),(n&&n.includes(a)||e.h.dispatchAllEmsgBoxes)&&("urn:mpeg:dash:event:2012"==a?e.g.$h():((n=new qr("emsg",n=(new Map).set("detail",{startTime:d,endTime:d+u/s,schemeIdUri:a,value:o,timescale:s,presentationTimeDelta:l,eventDuration:u,id:c,messageData:t}))).cancelable=!0,e.g.onEvent(n),n.defaultPrevented||"https://aomedia.org/emsg/ID3"!=a&&"https://developer.apple.com/streaming/emsg-id3"!=a||(a=to(t)).length&&i&&e.g.ai([{cueTime:i.startTime,data:t,frames:a,dts:i.startTime,pts:i.startTime}],0,i.endTime)))})),c&&l.O("prft",(function(t){if(!e.F&&i.ca.timescale){var n=t.reader,r=t.version;n.M(),t=1e3*(t=n.M())+n.M()/Math.pow(2,32)*1e3,0===r?n=n.M():(r=n.M(),n=n.M(),n=r*Math.pow(2,32)+n),t=new Date(new Date(Date.UTC(1900,0,1,0,0,0)).getTime()+t).getTime(),n=new qr("prft",n=(new Map).set("detail",{wallClockTime:t,programStartDate:new Date(t-n/i.ca.timescale*1e3)})),e.g.onEvent(n),e.F=!0}})),(u||c)&&l.parse(a),b(f,function(e,t,n){var r,i,a;return I((function(o){if(1==o.g)return r=Math.max(e.h.bufferBehind,e.m.presentationTimeline.g),null==(i=Ko(e.g.W,t.type))||(a=n-i-r)<=e.h.evictionGoal?o.return():b(o,e.g.W.remove(t.type,i,i+a),2);pi(e.l),k(o)}))}(e,t,n),2);case 2:return pi(e.l),d=t.od,t.od=!1,p=t.Qf,t.Qf=!1,b(f,e.g.Sf(t.type,a),3);case 3:return b(f,Yo(e.g.W,t.type,a,i,r,s,d,p,o),4);case 4:pi(e.l),k(f)}}))}function cl(e){return e&&e.type==hn&&("application/cea-608"==e.stream.mimeType||"application/cea-708"==e.stream.mimeType)}function dl(t,n,r,i){var a,o,s,l,u;return I((function(c){switch(c.g){case 1:if(a=r.ed())return c.return(a);if(o=null,n.X){var d=n.X,p=d.g;r instanceof ja&&(p=d.i),p.has(r)?(d=p.get(r),i&&(d.Gf=i),o=d.ge):o=null}return o||(o=pl(r,n.stream,i||null,t.h.retryParameters,t.g.zb)),s=0,n.Z&&(s=n.Z.h),n.$a=o,b(c,o.promise,2);case 2:if(l=c.h,n.$a=null,u=l.data,!r.aesKey){c.u(3);break}return b(c,function(t,n,r){var i,a,o,s,l;return I((function(u){if(1==u.g)return(i=n).cryptoKey?u.u(2):b(u,i.fetchKey(),3);if(!(a=i.iv))for(a=ye(new ArrayBuffer(16)),o=i.firstMediaSequenceNumber+r,s=a.byteLength-1;0<=s;s--)a[s]=255&o,o>>=8;return l="CBC"==n.blockCipherMode?{name:"AES-CBC",iv:a}:{name:"AES-CTR",counter:a,length:64},u.return(e.crypto.subtle.decrypt(l,i.cryptoKey,t))}))}(u,r.aesKey,s),4);case 4:u=c.h;case 3:return c.return(u)}}))}function pl(e,t,n,r,i){var a=e instanceof Va?e:void 0,o=a?1:0;return(e=Js(e.$(),e.Aa,e.ja,r,n)).contentType=t.type,i.request(li,e,{type:o,stream:t,segment:a})}function fl(e,t,n,r){var i,a;return I((function(o){return 1==o.g?(t.Mb=!1,t.me=!1,t.Id=0,t.Uc=!0,t.La=null,t.bc=null,t.Z=null,t.X&&!e.o.has(t.stream)&&zs(t.X),r?(i=e.g.Ld(),a=e.g.W.getDuration(),b(o,e.g.W.remove(t.type,i+r,a),3)):b(o,Zo(e.g.W,t.type),4)):3!=o.g?(pi(e.l),n?b(o,e.g.W.flush(t.type),3):o.u(3)):(pi(e.l),t.Uc=!1,t.endOfStream=!1,t.Na||t.ub||hl(e,t,0),void k(o))}))}function hl(e,t,n){var r=t.type;(r!=hn||e.i.has(r))&&(t.ub=new _t((function(){var n;return I((function(r){return 1==r.g?(E(r,2),b(r,ll(e,t),4)):2!=r.g?T(r,0):(n=A(r),e.g&&e.g.onError(n),void k(r))}))})).U(n))}function yl(e){null!=e.ub&&(e.ub.stop(),e.ub=null)}function gl(e){return I((function(t){return e.$a?b(t,e.$a.abort(),0):t.u(0)}))}function vl(e,t,n){var r;return I((function(i){if(1==i.g)return b(i,Hr(e.I),2);pi(e.l),r=0===e.h.maxDisabledTime&&1011==n.code?1:e.h.maxDisabledTime,1===n.category&&0<r&&(n.handled=e.g.Jd(t.stream,r),n.handled&&(n.severity=1)),e.g.onError(n),n.handled||e.h.failureCallback(n),k(i)}))}function ml(){}function bl(e,t,n,r,i){var a,o=i in r,s=!0;for(a in t){var l=i+"."+a,u=o?r[i]:n[a];o||a in n?void 0===t[a]?void 0===u||o?delete e[a]:e[a]=qn(u):u.constructor==Object&&t[a]&&t[a].constructor==Object?(e[a]||(e[a]=qn(u)),l=bl(e[a],t[a],u,r,l),s=s&&l):typeof t[a]!=typeof u||null==t[a]||"function"!=typeof t[a]&&t[a].constructor!=u.constructor?(W("Invalid config, wrong type for "+l),s=!1):("function"==typeof n[a]&&n[a].length!=t[a].length&&Y("Unexpected number of arguments for "+l),e[a]=t[a]):(W("Invalid config, unrecognized key "+l),s=!1)}return s}function kl(e,t){for(var n={},r=n,i=0,a=0;!(0>(i=e.indexOf(".",i)));)0!=i&&"\\"==e[i-1]||(r[a=e.substring(a,i).replace(/\\\./g,".")]={},r=r[a],a=i+1),i+=1;return r[e.substring(a).replace(/\\\./g,".")]=t,n}function El(e,t){return e&&t}function _l(){}function Tl(e){return new rt(e=Zt(e)).wb}function Al(e,t,n){function r(e){ve(a).setUint32(o,e.byteLength,!0),o+=4,a.set(ye(e),o),o+=e.byteLength}if(!n||!n.byteLength)throw new bt(2,6,6015);var i;i="string"==typeof t?Xt(t,!0):t,e=Xt(e=Zt(e),!0);var a=new Uint8Array(12+e.byteLength+i.byteLength+n.byteLength),o=0;return r(e),r(i),r(n),a}function Sl(e,t,n){return"skd"!==t?e:(t=n.serverCertificate,Al(e,n=Zt(e).split("skd://").pop(),t))}function wl(e,t){2===e&&(t.headers["Content-Type"]="application/octet-stream")}function Cl(){}function xl(){var t=1/0;navigator.connection&&navigator.connection.saveData&&(t=360);var n={retryParameters:{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:3e4,stallTimeout:5e3,connectionTimeout:1e4},servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,persistentSessionOnlinePlayback:!1,persistentSessionsMetadata:[],initDataTransform:function(t,n,r){return e.shakaMediaKeysPolyfill&&"skd"==n&&(n=r.serverCertificate,t=Al(t,r=Tl(t),n)),t},logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[],keySystemsMapping:{},parseInbandPsshEnabled:xt(),minHdcpVersion:"",ignoreDuplicateInitData:!It()};(xt()||Bt())&&n.preferredKeySystems.push("com.microsoft.playready");var r="reload",i=!1;It()||Rt()||Ht("Tizen 4")||Ht("Tizen 5")||Ht("Tizen 6")||Ot()||Dt()&&53===Mt()||Dt()&&68===Mt()||!(!Lt()||Lt()&&Ht("Android")||Lt()&&Ht("Fuchsia"))||(navigator.userAgentData&&navigator.userAgentData.platform?"windows"==navigator.userAgentData.platform.toLowerCase():navigator.platform&&navigator.platform.toLowerCase().includes("windows"))&&wt()||(r="smooth",i=!0),i={retryParameters:{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:3e4,stallTimeout:5e3,connectionTimeout:1e4},availabilityWindowOverride:NaN,disableAudio:!1,disableVideo:!1,disableText:!1,disableThumbnails:!1,defaultPresentationDelay:0,segmentRelativeVttTiming:!1,raiseFatalErrorOnManifestUpdateRequestFailure:!1,dash:{clockSyncUri:"",ignoreDrmInfo:!1,disableXlinkProcessing:!1,xlinkFailGracefully:!1,ignoreMinBufferTime:!1,autoCorrectDrift:!0,initialSegmentLimit:1e3,ignoreSuggestedPresentationDelay:!1,ignoreEmptyAdaptationSet:!1,ignoreMaxSegmentDuration:!1,keySystemsByURI:{"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready"},manifestPreprocessor:Rl,manifestPreprocessorTXml:Il,sequenceMode:!1,enableAudioGroups:!1,multiTypeVariantsAllowed:i,useStreamOnceInPeriodFlattening:!1,updatePeriod:-1},hls:{ignoreTextStreamFailures:!1,ignoreImageStreamFailures:!1,defaultAudioCodec:"mp4a.40.2",defaultVideoCodec:"avc1.42E01E",ignoreManifestProgramDateTime:!1,ignoreManifestProgramDateTimeForTypes:[],mediaPlaylistFullMimeType:'video/mp2t; codecs="avc1.42E01E, mp4a.40.2"',useSafariBehaviorForLive:!0,liveSegmentsDelay:3,sequenceMode:!(Rt()||It()||Ot()||Bt()),ignoreManifestTimestampsInSegmentsMode:!1,disableCodecGuessing:!1,allowLowLatencyByteRangeOptimization:!0},mss:{manifestPreprocessor:Rl,manifestPreprocessorTXml:Il,sequenceMode:!1,keySystemsBySystemId:{"9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready"}}};var a={retryParameters:{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:3e4,stallTimeout:5e3,connectionTimeout:1e4},failureCallback:function(e){return El([e])},rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,evictionGoal:1,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.5,gapJumpTimerTime:.25,durationBackoff:1,safeSeekOffset:5,stallEnabled:!0,stallThreshold:1,stallSkip:.1,useNativeHlsOnSafari:!0,useNativeHlsForFairPlay:!0,inaccurateManifestTolerance:2,lowLatencyMode:!1,autoLowLatencyMode:!1,forceHTTPS:!1,preferNativeHls:!1,updateIntervalSeconds:1,dispatchAllEmsgBoxes:!1,observeQualityChanges:!1,maxDisabledTime:30,parsePrftBox:!1,segmentPrefetchLimit:0,prefetchAudioLanguages:[],disableAudioPrefetch:!1,disableTextPrefetch:!1,disableVideoPrefetch:!1,liveSync:!1,liveSyncMaxLatency:1,liveSyncPlaybackRate:1.1,liveSyncMinLatency:0,liveSyncMinPlaybackRate:.95,liveSyncPanicMode:!1,liveSyncPanicThreshold:60,allowMediaSourceRecoveries:!0,minTimeBetweenRecoveries:5,vodDynamicPlaybackRate:!1,vodDynamicPlaybackRateLowBufferRate:.95,vodDynamicPlaybackRateBufferRatio:.5,infiniteLiveStreamDuration:!1,loadTimeout:30};(Dt()||Pt()||Lt()||Ft())&&(a.stallSkip=0);var o={trackSelectionCallback:function(e){return I((function(t){return t.return(e)}))},downloadSizeCallback:function(e){var t;return I((function(n){return 1==n.g?navigator.storage&&navigator.storage.estimate?b(n,navigator.storage.estimate(),3):n.return(!0):(t=n.h,n.return(t.usage+e<.95*t.quota))}))},progressCallback:function(e,t){return El([e,t])},usePersistentLicense:!0,numberOfParallelDownloads:5};t={enabled:!0,useNetworkInformation:!0,defaultBandwidthEstimate:1e6,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:1/0,minHeight:0,maxHeight:t,minPixels:0,maxPixels:1/0,minFrameRate:0,maxFrameRate:1/0,minBandwidth:0,maxBandwidth:1/0},advanced:{minTotalBytes:128e3,minBytes:16e3,fastHalfLife:2,slowHalfLife:5},restrictToElementSize:!1,restrictToScreenSize:!1,ignoreDevicePixelRatio:!1,clearBufferSwitch:!1,safeMarginSwitch:0},r={codecSwitchingStrategy:r,addExtraFeaturesToSourceBuffer:function(e){return El([e],"")},forceTransmux:!1,insertFakeEncryptionInInit:!0,modifyCueCallback:function(e,t){return El([e,t])}};var s=!1;(Dt()||Pt()||Lt()||Ft()||Ut()||Bt()||xt())&&(s=!0);var u={drm:n,manifest:i,streaming:a,mediaSource:r,offline:o,abrFactory:function(){return new wr},abr:t,autoShowText:3,preferredAudioLanguage:"",preferredAudioLabel:"",preferredTextLanguage:"",preferredVariantRole:"",preferredTextRole:"",preferredAudioChannelCount:2,preferredVideoHdrLevel:"AUTO",preferredVideoLayout:"",preferredVideoLabel:"",preferredVideoCodecs:[],preferredAudioCodecs:[],preferForcedSubs:!1,preferSpatialAudio:!1,preferredDecodingAttributes:[],restrictions:{minWidth:0,maxWidth:1/0,minHeight:0,maxHeight:1/0,minPixels:0,maxPixels:1/0,minFrameRate:0,maxFrameRate:1/0,minBandwidth:0,maxBandwidth:1/0},playRangeStart:0,playRangeEnd:1/0,textDisplayer:{captionsUpdatePeriod:.25},textDisplayFactory:function(){return null},cmcd:{enabled:!1,sessionId:"",contentId:"",rtpSafetyFactor:5,useHeaders:!1,includeKeys:[]},cmsd:{enabled:!0,applyMaximumSuggestedBitrate:!0,estimatedThroughputWeightRatio:.5},lcevc:{enabled:!1,dynamicPerformanceScaling:!0,logLevel:0,drawLogo:!1},ads:{customPlayheadTracker:!1,skipPlayDetection:s}};return o.trackSelectionCallback=function(t){return I((function(n){return n.return(function(t,n,r){var i=r;"AUTO"==i&&(i=e.matchMedia("(color-gamut: p3)").matches?"PQ":"SDR");var a=t.filter((function(e){return!("variant"!=e.type||e.hdr&&e.hdr!=i)}));r=[];var o=Yn(n,a.map((function(e){return e.language})));o&&(r=a.filter((function(e){return Gn(e.language)==o}))),0==r.length&&(r=a.filter((function(e){return e.primary}))),0==r.length&&(a.map((function(e){return e.language})),r=a);var s=r.filter((function(e){return e.height&&480>=e.height}));for(s.length&&(s.sort((function(e,t){return t.height-e.height})),r=s.filter((function(e){return e.height==s[0].height}))),n=[],r.length&&(a=Math.floor(r.length/2),r.sort((function(e,t){return e.bandwidth-t.bandwidth})),n.push(r[a])),t=l(t),r=t.next();!r.done;r=t.next())(r=r.value).type!=hn&&"image"!=r.type||n.push(r);return n}(t,u.preferredAudioLanguage,u.preferredVideoHdrLevel))}))},u}function Pl(e,t,n){var r={".drm.keySystemsMapping":"",".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:"",audioRobustness:"",sessionType:"",serverCertificate:new Uint8Array(0),serverCertificateUri:"",individualizationServer:""}};return bl(e,t,n||xl(),r,"")}function Rl(e){return El([e],e)}function Il(e){return El([e],e)}function Dl(e,t,n,r,i){$r.call(this),this.K=e,this.T=t,this.Ra=i.networkingEngine,this.Y=r,this.o=null,this.Rb=n,this.ta=0,this.lb=i.oc,this.B=i.Uh,this.mb=i.Vh,this.g=i.config,this.j=this.C=this.h=null,this.ea=!1,this.F=i.ei,this.qa=!1,this.l=null,this.da=!1,this.i=this.s=null,this.ba=!1,this.I=new Map,this.sa=!1,this.Sa=i.di,this.aa=new Fs,this.m=new Vr,this.L=null,this.A=!1,this.cb=i.Xg,this.pa=null,this.Ta=i.Wg,this.N=!1,this.H=[],this.G=[]}function Ol(e,t,n){(e=t?e.G:e.H)?e.push(n):n()}function Ll(e,t){if(e.L=t,e.N=!0,e.H)for(var n=(t=l(e.H)).next();!n.done;n=t.next())(n=n.value)();e.H=null}function Ml(e){if(e.A)throw new bt(2,7,7003)}function Nl(e,t){e.dispatchEvent(new qr("onstatechange",(new Map).set("state",t)))}function Ul(e,t,n){var r,i,a,o,s;I((function(l){if(1==l.g)return r=e.g.streaming.segmentPrefetchLimit||2,i=new js(r,t,(function(t,n,r){return pl(t,n,r||null,e.g.streaming.retryParameters,e.Ra)})),e.I.set(t.id,i),b(l,t.createSegmentIndex(),2);a=e.Y||0,(s=(o=t.segmentIndex.xb(a))?o.current():null)||(s=t.segmentIndex.get(0)),s&&(n?s.ca&&Gs(i,s.ca):Vs(i,s.startTime)),k(l)}))}function Bl(e,t){$r.call(this);var n=this;this.i=e,this.l=t,this.g=new Map,this.m=[{lc:null,kc:Hl,$b:function(e,t){return Fl(n,"enter",e,t)}},{lc:jl,kc:Hl,$b:function(e,t){return Fl(n,"enter",e,t)}},{lc:Vl,kc:Hl,$b:function(e,t){return Fl(n,"enter",e,t)}},{lc:Hl,kc:jl,$b:function(e,t){return Fl(n,"exit",e,t)}},{lc:Hl,kc:Vl,$b:function(e,t){return Fl(n,"exit",e,t)}},{lc:jl,kc:Vl,$b:function(e,t){return Fl(n,"skip",e,t)}},{lc:Vl,kc:jl,$b:function(e,t){return Fl(n,"skip",e,t)}}],this.h=new $,this.h.D(this.i,"regionremove",(function(e){n.g.delete(e.region)}))}function Fl(e,t,n,r){t=new qr(t,new Map([["region",n],["seeking",r]])),e.dispatchEvent(t)}ys.prototype.release=function(){this.h&&(this.h.release(),this.h=null),null!=this.i&&(this.i.release(),this.i=null),this.m=function(){},this.g=null},ks.prototype.release=function(){this.g&&(this.g.stop(),this.g=null),this.h=null},(n=_s.prototype).we=function(){var e=this;fs(this.g,HTMLMediaElement.HAVE_CURRENT_DATA,this.i,(function(){null==e.h||0==e.h?e.j=!0:(e.i.na(e.g,"seeking",(function(){e.j=!0})),e.g.currentTime=Math.max(0,e.g.currentTime+e.h))}))},n.release=function(){this.i&&(this.i.release(),this.i=null),this.g=null},n.xe=function(e){this.h=this.j?this.h:e},n.Dd=function(){return(this.j?this.g.currentTime:this.h)||0},n.Pf=function(){return 0},n.Of=function(){return 0},n.rg=function(){},(n=Ts.prototype).we=function(){this.m.Pa(.25)},n.release=function(){this.h&&(this.h.release(),this.h=null),this.j&&(this.j.release(),this.j=null),this.m&&(this.m.stop(),this.m=null),this.i=this.h=this.g=this.l=null,this.A=function(){}},n.xe=function(e){vs(this.h,e)},n.Dd=function(){var e=gs(this.h);return 0<this.i.readyState&&!this.i.paused?ws(this,e):e},n.Pf=function(){return this.o?this.o.o:0},n.Of=function(){return this.j.C},n.rg=function(){this.j.mf()},(n=Cs.prototype).getNumReferences=function(){return this.g.length},n.getNumEvicted=function(){return this.j},n.release=function(){this.o||(this.g=[],this.m&&this.m.stop(),this.m=null)},n.Xh=function(){this.o=!0},n.qc=function(e){for(var t=l(this.g),n=t.next();!n.done;n=t.next())e(n.value)},n.find=function(e){for(var t=this.g.length-1,n=t;0<=n;--n){var r=this.g[n],i=n<t?this.g[n+1].startTime:r.endTime;if(e>=r.startTime&&e<i)return n+this.j}return this.g.length&&e<this.g[0].startTime?this.j:null},n.get=function(e){return 0==this.g.length||0>(e-=this.j)||e>=this.g.length?null:this.g[e]},n.offset=function(e){if(!this.o)for(var t=l(this.g),n=t.next();!n.done;n=t.next())n.value.offset(e)},n.ae=function(e){if(!this.o&&e.length){var t=Math.round(1e3*e[0].startTime)/1e3;this.g=this.g.filter((function(e){return Math.round(1e3*e.startTime)/1e3<t})),this.g.push.apply(this.g,u(e))}},n.kd=function(e,t){var n=this;e=e.filter((function(e){return e.endTime>t&&(0==n.g.length||e.endTime>n.g[0].startTime)})),this.ae(e),this.Ia(t)},n.Ia=function(e){if(!this.o){var t=this.g.length;this.g=this.g.filter((function(t){return t.endTime>e})),this.j+=t-this.g.length}},n.pc=function(e,t,n){if(n=void 0!==n&&n,!this.o){for(;this.g.length&&this.g[this.g.length-1].startTime>=t;)this.g.pop();for(;this.g.length&&this.g[0].endTime<=e;)this.g.shift(),n||this.j++;0!=this.g.length&&((t=new Va((e=this.g[this.g.length-1]).startTime,t,e.C,e.Aa,e.ja,e.ca,e.timestampOffset,e.appendWindowStart,e.appendWindowEnd,e.g,e.tilesLayout,e.A,e.h,e.status,e.aesKey)).mimeType=e.mimeType,t.codecs=e.codecs,t.j=e.j,this.g[this.g.length-1]=t)}},n.le=function(e,t){var n=this;this.o||(this.m&&this.m.stop(),this.m=new Tt((function(){var e=t();e?n.g.push.apply(n.g,u(e)):(n.m.stop(),n.m=null)})),this.m.Pa(e))},Cs.prototype[Symbol.iterator]=function(){return this.xb(0)},Cs.prototype.xb=function(e,t,n){t=void 0!==t&&t,n=void 0!==n&&n;var r=this.find(e);if(null==r)return null;r--;var i=this.get(r+1),a=-1;if(i&&0<i.g.length)for(var o=i.g.length-1;0<=o;--o){var s=i.g[o];if(e>=s.startTime&&e<s.endTime){if(!t){for(;o&&!s.l;)o--,s=i.g[o];if(!s.l)return W("No independent partial segment found!"),null}r++,a=o-1;break}}return new Ps(this,r,a,n)},F("shaka.media.SegmentIndex",Cs),Cs.forSingleSegment=xs,Cs.prototype.getIteratorForTime=Cs.prototype.xb,Cs.prototype.updateEvery=Cs.prototype.le,Cs.prototype.fit=Cs.prototype.pc,Cs.prototype.evict=Cs.prototype.Ia,Cs.prototype.mergeAndEvict=Cs.prototype.kd,Cs.prototype.offset=Cs.prototype.offset,Cs.prototype.get=Cs.prototype.get,Cs.prototype.find=Cs.prototype.find,Cs.prototype.markImmutable=Cs.prototype.Xh,Cs.prototype.release=Cs.prototype.release,Cs.prototype.getNumEvicted=Cs.prototype.getNumEvicted,Cs.prototype.getNumReferences=Cs.prototype.getNumReferences,Ps.prototype.je=function(e){this.reverse=e},Ps.prototype.fh=function(){return this.h},Ps.prototype.current=function(){var e=this.i.get(this.h);return e&&0<e.g.length&&e.o&&this.g>=e.g.length&&(this.h++,this.g=0,e=this.i.get(this.h)),e&&0<e.g.length?e.g[this.g]:e},Ps.prototype.next=function(){var e=this.i.get(this.h);return this.reverse?e&&0<e.g.length?(this.g--,0>this.g&&(this.h--,this.g=(e=this.i.get(this.h))&&0<e.g.length?e.g.length-1:0)):(this.h--,this.g=0):e&&0<e.g.length?(this.g++,e.o&&this.g==e.g.length&&(this.h++,this.g=0)):(this.h++,this.g=0),{value:e=this.current(),done:!e}},F("shaka.media.SegmentIterator",Ps),Ps.prototype.next=Ps.prototype.next,Ps.prototype.current=Ps.prototype.current,Ps.prototype.currentPosition=Ps.prototype.fh,Ps.prototype.setReverse=Ps.prototype.je,y(Rs,Cs),(n=Rs.prototype).clone=function(){var e=new Rs;return e.h=this.h.slice(),e},n.release=function(){for(var e=l(this.h),t=e.next();!t.done;t=e.next())t.value.release();this.h=[]},n.qc=function(e){for(var t=l(this.h),n=t.next();!n.done;n=t.next())n.value.qc(e)},n.find=function(e){for(var t=0,n=l(this.h),r=n.next();!r.done;r=n.next()){var i=(r=r.value).find(e);if(null!=i)return i+t;t+=r.getNumEvicted()+r.getNumReferences()}return null},n.get=function(e){for(var t=0,n=l(this.h),r=n.next();!r.done;r=n.next()){var i=(r=r.value).get(e-t);if(i)return i;i=r.getNumReferences(),t+=r.getNumEvicted()+i}return null},n.offset=function(){},n.ae=function(){},n.Ia=function(){},n.kd=function(){},n.pc=function(){},n.le=function(){},F("shaka.media.MetaSegmentIndex",Rs),Rs.prototype.updateEvery=Rs.prototype.le,Rs.prototype.fit=Rs.prototype.pc,Rs.prototype.mergeAndEvict=Rs.prototype.kd,Rs.prototype.evict=Rs.prototype.Ia,Rs.prototype.merge=Rs.prototype.ae,Rs.prototype.offset=Rs.prototype.offset,Rs.prototype.get=Rs.prototype.get,Rs.prototype.find=Rs.prototype.find,Rs.prototype.forEachTopLevelReference=Rs.prototype.qc,Rs.prototype.release=Rs.prototype.release,Is.prototype.release=function(){this.set(this.Ub()),this.h&&(this.h.stop(),this.h=null),this.g=null},Is.prototype.set=function(e){this.i=e,Ds(this)},Is.prototype.Ub=function(){return this.g.Ub()},Os.prototype.release=function(){this.i.stop();for(var e=l(this.g),t=e.next();!t.done;t=e.next())t.value.release();this.g.clear()},js.prototype.Ia=function(e,t){t=void 0!==t&&t;for(var n=l(this.g.keys()),r=n.next();!r.done;r=n.next())e>(r=r.value).endTime&&Zs(this,r);t&&Ws(this)},qs.prototype.abort=function(){this.ge&&this.ge.abort()},y(Qs,$r),Qs.prototype.release=function(){this.g.clear(),this.h.stop(),$r.prototype.release.call(this)},y($s,$r),$s.prototype.release=function(){this.g.clear(),$r.prototype.release.call(this)},$s.prototype.j=function(e){for(var t=l(this.g.values()),n=t.next();!n.done;n=t.next()){e:{for(var r=(n=n.value).nd,i=r.length-1;0<=i;i--){var a=r[i];if(a.position<=e){r=a.gf;break e}}r=null}if((i=r)&&(i=!((i=n.Wf)===r||i&&r&&i.bandwidth==r.bandwidth&&i.audioSamplingRate==r.audioSamplingRate&&i.codecs==r.codecs&&i.contentType==r.contentType&&i.frameRate==r.frameRate&&i.height==r.height&&i.mimeType==r.mimeType&&i.channelsCount==r.channelsCount&&i.pixelAspectRatio==r.pixelAspectRatio&&i.width==r.width)),i)e:{if(i=e,a=r.contentType,(a=this.h()[a])&&0<a.length){var o=a[a.length-1].end;if(i>=a[0].start&&i<o){i=!0;break e}}i=!1}i&&(n.Wf=r,JSON.stringify(r),n=new qr("qualitychange",new Map([["quality",r],["position",e]])),this.dispatchEvent(n))}},(n=el.prototype).destroy=function(){return this.l.destroy()},n.configure=function(e){if(this.h=e,this.I=new jr({maxAttempts:Math.max(e.retryParameters.maxAttempts,2),baseDelay:e.retryParameters.baseDelay,backoffFactor:e.retryParameters.backoffFactor,fuzzFactor:e.retryParameters.fuzzFactor,timeout:0,stallTimeout:0,connectionTimeout:0},!0),e.disableAudioPrefetch){var t=this.i.get("audio");t&&t.X&&(zs(t.X),t.X=null);for(var n=(t=l(this.o.keys())).next();!n.done;n=t.next())n=n.value,zs(this.o.get(n)),this.o.delete(n)}for(e.disableTextPrefetch&&(t=this.i.get(hn))&&t.X&&(zs(t.X),t.X=null),e.disableVideoPrefetch&&(t=this.i.get("video"))&&t.X&&(zs(t.X),t.X=null),n=(t=l(this.i.keys())).next();!n.done;n=t.next())(n=this.i.get(n.value)).X?(Ys(n.X,e.segmentPrefetchLimit),0<e.segmentPrefetchLimit||(n.X=null)):0<e.segmentPrefetchLimit&&(n.X=sl(this,n.stream));e.disableAudioPrefetch||function(e){for(var t=e.h.segmentPrefetchLimit,n=e.h.prefetchAudioLanguages,r={},i=l(e.m.variants),a=i.next();!a.done;r={Fa:r.Fa},a=i.next())if(r.Fa=a.value,r.Fa.audio)if(e.o.has(r.Fa.audio)){if(Ys(a=e.o.get(r.Fa.audio),t),!(0<t&&n.some(function(e){return function(t){return jn(e.Fa.audio.language,t)}}(r)))){var o=e.i.get(r.Fa.audio.type);a!==(o&&o.X)&&zs(a),e.o.delete(r.Fa.audio)}}else 0>=t||!n.some(function(e){return function(t){return jn(e.Fa.audio.language,t)}}(r))||!(a=sl(e,r.Fa.audio))||(r.Fa.audio.segmentIndex||r.Fa.audio.createSegmentIndex(),e.o.set(r.Fa.audio,a))}(this)},n.start=function(e){var t=this;return I((function(n){if(1==n.g)return b(n,function(e,t){var n,r,i,a,o,s,u,c,d;return I((function(p){if(1==p.g){if(n=yn,!e.j)throw new bt(2,5,5006);return r=new Map,i=new Set,e.j.audio&&(r.set(n.S,e.j.audio),i.add(e.j.audio)),e.j.video&&(r.set(n.fa,e.j.video),i.add(e.j.video)),e.s&&(r.set(n.ma,e.s),i.add(e.s)),b(p,e.g.W.init(r,e.m.sequenceMode,e.m.type,e.m.ignoreManifestTimestampsInSegmentsMode),2)}for(pi(e.l),e.updateDuration(),a=l(r.keys()),o=a.next();!o.done;o=a.next())s=o.value,u=r.get(s),e.i.has(s)||(c=ol(e,u),t.has(u.id)&&(Hs(d=t.get(u.id),(function(t,n,r){return pl(t,n,r||null,e.h.retryParameters,e.g.zb)})),c.X=d),e.i.set(s,c),hl(e,c,0));k(p)}))}(t,e||new Map),2);pi(t.l),t.C=!0,k(n)}))},n.od=function(){if(this.g)for(var e=this.g.Ld(),t=l(this.i.keys()),n=t.next();!n.done;n=t.next()){var r=n.value,i=null;(n=this.i.get(r)).Z&&(i=n.Z.current()),(!i||i.startTime>e||i.endTime<e)&&(n.Z=null),(i=this.g.W).C?i=!1:r==hn?i=null!=(i=i.g).g&&null!=i.h&&(e>=i.g&&e<i.h):i=Ya(i=Wo(i,r),e),i||((null!=zo(this.g.W,r)||n.Na)&&al(this,n),n.$a&&(n.$a.abort(),n.$a=null),r===hn&&((r=this.g.W).H&&r.H.g()),n.od=!0)}},n.updateDuration=function(){var e=this.m.presentationTimeline.getDuration();1/0>e?this.g.W.ab(e):this.g.W.ab(this.h.infiniteLiveStreamDuration?1/0:Math.pow(2,32))},F("shaka.util.ConfigUtils",ml),ml.convertToConfigObject=kl,ml.mergeConfigObjects=bl,F("shaka.util.FairPlayUtils",_l),_l.commonFairPlayResponse=function(e,t){if(2===e){try{var n=Wt(t.data)}catch(e){return}e=!1,"<ckc>"===(n=n.trim()).substr(0,5)&&"</ckc>"===n.substr(-6)&&(n=n.slice(5,-6),e=!0);try{var r=JSON.parse(n);r.ckc&&(n=r.ckc,e=!0),r.CkcMessage&&(n=r.CkcMessage,e=!0),r.License&&(n=r.License,e=!0)}catch(e){}e&&(t.data=he(rn(n)))}},_l.expressplayFairPlayRequest=function(e,t){wl(e,t)},_l.conaxFairPlayRequest=function(e,t){wl(e,t)},_l.ezdrmFairPlayRequest=function(e,t){wl(e,t)},_l.verimatrixFairPlayRequest=function(e,t){2===e&&(e=nn(e=ye(t.body)),t.headers["Content-Type"]="application/x-www-form-urlencoded",t.body=qt("spc="+e))},_l.expressplayInitDataTransform=function(e,t,n){return Sl(e,t,n)},_l.conaxInitDataTransform=function(t,n,r){if("skd"!==n)return t;n=r.serverCertificate,r=Zt(t).split("skd://").pop().split("?").shift(),r=e.atob(r);var i=new ArrayBuffer(2*r.length);i=ge(i);for(var a=0,o=r.length;a<o;a++)i[a]=r.charCodeAt(a);return Al(t,i,n)},_l.ezdrmInitDataTransform=function(e,t,n){return"skd"!==t?e:(t=n.serverCertificate,Al(e,n=Zt(e).split(";").pop(),t))},_l.verimatrixInitDataTransform=function(e,t,n){return Sl(e,t,n)},_l.initDataTransform=Al,_l.defaultGetContentId=Tl,_l.isFairPlaySupported=function(){var e;return I((function(t){return 1==t.g?(e={initDataTypes:["cenc","sinf","skd"],videoCapabilities:[{contentType:'video/mp4; codecs="avc1.42E01E"'}]},E(t,2),b(t,navigator.requestMediaKeySystemAccess("com.apple.fps",[e]),4)):2!=t.g?t.return(!0):(A(t),t.return(!1))}))},F("shaka.util.PlayerConfiguration",Cl),Cl.mergeConfigObjects=Pl,Cl.createDefault=xl,y(Dl,$r),(n=Dl.prototype).getStartTime=function(){return this.Y},n.ad=function(){return this.K},n.Ue=function(){return this.h},n.getStats=function(){return this.aa},n.start=function(){var e,t=this;I((function(n){switch(n.g){case 1:return b(n,Promise.resolve(),2);case 2:return E(n,3),b(n,function(e){var t,n,r,i,a;return I((function(o){if(1==o.g)return Nl(e,"manifest-parser"),e.j||(e.C=Ma(e.K,e.T),e.j=e.C(),e.j.configure(e.g.manifest)),t=Date.now()/1e3,Nl(e,"manifest"),e.h?o.u(2):(n=e,b(o,e.j.start(e.K,e.mb),3));if(2!=o.g&&(n.h=o.h),r=new qr("manifestparsed",void 0),e.dispatchEvent(r),0==e.h.variants.length)throw new bt(2,4,4036);!function(e){function t(e){return e.video&&e.audio||e.video&&e.video.codecs.includes(",")}e.variants.some(t)&&(e.variants=e.variants.filter(t))}(e.h),i=Date.now()/1e3,a=i-t,e.aa.F=a,k(o)}))}(t),5);case 5:return Ml(t),b(n,function(e){var t,n,r;return I((function(i){switch(i.g){case 1:Nl(e,"drm-engine"),e.ta=Date.now()/1e3,e.l=e.lb(),e.B.g=e.l,e.l.configure(e.g.drm);var a=e.B;if(!er(e.h.variants,a.h.restrictions,a.i)){i.u(2);break}return t=new qr("trackschanged",void 0),b(i,Promise.resolve(),3);case 3:Ml(e),e.dispatchEvent(t);case 2:return n=mr(e.h.variants),b(i,ia(e.l,n,e.h.offlineSessionIds),4);case 4:return Ml(e),b(i,Pa(e.B,e.h),5);case 5:if(!i.h){i.u(0);break}return r=new qr("trackschanged",void 0),b(i,Promise.resolve(),7);case 7:e.dispatchEvent(r),k(i)}}))}(t),6);case 6:if(Ml(t),t.o||(t.o=new Mr(t.g.preferredAudioLanguage,t.g.preferredVariantRole,t.g.preferredAudioChannelCount,t.g.preferredVideoHdrLevel,t.g.preferSpatialAudio,t.g.preferredVideoLayout,t.g.preferredAudioLabel,t.g.preferredVideoLabel,t.g.mediaSource.codecSwitchingStrategy,t.g.manifest.dash.enableAudioGroups)),t.Ta){var r=t.g.abrFactory;t.s=r,t.i=r(),t.i.configure(t.g.abr)}if(t.cb){r=t.h.presentationTimeline.R();var i=mr(t.h.variants);i=t.o.create(i),t.i.configure(t.g.abr),t.i.setVariants(Array.from(i.values())),(i=t.i.chooseVariant(!0))&&(t.pa=i,i.video&&Ul(t,i.video,r),i.audio&&Ul(t,i.audio,r))}return b(n,void 0,7);case 7:Ml(t),t.m.resolve(),T(n,0);break;case 3:e=A(n),t.m.reject(e),k(n)}}))},n.dispatchEvent=function(e){return this.L?this.L.dispatchEvent(e):$r.prototype.dispatchEvent.call(this,e)},n.onError=function(e){2===e.severity&&(this.m.reject(e),this.destroy());var t=(new Map).set("detail",e);t=new qr("error",t),this.dispatchEvent(t),t.defaultPrevented&&(e.handled=!0)},n.configure=function(e,t){e=kl(e,t),Pl(this.g,e)},n.getConfiguration=function(){return qn(this.g)},n.Gi=function(){return this.m},n.destroy=function(){var e,t,n=this;return I((function(r){switch(r.g){case 1:if(n.A=!0,!n.j||n.ea){r.u(2);break}return b(r,n.j.stop(),2);case 2:if(!n.i||n.ba){r.u(4);break}return b(r,n.i.stop(),4);case 4:if(n.F&&!n.qa&&n.F.release(),!n.l||n.da){r.u(6);break}return b(r,n.l.destroy(),6);case 6:if(0<n.I.size&&!n.sa)for(e=l(n.I.values()),t=e.next();!t.done;t=e.next())zs(t.value);k(r)}}))},F("shaka.media.PreloadManager",Dl),Dl.prototype.destroy=Dl.prototype.destroy,Dl.prototype.waitForFinish=Dl.prototype.Gi,y(Bl,$r),Bl.prototype.release=function(){this.i=null,this.g.clear(),this.h.release(),this.h=null,$r.prototype.release.call(this)},Bl.prototype.j=function(e,t){if(!this.l||0!=e){this.l=!1;for(var n=l(this.i.g),r=n.next();!r.done;r=n.next()){r=r.value;var i=this.g.get(r),a=e<r.startTime?jl:e>r.endTime?Vl:Hl;this.g.set(r,a);for(var o=l(this.m),s=o.next();!s.done;s=o.next())(s=s.value).lc==i&&s.kc==a&&s.$b(r,t)}}};var jl=1,Hl=2,Vl=3;function Gl(e,t,n){var r,i,a,o,s,l,u;return I((function(c){switch(c.g){case 1:var d=new rt(e).Ma.split("/").pop().split(".");return r=1==d.length?"":d.pop().toLowerCase(),(i=Kl[r])?c.return(i):(a=0,o=ri([e],n),E(c,2),o.method="HEAD",b(c,t.request(a,o).promise,4));case 4:s=c.h,i=s.headers["content-type"],T(c,3);break;case 2:if(!(l=A(c))||1002!=l.code&&1001!=l.code){c.u(3);break}return o.method="GET",b(c,t.request(a,o).promise,6);case 6:u=c.h,i=u.headers["content-type"];case 3:return c.return(i?i.toLowerCase().split(";").shift():"")}}))}var Kl={mp4:"video/mp4",m4v:"video/mp4",m4a:"audio/mp4",webm:"video/webm",weba:"audio/webm",mkv:"video/webm",ts:"video/mp2t",ogv:"video/ogg",ogg:"audio/ogg",mpg:"video/mpeg",mpeg:"video/mpeg",m3u8:"application/x-mpegurl",mpd:"application/dash+xml",ism:"application/vnd.ms-sstr+xml",mp3:"audio/mpeg",aac:"audio/aac",flac:"audio/flac",wav:"audio/wav",sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",ssa:"text/x-ssa",ass:"text/x-ssa"};function zl(e,t){if(e.lineBreak)return"\n";if(e.nestedCues.length)return e.nestedCues.map((function(t){return zl(t,e)})).join("");var n=[],r=700<=e.fontWeight,i="italic"==e.fontStyle,a=e.textDecoration.includes("underline");return r&&n.push(["b"]),i&&n.push(["i"]),a&&n.push(["u"]),""==(i=e.color)&&t&&(i=t.color),r="",(i=Wl(i))&&(r+="."+i),""==(i=e.backgroundColor)&&t&&(i=t.backgroundColor),(t=Wl(i))&&(r+=".bg_"+t),r&&n.push(["c",r]),n.reduceRight((function(e,t){var n=l(t);return"<"+(t=n.next().value)+(void 0===(n=n.next().value)?"":n)+">"+e+"</"+t+">"}),e.payload)}function Wl(e){var t=(e=e.toLowerCase()).replace(/\s/g,"").match(/^rgba?\((\d+),(\d+),(\d+),?([^,\s)]+)?/i);switch(t?e="#"+(256|parseInt(t[1],10)).toString(16).slice(1)+(256|parseInt(t[2],10)).toString(16).slice(1)+(256|parseInt(t[3],10)).toString(16).slice(1):e.startsWith("#")&&7<e.length&&(e=e.slice(0,7)),e){case"white":case"#fff":case"#ffffff":return"white";case"lime":case"#0f0":case"#00ff00":return"lime";case"cyan":case"#0ff":case"#00ffff":return"cyan";case"red":case"#f00":case"#ff0000":return"red";case"yellow":case"#ff0":case"#ffff00":return"yellow";case"magenta":case"#f0f":case"#ff00ff":return"magenta";case"blue":case"#00f":case"#0000ff":return"blue";case"black":case"#000":case"#000000":return"black"}return null}function Yl(e,t){for(var n=[],r=(e=l(e)).next();!r.done;r=e.next())if((r=r.value).isContainer)n.push.apply(n,u(Yl(r.nestedCues,r)));else{var i=r.clone();i.nestedCues=[],i.payload=zl(r,t),n.push(i)}return n}function Zl(e,t){this.g=null;for(var n=l(Array.from(e.textTracks)),r=n.next();!r.done;r=n.next())(r=r.value).mode="disabled",r.label==t&&(this.g=r);this.g||(this.g=e.addTextTrack("subtitles",t)),this.g.mode="hidden"}function ql(e){if(e.startTime>=e.endTime)return null;var t=new VTTCue(e.startTime,e.endTime,e.payload);t.lineAlign=e.lineAlign,t.positionAlign=e.positionAlign,e.size&&(t.size=e.size);try{t.align=e.textAlign}catch(e){}return"center"==e.textAlign&&"center"!=t.align&&(t.align="middle"),"vertical-lr"==e.writingMode?t.vertical="lr":"vertical-rl"==e.writingMode&&(t.vertical="rl"),1==e.lineInterpretation&&(t.snapToLines=!1),null!=e.line&&(t.line=e.line),null!=e.position&&(t.position=e.position),t}function Xl(e,t){var n=e.mode;e.mode="showing"==n?"showing":"hidden";for(var r=l(Array.from(e.cues)),i=r.next();!i.done;i=r.next())(i=i.value)&&t(i)&&e.removeCue(i);e.mode=n}function Ql(){}function $l(){}function Jl(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function eu(t,n,r){var i=this;this.m=!1,this.h=[],this.A=t,this.s=n,this.l=null,this.g=document.createElement("div"),this.g.classList.add("shaka-text-container"),this.g.style.textAlign="center",this.g.style.display="flex",this.g.style.flexDirection="column",this.g.style.alignItems="center",this.g.style.justifyContent="flex-end",this.s.appendChild(this.g),r&&r.captionsUpdatePeriod||ae("UITextDisplayer w/ config","Please migrate to initializing UITextDisplayer with a config."),this.C=new Tt((function(){i.A.paused||ru(i)})).Pa(r&&r.captionsUpdatePeriod?r.captionsUpdatePeriod:.25),this.i=new Map,this.j=new $,this.j.D(document,"fullscreenchange",(function(){ru(i,!0)})),this.j.D(this.A,"seeking",(function(){ru(i,!0)})),this.j.D(this.A,"resize",(function(){var e=i.A,t=e.videoWidth;e=e.videoHeight,i.l=t&&e?t/e:null})),this.o=null,"ResizeObserver"in e&&(this.o=new ResizeObserver((function(){ru(i,!0)})),this.o.observe(this.g)),this.B=new Map}function tu(e,t){for(;null!=t;){if(t==e.g)return!0;t=t.parentElement}return!1}function nu(e,t,n,r,i){for(var a=!1,o=[],s=[],u=(t=l(t)).next();!u.done;u=t.next()){u=u.value,i.push(u);var c=e.i.get(u),d=u.startTime<=r&&u.endTime>r,p=c?c.Og:null;c&&(o.push(c.De),c.ec&&o.push(c.ec),d||(a=!0,e.i.delete(u),c=null)),d&&(s.push(u),c?tu(e,p)||(a=!0):(iu(e,u,i),p=(c=e.i.get(u)).Og,a=!0)),0<u.nestedCues.length&&p&&nu(e,u.nestedCues,p,r,i),i.pop()}if(a){for(i=(r=l(o)).next();!i.done;i=r.next())(i=i.value).parentElement&&i.parentElement.removeChild(i);for(s.sort((function(e,t){return e.startTime!=t.startTime?e.startTime-t.startTime:e.endTime-t.endTime})),u=(s=l(s)).next();!u.done;u=s.next())(r=e.i.get(u.value)).ec?(r.ec.contains(n)&&r.ec.removeChild(n),n.appendChild(r.ec),r.ec.appendChild(r.De)):n.appendChild(r.De)}}function ru(e,t){if(e.g){var n=e.A.currentTime;if(!e.m||void 0!==t&&t){for(var r=(t=l(e.B.values())).next();!r.done;r=t.next())Jl(r.value);Jl(e.g),e.i.clear(),e.B.clear()}e.m&&nu(e,e.h,e.g,n,[])}}function iu(e,t,n){var r=1<n.length,i=r?"span":"div";t.lineBreak&&(i="br"),t.rubyTag&&(i=t.rubyTag),r=!r&&0<t.nestedCues.length;var a=document.createElement(i);if("br"!=i&&function(e,t,n,r,i){var a=t.style,o=0==n.nestedCues.length,s=1<r.length;a.whiteSpace="pre-wrap";var l=n.payload.replace(/\s+$/g,(function(e){return" ".repeat(e.length)}));if(a.webkitTextStrokeColor=n.textStrokeColor,a.webkitTextStrokeWidth=n.textStrokeWidth,a.color=n.color,a.direction=n.direction,a.opacity=n.opacity,a.paddingLeft=au(n.linePadding,n,e.s),a.paddingRight=au(n.linePadding,n,e.s),a.textCombineUpright=n.textCombineUpright,a.textShadow=n.textShadow,n.backgroundImage)a.backgroundImage="url('"+n.backgroundImage+"')",a.backgroundRepeat="no-repeat",a.backgroundSize="contain",a.backgroundPosition="center",a.width="100%",a.height="100%";else{if(n.nestedCues.length)var u=t;else u=document.createElement("span"),t.appendChild(u);n.border&&(u.style.border=n.border),!i&&((t=ou(r,(function(e){return e.backgroundColor})))?u.style.backgroundColor=t:l&&(u.style.backgroundColor="rgba(0, 0, 0, 0.8)"),t=ou(r,(function(e){return e.fontFamily})))&&(u.style.fontFamily=t),l&&(u.textContent=l)}s&&!r[r.length-1].isContainer?a.display="inline":(a.display="flex",a.flexDirection="column",a.alignItems="center",a.justifyContent="before"==n.displayAlign?"flex-start":"center"==n.displayAlign?"center":"flex-end"),o||(a.margin="0"),a.fontFamily=n.fontFamily,a.fontWeight=n.fontWeight.toString(),a.fontStyle=n.fontStyle,a.letterSpacing=n.letterSpacing,a.fontSize=au(n.fontSize,n,e.s),r=n.line,null!=r&&(o=n.lineInterpretation,o==Ue&&(o=1,s=16,e.l&&1>e.l&&(s=32),r=0>r?100+r/s*100:r/s*100),1==o&&(a.position="absolute",n.writingMode==Ne?(a.width="100%",n.lineAlign==Be?a.top=r+"%":"end"==n.lineAlign&&(a.bottom=100-r+"%")):"vertical-lr"==n.writingMode?(a.height="100%",n.lineAlign==Be?a.left=r+"%":"end"==n.lineAlign&&(a.right=100-r+"%")):(a.height="100%",n.lineAlign==Be?a.right=r+"%":"end"==n.lineAlign&&(a.left=100-r+"%")))),a.lineHeight=n.lineHeight,null!=n.position&&(n.writingMode==Ne?a.paddingLeft=n.position:a.paddingTop=n.position),e=function(e){var t=e.direction,n=e.positionAlign;return e=e.textAlign,n!==Re?n:"left"===e||"start"===e&&t===Me||"end"===e&&"rtl"===t?"line-left":"right"===e||"start"===e&&"rtl"===t||"end"===e&&t===Me?"line-right":"center"}(n),"line-left"==e?a.cssFloat="left":"line-right"==e&&(a.cssFloat="right"),a.textAlign=n.textAlign,a.textDecoration=n.textDecoration.join(" "),a.writingMode=n.writingMode,"writingMode"in document.documentElement.style&&a.writingMode==n.writingMode||(a.webkitWritingMode=n.writingMode),n.size&&(n.writingMode==Ne?a.width=n.size+"%":a.height=n.size+"%")}(e,a,t,n,r),n=null,t.region&&t.region.id){n=t.region,i=e.l===4/3?2.5:1.9;var o=n.id+"_"+n.width+"x"+n.height+(n.heightUnits==We?"%":"px")+"-"+n.viewportAnchorX+"x"+n.viewportAnchorY+(n.viewportAnchorUnits==We?"%":"px");if(e.B.has(o))n=e.B.get(o);else{var s=document.createElement("span"),l=n.heightUnits==We?"%":"px",u=n.widthUnits==We?"%":"px",c=n.viewportAnchorUnits==We?"%":"px";s.id="shaka-text-region---"+o,s.classList.add("shaka-text-region"),s.style.position="absolute",2===n.heightUnits&&2===n.widthUnits?(s.style.height=5.33*n.height+"%",s.style.width=n.width*i+"%"):(s.style.height=n.height+l,s.style.width=n.width+u),2===n.viewportAnchorUnits?(l=n.viewportAnchorY/75*100,u=n.viewportAnchorX/(e.l===4/3?160:210)*100,l-=n.regionAnchorY*n.height*5.33/100,u-=n.regionAnchorX*n.width*i/100,s.style.top=l+"%",s.style.left=u+"%"):(s.style.top=n.viewportAnchorY-n.regionAnchorY*n.height/100+c,s.style.left=n.viewportAnchorX-n.regionAnchorX*n.width/100+c),s.style.display="flex",s.style.flexDirection="column",s.style.alignItems="center",s.style.justifyContent="before"==t.displayAlign?"flex-start":"center"==t.displayAlign?"center":"flex-end",e.B.set(o,s),n=s}}i=a,r&&((i=document.createElement("span")).classList.add("shaka-text-wrapper"),i.style.backgroundColor=t.backgroundColor,i.style.lineHeight="normal",a.appendChild(i)),e.i.set(t,{De:a,Og:i,ec:n})}function au(e,t,n){var r=(r=new RegExp(/(\d*\.?\d+)([a-z]+|%+)/).exec(e))?{value:Number(r[1]),unit:r[2]}:null;if(!r)return e;var i=r.value;switch(r.unit){case"%":return i/100*n.clientHeight/t.cellResolution.rows+"px";case"c":return n.clientHeight*i/t.cellResolution.rows+"px";default:return e}}function ou(e,t){for(var n=e.length-1;0<=n;n--){var r=t(e[n]);if(r||0===r)return r}return null}function su(e,t){this.h=e,this.g=t,this.m=void 0,this.i=!1,this.l=!0,this.j=!1}function lu(t){return t.g.sessionId||(t.g.sessionId=e.crypto.randomUUID()),{v:1,sf:t.m,sid:t.g.sessionId,cid:t.g.contentId,mtp:t.h.getBandwidthEstimate()/1e3}}function uu(e,t,n){n=void 0===n?{}:n;var r=void 0===r?e.g.useHeaders:r;if(e.g.enabled){Object.assign(n,lu(e)),n.pr=e.h.eb();var i=n.ot===yu||n.ot===gu;if(e.j&&i&&(n.bs=!0,n.su=!0,e.j=!1),null==n.su&&(n.su=e.l),e=function(e,t){var n=e.g.includeKeys;return n.length?Object.keys(t).reduce((function(e,r){return n.includes(r)&&(e[r]=t[r]),e}),{}):t}(e,n),r)r=function(e){for(var t=Object.keys(e),n={},r=["Object","Request","Session","Status"],i=[{},{},{},{}],a={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,bs:3,rtp:3},o=(t=l(t)).next();!o.done;o=t.next())o=o.value,i[null!=a[o]?a[o]:1][o]=e[o];for(e=0;e<i.length;e++)(a=du(i[e]))&&(n["CMCD-"+r[e]]=a);return n}(e),Object.keys(r).length&&Object.assign(t.headers,r);else{var a=du(e);a&&(t.uris=t.uris.map((function(e){return pu(e,a)})))}}}function cu(e,t){if(!(t=e.h.ob()[t]).length)return 0;var n=e.h.getCurrentTime();return(e=t.find((function(e){return e.start<=n&&e.end>=n})))?1e3*(e.end-n):0}function du(e){function t(e){return 100*n(e/100)}function n(e){return Math.round(e)}for(var r,i=[],a={br:n,d:n,bl:t,dl:t,mtp:t,nor:function(e){return encodeURIComponent(e)},rtp:t,tb:n},o=Object.keys(e||{}).sort(),s=(o=l(o)).next();!s.done;s=o.next()){var u=e[s=s.value];if(!(r=u,Number.isNaN(r)||null==r||""===r||!1===r||"v"===s&&1===u||"pr"==s&&1===u)){var c=a[s];c&&(u=c(u));var d;d="string"===(c=typeof u)&&"ot"!==s&&"sf"!==s&&"st"!==s?s+"="+JSON.stringify(u):"boolean"===c?s:"symbol"===c?s+"="+u.description:s+"="+u,i.push(d)}}return i.join(",")}function pu(e,t){return!t||e.includes("offline:")?e:((e=new rt(e)).g.set("CMCD",t),e.toString())}(n=Zl.prototype).configure=function(){},n.remove=function(e,t){return!!this.g&&(Xl(this.g,(function(n){return n.startTime<t&&n.endTime>e})),!0)},n.append=function(e){var t=Yl(e),n=[];e=this.g.cues?Array.from(this.g.cues):[];for(var r={},i=(t=l(t)).next();!i.done;r={nc:r.nc},i=t.next())r.nc=i.value,e.some(function(e){return function(t){return t.startTime==e.nc.startTime&&t.endTime==e.nc.endTime&&t.text==e.nc.payload}}(r))||(i=ql(r.nc))&&n.push(i);for(r=(e=l(e=n.slice().sort((function(e,t){return e.startTime!=t.startTime?e.startTime-t.startTime:e.endTime!=t.endTime?e.endTime-t.startTime:"line"in VTTCue.prototype?n.indexOf(t)-n.indexOf(e):n.indexOf(e)-n.indexOf(t)})))).next();!r.done;r=e.next())this.g.addCue(r.value)},n.destroy=function(){return this.g&&(Xl(this.g,(function(){return!0})),this.g.mode="disabled"),this.g=null,Promise.resolve()},n.isTextVisible=function(){return"showing"==this.g.mode},n.setTextVisibility=function(e){this.g.mode=e?"showing":"hidden"},F("shaka.text.SimpleTextDisplayer",Zl),Zl.prototype.setTextVisibility=Zl.prototype.setTextVisibility,Zl.prototype.isTextVisible=Zl.prototype.isTextVisible,Zl.prototype.destroy=Zl.prototype.destroy,Zl.prototype.append=Zl.prototype.append,Zl.prototype.remove=Zl.prototype.remove,Zl.prototype.configure=Zl.prototype.configure,(n=Ql.prototype).configure=function(){},n.remove=function(){},n.append=function(){},n.destroy=function(){},n.isTextVisible=function(){return!1},n.setTextVisibility=function(){},F("shaka.text.StubTextDisplayer",Ql),Ql.prototype.setTextVisibility=Ql.prototype.setTextVisibility,Ql.prototype.isTextVisible=Ql.prototype.isTextVisible,Ql.prototype.destroy=Ql.prototype.destroy,Ql.prototype.append=Ql.prototype.append,Ql.prototype.remove=Ql.prototype.remove,Ql.prototype.configure=Ql.prototype.configure,F("shaka.util.Dom",$l),$l.removeAllChildren=Jl,(n=eu.prototype).configure=function(e){this.C&&this.C.Pa(e.captionsUpdatePeriod)},n.append=function(e){for(var t=[].concat(u(this.h)),n={},r=(e=l(e)).next();!r.done;n={ud:n.ud},r=e.next())n.ud=r.value,t.some(function(e){return function(t){return Pe(t,e.ud)}}(n))||this.h.push(n.ud);ru(this)},n.destroy=function(){return this.g?(this.s.removeChild(this.g),this.g=null,this.m=!1,this.h=[],this.C&&this.C.stop(),this.i.clear(),this.j&&(this.j.release(),this.j=null),this.o&&(this.o.disconnect(),this.o=null),Promise.resolve()):Promise.resolve()},n.remove=function(e,t){if(!this.g)return!1;var n=this.h.length;return this.h=this.h.filter((function(n){return n.startTime<e||n.endTime>=t})),ru(this,n>this.h.length),!0},n.isTextVisible=function(){return this.m},n.setTextVisibility=function(e){this.m=e},F("shaka.text.UITextDisplayer",eu),eu.prototype.setTextVisibility=eu.prototype.setTextVisibility,eu.prototype.isTextVisible=eu.prototype.isTextVisible,eu.prototype.remove=eu.prototype.remove,eu.prototype.destroy=eu.prototype.destroy,eu.prototype.append=eu.prototype.append,eu.prototype.configure=eu.prototype.configure,F("shaka.text.WebVttGenerator",(function(){})),su.prototype.configure=function(e){this.g=e};var fu="m",hu="a",yu="v",gu="av",vu="i",mu="c",bu="tt";function ku(e){this.h=e,this.g=null}function Eu(e){return!e||"false"!==e.toLowerCase()&&(/^[-0-9]/.test(e)?parseInt(e,10):e.replace(/["]+/g,""))}F("shaka.util.CmcdManager.StreamingFormat",{DASH:"d",HLS:"h",Qg:"s",OTHER:"o"}),(n=ku.prototype).configure=function(e){this.h=e},n.fg=function(){return this.h.enabled&&this.h.applyMaximumSuggestedBitrate&&this.g&&this.g.has(Tu)?1e3*this.g.get(Tu):null},n.eg=function(){return this.h.enabled&&this.g&&this.g.has(_u)?1e3*this.g.get(_u):null},n.yh=function(){return this.h.enabled&&this.g&&this.g.has(Au)?this.g.get(Au):null},n.zh=function(){return this.h.enabled&&this.g&&this.g.has(Su)?this.g.get(Su):null},n.getBandwidthEstimate=function(e){var t=this.eg();if(!t)return e;var n=this.h.estimatedThroughputWeightRatio;return 0<n&&1>=n?e*(1-n)+t*n:e},F("shaka.util.CmsdManager",ku),ku.prototype.getBandwidthEstimate=ku.prototype.getBandwidthEstimate,ku.prototype.getRoundTripTime=ku.prototype.zh,ku.prototype.getResponseDelay=ku.prototype.yh,ku.prototype.getEstimatedThroughput=ku.prototype.eg,ku.prototype.getMaxBitrate=ku.prototype.fg;var _u="etp",Tu="mb",Au="rd",Su="rtt";function wu(){this.g=null,this.h=[]}function Cu(e,t){return I((function(n){if(1==n.g)return e.g?b(n,new Promise((function(t){return e.h.push(t)})),2):n.u(2);e.g=t,k(n)}))}function xu(t,n){$r.call(this);var r=this;this.l=_c,this.Rd=this.g=null,this.da=!1,this.Yd=new $,this.Rb=new $,this.m=new $,this.ta=new $,this.C=this.F=this.B=this.G=null,this.ce=0,this.Y=new wu,this.ea=this.kf=this.qa=this.i=this.Ra=this.I=this.j=this.lb=this.K=this.wg=this.aa=this.T=this.mb=this.L=this.Td=this.H=this.cb=null,this.Ta=!1,this.pa=this.o=null,this.uf=1e9,this.$c=[],this.N=NaN,this.h=Qu(this),this.ba={width:1/0,height:1/0},this.Pd=new xa(this.h,this.ba,null),this.nf=[],this.s=null,this.sa=new Mr(this.h.preferredAudioLanguage,this.h.preferredVariantRole,this.h.preferredAudioChannelCount,this.h.preferredVideoHdrLevel,this.h.preferSpatialAudio,this.h.preferredVideoLayout,this.h.preferredAudioLabel,this.h.preferredVideoLabel,this.h.mediaSource.codecSwitchingStrategy,this.h.manifest.dash.enableAudioGroups),this.Sa=this.h.preferredTextLanguage,this.Zc=this.h.preferredTextRole,this.Yc=this.h.preferForcedSubs,this.Xc=[],n&&n(this),this.T=function(e){return new su({getBandwidthEstimate:function(){return e.o?e.o.getBandwidthEstimate():NaN},ob:function(){return e.ob()},getCurrentTime:function(){return e.g?e.g.currentTime:0},eb:function(){return e.eb()},Wb:function(){return e.Wb()},Ib:function(){return e.Ib()},R:function(){return e.R()}},e.h.cmcd)}(this),this.aa=new ku(this.h.cmsd),this.G=ju(this),this.G.Ef(this.h.streaming.forceHTTPS),this.A=null,Cc&&(this.A=Cc(),this.A.configure(this.h.ads)),this.Yd.D(e,"online",(function(){fc(r),r.xf()})),this.Ud=new Tt((function(){return function(e){function t(e){var t="";return e.video&&(t+="video:"+e.video.id),e.audio&&(t=t+(t?"&":"")+"audio:"+e.audio.id),t}for(var n=Date.now()/1e3,r=!1,i=l(e.i.variants),a=i.next();!a.done;a=i.next())0<(a=a.value).disabledUntilTime&&a.disabledUntilTime<=n&&(a.disabledUntilTime=0,r=!0,t(a));e.i.variants.every((function(e){return 0===e.disabledUntilTime}))&&e.Ud.stop(),r&&ac(e,!0,void 0,!1,!1)}(r)})),t&&(ae("Player w/ mediaElement","Please migrate from initializing Player with a mediaElement; use the attach method instead."),this.Sc(t,!0))}function Pu(e){null!=e.K&&(Io(e.K),e.K.release(),e.K=null)}function Ru(e,t){return new qr(e,t)}function Iu(e,t){e.dispatchEvent(Ru("onstatechange",(new Map).set("state",t)))}function Du(e,t){var n;return I((function(r){return 1==r.g?(n=++e.ce,b(r,Cu(e.Y,t),2)):n!=e.ce?(e.Y.release(),r.return(!0)):r.return(!1)}))}function Ou(e,t,n,r,i){var a,o,s;return i=void 0!==i&&i,I((function(l){return 1==l.g?(a=Date.now()/1e3,r?l.u(2):b(l,Mu(e,t),3)):(2!=l.g&&(r=l.h),function(e,t){if(!At())return!0;if(t){if(""==(e.g||Vt()).canPlayType(t))return!1;if(!At()||!(t in Na))return!0;if(Cn(t)){if(e.h.streaming.preferNativeHls)return!0;if(Nt()&&(e.h.drm.servers["com.apple.fps"]||e.h.drm.servers["com.apple.fps.1_0"]))return e.h.streaming.useNativeHlsForFairPlay;if(Nt())return e.h.streaming.useNativeHlsOnSafari}}return!1}(e,r)?l.return(null):(o=!1,s=!0,i&&(e.o&&e.pa==e.h.abrFactory&&(s=!1),e.g&&"AUDIO"===e.g.nodeName&&(o=!0)),l.return(Lu(e,t,n,r||null,a,!i,o,s))))}))}function Lu(t,n,r,i,a,o,s,u){var c,d,p,f,h,y,g,v,m,_,S,w,C;return o=void 0===o||o,s=void 0!==s&&s,u=void 0===u||u,I((function(x){return 1==x.g?(c=null,d=qn(t.h),s&&(d.manifest.disableVideo=!0),p=function(){return c.N&&c.A?null:c},f=function(){return p()?p().getConfiguration():t.h},h=function(e,n){p()?c.configure(e,n):t.configure(e,n)},1/0!=t.ba.width||1/0!=t.ba.height?x.u(2):b(x,function(){var t,n,r,i,a,o,s,l,u,c,d,p;return I((function(f){switch(f.g){case 1:if(t={width:1/0,height:1/0},Lt()){if(c=e.cast&&cast.__platform__&&cast.__platform__.canDisplayType,t.width=1280,t.height=720,E(f,15),!(d=c)){f.u(17);break}return b(f,cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160'),18)}if(Pt()){t.width=1920,t.height=1080;try{webapis.systeminfo&&webapis.systeminfo.getMaxVideoResolution?(n=webapis.systeminfo.getMaxVideoResolution(),t.width=n.width,t.height=n.height):webapis.productinfo.is8KPanelSupported&&webapis.productinfo.is8KPanelSupported()?(t.width=7680,t.height=4320):webapis.productinfo.isUdPanelSupported&&webapis.productinfo.isUdPanelSupported()&&(t.width=3840,t.height=2160)}catch(e){Y("Tizen: Error detecting screen size, default screen size 1920x1080.")}f.u(3);break}if(xt()){r=new Windows.Media.Protection.ProtectionCapabilities,i=Windows.Media.Protection.ProtectionCapabilityResult,a=null;try{do{a=r.isTypeSupported('video/mp4;codecs="hvc1,mp4a";features="decode-res-x=3840,decode-res-y=2160,decode-bitrate=20000,decode-fps=30,decode-bpc=10,display-res-x=3840,display-res-y=2160,display-bpc=8"',"com.microsoft.playready.recommendation")}while(a===i.maybe)}catch(e){a=i.notSupported}a===i.probably?(t.width=3840,t.height=2160):(t.width=1920,t.height=1080),f.u(3);break}if(Dt()){try{o=JSON.parse(e.PalmSystem.deviceInfo),t.width=Math.max(1920,o.screenWidth),t.height=Math.max(1080,o.screenHeight)}catch(e){Y("WebOS: Error detecting screen size, default screen size 1920x1080."),t.width=1920,t.height=1080}f.u(3);break}if(Ft()){e.Hisense_Get4KSupportState&&e.Hisense_Get4KSupportState()?(t.width=3840,t.height=2160):(t.width=1920,t.height=1080),f.u(3);break}if(!Bt()&&!Ut()){f.u(3);break}return s=!1,E(f,9),b(f,e.msdk.device.getDisplayInfo(),11);case 11:l=f.h,s="4K"===l.resolution,T(f,10);break;case 9:return A(f),E(f,12),b(f,e.msdk.device.getDisplayInfoImmediate(),14);case 14:u=f.h,s="4K"===u.resolution,T(f,10);break;case 12:Y("PlayStation: Failed to get the display info:",A(f));case 10:s?(t.width=3840,t.height=2160):(t.width=1920,t.height=1080),f.u(3);break;case 18:d=f.h;case 17:if(d){t.width=3840,t.height=2160,f.u(19);break}if(!(p=c)){f.u(20);break}return b(f,cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=1920; height=1080'),21);case 21:p=f.h;case 20:p&&(t.width=1920,t.height=1080);case 19:T(f,3);break;case 15:W("Failed to check canDisplayType:",A(f));case 3:return f.return(t)}}))}(),3)):(2!=x.g&&(y=x.h,t.ba.width=y.width,t.ba.height=y.height),g=new xa(d,t.ba,null),v={networkingEngine:t.G,filter:function(e){var t;return I((function(n){return 1==n.g?b(n,Pa(g,e),2):4!=n.g?n.h?(t=Ru("trackschanged"),b(n,Promise.resolve(),4)):n.u(0):(c.dispatchEvent(t),void k(n))}))},makeTextStreamsForClosedCaptions:function(e){return function(e,t){for(var n=new Set,r=l(t.textStreams),i=r.next();!i.done;i=r.next())"application/cea-608"!=(i=i.value).mimeType&&"application/cea-708"!=i.mimeType||n.add(i.originalId);for(r=l(t.variants),i=r.next();!i.done;i=r.next())if((i=i.value.video)&&i.closedCaptions)for(var a=l(i.closedCaptions.keys()),o=a.next();!o.done;o=a.next())if(o=o.value,!n.has(o)){var s=o.startsWith("CC")?"application/cea-608":"application/cea-708",u=new Rs,c=i.closedCaptions.get(o);s={id:e.uf++,originalId:o,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:u,mimeType:s,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:c,originalLanguage:c,label:null,type:hn,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:i.roles,forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set([mn(s,"")])},t.textStreams.push(s),n.add(o)}}(t,e)},onTimelineRegionAdded:function(e){var t=c.F;e:{for(var n=l(t.g),r=n.next();!r.done;r=n.next())if((r=r.value).schemeIdUri==e.schemeIdUri&&r.id==e.id&&r.startTime==e.startTime&&r.endTime==e.endTime){n=r;break e}n=null}null==n&&(t.g.add(e),e=new qr("regionadd",new Map([["region",e]])),t.dispatchEvent(e))},onEvent:function(e){return c.dispatchEvent(e)},onError:function(e){return c.onError(e)},isLowLatencyMode:function(){return f().streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return f().streaming.autoLowLatencyMode},enableLowLatencyMode:function(){h("streaming.lowLatencyMode",!0)},updateDuration:function(){t.j&&c.N&&t.j.updateDuration()},newDrmInfo:function(e){var t=c.l,n=t?t.g:null;n&&t.s&&Ia(g,n.keySystem,e)},onManifestUpdated:function(){var e=(new Map).set("isLive",t.R());c.dispatchEvent(Ru("manifestupdated",e)),Ol(c,!1,(function(){t.A&&t.A.onManifestUpdated(t.R())}))},getBandwidthEstimate:function(){return t.o.getBandwidthEstimate()}},(m=new Qs((function(){return t.Jb()}))).addEventListener("regionadd",(function(e){var n=e.region;yc(t,"timelineregionadded",n,c),Ol(c,!1,(function(){t.A&&t.A.onDashTimedMetadata(n)}))})),_=null,d.streaming.observeQualityChanges&&(_=new $s((function(){return t.ob()}))).addEventListener("qualitychange",(function(e){var n=e.quality;e=e.position,n=(new Map).set("mediaQuality",{bandwidth:n.bandwidth,audioSamplingRate:n.audioSamplingRate,codecs:n.codecs,contentType:n.contentType,frameRate:n.frameRate,height:n.height,mimeType:n.mimeType,channelsCount:n.channelsCount,pixelAspectRatio:n.pixelAspectRatio,width:n.width}).set("position",e),t.dispatchEvent(Ru("mediaqualitychanged",n))})),S=!0,w={zb:t.G,onError:function(e){return c.onError(e)},fe:function(e){Ol(c,!0,(function(){var n=e,r=Ru("keystatuschanged");t.dispatchEvent(r);var i=Object.keys(n);1==i.length&&""==i[0]&&(i=["00"],n={"00":n[""]}),r=1==i.length&&"00"==i[0];var a=!1;if(i.length)for(var o=(i=l(t.i.variants)).next();!o.done;o=i.next()){var s=[];(o=o.value).audio&&s.push(o.audio),o.video&&s.push(o.video);for(var u=(s=l(s)).next();!u.done;u=s.next()){var c=u.value;if(u=o.allowedByKeySystem,c.keyIds.size){o.allowedByKeySystem=!0;for(var d=(c=l(c.keyIds)).next();!d.done;d=c.next())d=d.value,((d=n[r?"00":d])||t.B.F)&&(o.allowedByKeySystem=o.allowedByKeySystem&&!!d&&!Oa.includes(d))}u!=o.allowedByKeySystem&&(a=!0)}}a&&(lc(t),!rc(t))||(n=t.j.j)&&!n.allowedByKeySystem&&ac(t)}))},onExpirationUpdated:function(e,t){var n=Ru("expirationupdated");c.dispatchEvent(n),(n=c.j)&&n.onExpirationUpdated&&n.onExpirationUpdated(e,t)},onEvent:function(e){c.dispatchEvent(e),"drmsessionupdate"==e.type&&S&&(S=!1,e=Date.now()/1e3-c.ta,(t.s||c.getStats()).j=e,t.K&&Io(t.K))}},C=ju(t,p),function(e,t){for(var n=l(e.g),r=n.next();!r.done;r=n.next())t.g.add(r.value);for(r=(e=l(e.h)).next();!r.done;r=e.next())t.h.add(r.value)}(t.G,C),c=new Dl(n,i,a,r,{config:d,Vh:v,ei:m,di:_,oc:function(){return t.oc(w)},Uh:g,networkingEngine:C,Xg:o,Wg:u}),t.nf.push(c),x.return(c))}))}function Mu(e,t){var n,r;return I((function(i){return 1==i.g?(n=e.h.manifest.retryParameters,b(i,Gl(t,e.G,n),2)):("application/x-mpegurl"==(r=i.h)&&Nt()&&(r="application/vnd.apple.mpegurl"),i.return(r))}))}function Nu(e){var t,n,r,i,a;return I((function(o){if(1==o.g)return Iu(e,"media-source"),t=e.h.textDisplayFactory,(n=t()).configure?n.configure(e.h.textDisplayer):ae("Text displayer w/ configure",'Text displayer should have a "configure" method!'),e.tf=t,r=function(e,t,n,r){return new Fo(e,t,n,r)}(e.g,n,(function(t,n,r){Uu(e,t,n,r)}),e.K),r.configure(e.h.mediaSource),i=e.h.manifest,a=i.segmentRelativeVttTiming,r.ba=a,b(o,r.L,2);e.F=r,k(o)}))}function Uu(e,t,n,r){for(var i=(t=l(t)).next();!i.done;i=t.next())if((i=i.value).data&&i.cueTime&&i.frames){var a=i.cueTime+n,o=r;o&&a>o&&(o=a);for(var s=l(i.frames),u=s.next();!u.done;u=s.next())Bu(e,a,o,"org.id3",u.value);e.A&&e.A.onHlsTimedMetadata(i,a)}}function Bu(e,t,n,r,i){t=(new Map).set("startTime",t).set("endTime",n).set("metadataType",r).set("payload",i),e.dispatchEvent(Ru("metadata",t))}function Fu(e,t){if(t&&"chapters"==t.kind){t.mode="hidden";var n=new Tt((function(){t.mode="hidden"})).hc().U(.5);e.Xc.push((function(){n.stop()}))}}function ju(e,t){function n(n){t()?t().dispatchEvent(n):e.dispatchEvent(n)}function r(e){t()?Ol(t(),!0,e):e()}return t||(t=function(){return null}),new ti((function(n,r,i,a){var o=t()?t().i:e.o;o&&o.segmentDownloaded(n,r,i,a)}),(function(t,i,a){n(Ru("downloadheadersreceived",i=(new Map).set("headers",t).set("request",i).set("requestType",a))),r((function(){if(e.aa){var n=e.aa;if(n.h.enabled){var r=t["cmsd-static"];if(r)try{var i=new Map,a=r.split(",");for(r=0;r<a.length;r++){var o=a[r].split("=");i.set(o[0],Eu(o[1]))}}catch(e){}if(i=t["cmsd-dynamic"]){try{var s=new Map,l=i.split(";");for(i=1;i<l.length;i++){var u=l[i].split("=");s.set(u[0],Eu(u[1]))}var c=s}catch(e){c=null}c&&(n.g=c)}}}}))}),(function(e,t,r,i){n(Ru("downloadfailed",e=(new Map).set("request",e).set("error",t).set("httpResponseCode",r).set("aborted",i)))}),(function(t,n,i){r((function(){var r=e.T,a=i;if(a=void 0===a?{}:a,r.g.enabled)if("HEAD"===n.method)uu(r,n);else switch(t){case 0:try{if(r.g.enabled){if(a.type){e:{switch(a.type){case 4:var o="d";break e;case 3:case 2:o="h";break e;case 5:o="s";break e}o=void 0}r.m=o}uu(r,n,{ot:fu,su:!r.i})}}catch(e){Z("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",e)}break;case li:try{if(r.g.enabled){var s=a.segment;o=0,s&&(o=s.endTime-s.startTime);var u={d:1e3*o,st:r.h.R()?"l":"v"};u.ot=function(e){if(0===e.type)return vu;if(e=e.stream){var t=e.type;if("video"==t)return e.codecs&&e.codecs.includes(",")?gu:yu;if("audio"==t)return hu;if("text"==t)return"application/mp4"===e.mimeType?bu:mu}}(a);var c=u.ot===yu||u.ot===hu||u.ot===gu||u.ot===bu,d=a.stream;if(d){var p=r.h.eb();if(c&&(u.bl=function(e,t){if(!(t=e.h.ob()[t]).length)return NaN;var n=e.h.getCurrentTime();return(e=t.find((function(e){return e.start<=n&&e.end>=n})))?1e3*(e.end-n):NaN}(r,d.type),u.ot!==bu)){var f=cu(r,d.type);u.dl=p?f/Math.abs(p):f}if(d.bandwidth&&(u.br=d.bandwidth/1e3),d.segmentIndex&&s){var h=d.segmentIndex.xb(s.endTime,!0,0>p);if(h){var y=h.next().value;if(y&&y!=s){if(!we(s.$(),y.$())){var g=y.$()[0],v=n.uris[0],m=new URL(g),b=new URL(v);if(m.origin!==b.origin)var k=g;else{for(var E=m.pathname.split("/").slice(1),_=b.pathname.split("/").slice(1,-1);E[0]===_[0];)E.shift(),_.shift();for(;_.length;)_.shift(),E.unshift("..");k=E.join("/")}u.nor=k}if((y.Aa||y.ja)&&(s.Aa!=y.Aa||s.ja!=y.ja)){var T=y.Aa+"-";y.ja&&(T+=y.ja),u.nrr=T}}}var A=r.h.eb()||1,S=cu(r,d.type)||500,w=d.bandwidth,C=w?w*(s.endTime-s.startTime)/1e3/(S/A/1e3)*r.g.rtpSafetyFactor:NaN;isNaN(C)||(u.rtp=C)}}c&&u.ot!==bu&&(u.tb=function(e,t){var n=e.h.Ib();if(!n.length)return NaN;e=n[0];for(var r=(n=l(n)).next();!r.done;r=n.next())"variant"===(r=r.value).type&&r.bandwidth>e.bandwidth&&(e=r);switch(t){case yu:return e.videoBandwidth||NaN;case hu:return e.audioBandwidth||NaN;default:return e.bandwidth}}(r,u.ot)/1e3),uu(r,n,u)}}catch(e){Z("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",e)}break;case 2:case 5:case 6:uu(r,n,{ot:"k"});break;case 4:uu(r,n,{ot:"o"})}}))}),(function(n,r,i,a){(n=t()?t().j:e.I)&&n.banLocation&&n.banLocation(a)}),(function(n,r){r.data&&(n=r.data.byteLength,r=t()?t().getStats():e.s)&&(r.Ed=isNaN(r.Ed)?n:r.Ed+n)}))}function Hu(e,t,n){e.L=new Nr,e.L.g=Br,Ur(e.L,n,Math.min(.5,n/2)),$u(e),e.Td=new Tt((function(){Vu(e)})).Pa(.25),e.m.D(t,"waiting",(function(){return Vu(e)})),e.m.D(t,"stalled",(function(){return Vu(e)})),e.m.D(t,"canplaythrough",(function(){return Vu(e)})),e.m.D(t,"progress",(function(){return Vu(e)}))}function Vu(e){switch(e.l){case Ac:if(e.g.ended)var t=!0;else{var n=Wa(e.g.buffered);t=null!=n&&n>=e.g.duration-1}break;case Tc:e:if(e.g.ended||Go(e.F))t=!0;else{if(e.i.presentationTimeline.R()){n=e.i.presentationTimeline.Hb();var r=Wa(e.g.buffered);if(null!=r&&r>=n){t=!0;break e}}t=!1}break;default:t=!1}r=Za(e.g.buffered,e.g.currentTime);var i=t,a=(n=e.L).i.get(n.g);t=n.g,r=i||r>=a?Fr:Br,n.g=r,(t=t!=r)&&r===Fr&&(n.h=Date.now()),t&&$u(e)}function Gu(e){if(e.Pd=new xa(e.h,e.ba,e.B),e.I){var t=qn(e.h.manifest);e.g&&"AUDIO"===e.g.nodeName&&(t.disableVideo=!0),e.I.configure(t)}if(e.B&&e.B.configure(e.h.drm),e.j){e.j.configure(e.h.streaming);try{e.l!=Ec&&Ra(e.Pd,e.i)&&lc(e)}catch(t){hc(e,t)}e.o&&rc(e),!(t=e.j.j)||t.allowedByApplication&&t.allowedByKeySystem||ac(e)}if(e.G&&e.G.Ef(e.h.streaming.forceHTTPS),e.F)if(e.F.configure(e.h.mediaSource),e.F.ba=e.h.manifest.segmentRelativeVttTiming,t=e.h.textDisplayFactory,e.tf!=t){var n=t();n.configure?n.configure(e.h.textDisplayer):ae("Text displayer w/ configure",'Text displayer should have a "configure" method!');var r=e.F,i=r.F;r.F=n,i&&(n.setTextVisibility(i.isTextVisible()),i.destroy()),r.g&&(r.g.j=n),e.tf=t,e.j&&((n=(t=e.j).i.get(hn))&&il(t,n.stream,!0,0,!0))}else(t=e.F.F).configure&&t.configure(e.h.textDisplayer);e.o&&(e.o.configure(e.h.abr),e.h.abr.enabled?e.o.enable():e.o.disable(),pc(e)),e.L&&(t=e.h.streaming.rebufferingGoal,e.i&&(t=Math.max(t,e.i.minBufferTime)),Ur(e.L,t,Math.min(.5,t/2))),e.i&&vc(e.i.presentationTimeline,e.h.playRangeStart,e.h.playRangeEnd),e.A&&e.A.configure(e.h.ads),e.T&&e.T.configure(e.h.cmcd),e.aa&&e.aa.configure(e.h.cmsd)}function Ku(e){return e&&(e=/(\d+)x(\d+)/.exec(e))?{Sb:parseInt(e[1],10),rows:parseInt(e[2],10)}:null}function zu(e){return Array.from(e.g.textTracks).filter((function(e){return"metadata"!=e.kind&&"chapters"!=e.kind&&"Shaka Player TextTrack"!=e.label}))}function Wu(e){return Array.from(e.g.textTracks).filter((function(e){return"chapters"==e.kind}))}function Yu(e,t){var n;return I((function(r){switch(r.g){case 1:return E(r,2),b(r,Gl(t,e.G,e.h.streaming.retryParameters),4);case 4:n=r.h,T(r,3);break;case 2:A(r);case 3:if(n)return r.return(n);throw new bt(1,2,2011,t)}}))}function Zu(e,t,n,r,i,a,o){var s,l,u,c;return I((function(d){if(1==d.g)return"text/vtt"!=i||o.length?b(d,qu(e,t,e.G,e.h.streaming.retryParameters),3):d.u(2);2!=d.g&&(s=d.h,l=Xu(e,s,i,o),u=new Blob([l],{type:"text/vtt"}),t=as(u),i="text/vtt"),c=document.createElement("track");var p=e.T,f=t;try{if(p.g.enabled){var h=lu(p);h.ot=mu,h.su=!0;var y=pu(f,du(h))}else y=f}catch(e){Z("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",e),y=f}return c.src=y,c.label=a,c.kind=r,c.srclang=n,e.g.getAttribute("crossorigin")||e.g.setAttribute("crossorigin","anonymous"),e.g.appendChild(c),d.return(c)}))}function qu(e,t,n,r){var i,a,o;return I((function(s){if(1==s.g){i=li,(a=ri([t],r)).method="GET";var l=e.T;try{l.g.enabled&&uu(l,a,{ot:mu,su:!0})}catch(e){Z("CMCD_TEXT_ERROR","Could not generate text CMCD data.",e)}return b(s,n.request(i,a).promise,2)}return o=s.h,s.return(o.data)}))}function Xu(e,t,n,r){var i=Mn[n];if(i)return n=i(),e={periodStart:0,segmentStart:0,segmentEnd:e.g.duration,vttOffset:0},t=ye(t),function(e,t){function n(e){for(var n=e,r=l(t),i=r.next();!i.done;i=r.next())(i=i.value).end&&i.start<e&&(n+=i.end-i.start);return(10>(e=Math.floor(n/3600))?"0":"")+e+":"+(10>(r=Math.floor(n/60%60))?"0":"")+r+":"+(10>(i=Math.floor(n%60))?"0":"")+i+"."+(100>(n=Math.floor(1e3*n%1e3))?10>n?"00":"0":"")+n}var r=Yl(e);e="WEBVTT\n\n";for(var i=(r=l(r)).next();!i.done;i=r.next())e+=n((i=i.value).startTime)+" --\x3e "+n(i.endTime)+function(e){var t=[];switch(e.textAlign){case"left":t.push("align:left");break;case"right":t.push("align:right");break;case Ie:t.push("align:middle");break;case"start":t.push("align:start");break;case"end":t.push("align:end")}switch(e.writingMode){case"vertical-lr":t.push("vertical:lr");break;case"vertical-rl":t.push("vertical:rl")}return t.length?" "+t.join(" "):""}(i)+"\n",e+=i.payload+"\n\n";return e}(t=n.parseMedia(t,e,null),r);throw new bt(2,2,2014,n)}function Qu(e){var t=xl();return t.streaming.failureCallback=function(t){if(e.R()){var n=null;1001==t.code||1002==t.code?n=1:1003==t.code&&(n=.1),null!=n&&(t.severity=1,e.xf(n))}},t.textDisplayFactory=function(){if(e.Rd){var t=e.getConfiguration();return new eu(e.g,e.Rd,t.textDisplayer)}return HTMLMediaElement.prototype.addTextTrack?new Zl(e.g,"Shaka Player TextTrack"):new Ql},t}function $u(e){var t=e.Ye();if(e.s&&e.L&&e.C){var n=e.H;n.j=t,Ds(n),e.T&&(n=e.T,t||n.i||(n.i=!0),n.i&&t&&(n.j=!0),n.l=t),ec(e)}t=(new Map).set("buffering",t),e.dispatchEvent(Ru("buffering",t))}function Ju(e){var t=e.g.playbackRate;0!=t&&(e.H&&e.H.set(t),t=Ru("ratechange"),e.dispatchEvent(t))}function ec(e){if(e.s&&e.L){var t=e.s.g,n="playing";e.L.g==Br?n="buffering":e.g.paused?n="paused":e.g.ended&&(n="ended");var r=n;if(null==t.g)t.g={timestamp:Date.now()/1e3,state:r,duration:0},t=!0;else{var i=Date.now()/1e3;t.g.duration=i-t.g.timestamp,t.g.state==r?t=!1:(t.h.push(t.g),t.g={timestamp:i,state:r,duration:0},t=!0)}t&&(n=(new Map).set("newstate",n),e.dispatchEvent(Ru("statechanged",n)))}}function tc(e){var t=e.g.playbackRate,n=e.R();if(e.h.streaming.vodDynamicPlaybackRate&&!n){var r=e.h.streaming.vodDynamicPlaybackRateLowBufferRate,i=e.cg();i<=e.h.streaming.vodDynamicPlaybackRateBufferRatio?t!=r&&e.sd(r):1==i&&t!==e.H.Ub()&&e.Tc()}if(n&&(i=e.Jb(),Number.isFinite(i.end)&&!(e.g.currentTime<i.start))){if(e.h.streaming.liveSync)var a=e.h.streaming.liveSyncMaxLatency,o=e.h.streaming.liveSyncPlaybackRate;else e.i&&e.i.serviceDescription&&(a=e.i.serviceDescription.maxLatency||e.h.streaming.liveSyncMaxLatency,o=e.i.serviceDescription.maxPlaybackRate||e.h.streaming.liveSyncPlaybackRate);if(e.h.streaming.liveSync)var s=e.h.streaming.liveSyncMinLatency,l=e.h.streaming.liveSyncMinPlaybackRate;else e.i&&e.i.serviceDescription&&(s=e.i.serviceDescription.minLatency||e.h.streaming.liveSyncMinLatency,l=e.i.serviceDescription.minPlaybackRate||e.h.streaming.liveSyncMinPlaybackRate);if(n=i.end-e.g.currentTime,r=0,e.l==Ac){var u=e.g.buffered;0<u.length&&(r=u.end(u.length-1),r=Math.max(o,r-i.end))}i=e.h.streaming.liveSyncPanicMode,u=1e3*e.h.streaming.liveSyncPanicThreshold;var c=Date.now()-e.L.h;i&&!l&&(l=e.h.streaming.liveSyncMinPlaybackRate),i&&l&&c<=u?t!=l&&e.sd(l):a&&o&&n-r>a?t!=o&&e.sd(o):s&&l&&n-r<s?t!=l&&e.sd(l):t!==e.H.Ub()&&e.Tc()}}function nc(e){if(e.g){var t,n=!1,r=e.g.currentTime/e.g.duration;if(isNaN(r)||(r=Math.round(100*r),isNaN(e.N)?(e.N=r,n=!0):(r=Math.max(e.N,r),e.N!=r&&(e.N=r,n=!0))),n)0==e.N?t=Ru("started"):25==e.N?t=Ru("firstquartile"):50==e.N?t=Ru("midpoint"):75==e.N?t=Ru("thirdquartile"):100==e.N&&(t=Ru("complete")),t&&e.dispatchEvent(t)}}function rc(e){try{Da(e.Pd,e.i)}catch(t){return hc(e,t),!1}var t=mr(e.i.variants);return t=e.sa.create(t),e.o.setVariants(Array.from(t.values())),!0}function ic(e,t){return t=void 0!==t&&t,rc(e)?e.o.chooseVariant(t):null}function ac(e,t,n,r,i){t=void 0===t||t,n=void 0===n?0:n,r=void 0!==r&&r,i=void 0===i||i;var a=ic(e);a&&oc(e,a,i,t,n,r)}function oc(e,t,n,r,i,a){a=void 0!==a&&a;var o=e.j.j;if(t==o)r&&nl(e.j,t,r,i,!0);else{var s=e.s.h;s.h!=t&&(s.h=t,s.g.push({timestamp:Date.now()/1e3,id:t.id,type:"variant",fromAdaptation:n,bandwidth:t.bandwidth})),nl(e.j,t,r,i,a,n),r=null,o&&(r=cr(o)),t=cr(t),n?(n=(new Map).set("oldTrack",r).set("newTrack",t),e.K&&Do(e.K,t,e.Ve()),mc(e,n=Ru("adaptation",n))):uc(e,r,t)}}function sc(e,t){var n=Array.from(e.g.audioTracks).find((function(e){return e.enabled}));t.enabled=!0,t.id!==n.id&&(n.enabled=!1),uc(e,n=yr(n),t=yr(t))}function lc(e){mc(e,Ru("trackschanged"))}function uc(e,t,n){t=(new Map).set("oldTrack",t).set("newTrack",n),e.K&&Do(e.K,n,e.Ve()),mc(e,n=Ru("variantchanged",t))}function cc(e){mc(e,Ru("textchanged"))}function dc(e){mc(e,Ru("texttrackvisibility"))}function pc(e){e.h.abr.enabled||fc(e),mc(e,Ru("abrstatuschanged",(new Map).set("newStatus",e.h.abr.enabled)))}function fc(e,t){if(t=void 0===t||t,e.l==Tc){e.Ud.stop();for(var n=l(e.i.variants),r=n.next();!r.done;r=n.next())r.value.disabledUntilTime=0;t&&rc(e)}}function hc(e,t){var n,r,i;return I((function(a){switch(a.g){case 1:if(e.l==Ec)return a.return();if(n=!0,!(e.Ta&&e.i&&e.j)||3016!=t.code&&3014!=t.code&&3015!=t.code&&3018!=t.code){a.u(2);break}return E(a,3),b(a,function(e){var t,n,r,i,a,o;return I((function(s){return 1==s.g?(t=Date.now()/1e3,n=e.h.minTimeBetweenRecoveries,!e.h.allowMediaSourceRecoveries||t-e.K<n?s.return(!1):(e.K=t,r=yn,(i=e.i.get(r.S))&&(i.bc=null,al(e,i),gl(i).catch((function(){}))),(a=e.i.get(r.fa))&&(a.bc=null,al(e,a),gl(a).catch((function(){}))),o=new Map,e.j.audio&&o.set(r.S,e.j.audio),e.j.video&&o.set(r.fa,e.j.video),b(s,is(e.g.W,o),2))):s.return(!0)}))}(e.j),5);case 5:r=a.h,n=!r,T(a,2);break;case 3:A(a),n=!0;case 2:if(!n)return a.return();2===t.severity&&fc(e,!1),i=Ru("error",(new Map).set("detail",t)),e.dispatchEvent(i),i.defaultPrevented&&(t.handled=!0),k(a)}}))}function yc(e,t,n,r){r=void 0===r?e:r,e=(new Map).set("detail",{schemeIdUri:n.schemeIdUri,value:n.value,startTime:n.startTime,endTime:n.endTime,id:n.id,eventElement:n.eventElement,eventNode:n.eventNode}),r.dispatchEvent(Ru(t,e))}function gc(e){if(!e.g.error)return null;var t=e.g.error.code;if(1==t)return null;var n=e.g.error.msExtendedCode;return n&&(0>n&&(n+=Math.pow(2,32)),n=n.toString(16)),new bt(2,3,3016,t,n,e.g.error.message)}function vc(e,t,n){0<t&&(e.R()||e.Ig(t)),n<(t=e.getDuration())&&(e.R()||e.ab(n))}function mc(e,t){I((function(n){if(1==n.g)return b(n,Promise.resolve(),2);e.l!=Ec&&e.dispatchEvent(t),k(n)}))}function bc(e){for(var t=new Set,n=(e=l(e)).next();!n.done;n=e.next())(n=n.value).language?t.add(Gn(n.language)):t.add("und");return t}function kc(e){for(var t=new Map,n=new Map,r=(e=l(e)).next();!r.done;r=e.next()){var i="und",a=[];(r=r.value).language&&(i=Gn(r.language)),(a="variant"==r.type?r.audioRoles:r.roles)&&a.length||(a=[""]),t.has(i)||t.set(i,new Set);for(var o=(a=l(a)).next();!o.done;o=a.next())o=o.value,t.get(i).add(o),r.label&&(n.has(i)||n.set(i,new Map),n.get(i).set(o,r.label))}var s=[];return t.forEach((function(e,t){for(var r=(e=l(e)).next();!r.done;r=e.next()){r=r.value;var i=null;n.has(t)&&n.get(t).has(r)&&(i=n.get(t).get(r)),s.push({language:t,role:r,label:i})}})),s}wu.prototype.release=function(){0<this.h.length?this.h.shift()():this.g=null},y(xu,$r),(n=xu.prototype).destroy=function(){var e,t,n,r,i,a=this;return I((function(o){switch(o.g){case 1:return a.l==Ec?o.return():(Pu(a),e=a.detach(),a.l=Ec,b(o,e,2));case 2:for(t=[],n=l(a.nf),r=n.next();!r.done;r=n.next())(i=r.value).A||t.push(i.destroy());return a.nf=[],b(o,Promise.all(t),3);case 3:if(a.Yd&&(a.Yd.release(),a.Yd=null),a.Rb&&(a.Rb.release(),a.Rb=null),a.m&&(a.m.release(),a.m=null),a.ta&&(a.ta.release(),a.ta=null),a.pa=null,a.h=null,a.s=null,a.Rd=null,a.T=null,a.aa=null,!a.G){o.u(4);break}return b(o,a.G.destroy(),5);case 5:a.G=null;case 4:a.o&&(a.o.release(),a.o=null),$r.prototype.release.call(a),k(o)}}))},n.Sc=function(e,t){t=void 0===t||t;var n,r,i,a=this;return I((function(o){switch(o.g){case 1:if(a.l==Ec)throw new bt(2,7,7e3);if(n=a.g&&a.g==e,!a.g||a.g==e){o.u(2);break}return b(o,a.detach(),2);case 2:return b(o,Du(a,"attach"),4);case 4:if(o.h)return o.return();if(E(o,5,6),n||(Iu(a,"attach"),r=function(){var e=gc(a);e&&hc(a,e)},a.Rb.D(e,"error",r),a.g=e),!t||!At()||a.F){o.u(6);break}return b(o,Nu(a),6);case 6:S(o),a.Y.release(),w(o,0);break;case 5:return i=A(o),b(o,a.detach(),10);case 10:throw i}}))},n.Yg=function(e){this.wg=e},n.detach=function(e){e=void 0!==e&&e;var t=this;return I((function(n){if(1==n.g){if(t.l==Ec)throw new bt(2,7,7e3);return b(n,t.ic(!1,e),2)}if(3!=n.g)return b(n,Du(t,"detach"),3);if(n.h)return n.return();try{t.g&&(t.Rb.ib(),t.g=null),Iu(t,"detach"),t.A&&!e&&t.A.release()}finally{t.Y.release()}k(n)}))},n.ic=function(e,t){e=void 0===e||e,t=void 0!==t&&t;var n,r,i,a,o,s,u,c,d,p=this;return I((function(f){switch(f.g){case 1:return p.l!=Ec&&(p.l=_c),b(f,Du(p,"unload"),2);case 2:return f.h?f.return():(_(f,3),p.Ta=!1,Iu(p,"unload"),e&&!At()&&(e=!1),Pu(p),n=p.Xc.map((function(e){return e()})),p.Xc=[],b(f,Promise.all(n),5));case 5:if(p.dispatchEvent(Ru("unloading")),p.mb&&(p.mb.release(),p.mb=null),p.g&&(p.m.ib(),p.ta.ib()),p.Ud.stop(),p.cb&&(p.cb.release(),p.cb=null),p.Td&&(p.Td.stop(),p.Td=null),!p.I){f.u(6);break}return b(f,p.I.stop(),7);case 7:p.I=null,p.Ra=null;case 6:if(!p.o){f.u(8);break}return b(f,p.o.stop(),8);case 8:if(!p.j){f.u(10);break}return b(f,p.j.destroy(),11);case 11:p.j=null;case 10:if(p.H&&(p.H.release(),p.H=null),p.C&&(p.C.release(),p.C=null),!p.F){f.u(12);break}return b(f,p.F.destroy(),13);case 13:p.F=null;case 12:if(p.A&&!t&&p.A.onAssetUnload(),p.aa&&(p.aa.g=null),p.g&&Jl(p.g),!p.g||!p.g.src){f.u(14);break}return b(f,new Promise((function(e){return new Tt(e).U(.1)})),15);case 15:p.g.removeAttribute("src"),p.g.load();case 14:if(!p.B){f.u(16);break}return b(f,p.B.destroy(),17);case 17:p.B=null;case 16:if(p.qa=null,p.kf=null,p.L=null,p.i){for(r=l(p.i.variants),i=r.next();!i.done;i=r.next())for(a=i.value,o=l([a.audio,a.video]),s=o.next();!s.done;s=o.next())(u=s.value)&&u.segmentIndex&&u.segmentIndex.release();for(c=l(p.i.textStreams),s=c.next();!s.done;s=c.next())(d=s.value).segmentIndex&&d.segmentIndex.release()}p.i=null,p.s=new Fs,p.tf=null,p.$c=[],p.N=NaN,$u(p);case 3:S(f),p.Y.release(),w(f,4);break;case 4:if(e&&At()&&!p.F)return b(f,Nu(p),0);f.u(0)}}))},n.Fi=function(e){this.ea=e},n.load=function(e,t,n){t=void 0===t?null:t;var r,i,a,o,s,u,c,d,p,f,h,y,g,v=this;return I((function(m){switch(m.g){case 1:if(v.l==Ec)throw new bt(2,7,7e3);return r=null,i="",e instanceof Dl?i=(r=e).ad()||"":i=e||"",b(m,Cu(v.Y,"load"),2);case 2:if(v.Y.release(),!v.g)throw new bt(2,7,7002);if(!v.qa){m.u(3);break}return b(m,v.ic(!1),3);case 3:if(a=++v.ce,o=function(){return I((function(e){if(1==e.g)return v.ce==a?e.u(0):r?b(e,r.destroy(),3):e.u(3);throw new bt(2,7,7e3)}))},s=function(e,t){return I((function(n){switch(n.g){case 1:return _(n,2),b(n,Cu(v.Y,t),4);case 4:return b(n,o(),5);case 5:return b(n,e(),6);case 6:return b(n,o(),7);case 7:r&&v.h&&(r.g=v.h);case 2:S(n),v.Y.release(),w(n,0)}}))},E(m,5,6),null==t&&r&&(t=r.getStartTime()),v.ea=t,v.Ta=!1,v.dispatchEvent(Ru("loading")),r){n=r.T,m.u(8);break}if(n){m.u(8);break}return b(m,s((function(){return I((function(e){if(1==e.g)return b(e,Mu(v,i),2);n=e.h,k(e)}))}),"guessMimeType_"),8);case 8:if(u=!!r,r){Ll(r,v),v.s=r.getStats(),m.u(11);break}return b(m,Ou(v,i,t,n,!0),12);case 12:(r=m.h)?(Ll(r,v),v.s=r.getStats(),r.start(),r.m.catch((function(){}))):v.s=new Fs;case 11:if(c=!r,d=r?r.Rb:Date.now()/1e3,v.s=r?r.getStats():new Fs,v.qa=i,v.kf=n||null,c)return b(m,s((function(){return I((function(e){return b(e,function(e,t){var n,r,i,a,o;return I((function(s){return 1==s.g?(n=yn,r=Date.now()/1e3,i=!0,e.B=e.oc({zb:e.G,onError:function(t){hc(e,t)},fe:function(){},onExpirationUpdated:function(){var t=Ru("expirationupdated");e.dispatchEvent(t)},onEvent:function(t){e.dispatchEvent(t),"drmsessionupdate"==t.type&&i&&(i=!1,e.s.j=Date.now()/1e3-r)}}),e.B.configure(e.h.drm),a={id:0,language:"und",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},(o={id:0,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:t?Sn(t):"",codecs:t?wn(t):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:n.fa,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set}).fullMimeTypes.add(mn(o.mimeType,o.codecs)),t.startsWith("audio/")?(o.type=n.S,a.audio=o):a.video=o,e.B.ba=!0,b(s,ia(e.B,[a],[]),2)):b(s,e.B.Sc(e.g),0)}))}(v,n),0)}))}),"initializeSrcEqualsDrmInner_"),20);if(v.F){m.u(15);break}return b(m,s((function(){return I((function(e){return b(e,Nu(v),0)}))}),"initializeMediaSourceEngineInner_"),15);case 15:return b(m,s((function(){return I((function(e){return b(e,r.m,0)}))}),"waitForFinish"),17);case 17:return v.h=r.getConfiguration(),v.Pd=r.B,v.Ra=r.C,v.I=function(e){return e.ea=!0,e.j}(r),v.mb=function(e){return e.qa=!0,e.F}(r),v.lb=r.Sa,v.i=r.Ue(),(p=r.o)&&(v.sa=p),u&&v.g&&"AUDIO"===v.g.nodeName&&(function(e){for(var t=l(e.i.variants),n=t.next();!n.done;n=t.next())(n=n.value).video&&(n.video.closeSegmentIndex(),n.video=null),n.bandwidth=n.audio&&n.audio.bandwidth?n.audio.bandwidth:0;e.i.variants=e.i.variants.filter((function(e){return e.audio}))}(v),v.configure("manifest.disableVideo",!0)),v.B=function(e){return e.da=!0,e.l}(r),b(m,s((function(){return I((function(e){return b(e,v.B.Sc(v.g),0)}))}),"drmEngine_.attach"),18);case 18:return!(f=r.s)||v.pa&&v.pa==f||(v.o=function(e){return e.ba=!0,e.i}(r),v.pa=r.s,"function"!=typeof v.o.setMediaElement&&(ae("AbrManager w/o setMediaElement","Please use an AbrManager with setMediaElement function."),v.o.setMediaElement=function(){}),"function"!=typeof v.o.setCmsdManager&&(ae("AbrManager w/o setCmsdManager","Please use an AbrManager with setCmsdManager function."),v.o.setCmsdManager=function(){}),"function"!=typeof v.o.trySuggestStreams&&(ae("AbrManager w/o trySuggestStreams","Please use an AbrManager with trySuggestStreams function."),v.o.trySuggestStreams=function(){})),h=function(e){return e.sa=!0,e.I}(r),y=r.pa,b(m,s((function(){return I((function(e){return b(e,function(e,t,n,r){var i,a,o,s,u,c,d,p,f,h,y,g,v,m,E,_,T,A,S,w;return I((function(C){switch(C.g){case 1:for(Iu(e,"load"),i=e.g,e.H=new Is({Md:function(){return i.playbackRate},Ub:function(){return i.defaultPlaybackRate},Ff:function(e){i.playbackRate=e},qg:function(e){i.currentTime+=e}}),a=function(){return ec(e)},o=function(){return Ju(e)},e.m.D(i,"playing",a),e.m.D(i,"pause",a),e.m.D(i,"ended",a),e.m.D(i,"ratechange",o),function(e,t){if(t.lcevc.enabled){var n=e.Ib();n&&n[0]&&"video/mp2t"==n[0].videoMimeType&&(wt()||Ct())&&(t.mediaSource.forceTransmux||Y("LCEVC Warning: For MPEG-2 TS decoding the config.mediaSource.forceTransmux must be enabled.")),Pu(e),null==e.K&&(e.K=new Ro(e.g,e.wg,t.lcevc),e.F&&(e.F.T=e.K))}else Pu(e)}(e,e.h),e.Sa=e.h.preferredTextLanguage,e.Zc=e.h.preferredTextRole,e.Yc=e.h.preferForcedSubs,vc(e.i.presentationTimeline,e.h.playRangeStart,e.h.playRangeEnd),e.o.init((function(t,n,r){e.i&&e.j&&t!=e.j.j&&oc(e,t,!0,void 0!==n&&n,void 0===r?0:r)})),e.o.setMediaElement(i),e.o.setCmsdManager(e.aa),e.j=function(e){return new el(e.i,{Ld:function(){return e.C?e.C.Dd():0},getBandwidthEstimate:function(){return e.o.getBandwidthEstimate()},eb:function(){return e.eb()},W:e.F,zb:e.G,onError:function(t){return hc(e,t)},onEvent:function(t){return e.dispatchEvent(t)},$h:function(){e.I&&e.I.update&&e.I.update()},mf:function(t,n){var r=t.startTime,i=t.endTime,a=n.type;if(e.C){e.C.rg();var o=Ko(e.F,a);!e.R()&&e.g.paused&&null!=o&&0<o&&e.C.Dd()<o&&e.C.xe(o)}Vu(e),r=(new Map).set("start",r).set("end",i).set("contentType",a),e.dispatchEvent(Ru("segmentappended",r)),e.o&&n.fastSwitching&&t.md&&t.Wd&&e.o.trySuggestStreams()},Zh:function(t,n){(n=n.gf)&&e.lb&&function(e,t,n){var r=function(e,t){var n=e.g.get(t);return n||(n={nd:[],Wf:null,contentType:t},e.g.set(t,n)),n}(e,t.contentType);!function(e,t){if((e=e.h()[t.contentType])&&0<e.length){var n=e[0].start,r=e[e.length-1].end,i=t.nd;t.nd=i.filter((function(e,t){return!(e.position<=n&&t+1<i.length&&i[t+1].position<=n||e.position>=r)}))}else t.nd=[]}(e,r),e={gf:t,position:n},0<=(t=(r=r.nd).findIndex((function(e){return e.position>=n})))?r.splice(t,r[t].position==n?1:0,e):r.push(e)}(e.lb,n,t)},Sf:function(t,n){var r=e.B;if(r.h.parseInbandPsshEnabled&&!r.F&&["audio","video"].includes(t)){var i=0,a=l((n=new Ri(ye(n))).data);for(t=a.next();!t.done;t=a.next())i+=t.value.length;if(0==i)r=Promise.resolve();else{for(i=new Uint8Array(i),a=0,t=(n=l(n.data)).next();!t.done;t=n.next())t=t.value,i.set(t,a),a+=t.length;la(r,"cenc",i),r=r.l}}else r=Promise.resolve();return r},ai:function(t,n,r){Uu(e,t,n,r)},Jd:function(t,n){return e.Jd(t,n)}})}(e),e.j.configure(e.h.streaming),e.l=Tc,i.textTracks&&e.m.D(i.textTracks,"addtrack",(function(t){if(t.track&&"chapters"===(t=t.track).kind)Fu(e,t)})),e.dispatchEvent(Ru("streaming")),s=n,(u=e.j.j)||s||(s=ic(e,!0)),c=[],p=l([(d=u||s).video,d.audio]),f=p.next();!f.done;f=p.next())(h=f.value)&&!h.segmentIndex&&c.push(h.createSegmentIndex());if(!(0<c.length)){C.u(2);break}return b(C,Promise.all(c),2);case 2:if(e.I&&e.I.onInitialVariantChosen&&e.I.onInitialVariantChosen(d),vc(e.i.presentationTimeline,e.h.playRangeStart,e.h.playRangeEnd),y=function(t){e.C=function(e,t){return new Ts(e.g,e.i,e.h.streaming,t,(function(){e.cb&&Ls(e.cb,!0),e.j&&e.j.od(),e.L&&Vu(e)}),(function(t){return e.dispatchEvent(t)}))}(e,t),e.cb=function(e,t){t=new Bl(e.mb,e.R()||0<t),t.addEventListener("enter",(function(t){yc(e,"timelineregionenter",t.region)})),t.addEventListener("exit",(function(t){yc(e,"timelineregionexit",t.region)})),t.addEventListener("skip",(function(t){var n=t.region;t.seeking||(yc(e,"timelineregionenter",n),yc(e,"timelineregionexit",n))}));var n=new Os(e.g);return n.g.add(t),e.lb&&n.g.add(e.lb),n}(e,t),Hu(e,i,Math.max(e.i.minBufferTime,e.h.streaming.rebufferingGoal))},e.h.streaming.startAtSegmentBoundary||y(e.ea),u){C.u(4);break}if(!e.h.streaming.startAtSegmentBoundary){C.u(5);break}return g=e.i.presentationTimeline,v=e.ea||e.g.currentTime,m=g.Xb(),E=g.pb(),v<m?v=m:v>E&&(v=E),b(C,function(e,t){var n,r,i,a,o;return I((function(s){return 1==s.g?(n=e.audio,r=e.video,i=function(e,t){var n,r,i;return I((function(a){return 1==a.g?e?b(a,e.createSegmentIndex(),2):a.return(null):(r=(n=e.segmentIndex.xb(t))?n.next().value:null)?(i=r.startTime,a.return(i)):a.return(null)}))},b(s,i(n,t),2)):3!=s.g?(a=s.h,b(s,i(r,t),3)):null!=(o=s.h)&&null!=a?s.return(Math.max(o,a)):null!=o?s.return(o):null!=a?s.return(a):s.return(t)}))}(s,v),6);case 6:_=C.h,y(_);case 5:oc(e,s,!0,!1,0);case 4:return e.C.we(),e.tc().find((function(e){return e.active}))||((T=br(e.i.textStreams,e.Sa,e.Zc,e.Yc)[0]||null)&&Bs(e.s.h,T,!0),s&&(T?(s.audio&&function(e,t,n){if(0==e.h.autoShowText)return!1;if(1==e.h.autoShowText)return!0;var r=Gn(e.h.preferredTextLanguage);return n=Gn(n.language),2==e.h.autoShowText?jn(n,r):3==e.h.autoShowText?(e=Gn(t.language),jn(n,r)&&!jn(e,n)):(Y("Invalid autoShowText setting!"),!1)}(e,s.audio,T)&&(e.da=!0),e.da&&e.F.F.setTextVisibility(!0),dc(e)):e.da=!1),T&&(e.h.streaming.alwaysStreamText||e.$e())&&rl(e.j,T)),b(C,e.j.start(r),7);case 7:e.h.abr.enabled&&(e.o.enable(),pc(e)),lc(e),rc(e),e.i.variants.some((function(e){return e.primary})),((A=e.R())&&(e.h.streaming.liveSync||e.i.serviceDescription||e.h.streaming.liveSyncPanicMode)||e.h.streaming.vodDynamicPlaybackRate)&&(S=function(){return tc(e)},e.m.D(i,"timeupdate",S)),A||(w=function(){return nc(e)},e.m.D(i,"timeupdate",w),nc(e)),e.A&&e.A.onManifestUpdated(A),e.Ta=!0,e.m.na(i,"loadedmetadata",(function(){e.s.m=Date.now()/1e3-t})),k(C)}}))}(v,d,y,h),0)}))}),"loadInner_"),19);case 19:!function(e){if(e.G)for(var t=l(e.G),n=t.next();!n.done;n=t.next())(n=n.value)();e.G=null}(r),m.u(14);break;case 20:return b(m,s((function(){return I((function(e){return b(e,function(e,t,n){var r,i,a,o,s,u,c,d,p,f,h;return I((function(y){if(1==y.g)return Iu(e,"src-equals"),r=e.g,e.C=new _s(r),i=!1,e.Xc.push((function(){i=!0})),null!=e.ea&&e.C.xe(e.ea),e.H=new Is({Md:function(){return r.playbackRate},Ub:function(){return r.defaultPlaybackRate},Ff:function(e){r.playbackRate=e},qg:function(e){r.currentTime+=e}}),a=e.h.streaming.rebufferingGoal,Hu(e,r,a),o=function(){return ec(e)},s=function(){return Ju(e)},e.m.D(r,"playing",o),e.m.D(r,"pause",o),e.m.D(r,"ended",o),e.m.D(r,"ratechange",s),"none"!=r.preload&&e.m.na(r,"loadedmetadata",(function(){e.s.m=Date.now()/1e3-t})),r.audioTracks&&(e.m.D(r.audioTracks,"addtrack",(function(){return lc(e)})),e.m.D(r.audioTracks,"removetrack",(function(){return lc(e)})),e.m.D(r.audioTracks,"change",(function(){return lc(e)}))),r.textTracks&&(e.m.D(r.textTracks,"addtrack",(function(t){if(t.track)switch(t=t.track,t.kind){case"metadata":!function(e,t){if("metadata"==t.kind){t.mode="hidden",e.m.D(t,"cuechange",(function(){if(t.activeCues)for(var n=l(t.activeCues),r=n.next();!r.done;r=n.next())r=r.value,Bu(e,r.startTime,r.endTime,r.type,r.value),e.A&&e.A.onCueMetadataChange(r.value)}));var n=new Tt((function(){for(var t=function(e){return Array.from(e.g.textTracks).filter((function(e){return"metadata"==e.kind}))}(e),n=(t=l(t)).next();!n.done;n=t.next())n.value.mode="hidden"})).hc().U(.5);e.Xc.push((function(){n.stop()}))}}(e,t);break;case"chapters":Fu(e,t);break;default:lc(e)}})),e.m.D(r.textTracks,"removetrack",(function(){return lc(e)})),e.m.D(r.textTracks,"change",(function(){return lc(e)}))),r.src=function(e,t,n){try{if(!e.g.enabled)return t;var r=lu(e);e:{switch(n.toLowerCase()){case"audio/mp4":case"audio/webm":case"audio/ogg":case"audio/mpeg":case"audio/aac":case"audio/flac":case"audio/wav":var i=hu;break e;case"video/webm":case"video/mp4":case"video/mpeg":case"video/mp2t":i=gu;break e;case"application/x-mpegurl":case"application/vnd.apple.mpegurl":case"application/dash+xml":case"video/vnd.mpeg.dash.mpd":case"application/vnd.ms-sstr+xml":i=fu;break e}i=void 0}return r.ot=i,r.su=!0,pu(t,du(r))}catch(e){return Z("CMCD_SRC_ERROR","Could not generate src CMCD data.",e),t}}(e.T,e.qa,n),(Pt()||Dt())&&r.load(),"none"!=r.preload&&!r.autoplay&&Cn(n)&&jt()&&r.load(),e.l=Ac,e.dispatchEvent(Ru("streaming")),u=new Vr,fs(r,HTMLMediaElement.HAVE_METADATA,e.m,(function(){e.C.we(),u.resolve()})),fs(r,HTMLMediaElement.HAVE_CURRENT_DATA,e.m,(function(){var t;return I((function(n){return 1==n.g?(function(e){var t=e.h.preferredAudioLanguage;""!=t&&e.yg(t,e.h.preferredVariantRole)}(e),(t=zu(e)).find((function(e){return"disabled"!=e.mode}))?(0<t.length&&(e.da=!0),n.u(2)):b(n,new Promise((function(t){e.m.na(r.textTracks,"change",t),new Tt(t).U(1)})),2)):i?n.return():(function(e){var t=e.h.preferredTextLanguage;""!=t&&e.Af(t,e.h.preferredTextRole,e.h.preferForcedSubs)}(e),void k(n))}))})),r.error?u.reject(gc(e)):"none"==r.preload&&(Y('With <video preload="none">, the browser will not load anything until play() is called. We are unable to measure load latency in a meaningful way, and we cannot provide track info yet. Please do not use preload="none" with Shaka Player.'),u.resolve()),e.m.na(r,"error",(function(){u.reject(gc(e))})),c=new Promise((function(t,n){new Tt(n).U(e.h.streaming.loadTimeout)})),b(y,Promise.race([u,c]),2);((d=e.R())&&(e.h.streaming.liveSync||e.h.streaming.liveSyncPanicMode)||e.h.streaming.vodDynamicPlaybackRate)&&(p=function(){return tc(e)},e.m.D(r,"timeupdate",p)),d||(f=function(){return nc(e)},e.m.D(r,"timeupdate",f),nc(e)),e.A&&(e.A.onManifestUpdated(d),d&&(h=e.Jb().end,e.m.D(r,"progress",(function(){var t=e.Jb().end;h!=t&&(e.A.onManifestUpdated(e.R()),h=t)})))),e.Ta=!0,k(y)}))}(v,d,n),0)}))}),"srcEqualsInner_"),14);case 14:v.dispatchEvent(Ru("loaded"));case 6:if(S(m),!r){m.u(22);break}return b(m,r.destroy(),22);case 22:w(m,0);break;case 5:if(7e3==(g=A(m)).code){m.u(24);break}return b(m,v.ic(!1),24);case 24:throw g}}))},n.Bi=function(e,t){e=void 0===e||e,t=void 0!==t&&t;var n,r,i,a=this;return I((function(o){switch(o.g){case 1:if(n=null,!(a.i&&a.I&&a.Ra&&a.qa)){o.u(2);break}return r=a.g.currentTime,a.R()&&(r=null),i=Date.now()/1e3,b(o,Lu(a,a.qa,r,a.kf,i,!0,!1,!1),3);case 3:var s=n=o.h,l=a.I,u=a.Ra;s.h=a.i,s.j=l,s.C=u,s=n,l=a.pa,s.i=a.o,s.s=l,n.o=a.sa,n.start(),a.i=null,a.I=null,a.Ra=null,a.o=null,a.pa=null;case 2:return b(o,a.ic(e,t),4);case 4:return o.return(n)}}))},n.preload=function(e,t,n){t=void 0===t?null:t;var r,i=this;return I((function(a){return 1==a.g?b(a,Ou(i,e,t,n),2):((r=a.h)?r.start():hc(i,new bt(2,7,7005)),a.return(r))}))},n.ii=function(){for(var e=this.Y;e.g;)e.release()},n.oc=function(e){return new ra(e)},n.configure=function(e,t){if(2==arguments.length&&"string"==typeof e&&(e=kl(e,t)),e.streaming&&"forceTransmuxTS"in e.streaming&&(ae("streaming.forceTransmuxTS configuration","Please Use mediaSource.forceTransmux instead."),e.mediaSource.mediaSource=e.streaming.forceTransmuxTS,delete e.streaming.forceTransmuxTS),e.streaming&&"forceTransmux"in e.streaming&&(ae("streaming.forceTransmux configuration","Please Use mediaSource.forceTransmux instead."),e.mediaSource.mediaSource=e.streaming.forceTransmux,delete e.streaming.forceTransmux),e.streaming&&"useNativeHlsOnSafari"in e.streaming&&ae("streaming.useNativeHlsOnSafari configuration","Please Use streaming.useNativeHlsForFairPlay or streaming.preferNativeHls instead."),e.mediaSource&&"sourceBufferExtraFeatures"in e.mediaSource){ae("mediaSource.sourceBufferExtraFeatures configuration","Please Use mediaSource.addExtraFeaturesToSourceBuffer() instead.");var n=e.mediaSource.sourceBufferExtraFeatures;e.mediaSource.addExtraFeaturesToSourceBuffer=function(){return n},delete e.mediaSource.sourceBufferExtraFeatures}e.streaming&&e.streaming.lowLatencyMode&&(null==e.streaming.inaccurateManifestTolerance&&(e.streaming.inaccurateManifestTolerance=0),null==e.streaming.rebufferingGoal&&(e.streaming.rebufferingGoal=.01),null==e.streaming.segmentPrefetchLimit&&(e.streaming.segmentPrefetchLimit=2),null==e.streaming.updateIntervalSeconds&&(e.streaming.updateIntervalSeconds=.1),null==e.streaming.retryParameters&&(e.streaming.retryParameters={}),null==e.streaming.retryParameters.baseDelay&&(e.streaming.retryParameters.baseDelay=100),null==e.manifest&&(e.manifest={}),null==e.manifest.retryParameters&&(e.manifest.retryParameters={}),null==e.manifest.retryParameters.baseDelay&&(e.manifest.retryParameters.baseDelay=100),null==e.drm&&(e.drm={}),null==e.drm.retryParameters&&(e.drm.retryParameters={}),null==e.drm.retryParameters.baseDelay&&(e.drm.retryParameters.baseDelay=100));var r=Pl(this.h,e,Qu(this));return Gu(this),r},n.getConfiguration=function(){var e=Qu(this);return Pl(e,this.h,Qu(this)),e},n.cg=function(){if(this.g){var e=this.g.buffered.length;e=e?this.g.buffered.end(e-1):0;var t=this.getConfiguration().streaming.bufferingGoal;if(e>=(t=Math.min(this.g.currentTime+t,this.Jb().end)))return 1;if(!(e<=this.g.currentTime)&&e<t)return(e-this.g.currentTime)/(t-this.g.currentTime)}return 0},n.mi=function(){for(var e in this.h)delete this.h[e];Pl(this.h,Qu(this),Qu(this)),Gu(this)},n.rh=function(){return this.l},n.Ve=function(){return this.i?this.i.type:null},n.uh=function(){return this.g},n.Wb=function(){return this.G},n.ad=function(){return this.qa},n.bg=function(){return this.A?this.A:null},n.R=function(){return this.i?this.i.presentationTimeline.R():!(!this.g||!this.g.src)&&1/0==this.g.duration},n.ac=function(){return!!this.i&&this.i.presentationTimeline.ac()},n.Lh=function(){if(this.i){var e=this.i.variants;return!!e.length&&!e[0].video}return!(!this.g||!this.g.src)&&(this.g.videoTracks?0==this.g.videoTracks.length:0==this.g.videoHeight)},n.Jb=function(){if(this.i){if(!this.Ta&&"HLS"==this.i.type)return{start:0,end:0};var e=this.i.presentationTimeline;return{start:e.Xb(),end:e.pb()}}return this.g&&this.g.src&&(e=this.g.seekable).length?{start:e.start(0),end:e.end(e.length-1)}:{start:0,end:0}},n.Ih=function(){this.R()&&(this.g.currentTime=this.Jb().end)},n.keySystem=function(){var e=this.drmInfo();return e?e.keySystem:""},n.drmInfo=function(){return this.B?this.B.g:null},n.cd=function(){return this.B?this.B.cd():1/0},n.Te=function(){return this.B?this.B.Te():[]},n.Kd=function(){return this.B?this.B.Kd():{}},n.Ye=function(){return!!this.L&&this.L.g==Br},n.eb=function(){return this.g?this.H?this.H.i:1:0},n.sd=function(e){var t=this;0==e?Y("A trick play rate of 0 is unsupported!"):(this.ta.ib(),this.g.paused&&this.g.play(),this.H.set(e),this.l==Tc&&(this.o.playbackRateChanged(e),tl(this.j,1<Math.abs(e))),this.R()&&this.ta.D(this.g,"timeupdate",(function(){var n=t.g.currentTime,r=t.Jb(),i=t.h.streaming.safeSeekOffset;0<e?Math.floor(n)>=Math.floor(r.end)&&t.Tc():Math.floor(n)<=Math.floor(r.start+i)&&t.Tc()})))},n.Tc=function(){var e=this.H.Ub();this.l==Ac&&this.H.set(e),this.l==Tc&&(this.H.set(e),this.o.playbackRateChanged(e),tl(this.j,!1)),this.ta.ib()},n.Ib=function(){if(this.i){for(var e=this.j?this.j.j:null,t=[],n=0,r=l(this.i.variants),i=r.next();!i.done;i=r.next())if(vr(i=i.value)){var a=cr(i);a.active=i==e,a.active||1==n||null==e||i.video!=e.video||i.audio!=e.audio||(a.active=!0),a.active&&n++,t.push(a)}return t}return this.g&&this.g.audioTracks?Array.from(this.g.audioTracks).map((function(e){return yr(e)})):[]},n.tc=function(){if(this.i){for(var e=this.j?this.j.s:null,t=[],n=l(this.i.textStreams),r=n.next();!r.done;r=n.next()){var i=dr(r=r.value);i.active=r==e,t.push(i)}return t}return this.g&&this.g.src&&this.g.textTracks?zu(this).map((function(e){return hr(e)})):[]},n.ph=function(){var e=this.$c;return this.i&&(e=this.i.imageStreams),e.map((function(e){return pr(e)}))},n.ih=function(e){var t,n,r,i,a=this;return I((function(o){return 1==o.g?a.l!=Tc&&a.l!=Ac?o.return(null):(t=a.$c,a.i&&(t=a.i.imageStreams),(n=t.find((function(t){return t.id==e})))?n.segmentIndex?o.u(2):b(o,n.createSegmentIndex(),2):o.return(null)):4!=o.g?(r=[],n.segmentIndex.qc((function(t){var i=Ku(t.tilesLayout||n.tilesLayout);if(i){i=i.rows*i.Sb;for(var o=t.i-t.startTime,s=0;s<i;s++)r.push(a.hg(e,t.startTime+o*s/i))}})),b(o,Promise.all(r),4)):(i=o.h,o.return(i.filter((function(e){return e}))))}))},n.hg=function(e,t){var n,r,i,a,o,s,l,u,c,d,p,f,h,y,g,v,m,k,E=this;return I((function(_){return 1==_.g?E.l!=Tc&&E.l!=Ac?_.return(null):(n=E.$c,E.i&&(n=E.i.imageStreams),(r=n.find((function(t){return t.id==e})))?r.segmentIndex?_.u(2):b(_,r.createSegmentIndex(),2):_.return(null)):null==(i=r.segmentIndex.find(t))?_.return(null):(a=r.segmentIndex.get(i),(o=Ku(a.tilesLayout||r.tilesLayout))?(s=r.width||0,l=r.height||0,u=s/o.Sb,c=l/o.rows,d=o.Sb*o.rows,p=a.i-a.startTime,f=a.A||p/d,h=a.startTime,g=y=0,1<d&&(v=Math.floor((t-a.startTime)/f),h=a.startTime+v*f,y=v%o.Sb*u,g=Math.floor(v/o.Sb)*c),m=!1,(k=a.s)&&(m=!0,c=k.height,y=k.positionX,g=k.positionY,u=k.width),_.return({segment:a,imageHeight:l,imageWidth:s,height:c,positionX:y,positionY:g,startTime:h,duration:f,uris:a.$(),width:u,sprite:m})):_.return(null))}))},n.zg=function(e){if(this.i&&this.j){var t=this.i.textStreams.find((function(t){return t.id==e.id}));t&&t!=this.j.s&&(Bs(this.s.h,t,!1),rl(this.j,t),cc(this),this.Sa=t.language)}else if(this.g&&this.g.src&&this.g.textTracks){for(var n=(t=l(t=zu(this))).next();!n.done;n=t.next())fr(n=n.value)==e.id?n.mode=this.da?"showing":"hidden":n.mode="disabled";cc(this)}},n.Bf=function(e,t,n){if(t=void 0!==t&&t,n=void 0===n?0:n,this.i&&this.j){this.h.abr.enabled&&Y("Changing tracks while abr manager is enabled will likely result in the selected track being overriden. Consider disabling abr before calling selectVariantTrack().");var r=this.i.variants.find((function(t){return t.id==e.id}));r&&vr(r)&&(oc(this,r,!1,t,n),this.sa=new Lr(r,this.h.mediaSource.codecSwitchingStrategy,this.h.manifest.dash.enableAudioGroups),rc(this))}else if(this.g&&this.g.audioTracks)for(n=(t=l(t=Array.from(this.g.audioTracks))).next();!n.done;n=t.next())if(fr(n=n.value)==e.id){sc(this,n);break}},n.kh=function(){return kc(this.Ib())},n.Bh=function(){return kc(this.tc())},n.jh=function(){return Array.from(bc(this.Ib()))},n.Ah=function(){return Array.from(bc(this.tc()))},n.yg=function(e,t,n,r){if(n=void 0===n?0:n,r=void 0===r?0:r,this.i&&this.C){this.sa=new Mr(e,t||"",n,"",!1,"","","",this.h.mediaSource.codecSwitchingStrategy,this.h.manifest.dash.enableAudioGroups),e=function(e,t){return e.video||t.video?e.video&&t.video?Math.abs((e.video.height||0)-(t.video.height||0))+Math.abs((e.video.width||0)-(t.video.width||0)):1/0:0},t=this.j.j;var i=this.sa.create(this.i.variants);n=null;for(var a=(i=l(i.values())).next();!a.done;a=i.next())a=a.value,(!n||e(n,t)>e(a,t))&&(n=a);n?(e=cr(n),this.Bf(e,!0,r)):ac(this)}else this.g&&this.g.audioTracks&&(r=br(this.Ib(),e,t||"",!1)[0])&&this.Bf(r)},n.Af=function(e,t,n){n=void 0!==n&&n,this.i&&this.C?(this.Sa=e,this.Zc=t||"",this.Yc=n,(e=br(this.i.textStreams,this.Sa,this.Zc,this.Yc)[0]||null)&&e!=this.j.s&&(Bs(this.s.h,e,!1),this.h.streaming.alwaysStreamText||this.$e())&&(rl(this.j,e),cc(this))):(e=br(this.tc(),e,t||"",n)[0])&&this.zg(e)},n.ti=function(e,t,n){if(t=void 0===t||t,n=void 0===n?0:n,this.i&&this.C){for(var r=null,i=l(this.i.variants),a=i.next();!a.done;a=i.next())if((a=a.value).audio.label==e){r=a;break}null!=r&&(this.sa=new Mr(r.language,"",0,"",!1,"",e,"",this.h.mediaSource.codecSwitchingStrategy,this.h.manifest.dash.enableAudioGroups),ac(this,t,n))}else if(this.g&&this.g.audioTracks){for(t=null,r=(n=l(n=Array.from(this.g.audioTracks))).next();!r.done;r=n.next())(r=r.value).label==e&&(t=r);t&&sc(this,t)}},n.$e=function(){var e=this.da;return this.F&&this.l==Tc?this.F.F.isTextVisible():this.g&&this.g.src&&this.g.textTracks?zu(this).some((function(e){return"showing"==e.mode})):e},n.dg=function(){return this.g&&this.g.src&&this.g.textTracks?Wu(this).map((function(e){return hr(e)})):[]},n.lh=function(e){if(!this.g||!this.g.src||!this.g.textTracks)return[];var t=Gn(e),n=Wu(this).filter((function(e){return Gn(e.language)==t}));if(!n||!n.length)return[];e=[];for(var r=new Set,i=(n=l(n)).next();!i.done;i=n.next())if((i=i.value)&&i.cues)for(var a=(i=l(i.cues)).next();!a.done;a=i.next()){var o=a.value;(a=o.id)&&""!=a||(a=o.startTime+"-"+o.endTime+"-"+o.text),o={id:a,title:o.text,startTime:o.startTime,endTime:o.endTime},r.has(a)||(e.push(o),r.add(a))}return e},n.Fg=function(e){if(e=!!e,this.da!=e){if(this.da=e,this.l==Tc)this.F.F.setTextVisibility(e),this.h.streaming.alwaysStreamText||(e?this.j.s||0<(e=br(this.i.textStreams,this.Sa,this.Zc,this.Yc)).length&&(rl(this.j,e[0]),cc(this)):function(e){var t=e.i.get(hn);t&&(yl(t),gl(t).catch((function(){})),e.i.delete(hn)),e.s=null}(this.j));else if(this.g&&this.g.src&&this.g.textTracks)for(var t=zu(this),n=(t=l(t)).next();!n.done;n=t.next())"disabled"!=(n=n.value).mode&&(n.mode=e?"showing":"hidden");dc(this)}},n.wh=function(){if(this.C)var e=this.C.Dd();else{if(null==this.ea)return new Date;e=this.ea}if(this.i){var t=this.i.presentationTimeline;return new Date(1e3*((t.B||t.i)+e))}return this.g&&this.g.getStartDate?(t=this.g.getStartDate(),isNaN(t.getTime())?null:new Date(t.getTime()+1e3*e)):null},n.gg=function(){if(this.i){var e=this.i.presentationTimeline;return new Date(1e3*(e.B||e.i))}return this.g&&this.g.getStartDate?(e=this.g.getStartDate(),isNaN(e.getTime())?null:e):null},n.Nd=function(){return this.R()&&this.i?this.i.presentationTimeline.Nd():null},n.ob=function(){if(this.l==Tc)return this.F.ob();var e={total:[],audio:[],video:[],text:[]};return this.l==Ac&&(e.total=qa(this.g.buffered)),e},n.getStats=function(){if(this.l!=Tc&&this.l!=Ac)return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,stallsDetected:NaN,gapsJumped:NaN,estimatedBandwidth:NaN,completionPercent:NaN,loadLatency:NaN,manifestTimeSeconds:NaN,drmTimeSeconds:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,licenseTime:NaN,liveLatency:NaN,maxSegmentDuration:NaN,bytesDownloaded:NaN,switchHistory:[],stateHistory:[]};ec(this);var e=this.g,t=e.currentTime/e.duration;if(!isNaN(t)){var n=this.s;t=Math.round(100*t),n.i=isNaN(n.i)?t:Math.max(n.i,t)}if(this.C&&(this.s.L=this.C.Of(),this.s.N=this.C.Pf()),e.getVideoPlaybackQuality){n=e.getVideoPlaybackQuality(),t=this.s;var r=Number(n.totalVideoFrames);t.K=Number(n.droppedVideoFrames),t.I=r,this.s.H=Number(n.corruptedVideoFrames)}if(this.B?n=(n=this.B).I?n.I:NaN:n=NaN,this.s.s=n,this.l==Tc){if(n=this.j.j,t=this.j.s,n){var i=(r=this.H?this.H.i:1)*n.bandwidth;t&&t.bandwidth&&(i+=r*t.bandwidth),this.s.B=i}n&&n.video&&(t=this.s,r=n.video.height||NaN,t.o=n.video.width||NaN,t.l=r),this.R()&&(n=this.gg().valueOf()+1e3*e.currentTime,this.s.C=(Date.now()-n)/1e3),this.i&&this.i.presentationTimeline&&(this.s.G=this.i.presentationTimeline.g),n=this.o.getBandwidthEstimate(),this.s.A=n}this.l==Ac&&(n=this.s,t=e.videoHeight||NaN,n.o=e.videoWidth||NaN,n.l=t);var a=this.s;e=a.o,n=a.l,t=a.B,r=a.I,i=a.K;for(var o=a.H,s=a.N,u=a.L,c=a.A,d=a.i,p=a.m,f=a.F,h=a.j,y=Ns(a.g,"playing"),g=Ns(a.g,"paused"),v=Ns(a.g,"buffering"),m=a.s,b=a.C,k=a.G,E=a.Ed,_=function(e){function t(e){return{timestamp:e.timestamp,state:e.state,duration:e.duration}}for(var n=[],r=l(e.h),i=r.next();!i.done;i=r.next())n.push(t(i.value));return e.g&&n.push(t(e.g)),n}(a.g),T=[],A=(a=l(a.h.g)).next();!A.done;A=a.next())A=A.value,T.push({timestamp:A.timestamp,id:A.id,type:A.type,fromAdaptation:A.fromAdaptation,bandwidth:A.bandwidth});return{width:e,height:n,streamBandwidth:t,decodedFrames:r,droppedFrames:i,corruptedFrames:o,stallsDetected:s,gapsJumped:u,estimatedBandwidth:c,completionPercent:d,loadLatency:p,manifestTimeSeconds:f,drmTimeSeconds:h,playTime:y,pauseTime:g,bufferingTime:v,licenseTime:m,liveLatency:b,maxSegmentDuration:k,bytesDownloaded:E,stateHistory:_,switchHistory:T}},n.Tg=function(e,t,n,r,i,a,o){o=void 0!==o&&o;var s,l,u,c,d,p,f,h,y,g,v,m=this;return I((function(k){switch(k.g){case 1:if(m.l!=Tc&&m.l!=Ac)throw new bt(1,7,7004);if("subtitles"!=n&&"captions"!=n&&Y("Using a kind value different of `subtitles` or `captions` can cause unwanted issues."),r){k.u(2);break}return b(k,Yu(m,e),3);case 3:r=k.h;case 2:if(s=[],m.A&&(s=m.A.getCuePoints()),m.l!=Ac){k.u(4);break}return o&&(n="forced"),b(k,Zu(m,e,t,n,r,a||"",s),5);case 5:if(l=Gn(t),u=m.tc(),c=u.find((function(e){return Gn(e.language)==l&&e.label==(a||"")&&e.kind==n})))return lc(m),k.return(c);throw new bt(1,2,2012);case 4:if(d=yn,p=m.g.duration,m.i&&(p=m.i.presentationTimeline.getDuration()),1/0==p)throw new bt(1,4,4033);if(!s.length){k.u(6);break}return b(k,qu(m,e,m.G,m.h.streaming.retryParameters),7);case 7:f=k.h,h=Xu(m,f,r,s),y=new Blob([h],{type:"text/vtt"}),e=as(y),r="text/vtt";case 6:if(g={id:m.uf++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:xs(0,p,[e]),mimeType:r||"",codecs:i||"",kind:n,encrypted:!1,drmInfos:[],keyIds:new Set,language:t,originalLanguage:t,label:a||null,type:d.ma,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!!o,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([mn(r||"",i||"")])},v=mn(g.mimeType,g.codecs),!Dn(v))throw new bt(2,2,2014,r);return m.i.textStreams.push(g),lc(m),k.return(dr(g))}}))},n.Ug=function(e,t){var n,r,i,a,o,s,u,c,d,p,f,h,y,g,v,m,k=this;return I((function(E){switch(E.g){case 1:if(k.l!=Tc&&k.l!=Ac)throw new bt(1,7,7004);if(t){E.u(2);break}return b(E,Yu(k,e),3);case 3:t=E.h;case 2:if("text/vtt"!=t)throw new bt(1,2,2017,e);if(n=yn,r=k.g.duration,k.i&&(r=k.i.presentationTimeline.getDuration()),1/0==r)throw new bt(1,4,4045);return b(E,qu(k,e,k.G,k.h.streaming.retryParameters),4);case 4:if(i=E.h,!(a=Mn[t]))throw new bt(2,2,2014,t);for(o=a(),s={periodStart:0,segmentStart:0,segmentEnd:r,vttOffset:0},u=ye(i),c=o.parseMedia(u,s,e),d=[],p={},f=l(c),h=f.next();!h.done;p={Oc:p.Oc,Ob:p.Ob},h=f.next())p.Ob=h.value,p.Oc=null,y=function(t){return function(){return null==t.Oc&&(t.Oc=ln([e],[t.Ob.payload])),t.Oc||[]}}(p),g=new Va(p.Ob.startTime,p.Ob.endTime,y,0,null,null,0,0,1/0),p.Ob.payload.includes("#xywh")&&(4===(v=p.Ob.payload.split("#xywh=")[1].split(",")).length&&g.Gg({height:parseInt(v[3],10),positionX:parseInt(v[0],10),positionY:parseInt(v[1],10),width:parseInt(v[2],10)})),d.push(g);return m={id:k.uf++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Cs(d),mimeType:t||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:n.ve,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,tilesLayout:"1x1",accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([mn(t||"","")])},k.l==Ac?k.$c.push(m):k.i.imageStreams.push(m),lc(k),E.return(pr(m))}}))},n.Sg=function(e,t,n){var r,i,a,o,s=this;return I((function(l){switch(l.g){case 1:if(s.l!=Tc&&s.l!=Ac)throw new bt(1,7,7004);if(n){l.u(2);break}return b(l,Yu(s,e),3);case 3:n=l.h;case 2:return r=[],s.A&&(r=s.A.getCuePoints()),b(l,Zu(s,e,t,"chapters",n,"",r),4);case 4:if(i=l.h,a=s.dg(),!(o=a.find((function(e){return e.language==t})))){l.u(5);break}return b(l,new Promise((function(e,t){s.m.na(i,"load",e),s.m.na(i,"error",(function(){t(new bt(1,2,2015))}))})),6);case 6:return lc(s),l.return(o);case 5:throw new bt(1,2,2012)}}))},n.yi=function(e,t){this.ba.width=e,this.ba.height=t},n.xf=function(e){if(this.l==Tc){var t=this.j;if(e=void 0===e?.1:e,t.l.g)t=!1;else if(t.A)t=!1;else{for(var n=l(t.i.values()),r=n.next();!r.done;r=n.next())!(r=r.value).gd||r.Na||r.ub||(r.gd=!1,hl(t,r,e));t=!0}}else t=!1;return t},n.Ue=function(){return Y("Shaka Player's internal Manifest structure is NOT covered by semantic versioning compatibility guarantees.  It may change at any time!  Please consider filing a feature request for whatever you use getManifest() for."),this.i},n.sh=function(){return this.Ra},n.Jg=function(e){this.Rd=e},n.Jd=function(e,t){if(!this.h.abr.enabled||this.l===Ec||!navigator.onLine)return!1;if(this.i.variants.some((function(t){return!(!(t=t[e.type])||t.id===e.id)&&("audio"!=e.type||e.language===t.language)}))){for(var n=l(this.i.variants),r=n.next();!r.done;r=n.next()){var i=(r=r.value)[e.type];i&&i.id===e.id&&(r.disabledUntilTime=Date.now()/1e3+t)}return this.Ud.Pa(1),ac(this,!0,t=this.ob().video.reduce((function(e,t){return e+t.end-t.start}),0),!0,!1),!0}return!1},F("shaka.Player",xu),xu.prototype.setVideoContainer=xu.prototype.Jg,xu.prototype.getManifestParserFactory=xu.prototype.sh,xu.prototype.getManifest=xu.prototype.Ue,xu.prototype.retryStreaming=xu.prototype.xf,xu.prototype.setMaxHardwareResolution=xu.prototype.yi,xu.prototype.addChaptersTrack=xu.prototype.Sg,xu.prototype.addThumbnailsTrack=xu.prototype.Ug,xu.prototype.addTextTrackAsync=xu.prototype.Tg,xu.prototype.getStats=xu.prototype.getStats,xu.prototype.getBufferedInfo=xu.prototype.ob,xu.prototype.getSegmentAvailabilityDuration=xu.prototype.Nd,xu.prototype.getPresentationStartTimeAsDate=xu.prototype.gg,xu.prototype.getPlayheadTimeAsDate=xu.prototype.wh,xu.prototype.setTextTrackVisibility=xu.prototype.Fg,xu.prototype.getChapters=xu.prototype.lh,xu.prototype.getChaptersTracks=xu.prototype.dg,xu.prototype.isTextTrackVisible=xu.prototype.$e,xu.prototype.selectVariantsByLabel=xu.prototype.ti,xu.prototype.selectTextLanguage=xu.prototype.Af,xu.prototype.selectAudioLanguage=xu.prototype.yg,xu.prototype.getTextLanguages=xu.prototype.Ah,xu.prototype.getAudioLanguages=xu.prototype.jh,xu.prototype.getTextLanguagesAndRoles=xu.prototype.Bh,xu.prototype.getAudioLanguagesAndRoles=xu.prototype.kh,xu.prototype.selectVariantTrack=xu.prototype.Bf,xu.prototype.selectTextTrack=xu.prototype.zg,xu.prototype.getThumbnails=xu.prototype.hg,xu.prototype.getAllThumbnails=xu.prototype.ih,xu.prototype.getImageTracks=xu.prototype.ph,xu.prototype.getTextTracks=xu.prototype.tc,xu.prototype.getVariantTracks=xu.prototype.Ib,xu.prototype.cancelTrickPlay=xu.prototype.Tc,xu.prototype.trickPlay=xu.prototype.sd,xu.prototype.getPlaybackRate=xu.prototype.eb,xu.prototype.isBuffering=xu.prototype.Ye,xu.prototype.getKeyStatuses=xu.prototype.Kd,xu.prototype.getActiveSessionsMetadata=xu.prototype.Te,xu.prototype.getExpiration=xu.prototype.cd,xu.prototype.drmInfo=xu.prototype.drmInfo,xu.prototype.keySystem=xu.prototype.keySystem,xu.prototype.goToLive=xu.prototype.Ih,xu.prototype.seekRange=xu.prototype.Jb,xu.prototype.isAudioOnly=xu.prototype.Lh,xu.prototype.isInProgress=xu.prototype.ac,xu.prototype.isLive=xu.prototype.R,xu.prototype.getAdManager=xu.prototype.bg,xu.prototype.getAssetUri=xu.prototype.ad,xu.prototype.getNetworkingEngine=xu.prototype.Wb,xu.prototype.getMediaElement=xu.prototype.uh,xu.prototype.getManifestType=xu.prototype.Ve,xu.prototype.getLoadMode=xu.prototype.rh,xu.prototype.resetConfiguration=xu.prototype.mi,xu.prototype.getBufferFullness=xu.prototype.cg,xu.prototype.getConfiguration=xu.prototype.getConfiguration,xu.prototype.configure=xu.prototype.configure,xu.prototype.releaseAllMutexes=xu.prototype.ii,xu.prototype.preload=xu.prototype.preload,xu.prototype.unloadAndSavePreload=xu.prototype.Bi,xu.prototype.load=xu.prototype.load,xu.prototype.updateStartTime=xu.prototype.Fi,xu.prototype.unload=xu.prototype.ic,xu.prototype.detach=xu.prototype.detach,xu.prototype.attachCanvas=xu.prototype.Yg,xu.prototype.attach=xu.prototype.Sc,xu.probeSupport=function(e){var t,n,r,i,a;return e=void 0===e||e,I((function(o){if(1==o.g)return t={},e?b(o,function(){var e,t,n,r,i,a;return I((function(o){return 1==o.g?(e="org.w3.clearkey com.widevine.alpha com.microsoft.playready com.microsoft.playready.recommendation com.apple.fps.1_0 com.apple.fps".split(" "),n=[{videoCapabilities:t=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],persistentState:"required",sessionTypes:["persistent-license"]},{initDataTypes:["cenc"],videoCapabilities:t}],r=new Map,i=function(e){var t,i,a;return I((function(o){switch(o.g){case 1:if(E(o,2),"org.w3.clearkey"===e&&jt())throw Error("Unsupported keySystem");return b(o,navigator.requestMediaKeySystemAccess(e,n),4);case 4:return t=o.h,a=!!(i=t.getConfiguration().sessionTypes)&&i.includes("persistent-license"),Rt()&&(a=!1),r.set(e,{persistentState:a}),b(o,t.createMediaKeys(),5);case 5:T(o,0);break;case 2:A(o),r.set(e,null),k(o)}}))},a=e.map((function(e){return i(e)})),b(o,Promise.all(a),2)):o.return(yi(r))}))}(),3):o.u(2);2!=o.g&&(t=o.h);var s={};if(At())for(var c in Na)s[c]=!0;for(var d=(c=l(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"])).next();!d.done;d=c.next())s[d=d.value]=At()?!!Na[d]:St(d);for(n=s,s={},d=(c=l(c='video/mp4; codecs="avc1.42E01E",video/mp4; codecs="avc3.42E01E",video/mp4; codecs="hev1.1.6.L93.90",video/mp4; codecs="hvc1.1.6.L93.90",video/mp4; codecs="hev1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="vp9",video/mp4; codecs="vp09.00.10.08",video/mp4; codecs="av01.0.01M.08",video/mp4; codecs="dvh1.20.01",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="ac-4",audio/mp4; codecs="opus",audio/mp4; codecs="flac",audio/mp4; codecs="dtsc",audio/mp4; codecs="dtse",audio/mp4; codecs="dtsx",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="vp09.00.10.08",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(",").concat(u(Rn)))).next();!d.done;d=c.next()){s[d=d.value]=!!Dn(d)||(At()?te(d)||!!Xe(d):St(d));var p=d.split(";")[0];s[p]=s[p]||s[d]}for(a in r={manifest:n,media:s,drm:t},i=wc)r[a]=i[a]();return o.return(r)}))},xu.isBrowserSupported=function(){if(e.Promise||Y("A Promise implementation or polyfill is required"),!(e.Promise&&e.Uint8Array&&Array.prototype.forEach)||Ht("Trident/"))return!1;var t=jt();return!(t&&9>t||!(e.MediaKeys&&e.navigator&&e.navigator.requestMediaKeySystemAccess&&e.MediaKeySystemAccess&&e.MediaKeySystemAccess.prototype.getConfiguration))&&(!!At()||St("application/x-mpegurl"))},xu.setAdManagerFactory=function(e){Cc=e},xu.registerSupportPlugin=function(e,t){wc[e]=t},xu.prototype.destroy=xu.prototype.destroy;var Ec=0,_c=1,Tc=2,Ac=3;xu.LoadMode={DESTROYED:Ec,NOT_LOADED:_c,MEDIA_SOURCE:Tc,SRC_EQUALS:Ac},xu.version="v4.8.11";var Sc=["4","8"];le=new function(e){this.g=e,this.i=oe,this.h=se}(new ie(Number(Sc[0]),Number(Sc[1])));var wc={},Cc=null;function xc(){this.h=[],this.j=this.i=this.g=0}function Pc(e,t,n){var r=this;this.g=e,this.h=t,this.j=n,this.i=!1,this.l=this.h.getVolume(),this.m=new $,this.m.D(this.h,google.ima.AdEvent.Type.PAUSED,(function(){r.i=!0})),this.m.D(this.h,google.ima.AdEvent.Type.RESUMED,(function(){r.i=!1}))}function Rc(t,n,r,i,a){var o=this;this.o=t,this.i=n,this.F=!1,this.A=this.s=null,this.G=NaN,this.m=a,this.j=null,this.h=new $,google.ima.settings.setLocale(r),google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0),this.C=new google.ima.AdDisplayContainer(this.o,this.i),this.C.initialize(),this.l=new google.ima.AdsLoader(this.C),this.l.getSettings().setPlayerType("shaka-player"),this.l.getSettings().setPlayerVersion("v4.8.11"),this.g=null,this.B=i||new google.ima.AdsRenderingSettings,this.h.D(this.l,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,(function(t){!function(t,n){if(t.m(new qr("ads-loaded",(new Map).set("loadTime",Date.now()/1e3-t.G))),t.s.customPlayheadTracker){var r={currentTime:t.i.currentTime};t.g=n.getAdsManager(r,t.B),t.i.muted?t.g.setVolume(0):t.g.setVolume(t.i.volume),t.h.D(t.i,"timeupdate",(function(){t.i.duration&&(r.currentTime=t.i.currentTime)})),t.h.D(t.i,"volumechange",(function(){t.j&&(t.j.setVolume(t.i.volume),t.i.muted&&t.j.setMuted(!0))}))}else t.g=n.getAdsManager(t.i,t.B);t.m(new qr("ima-ad-manager-loaded",(new Map).set("imaAdManager",t.g)));var i=t.g.getCuePoints();if(i.length){n=[];for(var a=(i=l(i)).next();!a.done;a=i.next())n.push({start:a.value,end:null});t.m(new qr("ad-cue-points-changed",(new Map).set("cuepoints",n)))}!function(e){function t(t,n){t=(new Map).set("originalEvent",t),e.m(new qr(n,t))}e.h.D(e.g,google.ima.AdErrorEvent.Type.AD_ERROR,(function(t){Ic(e,t)})),e.h.D(e.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,(function(t){Oc(e,t)})),e.h.D(e.g,google.ima.AdEvent.Type.STARTED,(function(t){Oc(e,t)})),e.h.D(e.g,google.ima.AdEvent.Type.FIRST_QUARTILE,(function(e){t(e,"ad-first-quartile")})),e.h.D(e.g,google.ima.AdEvent.Type.MIDPOINT,(function(e){t(e,"ad-midpoint")})),e.h.D(e.g,google.ima.AdEvent.Type.THIRD_QUARTILE,(function(e){t(e,"ad-third-quartile")})),e.h.D(e.g,google.ima.AdEvent.Type.COMPLETE,(function(e){t(e,"ad-complete")})),e.h.D(e.g,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,(function(t){Lc(e,t)})),e.h.D(e.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,(function(t){Lc(e,t)})),e.h.D(e.g,google.ima.AdEvent.Type.SKIPPED,(function(e){t(e,"ad-skipped")})),e.h.D(e.g,google.ima.AdEvent.Type.VOLUME_CHANGED,(function(e){t(e,"ad-volume-changed")})),e.h.D(e.g,google.ima.AdEvent.Type.VOLUME_MUTED,(function(e){t(e,"ad-muted")})),e.h.D(e.g,google.ima.AdEvent.Type.PAUSED,(function(n){e.j&&(e.j.i=!0,t(n,"ad-paused"))})),e.h.D(e.g,google.ima.AdEvent.Type.RESUMED,(function(n){e.j&&(e.j.i=!1,t(n,"ad-resumed"))})),e.h.D(e.g,google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,(function(n){e.j&&t(n,"ad-skip-state-changed")})),e.h.D(e.g,google.ima.AdEvent.Type.CLICK,(function(e){t(e,"ad-clicked")})),e.h.D(e.g,google.ima.AdEvent.Type.AD_PROGRESS,(function(e){t(e,"ad-progress")})),e.h.D(e.g,google.ima.AdEvent.Type.AD_BUFFERING,(function(e){t(e,"ad-buffering")})),e.h.D(e.g,google.ima.AdEvent.Type.IMPRESSION,(function(e){t(e,"ad-impression")})),e.h.D(e.g,google.ima.AdEvent.Type.DURATION_CHANGE,(function(e){t(e,"ad-duration-changed")})),e.h.D(e.g,google.ima.AdEvent.Type.USER_CLOSE,(function(e){t(e,"ad-closed")})),e.h.D(e.g,google.ima.AdEvent.Type.LOADED,(function(e){t(e,"ad-loaded")})),e.h.D(e.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,(function(e){t(e,"all-ads-completed")})),e.h.D(e.g,google.ima.AdEvent.Type.LINEAR_CHANGED,(function(e){t(e,"ad-linear-changed")})),e.h.D(e.g,google.ima.AdEvent.Type.AD_METADATA,(function(e){t(e,"ad-metadata")})),e.h.D(e.g,google.ima.AdEvent.Type.LOG,(function(e){t(e,"ad-recoverable-error")})),e.h.D(e.g,google.ima.AdEvent.Type.AD_BREAK_READY,(function(e){t(e,"ad-break-ready")})),e.h.D(e.g,google.ima.AdEvent.Type.INTERACTION,(function(e){t(e,"ad-interaction")}))}(t);try{t.g.init(t.i.offsetWidth,t.i.offsetHeight,Dc(t)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),t.h.D(t.i,"loadeddata",(function(){t.g.resize(t.i.offsetWidth,t.i.offsetHeight,Dc(t)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)})),"ResizeObserver"in e?(t.A=new ResizeObserver((function(){t.g.resize(t.i.offsetWidth,t.i.offsetHeight,Dc(t)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)})),t.A.observe(t.i)):t.h.D(document,"fullscreenchange",(function(){t.g.resize(t.i.offsetWidth,t.i.offsetHeight,Dc(t)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)})),t.F||t.s.skipPlayDetection?t.g.start():t.h.na(t.i,"play",(function(){t.F=!0,t.g.start()}))}catch(e){Lc(t,null)}}(o,t)})),this.h.D(this.l,google.ima.AdErrorEvent.Type.AD_ERROR,(function(e){Ic(o,e)})),this.h.D(this.i,"ended",(function(){o.l.contentComplete()})),this.h.na(this.i,"play",(function(){o.F=!0}))}function Ic(e,t){t.getError(),t=(new Map).set("originalEvent",t),e.m(new qr("ad-error",t)),Lc(e,null),e.m(new qr("ad-cue-points-changed",(new Map).set("cuepoints",[])))}function Dc(e){return document.fullscreenEnabled?!!document.fullscreenElement:!!(e=e.i).webkitSupportsFullscreen&&e.webkitDisplayingFullscreen}function Oc(e,t){var n=t.getAd();n?(e.j=new Pc(n,e.g,e.i),t=(new Map).set("ad",e.j).set("sdkAdObject",n).set("originalEvent",t),e.m(new qr("ad-started",t)),e.j.isLinear()&&(e.o.setAttribute("ad-active","true"),e.s.customPlayheadTracker||e.i.pause(),e.i.muted?((t=e.j).l=e.i.volume,t.h.setVolume(0)):e.j.setVolume(e.i.volume))):Y("The IMA SDK fired a "+t.type+" event with no associated ad. Unable to play ad!")}function Lc(e,t){e.m(new qr("ad-stopped",(new Map).set("originalEvent",t))),e.j&&e.j.isLinear()&&(e.o.removeAttribute("ad-active"),e.s.customPlayheadTracker||e.i.ended||e.i.play())}function Mc(e,t,n,r,i){this.h=e,this.g=i,this.i=t,this.j=n,this.l=r}function Nc(e,t,n,r){this.B=e,this.K=t,this.g=n,this.l=null,this.Y=NaN,this.i=r,this.I=!1,this.A=null,this.j=[],this.N=[],this.L=this.C=this.h=null,this.F=new Map,this.m=[],this.s=[],this.G="",this.T=!0,this.H="",this.o=new $}function Uc(e,t){var n,r,i,a,o,s,l;I((function(u){return 1==u.g?t.staticResource?(n=Bc(t),e.F.get(n)?u.return():(r=ri([t.staticResource],{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:3e4,stallTimeout:5e3,connectionTimeout:1e4}),i=e.K.request(7,r),E(u,2),e.F.set(n,[]),b(u,i.promise,4))):u.return():2!=u.g?(a=u.h,o=Wt(a.data),s=JSON.parse(o),l=s.apps,e.F.set(n,l),T(u,0)):(A(u),e.F.delete(n),void k(u))}))}function Bc(e){return[e.adId,e.adParameters,e.adSystem,e.adTitle,e.creativeAdId,e.creativeId,e.creativeSequence,e.height,e.width,e.staticResource].join("")}function Fc(e){var t=e.g.currentTime;if(0!=t&&null==e.A){for(var n,r,i=l(e.j),a=i.next();!a.done;a=i.next())for(var o=l((a=a.value).ads),s=o.next();!s.done;s=o.next())if(s=s.value,r){if(s.startTimeInSeconds<t&&s.startTimeInSeconds>r.startTimeInSeconds+r.durationInSeconds){r=s,n=a;break}}else s.startTimeInSeconds<t&&(r=s,n=a);n&&r&&!e.N.includes(r.adId)&&(e.A=t,e.g.currentTime=n.startTimeInSeconds)}}function jc(e){if(e.g.duration&&(e.h||e.j.length)){var t=e.g.currentTime,n=!1;if(e.h){n=!0;var r=e.C,i=r.startTimeInSeconds+.5*r.durationInSeconds,a=r.startTimeInSeconds+.75*r.durationInSeconds;t>=r.startTimeInSeconds+.25*r.durationInSeconds&&!e.s.includes("firstQuartile")?(e.s.push("firstQuartile"),Gc(e,"firstQuartile")):t>=i&&!e.s.includes("midpoint")?(e.s.push("midpoint"),Gc(e,"midpoint")):t>=a&&!e.s.includes("thirdQuartile")&&(e.s.push("thirdQuartile"),Gc(e,"thirdQuartile")),r=e.h.getRemainingTime(),0<(i=e.h.getDuration())&&(0>=r||r>i)&&Hc(e)}if(!e.h||!e.h.isLinear()){e:for(r=l(e.j),i=r.next();!i.done&&(i=i.value,!e.h||!e.h.isLinear());i=r.next())for(a=0;a<i.ads.length;a++){var o=i.ads[a],s=o.startTimeInSeconds+o.durationInSeconds;if(o.startTimeInSeconds<=t&&s>t){if(e.N.includes(o.adId)){if(e.g.ended)continue;e.g.currentTime=s;break e}Hc(e),e.L=i,e.h=new Mc(o,a+1,i.ads.length,!0,e.g),e.C=o,0===a&&Gc(e,"breakStart"),Vc(e);break}}if(!e.h)for(i=(r=l(e.j)).next();!i.done&&(i=i.value,!e.h);i=r.next())for(a=0;a<i.nonLinearAdsList.length;a++)if((o=i.nonLinearAdsList[a]).nonLinearAdList.length){s=i.startTimeInSeconds;var u=e.F.get(Bc(o.nonLinearAdList[0]));if(s<=t&&u&&u.length){Hc(e),s=e;for(var c=(u=l(u)).next();!c.done;c=u.next())if((c=c.value).data.source.length){var d=document.createElement("img");d.src=c.data.source[0].url,d.style.top=(c.placeholder.top||0)+"%",d.style.height=100-(c.placeholder.top||0)+"%",d.style.left=(c.placeholder.left||0)+"%",d.style.maxWidth=100-(c.placeholder.left||0)+"%",d.style.objectFit="contain",d.style.position="absolute",s.B.appendChild(d)}e.L=i,e.h=new Mc(o,a+1,i.ads.length,!1,e.g),e.C=o,0===a&&Gc(e,"breakStart"),Vc(e);break}}n&&!e.h&&(t=e.g.currentTime,e.A&&e.A>t&&(e.g.currentTime=e.A),e.A=null)}}}function Hc(e){if(e.h){for(;e.B.lastChild;)e.B.removeChild(e.B.firstChild);e.I||e.N.push(e.C.adId),Gc(e,"complete");for(var t=l(e.m),n=t.next();!n.done;n=t.next())n=n.value,e.o.Lb(n.target,n.type,n.listener);e.m=[],e.s=[],(t=e.h.getPositionInSequence())===(n=e.h.getSequenceLength())&&Gc(e,"breakEnd"),e.h=null,e.C=null,e.L=null}}function Vc(e){var t=!1;e.g.paused?t=!0:(Gc(e,"impression"),Gc(e,"start")),e.m.push({target:e.g,type:"volumechange",listener:function(){e.g.muted&&Gc(e,"mute")}}),e.m.push({target:e.g,type:"volumechange",listener:function(){e.g.muted||Gc(e,"unmute")}}),e.m.push({target:e.g,type:"play",listener:function(){t?(Gc(e,"impression"),Gc(e,"start"),t=!1):Gc(e,"resume")}}),e.m.push({target:e.g,type:"pause",listener:function(){Gc(e,"pause")}});for(var n=l(e.m),r=n.next();!r.done;r=n.next())r=r.value,e.o.D(r.target,r.type,r.listener)}function Gc(e,t){var n=e.C.trackingEvents.find((function(e){return e.eventType==t}));if(n||(n=e.L.adBreakTrackingEvents.find((function(e){return e.eventType==t}))),n)for(var r=(n=l(n.beaconUrls)).next();!r.done;r=n.next())(r=r.value)&&""!=r&&((r=ri([r],{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:3e4,stallTimeout:5e3,connectionTimeout:1e4})).method="POST",e.K.request(7,r));switch(t){case"impression":e.i(new qr("ad-impression"));break;case"start":e.i(new qr("ad-started",(new Map).set("ad",e.h)));break;case"mute":e.i(new qr("ad-muted"));break;case"unmute":e.i(new qr("ad-volume-changed"));break;case"resume":e.i(new qr("ad-resumed"));break;case"pause":e.i(new qr("ad-paused"));break;case"firstQuartile":e.i(new qr("ad-first-quartile"));break;case"midpoint":e.i(new qr("ad-midpoint"));break;case"thirdQuartile":e.i(new qr("ad-third-quartile"));break;case"complete":e.i(new qr("ad-complete")),e.i(new qr("ad-stopped"));break;case"breakStart":e.B.setAttribute("ad-active","true");break;case"breakEnd":e.B.removeAttribute("ad-active")}}function Kc(e,t){this.g=e,this.i=null,this.h=t}function zc(e,t,n,r){var i=this;this.s=e,this.l=t,this.j=null,this.F=NaN,this.i=r,this.G=!1,this.A=this.m=this.o=null,this.B="",this.C=[],this.h=new $,(e=new google.ima.dai.api.UiSettings).setLocale(n),this.g=new google.ima.dai.api.StreamManager(this.l,this.s,e),this.i(new qr("ima-stream-manager-loaded",(new Map).set("imaStreamManager",this.g))),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.LOADED,(function(e){!function(e,t){e.i(new qr("ads-loaded",(new Map).set("loadTime",Date.now()/1e3-e.F))),t=t.getStreamData().url,e.j.resolve(t),e.j=null,e.G||e.h.D(e.l,"seeked",(function(){var t=e.l.currentTime;if(0!=t){e.g.streamTimeForContentTime(t);var n=e.g.previousCuePointForStreamTime(t);n&&!n.played&&(e.o=t,e.l.currentTime=n.start)}}))}(i,e)})),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.ERROR,(function(){i.B.length?i.j.resolve(i.B):i.j.reject("IMA Stream request returned an error and there was no backup asset uri provided."),i.j=null})),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,(function(){})),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.STARTED,(function(e){e=e.getAd(),i.m=new Kc(e,i.l),i.A&&(i.m.i=i.A),i.i(new qr("ad-started",(new Map).set("ad",i.m))),i.s.setAttribute("ad-active","true")})),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,(function(){i.s.removeAttribute("ad-active");var e=i.l.currentTime;i.o&&i.o>e&&(i.l.currentTime=i.o,i.o=null)})),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,(function(e){i.A=e.getStreamData().adProgressData,i.m&&(i.m.i=i.A)})),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,(function(){i.i(new qr("ad-first-quartile"))})),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.MIDPOINT,(function(){i.i(new qr("ad-midpoint"))})),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,(function(){i.i(new qr("ad-third-quartile"))})),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.COMPLETE,(function(){i.i(new qr("ad-complete")),i.i(new qr("ad-stopped")),i.s.removeAttribute("ad-active"),i.m=null})),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.SKIPPED,(function(){i.i(new qr("ad-skipped")),i.i(new qr("ad-stopped"))})),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.CUEPOINTS_CHANGED,(function(e){var t=e.getStreamData();e=[];for(var n=(t=l(t.cuepoints)).next();!n.done;n=t.next())n=n.value,e.push({start:n.start,end:n.end});i.C=e,i.i(new qr("ad-cue-points-changed",(new Map).set("cuepoints",e)))}))}function Wc(){$r.call(this),this.g=this.h=this.i=null,this.j=new xc,this.m=navigator.language,this.l=null}function Yc(e,t){if(t&&t.type)switch(t.type){case"ads-loaded":e.j.h.push(t.loadTime);break;case"ad-started":e.j.g++;break;case"ad-complete":e.j.i++;break;case"ad-skipped":e.j.j++}e.dispatchEvent(t)}function Zc(e){return JSON.stringify(e,(function(e,t){if("function"!=typeof t){if(t instanceof Event||t instanceof qr){var n={};for(r in t)(e=t[r])&&"object"==typeof e?"detail"==r&&(n[r]=e):r in Event||(n[r]=e);return n}if(t instanceof Error){var r=new Set(["name","message","stack"]);for(n in t)r.add(n);for(n=(e=l(Object.getOwnPropertyNames(t))).next();!n.done;n=e.next())r.add(n.value);for(e={},n=(r=l(r)).next();!n.done;n=r.next())e[n=n.value]=t[n];t={__type__:"Error",contents:e}}else if(t instanceof TimeRanges){for(r={__type__:"TimeRanges",length:t.length,start:[],end:[]},n=(t=l(qa(t))).next();!n.done;n=t.next())e=(n=n.value).end,r.start.push(n.start),r.end.push(e);t=r}else t=t instanceof Uint8Array?{__type__:"Uint8Array",entries:Array.from(t)}:"number"==typeof t?isNaN(t)?"NaN":isFinite(t)?t:0>t?"-Infinity":"Infinity":t;return t}}))}function qc(e){return JSON.parse(e,(function(e,t){if("NaN"==t)var n=NaN;else if("-Infinity"==t)n=-1/0;else if("Infinity"==t)n=1/0;else if(t&&"object"==typeof t&&"TimeRanges"==t.__type__)n=function(e){return{length:e.length,start:function(t){return e.start[t]},end:function(t){return e.end[t]}}}(t);else if(t&&"object"==typeof t&&"Uint8Array"==t.__type__)n=new Uint8Array(t.entries);else if(t&&"object"==typeof t&&"Error"==t.__type__){for(n in e=t.contents,t=Error(e.message),e)t[n]=e[n];n=t}else n=t;return n}))}(n=Pc.prototype).getDuration=function(){return this.g.getDuration()},n.getMinSuggestedDuration=function(){return this.g.getMinSuggestedDuration()},n.getRemainingTime=function(){return this.h.getRemainingTime()},n.isPaused=function(){return this.i},n.isSkippable=function(){return 0<=this.g.getSkipTimeOffset()},n.getTimeUntilSkippable=function(){var e=this.g.getSkipTimeOffset();return e=this.getRemainingTime()-e,Math.max(e,0)},n.canSkipNow=function(){return this.h.getAdSkippableState()},n.skip=function(){return this.h.skip()},n.pause=function(){return this.h.pause()},n.play=function(){return this.h.resume()},n.getVolume=function(){return this.h.getVolume()},n.setVolume=function(e){return this.j.volume=e,this.h.setVolume(e)},n.isMuted=function(){return 0==this.h.getVolume()},n.isLinear=function(){return this.g.isLinear()},n.resize=function(e,t){var n=!1,r=this.j;document.fullscreenEnabled?n=!!document.fullscreenElement:r.webkitSupportsFullscreen&&(n=r.webkitDisplayingFullscreen),this.h.resize(e,t,n?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)},n.setMuted=function(e){(this.j.muted=e)?(this.l=this.getVolume(),this.h.setVolume(0)):this.h.setVolume(this.l)},n.getSequenceLength=function(){var e=this.g.getAdPodInfo();return null==e?1:e.getTotalAds()},n.getPositionInSequence=function(){var e=this.g.getAdPodInfo();return null==e?1:e.getAdPosition()},n.getTitle=function(){return this.g.getTitle()},n.getDescription=function(){return this.g.getDescription()},n.getVastMediaBitrate=function(){return this.g.getVastMediaBitrate()},n.getVastMediaHeight=function(){return this.g.getVastMediaHeight()},n.getVastMediaWidth=function(){return this.g.getVastMediaWidth()},n.getAdId=function(){return this.g.getAdId()},n.getCreativeAdId=function(){return this.g.getCreativeAdId()},n.getAdvertiserName=function(){return this.g.getAdvertiserName()},n.getMediaUrl=function(){return this.g.getMediaUrl()},n.getTimeOffset=function(){var e=this.g.getAdPodInfo();return null==e?0:e.getTimeOffset()},n.getPodIndex=function(){var e=this.g.getAdPodInfo();return null==e?0:e.getPodIndex()},n.release=function(){this.h=this.g=null},F("shaka.ads.ClientSideAd",Pc),Pc.prototype.release=Pc.prototype.release,Pc.prototype.getPodIndex=Pc.prototype.getPodIndex,Pc.prototype.getTimeOffset=Pc.prototype.getTimeOffset,Pc.prototype.getMediaUrl=Pc.prototype.getMediaUrl,Pc.prototype.getAdvertiserName=Pc.prototype.getAdvertiserName,Pc.prototype.getCreativeAdId=Pc.prototype.getCreativeAdId,Pc.prototype.getAdId=Pc.prototype.getAdId,Pc.prototype.getVastMediaWidth=Pc.prototype.getVastMediaWidth,Pc.prototype.getVastMediaHeight=Pc.prototype.getVastMediaHeight,Pc.prototype.getVastMediaBitrate=Pc.prototype.getVastMediaBitrate,Pc.prototype.getDescription=Pc.prototype.getDescription,Pc.prototype.getTitle=Pc.prototype.getTitle,Pc.prototype.getPositionInSequence=Pc.prototype.getPositionInSequence,Pc.prototype.getSequenceLength=Pc.prototype.getSequenceLength,Pc.prototype.setMuted=Pc.prototype.setMuted,Pc.prototype.resize=Pc.prototype.resize,Pc.prototype.isLinear=Pc.prototype.isLinear,Pc.prototype.isMuted=Pc.prototype.isMuted,Pc.prototype.setVolume=Pc.prototype.setVolume,Pc.prototype.getVolume=Pc.prototype.getVolume,Pc.prototype.play=Pc.prototype.play,Pc.prototype.pause=Pc.prototype.pause,Pc.prototype.skip=Pc.prototype.skip,Pc.prototype.canSkipNow=Pc.prototype.canSkipNow,Pc.prototype.getTimeUntilSkippable=Pc.prototype.getTimeUntilSkippable,Pc.prototype.isSkippable=Pc.prototype.isSkippable,Pc.prototype.isPaused=Pc.prototype.isPaused,Pc.prototype.getRemainingTime=Pc.prototype.getRemainingTime,Pc.prototype.getMinSuggestedDuration=Pc.prototype.getMinSuggestedDuration,Pc.prototype.getDuration=Pc.prototype.getDuration,Rc.prototype.configure=function(e){this.s=e},Rc.prototype.stop=function(){this.g&&this.g.stop(),this.o&&Jl(this.o)},Rc.prototype.release=function(){this.stop(),this.A&&this.A.disconnect(),this.h&&this.h.release(),this.g&&this.g.destroy(),this.l.destroy(),this.C.destroy()},(n=Mc.prototype).getDuration=function(){return this.h.durationInSeconds},n.getMinSuggestedDuration=function(){return this.getDuration()},n.getRemainingTime=function(){return this.h.startTimeInSeconds+this.h.durationInSeconds-this.g.currentTime},n.isPaused=function(){return this.g.paused},n.isSkippable=function(){return!!this.h.skipOffset},n.getTimeUntilSkippable=function(){if(!this.h.skipOffset)return this.getRemainingTime();var e=this.getRemainingTime()-this.h.skipOffset;return Math.max(e,0)},n.canSkipNow=function(){return 0==this.getTimeUntilSkippable()},n.skip=function(){this.g.currentTime+=this.getRemainingTime()},n.pause=function(){return this.g.pause()},n.play=function(){return this.g.play()},n.getVolume=function(){return this.g.volume},n.setVolume=function(e){this.g.volume=e},n.isMuted=function(){return this.g.muted},n.isLinear=function(){return this.l},n.resize=function(){},n.setMuted=function(e){this.g.muted=e},n.getSequenceLength=function(){return this.j?this.j:1},n.getPositionInSequence=function(){return this.i?this.i:1},n.getTitle=function(){return this.h.adTitle},n.getDescription=function(){return""},n.getVastMediaBitrate=function(){return 0},n.getVastMediaHeight=function(){return 0},n.getVastMediaWidth=function(){return 0},n.getAdId=function(){return this.h.adId},n.getCreativeAdId=function(){return this.h.creativeId},n.getAdvertiserName=function(){return""},n.getMediaUrl=function(){return null},n.getTimeOffset=function(){return 0},n.getPodIndex=function(){return 0},n.release=function(){this.j=this.i=this.g=this.h=null},F("shaka.ads.MediaTailorAd",Mc),Mc.prototype.release=Mc.prototype.release,Mc.prototype.getPodIndex=Mc.prototype.getPodIndex,Mc.prototype.getTimeOffset=Mc.prototype.getTimeOffset,Mc.prototype.getMediaUrl=Mc.prototype.getMediaUrl,Mc.prototype.getAdvertiserName=Mc.prototype.getAdvertiserName,Mc.prototype.getCreativeAdId=Mc.prototype.getCreativeAdId,Mc.prototype.getAdId=Mc.prototype.getAdId,Mc.prototype.getVastMediaWidth=Mc.prototype.getVastMediaWidth,Mc.prototype.getVastMediaHeight=Mc.prototype.getVastMediaHeight,Mc.prototype.getVastMediaBitrate=Mc.prototype.getVastMediaBitrate,Mc.prototype.getDescription=Mc.prototype.getDescription,Mc.prototype.getTitle=Mc.prototype.getTitle,Mc.prototype.getPositionInSequence=Mc.prototype.getPositionInSequence,Mc.prototype.getSequenceLength=Mc.prototype.getSequenceLength,Mc.prototype.setMuted=Mc.prototype.setMuted,Mc.prototype.resize=Mc.prototype.resize,Mc.prototype.isLinear=Mc.prototype.isLinear,Mc.prototype.isMuted=Mc.prototype.isMuted,Mc.prototype.setVolume=Mc.prototype.setVolume,Mc.prototype.getVolume=Mc.prototype.getVolume,Mc.prototype.play=Mc.prototype.play,Mc.prototype.pause=Mc.prototype.pause,Mc.prototype.skip=Mc.prototype.skip,Mc.prototype.canSkipNow=Mc.prototype.canSkipNow,Mc.prototype.getTimeUntilSkippable=Mc.prototype.getTimeUntilSkippable,Mc.prototype.isSkippable=Mc.prototype.isSkippable,Mc.prototype.isPaused=Mc.prototype.isPaused,Mc.prototype.getRemainingTime=Mc.prototype.getRemainingTime,Mc.prototype.getMinSuggestedDuration=Mc.prototype.getMinSuggestedDuration,Mc.prototype.getDuration=Mc.prototype.getDuration,Nc.prototype.stop=function(){for(var e=l(this.m),t=e.next();!t.done;t=e.next())t=t.value,this.o.Lb(t.target,t.type,t.listener);Hc(this),this.m=[],this.s=[],this.G="",this.T=!0,this.H="",this.A=null,this.j=[],this.N=[],this.F.clear()},Nc.prototype.release=function(){this.stop(),this.o&&this.o.release()},Nc.prototype.onManifestUpdated=function(e){this.I=e,""!=this.G&&(function(e,t,n){var r,i,a,o,s,u,c,d,p,f,h,y,g,v,m;I((function(_){if(1==_.g)return r=ri([t],{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:3e4,stallTimeout:5e3,connectionTimeout:1e4}),i=e.K.request(7,r),E(_,2),b(_,i.promise,4);if(2!=_.g){if(a=_.h,o=[],s=Wt(a.data),0<(u=JSON.parse(s)).avails.length){if(JSON.stringify(e.j)!=JSON.stringify(u.avails)){for(e.j=u.avails,c=l(e.j),d=c.next();!d.done;d=c.next())for(p=d.value,f=l(p.nonLinearAdsList),h=f.next();!h.done;h=f.next())for(y=h.value,g=l(y.nonLinearAdList),v=g.next();!v.done;v=g.next())m=v.value,Uc(e,m);o=e.getCuePoints(),e.i(new qr("ad-cue-points-changed",(new Map).set("cuepoints",o)))}}else e.j.length&&e.i(new qr("ad-cue-points-changed",(new Map).set("cuepoints",o))),Hc(e),e.j=[];return n&&(e.I||0<o.length)&&function(e){jc(e),e.I||(Fc(e),e.o.D(e.g,"seeked",(function(){Fc(e)})),e.o.D(e.g,"ended",(function(){Hc(e)}))),e.o.D(e.g,"timeupdate",(function(){jc(e)}))}(e),T(_,0)}A(_),k(_)}))}(this,this.G,this.T),this.T=!1)},Nc.prototype.getCuePoints=function(){for(var e=[],t=l(this.j),n=t.next();!n.done;n=t.next())for(var r=(n=l(n.value.ads)).next();!r.done;r=n.next())r=r.value,e.push({start:r.startTimeInSeconds,end:r.startTimeInSeconds+r.durationInSeconds});return e},(n=Kc.prototype).getDuration=function(){return this.i?this.i.duration:-1},n.getMinSuggestedDuration=function(){return this.getDuration()},n.getRemainingTime=function(){return this.i?this.i.duration-this.i.currentTime:-1},n.isPaused=function(){return this.h.paused},n.isSkippable=function(){return this.g.isSkippable()},n.getTimeUntilSkippable=function(){var e=this.g.getSkipTimeOffset();return e=this.getRemainingTime()-e,Math.max(e,0)},n.canSkipNow=function(){return 0==this.getTimeUntilSkippable()},n.skip=function(){this.h.currentTime+=this.getRemainingTime()},n.pause=function(){return this.h.pause()},n.play=function(){return this.h.play()},n.getVolume=function(){return this.h.volume},n.setVolume=function(e){this.h.volume=e},n.isMuted=function(){return this.h.muted},n.isLinear=function(){return!0},n.resize=function(){},n.setMuted=function(e){this.h.muted=e},n.getSequenceLength=function(){var e=this.g.getAdPodInfo();return null==e?1:e.getTotalAds()},n.getPositionInSequence=function(){var e=this.g.getAdPodInfo();return null==e?1:e.getAdPosition()},n.getTitle=function(){return this.g.getTitle()},n.getDescription=function(){return this.g.getDescription()},n.getVastMediaBitrate=function(){return 0},n.getVastMediaHeight=function(){return this.g.getVastMediaHeight()},n.getVastMediaWidth=function(){return this.g.getVastMediaWidth()},n.getAdId=function(){return this.g.getAdId()},n.getCreativeAdId=function(){return this.g.getCreativeAdId()},n.getAdvertiserName=function(){return this.g.getAdvertiserName()},n.getMediaUrl=function(){return null},n.getTimeOffset=function(){var e=this.g.getAdPodInfo();return null==e?0:e.getTimeOffset()},n.getPodIndex=function(){var e=this.g.getAdPodInfo();return null==e?0:e.getPodIndex()},n.release=function(){this.h=this.i=this.g=null},F("shaka.ads.ServerSideAd",Kc),Kc.prototype.release=Kc.prototype.release,Kc.prototype.getPodIndex=Kc.prototype.getPodIndex,Kc.prototype.getTimeOffset=Kc.prototype.getTimeOffset,Kc.prototype.getMediaUrl=Kc.prototype.getMediaUrl,Kc.prototype.getAdvertiserName=Kc.prototype.getAdvertiserName,Kc.prototype.getCreativeAdId=Kc.prototype.getCreativeAdId,Kc.prototype.getAdId=Kc.prototype.getAdId,Kc.prototype.getVastMediaWidth=Kc.prototype.getVastMediaWidth,Kc.prototype.getVastMediaHeight=Kc.prototype.getVastMediaHeight,Kc.prototype.getVastMediaBitrate=Kc.prototype.getVastMediaBitrate,Kc.prototype.getDescription=Kc.prototype.getDescription,Kc.prototype.getTitle=Kc.prototype.getTitle,Kc.prototype.getPositionInSequence=Kc.prototype.getPositionInSequence,Kc.prototype.getSequenceLength=Kc.prototype.getSequenceLength,Kc.prototype.setMuted=Kc.prototype.setMuted,Kc.prototype.resize=Kc.prototype.resize,Kc.prototype.isLinear=Kc.prototype.isLinear,Kc.prototype.isMuted=Kc.prototype.isMuted,Kc.prototype.setVolume=Kc.prototype.setVolume,Kc.prototype.getVolume=Kc.prototype.getVolume,Kc.prototype.play=Kc.prototype.play,Kc.prototype.pause=Kc.prototype.pause,Kc.prototype.skip=Kc.prototype.skip,Kc.prototype.canSkipNow=Kc.prototype.canSkipNow,Kc.prototype.getTimeUntilSkippable=Kc.prototype.getTimeUntilSkippable,Kc.prototype.isSkippable=Kc.prototype.isSkippable,Kc.prototype.isPaused=Kc.prototype.isPaused,Kc.prototype.getRemainingTime=Kc.prototype.getRemainingTime,Kc.prototype.getMinSuggestedDuration=Kc.prototype.getMinSuggestedDuration,Kc.prototype.getDuration=Kc.prototype.getDuration,(n=zc.prototype).configure=function(){},n.stop=function(){this.B="",this.o=null,this.C=[]},n.release=function(){this.stop(),this.h&&this.h.release()},n.onCueMetadataChange=function(e){if(e.key&&e.data){var t={};t[e.key]=e.data,this.g.onTimedMetadata(t)}},n.getCuePoints=function(){return this.C},y(Wc,$r),(n=Wc.prototype).setLocale=function(e){this.m=e},n.configure=function(e){this.l=e,this.i&&this.i.configure(this.l),this.g&&this.g.configure(this.l)},n.initClientSide=function(t,n,r){var i=this;if(!e.google||!google.ima||!google.ima.AdsLoader)throw new bt(2,10,1e4);this.i&&this.i.release(),this.i=new Rc(t,n,this.m,r,(function(e){return Yc(i,e)})),this.i.configure(this.l)},n.release=function(){this.i&&(this.i.release(),this.i=null),this.h&&(this.h.release(),this.h=null),this.g&&(this.g.release(),this.g=null),$r.prototype.release.call(this)},n.onAssetUnload=function(){this.i&&this.i.stop(),this.h&&this.h.stop(),this.g&&this.g.stop(),this.dispatchEvent(new qr("ad-stopped")),this.j=new xc},n.requestClientSideAds=function(e){if(!this.i)throw new bt(1,10,10001);var t=this.i;t.g&&t.g.destroy(),t.l&&t.l.contentComplete(),t.G=Date.now()/1e3,t.l.requestAds(e)},n.updateClientSideAdsRenderingSettings=function(e){if(!this.i)throw new bt(1,10,10001);var t=this.i;t.B=e,t.g&&t.g.updateAdsRenderingSettings(t.B)},n.initMediaTailor=function(e,t,n){var r=this;this.h&&this.h.release(),this.h=new Nc(e,t,n,(function(e){return Yc(r,e)}))},n.requestMediaTailorStream=function(e,t,n){if(!this.h)throw new bt(1,10,10005);var r=this.h;return n=void 0===n?"":n,r.l?e=Promise.reject(new bt(1,10,10004)):(r.l=new Vr,function(e,t,n){var r,i,a,o,s,l,u,c,d,p,f;I((function(h){if(1==h.g)return(r=ri([t],{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:3e4,stallTimeout:5e3,connectionTimeout:1e4})).method="POST",n&&(i=JSON.stringify(n),r.body=qt(i)),a=e.K.request(7,r),E(h,2),b(h,a.promise,4);if(2!=h.g){if(o=h.h,s=Wt(o.data),!(l=JSON.parse(s)).manifestUrl||!l.trackingUrl)throw Error("Insufficient data from MediaTailor.");return u=new rt(t),c=new rt(l.trackingUrl),e.G=u.resolve(c).toString(),d=Date.now()/1e3,p=d-e.Y,e.i(new qr("ads-loaded",(new Map).set("loadTime",p))),f=new rt(l.manifestUrl),e.l.resolve(u.resolve(f).toString()),e.l=null,T(h,0)}if(A(h),!e.H.length)return e.l.reject("MediaTailor request returned an error and there was no backup asset uri provided."),e.l=null,h.return();e.l.resolve(e.H),e.l=null,k(h)}))}(r,e,t),r.H=n||"",r.Y=Date.now()/1e3,e=r.l),e},n.addMediaTailorTrackingUrl=function(e){if(!this.h)throw new bt(1,10,10005);var t=this.h;t.G=e,t.i(new qr("ads-loaded",(new Map).set("loadTime",0)))},n.initServerSide=function(t,n){var r=this;if(!e.google||!google.ima||!google.ima.dai)throw new bt(2,10,10002);this.g&&this.g.release(),this.g=new zc(t,n,this.m,(function(e){return Yc(r,e)})),this.g.configure(this.l)},n.requestServerSideStream=function(e,t){if(t=void 0===t?"":t,!this.g)throw new bt(1,10,10003);e.adTagParameters||(e.adTagParameters={});var n=e.adTagParameters;return(n.mpt||n.mpv)&&Y('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.'),e.adTagParameters.mpt="shaka-player",e.adTagParameters.mpv="v4.8.11",(n=this.g).j?e=Promise.reject(new bt(1,10,10004)):(e instanceof google.ima.dai.api.LiveStreamRequest&&(n.G=!0),n.j=new Vr,n.g.requestStream(e),n.B=t||"",n.F=Date.now()/1e3,e=n.j),e},n.replaceServerSideAdTagParameters=function(e){if(!this.g)throw new bt(1,10,10003);(e.mpt||e.mpv)&&Y('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.'),e.mpt="Shaka Player",e.mpv="v4.8.11",this.g.g.replaceAdTagParameters(e)},n.getServerSideCuePoints=function(){return ae("AdManager.getServerSideCuePoints","Please use getCuePoints function."),this.getCuePoints()},n.getCuePoints=function(){var e=[];return this.g&&(e=e.concat(this.g.getCuePoints())),this.h&&(e=e.concat(this.h.getCuePoints())),e},n.getStats=function(){var e=this.j;return{loadTimes:e.h,started:e.g,playedCompletely:e.i,skipped:e.j}},n.onManifestUpdated=function(e){this.h&&this.h.onManifestUpdated(e)},n.onDashTimedMetadata=function(e){this.g&&"urn:google:dai:2018"==e.schemeIdUri&&this.g.g.processMetadata(e.schemeIdUri,e.eventNode?e.eventNode.attributes.messageData:null,e.startTime)},n.onHlsTimedMetadata=function(e,t){this.g&&this.g.g.processMetadata("ID3",e.data,t)},n.onCueMetadataChange=function(e){this.g&&this.g.onCueMetadataChange(e)},F("shaka.ads.AdManager",Wc),Wc.prototype.onCueMetadataChange=Wc.prototype.onCueMetadataChange,Wc.prototype.onHlsTimedMetadata=Wc.prototype.onHlsTimedMetadata,Wc.prototype.onDashTimedMetadata=Wc.prototype.onDashTimedMetadata,Wc.prototype.onManifestUpdated=Wc.prototype.onManifestUpdated,Wc.prototype.getStats=Wc.prototype.getStats,Wc.prototype.getCuePoints=Wc.prototype.getCuePoints,Wc.prototype.getServerSideCuePoints=Wc.prototype.getServerSideCuePoints,Wc.prototype.replaceServerSideAdTagParameters=Wc.prototype.replaceServerSideAdTagParameters,Wc.prototype.requestServerSideStream=Wc.prototype.requestServerSideStream,Wc.prototype.initServerSide=Wc.prototype.initServerSide,Wc.prototype.addMediaTailorTrackingUrl=Wc.prototype.addMediaTailorTrackingUrl,Wc.prototype.requestMediaTailorStream=Wc.prototype.requestMediaTailorStream,Wc.prototype.initMediaTailor=Wc.prototype.initMediaTailor,Wc.prototype.updateClientSideAdsRenderingSettings=Wc.prototype.updateClientSideAdsRenderingSettings,Wc.prototype.requestClientSideAds=Wc.prototype.requestClientSideAds,Wc.prototype.onAssetUnload=Wc.prototype.onAssetUnload,Wc.prototype.release=Wc.prototype.release,Wc.prototype.initClientSide=Wc.prototype.initClientSide,Wc.prototype.configure=Wc.prototype.configure,Wc.prototype.setLocale=Wc.prototype.setLocale,Wc.ADS_LOADED="ads-loaded",Wc.AD_STARTED="ad-started",Wc.AD_FIRST_QUARTILE="ad-first-quartile",Wc.AD_MIDPOINT="ad-midpoint",Wc.AD_THIRD_QUARTILE="ad-third-quartile",Wc.AD_COMPLETE="ad-complete",Wc.AD_STOPPED="ad-stopped",Wc.AD_SKIPPED="ad-skipped",Wc.AD_VOLUME_CHANGED="ad-volume-changed",Wc.AD_MUTED="ad-muted",Wc.AD_PAUSED="ad-paused",Wc.AD_RESUMED="ad-resumed",Wc.AD_SKIP_STATE_CHANGED="ad-skip-state-changed",Wc.CUEPOINTS_CHANGED="ad-cue-points-changed",Wc.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded",Wc.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded",Wc.AD_CLICKED="ad-clicked",Wc.AD_PROGRESS="ad-progress",Wc.AD_BUFFERING="ad-buffering",Wc.AD_IMPRESSION="ad-impression",Wc.AD_DURATION_CHANGED="ad-duration-changed",Wc.AD_CLOSED="ad-closed",Wc.AD_LOADED="ad-loaded",Wc.ALL_ADS_COMPLETED="all-ads-completed",Wc.AD_LINEAR_CHANGED="ad-linear-changed",Wc.AD_METADATA="ad-metadata",Wc.AD_RECOVERABLE_ERROR="ad-recoverable-error",Wc.AD_ERROR="ad-error",Wc.AD_BREAK_READY="ad-break-ready",Wc.AD_INTERACTION="ad-interaction",Cc=function(){return new Wc};var Xc="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),Qc="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),$c=["loop","playbackRate"],Jc=["pause","play"],ed={getAssetUri:2,getAudioLanguages:4,getAudioLanguagesAndRoles:4,getBufferFullness:1,getBufferedInfo:2,getExpiration:2,getKeyStatuses:2,getPlaybackRate:2,getTextLanguages:4,getTextLanguagesAndRoles:4,getImageTracks:2,getThumbnails:2,isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10,getManifestType:10},td={getConfiguration:4,getStats:5,getTextTracks:2,getVariantTracks:2},nd={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20,getSegmentAvailabilityDuration:20},rd=[["getConfiguration","configure"]],id=[["isTextTrackVisible","setTextTrackVisibility"]],ad="addChaptersTrack addTextTrackAsync addThumbnailsTrack cancelTrickPlay configure getChapters getChaptersTracks resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay updateStartTime goToLive".split(" "),od=["attach","attachCanvas","detach","load","unload"];function sd(e,t,n,r,i,a,o){var s=this;this.G=e,this.K=o,this.l=new Tt(t),this.L=n,this.s=!1,this.A=r,this.F=i,this.N=a,this.h=this.m=!1,this.I="",this.o=null,this.B=function(){return dd(s)},this.C=function(e,t){switch((e=qc(t)).type){case"event":var n=e.targetName,r=Xr(e.event);s.A(n,r);break;case"update":for(r in n=e.update)for(var i in e=s.g[r]||{},n[r])e[i]=n[r][i];s.s&&(s.L(),s.s=!1);break;case"asyncComplete":if(r=e.id,i=e.error,e=s.i[r],delete s.i[r],e)if(i){for(n in r=new bt(i.severity,i.category,i.code),i)r[n]=i[n];e.reject(r)}else e.resolve()}},this.g={video:{},player:{}},this.H=0,this.i={},this.j=null,md.add(this)}function ld(e,t){var n=e.N();gd=t,t.addUpdateListener(e.B),t.addMessageListener("urn:x-cast:com.google.shaka.v2",e.C),dd(e),fd(e,{type:"init",initState:n,appData:e.o}),e.j.resolve()}function ud(e,t){var n=8003;switch(t.code){case"cancel":n=8004;break;case"timeout":n=8005;break;case"receiver_unavailable":n=8006}e.j.reject(new bt(2,8,n,t))}function cd(e){var t=gd;t.removeUpdateListener(e.B),t.removeMessageListener("urn:x-cast:com.google.shaka.v2",e.C)}function dd(e){var t=!!gd&&"connected"==gd.status;if(e.h&&!t){for(var n in e.F(),e.g)e.g[n]={};pd(e)}e.h=t,e.I=t?gd.receiver.friendlyName:"",e.l.hc()}function pd(e){for(var t in e.i){var n=e.i[t];delete e.i[t],n.reject(new bt(1,7,7e3))}}function fd(e,t){t=Zc(t);var n=gd;try{n.sendMessage("urn:x-cast:com.google.shaka.v2",t,(function(){}),q)}catch(r){throw t=new bt(2,8,8005,r),n=new qr("error",(new Map).set("detail",t)),e.A("player",n),e.rc(),t}}(n=sd.prototype).destroy=function(){return md.delete(this),pd(this),gd&&cd(this),this.l&&(this.l.stop(),this.l=null),this.F=this.A=null,this.h=this.m=!1,this.C=this.B=this.j=this.i=this.g=this.o=null,Promise.resolve()},n.Wa=function(){return this.h},n.vf=function(){return this.I},n.init=function(){if(this.G.length)if(e.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0,this.l.hc();var t=new chrome.cast.SessionRequest(this.G,[],null,this.K,null);t=new chrome.cast.ApiConfig(t,(function(e){for(var t=l(md),n=t.next();!n.done;n=t.next()){var r=e;(n=n.value).j=new Vr,n.s=!0,ld(n,r)}}),(function(e){for(var t=l(md),n=t.next();!n.done;n=t.next())n=n.value,yd="available"==e,n.l.hc()}),"origin_scoped"),chrome.cast.initialize(t,(function(){}),(function(){})),yd&&this.l.U(hd),(t=gd)&&t.status!=chrome.cast.SessionStatus.STOPPED?(this.j=new Vr,this.s=!0,ld(this,t)):gd=null}else e.__onGCastApiAvailable!==bd&&(vd=e.__onGCastApiAvailable||null,e.__onGCastApiAvailable=bd)},n.Cf=function(e){this.o=e,this.h&&fd(this,{type:"appData",appData:this.o})},n.cast=function(){var e=this;return I((function(t){if(!e.m)throw new bt(1,8,8e3);if(!yd)throw new bt(1,8,8001);if(e.h)throw new bt(1,8,8002);return e.j=new Vr,chrome.cast.requestSession((function(t){return ld(e,t)}),(function(t){return ud(e,t)})),b(t,e.j,0)}))},n.rc=function(){if(this.h){if(pd(this),gd){cd(this);try{gd.stop((function(){}),(function(){}))}catch(e){}gd=null}dd(this)}},n.get=function(e,t){var n=this;if("video"==e){if(Jc.includes(t))return function(){return n.vg.apply(n,[e,t].concat(u(D.apply(0,arguments))))}}else if("player"==e){if(nd[t]&&!this.get("player","isLive")())return function(){};if(ad.includes(t))return function(){return n.vg.apply(n,[e,t].concat(u(D.apply(0,arguments))))};if(od.includes(t))return function(){return n.ji.apply(n,[e,t].concat(u(D.apply(0,arguments))))};if(ed[t]||td[t])return function(){return n.g[e][t]}}return this.g[e][t]},n.set=function(e,t,n){this.g[e][t]=n,fd(this,{type:"set",targetName:e,property:t,value:n})},n.vg=function(e,t){fd(this,{type:"call",targetName:e,methodName:t,args:D.apply(2,arguments)})},n.ji=function(e,t){var n=D.apply(2,arguments),r=new Vr,i=this.H.toString();this.H++,this.i[i]=r;try{fd(this,{type:"asyncCall",targetName:e,methodName:t,args:n,id:i})}catch(e){r.reject(e)}return r};var hd=.02,yd=!1,gd=null,vd=null,md=new Set;function bd(t){if(vd?e.__onGCastApiAvailable=vd:delete e.__onGCastApiAvailable,vd=null,t)for(var n=l(md),r=n.next();!r.done;r=n.next())r.value.init();"function"==typeof e.__onGCastApiAvailable&&e.__onGCastApiAvailable(t)}function kd(e,t,n,r){r=void 0!==r&&r,$r.call(this);var i=this;this.i=e,this.h=t,this.m=this.o=this.j=this.s=this.l=null,this.C=n,this.B=r,this.A=new Map,this.g=new sd(n,(function(){return Td(i)}),(function(){return Ad(i)}),(function(e,t){return Cd(i,e,t)}),(function(){return Sd(i)}),(function(){return _d(i)}),r),function(e){e.g.init(),e.m=new $;for(var t=l(Xc),n=t.next();!n.done;n=t.next())e.m.D(e.i,n.value,(function(t){e.g.Wa()||(t=Xr(t),e.j.dispatchEvent(t))}));for(var r in Qr)e.m.D(e.h,Qr[r],(function(t){e.g.Wa()||e.o.dispatchEvent(t)}));for(var i in e.l={},t={},e.i)t.Hc=i,Object.defineProperty(e.l,t.Hc,{configurable:!1,enumerable:!0,get:function(t){return function(){return wd(e,t.Hc)}}(t),set:function(t){return function(n){var r=t.Hc;e.g.Wa()?e.g.set("video",r,n):e.i[r]=n}}(t)}),t={Hc:t.Hc};e.s={},Ed(e,(function(t){Object.defineProperty(e.s,t,{configurable:!1,enumerable:!0,get:function(){return function(e,t){if(e.A.has(t)&&(t=e.A.get(t)),"addEventListener"==t)return function(t,n,r){return e.o.addEventListener(t,n,r)};if("removeEventListener"==t)return function(t,n,r){return e.o.removeEventListener(t,n,r)};if("getMediaElement"==t)return function(){return e.l};if("getSharedConfiguration"==t)return e.g.get("player","getConfiguration");if("getNetworkingEngine"==t)return function(){return e.h.Wb()};if("getDrmEngine"==t)return function(){return e.h.B};if("getAdManager"==t)return function(){return e.h.bg()};if("setVideoContainer"==t)return function(t){return e.h.Jg(t)};if(e.g.Wa()){if("getManifest"==t||"drmInfo"==t)return function(){return Y(t+"() does not work while casting!"),null};if("attach"==t||"detach"==t)return function(){return Y(t+"() does not work while casting!"),Promise.resolve()}}return e.g.Wa()&&0==Object.keys(e.g.g.video).length&&(ed[t]||td[t])||!e.g.Wa()?e.h[t].bind(e.h):e.g.get("player",t)}(e,t)}})})),function(e){var t=new Map;Ed(e,(function(n,r){t.has(r)?(r=t.get(r),n.length<r.length?e.A.set(n,r):e.A.set(r,n)):t.set(r,n)}))}(e),e.j=new $r,e.j.Vd=e.l,e.o=new $r,e.o.Vd=e.s}(this)}function Ed(e,t){function n(e){return"constructor"!=e&&"function"==typeof i[e]&&!a.has(e)}var r,i=e.h,a=new Set;for(r in i)n(r)&&(a.add(r),t(r,i[r]));for(e=Object.getPrototypeOf(i),r=Object.getPrototypeOf({});e&&e!=r;){for(var o=l(Object.getOwnPropertyNames(e)),s=o.next();!s.done;s=o.next())n(s=s.value)&&(a.add(s),t(s,i[s]));e=Object.getPrototypeOf(e)}}function _d(e){var t={video:{},player:{},playerAfterLoad:{},manifest:e.h.ad(),startTime:null};e.i.pause();for(var n=l($c),r=n.next();!r.done;r=n.next())r=r.value,t.video[r]=e.i[r];for(e.i.ended||(t.startTime=e.i.currentTime),r=(n=l(rd)).next();!r.done;r=n.next()){var i=r.value;r=i[1],i=e.h[i[0]](),t.player[r]=i}for(r=(n=l(id)).next();!r.done;r=n.next())r=(i=r.value)[1],i=e.h[i[0]](),t.playerAfterLoad[r]=i;return t}function Td(e){var t=new qr("caststatuschanged");e.dispatchEvent(t)}function Ad(e){var t=new qr(e.l.paused?"pause":"play");e.j.dispatchEvent(t)}function Sd(e){for(var t=l(rd),n=t.next();!n.done;n=t.next()){var r=n.value;n=r[1],r=e.g.get("player",r[0])(),e.h[n](r)}var i=e.g.get("player","getAssetUri")();r=e.g.get("video","ended"),t=Promise.resolve();var a,o=e.i.autoplay;n=null,r||(n=e.g.get("video","currentTime")),(r=e.g.get("player","getTextTracks")())&&r.length&&(a=r.find((function(e){return e.active})));var s=e.g.get("player","isTextTrackVisible")();i&&(e.i.autoplay=!1,t=e.h.load(i,n));var u={};for(r=(n=l($c)).next();!r.done;r=n.next())r=r.value,u[r]=e.g.get("video",r);t.then((function(){if(e.i){for(var t=l($c),n=t.next();!n.done;n=t.next())n=n.value,e.i[n]=u[n];for(n=(t=l(id)).next();!n.done;n=t.next()){var r=n.value;n=r[1],r=e.g.get("player",r[0])(),e.h[n](r)}e.h.Fg(s),a&&e.h.Af(a.language,a.roles,a.forced),e.i.autoplay=o,i&&e.i.play()}}),(function(t){t=new qr("error",t=(new Map).set("detail",t)),e.h.dispatchEvent(t)}))}function wd(e,t){if("addEventListener"==t)return function(t,n,r){return e.j.addEventListener(t,n,r)};if("removeEventListener"==t)return function(t,n,r){return e.j.removeEventListener(t,n,r)};if(e.g.Wa()&&0==Object.keys(e.g.g.video).length){var n=e.i[t];if("function"!=typeof n)return n}return e.g.Wa()?e.g.get("video",t):("function"==typeof(t=e.i[t])&&(t=t.bind(e.i)),t)}function Cd(e,t,n){e.g.Wa()&&("video"==t?e.j.dispatchEvent(n):"player"==t&&e.o.dispatchEvent(n))}function xd(e,t,n,r){$r.call(this);var i=this;this.g=e,this.h=t,this.j=new $,this.H={video:e,player:t},this.C=n||function(){},this.I=r||function(e){return e},this.i=null,this.F=!1,this.o=!0,this.m=0,this.B=!1,this.A=!0,this.s=this.l=null,this.G=new Tt((function(){Dd(i)})),function(e){var t=cast.receiver.CastReceiverManager.getInstance();t.onSenderConnected=function(){return Pd(e)},t.onSenderDisconnected=function(){return Pd(e)},t.onSystemVolumeChanged=function(){var t=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();t&&Nd(e,{type:"update",update:{video:{volume:t.level,muted:t.muted}}},e.l),Nd(e,{type:"event",targetName:"video",event:{type:"volumechange"}},e.l)},e.s=t.getCastMessageBus("urn:x-cast:com.google.cast.media"),e.s.onMessage=function(t){return function(e,t){var n=qc(t.data);switch(n.type){case"PLAY":e.g.play(),Ud(e);break;case"PAUSE":e.g.pause(),Ud(e);break;case"SEEK":t=n.currentTime;var r=n.resumeState;null!=t&&(e.g.currentTime=Number(t)),r&&"PLAYBACK_START"==r?(e.g.play(),Ud(e)):r&&"PLAYBACK_PAUSE"==r&&(e.g.pause(),Ud(e));break;case"STOP":e.h.ic().then((function(){e.h&&Ud(e)}));break;case"GET_STATUS":Ld(e,Number(n.requestId));break;case"VOLUME":t=(r=n.volume).level,r=r.muted;var i=e.g.volume,a=e.g.muted;null!=t&&(e.g.volume=Number(t)),null!=r&&(e.g.muted=r),i==e.g.volume&&a==e.g.muted||Ud(e);break;case"LOAD":e.m=0,e.B=!1,e.A=!1,t=n.media,r=n.currentTime,i=e.I(t.contentId),a=n.autoplay||!0,e.C(t.customData),a&&(e.g.autoplay=!0),e.h.load(i,r).then((function(){e.h&&Ld(e)})).catch((function(t){var r="LOAD_FAILED";7==t.category&&7e3==t.code&&(r="LOAD_CANCELLED"),Nd(e,{requestId:Number(n.requestId),type:r},e.s)}));break;default:Nd(e,{requestId:Number(n.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},e.s)}}(e,t)},e.l=t.getCastMessageBus("urn:x-cast:com.google.shaka.v2"),e.l.onMessage=function(t){return function(e,t){var n=qc(t.data);switch(n.type){case"init":e.m=0,e.B=!1,e.A=!0,function(e,t,n){var r,i,a,o,s,l,u,c,d,p;I((function(f){switch(f.g){case 1:for(r in t.player)i=t.player[r],e.h[r](i);return e.C(n),a=e.g.autoplay,t.manifest?(e.g.autoplay=!1,E(f,5),b(f,e.h.load(t.manifest,t.startTime),7)):b(f,Promise.resolve(),3);case 7:T(f,3);break;case 5:return o=A(f),s=(new Map).set("detail",o),l=new qr("error",s),e.h&&e.h.dispatchEvent(l),f.return();case 3:if(!e.h)return f.return();for(u in t.video)c=t.video[u],e.g[u]=c;for(d in t.playerAfterLoad)p=t.playerAfterLoad[d],e.h[d](p);e.g.autoplay=a,t.manifest&&(e.g.play(),Ud(e)),k(f)}}))}(e,n.initState,n.appData),Dd(e);break;case"appData":e.C(n.appData);break;case"set":var r=n.targetName,i=n.property;if(n=n.value,"video"==r){if(t=cast.receiver.CastReceiverManager.getInstance(),"volume"==i){t.setSystemVolumeLevel(n);break}if("muted"==i){t.setSystemVolumeMuted(n);break}}e.H[r][i]=n;break;case"call":(r=e.H[n.targetName])[n.methodName].apply(r,n.args);break;case"asyncCall":r=n.targetName,i=n.methodName,"player"==r&&"load"==i&&(e.m=0,e.B=!1);var a=n.id,o=t.senderId;n=(t=e.H[r])[i].apply(t,n.args),"player"==r&&"load"==i&&(n=n.then((function(){e.A=!0}))),n.then((function(){return Md(e,o,a,null)}),(function(t){return Md(e,o,a,t)}))}}(e,t)},t.start();for(var n=(t=l(Xc)).next();!n.done;n=t.next())e.j.D(e.g,n.value,(function(t){return Id(e,"video",t)}));for(var r in Qr)e.j.D(e.h,Qr[r],(function(t){return Id(e,"player",t)}));e.j.D(e.g,"loadeddata",(function(){e.B=!0})),e.j.D(e.h,"loading",(function(){e.o=!1,Rd(e)})),e.j.D(e.g,"playing",(function(){e.o=!1,Rd(e)})),e.j.D(e.g,"pause",(function(){Rd(e)})),e.j.D(e.h,"unloading",(function(){e.o=!0,Rd(e)})),e.j.D(e.g,"ended",(function(){new Tt((function(){e.g&&e.g.ended&&(e.o=!0,Rd(e))})).U(Fd)}))}(this)}function Pd(e){e.m=0,e.A=!0,e.F=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length,Rd(e)}function Rd(e){var t;I((function(n){return 1==n.g?b(n,Promise.resolve(),2):e.h?(t=new qr("caststatuschanged"),e.dispatchEvent(t),Od(e)||Ud(e),void k(n)):n.return()}))}function Id(e,t,n){e.h&&(Dd(e),Nd(e,{type:"event",targetName:t,event:n},e.l))}function Dd(e){e.G.U(Bd);for(var t={video:{},player:{}},n=l(Qc),r=n.next();!r.done;r=n.next())r=r.value,t.video[r]=e.g[r];if(e.h.R())for(var i in nd)0==e.m%nd[i]&&(t.player[i]=e.h[i]());for(var a in ed)0==e.m%ed[a]&&(t.player[a]=e.h[a]());for(var o in(n=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())&&(t.video.volume=n.level,t.video.muted=n.muted),Nd(e,{type:"update",update:t},e.l),td)0==e.m%td[o]&&((t={player:{}}).player[o]=e.h[o](),Nd(e,{type:"update",update:t},e.l));e.B&&(e.m+=1),Od(e)}function Od(e){return!(!e.A||!e.g.duration&&!e.h.R())&&(Ld(e),e.A=!1,!0)}function Ld(e,t){var n={contentId:e.h.ad(),streamType:e.h.R()?"LIVE":"BUFFERED",contentType:""};e.h.R()||(n.duration=e.g.duration),e.i&&(n.metadata=e.i),Ud(e,void 0===t?0:t,n)}function Md(e,t,n,r){e.h&&Nd(e,{type:"asyncComplete",id:n,error:r},e.l,t)}function Nd(e,t,n,r){e.F&&(e=Zc(t),r?n.getCastChannel(r).send(e):n.broadcast(e))}function Ud(e,t,n){n=void 0===n?null:n;var r={mediaSessionId:0,playbackRate:e.g.playbackRate,playerState:e.o?jd:e.h.Ye()?Vd:e.g.paused?Gd:Hd,currentTime:e.g.currentTime,supportedMediaCommands:63,volume:{level:e.g.volume,muted:e.g.muted}};n&&(r.media=n),Nd(e,{requestId:void 0===t?0:t,type:"MEDIA_STATUS",status:[r]},e.s)}y(kd,$r),(n=kd.prototype).destroy=function(e){return e&&this.g.rc(),this.m&&(this.m.release(),this.m=null),e=[],this.h&&(e.push(this.h.destroy()),this.h=null),this.g&&(e.push(this.g.destroy()),this.g=null),this.s=this.l=this.i=null,$r.prototype.release.call(this),Promise.all(e)},n.Gh=function(){return this.l},n.vh=function(){return this.s},n.Zg=function(){return this.g.m&&yd},n.Wa=function(){return this.g.Wa()},n.vf=function(){return this.g.vf()},n.cast=function(){var e=this;return I((function(t){return 1==t.g?b(t,e.g.cast(),2):e.h?b(t,e.h.ic(),0):t.return()}))},n.Cf=function(e){this.g.Cf(e)},n.Ai=function(){var e;(e=this.g).h&&chrome.cast.requestSession((function(t){return ld(e,t)}),(function(t){return ud(e,t)}))},n.rc=function(){this.g.rc()},n.$g=function(e,t){t=void 0!==t&&t;var n=this;return I((function(r){if(1==r.g)return e==n.C&&t==n.B?r.return():(n.C=e,n.B=t,n.g.rc(),b(r,n.g.destroy(),2));n.g=null,n.g=new sd(e,(function(){return Td(n)}),(function(){return Ad(n)}),(function(e,t){return Cd(n,e,t)}),(function(){return Sd(n)}),(function(){return _d(n)}),t),n.g.init(),k(r)}))},F("shaka.cast.CastProxy",kd),kd.prototype.changeReceiverId=kd.prototype.$g,kd.prototype.forceDisconnect=kd.prototype.rc,kd.prototype.suggestDisconnect=kd.prototype.Ai,kd.prototype.setAppData=kd.prototype.Cf,kd.prototype.cast=kd.prototype.cast,kd.prototype.receiverName=kd.prototype.vf,kd.prototype.isCasting=kd.prototype.Wa,kd.prototype.canCast=kd.prototype.Zg,kd.prototype.getPlayer=kd.prototype.vh,kd.prototype.getVideo=kd.prototype.Gh,kd.prototype.destroy=kd.prototype.destroy,y(xd,$r),(n=xd.prototype).isConnected=function(){return this.F},n.Mh=function(){return this.o},n.wi=function(e){this.i=e},n.eh=function(){this.i=null},n.xi=function(e){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC}),this.i.title=e},n.vi=function(e){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC}),this.i.images=[{url:e}]},n.ui=function(e){this.i||(this.i={}),this.i.artist=e,this.i.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK},n.destroy=function(){var e,t=this;return I((function(n){if(1==n.g)return t.j&&(t.j.release(),t.j=null),e=[],t.h&&(e.push(t.h.destroy()),t.h=null),t.G&&(t.G.stop(),t.G=null),t.g=null,t.H=null,t.C=null,t.F=!1,t.o=!0,t.l=null,t.s=null,$r.prototype.release.call(t),b(n,Promise.all(e),2);cast.receiver.CastReceiverManager.getInstance().stop(),k(n)}))},F("shaka.cast.CastReceiver",xd),xd.prototype.destroy=xd.prototype.destroy,xd.prototype.setContentArtist=xd.prototype.ui,xd.prototype.setContentImage=xd.prototype.vi,xd.prototype.setContentTitle=xd.prototype.xi,xd.prototype.clearContentMetadata=xd.prototype.eh,xd.prototype.setContentMetadata=xd.prototype.wi,xd.prototype.isIdle=xd.prototype.Mh,xd.prototype.isConnected=xd.prototype.isConnected;var Bd=.5,Fd=5,jd="IDLE",Hd="PLAYING",Vd="BUFFERING",Gd="PAUSED";function Kd(e,t,n,r,i){if(r>=i)return null;for(var a=-1,o=-1,s=0;s<n.length;s++)if(n[s].some((function(e){return null!=e&&""!=e.g.trim()}))){a=s;break}for(s=n.length-1;0<=s;s--)if(n[s].some((function(e){return null!=e&&""!=e.g.trim()}))){o=s;break}if(-1===a||-1===o)return null;for(var l=s=!1,u="white",c="black",d=zd(r,i,s,l,u,c);a<=o;a++){for(var p=n[a],f=-1,h=-1,y=0;y<p.length;y++)if(null!=p[y]&&""!==p[y].g.trim()){f=y;break}for(y=p.length-1;0<=y;y--)if(null!=p[y]&&""!==p[y].g.trim()){h=y;break}if(-1===f||-1===h)p=Wd(r,i),e.nestedCues.push(p);else{for(;f<=h;f++)if(y=p[f]){var g=y.l,v=y.i,m=y.j,b=y.h;g==s&&v==l&&m==u&&b==c||(d.payload&&e.nestedCues.push(d),d=zd(r,i,g,v,m,b),s=g,l=v,u=m,c=b),d.payload+=y.g}else d.payload+=" ";d.payload&&e.nestedCues.push(d),a!==o&&(d=Wd(r,i),e.nestedCues.push(d)),d=zd(r,i,s,l,u,c)}}return e.nestedCues.length?{cue:e,stream:t}:null}function zd(e,t,n,r,i,a){return e=new Ce(e,t,""),n&&e.textDecoration.push("underline"),r&&(e.fontStyle="italic"),e.color=i,e.backgroundColor=a,e}function Wd(e,t){return(e=new Ce(e,t,"")).lineBreak=!0,e}function Yd(e,t,n,r,i){this.g=e,this.l=t,this.i=n,this.h=r,this.j=i}function Zd(e,t){this.i=[],this.g=1,this.h=0,this.A=e,this.s=t,this.j=this.m=!1,this.l="white",this.o="black",Xd(this)}function qd(e,t,n){var r="CC"+(1+(e.A<<1|e.s)),i=new Ce(t,n,"");i.lineInterpretation=1;var a=lp.get(e.g);return a&&(i.line=a),Kd(i,r,e.i,t,n)}function Xd(e){Jd(e,0,15),e.g=1}function Qd(e,t,n){if(!(32>n||127<n)){var r="";switch(t){case ep:r=ip.has(n)?ip.get(n):String.fromCharCode(n);break;case tp:r=ap.get(n);break;case np:e.i[e.g].pop(),r=op.get(n);break;case rp:e.i[e.g].pop(),r=sp.get(n)}r&&e.i[e.g].push(new Yd(r,e.m,e.j,e.o,e.l))}}function $d(e,t,n,r){if(!(0>n||0>t))if(t>=n)for(--r;0<=r;r--)e.i[t+r]=e.i[n+r].map((function(e){return e}));else for(var i=0;i<r;i++)e.i[t+i]=e.i[n+i].map((function(e){return e}))}function Jd(e,t,n){for(var r=0;r<=n;r++)e.i[t+r]=[]}var ep=0,tp=1,np=2,rp=3,ip=new Map([[39,"’"],[42,"á"],[92,"é"],[92,"é"],[94,"í"],[95,"ó"],[96,"ú"],[123,"ç"],[124,"÷"],[125,"Ñ"],[126,"ñ"],[127,"█"]]),ap=new Map([[48,"®"],[49,"°"],[50,"½"],[51,"¿"],[52,"™"],[53,"¢"],[54,"£"],[55,"♪"],[56,"à"],[57," "],[58,"è"],[59,"â"],[60,"ê"],[61,"î"],[62,"ô"],[63,"û"]]),op=new Map([[32,"Á"],[33,"É"],[34,"Ó"],[35,"Ú"],[36,"Ü"],[37,"ü"],[38,"‘"],[39,"¡"],[40,"*"],[41,"'"],[42,"─"],[43,"©"],[44,"℠"],[45,"·"],[46,"“"],[47,"”"],[48,"À"],[49,"Â"],[50,"Ç"],[51,"È"],[52,"Ê"],[53,"Ë"],[54,"ë"],[55,"Î"],[56,"Ï"],[57,"ï"],[58,"Ô"],[59,"Ù"],[60,"ù"],[61,"Û"],[62,"«"],[63,"»"]]),sp=new Map([[32,"Ã"],[33,"ã"],[34,"Í"],[35,"Ì"],[36,"ì"],[37,"Ò"],[38,"ò"],[39,"Õ"],[40,"õ"],[41,"{"],[42,"}"],[43,"\\"],[44,"^"],[45,"_"],[46,"|"],[47,"~"],[48,"Ä"],[49,"ä"],[50,"Ö"],[51,"ö"],[52,"ß"],[53,"¥"],[54,"¤"],[55,"│"],[56,"Å"],[57,"å"],[58,"Ø"],[59,"ø"],[60,"┌"],[61,"┐"],[62,"└"],[63,"┘"]]),lp=new Map([[1,10],[2,15.33],[3,20.66],[4,26],[5,31.33],[6,36.66],[7,42],[8,47.33],[9,52.66],[10,58],[11,63.33],[12,68.66],[13,74],[14,79.33],[15,84.66]]);function up(e,t){this.h=fp,this.o=new Zd(e,t),this.i=new Zd(e,t),this.g=this.j=new Zd(e,t),this.l=0,this.m=null}function cp(e,t,n){e.g=e.i;var r=e.g,i=null;return e.h!==yp&&e.h!==gp&&(i=qd(r,e.l,n),(n=e.i).g=0<n.h?n.h:0,Jd(n,0,15),(n=e.j).g=0<n.h?n.h:0,Jd(n,0,15),r.g=15),e.h=yp,r.h=t,i}function dp(e){e.h=hp,e.g=e.j,e.g.h=0}function pp(e){Z("Cea608DataChannel","CEA-608 text mode entered, but is unsupported"),e.g=e.o,e.h=gp}var fp=0,hp=1,yp=3,gp=4,vp="black green blue cyan red yellow magenta black".split(" "),mp="white green blue cyan red yellow magenta white_italics".split(" ");function bp(e,t){this.I=t,this.N=e,this.K=this.l=!1,this.m=this.o=this.G=this.L=this.H=0,this.F=Cp,this.i=[],this.g=this.h=this.j=0,this.C=this.A=!1,this.B="white",this.s="black",kp(this)}function kp(e){e.i=[];for(var t=0;16>t;t++)e.i.push(Ep())}function Ep(){for(var e=[],t=0;42>t;t++)e.push(null);return e}function _p(e,t){Tp(e)&&(e.i[e.h][e.g]=new Yd(t,e.C,e.A,e.s,e.B),e.g++)}function Tp(e){var t=e.g<e.m&&0<=e.g;return e.h<e.o&&0<=e.h&&t}function Ap(e,t,n){var r=new Ce(e.j,t,"");r.textAlign=e.F===Sp?"left":e.F===wp?"right":Ie;var i=r.region;switch(e.I&&(i.id+="svc"+e.I),i.id+="win"+e.N,i.height=e.o,i.width=e.m,i.heightUnits=2,i.widthUnits=2,i.viewportAnchorX=e.H,i.viewportAnchorY=e.L,i.viewportAnchorUnits=e.K?We:2,e.G){case xp:i.regionAnchorX=0,i.regionAnchorY=0;break;case Pp:i.regionAnchorX=50,i.regionAnchorY=0;break;case Rp:i.regionAnchorX=100,i.regionAnchorY=0;break;case Ip:i.regionAnchorX=0,i.regionAnchorY=50;break;case Dp:i.regionAnchorX=50,i.regionAnchorY=50;break;case Op:i.regionAnchorX=100,i.regionAnchorY=50;break;case Lp:i.regionAnchorX=0,i.regionAnchorY=100;break;case Mp:i.regionAnchorX=50,i.regionAnchorY=100;break;case Np:i.regionAnchorX=100,i.regionAnchorY=100}return(n=Kd(r,"svc"+n,e.i,e.j,t))&&(e.j=t),n}bp.prototype.isVisible=function(){return this.l};var Sp=0,wp=1,Cp=2,xp=0,Pp=1,Rp=2,Ip=3,Dp=4,Op=5,Lp=6,Mp=7,Np=8;function Up(){this.i=[],this.h=null,this.g=0}function Bp(e,t){3===t.type?(e.g=2*(63&t.value)-1,e.h=[]):e.h&&(0<e.g&&(e.h.push(t),e.g--),0===e.g&&(e.i.push(new Fp(e.h)),e.h=null,e.g=0))}function Fp(e){this.g=0,this.h=e}function jp(e){if(!e.ka())throw new bt(2,2,3e3);return e.h[e.g++]}function Hp(e){this.i=e,this.h=[null,null,null,null,null,null,null,null],this.g=null}function Vp(e,t,n,r){if(128<=n&&135>=n)r=7&n,e.h[r]&&(e.g=e.h[r]);else{if(136===n){n=jp(t).value,t=null;for(var i=(n=l(Gp(e,n))).next();!i.done;i=n.next())(i=e.h[i.value]).isVisible()&&(t=Ap(i,r,e.i)),kp(i);return t}if(137===n)for(n=(t=l(Gp(e,t=jp(t).value))).next();!n.done;n=t.next())(n=e.h[n.value]).isVisible()||(n.j=r),n.l=!0;else{if(138===n){for(n=jp(t).value,t=null,i=(n=l(Gp(e,n))).next();!i.done;i=n.next())(i=e.h[i.value]).isVisible()&&(t=Ap(i,r,e.i)),i.l=!1;return t}if(139===n){for(n=jp(t).value,t=null,i=(n=l(Gp(e,n))).next();!i.done;i=n.next())(i=e.h[i.value]).isVisible()?t=Ap(i,r,e.i):i.j=r,i.l=!i.l;return t}if(140===n)return Kp(e,t=jp(t).value,r);if(143===n)return r=Kp(e,255,r),zp(e),r;if(144===n)t.skip(1),r=jp(t).value,e.g&&(e.g.A=0<(128&r),e.g.C=0<(64&r));else if(145===n)r=jp(t).value,n=jp(t).value,t.skip(1),e.g&&(t=Wp((48&n)>>4,(12&n)>>2,3&n),e.g.B=Wp((48&r)>>4,(12&r)>>2,3&r),e.g.s=t);else if(146===n)r=jp(t).value,t=jp(t).value,e.g&&((e=e.g).h=15&r,e.g=63&t);else if(151===n)t.skip(1),t.skip(1),r=jp(t).value,t.skip(1),e.g&&(e.g.F=3&r);else if(152<=n&&159>=n){if(n=(15&n)-8,!(i=null!==e.h[n])){var a=new bp(n,e.i);a.j=r,e.h[n]=a}r=jp(t).value,a=jp(t).value;var o=jp(t).value,s=jp(t).value,u=jp(t).value;t=jp(t).value,i&&0==(7&t)||((t=e.h[n]).h=0,t.g=0,t.C=!1,t.A=!1,t.B="white",t.s="black"),(t=e.h[n]).l=0<(32&r),t.L=127&a,t.H=o,t.G=(240&s)>>4,t.K=0<(128&a),t.o=1+(15&s),t.m=1+(63&u),e.g=e.h[n]}}}return null}function Gp(e,t){for(var n=[],r=0;8>r;r++)1==(1&t)&&e.h[r]&&n.push(r),t>>=1;return n}function Kp(e,t,n){for(var r=null,i=(t=l(Gp(e,t))).next();!i.done;i=t.next()){i=i.value;var a=e.h[i];a.isVisible()&&(r=Ap(a,n,e.i)),e.h[i]=null}return r}function zp(e){e.g=null,e.h=[null,null,null,null,null,null,null,null]}function Wp(e,t,n){var r={0:0,1:0,2:1,3:1};return Zp[(e=r[e])<<2|(t=r[t])<<1|(n=r[n])]}Fp.prototype.ka=function(){return this.g<this.h.length},Fp.prototype.wa=function(){return this.g},Fp.prototype.skip=function(e){if(this.g+e>this.h.length)throw new bt(2,2,3e3);this.g+=e};var Yp=new Map([[32," "],[33," "],[37,"…"],[42,"Š"],[44,"Œ"],[48,"█"],[49,"‘"],[50,"’"],[51,"“"],[52,"”"],[53,"•"],[57,"™"],[58,"š"],[60,"œ"],[61,"℠"],[63,"Ÿ"],[118,"⅛"],[119,"⅜"],[120,"⅝"],[121,"⅞"],[122,"│"],[123,"┐"],[124,"└"],[125,"─"],[126,"┘"],[127,"┌"]]),Zp="black blue green cyan red magenta yellow white".split(" ");function qp(){this.h=[],this.g=[],this.i=new Up,this.l=0,this.m=new Map([["CC1",new up(0,0)],["CC2",new up(0,1)],["CC3",new up(1,0)],["CC4",new up(1,1)]]),this.s=this.o=0,this.j=new Map,this.B=!0,this.A=new Set,Xp(this)}function Xp(e){e.o=0,e.s=0;for(var t=l(e.m.values()),n=t.next();!n.done;n=t.next())(n=n.value).h=fp,n.g=n.j,n.m=null,Xd(n.i),Xd(n.j),Xd(n.o);e.B=!0}function Qp(e,t){var n=t.type;if(16==(112&t.Ua)){var r=t.Ua>>3&1;0===n?e.o=r:e.s=r}if(r="CC"+(1+(n<<1|(n?e.s:e.o))),n=e.m.get(r),255===t.Ua&&255===t.vb||!t.Ua&&!t.vb||!Jp(t.Ua)||!Jp(t.vb))return 45<=++e.l&&Xp(e),null;e.l=0,t.Ua&=127,t.vb&=127;var i=t.Ua;if(1<=i&&15>=i||!t.Ua&&!t.vb)return null;if(i=null,16==(112&t.Ua))e:{if(e.A.add(r),r=t.Ua,e=t.vb,n.m===(r<<8|e))n.m=null;else if(n.m=r<<8|e,16==(240&r)&&64==(192&e)){t=[11,11,1,2,3,4,12,13,14,15,5,6,7,8,9,10][(7&r)<<1|e>>5&1];var a=(30&e)>>1;r="white",i=!1,7>a?r=mp[a]:7===a&&(i=!0),e=1==(1&e),n.h!==gp&&(a=n.g,n.h===yp&&t!==a.g&&($d(a,n=1+t-a.h,1+a.g-a.h,a.h),Jd(a,0,n-1),Jd(a,t+1,15-t)),a.g=t,a.m=e,a.j=i,a.l=r,a.o="black")}else if(17==(247&r)&&32==(240&e))n.g.m=!1,n.g.j=!1,n.g.l="white",Qd(n.g,ep,32),r=!1,"white_italics"===(t=mp[(14&e)>>1])&&(t="white",r=!0),n.g.m=1==(1&e),n.g.j=r,n.g.l=t;else if(16==(247&r)&&32==(240&e)||23==(247&r)&&45==(255&e))t="black",0==(7&r)&&(t=vp[(14&e)>>1]),n.g.o=t;else if(17==(247&r)&&48==(240&e))Qd(n.g,tp,e);else if(18==(246&r)&&32==(224&e))Qd(n.g,1&r?rp:np,e);else if(20==(246&r)&&32==(240&e)){switch(e=t.pts,r=null,t.vb){case 32:dp(n);break;case 33:(n=n.g).i[n.g].pop();break;case 37:r=cp(n,2,e);break;case 38:r=cp(n,3,e);break;case 39:r=cp(n,4,e);break;case 40:Qd(n.g,ep,32);break;case 41:n.h=2,n.g=n.i,n.g.h=0,n.l=e;break;case 42:Xd(n.o),pp(n);break;case 43:pp(n);break;case 44:t=n.i,r=null,n.h!==gp&&(r=qd(t,n.l,e)),Jd(t,0,15);break;case 45:t=n.g,n.h!==yp?r=null:(r=qd(t,n.l,e),$d(t,(i=t.g-t.h+1)-1,i,t.h),Jd(t,0,i-1),Jd(t,t.g,15-t.g),n.l=e);break;case 46:Jd(n.j,0,15);break;case 47:t=null,n.h!==gp&&(t=qd(n.i,n.l,e)),r=n.j,n.j=n.i,n.i=r,dp(n),n.l=e,r=t}i=r;break e}i=null}else e=t.vb,Qd(n.g,ep,t.Ua),Qd(n.g,ep,e);return i}function $p(e,t){var n=[];try{for(;t.ka();){var r=jp(t).value,i=(224&r)>>5,a=31&r;if(7===i&&0!=a&&(i=63&jp(t).value),0!=i){e.A.add("svc"+i),e.j.has(i)||e.j.set(i,new Hp(i));for(var o=e.j.get(i),s=t.wa();t.wa()-s<a;){var l=jp(i=t),u=l.value,c=l.pts;if(16===u)u=u<<16|jp(i).value;if(0<=u&&31>=u){var d=c;if(o.g){var p=o.g;switch(i=null,u){case 8:!Tp(p)||0>=p.g&&0>=p.h||(0>=p.g?(p.g=p.m-1,p.h--):p.g--,p.i[p.h][p.g]=null);break;case 13:if(p.isVisible()&&(i=Ap(p,d,o.i)),p.h+1>=p.o){d=p;for(var f=0,h=1;16>h;h++,f++)d.i[f]=d.i[h];for(h=0;1>h;h++,f++)d.i[f]=Ep()}else p.h++;p.g=0;break;case 14:p.isVisible()&&(i=Ap(p,d,o.i)),p.i[p.h]=Ep(),p.g=0;break;case 12:p.isVisible()&&(i=Ap(p,d,o.i)),kp(p),(d=p).h=0,d.g=0}var y=i}else y=null}else if(128<=u&&159>=u)y=Vp(o,i,u,c);else{if(4096<=u&&4127>=u)8<=(d=255&u)&&15>=d?i.skip(1):16<=d&&23>=d?i.skip(2):24<=d&&31>=d&&i.skip(3);else if(4224<=u&&4255>=u)128<=(d=255&u)&&135>=d?i.skip(4):136<=d&&143>=d&&i.skip(5);else if(32<=u&&127>=u)i=u,o.g&&_p(o.g,127===i?"♪":String.fromCharCode(i));else if(160<=u&&255>=u)o.g&&_p(o.g,String.fromCharCode(u));else if(4128<=u&&4223>=u){if(i=255&u,o.g)if(Yp.has(i)){var g=Yp.get(i);_p(o.g,g)}else _p(o.g,"_")}else 4256<=u&&4351>=u&&o.g&&_p(o.g,160!=(255&u)?"_":"[CC]");y=null}(i=y)&&n.push(i)}}}}catch(e){if(!(e instanceof bt&&3e3===e.code))throw e;Z("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.")}return n}function Jp(e){for(var t=0;e;)t^=1&e,e>>=1;return 1===t}function ef(e){for(var t=[],n=e,r=e=0;r<n.length;)2==e&&3==n[r]?(e=0,(n=[].concat(u(n))).splice(r,1),n=new Uint8Array(n)):0==n[r]?e++:e=0,r++;for(e=n,r=0;r<e.length;){for(n=0;255==e[r];)n+=255,r++;n+=e[r++];for(var i=0;255==e[r];)i+=255,r++;i+=e[r++],4==n&&t.push(e.subarray(r,r+i)),r+=i}return t}function tf(){this.j=new Map,this.i=this.h=0,this.g=nf}qp.prototype.clear=function(){this.l=0,this.h=[],this.g=[];var e=this.i;e.i=[],e.h=[],e.g=0,Xp(this);for(var t=(e=l(this.j.values())).next();!t.done;t=e.next())zp(t.value)},qp.prototype.extract=function(e,t){if(this.B){for(var n=l(this.m.values()),r=n.next();!r.done;r=n.next())r.value.l=t;this.B=!1}if(!(8>(e=new gi(e,0)).getLength())&&181===e.P()&&49===e.ra()&&1195456820===e.M()&&3===e.P()&&0!=(64&(n=e.P())))for(n&=31,e.skip(1),r=0;r<n;r++){var i=e.P(),a=(4&i)>>2,o=e.P(),s=e.P();a&&(0===(i&=3)||1===i?this.h.push({pts:t,type:i,Ua:o,vb:s,order:this.h.length}):(this.g.push({pts:t,type:i,value:o,order:this.g.length}),this.g.push({pts:t,type:2,value:s,order:this.g.length})))}},qp.prototype.decode=function(){function e(e,t){return e.pts-t.pts||e.order-t.order}var t=[];this.h.sort(e),this.g.sort(e);for(var n=l(this.h),r=n.next();!r.done;r=n.next())(r=Qp(this,r.value))&&t.push(r);for(r=(n=l(this.g)).next();!r.done;r=n.next())Bp(this.i,r.value);for(r=(n=l(this.i.i)).next();!r.done;r=n.next())r=$p(this,r.value),t.push.apply(t,u(r));return this.i.i=[],this.h=[],this.g=[],t},qp.prototype.getStreams=function(){return Array.from(this.A)},F("shaka.cea.CeaDecoder",qp),_e=function(){return new qp},tf.prototype.init=function(e){function t(e){(e=e.name)in of&&(n.g=of[e])}var n=this,r=[],i=[];if((new bi).box("moov",ki).box("mvex",ki).O("trex",(function(e){var t=e.reader;t.skip(4),t.skip(4),e=t.M(),t=t.M(),n.h=e,n.i=t})).box("trak",ki).O("tkhd",(function(e){e=so(e.reader,e.version),r.push(e.trackId)})).box("mdia",ki).O("mdhd",(function(e){e=ao(e.reader,e.version),i.push(e.timescale)})).box("minf",ki).box("stbl",ki).O("stsd",Ei).box("avc1",t).box("avc3",t).box("hev1",t).box("hvc1",t).box("dvav",t).box("dva1",t).box("dvh1",t).box("dvhe",t).box("encv",_i).box("sinf",ki).box("frma",(function(e){(e=lo(e.reader).Ea)in of&&(n.g=of[e])})).parse(e,!0),!r.length||!i.length||r.length!=i.length)throw new bt(2,2,2010);this.g==nf&&Y("Unable to determine bitstream format for CEA parsing!"),r.forEach((function(e,t){n.j.set(e,i[t])}))},tf.prototype.parse=function(e){var t=this;if(this.g==nf)return[];var n=[],r=this.h,i=this.i,a=0,o=[],s=null,c=9e4;return(new bi).box("moof",(function(e){a=e.start,o=[],ki(e)})).box("traf",ki).O("trun",(function(e){e=oo(e.reader,e.version,e.flags),o.push(e)})).O("tfhd",(function(e){e=ro(e.reader,e.flags),r=e.Yf||t.h,i=e.hh||t.i,e=e.trackId,t.j.has(e)&&(c=t.j.get(e))})).O("tfdt",(function(e){s=io(e.reader,e.version).baseMediaDecodeTime})).box("mdat",(function(e){if(null===s)throw Y("Unable to find base media decode time for CEA captions!"),new bt(2,2,2010);!function(e,t,n,r,i,a,o,s,c){var d=0,p=a,f=s.map((function(e){return e.xg}));for((f=[].concat.apply([],u(f))).length&&(p=f[0].sampleSize||a),t.skip(o+s[0].gh);t.ka();){o=t.M();var h=t.P(),y=null;switch(y=!1,s=1,e.g){case rf:y=6==(y=31&h);break;case af:s=2,t.skip(1),y=39==(y=h>>1&63)||40==y;break;default:return}if(y)for(h=0,d<f.length&&(h=f[d].ie||0),h=(n+h)/r,y=(s=l(ef(t.sb(o-s)))).next();!y.done;y=s.next())c.push({packet:y.value,pts:h});else try{t.skip(o-s)}catch(e){break}0==(p-=o+4)&&(n=d<f.length?n+(f[d].yf||i):n+i,p=++d<f.length&&f[d].sampleSize||a)}}(t,e.reader,s,c,r,i,a-e.start-8,o,n)})).parse(e,!1),n},F("shaka.cea.Mp4CeaParser",tf);var nf=0,rf=1,af=2,of={avc1:rf,avc3:rf,hev1:af,hvc1:af,dvav:rf,dva1:rf,dvh1:af,dvhe:af};function sf(){this.g=null}function lf(t,n,r){var i=function(e){for(var t=[],n=(e=l(e)).next();!n.done;n=e.next())(n=cf(n.value))&&t.push(n);return t}(t),a=null;t=[];var o=[],s=null,u=new Set(i.map((function(e){return e.keyId})));u.delete(null);var c="cenc";if(1<u.size)throw new bt(2,4,4010);if(!n){if(1<(o=i.filter((function(e){return"urn:mpeg:dash:sea:2012"==e.Ac}))).length)throw new bt(2,4,4050);o.length&&(s=function(t){if(!e.crypto||!e.crypto.subtle)throw Y("Web Crypto API is not available to decrypt AES-128. (Web Crypto only exists in secure origins like https)"),new bt(2,4,4042);var n=Hi(t.node,"urn:mpeg:dash:schema:sea:2012","SegmentEncryption");if(!n)throw new bt(2,4,4051);if("urn:mpeg:dash:sea:aes128-cbc:2013"!=n.attributes.schemeIdUri)throw new bt(2,4,4051);if(n=Hi(t.node,"urn:mpeg:dash:schema:sea:2012","CryptoPeriod"),!n)throw new bt(2,4,4051);if(t=n.attributes.IV,n=$t(n.attributes.keyUriTemplate),!t||!n)throw new bt(2,4,4051);if(t=an(t.substr(2)),16!=t.byteLength)throw new bt(2,4,4048);return{Sh:n,iv:t}}(o[0])),(o=i.find((function(e){return"urn:mpeg:dash:mp4protection:2011"==e.Ac})))&&o.encryptionScheme&&(c=o.encryptionScheme),(o=i.filter((function(e){return"urn:mpeg:dash:mp4protection:2011"==e.Ac?(a=e.init||a,!1):"urn:mpeg:dash:sea:2012"!=e.Ac}))).length&&(t=function(e,t,n,r,i){for(var a=[],o=(n=l(n)).next();!o.done;o=n.next()){var s=r[(o=o.value).Ac];if(s){var u;if((u=Hi(o.node,"urn:microsoft:playready","pro"))&&Ui(u)){u=rn(u=Ui(u));var c=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);u=[{initData:Ii(u,c,new Set,0),initDataType:"cenc",keyId:o.keyId}]}else u=null;if(c=null,"urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e"===o.Ac)if(0==(c=i).size)c=null;else{var d=new Uint8Array([16,119,239,236,192,178,77,2,172,227,60,30,82,226,251,75]);c=[{initData:Ii(new Uint8Array([]),d,c,1),initDataType:"cenc",keyId:o.keyId}]}u=un(s,t,o.init||e||u||c),(s=pf.get(s))&&(u.licenseServerUri=s(o)),a.push(u)}}return a}(a,c,o,r,u),0==t.length&&(t=[un("",c,a)]))}if(i.length&&!s&&(n||!o.length))for(t=[],r=(n=l(Object.values(r))).next();!r.done;r=n.next())"org.w3.clearkey"!=(r=r.value)&&t.push(un(r,c,a));if(u=Array.from(u)[0]||null)for(n=(c=l(t)).next();!n.done;n=c.next())for(r=(n=l(n.value.initData)).next();!r.done;r=n.next())r.value.keyId=u;return{Xf:u,Dj:a,drmInfos:t,ye:s,ag:!0}}function uf(e){var t=Hi(e.node,"https://dashif.org/CPS","Laurl");return t&&(t=Ui(t))?t:(e=Hi(e.node,"urn:microsoft:playready","pro"))&&Ui(e)?(e=function(e){var t=0,n=ve(e),r=n.getUint32(t,!0);if(r!=e.byteLength)return[];e:{for(e=t+6,t=[];e<n.byteLength-1;){r=n.getUint16(e,!0),e+=2;var i=n.getUint16(e,!0);if(e+=2,0!=(1&i)||i+e>n.byteLength){n=[];break e}var a=ye(n,e,i);t.push({type:r,value:a}),e+=i}n=t}return n}(e=rn(e=Ui(e))).filter((function(e){return e.type===df}))[0],e&&(e=Oi(e=Yt(e.value,!0),"WRMHEADER"))?function(e){for(var t=(e=l(Fi(e,"DATA"))).next();!t.done;t=e.next())if((t=t.value).children)for(var n=(t=l(t.children)).next();!n.done;n=t.next())if("LA_URL"==(n=n.value).tagName)return Ui(n);return""}(e):""):""}function cf(e){var t=e.attributes.schemeIdUri,n=Gi(e,"urn:mpeg:cenc:2013","default_KID"),r=Ki(e,"urn:mpeg:cenc:2013","pssh").map(Bi),i=e.attributes.value;if(!t)return null;if(t=t.toLowerCase(),n&&(n=n.replace(/-/g,"").toLowerCase()).includes(" "))throw new bt(2,4,4009);var a=[];try{a=r.map((function(e){return{initDataType:"cenc",initData:rn(e),keyId:null}}))}catch(e){throw new bt(2,4,4007)}return{node:e,Ac:t,keyId:n,init:0<a.length?a:null,encryptionScheme:i}}Ee["video/mp4"]=function(){return new tf},sf.prototype.init=function(){},sf.prototype.parse=function(e){this.g?this.g.clearData():this.g=new Ao;var t=[];if(!Co(e=ye(e)))return t;var n=(e=this.g.parse(e)).bd(),r=e.Od();switch(e=[],n.video){case"avc":e.push(6);break;case"hvc":e.push(39),e.push(40)}if(!e.length)return t;for(r=(n=l(r)).next();!r.done;r=n.next())if(r=r.value,e.includes(r.type)&&null!=r.time)for(var i=l(ef(r.data)),a=i.next();!a.done;a=i.next())t.push({packet:a.value,pts:r.time});return t},F("shaka.cea.TsCeaParser",sf),Ee["video/mp2t"]=function(){return new sf};var df=1,pf=(new Map).set("com.widevine.alpha",(function(e){var t=Hi(e.node,"https://dashif.org/CPS","Laurl");return t&&(t=Ui(t))?t:(e=Hi(e.node,"urn:microsoft","laurl"))&&$t(e.attributes.licenseUrl)||""})).set("com.microsoft.playready",uf).set("com.microsoft.playready.recommendation",uf).set("com.microsoft.playready.software",uf).set("com.microsoft.playready.hardware",uf).set("org.w3.clearkey",(function(e){var t=Hi(e.node,"https://dashif.org/CPS","Laurl");return t&&(t=Ui(t))?t:(e=Hi(e.node,"http://dashif.org/guidelines/clearKey","Laurl"))&&"EME-1.0"===e.attributes.Lic_type&&e&&(e=Ui(e))?e:""}));function ff(t,n,r,i,a,o){var s={RepresentationID:n,Number:r,SubNumber:i,Bandwidth:a,Time:o};return t.replace(/\$(RepresentationID|Number|SubNumber|Bandwidth|Time)?(?:%0([0-9]+)([diouxX]))?\$/g,(function(t,n,r,i){if("$$"==t)return"$";var a=s[n];if(null==a)return t;switch("RepresentationID"==n&&r&&(r=void 0),"Time"==n&&"bigint"!=typeof a&&(.2<=Math.abs(a-Math.round(a))&&Y("Calculated $Time$ values must be close to integers"),a=Math.round(a)),i){case void 0:case"d":case"i":case"u":t=a.toString();break;case"o":t=a.toString(8);break;case"x":t=a.toString(16);break;case"X":t=a.toString(16).toUpperCase();break;default:t=a.toString()}return r=e.parseInt(r,10)||1,Array(Math.max(0,r-t.length)+1).join("0")+t}))}function hf(e,t){var n=gf(e,t,"timescale"),r=1;n&&(r=Xi(n)||1),(n=Xi((n=gf(e,t,"duration"))||""))&&(n/=r);var i=gf(e,t,"startNumber"),a=Number(gf(e,t,"presentationTimeOffset"))||0,o=Qi(i||"");null!=i&&null!=o||(o=1);var s=vf(e,t,"SegmentTimeline");if(t=null,s){t=r,e=e.ha.duration||1/0,i=o,s=Ni(s,"S");for(var l=[],u=-a,c=0;c<s.length;++c){var d=s[c],p=s[c+1],f=Vi(d,"t",Qi),h=Vi(d,"d",Qi),y=Vi(d,"r",qi);if(d=Vi(d,"k",qi)||0,null!=f&&(f-=a),!h)break;if(f=null!=f?f:u,0>(y=y||0))if(p){if(null==(p=Vi(p,"t",Qi)))break;if(f>=p)break;y=Math.ceil((p-f)/h)-1}else{if(1/0==e)break;if(f/t>=e)break;y=Math.ceil((e*t-f)/h)-1}for(0<l.length&&f!=u&&(l[l.length-1].end=f/t),p=0;p<=y;++p)u=f+h,l.push({start:f/t,end:u/t,Mf:f,rb:d,si:l.length+i}),f=u}t=l}return{timescale:r,Da:n,rd:o,Bb:a/r||0,Lf:a,timeline:t}}function yf(e,t){return[t(e.J),t(e.ua),t(e.za)].filter(Bn)}function gf(e,t,n){t=yf(e,t),e=null;for(var r=(t=l(t)).next();!r.done&&!(e=r.value.attributes[n]);r=t.next());return e}function vf(e,t,n){t=yf(e,t),e=null;for(var r=(t=l(t)).next();!r.done&&!(e=ji(r.value,n));r=t.next());return e}function mf(e,t,n,r,i,a){if(a=void 0===a?0:a,Gi(e,"http://www.w3.org/1999/xlink","href")){var o=function(e,t,n,r,i,a){for(var o=Gi(e,"http://www.w3.org/1999/xlink","href"),s=Gi(e,"http://www.w3.org/1999/xlink","actuate")||"onRequest",u=l(Object.keys(e.attributes)),c=u.next();!c.done;c=u.next()){var d=(c=c.value).split(":"),p=Li("http://www.w3.org/1999/xlink");d[0]==p&&delete e.attributes[c]}if(5<=a)return Kr(new bt(2,4,4028));if("onLoad"!=s)return Kr(new bt(2,4,4027));var f=ln([r],[o]);return i.request(0,ri(f,t)).va((function(r){if(!(r=Di(r.data,e.tagName)))return Kr(new bt(2,4,4001,o));for(e.children=[];r.children.length;){var s=r.children.shift();s.tagName&&(s.parent=e),e.children.push(s)}for(var u=(s=l(Object.keys(r.attributes))).next();!u.done;u=s.next())u=u.value,e.attributes[u]=r.attributes[u];return mf(e,t,n,f[0],i,a+1)}))}(e,t,n,r,i,a);return n&&(o=o.va(void 0,(function(){return mf(e,t,n,r,i,a)}))),o}o=[];for(var s={},u=l(function(e){var t=[];if(!e.children)return[];for(var n=(e=l(e.children)).next();!n.done;n=e.next())"string"!=typeof(n=n.value)&&t.push(n);return t}(e)),c=u.next();!c.done;s={mc:s.mc},c=u.next())s.mc=c.value,"urn:mpeg:dash:resolve-to-zero:2013"==Gi(s.mc,"http://www.w3.org/1999/xlink","href")?e.children=e.children.filter(function(e){return function(t){return t!==e.mc}}(s)):"SegmentTimeline"!=s.mc.tagName&&o.push(mf(s.mc,t,n,r,i,a));return Zr(o).va((function(){return e}))}function bf(e,t,n,r,i,a,o){var s,l=(new bi).O("sidx",(function(e){s=function(e,t,n,r,i,a,o){var s=[];o.reader.skip(4);var l=o.reader.M();if(0==l)throw new bt(2,3,3005);if(0==o.version)var u=o.reader.M(),c=o.reader.M();else u=o.reader.zc(),c=o.reader.zc();o.reader.skip(2);var d=o.reader.ra();for(e=e+o.size+c,c=0;c<d;c++){var p=o.reader.M(),f=(2147483648&p)>>>31;p&=2147483647;var h=o.reader.M();if(o.reader.skip(4),1==f)throw new bt(2,3,3006);s.push(new Va(u/l+n,(u+h)/l+n,(function(){return a}),e,e+p-1,t,n,r,i)),u+=h,e+=p}return o.parser.stop(),s}(t,r,i,a,o,n,e)}));if(e&&l.parse(e),s)return s;throw new bt(2,3,3004)}function kf(e){this.h=ve(e),this.g=new gi(this.h,0)}function Ef(e){var t=_f(e);if(7<t.length)throw new bt(2,3,3002);for(var n=0,r=(t=l(t)).next();!r.done;r=t.next())n=256*n+r.value;t=_f(e);e:{for(var i=(r=l(Tf)).next();!i.done;i=r.next())if(pe(t,new Uint8Array(i.value))){r=!0;break e}r=!1}if(r)t=e.h.byteLength-e.g.wa();else{if(8==t.length&&224&t[1])throw new bt(2,3,3001);for(i=r=0;i<t.length;i++){var a=t[i];r=0==i?a&(1<<8-t.length)-1:256*r+a}t=r}return t=e.g.wa()+t<=e.h.byteLength?t:e.h.byteLength-e.g.wa(),r=ve(e.h,e.g.wa(),t),e.g.skip(t),new Af(n,r)}function _f(e){var t=e.g.wa(),n=e.g.P();if(0==n)throw new bt(2,3,3002);return n=8-Math.floor(Math.log2(n)),e.g.skip(n-1),ye(e.h,t,n)}kf.prototype.ka=function(){return this.g.ka()};var Tf=[[255],[127,255],[63,255,255],[31,255,255,255],[15,255,255,255,255],[7,255,255,255,255,255],[3,255,255,255,255,255,255],[1,255,255,255,255,255,255,255]];function Af(e,t){this.id=e,this.g=t}function Sf(e){if(8<e.g.byteLength)throw new bt(2,3,3002);if(8==e.g.byteLength&&224&e.g.getUint8(0))throw new bt(2,3,3001);for(var t=0,n=0;n<e.g.byteLength;n++){t=256*t+e.g.getUint8(n)}return t}function wf(e){var t=new kf(e.g);if(179!=(e=Ef(t)).id)throw new bt(2,3,3013);if(e=Sf(e),183!=(t=Ef(t)).id)throw new bt(2,3,3012);t=new kf(t.g);for(var n=0;t.ka();){var r=Ef(t);if(241==r.id){n=Sf(r);break}}return{Ei:e,hi:n}}function Cf(e,t,n){if(!(t=vf(e,t,"Initialization")))return null;var r=e.J.nb(),i=t.attributes.sourceURL;i&&(r=ln(r,[$t(i)])),i=0;var a=null;return(t=Vi(t,"range",Zi))&&(i=t.start,a=t.end),(n=new ja((function(){return r}),i,a,Of(e),null,null,n)).codecs=e.J.codecs,n.mimeType=e.J.mimeType,n}function xf(e,t,n){var r=Number(gf(e,Rf,"presentationTimeOffset"))||0,i=gf(e,Rf,"timescale"),a=1;i&&(a=Xi(i)||1);var o=r/a||0,s=Cf(e,Rf,n);!function(e,t){if(Df(e,t),!If(e))throw new bt(2,4,4002)}(e,s);var l=Xn(e);return{sc:function(){var e=vf(l,Rf,"RepresentationIndex"),n=l.J.nb();return e&&(e=$t(e.attributes.sourceURL))&&(n=ln(n,[e])),e=If(l),Pf(l,t,s,n,e.start,e.end,o)}}}function Pf(e,t,n,r,i,a,o){var s,u,c,d,p,f,h,y,g,v,m,k,E,_,T,A,S,w;return I((function(C){if(1==C.g)return s=e.presentationTimeline,u=!e.Fb||!e.ha.Ze,c=e.ha.start,d=e.ha.duration,p=e.J.mimeType.split("/")[1],h=null,y=[(f=t)(r,i,a,!1),"webm"==p?f(n.$(),n.Aa,n.ja,!0):null],f=null,b(C,Promise.all(y),2);if(g=C.h,v=g[0],m=g[1]||null,null,E=c-o,_=c,T=d?c+d:1/0,"mp4"==p)var x=bf(v,i,r,n,E,_,T);else{if(440786851!=Ef(x=new kf(m)).id)throw new bt(2,3,3008);var P=Ef(x);if(408125543!=P.id)throw new bt(2,3,3009);x=P.g.byteOffset,P=new kf(P.g);for(var R=null;P.ka();){var I=Ef(P);if(357149030==I.id){R=I;break}}if(!R)throw new bt(2,3,3010);for(R=new kf(R.g),I=1e6,P=null;R.ka();){var D=Ef(R);if(2807729==D.id)I=Sf(D);else if(17545==D.id)if(4==D.g.byteLength)P=D.g.getFloat32(0);else{if(8!=D.g.byteLength)throw new bt(2,3,3003);P=D.g.getFloat64(0)}}if(null==P)throw new bt(2,3,3011);if(P*=R=I/1e9,475249515!=(I=Ef(new kf(v))).id)throw new bt(2,3,3007);x=function(e,t,n,r,i,a,o,s,l){function u(){return i}var c=[];e=new kf(e.g);for(var d=null,p=null;e.ka();){var f=Ef(e);if(187==f.id){var h=wf(f);h&&(f=n*h.Ei,h=t+h.hi,null!=d&&c.push(new Va(d+o,f+o,u,p,h-1,a,o,s,l)),d=f,p=h)}}return null!=d&&c.push(new Va(d+o,r+o,u,p,null,a,o,s,l)),c}(I,x,R,P,r,n,E,_,T)}for(A=l(k=x),S=A.next();!S.done;S=A.next())(w=S.value).codecs=e.J.codecs,w.mimeType=e.J.mimeType;return s.ld(k),h=new Cs(k),u&&h.pc(_,T,!0),C.return(h)}))}function Rf(e){return e.pd}function If(e){var t=vf(e,Rf,"RepresentationIndex");return e=Zi((e=gf(e,Rf,"indexRange"))||""),t&&(e=Vi(t,"range",Zi,e)),e}function Df(e,t){var n=e.J.mimeType.split("/")[1];if(e.J.contentType!=hn&&"mp4"!=n&&"webm"!=n)throw new bt(2,4,4006);if("webm"==n&&!t)throw new bt(2,4,4005)}function Of(e){var t=e.J;return{bandwidth:e.bandwidth,audioSamplingRate:t.audioSamplingRate,codecs:t.codecs,contentType:t.contentType,frameRate:t.frameRate||null,height:t.height||null,mimeType:t.mimeType,channelsCount:t.ee,pixelAspectRatio:t.pixelAspectRatio||null,width:t.width||null}}function Lf(e,t,n){var r=Cf(e,Mf,n),i=function(e){var t=function(e){return[e.J.Kb,e.ua.Kb,e.za.Kb].filter(Bn).map((function(e){return Ni(e,"SegmentURL")})).reduce((function(e,t){return 0<e.length?e:t})).map((function(t){return t.attributes.indexRange&&!e.kg&&(e.kg=!0),{Yh:$t(t.attributes.media),start:(t=Vi(t,"mediaRange",Zi,{start:0,end:null})).start,end:t.end}}))}(e);e=hf(e,Mf);var n=e.rd;0==n&&(n=1);var r=0;return e.Da?r=e.Da*(n-1):e.timeline&&0<e.timeline.length&&(r=e.timeline[0].start),{Da:e.Da,startTime:r,rd:n,Bb:e.Bb,timeline:e.timeline,vc:t}}(e);if(!i.Da&&!i.timeline&&1<i.vc.length)throw new bt(2,4,4002);if(!i.Da&&!e.ha.duration&&!i.timeline&&1==i.vc.length)throw new bt(2,4,4002);if(i.timeline&&0==i.timeline.length)throw new bt(2,4,4002);var a=null,o=null;e.za.id&&e.J.id&&(o=t[e.za.id+","+e.J.id])&&(a=o.segmentIndex);var s=function(e,t,n,r,i,a,o,s){var l=r.vc.length;r.timeline&&r.timeline.length!=r.vc.length&&(l=Math.min(r.timeline.length,r.vc.length));for(var u=e-r.Bb,c=t?e+t:1/0,d=[],p=r.startTime,f={},h=0;h<l;f={Pc:f.Pc,Lc:f.Lc},h++){f.Lc=r.vc[h];var y=p;p=void 0,p=null!=r.Da?y+r.Da:r.timeline?r.timeline[h].end:y+t,f.Pc=null,(y=new Va(e+y,e+p,function(e){return function(){return null==e.Pc&&(e.Pc=ln(n(),[e.Lc.Yh])),e.Pc}}(f),f.Lc.start,f.Lc.end,i,u,e,c,[],"",null,null,Ka,a)).codecs=s,y.mimeType=o,d.push(y)}return d}(e.ha.start,e.ha.duration,e.J.nb,i,r,n,e.J.mimeType,e.J.codecs);return t=!a,a?a.kd(s,e.presentationTimeline.qb()):a=new Cs(s),e.presentationTimeline.ld(s),e.Fb&&e.ha.Ze||a.pc(e.ha.start,e.ha.duration?e.ha.start+e.ha.duration:1/0,t),o&&(o.segmentIndex=a),{sc:function(){return a&&0!=a.getNumReferences()||a.ae(s),Promise.resolve(a)}}}function Mf(e){return e.Kb}function Nf(t,n,r,i,a,o,s,u){var c=function(e,t){var n=gf(e,Uf,"initialization");if(!n)return null;n=$t(n);var r=e.J.id,i=e.bandwidth||null,a=e.J.nb;return t=new ja((function(){var e=ff(n,r,null,null,i,null);return ln(a(),[e])}),0,null,Of(e),null,null,t),t.codecs=e.J.codecs,t.mimeType=e.J.mimeType,t}(t,s),d=function(e){var t=hf(e,Uf),n=gf(e,Uf,"media"),r=gf(e,Uf,"index");return{Da:t.Da,timescale:t.timescale,rd:t.rd,Bb:t.Bb,Lf:t.Lf,timeline:t.timeline,wc:n&&$t(n),hd:r,mimeType:e.J.mimeType,codecs:e.J.codecs}}(t);!function(e){var t=e.hd?1:0;if(t+=e.timeline?1:0,t+=e.Da?1:0,0==t)throw new bt(2,4,4002);if(1!=t&&(e.hd&&(e.timeline=null),e.Da=null),!e.hd&&!e.wc)throw new bt(2,4,4002)}(d);var p=Xn(t);if(d.hd)return Df(t,c),{sc:function(){var e=ff(d.hd,p.J.id,null,null,p.bandwidth||null,null);return e=ln(p.J.nb(),[e]),Pf(p,n,c,e,0,null,d.Bb)}};if(d.Da)return i||"image"===t.ua.contentType||(t.presentationTimeline.hf(d.Da),t.presentationTimeline.de(t.ha.start)),{sc:function(){return function(t,n,r,i,a,o,s){function u(r){var a=(r-v)*g,s=a+n.Bb,l=a+f;return a=l+g,(l=new Va(l,Math.min(a,d()),(function(){var t=s*m;return"BigInt"in e&&t>Number.MAX_SAFE_INTEGER&&(t=BigInt(s)*BigInt(m)),t=ff(b,E,r,null,k,t),ln(_(),[t])}),0,null,i,T,f,d(),[],"",null,null,Ka,o)).codecs=t.J.codecs,l.mimeType=t.J.mimeType,l.i=a,l}function c(){var e=[Math.max(p.qb(),f),Math.min(p.Hb(),d())].map((function(e){return e-f}));return e=[Math.ceil(e[0]/g),Math.ceil(e[1]/g)-1],t.J.Eb&&e[1]++,e.map((function(e){return e+v}))}function d(){var e=null!=h&&a[h]||y;return e?f+e:1/0}var p=t.presentationTimeline,f=t.ha.start,h=t.za.id,y=t.ha.duration,g=n.Da,v=n.rd,m=n.timescale,b=n.wc,k=t.bandwidth||null,E=t.J.id,_=t.J.nb,T=f-n.Bb,A=c();r=t.Fb?Math.max(A[0],A[1]-r+1):A[0],s=s||A[1],A=[];for(var S=r;S<=s;++S){var w=u(S);A.push(w)}var C=new Cs(A);if(A=p.Hb()<d(),S=p.R(),A||S){var x=Math.max(r,s+1);r=g,t.J.Eb&&(r=.1),C.le(r,(function(){var e=p.qb();C.Ia(e);var t=l(c());t.next(),t=t.next().value;for(var n=[];x<=t;){var r=u(x);n.push(r),x++}return e>d()&&!n.length?null:n}))}return Promise.resolve(C)}(p,d,a,c,o,s,u)}};var f=null;i=i=null,t.za.id&&t.J.id&&(i=r[i=t.za.id+","+t.J.id])&&(f=i.segmentIndex);var h=t.ha.start,y=t.ha.duration?h+t.ha.duration:1/0,g=!(t.Fb&&t.ha.Ze);return f?(Ff(r=f,d,h,y,g,c),r.Ia(t.presentationTimeline.qb())):f=new Bf(d,t.J.id,t.bandwidth,t.J.nb,h,y,c,g,s,t.J.zf),d.timeline&&"image"!==t.ua.contentType&&t.presentationTimeline.sg(d.timeline,h),i&&t.Fb&&(i.segmentIndex=f),{sc:function(){return f instanceof Bf&&0==f.getNumReferences()&&Ff(f,d,h,y,g,c),Promise.resolve(f)}}}function Uf(e){return e.qd}function Bf(e,t,n,r,i,a,o,s,l,u){Cs.call(this,[]),this.h=e,this.F=t,this.B=n,this.C=r,this.i=i,this.l=a,this.s=o,this.A=l,this.G=u,s&&jf(this)}function Ff(e,t,n,r,i,a){if(function(e,t){if(e.s!==t){e.s=t;for(var n=(e=l(e.g)).next();!n.done;n=e.next())(n=n.value)&&Ga(n,t)}}(e,a),e.h){n=e.h.timeline,e.h.wc=t.wc;var o=n[n.length-1];0<(t=t.timeline.filter((function(e){return e.start>=o.end}))).length&&e.h.timeline.push.apply(e.h.timeline,u(t)),e.l!==r&&(e.l=r)}else e.h=t,e.i=n,e.l=r;i&&jf(e)}function jf(e){if(!e.o){for(var t=e.h.timeline;t.length&&t[t.length-1].start>=e.l;)t.pop();e.Ia(e.i)}}function Hf(e,t,n,r,i,a,o){return e=ff(e,t,n,a,r||null,i),ln(o(),[e]).map((function(e){return e.toString()}))}function Vf(e){this.o=null,this.A=e,this.G=new Jr,this.i=[],this.h=null,this.m=[],this.B=null,this.F=[],this.C=300,this.l=new Map,this.j=new Map,this.g=null,this.s="UNKNOWN"}function Gf(e,t){var n,r,i,a,o,s,l;return I((function(u){return 1==u.g?(n=ln(e.i,[Kf(e,t)]),r=ri(n,e.o.retryParameters),i=e.A.networkingEngine.request(8,r),ei(e.G,i),E(u,2),b(u,i.promise,4)):2!=u.g?(a=u.h,o=Wt(a.data),1==(s=JSON.parse(o)).VERSION&&function(e,t,n){null!=e.g&&(e.g.stop(),e.g=null);var r=t["RELOAD-URI"]||n;e.g=new Tt((function(){Gf(e,r)})),(n=t.TTL)&&(e.C=n);e.g.U(e.C),e.m=t["PATHWAY-PRIORITY"]||[],e.F=t["PATHWAY-CLONES"]||[]}(e,s,a.uri),T(u,0)):(l=A(u))&&7001==l.code?u.return():(null!=e.g&&(e.g.stop(),e.g=null),e.g=new Tt((function(){Gf(e,t)})),e.g.U(e.C),void k(u))}))}function Kf(e,t){if(!e.m.length)return t;t=new rt(t);var n=e.B||e.m[0],r=Math.round(e.A.getBandwidthEstimate()),i=t.g;return"DASH"==e.s?(i.add("_DASH_pathway",n),i.add("_DASH_throughput",String(r))):"HLS"==e.s&&(i.add("_HLS_pathway",n),i.add("_HLS_throughput",String(r))),mt(i)&&st(t,i),t.toString()}function zf(e,t,n,r){var i=e.l.get(t);i||(i=new Map),i.set(n,r),e.l.set(t,i)}function Wf(e,t,n){n=void 0!==n&&n,t=e.l.get(t)||new Map;for(var r=[],i={},a=l(e.m),o=a.next();!o.done;i={Qb:i.Qb},o=a.next())if(i.Qb=o.value,o=t.get(i.Qb))r.push({rf:i.Qb,location:o});else if(o=e.F.find(function(e){return function(t){return t.Wi==e.Qb}}(i))){var s=t.get(o["BASE-ID"]);s&&(o["URI-REPLACEMENT"].Pg?(at(s=new rt(s),o["URI-REPLACEMENT"].Pg),r.push({rf:i.Qb,location:s.toString()})):r.push({rf:i.Qb,location:s}))}for(i=Date.now(),o=(a=l(e.j.keys())).next();!o.done;o=a.next())o=o.value,i>(s=e.j.get(o))&&e.j.delete(o);if(r=r.filter((function(t){for(var n=l(e.j.keys()),r=n.next();!r.done;r=n.next())if(r.value.includes(new rt(t.location).wb))return!1;return!0})),r.length&&(e.B=r[0].rf),r=r.map((function(e){return e.location})),!r.length&&e.h)for(o=(i=l(e.h.split(","))).next();!o.done;o=i.next())(a=t.get(o.value))&&(e.B=e.h,r.push(a));if(!r.length)for(i=(t=l(t.values())).next();!i.done;i=t.next())r.push(i.value);return n?r:ln(e.i,r)}function Yf(){this.j=[],this.h=[],this.g=[],this.l=[],this.i=[],this.o=this.m=!1,this.s=new Set}function Zf(e,t){for(var n=[],r=[],i=[],a=[],o=(e=l(e)).next();!o.done;o=e.next()){var s=o.value;o=new Map(s.audioStreams.map((function(e){return[kh(e),e]})));var u=new Map(s.videoStreams.map((function(e){return[bh(e),e]}))),c=new Map(s.textStreams.map((function(e){return[Eh(e),e]})));if(s=new Map(s.imageStreams.map((function(e){return[_h(e),e]}))),t){var d=yh(hn);c.set(Eh(d),d),d=yh("image"),s.set(_h(d),d)}n.push(o),r.push(u),i.push(c),a.push(s)}return{Rf:n,Ng:r,Kg:i,jg:a}}function qf(e){var t,n,r,i,a,o,s,u,c,d,p,f,h,y,g,v,m,k,E,_,T,A,S,w,C,x,P,R,D;return I((function(I){switch(I.g){case 1:if(t=yn,1==e.length)return I.return(e[0]);for(n=e.map((function(e){return new Map(e.filter((function(e){return e.type===t.S})).map((function(e){return[kh(e),e]})))})),r=e.map((function(e){return new Map(e.filter((function(e){return e.type===t.fa})).map((function(e){return[bh(e),e]})))})),i=e.map((function(e){return new Map(e.filter((function(e){return e.type===t.ma})).map((function(e){return[Eh(e),e]})))})),a=e.map((function(e){return new Map(e.filter((function(e){return e.type===t.ve})).map((function(e){return[_h(e),e]})))})),o=l(i),s=o.next();!s.done;s=o.next())u=s.value,c=hh(t.ma),u.set(Eh(c),c);for(d=l(a),p=d.next();!p.done;p=d.next())f=p.value,h=hh(t.ve),f.set(_h(h),h);return b(I,Xf(y=new Yf,[],n,0,th,rh),2);case 2:return g=I.h,b(I,Xf(y,[],r,0,th,rh),3);case 3:return v=I.h,b(I,Xf(y,[],i,0,th,rh),4);case 4:return m=I.h,b(I,Xf(y,[],a,0,th,rh),5);case 5:if(k=I.h,E=0,v.length&&g.length)for(S=l(g),w=S.next();!w.done;w=S.next())for(C=w.value,x=l(v),P=x.next();!P.done;P=x.next())R=P.value,D=E++,R.variantIds.push(D),C.variantIds.push(D);else for(_=v.concat(g),T=l(_),A=T.next();!A.done;A=T.next())A.value.variantIds=[E++];return I.return(v.concat(g).concat(m).concat(k))}}))}function Xf(e,t,n,r,i,a){var o,s,u,c,d,p,f,h,y,g,v,m,k,E,_,T,A;return I((function(S){switch(S.g){case 1:for(o=[],s=0;s<r;s++)o.push(new Set);for(u=r;u<n.length;u++)o.push(new Set(n[u].values()));c=l(t),d=c.next();case 2:if(d.done){S.u(4);break}return p=d.value,b(S,function(e,t,n,r,i,a){return I((function(o){return 1==o.g?(ih(e,n,t),t.matchedStreams?t.segmentIndex?b(o,Qf(t,r),2):o.u(2):o.return(!1)):(Jf(t,r,i,a),o.return(!0))}))}(e,p,n,r,a,o),5);case 5:if(!S.h)throw new bt(2,4,4037);d=c.next(),S.u(2);break;case 4:for(f=l(o),h=f.next();!h.done;h=f.next())for(y=h.value,g=l(y),v=g.next();!v.done;v=g.next())m=v.value,(k=$f(e,m,n,i,a,o))&&t.push(k);for(E=l(o),h=E.next();!h.done;h=E.next())for(_=h.value,T={},A=l(_),v=A.next();!v.done;T={Bd:T.Bd},v=A.next())if(T.Bd=v.value,!mh(T.Bd)&&t.some(function(t){return function(n){return sh(e,t.Bd,n)}}(T)))throw new bt(2,4,4037);return S.return(t)}}))}function Qf(e,t){var n,r,i,a,o,s,u;return I((function(c){if(1==c.g){for(n=[],r=e.matchedStreams,i=l(r),a=i.next();!a.done;a=i.next())o=a.value,n.push(o.createSegmentIndex()),o.trickModeVideo&&!o.trickModeVideo.segmentIndex&&n.push(o.trickModeVideo.createSegmentIndex());return b(c,Promise.all(n),2)}if(e.segmentIndex instanceof Rs)for(s=t;s<r.length;s++)(u=r[s]).segmentIndex&&e.segmentIndex.h.push(u.segmentIndex);k(c)}))}function $f(e,t,n,r,i,a){if(mh(t))return null;var o=r(t);return ih(e,n,o),o.createSegmentIndex&&(o.createSegmentIndex=function(){return I((function(e){return o.segmentIndex?e.u(0):(o.segmentIndex=new Rs,b(e,Qf(o,0),0))}))}),o.matchedStreams&&o.matchedStreams.length?(Jf(o,0,i,a),o):null}function Jf(e,t,n,r){for(var i=e.matchedStreams;t<i.length;t++){var a=i[t];n(e,a);var o=!0;if("audio"==e.type&&0==Kn(e.language,a.language)&&(o=!1),o&&(r[t].delete(a),a.fullMimeTypes))for(o=(a=l(a.fullMimeTypes.values())).next();!o.done;o=a.next())e.fullMimeTypes.add(o.value)}}function eh(e){var t=Object.assign({},e);return t.originalId=null,t.createSegmentIndex=function(){return Promise.resolve()},t.closeSegmentIndex=function(){if(t.segmentIndex&&(t.segmentIndex.release(),t.segmentIndex=null),t.matchedStreams)for(var e=l(t.matchedStreams),n=e.next();!n.done;n=e.next())(n=n.value).segmentIndex&&(n.segmentIndex.release(),n.segmentIndex=null)},t.roles=t.roles.slice(),t.segmentIndex=null,t.emsgSchemeIdUris=[],t.keyIds=new Set,t.closedCaptions=null,t.trickModeVideo=null,t}function th(e){return(e=Object.assign({},e)).roles=e.roles.slice(),e.keyIds=new Set,e.segments=[],e.variantIds=[],e.closedCaptions=null,e}function nh(e,t){function n(e,t){e||(e=[]);for(var n=(t=l(t)).next();!n.done;n=t.next())n=n.value,e.includes(n)||e.push(n);return e}e.roles=n(e.roles,t.roles),t.emsgSchemeIdUris&&(e.emsgSchemeIdUris=n(e.emsgSchemeIdUris,t.emsgSchemeIdUris));for(var r=l(t.keyIds),i=r.next();!i.done;i=r.next())e.keyIds.add(i.value);if(null==e.originalId?e.originalId=t.originalId:e.originalId+=","+(t.originalId||""),r=ba(e.drmInfos,t.drmInfos),t.drmInfos.length&&e.drmInfos.length&&!r.length)throw new bt(2,4,4038);if(e.drmInfos=r,e.encrypted=e.encrypted||t.encrypted,t.closedCaptions)for(e.closedCaptions||(e.closedCaptions=new Map),i=(r=l(t.closedCaptions)).next();!i.done;i=r.next()){var a=l(i.value);i=a.next().value,a=a.next().value,e.closedCaptions.set(i,a)}t.trickModeVideo?(e.trickModeVideo||(e.trickModeVideo=eh(t.trickModeVideo),e.trickModeVideo.createSegmentIndex=function(){return e.trickModeVideo.segmentIndex=e.segmentIndex.clone(),Promise.resolve()}),nh(e.trickModeVideo,t.trickModeVideo)):e.trickModeVideo&&nh(e.trickModeVideo,t)}function rh(e,t){var n=e.roles;n||(n=[]);for(var r=l(t.roles),i=r.next();!i.done;i=r.next())i=i.value,n.includes(i)||n.push(i);for(e.roles=n,r=(n=l(t.keyIds)).next();!r.done;r=n.next())e.keyIds.add(r.value);if(e.encrypted=e.encrypted&&t.encrypted,e.segments.push.apply(e.segments,u(t.segments)),t.closedCaptions)for(e.closedCaptions||(e.closedCaptions=new Map),n=(t=l(t.closedCaptions)).next();!n.done;n=t.next())n=(r=l(n.value)).next().value,r=r.next().value,e.closedCaptions.set(n,r)}function ih(e,t,n){for(var r=[],i=(t=l(t)).next();!i.done;i=t.next()){if(!(i=ah(e,i.value,n)))return;r.push(i)}n.matchedStreams=r}function ah(e,t,n){var r={audio:kh,video:bh,text:Eh,image:_h}[n.type],i=null,a=r(n);if(t.has(a))i=t.get(a);else{a={audio:function(t,n){return sh(e,t,n)},video:function(t,n){return sh(e,t,n)},text:lh,image:uh}[n.type];for(var o={audio:ch,video:dh,text:ph,image:fh}[n.type],s=l(t.values()),u=s.next();!u.done;u=s.next())!a(n,u=u.value)||n.fastSwitching!=u.fastSwitching||i&&!o(n,i,u)||(i=u)}return e.o&&!mh(i)&&t.delete(r(i)),i}function oh(e,t){function n(e){if(!wh.has(e)){var t=Tn(e);wh.set(e,t)}return wh.get(e)}return e.mimeType==t.mimeType&&n(e.codecs)==n(t.codecs)}function sh(e,t,n){return!(!oh(t,n)&&!e.m||t.drmInfos&&!ma(t.drmInfos,n.drmInfos))}function lh(e,t){return!t.language||e.forced===t.forced&&0!=Kn(e.language,t.language)&&t.kind==e.kind}function uh(){return!0}function ch(e,t,n){var r=oh(e,t),i=oh(e,n);if(r&&!i)return!1;if(!r&&i)return!0;if(r=Kn(e.language,t.language),(i=Kn(e.language,n.language))>r)return!0;if(i<r)return!1;if(t.label!==n.label){if(e.label===t.label)return!1;if(e.label===n.label)return!0}return e.roles.length?(r=t.roles.filter((function(t){return e.roles.includes(t)})),(i=n.roles.filter((function(t){return e.roles.includes(t)}))).length>r.length||!(i.length<r.length)&&n.roles.length<t.roles.length):!(n.roles.length||!t.roles.length)||!(n.roles.length&&!t.roles.length)&&(!(t.primary||!n.primary)||!(t.primary&&!n.primary)&&((r=gh(e.channelsCount,t.channelsCount,n.channelsCount))==Th||r!=Sh&&((r=gh(e.audioSamplingRate,t.audioSamplingRate,n.audioSamplingRate))==Th||r!=Sh&&!(!e.bandwidth||vh(e.bandwidth,t.bandwidth,n.bandwidth)!=Th))))}function dh(e,t,n){var r=oh(e,t),i=oh(e,n);if(r&&!i)return!1;if(!r&&i)return!0;if((r=gh(e.width*e.height,t.width*t.height,n.width*n.height))==Th)return!0;if(r==Sh)return!1;if(e.frameRate){if((r=gh(e.frameRate,t.frameRate,n.frameRate))==Th)return!0;if(r==Sh)return!1}return!(!e.bandwidth||vh(e.bandwidth,t.bandwidth,n.bandwidth)!=Th)}function ph(e,t,n){var r=Kn(e.language,t.language),i=Kn(e.language,n.language);if(i>r)return!0;if(i<r)return!1;if(!t.primary&&n.primary)return!0;if(t.primary&&!n.primary)return!1;if(t.label!==n.label){if(e.label===t.label)return!1;if(e.label===n.label)return!0}if(e.roles.length){if(r=t.roles.filter((function(t){return e.roles.includes(t)})),(i=n.roles.filter((function(t){return e.roles.includes(t)}))).length>r.length)return!0;if(i.length<r.length)return!1}else{if(!n.roles.length&&t.roles.length)return!0;if(n.roles.length&&!t.roles.length)return!1}return n.mimeType==e.mimeType&&n.codecs==e.codecs&&(t.mimeType!=e.mimeType||t.codecs!=e.codecs)}function fh(e,t,n){return gh(e.width*e.height,t.width*t.height,n.width*n.height)==Th}function hh(e){return{id:0,originalId:"",groupId:null,primary:!1,type:e,mimeType:"",codecs:"",language:"",originalLanguage:null,label:null,width:null,height:null,encrypted:!1,keyIds:new Set,segments:[],variantIds:[],roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,external:!1,fastSwitching:!1}}function yh(e){return{id:0,originalId:"",groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Cs([]),mimeType:"",codecs:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"",originalLanguage:null,label:null,type:e,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set}}function gh(e,t,n){if(t==e&&e!=n)return Sh;if(n==e&&e!=t)return Th;if(t>e){if(n<=e||n-e<t-e)return Th;if(n-e>t-e)return Sh}else{if(n>e)return Sh;if(e-n<e-t)return Th;if(e-n>e-t)return Sh}return Ah}function vh(e,t,n){return t=Math.abs(e-t),(e=Math.abs(e-n))<t?Th:t<e?Sh:Ah}function mh(e){switch(e.type){case hn:return!e.language;case"image":return!e.tilesLayout;default:return!1}}function bh(e){return JSON.stringify([e.fastSwitching,e.width,e.frameRate,e.codecs,e.mimeType,e.label,e.roles,e.closedCaptions?Array.from(e.closedCaptions.entries()):null,e.bandwidth])}function kh(e){return JSON.stringify([e.fastSwitching,e.channelsCount,e.language,e.bandwidth,e.label,e.codecs,e.mimeType,e.roles,e.audioSamplingRate,e.primary])}function Eh(e){return JSON.stringify([e.language,e.label,e.codecs,e.mimeType,e.bandwidth,e.roles])}function _h(e){return JSON.stringify([e.width,e.codecs,e.mimeType])}y(Bf,Cs),(n=Bf.prototype).getNumReferences=function(){return this.h?this.h.timeline.length:0},n.release=function(){Cs.prototype.release.call(this),this.h=null},n.Ia=function(e){if(this.h){for(var t=0,n=this.h.timeline,r=0;r<n.length&&n[r].end+this.i<=e;r+=1)t+=1;0<t&&(this.h.timeline=n.slice(t),this.g.length>=t&&(this.g=this.g.slice(t)),this.j+=t,0===this.getNumReferences()&&this.release())}},n.find=function(e){if(this.h&&this.h.timeline&&this.h.timeline.length&&e<this.h.timeline[0].start+this.i)return this.j;if(!this.h)return null;var t=this.h.timeline;if(e<this.i||e>=this.l)return null;for(var n=t.length-1,r=0;r<t.length;r++){var i=t[r],a=i.start+this.i;if(i=r<n?t[r+1].start+this.i:1/0===this.l?i.end+this.i:this.l,e>=a&&e<i)return r+this.j}return null},n.get=function(e){var t=this;if(0>(e-=this.j)||e>=this.getNumReferences()||!this.h)return null;var n=this.g[e];if(!n){var r=this.h.wc,i=this.h.timeline[e],a=i.si,o=this.h.Lf+i.Mf;n=this.i-this.h.Bb;var s=this.i+i.end,l=s;e===this.getNumReferences()-1&&1/0!==this.l&&(l=this.l);for(var u=this.h.codecs,c=this.h.mimeType,d=[],p=(i.end-i.start)/i.rb,f={},h=0;h<i.rb;f={Qc:f.Qc,te:f.te},h++){var y=i.start+p*h,g=y+p;f.te=h+1,f.Qc=null,(y=new Va(this.i+y,this.i+g,function(e){return function(){return t.h?(null==e.Qc&&(e.Qc=Hf(t.h.wc,t.F,a,t.B,o,e.te,t.C)),e.Qc):[]}}(f),0,null,this.s,n,this.i,this.l,[],"",null,null,Ka,this.A)).codecs=u,y.mimeType=c,0==this.G?0<h&&y.Zd():0!=h%this.G&&y.Zd(),d.push(y)}(n=new Va(this.i+i.start,l,(function(){return 0<i.rb?[]:Hf(r,t.F,a,t.B,o,null,t.C)}),0,null,this.s,n,this.i,this.l,d,"",null,null,Ka,this.A,0<i.rb)).codecs=u,n.mimeType=c,n.i=s,this.g[e]=n}return n},Vf.prototype.configure=function(e){this.o=e},Vf.prototype.destroy=function(){return this.A=this.o=null,this.i=[],this.h=null,this.m=[],this.F=[],this.l.clear(),null!=this.g&&(this.g.stop(),this.g=null),this.G.destroy()},Vf.prototype.setManifestType=function(e){this.s=e},Vf.prototype.banLocation=function(e){this.j.set(e,Date.now()+6e4)},(n=Yf.prototype).release=function(){for(var e=l(this.h.concat(this.g,this.l,this.i)),t=e.next();!t.done;t=e.next())(t=t.value).segmentIndex&&t.segmentIndex.release();this.h=[],this.g=[],this.l=[],this.i=[],this.j=[]},n.Fh=function(){return this.j},n.We=function(){return this.l.slice()},n.oh=function(){return this.i},n.Uf=function(e,t){var n,r,i,a,o,s,u,c,d,p,f,h,y,g,v,m,E,_,T,A,S,w,C,x,P,R,D,O,L,M=this;return I((function(I){if(1==I.g){if(n=yn,!t&&1==e.length)return r=Zf(e,!1),i=r.Rf,a=r.Ng,o=r.Kg,s=r.jg,M.h=Array.from(i[0].values()),M.g=Array.from(a[0].values()),M.l=Array.from(o[0].values()),M.i=Array.from(s[0].values()),I.u(2);for(u=-1,c=0;c<e.length;c++)d=e[c],M.s.has(d.id)||(M.s.add(d.id),-1==u&&(u=c));return-1==u?I.return():(p=Zf(e,!0),f=p.Rf,h=p.Ng,y=p.Kg,g=p.jg,b(I,Promise.all([Xf(M,M.h,f,u,eh,nh),Xf(M,M.g,h,u,eh,nh),Xf(M,M.l,y,u,eh,nh),Xf(M,M.i,g,u,eh,nh)]),2))}if(v=0,m=[],M.g.length&&M.h.length)for(w=l(M.h),C=w.next();!C.done;C=w.next())for(x=C.value,P=l(M.g),R=P.next();!R.done;R=P.next())D=R.value,O=ba(x.drmInfos,D.drmInfos),x.drmInfos.length&&D.drmInfos.length&&!O.length||(L=v++,m.push({id:L,language:x.language,disabledUntilTime:0,primary:x.primary,audio:x,video:D,bandwidth:(x.bandwidth||0)+(D.bandwidth||0),drmInfos:O,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(E=M.g.length?M.g:M.h,_=l(E),T=_.next();!T.done;T=_.next())A=T.value,S=v++,m.push({id:S,language:A.language,disabledUntilTime:0,primary:A.primary,audio:A.type==n.S?A:null,video:A.type==n.fa?A:null,bandwidth:A.bandwidth||0,drmInfos:A.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});M.j=m,k(I)}))},n.Ag=function(e){this.m=e},n.Hg=function(e){this.o=e},F("shaka.util.PeriodCombiner",Yf),Yf.prototype.setUseStreamOnce=Yf.prototype.Hg,Yf.prototype.setAllowMultiTypeVariants=Yf.prototype.Ag,Yf.prototype.combinePeriods=Yf.prototype.Uf,Yf.prototype.getImageStreams=Yf.prototype.oh,Yf.prototype.getTextStreams=Yf.prototype.We,Yf.prototype.getVariants=Yf.prototype.Fh;var Th=1,Ah=0,Sh=-1,wh=new Map;function Ch(e,t){try{return function(e,t){var n=new DOMParser,r=xh.value()(e);e=null;try{e=n.parseFromString(r,"text/xml")}catch(e){return null}if(!(n=e.documentElement)||n.getElementsByTagName("parsererror").length||n.tagName!=t)return null;if(!("createNodeIterator"in document))return n;for(t=document.createNodeIterator(e,NodeFilter.SHOW_ALL);e=t.nextNode();)if(e instanceof HTMLElement||e instanceof SVGElement)return null;return n}(Zt(e),t)}catch(e){return null}}var xh=new Et((function(){if("undefined"!=typeof trustedTypes){var e=trustedTypes.createPolicy("shaka-player#xml",{createHTML:function(e){return e}});return function(t){return e.createHTML(t)}}return function(e){return e}}));function Ph(){var e=this;this.i=this.g=null,this.o=[],this.j=null,this.I=1,this.m={},this.L={},this.l=new Yf,this.G=0,this.H=new V(5),this.A=new Tt((function(){!function(e){var t,n;I((function(r){switch(r.g){case 1:return t=0,E(r,2),b(r,Rh(e),4);case 4:t=r.h,T(r,3);break;case 2:if(n=A(r),e.i){if(e.g.raiseFatalErrorOnManifestUpdateRequestFailure)return e.i.onError(n),r.return();n.severity=1,e.i.onError(n)}case 3:if(!e.i)return r.return();e.i.onManifestUpdated(),Mh(e,t),k(r)}}))}(e)})),this.F=new Jr,this.B=null,this.K=[],this.C=1/0,this.s=!1,this.h=null}function Rh(e){var t,n,r,i,a,o,s;return I((function(l){return 1==l.g?(t=e.o,1<e.o.length&&e.h&&((n=Wf(e.h,"Location",!0)).length&&(t=n)),r=ri(t,e.g.retryParameters),i=Date.now(),b(l,jh(e,r,0,{type:4}),2)):3!=l.g?(a=l.h,e.i?(a.uri&&a.uri!=a.originalUri&&!e.o.includes(a.uri)&&e.o.unshift(a.uri),b(l,function(e,t,n){var r,i,a,o,s,l,u,c;return I((function(d){if(1==d.g){if(r=t,(i=e.g.dash.manifestPreprocessor)!=Rl){if(ae("manifest.dash.manifestPreprocessor configuration","Please Use manifest.dash.manifestPreprocessorTXml instead."),!(a=Ch(r,"MPD")))throw new bt(2,4,4001,n);i(a),r=qt(a.outerHTML)}if(!(o=Di(r,"MPD")))throw new bt(2,4,4001,n);return(s=e.g.dash.manifestPreprocessorTXml)!=Il&&s(o),e.g.dash.disableXlinkProcessing?d.return(Ih(e,o,n)):(l=e.g.dash.xlinkFailGracefully,u=mf(o,e.g.retryParameters,l,n,e.i.networkingEngine),ei(e.F,u),b(d,u.promise,2))}return c=d.h,d.return(Ih(e,c,n))}))}(e,a.data,a.uri),3)):l.return(0)):(o=Date.now(),s=(o-i)/1e3,e.H.sample(1,s),l.return(s))}))}function Ih(e,t,n){var r,i,a,o,s,u,c,d,p,f,h,y,g,v,m,_,S,w,C,x,P,R,D,O,L,M,N,U,B,F,j,H,V,G,K,z,W,Z,q,X,Q,$,J,ee,te,ne,re,ie,ae,oe,se,le,ue;return I((function(ce){switch(ce.g){case 1:for(e.h&&e.h.l.clear(),r=[n],i=[],a=new Map,o=Ni(t,"Location"),s=l(o),u=s.next();!u.done;u=s.next())c=u.value,d=c.attributes.serviceLocation,(p=Bi(c))&&(f=ln(r,[p])[0],d&&(e.h?zf(e.h,"Location",d,f):a.set(d,f)),i.push(f));if(e.h?0<(h=Wf(e.h,"Location",!0)).length&&(r=e.o=h):i.length&&(r=e.o=i),y=Promise.resolve(),(g=ji(t,"ContentSteering"))&&e.i)for(v=g.attributes.defaultServiceLocation,e.h?(e.h.i=r,e.h.h=v):(e.h=new Vf(e.i),e.h.configure(e.g),e.h.setManifestType("DASH"),e.h.i=r,e.h.h=v,(m=Bi(g))&&(Vi(g,"queryBeforeStart",Ji,!1)?y=Gf(e.h,m):Gf(e.h,m))),_=l(a.keys()),S=_.next();!S.done;S=_.next())w=S.value,C=a.get(w),zf(e.h,"Location",w,C);if(x=Ni(t,"BaseURL"),R=!1,e.h)for(D=l(x),O=D.next();!O.done;O=D.next())L=O.value,M=L.attributes.serviceLocation,N=Bi(L),M&&N&&(zf(e.h,"BaseURL",M,N),R=!0);if(R&&e.h||(U=x.map(Bi),P=ln(r,U)),B=function(){return e.h&&R?Wf(e.h,"BaseURL"):P||[]},F=0,x&&x.length&&(F=Vi(x[0],"availabilityTimeOffset",$i)||0),j=e.g.dash.ignoreMinBufferTime,H=0,j||(H=Vi(t,"minBufferTime",Yi)||0),e.G=Vi(t,"minimumUpdatePeriod",Yi,-1),V=Vi(t,"availabilityStartTime",Wi),G=Vi(t,"timeShiftBufferDepth",Yi),K=e.g.dash.ignoreSuggestedPresentationDelay,z=null,K||(z=Vi(t,"suggestedPresentationDelay",Yi)),W=e.g.dash.ignoreMaxSegmentDuration,Z=null,W||(Z=Vi(t,"maxSegmentDuration",Yi)),q=t.attributes.type||"static",e.j)for(X=e.j.presentationTimeline,Q=l(Object.values(e.m)),$=Q.next();!$.done;$=Q.next())(J=$.value).segmentIndex&&J.segmentIndex.Ia(X.qb());else ee=e.g.defaultPresentationDelay||1.5*H,X=new ss(V,null!=z?z:ee,e.g.dash.autoCorrectDrift);return X.Bc("static"==q),X.R()&&!isNaN(e.g.availabilityWindowOverride)&&(G=e.g.availabilityWindowOverride),null==G&&(G=1/0),X.ke(G),te=t.attributes.profiles||"",ne={Fb:"static"!=q,presentationTimeline:X,za:null,ha:null,ua:null,J:null,bandwidth:0,kg:!1,Eb:F,profiles:te.split(",")},re=function(e,t,n,r){var i=Vi(r,"mediaPresentationDuration",Yi),a=[],o=0;r=Ni(r,"Period");for(var s=0;s<r.length;s++){var l=r[s],u=r[s+1],c=Vi(l,"start",Yi,o),d=l.attributes.id,p=Vi(l,"duration",Yi),f=null;if(u){var h=Vi(u,"start",Yi);null!=h&&(f=h-c)}else null!=i&&(f=i-c);if(null==f&&(f=p),!(null!==e.B&&null!==d&&null!==c&&c<e.B)||e.K.includes(d)||s+1==r.length){if(null!==c&&(null===e.B||c>e.B)&&(e.B=c),o=Oh(e,t,n,{start:c,duration:f,node:l,Ze:null==f||!u}),a.push(o),t.za.id&&f&&(e.L[t.za.id]=f),null==f){o=null;break}o=c+f}}return e.K=a.map((function(e){return e.id})),null!=i?{periods:a,duration:i,Zf:!1}:{periods:a,duration:o,Zf:!0}}(e,ne,B,t),ie=re.duration,ae=re.periods,"static"!=q&&re.Zf||X.ab(ie||1/0),e.C&&!e.s&&e.i.isAutoLowLatencyMode()&&(e.i.enableLowLatencyMode(),e.s=e.i.isLowLatencyMode()),e.s?X.Bg(e.C):e.C&&Y("Low-latency DASH live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details."),X.hf(Z||1),b(ce,e.l.Uf(ae,ne.Fb),2);case 2:return b(ce,y,3);case 3:if(e.s&&(H=0,oe=null!=z?z:e.g.defaultPresentationDelay,X.Df(oe)),e.j){e.j.variants=e.l.j,0<(se=e.l.We()).length&&(e.j.textStreams=se),e.j.imageStreams=e.l.i,e.i.filter(e.j),ce.u(4);break}if(e.j={presentationTimeline:X,variants:e.l.j,textStreams:e.l.We(),imageStreams:e.l.i,offlineSessionIds:[],minBufferTime:H||0,sequenceMode:e.g.dash.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"DASH",serviceDescription:Dh(t)},!X.Mg()){ce.u(5);break}return le=Ni(t,"UTCTiming"),b(ce,function(e,t,n){var r,i,a,o,s,u,c,d;return I((function(p){switch(p.g){case 1:r=n.map((function(e){return{scheme:e.attributes.schemeIdUri,value:e.attributes.value}})),i=e.g.dash.clockSyncUri,!r.length&&i&&r.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:i}),a=l(r),o=a.next();case 2:if(o.done){p.u(4);break}switch(s=o.value,E(p,5),u=s.scheme,c=s.value,u){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":return p.u(7);case"urn:mpeg:dash:utc:http-xsdate:2014":case"urn:mpeg:dash:utc:http-iso:2014":case"urn:mpeg:dash:utc:http-xsdate:2012":case"urn:mpeg:dash:utc:http-iso:2012":return p.u(8);case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":return d=Date.parse(c),p.return(isNaN(d)?0:d-Date.now());case"urn:mpeg:dash:utc:http-ntp:2014":case"urn:mpeg:dash:utc:ntp:2014":case"urn:mpeg:dash:utc:sntp:2014":Y("NTP UTCTiming scheme is not supported");break;default:Y("Unrecognized scheme in UTCTiming element",u)}p.u(9);break;case 7:return b(p,Uh(e,t,c,"HEAD"),10);case 10:return p.return(p.h);case 8:return b(p,Uh(e,t,c,"GET"),11);case 11:return p.return(p.h);case 9:T(p,3);break;case 5:A(p);case 3:o=a.next(),p.u(2);break;case 4:return Y("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),p.return(0)}}))}(e,B,le),6);case 6:if(ue=ce.h,!e.i)return ce.return();X.Cg(ue);case 5:X.Xd();case 4:e.i.makeTextStreamsForClosedCaptions(e.j),k(ce)}}))}function Dh(e){var t=ji(e,"ServiceDescription");return t?(e=ji(t,"Latency"),t=ji(t,"PlaybackRate"),e&&e.attributes.max||t?{maxLatency:e&&e.attributes.max?parseInt(e.attributes.max,10)/1e3:null,maxPlaybackRate:t?parseFloat(t.attributes.max):null,minLatency:e&&e.attributes.min?parseInt(e.attributes.min,10)/1e3:null,minPlaybackRate:t?parseFloat(t.attributes.min):null}:null):null}function Oh(t,n,r,i){n.za=Nh(t,i.node,null,r),n.ha=i,n.za.Eb=n.Eb,n.za.id||(n.za.id="__shaka_period_"+i.start);var a=Ni(i.node,"EventStream");r=n.presentationTimeline.qb();for(var o=(a=l(a)).next();!o.done;o=a.next())Bh(t,i.start,i.duration,o.value,r);if(r=Ni(i.node,"AdaptationSet").map((function(r){return function(t,n,r){function i(e){switch(e){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}n.ua=Nh(t,r,n.za,null);var a,o=!1,s=Ni(r,"Role"),c=s.map((function(e){return e.attributes.value})).filter(Bn),d=void 0,p=n.ua.contentType==hn;p&&(d="subtitle");for(var f=(s=l(s)).next();!f.done;f=s.next()){var h=(f=f.value).attributes.schemeIdUri;if(null==h||"urn:mpeg:dash:role:2011"==h)switch(f=f.attributes.value,f){case"main":o=!0;break;case"caption":case"subtitle":d=f}}h=Ni(r,"EssentialProperty"),s=null;var y=!1;f=!1;for(var g=(h=l(h)).next();!g.done;g=h.next()){var v=(g=g.value).attributes.schemeIdUri;"http://dashif.org/guidelines/trickmode"==v?s=g.attributes.value:"urn:mpeg:mpegB:cicp:TransferCharacteristics"==v?a=i(parseInt(g.attributes.value,10)):"urn:mpeg:mpegB:cicp:ColourPrimaries"!=v&&"urn:mpeg:mpegB:cicp:MatrixCoefficients"!=v&&("urn:mpeg:dash:ssr:2023"==v?y=!0:f=!0)}var m=null;for(h=l(h=Ni(r,"SupplementalProperty")),g=h.next();!g.done;g=h.next())g=g.value,"http://dashif.org/guidelines/last-segment-number"==(v=g.attributes.schemeIdUri)?m=parseInt(g.attributes.value,10)-1:"urn:mpeg:mpegB:cicp:TransferCharacteristics"==v&&(a=i(parseInt(g.attributes.value,10)));h=Ni(r,"Accessibility");var E,_=new Map;for(h=l(h),g=h.next();!g.done;g=h.next())if(v=g.value,g=v.attributes.schemeIdUri,v=v.attributes.value,"urn:scte:dash:cc:cea-608:2015"==g)if(g=1,null!=v)for(var T=l(v=v.split(";")),A=T.next();!A.done;A=T.next()){var S=A.value,w=A=void 0;S.includes("=")?(A=(S=S.split("="))[0].startsWith("CC")?S[0]:"CC"+S[0],w=S[1]||"und"):(A="CC"+g,2==v.length?g+=2:g++,w=S),_.set(A,Gn(w))}else _.set("CC1","und");else if("urn:scte:dash:cc:cea-708:2015"==g)if(g=1,null!=v)for(v=l(v.split(";")),A=v.next();!A.done;A=v.next())A=A.value,S=T=void 0,A.includes("=")?(A=A.split("="),T="svc"+A[0],S=A[1].split(",")[0].split(":").pop()):(T="svc"+g,g++,S=A),_.set(T,Gn(S));else _.set("svc1","und");else"urn:mpeg:dash:role:2011"==g?null!=v&&(c.push(v),"captions"==v&&(d="caption")):"urn:tva:metadata:cs:AudioPurposeCS:2007"==g&&("1"==v?E="visually impaired":"2"==v&&(E="hard of hearing"));if(f)return null;f=Ni(r,"ContentProtection");var C=lf(f,t.g.dash.ignoreDrmInfo,t.g.dash.keySystemsByURI),x=Gn(n.ua.language||"und"),P=r.attributes.label;if((f=Ni(r,"Label"))&&f.length&&(f=Ui(f[0]))&&(P=f),f=Ni(r,"Representation"),r=f.map((function(r){return(r=function(t,n,r,i,a,o,s,l,u,c,d,p){if(n.J=Nh(t,c,n.ua,null),t.C=Math.min(t.C,n.J.Eb),!function(e){var t=e.pd?1:0;return t+=e.Kb?1:0,t+=e.qd?1:0,0==t?e.contentType==hn||"application"==e.contentType:(1!=t&&(e.pd&&(e.Kb=null),e.qd=null),!0)}(n.J))return null;var f=n.ha.start;n.bandwidth=Vi(c,"bandwidth",Xi)||0;var h,y,g=n.J.contentType,v=g==hn||"application"==g;g="image"==g;try{var m=void 0;if(r.ye){var E=n.J.nb,_=ln(E(),[r.ye.Sh]),T=ri(_,t.g.retryParameters);m={bitsKey:128,blockCipherMode:"CBC",iv:r.ye.iv,firstMediaSequenceNumber:0,fetchKey:function(){var n,r,i;return I((function(a){if(1==a.g)return b(a,jh(t,T,6),2);if(3!=a.g){if(!(n=a.h).data||16!=n.data.byteLength)throw new bt(2,4,4049);return r={name:"AES-CBC"},i=m,b(a,e.crypto.subtle.importKey("raw",n.data,r,!0,["decrypt"]),3)}i.cryptoKey=a.h,m.fetchKey=void 0,k(a)}))}}}if(E=function(e,n,r,i){return function(e,t,n,r,i){var a,o,s,l;return I((function(u){return 1==u.g?(a=li,o=i?0:1,s=Js(t,n,r,e.g.retryParameters),b(u,jh(e,s,a,{type:o}),2)):(l=u.h,u.return(l.data))}))}(t,e,n,r,i)},n.J.pd)var A=xf(n,E,m);else if(n.J.Kb)A=Lf(n,t.m,m);else if(n.J.qd)A=Nf(n,E,t.m,!!t.j,t.g.dash.initialSegmentLimit,t.L,m,p);else{var S=n.ha.duration||0,w=n.J.nb;A={sc:function(){var e=xs(f,S,w());return e.qc((function(e){e.mimeType=n.J.mimeType,e.codecs=n.J.codecs})),Promise.resolve(e)}}}}catch(e){if((v||g)&&4002==e.code)return null;throw e}if(p=Ni(c,"ContentProtection"),p=function(e,t,n,r){var i=lf(e,n,r);if(t.ag)e=1==t.drmInfos.length&&!t.drmInfos[0].keySystem,n=0==i.drmInfos.length,(0==t.drmInfos.length||e&&!n)&&(t.drmInfos=i.drmInfos),t.ag=!1;else if(0<i.drmInfos.length&&(t.drmInfos=t.drmInfos.filter((function(e){return i.drmInfos.some((function(t){return t.keySystem==e.keySystem}))})),0==t.drmInfos.length))throw new bt(2,4,4008);return i.Xf||t.Xf}(p,r,t.g.dash.ignoreDrmInfo,t.g.dash.keySystemsByURI),p=new Set(p?[p]:[]),E=!1,Ni(c,"SupplementalProperty").some((function(e){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==e.attributes.schemeIdUri&&"JOC"==e.attributes.value}))&&(E=!0),_=!1,v&&(_=l.includes("forced_subtitle")||l.includes("forced-subtitle")),g&&((c=Ni(c,"EssentialProperty").find((function(e){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(e.attributes.schemeIdUri)})))&&(h=c.attributes.value),!h))return null;c=n.J.codecs,n.profiles.includes("http://dashif.org/guidelines/dash-if-uhd#hevc-hdr-pq10")&&(c.includes("hvc1.2.4.L153.B0")||c.includes("hev1.2.4.L153.B0"))&&(y="PQ"),v=n.J.id?n.za.id+","+n.J.id:"";var C=v&&t.m[v]?t.m[v]:{id:t.I++,originalId:n.J.id,groupId:null,createSegmentIndex:function(){return Promise.resolve()},closeSegmentIndex:function(){C.segmentIndex&&(C.segmentIndex.release(),C.segmentIndex=null)},segmentIndex:null,mimeType:n.J.mimeType,codecs:c,frameRate:n.J.frameRate,pixelAspectRatio:n.J.pixelAspectRatio,bandwidth:n.bandwidth,width:n.J.width,height:n.J.height,kind:i,encrypted:0<r.drmInfos.length,drmInfos:r.drmInfos,keyIds:p,language:a,originalLanguage:n.ua.language,label:o,type:n.ua.contentType,primary:s,trickModeVideo:null,emsgSchemeIdUris:n.J.emsgSchemeIdUris,roles:l,forced:_,channelsCount:n.J.ee,audioSamplingRate:n.J.audioSamplingRate,spatialAudio:E,closedCaptions:u,hdr:y,videoLayout:void 0,tilesLayout:h,accessibilityPurpose:d,external:!1,fastSwitching:!1,fullMimeTypes:new Set([mn(n.J.mimeType,n.J.codecs)])};return C.createSegmentIndex=function(){var e;return I((function(t){if(1==t.g)return C.segmentIndex?t.u(0):(e=C,b(t,A.sc(),3));e.segmentIndex=t.h,k(t)}))},v&&n.Fb&&!t.m[v]&&(t.m[v]=C),C}(t,n,C,d,x,P,o,c,_,r,E,m))&&(r.hdr=r.hdr||a,r.fastSwitching=y),r})).filter((function(e){return!!e})),0==r.length){if(s="image"==n.ua.contentType,t.g.dash.ignoreEmptyAdaptationSet||p||s)return null;throw new bt(2,4,4003)}if(!n.ua.contentType||"application"==n.ua.contentType)for(n.ua.contentType=Fh(r[0].mimeType,r[0].codecs),p=l(r),g=p.next();!g.done;g=p.next())g.value.type=n.ua.contentType;for(p=n.ua.id||"__fake__"+t.I++,h=l(r),g=h.next();!g.done;g=h.next()){for(g=g.value,T=(v=l(C.drmInfos)).next();!T.done;T=v.next())(T=T.value).keyIds=T.keyIds&&g.keyIds?new Set([].concat(u(T.keyIds),u(g.keyIds))):T.keyIds||g.keyIds;t.g.dash.enableAudioGroups&&(g.groupId=p)}return f=f.map((function(e){return e.attributes.id})).filter(Bn),{id:p,contentType:n.ua.contentType,language:x,Ej:o,streams:r,drmInfos:C.drmInfos,Kf:s,li:f}}(t,n,r)})).filter(Bn),n.Fb){for(i=[],o=(a=l(r)).next();!o.done;o=a.next())for(var s=(o=l(o.value.li)).next();!s.done;s=o.next())i.push(s.value);if(i.length!=new Set(i).size)throw new bt(2,4,4018)}for(i=r.filter((function(e){return!e.Kf})),a=(r=l(r=r.filter((function(e){return e.Kf})))).next();!a.done;a=r.next()){o=(a=a.value).Kf.split(" ");for(var c=(s=l(i)).next();!c.done;c=s.next()){var d=c.value;if(o.includes(d.id)){c={};for(var p=(d=l(d.streams)).next();!p.done;c={Cd:c.Cd},p=d.next())c.Cd=p.value,c.Cd.trickModeVideo=a.streams.find(function(e){return function(t){return Tn(e.Cd.codecs)==Tn(t.codecs)}}(c))}}}if(r=Lh(t.g.disableAudio,i,"audio"),a=Lh(t.g.disableVideo,i,"video"),o=Lh(t.g.disableText,i,hn),i=Lh(t.g.disableThumbnails,i,"image"),0===a.length&&0===r.length)throw new bt(2,4,4004);return{id:n.za.id,audioStreams:r,videoStreams:a,textStreams:o,imageStreams:i}}function Lh(e,t,n){return e||!t.length?[]:t.reduce((function(e,t){return t.contentType!=n||e.push.apply(e,u(t.streams)),e}),[])}function Mh(e,t){if(!(0>e.G)){var n=e.G;0<=e.g.dash.updatePeriod&&(n=e.g.dash.updatePeriod),e.A.U(Math.max(n-t,G(e.H)))}}function Nh(e,t,n,r){n=n||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,ee:null,audioSamplingRate:null,Eb:0,zf:0},r=r||n.nb;var i,a=t.attributes.id,o=Ni(t,"BaseURL"),s=!1;if(e.h)for(var u=l(o),c=u.next();!c.done;c=u.next()){var d=c.value;c=d.attributes.serviceLocation,d=Bi(d),c&&d&&(zf(e.h,a,c,d),s=!0)}s&&e.h||(i=o.map(Bi)),u=t.attributes.contentType||n.contentType,c=t.attributes.mimeType||n.mimeType,d=t.attributes.codecs||n.codecs;var p=Vi(t,"frameRate",ea)||n.frameRate,f=t.attributes.sar||n.pixelAspectRatio,h=function(e,t){t=t.slice();for(var n=(e=l(e)).next();!n.done;n=e.next())n=n.value.attributes.schemeIdUri,t.includes(n)||t.push(n);return t}(Ni(t,"InbandEventStream"),n.emsgSchemeIdUris),y=Ni(t,"AudioChannelConfiguration");y=function(e){for(var t=(e=l(e)).next();!t.done;t=e.next()){var n=t.value;if((t=n.attributes.schemeIdUri)&&(n=n.attributes.value))switch(t){case"urn:mpeg:dash:outputChannelPositionList:2012":return n.trim().split(/ +/).length;case"urn:mpeg:dash:23003:3:audio_channel_configuration:2011":case"urn:dts:dash:audio_channel_configuration:2012":if(!(t=parseInt(n,10)))continue;return t;case"tag:dolby.com,2014:dash:audio_channel_configuration:2011":case"urn:dolby:dash:audio_channel_configuration:2011":if(!(t=parseInt(n,16)))continue;for(e=0;t;)1&t&&++e,t>>=1;return e;case"urn:mpeg:mpegB:cicp:ChannelConfiguration":if(t=[0,1,2,3,4,5,6,8,2,3,4,7,8,24,8,12,10,12,14,12,14],(n=parseInt(n,10))&&0<n&&n<t.length)return t[n]}}return null}(y)||n.ee;var g=Vi(t,"audioSamplingRate",Qi)||n.audioSamplingRate;u||(u=Fh(c,d));var v=ji(t,"SegmentBase"),m=ji(t,"SegmentTemplate"),b=v&&Vi(v,"availabilityTimeOffset",$i)||0,k=m&&Vi(m,"availabilityTimeOffset",$i)||0,E=o&&o.length&&Vi(o[0],"availabilityTimeOffset",$i)||0;return b=n.Eb+E+b+k,k=null,(E=ji(t,"SegmentSequenceProperties"))&&(E=ji(E,"SAP"))&&(k=Vi(E,"cadence",qi)),{nb:function(){return ln(r(),o.length?e.h&&s?Wf(e.h,a):i||[]:[])},pd:v||n.pd,Kb:ji(t,"SegmentList")||n.Kb,qd:m||n.qd,width:Vi(t,"width",Qi)||n.width,height:Vi(t,"height",Qi)||n.height,contentType:u,mimeType:c,codecs:d,frameRate:p,pixelAspectRatio:f,emsgSchemeIdUris:h,id:a,language:t.attributes.lang,ee:y,audioSamplingRate:g,Eb:b,zf:k||n.zf}}function Uh(e,t,n,r){var i,a,o,s,l,u,c;return I((function(d){if(1==d.g)return i=[$t(n)],a=ln(t(),i),(o=ri(a,e.g.retryParameters)).method=r,s=e.i.networkingEngine.request(4,o),ei(e.F,s),b(d,s.promise,2);if(l=d.h,"HEAD"==r){if(!l.headers||!l.headers.date)return d.return(0);u=l.headers.date}else u=Wt(l.data);return c=Date.parse(u),isNaN(c)?d.return(0):d.return(c-Date.now())}))}function Bh(e,t,n,r,i){for(var a=r.attributes.schemeIdUri||"",o=r.attributes.value||"",s=Vi(r,"timescale",Qi)||1,u=(r=l(Ni(r,"Event"))).next();!u.done;u=r.next()){var c=Vi(u=u.value,"presentationTime",Qi)||0,d=Vi(u,"duration",Qi)||0;d=(c=c/s+t)+d/s,null!=n&&(c=Math.min(c,t+n),d=Math.min(d,t+n)),d<i||(u={schemeIdUri:a,value:o,startTime:c,endTime:d,id:u.attributes.id||"",eventElement:ta(u),eventNode:u},e.i.onTimelineRegionAdded(u))}}function Fh(e,t){return Dn(t=mn(e,t))?hn:e.split("/")[0]}function jh(e,t,n,r){return t=e.i.networkingEngine.request(n,t,r),ei(e.F,t),t.promise}function Hh(){}(n=Ph.prototype).configure=function(e){var t=this.i&&e.dash.updatePeriod!=this.g.dash.updatePeriod&&0<=e.dash.updatePeriod;this.g=e,t&&this.j&&this.j.presentationTimeline.R()&&this.A.hc(),this.h&&this.h.configure(this.g),this.l&&(this.l.Ag(this.g.dash.multiTypeVariantsAllowed&&ne()),this.l.Hg(this.g.dash.useStreamOnceInPeriodFlattening))},n.start=function(e,t){var n,r=this;return I((function(i){if(1==i.g)return r.s=t.isLowLatencyMode(),r.o=[e],r.i=t,b(i,Rh(r),2);if(n=i.h,r.i&&Mh(r,n),!r.i)throw new bt(2,7,7001);return i.return(r.j)}))},n.stop=function(){for(var e=l(Object.values(this.m)),t=e.next();!t.done;t=e.next())(t=t.value).segmentIndex&&t.segmentIndex.release();return this.l&&this.l.release(),this.g=this.i=null,this.o=[],this.j=null,this.m={},this.l=null,null!=this.A&&(this.A.stop(),this.A=null),this.h&&this.h.destroy(),this.F.destroy()},n.update=function(){var e,t=this;return I((function(n){return 1==n.g?(E(n,2),b(n,Rh(t),4)):2!=n.g?T(n,0):(e=A(n),t.i&&e?(t.i.onError(e),void k(n)):n.return())}))},n.onExpirationUpdated=function(){},n.onInitialVariantChosen=function(e){if(this.j&&this.j.presentationTimeline.R()){var t=e.video||e.audio;if(t&&t.segmentIndex){e=this.j.presentationTimeline.Hb();var n=t.segmentIndex.find(e);null!=n&&(t=t.segmentIndex.get(n))&&(this.G=t.endTime-e,Mh(this,0))}}},n.banLocation=function(e){this.h&&this.h.banLocation(e)},F("shaka.dash.DashParser",Ph),Na["application/dash+xml"]=function(){return new Ph},Na["video/vnd.mpeg.dash.mpd"]=function(){return new Ph},F("shaka.dependencies",Hh),Hh.has=function(e){return Kh.has(e)},Hh.add=function(e,t){if(!Gh[e])throw Error(e+" is not supported");e==Vh?ae("mux.js","mux.js is no longer used in Shaka Player."):Kh.set(e,(function(){return t}))};var Vh="muxjs",Gh={Fj:Vh,ISOBoxer:"ISOBoxer"};Hh.Allowed=Gh;var Kh=new Map([["ISOBoxer",function(){return e.ISOBoxer}]]);function zh(e,t,n){this.type=e,this.g=t,this.segments=n||null}function Wh(e,t,n,r){this.id=e,this.name=t,this.attributes=n,this.value=void 0===r?null:r}function Yh(e){var t=(new Set).add("AUDIO").add("VIDEO").add("SUBTITLES").add("PATHWAY-ID").add("GROUP-ID").add("URI");return e.toString(t)}function Zh(e,t){return(e=e.attributes.filter((function(e){return e.name==t}))).length?e[0]:null}function qh(e,t,n){return(e=Zh(e,t))?e.value:n||null}function Xh(e,t){if(!(e=Zh(e,t)))throw new bt(2,4,4023,t);return e.value}function Qh(e,t,n){n=void 0===n?[]:n,this.g=t,this.h=e,this.rb=n}function $h(e,t){this.name=e,this.value=t}function Jh(e,t){return e.filter((function(e){return e.name==t}))}function ey(e,t){return e.filter((function(e){return Xh(e,"TYPE")==t}))}function ty(e,t){for(var n=(e=l(e)).next();!n.done;n=e.next())if((n=n.value).name===t)return n;return null}function ny(e,t,n){return n=void 0===n?0:n,(e=ty(e,t))?Number(e.value):n}function ry(e,t,n){return t?iy(e,[t],n):[]}function iy(e,t,n){if(!t.length)return[];t=ln(e,t),e=[];for(var r=(t=l(t)).next();!r.done;r=t.next()){var i=e,a=i.push,o=r.value;if((r=n)&&r.size){var s=(o=String(o).replace(/%7B/g,"{").replace(/%7D/g,"}")).match(/{\$\w*}/g);if(s)for(var u=(s=l(s)).next();!u.done;u=s.next()){var c=(u=u.value).slice(2,u.length-1),d=r.get(c);if(!d)throw new bt(2,4,4039,c);o=o.replace(u,d)}r=o}else r=o;a.call(i,r)}return e}function ay(e){this.h=e||"",this.g=0}function oy(e){sy(e,/[ \t]+/gm)}function sy(e,t){return t.lastIndex=e.g,t=null==(t=t.exec(e.h))?null:{position:t.index,length:t[0].length,results:t},e.g==e.h.length||null==t||t.position!=e.g?null:(e.g+=t.length,t.results)}function ly(e){return e.g==e.h.length?null:(e=sy(e,/[^ \t\n]*/gm))?e[0]:null}function uy(){this.g=0}function cy(e,t){var n=(t=(t=Wt(t)).replace(/\r\n|\r(?=[^\n]|$)/gm,"\n").trim()).split(/\n+/m);if(!/^#EXTM3U($|[ \t\n])/m.test(n[0]))throw new bt(2,4,4015);t=0;for(var r=!0,i=l(n),a=i.next();!a.done;a=i.next())if(a=a.value,/^#(?!EXT)/m.test(a)||r)r=!1;else{if(a=dy(e,a),--e.g,py.includes(a.name)){t=1;break}"EXT-X-STREAM-INF"==a.name&&(r=!0)}for(i=[],r=!0,a=0;a<n.length;a++){var o=n[a],s=n[a+1];if(/^#(?!EXT)/m.test(o)||r)r=!1;else{if(o=dy(e,o),fy.includes(o.name)){if(1!=t)throw new bt(2,4,4017);o=n.splice(a,n.length-a),n=[],r=[],a=[],s=null;for(var u=(o=l(o)).next();!u.done;u=o.next())u=u.value,/^(#EXT)/.test(u)?(u=dy(e,u),py.includes(u.name)?i.push(u):"EXT-X-MAP"==u.name?s=u:"EXT-X-PART"==u.name?a.push(u):"EXT-X-PRELOAD-HINT"==u.name?"PART"==qh(u,"TYPE")?a.push(u):"MAP"==qh(u,"TYPE")&&(u.name="EXT-X-MAP",s=u):r.push(u)):/^#(?!EXT)/m.test(u)||(u=u.trim(),s&&r.push(s),n.push(new Qh(u,r,a)),r=[],a=[]);return a.length&&(s&&r.push(s),n.push(new Qh("",r,a))),new zh(t,i,n)}i.push(o),"EXT-X-STREAM-INF"==o.name&&(o.attributes.push(new $h("URI",s)),r=!0)}}return new zh(t,i)}function dy(e,t){e=e.g++;var n=t.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!n)throw new bt(2,4,4016,t);t=n[1];var r,i=n[2];if(n=[],i){var a;(a=sy(i=new ay(i),/^([^,=]+)(?:,|$)/g))&&(r=a[1]);for(var o=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;a=sy(i,o);)n.push(new $h(a[1],a[2]||a[3])),oy(i)}return new Wh(e,t,n,r)}Wh.prototype.toString=function(e){var t="#"+this.name,n=this.attributes?this.attributes.filter((function(t){return!e||!e.has(t.name)})).map((function(e){return e.name+"="+(isNaN(Number(e.value))?'"'+e.value+'"':e.value)})):[];return this.value&&n.unshift(this.value),0<n.length&&(t+=":"+n.join(",")),t};var py="EXT-X-TARGETDURATION EXT-X-MEDIA-SEQUENCE EXT-X-DISCONTINUITY-SEQUENCE EXT-X-PLAYLIST-TYPE EXT-X-I-FRAMES-ONLY EXT-X-ENDLIST EXT-X-SERVER-CONTROL EXT-X-SKIP EXT-X-PART-INF".split(" "),fy="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP".split(" ");function hy(){}function yy(e){try{var t=gy(e);return Wr({uri:e,originalUri:e,data:t.data,headers:{"content-type":t.contentType}})}catch(e){return Kr(e)}}function gy(t){var n=t.split(":");if(2>n.length||"data"!=n[0])throw new bt(2,1,1004,t);if(2>(n=n.slice(1).join(":").split(",")).length)throw new bt(2,1,1004,t);var r=n[0];t=e.decodeURIComponent(n.slice(1).join(",")),n=r.split(";"),r=n[0];var i=!1;return 1<n.length&&"base64"==n[n.length-1]&&(i=!0,n.pop()),{data:i?rn(t):qt(t),contentType:r}}function vy(e){var t=Sn(e);return{type:t.split("/")[0],mimeType:t,codecs:e=wn(e),language:null,height:null,width:null,channelCount:null,sampleRate:null,closedCaptions:new Map,Nf:null}}function my(e){for(var t=new Set,n=[],r=(e=l(e)).next();!r.done;r=e.next()){var i=An(r=r.value);t.has(i)||(n.push(r),t.add(i))}return t=fn("audio",n),r=fn("video",n),e=fn(hn,n),r=function(e){if(1>=e.length)return e;var t=e.find((function(e){return e.startsWith("dvh1.")||e.startsWith("dvhe.")}));return t?te('video/mp4; codecs="'+t+'"')?[t]:e.filter((function(e){return e!=t})):e}(r),t=t.concat(r).concat(e),n.length&&!t.length?n:t}function by(){var e=this;this.g=this.i=null,this.A=1,this.o=new Map,this.H=new Map,this.K=new Map,this.K.set("video",new Map),this.K.set("audio",new Map),this.K.set(hn,new Map),this.K.set("image",new Map),this.Ta=new Set,this.h=new Map,this.l=null,this.aa="",this.Ra=new uy,this.I=-1,this.T=1/0,this.ea=this.mb=!1,this.s=new Tt((function(){!function(e){var t,n,r,i,a,o;I((function(s){switch(s.g){case 1:return e.i?(E(s,2),t=Date.now(),b(s,e.update(),4)):s.return();case 4:n=Date.now(),tg(e)&&(r=(n-t)/1e3,e.cb.sample(1,r),i=e.m,a=Math.max(0,i-G(e.cb)),e.s.U(a)),T(s,3);break;case 2:if(o=A(s),!e.i)return s.return();if(e.g.raiseFatalErrorOnManifestUpdateRequestFailure)return e.i.onError(o),s.return();o.severity=1,e.i.onError(o),e.s.U(.1);case 3:if(!e.i)return s.return();e.i.onManifestUpdated(),k(s)}}))}(e)})),this.qa=ug,this.C=null,this.Sa=0,this.m=1/0,this.ta=this.sa=this.L=0,this.N=new Jr,this.F=new Map,this.G=new Map,this.Y=new Map,this.ba=new Map,this.da=new Map,this.ia=new Map,this.pa=new Map,this.lb=this.B=!1,this.cb=new V(5),this.j=null}function ky(e,t){return tg(e)?e.K.get(t.type):t.$d}function Ey(e,t){var n,r,i,a,o,s,c,d,p,f,h,y,g,v,m,E,_,T,A,S,w,C,x,P,R,D,O,L;return I((function(I){if(1==I.g){for(n=[],r=l(t.$()),i=r.next();!i.done;i=r.next())a=i.value,o=new rt(a),s=o.g,t.Gd&&(0<=t.gb&&s.add("_HLS_msn",String(t.gb)),0<=t.hb&&s.add("_HLS_part",String(t.hb))),t.Hd&&s.add("_HLS_skip","YES"),mt(s)&&st(o,s),n.push(o.toString());return b(I,eg(e,n,!0),2)}if(3!=I.g){if(c=I.h,!t.stream.segmentIndex)return I.return();if(1!=(d=cy(e.Ra,c.data)).type)throw new bt(2,4,4017);return(p=c.uri)==c.originalUri||t.$().includes(p)||t.ug.push(p),f=Jh(d.g,"EXT-X-DEFINE"),h=wy(e,f,p),y=t.stream,g=ky(e,t),b(I,Gy(e,d,y.mimeType,t.$,h),3)}v=I.h,m=v.keyIds,E=v.drmInfos,function(e,t){return e.size===t.size&&[].concat(u(e)).every((function(e){return t.has(e)}))}(y.keyIds,m)||(y.keyIds=m,y.drmInfos=E,e.i.newDrmInfo(y)),_=Xy(e,d,y,g,h,t.$,t.type),T=_.segments,(A=_.bandwidth)&&(y.bandwidth=A),y.segmentIndex.kd(T,e.l.qb()),T.length&&(S=ny(d.g,"EXT-X-MEDIA-SEQUENCE",0),C=(w=ty(d.g,"EXT-X-SKIP"))?Number(qh(w,"SKIPPED-SEGMENTS")):0,x=Hy(S,T),P=x.gb,R=x.hb,t.gb=P+C,t.hb=R,D=g.get(S),y.segmentIndex.Ia(D)),O=T[0],t.cc=O.startTime,L=T[T.length-1],t.yb=L.endTime,ty(d.g,"EXT-X-ENDLIST")&&(t.fd=!0),zy(e,d),k(I)}))}function _y(e,t){for(var n=-1==e.I,r=l(t),i=r.next();!i.done;i=r.next()){var a=(i=i.value).stream.segmentIndex,o=ky(e,i);if(a=a.g[0]||null)for(var s=(o=l(o)).next();!s.done;s=o.next()){var u=(s=l(s.value)).next().value;if(s.next().value==a.startTime){n&&(e.I=Math.max(e.I,u)),i.Ee=u;break}}}if(!(0>e.I))for(i=(t=l(t)).next();!i.done;i=t.next())Fy(e,(n=i.value).type)&&(r=n.stream.segmentIndex)&&(0<(i=e.I-n.Ee)&&(r.g.splice(0,i),r=r.g[0]||null)&&(r=-r.startTime,n.stream.segmentIndex.offset(r),Ty(e,n,r)))}function Ty(e,t,n){t.cc+=n,t.yb+=n;for(var r=l(e=ky(e,t)),i=r.next();!i.done;i=r.next()){var a=l(i.value);i=a.next().value,a=a.next().value,e.set(i,a+n)}t.$()}function Ay(e,t,n){var r,i,a,o,s,u,c,d,p,f,h,y,g,v,m,k,E,_,T,A,S;return I((function(w){switch(w.g){case 1:if(r=vy(e.g.hls.mediaPlaylistFullMimeType),!t.segments.length)return w.return(r);if(i=t.segments[0],a=ry(n(),i.h),o=a[0],s=new rt(o),u=s.Ma.split(".").pop(),c=og[u])return w.return(vy(c));if(d=li,p=null,f=Yy(e,t,i.g,n),e.Y.clear(),!f){w.u(2);break}return h=Js(f.$(),f.Yb(),f.Vb(),e.g.retryParameters),b(w,rg(e,h,d,{type:0}),3);case 3:y=w.h,p=y.data;case 2:return g=0,v=null,(m=ty(i.g,"EXT-X-BYTERANGE"))&&(k=l(qy(null,m.value)),g=k.next().value,v=k.next().value),E=Js(a,g,v,e.g.retryParameters),b(w,rg(e,E,d,{type:1}),4);case 4:if(_=w.h,(T=_.headers["content-type"])&&(T=T.split(";")[0].toLowerCase()),"ts"==u||"video/mp2t"==T){var C=_.data,x=ye(C),P=(x=(new Ao).parse(x)).bd();x=x.Xe();var R=[],I=!1,D=!1;switch(P.audio){case"aac":case"aac-loas":R.push("mp4a.40.2"),I=!0;break;case"mp3":R.push("mp4a.40.34"),I=!0;break;case"ac3":R.push("ac-3"),I=!0;break;case"ec3":R.push("ec-3"),I=!0;break;case"opus":R.push("opus"),I=!0}switch(P.video){case"avc":x.Ea?R.push(x.Ea):R.push("avc1.42E01E"),D=!0;break;case"hvc":x.Ea?R.push(x.Ea):R.push("hvc1.1.6.L93.90"),D=!0;break;case"av1":R.push("av01.0.01M.08"),D=!0}if(R.length){if(P=I&&!D,I=new Map,D){(D=new ke("video/mp2t")).i(C);for(var O=(C=l(D.j())).next();!O.done;O=C.next())O=O.value,I.set(O,O);D.g()}x={type:P?"audio":"video",mimeType:"video/mp2t",codecs:R.join(", "),language:null,height:x.height,width:x.width,channelCount:null,sampleRate:null,closedCaptions:I,Nf:null}}else x=null;if(A=x)return w.return(A)}else if(("mp4"==u||"cmfv"==u||"m4s"==u||"fmp4"==u||"video/mp4"==T||"audio/mp4"==T||"video/iso.segment"==T)&&(S=function(e,t){function n(e){return r(e.name)}function r(e){switch(e=e.toLowerCase()){case"avc1":case"avc3":o.push(e+".42E01E"),u=!0;break;case"hev1":case"hvc1":o.push(e+".1.6.L93.90"),u=!0;break;case"dvh1":case"dvhe":o.push(e+".05.04"),u=!0;break;case"vp09":o.push(e+".00.10.08"),u=!0;break;case"av01":o.push(e+".0.01M.08"),u=!0;break;case"mp4a":a.push("mp4a.40.2"),s=!0;break;case"ac-3":case"ec-3":case"opus":case"flac":a.push(e),s=!0}}var i,a=[],o=[],s=!1,u=!1,c=null,d=null,p=null,f=null,h=null,y=null;if((new bi).box("moov",ki).box("trak",ki).O("tkhd",(function(e){e=so(e.reader,e.version),d=String(e.height),p=String(e.width)})).box("mdia",ki).O("mdhd",(function(e){c=ao(e.reader,e.version).language})).box("minf",ki).box("stbl",ki).O("stsd",Ei).box("mp4a",(function(e){var t=e.reader;t.skip(6),t.skip(2),t.skip(8);var r=t.ra();t.skip(2),t.skip(2),t.skip(2),t=t.ra()+t.ra()/65536,f=r,h=t,e.reader.ka()?ki(e):n(e)})).box("esds",(function(e){e=e.reader;for(var t,n,r="mp4a";e.ka();){t=e.P();for(var i=e.P();128&i;)i=e.P();if(3==t)e.ra(),128&(i=e.P())&&e.ra(),64&i&&e.skip(e.P()),32&i&&e.ra();else if(4==t)n=e.P(),e.skip(12);else if(5==t)break}n&&(r+="."+uo(n),5==t&&e.ka()&&(31==(n=(248&(t=e.P()))>>3)&&e.ka()&&(n=32+((7&t)<<3)+((224&e.P())>>5)),r+="."+n)),a.push(r),s=!0})).box("ac-3",n).box("ec-3",n).box("opus",n).box("Opus",n).box("fLaC",n).box("avc1",(function(e){i=e.name,_i(e)})).box("avc3",(function(e){i=e.name,_i(e)})).box("hev1",(function(e){i=e.name,_i(e)})).box("hvc1",(function(e){i=e.name,_i(e)})).box("dva1",(function(e){i=e.name,_i(e)})).box("dvav",(function(e){i=e.name,_i(e)})).box("dvh1",(function(e){i=e.name,_i(e)})).box("dvhe",(function(e){i=e.name,_i(e)})).box("vp09",(function(e){i=e.name,_i(e)})).box("av01",(function(e){i=e.name,_i(e)})).box("avcC",(function(e){var t=i||"";switch(i){case"dvav":t="avc3";break;case"dva1":t="avc1"}(e=e.reader).skip(1),e=t+"."+uo(e.P())+uo(e.P())+uo(e.P()),o.push(e),u=!0})).box("hvcC",(function(e){var t=i||"";switch(i){case"dvh1":t="hvc1";break;case"dvhe":t="hev1"}var n=e.reader;n.skip(1);var r=["","A","B","C"][(e=n.P())>>6],a=31&e,s=n.M(),l=(32&e)>>5?"H":"L";e=[n.P(),n.P(),n.P(),n.P(),n.P(),n.P()],n=n.P();for(var c=0,d=0;32>d&&(c|=1&s,31!=d);d++)c<<=1,s>>=1;for(t=t+"."+r+a+"."+uo(c,!0),t+="."+l+n,r="",a=e.length;a--;)((l=e[a])||r)&&(r="."+l.toString(16).toUpperCase()+r);t+=r,o.push(t),u=!0})).box("dvcC",(function(e){var t=i||"";switch(i){case"hvc1":t="dvh1";break;case"hev1":t="dvhe";break;case"avc1":t="dva1";break;case"avc3":t="dvav"}var n=e.reader;n.skip(2),e=n.P(),n=n.P(),o.push(t+"."+co(e>>1&127)+"."+co(e<<5&32|n>>3&31)),u=!0})).O("vpcC",(function(e){var t=i||"",n=e.reader;e=n.P();var r=n.P();n=n.P()>>4&15,o.push(t+"."+co(e)+"."+co(r)+"."+co(n)),u=!0})).box("av1C",(function(e){var t=i||"",n=e.reader;n.skip(1);var r=(e=n.P())>>>5,a=(64&(n=n.P()))>>6;o.push(t+"."+r+"."+co(31&e)+(n>>>7?"H":"M")+"."+co(2===r&&a?(32&n)>>5?12:10:a?10:8)+"."+((16&n)>>4)+"."+((8&n)>>3)+((4&n)>>2)+(3&n)+"."+co(1)+"."+co(1)+"."+co(1)+".0"),u=!0})).box("enca",Ti).box("encv",_i).box("sinf",ki).box("frma",(function(e){r(e=lo(e.reader).Ea)})).box("colr",(function(e){var t=null,n=(e=e.reader).sb(4),r=String.fromCharCode(n[0]);if(r+=String.fromCharCode(n[1]),r+=String.fromCharCode(n[2]),"nclx"===(r+=String.fromCharCode(n[3])))switch(e.ra(),n=e.ra(),e.ra(),n){case 1:case 6:case 13:case 14:case 15:t="SDR";break;case 16:t="PQ";break;case 18:t="HLG"}y=t})).parse(e||t,!0),!a.length&&!o.length)return null;var g=s&&!u,v=new Map;if(u){var m=new ke("video/mp4");for(e&&m.init(e),m.i(t),t=(e=l(m.j())).next();!t.done;t=e.next())t=t.value,v.set(t,t);m.g()}return{type:g?"audio":"video",mimeType:g?"audio/mp4":"video/mp4",codecs:my(a.concat(o)).join(", "),language:c,height:d,width:p,channelCount:f,sampleRate:h,closedCaptions:v,Nf:y}}(p,_.data)))return w.return(S);return w.return(r)}}))}function Sy(e){if(tg(e)){if(e.qa==dg){for(var t,n=t=1/0,r=l(e.h.values()),i=r.next();!i.done;i=r.next())(i=i.value).stream.segmentIndex&&"text"!=i.stream.type&&(t=Math.min(t,i.yb),n=Math.min(n,i.cc));t-=n,e.g.hls.useSafariBehaviorForLive&&(t=e.l.s),isNaN(e.g.availabilityWindowOverride)||(t=e.g.availabilityWindowOverride),e.l.ke(t)}}else e.l.ab(Ny(e));if(!e.l.o)for(n=(t=l(e.h.values())).next();!n.done;n=t.next())!(n=n.value).stream.segmentIndex||"audio"!=n.type&&"video"!=n.type||(n=n.stream.segmentIndex.get(0))&&n.h&&e.l.Dg(n.h);e.l.Xd()}function wy(e,t,n){n=new rt(n).g;for(var r=new Map,i=(t=l(t)).next();!i.done;i=t.next()){var a=i.value,o=qh(a,"NAME"),s=qh(a,"VALUE");i=qh(a,"QUERYPARAM"),a=qh(a,"IMPORT"),o&&s&&(r.has(o)||r.set(o,s)),i&&(o=n.get(i)[0])&&!r.has(o)&&r.set(i,o),a&&(i=e.o.get(a))&&r.set(a,i)}return r}function Cy(e){e.fullMimeTypes=new Set([mn(e.mimeType,e.codecs)])}function xy(e,t,n,r){for(var i={audio:[],video:[]},a=new Map,o=[],s=!1,c=!1,d=l(t),p=d.next();!p.done;p=d.next()){var f=p.value;p=qh(f,"AUDIO");var h=qh(f,"VIDEO"),y=p||h;y&&(o.includes(y)||o.push(y),(f=qh(f,"PATHWAY-ID"))&&a.set(y,f),p?s=!0:h&&(c=!0))}o.length&&n.length&&function(e,t,n){t=t.filter((function(e){var t=qh(e,"URI")||"";return"SUBTITLES"!=qh(e,"TYPE")&&""!=t}));for(var r={},i=(t=l(t)).next();!i.done;i=t.next()){var a=Yh(i=i.value);r[a]?r[a].push(i):r[a]=[i]}for(var o in r)Ly(e,r[o],n)}(e,d=n.filter((function(e){return o.includes(Xh(e,"GROUP-ID"))})),a),d=(a=o.sort().join(","))&&e.H.has(a)?e.H.get(a):[],s?i.audio.push.apply(i.audio,u(d)):c&&i.video.push.apply(i.video,u(d)),p=!1;var g=t.map((function(e){return Xh(e,"URI")}));if(c=i.audio.find((function(e){return e&&e.$().find((function(e){return g.includes(e)}))})),h=pn("video",s=Py(e,t[0])),(y=pn("audio",s))&&!h?(c="audio",p=0<i.audio.length):!i.audio.length&&!i.video.length&&y&&h?(c="video",s=[[h,y].join()]):i.audio.length&&c?(c="audio",p=!0):c=i.video.length&&!i.audio.length?"audio":"video",!p){var v=f=y=h=p=null;!d.length&&(n=n.find((function(e){var t=qh(e,"URI")||"",n=qh(e,"TYPE");return e=Xh(e,"GROUP-ID"),"SUBTITLES"!=n&&""==t&&o.includes(e)})))&&(p=qh(n,"LANGUAGE"),h=qh(n,"NAME"),y=Ry(n),Dy(n),f=qh(n,"CHARACTERISTICS"),v=Iy(n)),e=function(e,t,n,r,i,a,o,s,u){for(var c=e.A++,d=[],p=l(t),f=p.next();!f.done;f=p.next()){var h=f.value;f=Xh(h,"URI"),h=qh(h,"PATHWAY-ID"),e.j&&h&&zf(e.j,c,h,f),d.push(f)}if(p=d.sort().join(","),e.h.has(p))return e.h.get(p);e:{if(t=qh(t[0],"CLOSED-CAPTIONS"),"video"==r){if(t&&"NONE"!=t){t=e.F.get(t);break e}if(!t&&e.F.size)for(t=l(e.F.keys()).next();!t.done;){t=e.F.get(t.value);break e}}t=null}return n=dn(r,n),r=My(e,c,d,n,r,i,!1,a,o,t,s,!1,u,!1),e.h.set(p,r),r}(e,t,s,c,p,h,y,f,v),a&&(e.stream.groupId=a),d.length||(e.stream.bandwidth=r),i[e.stream.type]=[e]}return i}function Py(e,t){var n=qh(t,"CODECS")||"";return t=qh(t,"SUPPLEMENTAL-CODECS"),e.ea=0<n.length,e.ea||e.g.hls.disableCodecGuessing||(n=[],e.g.disableVideo||n.push(e.g.hls.defaultVideoCodec),e.g.disableAudio||n.push(e.g.hls.defaultAudioCodec),n=n.join(",")),e=n.split(/\s*,\s*/),t&&(t=t.split(/\s*,\s*/).map((function(e){return e.split("/")[0]})),e.push.apply(e,u(t))),my(e)}function Ry(e){return(e=qh(e,"CHANNELS"))?parseInt(e.split("/")[0],10):null}function Iy(e){return(e=qh(e,"SAMPLE-RATE"))?parseInt(e,10):null}function Dy(e){return!!(e=qh(e,"CHANNELS"))&&e.includes("/JOC")}function Oy(e,t,n,r,i,a,o,s,u,c,d){for(var p=l(n),f=p.next();!f.done;f=p.next())Jy(f.value.stream,i,a,o,s,u);for(i=e.g.disableAudio,t.length&&!i||(t=[null]),i=e.g.disableVideo,n.length&&!i||(n=[null]),i=[],a=(t=l(t)).next();!a.done;a=t.next())for(a=a.value,s=(o=l(n)).next();!s.done;s=o.next()){var h=s.value;(s=a?a.stream:null)&&(s.drmInfos=c,s.keyIds=d),(u=h?h.stream:null)&&(u.drmInfos=c,u.keyIds=d),p=a?a.stream.drmInfos:null,f=h?h.stream.drmInfos:null,h=(h=h?h.$().sort().join(","):"")+" - "+(a?a.$().sort().join(","):""),s&&u&&!ma(p,f)||e.Ta.has(h)||(s={id:e.A++,language:s?s.language:"und",disabledUntilTime:0,primary:!!s&&s.primary||!!u&&u.primary,audio:s,video:u,bandwidth:r,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},i.push(s),e.Ta.add(h))}return i}function Ly(e,t,n){for(var r=[],i=[],a=new Map,o=l(t),s=o.next();!s.done;s=o.next()){var u=s.value;s=Xh(u,"URI"),u=Xh(u,"GROUP-ID"),r.push(s),i.push(u),a.set(u,s)}if(o=i.sort().join(","),s=t[0],t="","subtitles"==(u=Xh(s,"TYPE").toLowerCase())&&(u=hn),u==hn)t=qh(s,"CODECS")||"";else for(var c=(i=l(i)).next();!c.done;c=i.next())if(c=c.value,e.G.has(c)){t=e.G.get(c);break}if(i=r.sort().join(","),e.h.has(i))return e.h.get(i);if(c=e.A++,e.j)for(var d=(a=l(a)).next();!d.done;d=a.next()){var p=l(d.value);d=p.next().value,p=p.next().value,(d=n.get(d))&&zf(e.j,c,d,p)}n=qh(s,"LANGUAGE"),a=qh(s,"NAME"),d="YES"==qh(s,"DEFAULT"),p="audio"==u?Ry(s):null;var f="audio"==u&&Dy(s);return(r=My(e,c,r,t,u,n,d,a,p,null,qh(s,"CHARACTERISTICS"),"YES"==qh(s,"FORCED"),s="audio"==u?Iy(s):null,f)).stream&&(r.stream.groupId=o),e.H.has(o)?e.H.get(o).push(r):e.H.set(o,[r]),e.h.set(i,r),r}function My(e,t,n,r,i,a,o,s,u,c,d,p,f,h){function y(t){var n,y,_,T,A,S,w,C,x,P,R,D,O,L,M,N,U;return I((function(I){switch(I.g){case 1:return n=E.$(),b(I,eg(e,E.$(),!0),2);case 2:if(y=I.h,t.aborted)return I.return();if((_=y.uri)==y.originalUri||n.includes(_)||m.push(_),T=cy(e.Ra,y.data),A=void 0,e.ea||!e.g.hls.disableCodecGuessing){I.u(3);break}return b(I,Ay(e,T,g),4);case 4:S=I.h,A=S.mimeType,r=S.codecs;case 3:return w=tg(e),b(I,jy(e,0,T,g,_,r,i,a,o,s,u,c,d,p,f,h,A),5);case 5:if(C=I.h,t.aborted)return I.return();if(x=C.stream,tg(e)&&!w&&Wy(e,T),E.cc=C.cc,E.yb=C.yb,E.Hd=C.Hd,E.Gd=C.Gd,E.fd=C.fd,E.$d=C.$d,E.gb=C.gb,E.hb=C.hb,E.ef=!0,v.segmentIndex=x.segmentIndex,v.encrypted=x.encrypted,v.drmInfos=x.drmInfos,v.keyIds=x.keyIds,v.mimeType=x.mimeType,v.bandwidth=v.bandwidth||x.bandwidth,v.codecs=v.codecs||x.codecs,Cy(v),v.drmInfos.length&&e.i.newDrmInfo(v),i==(P=yn).fa||i==P.S)for(R=l(e.h.values()),D=R.next();!D.done;D=R.next())(O=D.value).ef||O.type!=i||(O.stream.mimeType=x.mimeType,Cy(O.stream));i==P.ma&&(L=x.segmentIndex.get(0))&&L.ca&&(v.mimeType="application/mp4",Cy(v)),function(e){if(!e.C)return!1;for(var t=[],n=[],r=(e=l(e.C.variants)).next();!r.done;r=e.next())(r=r.value).video&&t.push(r.video),r.audio&&n.push(r.audio);return!(0<t.length&&!t.some((function(e){return e.segmentIndex}))||0<n.length&&!n.some((function(e){return e.segmentIndex})))}(e)&&(e.mb?By(e,[E]):(e.mb=!0,M=Array.from(e.h.values()),N=M.filter((function(e){return e.stream.segmentIndex})),By(e,N),Sy(e),0<(U=e.m)&&e.s.U(U))),k(I)}}))}function g(){return e.j&&1<n.length?Wf(e.j,t):m.concat(iy([e.aa],n,e.o))}var v=Vy(e,r,i,a,o,s,u,c,d,p,f,h),m=[],E={stream:v,type:i,ug:m,$:g,cc:0,yb:0,$d:new Map,Hd:!1,Gd:!1,fd:!1,Ee:-1,gb:-1,hb:-1,ef:!1},_=null,T=new AbortController;return v.createSegmentIndex=function(){return _||(T=new AbortController,_=new Promise((function(e){e(y(T.signal))})))},v.closeSegmentIndex=function(){_&&!v.segmentIndex&&T.abort(),v.segmentIndex&&(v.segmentIndex.release(),v.segmentIndex=null),_=null},E}function Ny(e){for(var t=1/0,n=(e=l(e.h.values())).next();!n.done;n=e.next())(n=n.value).stream.segmentIndex&&"text"!=n.stream.type&&(t=Math.min(t,n.yb));return t}function Uy(e,t){for(var n=[],r=(t=l(t)).next();!r.done;r=t.next())(r=r.value).segmentIndex&&r.segmentIndex.qc((function(e){n.push(e)}));e.l.ld(n)}function By(e,t){if(!tg(e))for(var n=Ny(e),r=l(t),i=r.next();!i.done;i=r.next())i.value.stream.segmentIndex.pc(0,n);Uy(e,t.map((function(e){return e.stream}))),e.g.hls.ignoreManifestProgramDateTime?_y(e,t):(function(e,t){if(1/0==e.T)for(var n=(t=l(t)).next();!n.done;n=t.next()){var r=n.value.stream.segmentIndex.g[0]||null;null!=r&&null!=r.h&&(e.T=Math.min(e.T,r.h))}if(1/0!=(t=e.T))for(n=(r=l(e.h.values())).next();!n.done;n=r.next())if(!Fy(e,(n=n.value).type)){var i=n.stream.segmentIndex;if(null!=i){var a=i.g[0]||null;if(null==a.h)W("Missing EXT-X-PROGRAM-DATE-TIME for stream",n.$(),"Expect AV sync issues!");else for(Ty(e,n,a.h-t-a.startTime),i=(n=l(i)).next();!i.done;i=n.next())i.value.Hf(t)}}}(e,t),0<e.g.hls.ignoreManifestProgramDateTimeForTypes.length&&_y(e,t))}function Fy(e,t){return!!e.g.hls.ignoreManifestProgramDateTime||e.g.hls.ignoreManifestProgramDateTimeForTypes.includes(t)}function jy(e,t,n,r,i,a,o,s,l,u,c,d,p,f,h,y,g){var v,m,k,_,S,w,C,x,P,R,D,O,L,M,N,U,B,F,j,H,V,G,K;return I((function(t){switch(t.g){case 1:if(1!=n.type)throw new bt(2,4,4017);v=Jh(n.g,"EXT-X-DEFINE"),m=wy(e,v,i);var z=ty(n.g,"EXT-X-PLAYLIST-TYPE"),W=ty(n.g,"EXT-X-ENDLIST");if(W=z&&"VOD"==z.value||W,z=z&&"EVENT"==z.value&&!W,z=!W&&!z,ng(e,W?ug:z?dg:cg),tg(e)&&zy(e,n),g){t.u(2);break}return b(t,function(e,t,n,r,i,a){var o,s,l,u,c,d,p,f,h,y,g,v,m;return I((function(k){switch(k.g){case 1:return o=li,s=Math.trunc((r.segments.length-1)/2),l=ry(a(),r.segments[s].h,i),u=new rt(l[0]),c=u.Ma.split(".").pop(),d=sg[t],(p=d[c])||(p=og[c])||(p=Qy(t,n))?k.return(p):(h=1,y=ri(l,e.g.retryParameters),E(k,2),y.method="HEAD",b(k,rg(e,y,o,{type:h}),4));case 4:g=k.h,f=g.headers["content-type"],T(k,3);break;case 2:if(!(v=A(k))||1002!=v.code&&1001!=v.code){k.u(3);break}return y.method="GET",b(k,rg(e,y,o,{type:h}),6);case 6:m=k.h,f=m.headers["content-type"];case 3:return f?k.return(f.split(";")[0]):k.return($y(t))}}))}(e,o,a,n,m,r),3);case 3:g=t.h;case 2:return b(t,Gy(e,n,g,r,m),4);case 4:if(k=t.h,_=k.drmInfos,S=k.keyIds,w=k.encrypted,C=k.Vg,w&&!_.length&&!C)throw new bt(2,4,4026);return(x=Vy(e,a,o,s,l,u,c,d,p,f,h,y)).encrypted=w,x.drmInfos=_,x.keyIds=S,x.mimeType=g,Cy(x),P=tg(e)?e.K.get(o):new Map,R=Xy(e,n,x,P,m,r,o),D=R.segments,(O=R.bandwidth)&&(x.bandwidth=O),tg(e)&&zy(e,n),L=D[0].startTime,M=D[D.length-1],N=M.endTime,U=new Cs(D),x.segmentIndex=U,F=!!(B=ty(n.g,"EXT-X-SERVER-CONTROL"))&&null!=Zh(B,"CAN-SKIP-UNTIL"),j=!!B&&null!=Zh(B,"CAN-BLOCK-RELOAD"),H=ny(n.g,"EXT-X-MEDIA-SEQUENCE",0),V=Hy(H,D),G=V.gb,K=V.hb,t.return({stream:x,type:o,ug:[],$:r,cc:L,yb:N,Hd:F,Gd:j,fd:!1,Ee:-1,gb:G,hb:K,$d:P,ef:!1})}}))}function Hy(e,t){e=e+t.length-1;var n=-1;if(!t.length)return{gb:++e,hb:n};var r=(t=t[t.length-1]).g;return t.g.length?(n=r.length-1,r[r.length-1].preload||(e++,n=0),{gb:e,hb:n}):(e++,t.m&&(n=0),{gb:e,hb:n})}function Vy(e,t,n,r,i,a,o,s,u,c,d,p){var f=Qy(n,t)||$y(n),h=[];if(u)for(var y=(u=l(u.split(","))).next();!y.done;y=u.next())h.push(y.value);return u=void 0,y=null,n==hn?u=h.includes("public.accessibility.transcribes-spoken-dialog")&&h.includes("public.accessibility.describes-music-and-sound")?"caption":"subtitle":h.includes("public.accessibility.describes-video")&&(y="visually impaired"),h.length||"subtitle"!==u||h.push("subtitle"),Cy(e={id:e.A++,originalId:a,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:f,codecs:t,kind:n==hn?"subtitle":void 0,encrypted:!1,drmInfos:[],keyIds:new Set,language:Gn(r||"und"),originalLanguage:r,label:a,type:n,primary:i,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:h,forced:c,channelsCount:o,audioSamplingRate:d,spatialAudio:p,closedCaptions:s,hdr:void 0,videoLayout:void 0,tilesLayout:void 0,accessibilityPurpose:y,external:!1,fastSwitching:!1,fullMimeTypes:new Set}),e}function Gy(e,t,n,r,i){var a,o,s,u,c,d,p,f,h,y,g,v,m,k,E,_,T,A,S,w,C,x,P,R,D,O,L,M;return I((function(I){switch(I.g){case 1:if(a=new Map,t.segments)for(o=l(t.segments),s=o.next();!s.done;s=o.next())if(u=s.value,c=Jh(u.g,"EXT-X-KEY"),d=null,c.length)for(d=Yy(e,t,u.g,r,i),p=l(c),f=p.next();!f.done;f=p.next())h=f.value,a.set(h,d);g=y=!1,v=[],m=new Set,k=l(a),E=k.next();case 2:if(E.done){I.u(4);break}if(_=E.value,T=l(_),A=T.next().value,S=T.next().value,C=S,"NONE"==(x=Xh(w=A,"METHOD"))){I.u(3);break}if(y=!0,P=qh(w,"KEYFORMAT")||"identity",R=null,ig(x)){g=!0,I.u(3);break}if("identity"!=P){R=(D=lg[P])?D(w,n):null,I.u(6);break}return b(I,ag(e,w,n,r,C,i),8);case 8:R=I.h;case 6:if(R){if(R.keyIds)for(O=l(R.keyIds),L=O.next();!L.done;L=O.next())M=L.value,m.add(M);v.push(R)}case 3:E=k.next(),I.u(2);break;case 4:return I.return({drmInfos:v,keyIds:m,encrypted:y,Vg:g})}}))}function Ky(t,n,r,i,a){if(!e.crypto||!e.crypto.subtle)throw Y("Web Crypto API is not available to decrypt AES. (Web Crypto only exists in secure origins like https)"),new bt(2,4,4042);var o=0,s=qh(n,"IV","");if(s){var l=an(s.substr(2));if(16!=l.byteLength)throw new bt(2,4,4048)}else o=ny(r.g,"EXT-X-MEDIA-SEQUENCE",0);if(r=n.toString()+"-"+o,!t.ba.has(r)){var u={bitsKey:128,blockCipherMode:"CBC",iv:l,firstMediaSequenceNumber:o};switch(Xh(n,"METHOD")){case"AES-256":u.bitsKey=256;break;case"AES-256-CTR":u.bitsKey=256,u.blockCipherMode="CTR"}u.fetchKey=function(){var r,o,s,l,c,d,p;return I((function(f){if(1==f.g)return r=ry(i(),Xh(n,"URI"),a),o=r.sort().join(""),t.da.has(o)||(s=ri(r,t.g.retryParameters),l=rg(t,s,6),t.da.set(o,l)),b(f,t.da.get(o),2);if(3!=f.g){if(!(c=f.h).data||c.data.byteLength!=u.bitsKey/8)throw new bt(2,4,4049);return d={name:"CTR"==u.blockCipherMode?"AES-CTR":"AES-CBC",length:u.bitsKey},p=u,b(f,e.crypto.subtle.importKey("raw",c.data,d,!0,["decrypt"]),3)}p.cryptoKey=f.h,u.fetchKey=void 0,k(f)}))},t.ba.set(r,u)}return t.ba.get(r)}function zy(e,t){var n=1/0,r=t.segments;if(r.length)for(var i=r.length-1;0<=i;){var a=ty(r[i].g,"EXTINF");if(a){n=Number(a.value.split(",")[0]);break}i--}if(!(r=ty(t.g,"EXT-X-TARGETDURATION")))throw new bt(2,4,4024,"EXT-X-TARGETDURATION");r=Number(r.value),(i=ty(t.g,"EXT-X-PART-INF"))&&(e.L=Number(Xh(i,"PART-TARGET"))),t=ty(t.g,"EXT-X-SERVER-CONTROL"),e.B&&e.L?(e.m=e.lb?5*e.L<=n?Math.min(e.L,e.m):Math.min(n,e.m):Math.min(e.L,e.m),e.ta=t?Number(Xh(t,"PART-HOLD-BACK")):0):(e.m=Math.min(n,e.m),n=t?Zh(t,"HOLD-BACK"):null,e.sa=n?Number(n.value):0),e.Sa=Math.max(r,e.Sa)}function Wy(e,t){if(e.g.defaultPresentationDelay)t=e.g.defaultPresentationDelay;else if(e.ta)t=e.ta;else if(e.sa)t=e.sa;else{t=t.segments.length;var n=e.g.hls.liveSegmentsDelay;n>t-2&&(n=Math.max(1,t-2)),t=e.Sa*n}e.l.Eg(0),e.l.Df(t),e.l.Bc(!1)}function Yy(e,t,n,r,i){var a=ty(n,"EXT-X-MAP");if(!a)return null;var o=Xh(a,"URI"),s=ry(r(),o,i);if(o=[s.toString(),qh(a,"BYTERANGE","")].join("-"),!e.Y.has(o)){for(var u=void 0,c=null,d=(n=l(n)).next();!d.done;d=n.next())"EXT-X-KEY"==(d=d.value).name?ig(Xh(d,"METHOD"))&&d.id<a.id&&(u=Ky(e,d,t,r,i)):"EXT-X-BYTERANGE"==d.name&&d.id<a.id&&(c=d);t=function(e,t,n,r){var i=0,a=null;return t=qh(t,"BYTERANGE"),!t&&n&&(t=n.value),t&&(i=t.split("@"),a=Number(i[0]),i=Number(i[1]),a=i+a-1,r&&(n=a+1-i,n%16&&(a+=16-n%16))),new ja((function(){return e}),i,a,null,null,null,r)}(s,a,c,u),e.Y.set(o,t)}return e.Y.get(o)}function Zy(t,n,r,i,a,o,s,u,c){var d=i.g,p=ty(d,"EXTINF"),f=0,h=0,y=null;i.rb.length&&!t.B&&Y("Low-latency HLS live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.");var g=null;if(!t.g.hls.ignoreManifestProgramDateTime){var v=ty(d,"EXT-X-PROGRAM-DATE-TIME");v&&v.value&&(g=Wi(v.value))}var m=Ka;if(ty(d,"EXT-X-GAP")&&(m=2),!p){if(0==i.rb.length)throw new bt(2,4,4024,"EXTINF");if(!t.B)return null}var b=[];v=!1;var k=null,E=!1,_=!1;if(t.B&&i.rb.length){f=("video/mp4"==s.mimeType||"audio/mp4"==s.mimeType)&&e.ReadableStream&&t.g.hls.allowLowLatencyByteRangeOptimization;for(var T=g,A={},S=0;S<i.rb.length;A={Nc:A.Nc,yd:A.yd},S++){var w=i.rb[S],C=0==S?r:b[b.length-1],x=0==S?a:C.endTime,P=Number(qh(w,"DURATION"))||t.L;if(P){var R=x+P,I=0,D=null;if("EXT-X-PRELOAD-HINT"==w.name?(I=(I=qh(w,"BYTERANGE-START"))?Number(I):0,(C=qh(w,"BYTERANGE-LENGTH"))?D=I+Number(C)-1:I&&(D=Number.MAX_SAFE_INTEGER)):(I=(D=l(qy(C,I=qh(w,"BYTERANGE")))).next().value,D=D.next().value),A.yd=qh(w,"URI"),A.yd){C=Ka,"YES"==qh(w,"GAP")&&(C=2,E=!0),A.Nc=null;var O=function(e){return function(){return null==e.Nc&&(e.Nc=ry(u(),e.yd,o)),e.Nc}}(A);f&&0<=I&&null!=D&&(k=O,v=!0),x=new Va(x,R,O,I,D,n,0,0,1/0,[],"",null,T,C,c),"EXT-X-PRELOAD-HINT"==w.name&&(x.ff(),_=!0),"YES"!=qh(w,"INDEPENDENT")&&0<S&&x.Zd(),b.push(x),T&&(T+=P)}}}}if(p){if(0==(p=Number(p.value.split(",")[0])))return null;f=a+p}else{if(!b.length)return null;f=b[b.length-1].endTime}v&&(E||0!=b[0].Aa?(v=!1,k=null):b=[]),(p=ty(d,"EXT-X-BYTERANGE"))?(h=(y=l(qy(r,p.value))).next().value,y=y.next().value):b.length&&(h=b[0].Aa,y=b[b.length-1].ja),r="",p=null,"image"==s.type&&(r="1x1",s=ty(d,"EXT-X-TILES"))&&(r=Xh(s,"LAYOUT"),(s=qh(s,"DURATION"))&&(p=Number(s)));var L=null;return n=new Va(a,f,(function(){return k?k():(null==L&&(L=ry(u(),i.h,o)),L||[])}),h,y,n,0,0,1/0,b,r,p,g,m,c,0<b.length&&!!i.h),v&&(t.lb=!0,n.ng(),_&&n.ff()),n}function qy(e,t){var n=0,r=null;return t&&(n=t.split("@"),t=Number(n[0]),r=(n=n[1]?Number(n[1]):e.ja+1)+t-1),[n,r]}function Xy(e,t,n,r,i,a,o){var s=t.segments,u=void 0,c=ny(t.g,"EXT-X-DISCONTINUITY-SEQUENCE",0),d=ny(t.g,"EXT-X-MEDIA-SEQUENCE",0),p=ty(t.g,"EXT-X-SKIP"),f=p?Number(qh(p,"SKIPPED-SEGMENTS")):0,h=d+f,y=0;tg(e)&&r.has(h)&&(y=r.get(h)),0===y&&e.qa==dg&&0<r.size&&!r.has(h)&&(y=e.l.qb());var g=[],v=null;p=[];for(var m=0;m<s.length;m++){var b=s[m],k=0==m?y:v.endTime;h=d+f+m,ty(b.g,"EXT-X-DISCONTINUITY")&&c++;for(var E=l(b.g),_=E.next();!_.done;_=E.next())"EXT-X-KEY"==(_=_.value).name&&(u=ig(Xh(_,"METHOD"))?Ky(e,_,t,a,i):void 0);r.set(h,k),E=Yy(e,t,b.g,a,i),!e.B&&e.i.isAutoLowLatencyMode()&&(e.i.enableLowLatencyMode(),e.B=e.i.isLowLatencyMode()),(k=Zy(e,E,v,b,k,i,n,a,u))&&((v=ny(b.g,"EXT-X-BITRATE"))?p.push({bitrate:v,duration:k.endTime-k.startTime}):p.length&&((v=p.pop()).duration+=k.endTime-k.startTime,p.push(v)),v=k,k.j=c,Fy(e,o)&&null!=e.I&&h<e.I||g.push(k))}if(t=void 0,p.length&&(t=p.reduce((function(e,t){return e+t.duration}),0),t=Math.round(p.reduce((function(e,t){return e+t.bitrate*t.duration}),0)/t*1e3)),p=g.some((function(e){return null!=e.h})))for(n={},r=0;r<g.length;n={Gc:n.Gc,Fc:n.Fc,td:n.td,Cb:n.Cb,Cc:n.Cc},r++)if(n.Cb=g[r],null==n.Cb.h)for(n.Fc=0,n.Gc=r,i=function(e){return function(){var t=g[e.Gc];if(t){if(null!=t.h)return t.h+e.Fc;e.Fc-=t.endTime-t.startTime,e.Gc+=1}return null}}(n),n.Cc=0,n.td=r,a=function(e){return function(){var t=g[e.td];if(t){if(t!=e.Cb&&(e.Cc+=t.endTime-t.startTime),null!=t.h)return t.h+e.Cc;--e.td}return null}}(n);null==n.Cb.h;)n.Cb.h=a(),null==n.Cb.h&&(n.Cb.h=i());if(p)for(r=(n=l(g)).next();!r.done;r=n.next())for(r=(i=r.value).h,a=(i=l(i.g)).next();!a.done;a=i.next())(a=a.value).h=r,r+=a.endTime-a.startTime;if(n=e.T,p&&1/0!=n&&!Fy(e,o))for(r=(e=l(g)).next();!r.done;r=e.next())r.value.Hf(n);return{segments:g,bandwidth:t}}function Qy(e,t){if(e==hn){if("vtt"==t||"wvtt"==t)return"text/vtt";if(t&&""!==t)return"application/mp4"}return"image"!=e||t&&"jpeg"!=t?"audio"==e&&"mp4a.40.34"==t?"audio/mpeg":"mjpg"==t?"application/mp4":null:"image/jpeg"}function $y(e){return e==hn?"text/vtt":sg[e].mp4}function Jy(e,t,n,r,i,a){e&&(e.width=Number(t)||void 0,e.height=Number(n)||void 0,e.frameRate=Number(r)||void 0,e.hdr=i||void 0,e.videoLayout=a||void 0)}function eg(e,t,n){return rg(e,ri(t,e.g.retryParameters),0,{type:n?2:3})}function tg(e){return e.qa!=ug}function ng(e,t){e.qa=t,e.l&&e.l.Bc(!tg(e)),tg(e)||e.s.stop()}function rg(e,t,n,r){if(!e.N)throw new bt(2,7,7001);return t=e.i.networkingEngine.request(n,t,r),ei(e.N,t),t.promise}function ig(e){return"AES-128"==e||"AES-256"==e||"AES-256-CTR"==e}function ag(t,n,r,i,a,o){var s,l,u,c,d,p,f,h,y,g,v,m,k;return I((function(E){switch(E.g){case 1:if("video/mp2t"==r)throw new bt(2,4,4040);if(e.shakaMediaKeysPolyfill)throw new bt(2,4,4041);if(s=Xh(n,"METHOD"),!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(s))return E.return(null);if((l=ry(i(),Xh(n,"URI"),o))[0].startsWith("data:text/plain;base64,")){u=on(rn(l[0].split("data:text/plain;base64,").pop())),E.u(2);break}return c=l.sort().join(""),t.ia.has(c)||(d=ri(l,t.g.retryParameters),p=rg(t,d,6),t.ia.set(c,p)),b(E,t.ia.get(c),3);case 3:f=E.h,u=on(f.data);case 2:if(h="00000000000000000000000000000000",!a){E.u(4);break}if(t.pa.has(a)){y=t.pa.get(a),E.u(5);break}return g=Js(a.$(),a.Yb(),a.Vb(),t.g.retryParameters),b(E,rg(t,g,li,{type:0}),6);case 6:v=E.h,y=function(e){var t=null;return(new bi).box("moov",ki).box("trak",ki).box("mdia",ki).box("minf",ki).box("stbl",ki).O("stsd",Ei).box("encv",_i).box("enca",Ti).box("sinf",ki).box("schi",ki).O("tenc",(function(e){(e=e.reader).P(),e.P(),e.P(),e.P(),t=on(e.sb(16))})).parse(e,!0),t}(v.data),t.pa.set(a,y);case 5:y&&(h=y);case 4:return(m=new Map).set(h,u),k="cenc","SAMPLE-AES"==s&&(k="cbcs"),E.return(cn(m,k))}}))}F("shaka.net.DataUriPlugin",hy),hy.parse=yy,ni("data",yy),(n=by.prototype).configure=function(e){this.g=e,this.j&&this.j.configure(this.g)},n.start=function(e,t){var n,r=this;return I((function(i){return 1==i.g?(r.i=t,r.B=t.isLowLatencyMode(),b(i,eg(r,[e]),2)):3!=i.g?(n=i.h,r.aa=n.uri,b(i,function(e,t,n){var r,i,a,o,s,c,d,p,f,h,y,g,v,m,k,_,T,S,w,C,x,P,R,D,O,L,M,N,U,B,F,j,H,V,G,K;return I((function(z){switch(z.g){case 1:return r=cy(e.Ra,t),i=Jh(r.g,"EXT-X-DEFINE"),a=[],o=[],s=[],e.l=new ss(null,0),e.l.Bc(!0),c=function(){return[n]},1==r.type?b(z,Ay(e,r,c),7):(function(e,t){for(var n=new rt(e.aa).g,r=(t=l(t)).next();!r.done;r=t.next()){var i=r.value;r=qh(i,"NAME");var a=qh(i,"VALUE");i=qh(i,"QUERYPARAM"),r&&a&&(e.o.has(r)||e.o.set(r,a)),i&&(r=n.get(i)[0])&&!e.o.has(r)&&e.o.set(i,r)}}(e,i),d=Jh(r.g,"EXT-X-MEDIA"),p=Jh(r.g,"EXT-X-STREAM-INF"),f=Jh(r.g,"EXT-X-IMAGE-STREAM-INF"),h=Jh(r.g,"EXT-X-I-FRAME-STREAM-INF"),y=Jh(r.g,"EXT-X-SESSION-KEY"),g=Jh(r.g,"EXT-X-SESSION-DATA"),v=Jh(r.g,"EXT-X-CONTENT-STEERING"),function(e,t){for(var n=(t=l(t)).next();!n.done;n=t.next()){var r=n.value,i=qh(r,"DATA-ID");n=qh(r,"URI");var a=qh(r,"LANGUAGE");r=qh(r,"VALUE"),i=(new Map).set("id",i),n&&i.set("uri",ry([e.aa],n,e.o)[0]),a&&i.set("language",a),r&&i.set("value",r),n=new qr("sessiondata",i),e.i&&e.i.onEvent(n)}}(e,g),b(z,function(e,t){var n,r,i,a,o,s;return I((function(u){if(!e.i||!e.g)return u.return();for(r=l(t),i=r.next();!i.done;i=r.next())if(a=i.value,o=qh(a,"PATHWAY-ID"),s=qh(a,"SERVER-URI"),o&&s){e.j=new Vf(e.i),e.j.configure(e.g),e.j.i=[e.aa],e.j.setManifestType("HLS"),e.j.h=o,n=Gf(e.j,s);break}return b(u,n,0)}))}(e,v),4));case 4:return function(e,t){for(var n=(t=l(t)).next();!n.done;n=t.next()){var r=n.value,i=qh(r,"AUDIO");n=qh(r,"VIDEO");var a=qh(r,"SUBTITLES");if(r=Py(e,r),a){var o=pn(hn,r);e.G.set(a,o),Ae(r,o)}i&&((a=pn("audio",r))||(a=e.g.hls.defaultAudioCodec),e.G.set(i,a)),n&&((i=pn("video",r))||(i=e.g.hls.defaultVideoCodec),e.G.set(n,i))}}(e,p),function(e,t){for(var n=(t=l(t=ey(t,"CLOSED-CAPTIONS"))).next();!n.done;n=t.next()){var r=n.value,i=qh(r,"LANGUAGE");n=Gn(i||"und"),i||(i=qh(r,"NAME"))&&(n=i),i=Xh(r,"GROUP-ID"),r=Xh(r,"INSTREAM-ID").replace("SERVICE","svc"),e.F.get(i)||e.F.set(i,new Map),e.F.get(i).set(r,n)}}(e,d),b(z,function(e,t,n,r,i,a){var o,s,c,d,p,f,h,y,g,v,m,k,E,_,T,A,S,w,C,x,P,R,D,O,L,M,N,U,B,F,j;return I((function(I){switch(I.g){case 1:if(o=[],s=new Set,!(0<n.length)){I.u(2);break}c=l(n),d=c.next();case 3:if(d.done){I.u(2);break}if(p=d.value,f=Xh(p,"METHOD"),h=qh(p,"KEYFORMAT")||"identity",y=null,"NONE"==f||ig(f)){I.u(4);break}if("identity"!=h){y=(g=lg[h])?g(p,""):null,I.u(6);break}return b(I,ag(e,p,"",i,null,a),8);case 8:y=I.h;case 6:if(y){if(y.keyIds)for(v=l(y.keyIds),m=v.next();!m.done;m=v.next())k=m.value,s.add(k);o.push(y)}case 4:d=c.next(),I.u(3);break;case 2:for(E={},_=l(t),T=_.next();!T.done;T=_.next())A=T.value,S=Yh(A),E[S]?E[S].push(A):E[S]=[A];for(C in w=[],E)x=E[C],P=x[0],R=qh(P,"FRAME-RATE"),D=Number(qh(P,"AVERAGE-BANDWIDTH"))||Number(Xh(P,"BANDWIDTH")),O=qh(P,"RESOLUTION"),L=l(O?O.split("x"):[null,null]),M=L.next().value,N=L.next().value,U=qh(P,"VIDEO-RANGE"),(B=qh(P,"REQ-VIDEO-LAYOUT"))&&B.includes(",")&&(F=B.split(",").filter((function(e){return"CH-STEREO"==e||"CH-MONO"==e})),B=F[0]),B=B||"CH-MONO",j=xy(e,x,r,D),w.push.apply(w,u(Oy(e,j.audio,j.video,D,M,N,R,U,B,o,s)));return I.return(w.filter((function(e){return null!=e})))}}))}(e,p,y,d,c,e.o),5);case 5:return a=z.h,o=function(e,t){var n=ey(t,"SUBTITLES");t=n.map((function(t){if(e.g.disableText)return null;try{return Ly(e,[t],new Map).stream}catch(t){if(e.g.hls.ignoreTextStreamFailures)return null;throw t}}));for(var r=(n=l(n)).next();!r.done;r=n.next()){var i=Xh(r.value,"GROUP-ID");if((r=e.G.get(i))&&(i=e.H.get(i)))for(var a=(i=l(i)).next();!a.done;a=i.next())(a=a.value).stream.codecs=r,a.stream.mimeType=Qy(hn,r)||$y(hn),Cy(a.stream)}return t.filter((function(e){return e}))}(e,d),b(z,function(e,t,n){var r,i;return I((function(a){return 1==a.g?(r=t.map((function(t){var n,r;return I((function(i){if(1==i.g)return e.g.disableThumbnails?i.return(null):(E(i,2),b(i,function(e,t){var n,r,i,a,o,s,l,u,c,d;return I((function(p){return 1==p.g?(n=Xh(t,"URI"),r=qh(t,"CODECS","jpeg")||"",e.h.has(n)?p.return(e.h.get(n)):(i=qh(t,"LANGUAGE"),a=qh(t,"NAME"),o=qh(t,"CHARACTERISTICS"),s=My(e,e.A++,[n],r,"image",i,!1,a,null,null,o,!1,null,!1),(l=qh(t,"RESOLUTION"))?b(p,s.stream.createSegmentIndex(),3):p.u(2))):(2!=p.g&&(u=s.stream.segmentIndex.get(0),c=u.tilesLayout)&&(s.stream.width=Number(l.split("x")[0])*Number(c.split("x")[0]),s.stream.height=Number(l.split("x")[1])*Number(c.split("x")[1])),(d=qh(t,"BANDWIDTH"))&&(s.stream.bandwidth=Number(d)),e.h.set(n,s),p.return(s))}))}(e,t),4));if(2!=i.g)return n=i.h,i.return(n.stream);if(r=A(i),e.g.hls.ignoreImageStreamFailures)return i.return(null);throw r}))})).concat(n.map((function(t){if(e.g.disableThumbnails)return null;try{var n=Xh(t,"URI"),r=qh(t,"CODECS")||"";if(e.h.has(n))var i=e.h.get(n);else{var a=qh(t,"LANGUAGE"),o=qh(t,"NAME"),s=qh(t,"CHARACTERISTICS"),u=My(e,e.A++,[n],r,"image",a,!1,o,null,null,s,!1,null,!1),c=qh(t,"RESOLUTION"),d=l(c?c.split("x"):[null,null]),p=d.next().value,f=d.next().value;u.stream.width=Number(p)||void 0,u.stream.height=Number(f)||void 0;var h=qh(t,"BANDWIDTH");h&&(u.stream.bandwidth=Number(h)),e.h.set(n,u),i=u}return"mjpg"!==(t=i).stream.codecs?null:t.stream}catch(t){if(e.g.hls.ignoreImageStreamFailures)return null;throw t}}))),b(a,Promise.all(r),2)):(i=a.h,a.return(i.filter((function(e){return e}))))}))}(e,f,h),6);case 6:s=z.h,z.u(3);break;case 7:return m=z.h,k=m.type,_=m.mimeType,T=m.codecs,S=m.language,w=m.height,C=m.width,x=m.channelCount,P=m.sampleRate,R=m.closedCaptions,D=m.Nf,b(z,jy(e,e.A++,r,c,n,T,k,S,!0,"Media Playlist",x,R,null,!1,P,!1,_),8);case 8:O=z.h,e.h.set(n,O),"video"==k&&Jy(O.stream,C,w,null,D,null),a.push({id:0,language:Gn(S||"und"),disabledUntilTime:0,primary:!0,audio:"audio"==k?O.stream:null,video:"video"==k?O.stream:null,bandwidth:O.stream.bandwidth||0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!e.i)throw new bt(2,7,7001);if(1==r.type&&(tg(e)&&(Wy(e,r),L=e.m,e.s.U(L)),M=Array.from(e.h.values()),By(e,M),Sy(e)),e.C={presentationTimeline:e.l,variants:a,textStreams:o,imageStreams:s,offlineSessionIds:[],minBufferTime:0,sequenceMode:e.g.hls.sequenceMode,ignoreManifestTimestampsInSegmentsMode:e.g.hls.ignoreManifestTimestampsInSegmentsMode,type:"HLS",serviceDescription:null},e.ea||!e.g.hls.disableCodecGuessing){z.u(9);break}for(N=[],U=l(e.C.variants),B=U.next();!B.done;B=U.next())(F=B.value).audio&&""===F.audio.codecs&&N.push(F.audio.createSegmentIndex()),F.video&&""===F.video.codecs&&N.push(F.video.createSegmentIndex());return b(z,Promise.all(N),9);case 9:if(e.i.makeTextStreamsForClosedCaptions(e.C),1==a.length){for(j=[],H=a[0],V=l([H.video,H.audio]),G=V.next();!G.done;G=V.next())(K=G.value)&&!K.segmentIndex&&j.push(K.createSegmentIndex());if(0<j.length)return b(z,Promise.all(j),0)}z.u(0)}}))}(r,n.data,e),3)):i.return(r.C)}))},n.stop=function(){this.s&&(this.s.stop(),this.s=null);var e=[];return this.N&&(e.push(this.N.destroy()),this.N=null),this.g=this.i=null,this.Ta.clear(),this.C=null,this.h.clear(),this.H.clear(),this.G.clear(),this.o.clear(),this.Y.clear(),this.ba.clear(),this.da.clear(),this.ia.clear(),this.pa.clear(),this.j&&this.j.destroy(),Promise.all(e)},n.update=function(){var e,t,n,r,i,a,o,s,c=this;return I((function(d){if(1==d.g){if(!tg(c))return d.return();for(e=[],t=Array.from(c.h.values()),c.m=1/0,n=t.filter((function(e){return e.stream.segmentIndex})),r=l(n),i=r.next();!i.done;i=r.next())a=i.value,e.push(Ey(c,a));return b(d,Promise.all(e),2)}Uy(c,n.map((function(e){return e.stream}))),o=n.some((function(e){return 0==e.fd})),n.length&&!o&&(ng(c,pg.Rg),s=n.map((function(e){return e.yb})),c.l.ab(Math.min.apply(Math,u(s))),c.i.updateDuration()),o&&Sy(c),k(d)}))},n.onExpirationUpdated=function(){},n.onInitialVariantChosen=function(){},n.banLocation=function(e){this.j&&this.j.banLocation(e)},F("shaka.hls.HlsParser",by);var og={aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},sg={audio:{mp4:"audio/mp4",mp4a:"audio/mp4",m4s:"audio/mp4",m4i:"audio/mp4",m4a:"audio/mp4",m4f:"audio/mp4",cmfa:"audio/mp4",ts:"video/mp2t",tsa:"video/mp2t"},video:{mp4:"video/mp4",mp4v:"video/mp4",m4s:"video/mp4",m4i:"video/mp4",m4v:"video/mp4",m4f:"video/mp4",cmfv:"video/mp4",ts:"video/mp2t",tsv:"video/mp2t"},text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",m4f:"application/mp4",cmft:"application/mp4",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml"},image:{jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}},lg={"com.apple.streamingkeydelivery":function(t,n){if("video/mp2t"==n)throw new bt(2,4,4040);if(e.shakaMediaKeysPolyfill)throw new bt(2,4,4041);return t=Xh(t,"METHOD"),["SAMPLE-AES","SAMPLE-AES-CTR"].includes(t)?(n="cenc","SAMPLE-AES"==t&&(n="cbcs"),un("com.apple.fps",n,[{initDataType:"sinf",initData:new Uint8Array(0),keyId:null}])):null},"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(e){var t=Xh(e,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(t))return null;var n="cenc";return"SAMPLE-AES"==t&&(n="cbcs"),n=un("com.widevine.alpha",n,[{initDataType:"cenc",initData:t=ye((t=gy(t=Xh(e,"URI"))).data)}]),(e=qh(e,"KEYID"))&&(n.keyIds=new Set([e.toLowerCase().substr(2)])),n},"com.microsoft.playready":function(e){var t=Xh(e,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(t))return null;var n="cenc";return"SAMPLE-AES"==t&&(n="cbcs"),un("com.microsoft.playready",n,[{initDataType:"cenc",initData:e=Ii(e=ye((e=gy(e=Xh(e,"URI"))).data),t=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]),new Set,0)}])}},ug="VOD",cg="EVENT",dg="LIVE",pg={Rg:ug,Qi:cg,Yi:dg};function fg(e){if(e=hg(e))e:{for(var t=(e=l(Fi(e,"DATA"))).next();!t.done;t=e.next())if(t=ji(t.value,"LA_URL")){e=Ui(t);break e}e=""}else e="";return e}function hg(e){return(e=function(e){var t=0,n=ve(e),r=n.getUint32(t,!0);if(r!=e.byteLength)return[];e:{for(e=t+6,t=[];e<n.byteLength-1;){r=n.getUint16(e,!0),e+=2;var i=n.getUint16(e,!0);if(e+=2,0!=(1&i)||i+e>n.byteLength){n=[];break e}var a=ye(n,e,i);t.push({type:r,value:a}),e+=i}n=t}return n}(e=rn(Ui(e))).filter((function(e){return e.type===yg}))[0])&&(e=Oi(e=Yt(e.value,!0),"WRMHEADER"))?e:null}Na["application/x-mpegurl"]=function(){return new by},Na["application/vnd.apple.mpegurl"]=function(){return new by};var yg=1,gg=(new Map).set("com.microsoft.playready",fg).set("com.microsoft.playready.recommendation",fg).set("com.microsoft.playready.software",fg).set("com.microsoft.playready.hardware",fg);function vg(e){if(!xg){xg=!0;var t=new Uint8Array([105,115,111,109]),n=new Uint8Array([97,118,99,49]),r=new Uint8Array([0,0,0,1]);jg=Cg("ftyp",t,r,t,n),t=Cg("dref",Hg),Vg=Cg("dinf",t)}this.g=e}function mg(e){for(var t=[],n=l(e.g),r=n.next();!r.done;r=n.next()){var i=t,a=i.push,o=r.value;r=Cg;var s=o.id+1,c=o.stream.width||0,d=o.stream.height||0;"audio"==o.type&&(d=c=0);var p=o.duration*o.timescale,f=Math.floor(p/(Pg+1));switch(p=Math.floor(p%(Pg+1)),s=Cg("tkhd",s=new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(u(Sg(s,4)),[0,0,0,0],u(Sg(f,4)),u(Sg(p,4)),[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0],u(Sg(c,2)),[0,0],u(Sg(d,2)),[0,0]))),c=Cg,f=o.duration*o.timescale,d=Math.floor(f/(Pg+1)),f=Math.floor(f%(Pg+1)),p=(p=o.stream.language).charCodeAt(0)-96<<10|p.charCodeAt(1)-96<<5|p.charCodeAt(2)-96,d=Cg("mdhd",d=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(u(Sg(o.timescale,4)),u(Sg(d,4)),u(Sg(f,4)),u(Sg(p,2)),[0,0]))),f=o,p=new Uint8Array([]),f.type){case"video":p=Ig;break;case"audio":p=Dg}f=Cg("hdlr",p);e:{switch(o.type){case"video":o=Cg("minf",Cg("vmhd",Ug),Vg,bg(o));break e;case"audio":o=Cg("minf",Cg("smhd",Bg),Vg,bg(o));break e}o=new Uint8Array([])}r=r("trak",s,o=c("mdia",d,f,o)),a.call(i,r)}for(t=sn.apply(en,u(t)),n=Cg,r=(a=e.g[0]).duration*a.timescale,i=Math.floor(r/(Pg+1)),r=Math.floor(r%(Pg+1)),i=Cg("mvhd",i=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(u(Sg(a.timescale,4)),u(Sg(i,4)),u(Sg(r,4)),[0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]))),r=[],c=(e=l(e.g)).next();!c.done;c=e.next())s=(o=r).push,c=Cg("trex",c=new Uint8Array([0,0,0,0].concat(u(Sg(c.value.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))),s.call(o,c);if(e=Cg("mvex",e=sn.apply(en,u(r))),r=[],a.encrypted){for(o=(a=l(a.stream.drmInfos)).next();!o.done;o=a.next())if((o=o.value).initData)for(s=(o=l(o.initData)).next();!s.done;s=o.next())r.push(s.value.initData);a=sn.apply(en,u(r))}else a=new Uint8Array([]);return e=n("moov",i,t,e,a),(t=new Uint8Array(jg.byteLength+e.byteLength)).set(jg),t.set(e,jg.byteLength),t}function bg(e){var t=Cg,n=new Uint8Array([]);switch(e.type){case"video":if(e.codecs.includes("avc1")){n=e.stream.width||0;var r=e.stream.height||0;if(0<e.oa.byteLength)var i=Cg("avcC",e.oa);else{i=Cg;for(var a=7,o=[],s=[],l=0,c=0,d=0,p=0;p<e.Qa.length;p++){var f=wg(e.Qa[p]);switch(31&f[0]){case 7:o.push(f),a+=f.length+2;break;case 8:s.push(f),a+=f.length+2}}for(0<o.length&&(l=o[0][1],d=o[0][2],c=o[0][3]),p=0,(a=new Uint8Array(a))[p++]=1,a[p++]=l,a[p++]=d,a[p++]=c,a[p++]=255,a[p++]=224|o.length,l=0;l<o.length;l++)a[p++]=(65280&o[l].length)>>8,a[p++]=255&o[l].length,a.set(o[l],p),p+=o[l].length;for(a[p++]=s.length,o=0;o<s.length;o++)a[p++]=(65280&s[o].length)>>8,a[p++]=255&s[o].length,a.set(s[o],p),p+=s[o].length;i=i("avcC",a)}n=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].concat(u(Sg(n,2)),u(Sg(r,2)),[0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17])),r="avc1",s=kg(e),o=new Uint8Array([]),e.encrypted&&(o=_g(e),r="encv"),n=Cg(r,n,i,s,o)}else e.codecs.includes("hvc1")&&(r=e.stream.width||0,i=e.stream.height||0,n=new Uint8Array([]),0<e.oa.byteLength&&(n=Cg("hvcC",e.oa)),r=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].concat(u(Sg(r,2)),u(Sg(i,2)),[0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17])),i="hvc1",s=kg(e),o=new Uint8Array([]),e.encrypted&&(o=_g(e),i="encv"),n=Cg(i,r,n,s,o));break;case"audio":e.codecs.includes("mp3")?e=Cg(".mp3",Eg(e)):e.codecs.includes("ac-3")?(n=Cg("dac3",e.ga),r="ac-3",i=new Uint8Array([]),e.encrypted&&(i=_g(e),r="enca"),e=Cg(r,Eg(e),n,i)):e.codecs.includes("ec-3")?(n=Cg("dec3",e.ga),r="ec-3",i=new Uint8Array([]),e.encrypted&&(i=_g(e),r="enca"),e=Cg(r,Eg(e),n,i)):e.codecs.includes("opus")?(n=Cg("dOps",e.ga),r="Opus",i=new Uint8Array([]),e.encrypted&&(i=_g(e),r="enca"),e=Cg(r,Eg(e),n,i)):(0<e.ga.byteLength?n=Cg("esds",e.ga):(n=Cg,r=e.id+1,i=e.stream.channelsCount||2,o=e.stream.audioSamplingRate||44100,l=dn("audio",e.codecs.split(",")),s=(c={96e3:0,88200:1,64e3:2,48e3:3,44100:4,32e3:5,24e3:6,22050:7,16e3:8,12e3:9,11025:10,8e3:11,7350:12})[o],"mp4a.40.5"!==l&&"mp4a.40.29"!==l||(s=c[2*o]),o=parseInt(l.split(".").pop(),10),n=n("esds",r=new Uint8Array([0,0,0,0,3,25].concat(u(Sg(r,2)),[0,4,17,64,21,0,0,0,0,0,0,0,0,0,0,0,5,2,o<<3|s>>>1,s<<7|i<<3,6,1,2])))),r="mp4a",i=new Uint8Array([]),e.encrypted&&(i=_g(e),r="enca"),e=Cg(r,Eg(e),n,i)),n=e}return t("stbl",e=Cg("stsd",Fg,n),Cg("stts",Og),Cg("stsc",Lg),Cg("stsz",Ng),Cg("stco",Mg))}function kg(e){if(!e.xa&&!e.ya)return new Uint8Array([]);var t=e.ya;return Cg("pasp",e=new Uint8Array([].concat(u(Sg(e.xa,4)),u(Sg(t,4)))))}function Eg(e){return new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,e.stream.channelsCount||2,0,16,0,0,0,0].concat(u(Sg(e.stream.audioSamplingRate||44100,2)),[0,0]))}function _g(e){for(var t=Cg,n=e.codecs.substring(0,e.codecs.indexOf(".")),r=0,i=0;i<n.length;i+=1)r|=n.charCodeAt(i)<<8*(n.length-i-1);n=Cg("frma",n=new Uint8Array([].concat(u(Sg(r,4))))),r=Cg("schm",r=new Uint8Array([0,0,0,0,99,101,110,99,0,1,0,0])),i=Cg;for(var a=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),o=(e=l(e.stream.drmInfos)).next();!o.done;o=e.next())if((o=o.value)&&o.keyIds&&o.keyIds.size)for(var s=(o=l(o.keyIds)).next();!s.done;s=o.next())a=wg(s.value);return t("sinf",n,r,i("schi",a=Cg("tenc",e=new Uint8Array([0,0,0,0,0,0,1,8]),a)))}function Tg(e){for(var t=[],n=(e=l(e.g)).next();!n.done;n=e.next()){n=n.value;var r,i=t.push,a=i.apply,o=Cg,s=new Uint8Array([0,0,0,0].concat(u(Sg(n.data?n.data.jb:0,4))));s=Cg("mfhd",s);var c=n.data?n.data.Oa:[],d=new Uint8Array(4+c.length);for(r=0;r<c.length;r++){var p=c[r].flags;d[r+4]=p.Ha<<4|p.Ka<<2|p.Ja}var f=(c=Cg("sdtp",d)).length+92;d=Cg,r=Cg("tfhd",r=new Uint8Array([0,0,0,58].concat(u(Sg(n.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0]))),p=n.data?n.data.baseMediaDecodeTime:0;var h=Math.floor(p%(Pg+1));p=Cg("tfdt",p=new Uint8Array([1,0,0,0].concat(u(Sg(Math.floor(p/(Pg+1)),4)),u(Sg(h,4)))));var y=f,g=12+16*(h=(f=n.data?n.data.Oa:[]).length),v=new Uint8Array(g);for(y+=8+g,v.set(["video"===n.type?1:0,0,15,1].concat(u(Sg(h,4)),u(Sg(y,4))),0),y=0;y<h;y++){var m=f[y];g=Sg(m.duration,4);var b=Sg(m.size,4),k=m.flags;m=Sg(m.Va,4),v.set([].concat(u(g),u(b),[k.Xa<<2|k.Ha,k.Ka<<6|k.Ja<<4|k.Ya,61440&k.Ga,15&k.Ga],u(m)),12+16*y)}o=o("moof",s,c=d("traf",r,p,f=Cg("trun",v),c)),a.call(i,t,[o,Ag(n)])}return sn.apply(en,u(t))}function Ag(e){return e=(e.data?e.data.Oa:[]).map((function(e){return e.data})),Cg("mdat",e=sn.apply(en,u(e)))}function Sg(e,t){var n=[];for(--t;0<=t;t--)n.push(e>>8*t&255);return n}function wg(e){for(var t=new Uint8Array(e.length/2),n=0;n<e.length/2;n+=1)t[n]=parseInt(String(e[2*n]+e[2*n+1]),16);return t}function Cg(e){var t=D.apply(1,arguments),n=Rg[e];n||(n=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)],Rg[e]=n);for(var r=8,i=t.length-1;0<=i;i--)r+=t[i].byteLength;for((i=new Uint8Array(r))[0]=r>>24&255,i[1]=r>>16&255,i[2]=r>>8&255,i[3]=255&r,i.set(n,4),n=0,r=8;n<t.length;n++)i.set(t[n],r),r+=t[n].byteLength;return i}var xg=!1,Pg=Math.pow(2,32)-1,Rg={},Ig=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),Dg=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),Og=new Uint8Array([0,0,0,0,0,0,0,0]),Lg=new Uint8Array([0,0,0,0,0,0,0,0]),Mg=new Uint8Array([0,0,0,0,0,0,0,0]),Ng=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),Ug=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),Bg=new Uint8Array([0,0,0,0,0,0,0,0]),Fg=new Uint8Array([0,0,0,0,0,0,0,1]),jg=new Uint8Array([]),Hg=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),Vg=new Uint8Array([]);function Gg(){var e=this;this.h=this.g=null,this.l=[],this.j=null,this.s=1,this.i=null,this.B=new V(5),this.o=new Tt((function(){!function(e){var t;I((function(n){switch(n.g){case 1:return E(n,2),b(n,Kg(e),4);case 4:T(n,3);break;case 2:t=A(n),e.h&&(t.severity=1,e.h.onError(t));case 3:if(!e.h)return n.return();k(n)}}))}(e)})),this.A=new Jr,this.m=new Map}function Kg(e){var t,n,r,i,a,o,s;return I((function(c){if(1==c.g)return t=ri(e.l,e.g.retryParameters),n=e.h.networkingEngine,r=Date.now(),i=n.request(0,t,{type:5}),ei(e.A,i),b(c,i.promise,2);if(a=c.h,!e.h)return c.return();a.uri&&!e.l.includes(a.uri)&&e.l.unshift(a.uri);var d=a.uri,p=a.data,f=e.g.mss.manifestPreprocessor;if(f!=Rl){if(ae("manifest.mss.manifestPreprocessor configuration","Please Use manifest.mss.manifestPreprocessorTXml instead."),!(p=Ch(p,"SmoothStreamingMedia")))throw new bt(2,4,4046,d);f(p),p=qt(p.outerHTML)}var h=Di(p,"SmoothStreamingMedia");if(!h)throw new bt(2,4,4046,d);if((d=e.g.mss.manifestPreprocessorTXml)!=Il&&d(h),e.i||(e.i=new ss(null,0)),d=Vi(h,"IsLive",Ji,!1))throw new bt(2,4,4047);e.i.Bc(!d),f=Vi(h,"TimeScale",Qi,1e7),p=Vi(h,"DVRWindowLength",Qi),d&&(0===p||isNaN(p))&&(p=1/0);var y,g=Vi(h,"CanSeek",Ji,!1);for(0===p&&g&&(p=1/0),g=null,p&&0<p&&(g=p/f),d&&!isNaN(e.g.availabilityWindowOverride)&&(g=e.g.availabilityWindowOverride),null==g&&(g=1/0),e.i.ke(g),p=Vi(h,"Duration",Qi,1/0),d||e.i.ab(p/f),d={variants:[],textStreams:[],timescale:f,duration:p/f},g=Ni(h,"Protection"),f=e.g.mss.keySystemsBySystemId,p=[],y=(g=l(g)).next();!y.done;y=g.next())p=p.concat(Ni(y.value,"ProtectionHeader"));if(p.length){for(g=[],y=0;y<p.length;y++){var v=p[y],m=v.attributes.SystemID.toLowerCase(),E=f[m];if(E){var _=hg(v);if(_)e:{for(var T=(_=l(Fi(_,"DATA"))).next();!T.done;T=_.next())if(T=ji(T.value,"KID")){_=rn(Ui(T)),_=on(_=new Uint8Array([_[3],_[2],_[1],_[0],_[5],_[4],_[7],_[6]].concat(u(_.slice(8)))));break e}_=null}else _=null;m=un(E,"cenc",m=[{initData:Ii(T=rn(Ui(v)),m=an(m.replace(/-/g,"")),new Set,0),initDataType:"cenc",keyId:_}]),_&&m.keyIds.add(_),(E=gg.get(E))&&(m.licenseServerUri=E(v)),g.push(m)}}f=g}else f=[];for(y=f,g=[],f=[],p=[],v=(h=l(h=Ni(h,"StreamIndex"))).next();!v.done;v=h.next()){E=Ni(v=v.value,"QualityLevel"),m=d.timescale,_=d.duration,T=Ni(v,"c");for(var A=[],S=0,w=0;w<T.length;++w){var C=T[w],x=T[w+1],P=Vi(C,"t",Qi),R=Vi(C,"d",Qi);if(C=Vi(C,"r",qi),!R)break;if(P=null!=P?P:S,0>(C=C||0))if(x){if(null==(x=Vi(x,"t",Qi)))break;if(P>=x)break;C=Math.ceil((x-P)/R)-1}else{if(1/0==_)break;if(P/m>=_)break;C=Math.ceil((_*m-P)/R)-1}for(x=0;x<=C;++x)S=P+R,A.push({start:P/m,end:S/m,Mf:P}),P=S}for(m=A,_=(E=l(E)).next();!_.done;_=E.next())(_=zg(e,v,_.value,m,y,d))&&("audio"!=_.type||e.g.disableAudio?"video"!=_.type||e.g.disableVideo?_.type!=hn||e.g.disableText||p.push(_):f.push(_):g.push(_))}for(h=[],y=(g=l(0<g.length?g:[null])).next();!y.done;y=g.next())for(y=y.value,_=(v=l(0<f.length?f:[null])).next();!_.done;_=v.next())m=(E=h).push,_=_.value,T=0,y&&y.bandwidth&&0<y.bandwidth&&(T+=y.bandwidth),_&&_.bandwidth&&0<_.bandwidth&&(T+=_.bandwidth),_={id:e.s++,language:y?y.language:"und",disabledUntilTime:0,primary:!!y&&y.primary||!!_&&_.primary,audio:y,video:_,bandwidth:T,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},m.call(E,_);d.variants=h,d.textStreams=p,e.j?(e.j.variants=d.variants,e.j.textStreams=d.textStreams,e.h.filter(e.j)):(e.j={presentationTimeline:e.i,variants:d.variants,textStreams:d.textStreams,imageStreams:[],offlineSessionIds:[],minBufferTime:0,sequenceMode:e.g.mss.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"MSS",serviceDescription:null},e.i.Xd()),Promise.resolve(),o=Date.now(),s=(o-r)/1e3,e.B.sample(1,s),k(c)}))}function zg(e,t,n,r,i,a){var o=t.attributes.Type;if("audio"!==o&&"video"!==o&&"text"!==o)return Y("Ignoring unrecognized type:",o),null;var s=t.attributes.Language,u=e.s++,c=Vi(n,"Bitrate",Xi),d=Vi(n,"MaxWidth",Xi),p=Vi(n,"MaxHeight",Xi),f=Vi(n,"Channels",Xi),h=Vi(n,"SamplingRate",Xi),y=a.duration;r.length&&(y=r[r.length-1].end-r[0].start);var g=e.i.getDuration();e.i.ab(Math.min(y,g));var v={id:u,originalId:t.attributes.Name||String(u),groupId:null,createSegmentIndex:function(){return Promise.resolve()},closeSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:"",codecs:"",frameRate:void 0,pixelAspectRatio:void 0,bandwidth:c||0,width:d||void 0,height:p||void 0,kind:"",encrypted:0<i.length,drmInfos:i,keyIds:new Set,language:Gn(s||"und"),originalLanguage:s,label:"",type:"",primary:!1,trickModeVideo:null,emsgSchemeIdUris:[],roles:[],forced:!1,channelsCount:f,audioSamplingRate:h,spatialAudio:!1,closedCaptions:null,hdr:void 0,videoLayout:void 0,tilesLayout:void 0,matchedStreams:[],mssPrivateData:{duration:y,timescale:a.timescale,codecPrivateData:null},accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set};if((i=t.attributes.Subtype)&&((i=Yg[i])&&v.roles.push(i),"main"===i&&(v.primary=!0)),null!==(i=n.attributes.FourCC)&&""!==i||(i=t.attributes.FourCC),!i)if("audio"===o)i="AAC";else if("video"===o)return Y('FourCC is not defined whereas it is required for a QualityLevel element for a StreamIndex of type "video"'),null;if(!Wg.includes(i.toUpperCase()))return Y("Codec not supported:",i),null;switch(n=function(e,t,n,r){if(e=e.attributes.CodecPrivateData)return e;if("audio"!==t)return null;t=r.channelsCount||2,e=r.audioSamplingRate||44100;var i={96e3:0,88200:1,64e3:2,48e3:3,44100:4,32e3:5,24e3:6,22050:7,16e3:8,12e3:9,11025:10,8e3:11,7350:12};return r=i[e],"AACH"===n?(n=new Uint8Array(4),e=i[2*e],n[0]=40|r>>1,n[1]=r<<7|t<<3|e>>1,n[2]=e<<7|8,n[3]=0,t=new Uint16Array(2),t[0]=(n[0]<<8)+n[1],t[1]=(n[2]<<8)+n[3],t[0].toString(16)+t[1].toString(16)):(n=new Uint8Array(2),n[0]=16|r>>1,n[1]=r<<7|t<<3,t=new Uint16Array(1),t[0]=(n[0]<<8)+n[1],t[0].toString(16))}(n,o,i,v),v.mssPrivateData.codecPrivateData=n,o){case"audio":if(!n)return Y("Quality unsupported without CodecPrivateData",o),null;v.type="audio",v.mimeType="mss/audio/mp4",v.codecs=function(e,t){var n=0;return"AACH"===e&&(n=5),t?0===n&&(n=(248&parseInt(t.substr(0,2),16))>>3):(n=2,"AACH"===e&&(n=5)),"mp4a.40."+n}(i,n);break;case"video":if(!n)return Y("Quality unsupported without CodecPrivateData",o),null;v.type="video",v.mimeType="mss/video/mp4",v.codecs=function(e){var t=/00000001[0-9]7/.exec(e);return t.length&&e?"avc1."+e.substr(e.indexOf(t[0])+10,6):""}(n);break;case"text":v.type=hn,v.mimeType="application/mp4",("TTML"===i||"DFXP"===i)&&(v.codecs="stpp")}return v.fullMimeTypes.add(mn(v.mimeType,v.codecs)),v.createSegmentIndex=function(){if(v.segmentIndex)return Promise.resolve();if(e.m.has(v.id))var n=e.m.get(v.id);else n=[],"video"==v.type&&(n=v.mssPrivateData.codecPrivateData.split("00000001").slice(1)),n=mg(new vg([n={id:v.id,type:v.type,codecs:v.codecs,encrypted:v.encrypted,timescale:v.mssPrivateData.timescale,duration:v.mssPrivateData.duration,Qa:n,ga:new Uint8Array([]),oa:new Uint8Array([]),xa:0,ya:0,data:null,stream:v}])),e.m.set(v.id,n);return n=function(e,t,n,r,i){var a=r.attributes.Url.replace("{bitrate}",String(n.bandwidth));r=[];for(var o={},s=(i=l(i)).next();!s.done;o={Mc:o.Mc},s=i.next())o.Mc=s.value,r.push(new Va(o.Mc.start,o.Mc.end,function(t){return function(){return ln(e.l,[a.replace("{start time}",String(t.Mc.Mf))])}}(o),0,null,t,0,0,n.mssPrivateData.duration));return r}(e,new ja((function(){return[]}),0,null,null,void 0,n),v,t,r),v.segmentIndex=new Cs(n),Promise.resolve()},v.closeSegmentIndex=function(){v.segmentIndex&&(v.segmentIndex.release(),v.segmentIndex=null)},v}(n=Gg.prototype).configure=function(e){this.g=e},n.start=function(e,t){var n=this;return I((function(r){if(1==r.g)return n.l=[e],n.h=t,b(r,Kg(n),2);if(!n.h)throw new bt(2,7,7001);return r.return(n.j)}))},n.stop=function(){return this.g=this.h=null,this.l=[],this.j=null,null!=this.o&&(this.o.stop(),this.o=null),this.m.clear(),this.A.destroy()},n.update=function(){var e,t=this;return I((function(n){return 1==n.g?(E(n,2),b(n,Kg(t),4)):2!=n.g?T(n,0):(e=A(n),t.h&&e?(t.h.onError(e),void k(n)):n.return())}))},n.onExpirationUpdated=function(){},n.onInitialVariantChosen=function(){},n.banLocation=function(){},F("shaka.mss.MssParser",Gg);var Wg="AAC AACL AACH AACP AVC1 H264 TTML DFXP".split(" "),Yg={CAPT:"main",SUBT:"alternate",DESC:"main"};function Zg(e,t,n,r,i,a){if(200<=n&&299>=n&&202!=n)return{uri:i||r,originalUri:r,data:t,status:n,headers:e,fromCache:!!e["x-shaka-from-cache"]};i=null;try{i=Zt(t)}catch(e){}throw new bt(401==n||403==n?2:1,1,1001,r,n,i,e,a)}function qg(){}function Xg(e,t,n,r,i){var a=new nv;hi(t.headers).forEach((function(e,t){a.append(t,e)}));var o=new ev,s={Tf:!1,Lg:!1};if(e=function(e,t,n,r,i,a,o){var s,l,u,c,d,p,f,h,y,g,v,m;return I((function(_){switch(_.g){case 1:return s=Jg,l=tv,p=d=0,f=Date.now(),E(_,2),b(_,s(e,n),4);case 4:if(u=_.h,a(Qg(u.headers)),"HEAD"==n.method){_.u(5);break}return h=u.clone().body.getReader(),g=(y=u.headers.get("Content-Length"))?parseInt(y,10):0,new l({start:function(e){function t(){var n,r,a;return I((function(s){switch(s.g){case 1:return E(s,2),b(s,h.read(),4);case 4:n=s.h,T(s,3);break;case 2:return A(s),s.return();case 3:if(n.done){s.u(5);break}if(d+=n.value.byteLength,!o){s.u(5);break}return b(s,o(n.value),5);case 5:(100<(r=Date.now())-f||n.done)&&(a=n.done?0:g-d,i(r-f,d-p,a),p=d,f=r),n.done?e.close():(e.enqueue(n.value),t()),k(s)}}))}t()}}),b(_,u.arrayBuffer(),6);case 6:c=_.h;case 5:T(_,3);break;case 2:if(v=A(_),r.Tf)throw new bt(1,1,7001,e,t);if(r.Lg)throw new bt(1,1,1003,e,t);throw new bt(1,1,1002,e,v,t);case 3:return m=Qg(u.headers),_.return(Zg(m,c,u.status,e,u.url,t))}}))}(e,n,{body:t.body||void 0,headers:a,method:t.method,signal:o.signal,credentials:t.allowCrossSiteCredentials?"include":void 0},s,r,i,t.streamDataCallback),e=new Gr(e,(function(){return s.Tf=!0,o.abort(),Promise.resolve()})),t=t.retryParameters.timeout){var l=new Tt((function(){s.Lg=!0,o.abort()}));l.U(t/1e3),e.finally((function(){l.stop()}))}return e}function Qg(e){var t={};return e.forEach((function(e,n){t[n.trim()]=e})),t}function $g(){if(!e.ReadableStream)return!1;try{new ReadableStream({})}catch(e){return!1}return!!e.Response&&(!!new Response("").body&&!(!e.fetch||!e.AbortController))}Na["application/vnd.ms-sstr+xml"]=function(){return new Gg},F("shaka.net.HttpFetchPlugin",qg),qg.isSupported=$g,qg.parse=Xg;var Jg=e.fetch,ev=e.AbortController,tv=e.ReadableStream,nv=e.Headers;function rv(){}function iv(e,t,n,r,i){var a=new ov,o=Date.now(),s=0;return new Gr(new Promise((function(l,u){a.open(t.method,e,!0),a.responseType="arraybuffer",a.timeout=t.retryParameters.timeout,a.withCredentials=t.allowCrossSiteCredentials,a.onabort=function(){u(new bt(1,1,7001,e,n))};var c=!1;for(var d in a.onreadystatechange=function(){if(2==a.readyState&&!c){var e=av(a);i(e),c=!0}},a.onload=function(t){var i=av(a),c=a.response;try{r(Date.now()-o,t.loaded-s,0);var d=Zg(i,c,a.status,e,a.responseURL,n);l(d)}catch(e){u(e)}},a.onerror=function(t){u(new bt(1,1,1002,e,t,n))},a.ontimeout=function(){u(new bt(1,1,1003,e,n))},a.onprogress=function(e){var t=Date.now();(100<t-o||e.lengthComputable&&e.loaded==e.total)&&(r(t-o,e.loaded-s,4==a.readyState?0:e.total-e.loaded),s=e.loaded,o=t)},t.headers)a.setRequestHeader(d.toLowerCase(),t.headers[d]);a.send(t.body)})),(function(){return a.abort(),Promise.resolve()}))}function av(e){var t=e.getAllResponseHeaders().trim().split("\r\n");e={};for(var n=(t=l(t)).next();!n.done;n=t.next())e[(n=n.value.split(": "))[0].toLowerCase()]=n.slice(1).join(": ");return e}$g()&&(ni("http",Xg,2,!0),ni("https",Xg,2,!0),ni("blob",Xg,2,!0)),F("shaka.net.HttpXHRPlugin",rv),rv.parse=iv;var ov=e.XMLHttpRequest;function sv(e,t,n,r){this.g=e,this.i=t,this.groupId=n,this.h=r}function lv(e){return e.$().map((function(e){return"{"+encodeURI(e)+"}"})).join("")+":"+e.Aa+":"+e.ja}function uv(e,t){return Js(e.g.$(),e.g.Aa,e.g.ja,t.streaming.retryParameters)}function cv(){this.h=this.j=this.i=0,this.g=new Map,this.l=0}function dv(e,t){e.i+=t;var n=e.l;return e.l++,e.g.set(n,t),n}function pv(e){var t=this;this.o=e,this.j=new Map,this.i=new di((function(){return fv(t).catch((function(){}))})),this.h=[],this.m=function(){},this.l=function(){},this.g=new cv}function fv(e){var t=e.h.map((function(e){return e()}));return e.h=[],Promise.all(t)}function hv(e,t,n,r,i,a){pi(e.i);var o=(e.j.get(t)||Promise.resolve()).then((function(){var t,o,s,l,u,c,d;return I((function(p){if(1==p.g)return b(p,function(e,t){var n,r,i,a;return I((function(o){return 1==o.g?(n=li,r=e.o.request(n,t),i=function(){return r.abort()},e.h.push(i),b(o,r.promise,2)):(a=o.h,Ae(e.h,i),o.return(a.data))}))}(e,n),2);if(t=p.h,e.i.g)throw new bt(2,9,7001);if(i)for(l in o=ye(t),(s=new Ri(o)).data)u=Number(l),c=s.data[u],d=s.g[u],e.l(c,d);e.g.close(r,t.byteLength);var f=e.g;return e.m(0==f.i?0:f.j/f.i,e.g.h),p.return(a(t))}))}));e.j.set(t,o)}function yv(e,t){var n=this;this.i=e,this.h=e.objectStore(t),this.g=new Vr,e.onabort=function(e){e.preventDefault(),n.g.reject()},e.onerror=function(e){e.preventDefault(),n.g.reject()},e.oncomplete=function(){n.g.resolve()}}function gv(e,t){return new Promise((function(n,r){var i=e.h.openCursor();i.onerror=r,i.onsuccess=function(){var e;return I((function(r){if(1==r.g)return null==i.result?(n(),r.return()):(e=i.result,b(r,t(e.key,e.value,e),2));e.continue(),k(r)}))}}))}function vv(e){this.h=e,this.g=[]}function mv(e,t){return bv(e,t,"readwrite")}function bv(e,t,n){var r=new yv(n=e.h.transaction([t],n),t);return e.g.push(r),r.promise().then((function(){Ae(e.g,r)}),(function(){Ae(e.g,r)})),r}function kv(e,t,n){this.h=new vv(e),this.i=t,this.g=n}function Ev(e){return Promise.reject(new bt(2,9,9011,"Cannot add new value to "+e))}function _v(e,t,n,r){t=(e=mv(e.h,t)).store();for(var i={},a=(n=l(n)).next();!a.done;i={xd:i.xd},a=n.next())i.xd=a.value,t.delete(i.xd).onsuccess=function(e){return function(){return r(e.xd)}}(i);return e.promise()}function Tv(e,t,n){var r,i,a,o,s,u,c;return I((function(d){if(1==d.g){for(r=bv(e.h,t,"readonly"),i=r.store(),a={},o=[],s={},u=l(n),c=u.next();!c.done;s={Kc:s.Kc,Ic:s.Ic},c=u.next())s.Ic=c.value,s.Kc=i.get(s.Ic),s.Kc.onsuccess=function(e){return function(){null==e.Kc.result&&o.push(e.Ic),a[e.Ic]=e.Kc.result}}(s);return b(d,r.promise(),2)}if(o.length)throw new bt(2,9,9012,"Could not find values for "+o);return d.return(n.map((function(e){return a[e]})))}))}function Av(e){this.g=new vv(e)}function Sv(){this.g=new Map}function wv(e){var t=null;if(e.g.forEach((function(e,n){e.getCells().forEach((function(e,r){e.hasFixedKeySpace()||t||(t={path:{fb:n,Ba:r},Ba:e})}))})),t)return t;throw new bt(2,9,9013,"Could not find a cell that supports add-operations")}function Cv(e,t,n){if(!(e=e.g.get(t)))throw new bt(2,9,9013,"Could not find mechanism with name "+t);if(!(t=e.getCells().get(n)))throw new bt(2,9,9013,"Could not find cell with name "+n);return t}function xv(e,t){Pv.set(e,t)}ni("http",iv,1,!0),ni("https",iv,1,!0),ni("blob",iv,1,!0),cv.prototype.close=function(e,t){if(this.g.has(e)){var n=this.g.get(e);this.g.delete(e),this.j+=n,this.h+=t}},pv.prototype.destroy=function(){return this.i.destroy()},yv.prototype.abort=function(){var e=this;return I((function(t){if(1==t.g){try{e.i.abort()}catch(e){}return E(t,2),b(t,e.g,4)}if(2!=t.g)return T(t,0);A(t),k(t)}))},yv.prototype.store=function(){return this.h},yv.prototype.promise=function(){return this.g},vv.prototype.destroy=function(){return Promise.all(this.g.map((function(e){return e.abort()})))},(n=kv.prototype).destroy=function(){return this.h.destroy()},n.hasFixedKeySpace=function(){return!0},n.addSegments=function(){return Ev(this.i)},n.removeSegments=function(e,t){return _v(this,this.i,e,t)},n.getSegments=function(e){var t,n=this;return I((function(r){return 1==r.g?b(r,Tv(n,n.i,e),2):(t=r.h,r.return(t.map((function(e){return n.Vf(e)}))))}))},n.addManifests=function(){return Ev(this.g)},n.updateManifest=function(){return Promise.reject(new bt(2,9,9016,"Cannot modify values in "+this.g))},n.updateManifestExpiration=function(e,t){var n=mv(this.h,this.g),r=n.store();return r.get(e).onsuccess=function(n){(n=n.target.result)&&(n.expiration=t,r.put(n,e))},n.promise()},n.removeManifests=function(e,t){return _v(this,this.g,e,t)},n.getManifests=function(e){var t,n=this;return I((function(r){return 1==r.g?b(r,Tv(n,n.g,e),2):(t=r.h,r.return(Promise.all(t.map((function(e){return n.Vc(e)})))))}))},n.getAllManifests=function(){var e,t,n=this;return I((function(r){return 1==r.g?(e=bv(n.h,n.g,"readonly"),t=new Map,b(r,gv(e,(function(e,r){var i;return I((function(a){if(1==a.g)return b(a,n.Vc(r),2);i=a.h,t.set(e,i),k(a)}))})),2)):3!=r.g?b(r,e.promise(),3):r.return(t)}))},n.Vf=function(e){return e},n.Vc=function(e){return Promise.resolve(e)},n.add=function(e,t){var n,r,i,a,o,s,u,c=this;return I((function(d){if(1==d.g){for(n=mv(c.h,e),r=n.store(),i=[],a={},o=l(t),s=o.next();!s.done;a={zd:a.zd},s=o.next())u=s.value,a.zd=r.add(u),a.zd.onsuccess=function(e){return function(){i.push(e.zd.result)}}(a);return b(d,n.promise(),2)}return d.return(i)}))},Av.prototype.destroy=function(){return this.g.destroy()},Av.prototype.getAll=function(){var e,t,n=this;return I((function(r){return 1==r.g?(e=bv(n.g,"session-ids","readonly"),t=[],b(r,gv(e,(function(e,n){t.push(n)})),2)):3!=r.g?b(r,e.promise(),3):r.return(t)}))},Av.prototype.add=function(e){for(var t=mv(this.g,"session-ids"),n=t.store(),r=(e=l(e)).next();!r.done;r=e.next())n.add(r.value);return t.promise()},Av.prototype.remove=function(e){var t,n=this;return I((function(r){return 1==r.g?b(r,gv(t=mv(n.g,"session-ids"),(function(t,n,r){e.includes(n.sessionId)&&r.delete()})),2):b(r,t.promise(),0)}))},Sv.prototype.destroy=function(){for(var e=[],t=l(this.g.values()),n=t.next();!n.done;n=t.next())e.push(n.value.destroy());return this.g.clear(),Promise.all(e)},Sv.prototype.init=function(){var e=this;Pv.forEach((function(t,n){(t=t())&&e.g.set(n,t)}));for(var t=[],n=l(this.g.values()),r=n.next();!r.done;r=n.next())t.push(r.value.init());return Promise.all(t)},F("shaka.offline.StorageMuxer",Sv),Sv.unregister=function(e){Pv.delete(e)},Sv.register=xv,Sv.prototype.destroy=Sv.prototype.destroy;var Pv=new Map;function Rv(){kv.apply(this,arguments)}function Iv(e,t){!function(e){var t=e.streams.filter((function(e){return"audio"==e.contentType}));if(e=e.streams.filter((function(e){return"video"==e.contentType})),!t.every((function(e){return e.variantIds}))||!e.every((function(e){return e.variantIds}))){for(var n=l(t),r=n.next();!r.done;r=n.next())r.value.variantIds=[];for(r=(n=l(e)).next();!r.done;r=n.next())r.value.variantIds=[];if(n=0,e.length&&!t.length){var i=n++,a=l(e);for(r=a.next();!r.done;r=a.next())r.value.variantIds.push(i)}if(!e.length&&t.length)for(i=n++,r=(a=l(t)).next();!r.done;r=a.next())r.value.variantIds.push(i);if(e.length&&t.length)for(r=(t=l(t)).next();!r.done;r=t.next())for(r=r.value,a=(i=l(e)).next();!a.done;a=i.next()){a=a.value;var o=n++;r.variantIds.push(o),a.variantIds.push(o)}}}(e);for(var n=l(e.streams),r=n.next();!r.done;r=n.next());return e.streams.map((function(n){return function(e,t,n){var r=e.initSegmentUri?Dv(e.initSegmentUri):null,i=t+e.presentationTimeOffset,a=t+n;return{id:e.id,originalId:null,groupId:null,primary:e.primary,type:e.contentType,mimeType:e.mimeType,codecs:e.codecs,frameRate:e.frameRate,pixelAspectRatio:void 0,hdr:void 0,videoLayout:void 0,kind:e.kind,language:e.language,originalLanguage:e.language||null,label:e.label,width:e.width,height:e.height,initSegmentKey:r,encrypted:e.encrypted,keyIds:new Set([e.keyId]),segments:e.segments.map((function(e){var n=Dv(e.uri);return{startTime:t+e.startTime,endTime:t+e.endTime,dataKey:n,initSegmentKey:r,appendWindowStart:t,appendWindowEnd:a,timestampOffset:i,tilesLayout:"",mimeType:null,codecs:null}})),variantIds:e.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1,fastSwitching:!1}}(n,e.startTime,t)}))}function Dv(e){var t;if((t=/^offline:[0-9]+\/[0-9]+\/([0-9]+)$/.exec(e))||(t=/^offline:segment\/([0-9]+)$/.exec(e)))return Number(t[1]);throw new bt(2,9,9004,"Could not parse uri "+e)}function Ov(){kv.apply(this,arguments)}function Lv(e,t,n){return{id:e.id,originalId:e.originalId,groupId:null,primary:e.primary,type:e.contentType,mimeType:e.mimeType,codecs:e.codecs,frameRate:e.frameRate,pixelAspectRatio:e.pixelAspectRatio,hdr:void 0,videoLayout:void 0,kind:e.kind,language:e.language,originalLanguage:e.language||null,label:e.label,width:e.width,height:e.height,encrypted:e.encrypted,keyIds:new Set([e.keyId]),segments:e.segments.map((function(r){return{startTime:t+r.startTime,endTime:t+r.endTime,initSegmentKey:e.initSegmentKey,appendWindowStart:t,appendWindowEnd:n,timestampOffset:t-e.presentationTimeOffset,dataKey:r.dataKey,tilesLayout:"",mimeType:null,codecs:null}})),variantIds:e.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1,fastSwitching:!1}}function Mv(){kv.apply(this,arguments)}function Nv(){this.m=this.j=this.i=this.h=this.g=this.l=null}function Uv(e,t,n,r){this.g=e,this.i=t,this.h=n,this.l=r,this.j=["offline:",e,"/",t,"/",n,"/",r].join("")}function Bv(e){if(null==(e=/^offline:([a-z]+)\/([^/]+)\/([^/]+)\/([0-9]+)$/.exec(e)))return null;var t=e[1];if("manifest"!=t&&"segment"!=t)return null;var n=e[2];if(!n)return null;var r=e[3];return r&&null!=t?new Uv(t,n,r,Number(e[4])):null}function Fv(e,t){this.h=e,this.g=t}function jv(e,t){var n=new ss(null,0);n.ab(t.duration);var r=t.streams.filter((function(e){return"audio"==e.type})),i=t.streams.filter((function(e){return"video"==e.type}));r=function(e,t,n,r){for(var i=new Set,a=l(t),o=a.next();!o.done;o=a.next()){var s=l(o.value.variantIds);for(o=s.next();!o.done;o=s.next())i.add(o.value)}for(a=l(n),o=a.next();!o.done;o=a.next())for(s=l(o.value.variantIds),o=s.next();!o.done;o=s.next())i.add(o.value);for(a=new Map,i=l(i),o=i.next();!o.done;o=i.next())o=o.value,a.set(o,{id:o,language:"",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});for(t=l(t),i=t.next();!i.done;i=t.next())for(i=i.value,o=Hv(e,i,r),s=l(i.variantIds),i=s.next();!i.done;i=s.next())(i=a.get(i.value)).language=o.language,i.primary=i.primary||o.primary,i.audio=o;for(n=l(n),t=n.next();!t.done;t=n.next())for(i=t.value,t=Hv(e,i,r),o=l(i.variantIds),i=o.next();!i.done;i=o.next())(i=a.get(i.value)).primary=i.primary||t.primary,i.video=t;return a}(e,r,i,n),i=t.streams.filter((function(e){return e.type==hn})).map((function(t){return Hv(e,t,n)}));var a=t.streams.filter((function(e){return"image"==e.type})).map((function(t){return Hv(e,t,n)})),o=t.drmInfo?[t.drmInfo]:[];if(t.drmInfo)for(var s=l(r.values()),u=s.next();!u.done;u=s.next())(u=u.value).audio&&u.audio.encrypted&&(u.audio.drmInfos=o),u.video&&u.video.encrypted&&(u.video.drmInfos=o);return{presentationTimeline:n,minBufferTime:2,offlineSessionIds:t.sessionIds,variants:Array.from(r.values()),textStreams:i,imageStreams:a,sequenceMode:t.sequenceMode||!1,ignoreManifestTimestampsInSegmentsMode:!1,type:t.type||"UNKNOWN",serviceDescription:null}}function Hv(e,t,n){var r=t.segments.map((function(n){return function(e,t,n){var r=new Uv("segment",e.h,e.g,t.dataKey);return e=new Va(t.startTime,t.endTime,(function(){return[r.toString()]}),0,null,null!=t.initSegmentKey?function(e,t){var n=new Uv("segment",e.h,e.g,t);return new ja((function(){return[n.toString()]}),0,null)}(e,t.initSegmentKey):null,t.timestampOffset,t.appendWindowStart,t.appendWindowEnd,[],t.tilesLayout||""),e.mimeType=t.mimeType||n.mimeType||"",e.codecs=t.codecs||n.codecs||"",e}(e,n,t)}));return n.ld(r),{id:t.id,originalId:t.originalId,groupId:t.groupId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Cs(r),mimeType:t.mimeType,codecs:t.codecs,width:t.width||void 0,height:t.height||void 0,frameRate:t.frameRate,pixelAspectRatio:t.pixelAspectRatio,hdr:t.hdr,videoLayout:t.videoLayout,kind:t.kind,encrypted:t.encrypted,drmInfos:[],keyIds:t.keyIds,language:t.language,originalLanguage:t.originalLanguage||null,label:t.label,type:t.type,primary:t.primary,trickModeVideo:null,emsgSchemeIdUris:null,roles:t.roles,forced:t.forced,channelsCount:t.channelsCount,audioSamplingRate:t.audioSamplingRate,spatialAudio:t.spatialAudio,closedCaptions:t.closedCaptions,tilesLayout:t.tilesLayout,accessibilityPurpose:null,external:t.external,fastSwitching:t.fastSwitching,fullMimeTypes:new Set([mn(t.mimeType,t.codecs)])}}function Vv(){this.g=null}function Gv(){}function Kv(e){var t=Bv(e);return t&&"manifest"==t.g?e=Wr(e={uri:e,originalUri:e,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}}):e=t&&"segment"==t.g?function(e,t){var n=new Sv;return Wr(void 0).va((function(){return n.init()})).va((function(){return Cv(n,t.fb(),t.Ba())})).va((function(e){return e.getSegments([t.key()])})).va((function(e){return{uri:t,data:e[0].data,headers:{}}})).finally((function(){return n.destroy()}))}(t.key(),t):Kr(new bt(2,1,9004,e)),e}function zv(e,t,n){var r,i,a,o,s,u;return I((function(c){switch(c.g){case 1:r=[];for(var d=[],p=l(n),f=p.next();!f.done;f=p.next()){f=f.value;for(var h=!1,y=l(d),g=y.next();!g.done;g=y.next())if(Wv((g=g.value).info,f)){g.sessionIds.push(f.sessionId),h=!0;break}h||d.push({info:f,sessionIds:[f.sessionId]})}i=l(d),a=i.next();case 2:if(a.done){c.u(4);break}return o=a.value,s=function(e,t,n){var r,i;return I((function(a){switch(a.g){case 1:return r=new ra({zb:t,onError:function(){},fe:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),E(a,2),r.configure(e),b(a,function(e,t,n,r,i,a){var o=new Map;return(i={audioCapabilities:i,videoCapabilities:a,distinctiveIdentifier:"optional",persistentState:"required",sessionTypes:["persistent-license"],label:t}).drmInfos=[{keySystem:t,licenseServerUri:n,distinctiveIdentifierRequired:!1,persistentStateRequired:!0,audioRobustness:"",videoRobustness:"",serverCertificate:r,serverCertificateUri:"",initData:null,keyIds:null}],o.set(t,i),da(e,o,[])}(r,n.info.keySystem,n.info.licenseUri,n.info.serverCertificate,n.info.audioCapabilities,n.info.videoCapabilities),4);case 4:T(a,3);break;case 2:return A(a),b(a,r.destroy(),5);case 5:return a.return([]);case 3:return i=[],b(a,Promise.all(n.sessionIds.map((function(e){return I((function(t){return 1==t.g?(E(t,2),b(t,function(e,t){var n,r,i;return I((function(a){return 1==a.g?b(a,ha(e,t,{initData:null,initDataType:null}),2):3!=a.g?(n=a.h)?(r=[],(i=e.i.get(n))&&(i.bb=new Vr,r.push(i.bb)),r.push(n.remove()),b(a,Promise.all(r),3)):a.return():(e.i.delete(n),void k(a))}))}(r,e),4)):2!=t.g?(i.push(e),T(t,0)):(A(t),void k(t))}))}))),6);case 6:return b(a,r.destroy(),7);case 7:return a.return(i)}}))}(e,t,o),b(c,s,5);case 5:u=c.h,r=r.concat(u),a=i.next(),c.u(2);break;case 4:return c.return(r)}}))}function Wv(e,t){function n(e,t){return e.robustness==t.robustness&&e.contentType==t.contentType}return e.keySystem==t.keySystem&&e.licenseUri==t.licenseUri&&Se(e.audioCapabilities,t.audioCapabilities,n)&&Se(e.videoCapabilities,t.videoCapabilities,n)}function Yv(e,t){var n=jv(new Fv(e.fb(),e.Ba()),t),r=t.appMetadata||{};return n=Zv(n),{offlineUri:e.toString(),originalManifestUri:t.originalManifestUri,duration:t.duration,size:t.size,expiration:t.expiration,tracks:n,appMetadata:r,isIncomplete:t.isIncomplete||!1}}function Zv(e){for(var t=[],n=mr(e.variants),r=(n=l(n)).next();!r.done;r=n.next())t.push(cr(r.value));for(n=(e=l(e.textStreams)).next();!n.done;n=e.next())t.push(dr(n.value));return t}function qv(){this.g={}}function Xv(e,t){var n=t.audio,r=t.video;if(n&&!r&&(e.g[n.id]=n.bandwidth||t.bandwidth),!n&&r&&(e.g[r.id]=r.bandwidth||t.bandwidth),n&&r){var i=n.bandwidth||393216,a=r.bandwidth||t.bandwidth-i;0>=a&&(a=t.bandwidth),e.g[n.id]=i,e.g[r.id]=a}}function Qv(e,t){e.g[t.id]=t.bandwidth||2048}function $v(e,t){return null==(e=e.g[t])&&(e=0),e}function Jv(e){var t=this;if(e&&e.constructor!=xu)throw new bt(2,9,9008);this.g=this.h=null,e?(this.h=e.h,this.g=e.Wb()):(this.h=xl(),this.g=new ti),this.i=[],this.j=[];var n=!e;this.l=new di((function(){var e,r,i,a,o;return I((function(s){switch(s.g){case 1:return b(s,Promise.all(t.j.map((function(e){return fv(e)}))),2);case 2:for(e=function(){},r=[],i=l(t.i),a=i.next();!a.done;a=i.next())o=a.value,r.push(o.then(e,e));return b(s,Promise.all(r),3);case 3:if(!n){s.u(4);break}return b(s,t.g.destroy(),4);case 4:t.h=null,t.g=null,k(s)}}))}))}function em(){if(At())e:{for(var e=l(Pv.values()),t=e.next();!t.done;t=e.next())if(t=(t=t.value)()){t.destroy(),e=!0;break e}e=!1}else e=!1;return e}function tm(e){var t,n,r;return I((function(i){switch(i.g){case 1:return b(i,(t=new Sv).init(),2);case 2:return b(i,wv(t),3);case 3:return n=i.h,r=new Uv("manifest",n.path.fb,n.path.Ba,e),b(i,t.destroy(),4);case 4:return b(i,(new Jv).remove(r.toString()),0)}}))}function nm(e,t,n,r,i,a){var o,s,u,c,d,p,f,h,y,g,v;return I((function(m){switch(m.g){case 1:for(o=!1,E(m,2),s=!0,u=l(n.streams),c=u.next();!c.done;c=u.next())for(d=c.value,p=l(d.segments),f=p.next();!f.done;f=p.next())h=f.value,null!=(y=h.pendingSegmentRefId?r[h.pendingSegmentRefId]:null)&&(h.dataKey=y,h.pendingSegmentRefId=void 0),null!=(y=h.pendingInitSegmentRefId?r[h.pendingInitSegmentRefId]:null)&&(h.initSegmentKey=y,h.pendingInitSegmentRefId=void 0),h.pendingSegmentRefId&&(s=!1),h.pendingInitSegmentRefId&&(s=!1);return n.size+=i,s&&(n.isIncomplete=!1),b(m,e.updateManifest(t,n),4);case 4:o=!0,a(),T(m,0);break;case 2:return g=A(m),b(m,tm(t),5);case 5:if(o){m.u(6);break}return v=Object.values(r),b(m,e.removeSegments(v,(function(){})),6);case 6:throw g}}))}function rm(e){return e.variants.some((function(e){var t=e.audio&&e.audio.encrypted;return e.video&&e.video.encrypted||t}))}function im(e){return e.variants.some((function(e){return(e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[]).some((function(e){return e.initData&&e.initData.length}))}))}function am(e,t,n,r){if(t.expiration=n.cd(),n=ca(n),t.sessionIds=r.offline.usePersistentLicense?n:[],rm(e)&&r.offline.usePersistentLicense&&!n.length)throw new bt(2,9,9007)}function om(e,t){for(var n=[],r=l(e.streams),i=r.next();!i.done;i=r.next())i=i.value,t&&"video"==i.type?n.push({contentType:mn(i.mimeType,i.codecs),robustness:e.drmInfo.videoRobustness}):t||"audio"!=i.type||n.push({contentType:mn(i.mimeType,i.codecs),robustness:e.drmInfo.audioRobustness});return n}function sm(e,t,n){return I((function(r){return b(r,function(e,t,n,r){var i,a,o;return I((function(s){return 1==s.g?r.drmInfo?(i=function(e){var t=Array.from(e.g.keys());if(!t.length)throw new bt(2,9,9e3,"No supported storage mechanisms found");return e.g.get(t[0]).getEmeSessionCell()}(n),a=r.sessionIds.map((function(e){return{sessionId:e,keySystem:r.drmInfo.keySystem,licenseUri:r.drmInfo.licenseServerUri,serverCertificate:r.drmInfo.serverCertificate,audioCapabilities:om(r,!1),videoCapabilities:om(r,!0)}})),b(s,zv(t,e,a),2)):s.return():3!=s.g?(o=s.h,b(s,i.remove(o),3)):b(s,i.add(a.filter((function(e){return!o.includes(e.sessionId)}))),0)}))}(e.g,e.h.drm,n,t),0)}))}function lm(e,t,n){function r(){}var i=function(e){for(var t=new Set,n=(e=l(e.streams)).next();!n.done;n=e.next())for(var r=(n=l(n.value.segments)).next();!r.done;r=n.next())null!=(r=r.value).initSegmentKey&&t.add(r.initSegmentKey),t.add(r.dataKey);return Array.from(t)}(n);return Yv(t,n),Promise.all([e.removeSegments(i,r),e.removeManifests([t.key()],r)])}function um(e,t,n,r,i,a){var o={id:r.id,originalId:r.originalId,groupId:r.groupId,primary:r.primary,type:r.type,mimeType:r.mimeType,codecs:r.codecs,frameRate:r.frameRate,pixelAspectRatio:r.pixelAspectRatio,hdr:r.hdr,videoLayout:r.videoLayout,kind:r.kind,language:r.language,originalLanguage:r.originalLanguage,label:r.label,width:r.width||null,height:r.height||null,encrypted:r.encrypted,keyIds:r.keyIds,segments:[],variantIds:[],roles:r.roles,forced:r.forced,channelsCount:r.channelsCount,audioSamplingRate:r.audioSamplingRate,spatialAudio:r.spatialAudio,closedCaptions:r.closedCaptions,tilesLayout:r.tilesLayout,external:r.external,fastSwitching:r.fastSwitching},s=i.offline.numberOfParallelDownloads,l=0;return function(e,t,n){if(t=e.segmentIndex.find(t),null!=t)for(var r=e.segmentIndex.get(t);r;)n(r),r=e.segmentIndex.get(++t)}(r,n.presentationTimeline.qb(),(function(n){var i=lv(n),u=void 0;if(!a.has(i)){var c=n.endTime-n.startTime;c=$v(t,r.id)*c,c=dv(e.g,c),a.set(i,new sv(n,c,l,!1))}n.ca&&(u=lv(n.ca),a.has(u)||(c=.5*$v(t,r.id),c=dv(e.g,c),a.set(u,new sv(n.ca,c,l,!0)))),o.segments.push({pendingInitSegmentRefId:u,initSegmentKey:u?0:null,startTime:n.startTime,endTime:n.endTime,appendWindowStart:n.appendWindowStart,appendWindowEnd:n.appendWindowEnd,timestampOffset:n.timestampOffset,tilesLayout:n.tilesLayout,pendingSegmentRefId:i,dataKey:0,mimeType:n.mimeType,codecs:n.codecs}),l=(l+1)%s})),o}function cm(e){if(e.l.g)throw new bt(2,9,7001)}function dm(){if(!em())throw new bt(2,9,9e3)}function pm(e,t){return I((function(n){return 1==n.g?(e.i.push(t),_(n,2),b(n,t,4)):2!=n.g?n.return(n.h):(S(n),Ae(e.i,t),w(n,0))}))}function fm(e){for(var t=new Set,n=l(e.textStreams),r=n.next();!r.done;r=n.next())t.add(r.value);for(r=(n=l(e.imageStreams)).next();!r.done;r=n.next())t.add(r.value);for(n=(e=l(e.variants)).next();!n.done;n=e.next())(n=n.value).audio&&t.add(n.audio),n.video&&t.add(n.video);return t}y(Rv,kv),Rv.prototype.updateManifestExpiration=function(e,t){var n,r,i,a=this;return I((function(o){return n=mv(a.h,a.g),r=n.store(),i=new Vr,r.get(e).onsuccess=function(n){(n=n.target.result)?(n.expiration=t,r.put(n),i.resolve()):i.reject(new bt(2,9,9012,"Could not find values for "+e))},b(o,Promise.all([n.promise(),i]),0)}))},Rv.prototype.Vc=function(e){var t,n,r,i,a,o;return I((function(s){if(1==s.g){for(t=[],n=0;n<e.periods.length;++n)r=n==e.periods.length-1?e.duration:e.periods[n+1].startTime,i=r-e.periods[n].startTime,a=Iv(e.periods[n],i),t.push(a);return b(s,qf(t),2)}return o=s.h,s.return({creationTime:0,originalManifestUri:e.originalManifestUri,duration:e.duration,size:e.size,expiration:null==e.expiration?1/0:e.expiration,streams:o,sessionIds:e.sessionIds,drmInfo:e.drmInfo,appMetadata:e.appMetadata,sequenceMode:!1})}))},Rv.prototype.Vf=function(e){return{data:e.data}},y(Ov,kv),Ov.prototype.Vc=function(e){var t,n,r,i,a,o;return I((function(s){if(1==s.g){for(t=[],n=0;n<e.periods.length;++n){r=n==e.periods.length-1?e.duration:e.periods[n+1].startTime,i=r-e.periods[n].startTime;for(var u=e.periods[n],c=[],d=l(u.streams),p=d.next();!p.done;p=d.next())0!=(p=p.value).variantIds.length&&c.push(Lv(p,u.startTime,u.startTime+i));a=c,t.push(a)}return b(s,qf(t),2)}return o=s.h,s.return({appMetadata:e.appMetadata,creationTime:0,drmInfo:e.drmInfo,duration:e.duration,expiration:null==e.expiration?1/0:e.expiration,originalManifestUri:e.originalManifestUri,sessionIds:e.sessionIds,size:e.size,streams:o,sequenceMode:!1})}))},y(Mv,kv),(n=Mv.prototype).hasFixedKeySpace=function(){return!1},n.addSegments=function(e){return this.add(this.i,e)},n.addManifests=function(e){return this.add(this.g,e)},n.updateManifest=function(e,t){return function(e,t,n){var r=(e=mv(e.h,e.g)).store();return r.get(t).onsuccess=function(){r.put(n,t)},e.promise()}(this,e,t)},n.Vc=function(e){return null==e.expiration&&(e.expiration=1/0),Promise.resolve(e)},(n=Nv.prototype).init=function(){var t=this,n=new Vr,r=!1,i=new Tt((function(){r=!0,n.reject(new bt(2,9,9017))}));i.U(5);var a=e.indexedDB.open("shaka_offline_db",5);return a.onsuccess=function(){if(!r){var e=a.result;t.l=e;var o=e.objectStoreNames;o=o.contains("manifest")&&o.contains("segment")?new Rv(e,"segment","manifest"):null,t.g=o,o=(o=e.objectStoreNames).contains("manifest-v2")&&o.contains("segment-v2")?new Ov(e,"segment-v2","manifest-v2"):null,t.h=o,o=(o=e.objectStoreNames).contains("manifest-v3")&&o.contains("segment-v3")?new Ov(e,"segment-v3","manifest-v3"):null,t.i=o,o=(o=e.objectStoreNames).contains("manifest-v5")&&o.contains("segment-v5")?new Mv(e,"segment-v5","manifest-v5"):null,t.j=o,e=e.objectStoreNames.contains("session-ids")?new Av(e):null,t.m=e,i.stop(),n.resolve()}},a.onupgradeneeded=function(){for(var e=a.result,t=l(["segment-v5","manifest-v5","session-ids"]),n=t.next();!n.done;n=t.next())n=n.value,e.objectStoreNames.contains(n)||e.createObjectStore(n,{autoIncrement:!0})},a.onerror=function(e){r||(n.reject(new bt(2,9,9001,a.error)),i.stop(),e.preventDefault())},n},n.destroy=function(){var e=this;return I((function(t){switch(t.g){case 1:if(!e.g){t.u(2);break}return b(t,e.g.destroy(),2);case 2:if(!e.h){t.u(4);break}return b(t,e.h.destroy(),4);case 4:if(!e.i){t.u(6);break}return b(t,e.i.destroy(),6);case 6:if(!e.j){t.u(8);break}return b(t,e.j.destroy(),8);case 8:if(!e.m){t.u(10);break}return b(t,e.m.destroy(),10);case 10:e.l&&e.l.close(),k(t)}}))},n.getCells=function(){var e=new Map;return this.g&&e.set("v1",this.g),this.h&&e.set("v2",this.h),this.i&&e.set("v3",this.i),this.j&&e.set("v5",this.j),e},n.getEmeSessionCell=function(){return this.m},n.erase=function(){var t=this;return I((function(n){switch(n.g){case 1:if(!t.g){n.u(2);break}return b(n,t.g.destroy(),2);case 2:if(!t.h){n.u(4);break}return b(n,t.h.destroy(),4);case 4:if(!t.i){n.u(6);break}return b(n,t.i.destroy(),6);case 6:if(!t.j){n.u(8);break}return b(n,t.j.destroy(),8);case 8:return t.l&&t.l.close(),b(n,function(){var t=new Vr,n=e.indexedDB.deleteDatabase("shaka_offline_db");return n.onblocked=function(){},n.onsuccess=function(){t.resolve()},n.onerror=function(e){t.reject(new bt(2,9,9001,n.error)),e.preventDefault()},t}(),10);case 10:return t.l=null,t.g=null,t.h=null,t.i=null,t.j=null,b(n,t.init(),0)}}))},xv("idb",(function(){return Lt()||xt()||!e.indexedDB?null:new Nv})),Uv.prototype.fb=function(){return this.i},Uv.prototype.Ba=function(){return this.h},Uv.prototype.key=function(){return this.l},Uv.prototype.toString=function(){return this.j},(n=Vv.prototype).configure=function(){},n.start=function(e,t){var n,r,i,a,o,s,l=this;return I((function(u){switch(u.g){case 1:if(n=Bv(e),l.g=n,null==n||"manifest"!=n.g)throw new bt(2,1,9004,e);return r=new Sv,_(u,2),b(u,r.init(),4);case 4:return b(u,Cv(r,n.fb(),n.Ba()),5);case 5:return b(u,u.h.getManifests([n.key()]),6);case 6:return i=u.h,a=i[0],o=new Fv(n.fb(),n.Ba()),s=jv(o,a),t.makeTextStreamsForClosedCaptions(s),u.return(s);case 2:return S(u),b(u,r.destroy(),7);case 7:w(u,0)}}))},n.stop=function(){return Promise.resolve()},n.update=function(){},n.onExpirationUpdated=function(e,t){var n,r,i,a,o,s,l,u=this;return I((function(c){switch(c.g){case 1:return n=u.g,r=new Sv,E(c,2,3),b(c,r.init(),5);case 5:return b(c,Cv(r,n.fb(),n.Ba()),6);case 6:return b(c,(i=c.h).getManifests([n.key()]),7);case 7:if(a=c.h,o=a[0],s=o.sessionIds.includes(e),l=null==o.expiration||o.expiration>t,!s||!l){c.u(3);break}return b(c,i.updateManifestExpiration(n.key(),t),3);case 3:return S(c),b(c,r.destroy(),10);case 10:w(c,0);break;case 2:A(c),c.u(3)}}))},n.onInitialVariantChosen=function(){},n.banLocation=function(){},Na["application/x-offline-manifest"]=function(){return new Vv},F("shaka.offline.OfflineScheme",Gv),Gv.plugin=Kv,ni("offline",Kv),(n=Jv.prototype).destroy=function(){return this.l.destroy()},n.configure=function(e,t){return 2==arguments.length&&"string"==typeof e&&(e=kl(e,t)),Pl(this.h,e)},n.getConfiguration=function(){var e=xl();return Pl(e,this.h,xl()),e},n.Wb=function(){return this.g},n.store=function(e,t,n){var r=this,i=this.getConfiguration(),a=new pv(this.g);return this.j.push(a),t=function(e,t,n,r,i,a){var o,s,u,c,d,p,f,h,y,g,v,m,_;return I((function(C){switch(C.g){case 1:return dm(),s=o=null,u=new Sv,p=d=c=null,E(C,2,3),b(C,r(),5);case 5:return o=C.h,b(C,function(e,t,n,r){var i,a,o,s,l;return I((function(u){if(1==u.g)return i=null,a=e.g,o={networkingEngine:a,filter:function(){return Promise.resolve()},makeTextStreamsForClosedCaptions:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(e){i=e},isLowLatencyMode:function(){return!1},isAutoLowLatencyMode:function(){return!1},enableLowLatencyMode:function(){},updateDuration:function(){},newDrmInfo:function(){},onManifestUpdated:function(){},getBandwidthEstimate:function(){return r.abr.defaultBandwidthEstimate}},n.configure(r.manifest),cm(e),b(u,n.start(t,o),2);if(3!=u.g)return s=u.h,cm(e),l=fm(s),b(u,Promise.all(fi(l,(function(e){return e.createSegmentIndex()}))),3);if(cm(e),i)throw i;return u.return(s)}))}(e,t,o,i),6);case 6:if(f=C.h,cm(e),!(!f.presentationTimeline.R()&&!f.presentationTimeline.ac()))throw new bt(2,9,9005,t);return b(C,e.oc(f,(function(e){p=p||e}),i),7);case 7:if(s=C.h,cm(e),p)throw p;return b(C,function(e,t,n){var r,i,a,o,s,u,c,d,p,f,h,y,g,v,m,_,S,w,C,x,P,R,D,O,L,M,N;return I((function(I){switch(I.g){case 1:return r={width:1/0,height:1/0},function(e,t,n){e.variants=e.variants.filter((function(e){return Jn(e,t,n)}))}(e,n.restrictions,r),b(I,nr(t,e,n.offline.usePersistentLicense,n.drm.preferredKeySystems),2);case 2:for(i=[],a=n.preferredDecodingAttributes,o=n.preferredVideoCodecs,s=n.preferredAudioCodecs,$n(e,o,s,a),u=l(e.variants),c=u.next();!c.done;c=u.next())d=c.value,i.push(cr(d));for(p=l(e.textStreams),f=p.next();!f.done;f=p.next())h=f.value,i.push(dr(h));for(y=l(e.imageStreams),g=y.next();!g.done;g=y.next())v=g.value,i.push(pr(v));return b(I,n.offline.trackSelectionCallback(i),3);case 3:for(m=I.h,_=e.presentationTimeline.getDuration(),S=0,w=l(m),C=w.next();!C.done;C=w.next())x=C.value,P=x.bandwidth*_/8,S+=P;return E(I,4),b(I,n.offline.downloadSizeCallback(S),6);case 6:if(!I.h)throw new bt(2,9,9014);T(I,5);break;case 4:if((R=A(I))instanceof bt)throw R;throw new bt(2,9,9015);case 5:for(D=new Set,O=new Set,L=new Set,M=l(m),C=M.next();!C.done;C=M.next())"variant"==(N=C.value).type&&D.add(N.id),"text"==N.type&&O.add(N.id),"image"==N.type&&L.add(N.id);e.variants=e.variants.filter((function(e){return D.has(e.id)})),e.textStreams=e.textStreams.filter((function(e){return O.has(e.id)})),e.imageStreams=e.imageStreams.filter((function(e){return L.has(e.id)})),function(e){e.variants.map((function(e){return e.video}));var t=new Set(e.variants.map((function(e){return e.audio})));e=e.textStreams;for(var n=l(t),r=n.next();!r.done;r=n.next())for(var i=(r=l(t)).next();!i.done;i=r.next());for(t=l(e),n=t.next();!n.done;n=t.next())for(n=l(e),r=n.next();!r.done;r=n.next());}(e),k(I)}}))}(f,s,i),8);case 8:return b(C,u.init(),9);case 9:return cm(e),b(C,wv(u),10);case 10:return c=C.h,cm(e),h=function(e,t,n,r,i,a){var o=function(e,t,n){return{offlineUri:null,originalManifestUri:e,duration:t.presentationTimeline.getDuration(),size:0,expiration:1/0,tracks:t=Zv(t),appMetadata:n,isIncomplete:!1}}(n,t,r),s=i.offline.progressCallback;!function(e,t,n){e.m=t,e.l=n}(a,(function(e,t){o.size=t,s(o,e)}),(function(t,n){u&&i.offline.usePersistentLicense&&c==n&&la(e,"cenc",t)}));var u=rm(t)&&!im(t),c=null;u&&(c=hm.get(e.g.keySystem));for(var d=new qv,p=l(t.textStreams),f=p.next();!f.done;f=p.next())d.g[f.value.id]=52;for(p=l(t.imageStreams),f=p.next();!f.done;f=p.next())Qv(d,f.value);for(f=l(t.variants),p=f.next();!p.done;p=f.next())Xv(d,p.value);return d=function(e,t,n,r){for(var i=new Map,a=fm(n),o=new Map,s=(a=l(a)).next();!s.done;s=a.next()){var u=um(e,t,n,s=s.value,r,i);o.set(s.id,u)}for(e=l(n.variants),t=e.next();!t.done;t=e.next())(t=t.value).audio&&o.get(t.audio.id).variantIds.push(t.id),t.video&&o.get(t.video.id).variantIds.push(t.id);return{streams:Array.from(o.values()),Jf:Array.from(i.values())}}(a,d,t,i),a=d.streams,d=d.Jf,f=e.g,p=i.offline.usePersistentLicense,f&&p&&(f.initData=[]),{Th:{creationTime:Date.now(),originalManifestUri:n,duration:t.presentationTimeline.getDuration(),size:0,expiration:e.cd(),streams:a,sessionIds:p?ca(e):[],drmInfo:f,appMetadata:r,isIncomplete:!0,sequenceMode:t.sequenceMode,type:t.type},Jf:d}}(s,f,t,n,i,a),y=h.Th,g=h.Jf,b(C,c.Ba.addManifests([y]),11);case 11:if(v=C.h,cm(e),d=v[0],cm(e),p)throw p;return b(C,function(e,t,n,r,i,a,o,s,u){var c,d,p,f,h,y,g,v,m,_;return I((function(S){switch(S.g){case 1:if(c={},d=0,p=function(t,p){var f,h,y,g,v,m,E;return I((function(_){if(1==_.g){for(f={},h=l(t),y=h.next();!y.done;f={Pb:f.Pb},y=h.next())f.Pb=y.value,g=uv(f.Pb,a),v=f.Pb.i,m=f.Pb.h,E=function(t){return function(n){var r,i,a;return I((function(s){if(1==s.g)return b(s,o.addSegments([{data:n}]),2);r=s.h,cm(e),i=t.Pb.g,a=lv(i),c[a]=r[0],d+=n.byteLength,k(s)}))}}(f),hv(i,f.Pb.groupId,g,v,m,E);return b(_,function(e){return I((function(t){return 1==t.g?b(t,Promise.all(e.j.values()),2):t.return(e.g.h)}))}(i),2)}return p?(cm(e),am(s,r,u,a),b(_,o.updateManifest(n,r),0)):_.u(0)}))},f=!1,E(S,2),!rm(s)||!f||im(s)){S.u(4);break}return b(S,p(t.filter((function(e){return e.h})),!0),5);case 5:return cm(e),t=t.filter((function(e){return!e.h})),h=c,y=d,c={},d=0,b(S,nm(o,n,r,h,y,(function(){return cm(e)})),6);case 6:cm(e);case 4:if(f){S.u(7);break}return b(S,p(t,!1),8);case 8:return cm(e),g=c,v=d,c={},d=0,b(S,nm(o,n,r,g,v,(function(){return cm(e)})),9);case 9:cm(e);case 7:T(S,0);break;case 2:return m=A(S),_=Object.values(c),b(S,o.removeSegments(_,(function(){})),10);case 10:throw m}}))}(e,g,d,y,a,i,c.Ba,f,s),12);case 12:return cm(e),am(f,y,s,i),b(C,c.Ba.updateManifest(d,y),13);case 13:return cm(e),m=new Uv("manifest",c.path.fb,c.path.Ba,d),C.return(Yv(m,y));case 3:return S(C),b(C,u.destroy(),14);case 14:if(!o){C.u(15);break}return b(C,o.stop(),15);case 15:if(!s){C.u(17);break}return b(C,s.destroy(),17);case 17:w(C,0);break;case 2:if(_=A(C),null==d){C.u(19);break}return b(C,tm(d),19);case 19:throw p||_}}))}(this,e,t||{},(function(){var t;return I((function(a){return 1==a.g?n?a.u(2):b(a,Gl(e,r.g,i.manifest.retryParameters),3):(2!=a.g&&(n=a.h),t=Ma(e,n||null),a.return(t()))}))}),i,a),(t=new Gr(t,(function(){return fv(a)}))).finally((function(){Ae(r.j,a)})),function(e,t){var n=t.promise;return e.i.push(n),t.finally((function(){Ae(e.i,n)}))}(this,t)},n.remove=function(e){return pm(this,function(e,t){var n,r,i,a,o,s;return I((function(l){switch(l.g){case 1:if(dm(),null==(n=Bv(t))||"manifest"!=n.g)throw new bt(2,9,9004,t);return r=n,i=new Sv,_(l,2),b(l,i.init(),4);case 4:return b(l,Cv(i,r.fb(),r.Ba()),5);case 5:return b(l,(a=l.h).getManifests([r.key()]),6);case 6:return o=l.h,s=o[0],b(l,Promise.all([sm(e,s,i),lm(a,r,s)]),2);case 2:return S(l),b(l,i.destroy(),8);case 8:w(l,0)}}))}(this,e))},n.ki=function(){return pm(this,function(e){var t,n,r,i,a,o,s,u,c,d;return I((function(p){switch(p.g){case 1:return dm(),t=e.g,n=e.h.drm,r=new Sv,i=!1,_(p,2),b(p,r.init(),4);case 4:a=[],function(e,t){e.g.forEach((function(e){t(e.getEmeSessionCell())}))}(r,(function(e){return a.push(e)})),o=l(a),s=o.next();case 5:if(s.done){p.u(2);break}return b(p,(u=s.value).getAll(),8);case 8:return c=p.h,b(p,zv(n,t,c),9);case 9:return d=p.h,b(p,u.remove(d),10);case 10:d.length!=c.length&&(i=!0),s=o.next(),p.u(5);break;case 2:return S(p),b(p,r.destroy(),11);case 11:w(p,3);break;case 3:return p.return(!i)}}))}(this))},n.list=function(){return pm(this,I((function(r){switch(r.g){case 1:return dm(),e=[],t=new Sv,_(r,2),b(r,t.init(),4);case 4:return n=Promise.resolve(),function(e,t){e.g.forEach((function(e,n){e.getCells().forEach((function(e,r){t({fb:n,Ba:r},e)}))}))}(t,(function(t,r){n=n.then((function(){return I((function(n){if(1==n.g)return b(n,r.getAllManifests(),2);n.h.forEach((function(n,r){n=Yv(new Uv("manifest",t.fb,t.Ba,r),n),e.push(n)})),k(n)}))}))})),b(r,n,2);case 2:return S(r),b(r,t.destroy(),6);case 6:w(r,3);break;case 3:return r.return(e)}})));var e,t,n},n.oc=function(e,t,n){var r,i=this;return I((function(a){return 1==a.g?((r=new ra({zb:i.g,onError:t,fe:function(){},onExpirationUpdated:function(){},onEvent:function(){}})).configure(n.drm),b(a,function(e,t,n){return e.ia=!0,e.A=new Map,e.T=n,aa(e,t)}(r,e.variants,n.offline.usePersistentLicense),2)):3!=a.g?b(a,sa(r),3):a.return(r)}))},F("shaka.offline.Storage",Jv),Jv.deleteAll=function(){var e;return I((function(t){return 1==t.g?(e=new Sv,_(t,2),b(t,function(e){var t,n;return I((function(r){return 1==r.g?(t=Array.from(e.g.values()),(n=0<t.length)||Pv.forEach((function(e){(e=e())&&t.push(e)})),b(r,Promise.all(t.map((function(e){return e.erase()}))),2)):n?r.u(0):b(r,Promise.all(t.map((function(e){return e.destroy()}))),0)}))}(e),2)):5!=t.g?(S(t),b(t,e.destroy(),5)):w(t,0)}))},Jv.prototype.list=Jv.prototype.list,Jv.prototype.removeEmeSessions=Jv.prototype.ki,Jv.prototype.remove=Jv.prototype.remove,Jv.prototype.store=Jv.prototype.store,Jv.prototype.getNetworkingEngine=Jv.prototype.Wb,Jv.prototype.getConfiguration=Jv.prototype.getConfiguration,Jv.prototype.configure=Jv.prototype.configure,Jv.prototype.destroy=Jv.prototype.destroy,Jv.support=em;var hm=(new Map).set("org.w3.clearkey","1077efecc0b24d02ace33c1e52e2fb4b").set("com.widevine.alpha","edef8ba979d64acea3c827dcd51d21ed").set("com.microsoft.playready","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.recommendation","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.software","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.hardware","9a04f07998404286ab92e65be0885f95");function ym(){}function gm(e,t){for(e={priority:t||0,callback:e},t=0;t<vm.length;t++)if(vm[t].priority<e.priority)return void vm.splice(t,0,e);vm.push(e)}wc.offline=em,F("shaka.polyfill",ym),ym.register=gm,ym.installAll=function(){for(var e=l(vm),t=e.next();!t.done;t=e.next()){t=t.value;try{t.callback()}catch(e){Y("Error installing polyfill!",e)}}};var vm=[];function mm(){this.g=new km}function bm(){e.AbortController||(e.AbortController=mm,e.AbortSignal=km)}function km(){$r.call(this),this.h=!1,this.g=void 0,this.onabort=null}function Em(){}function _m(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var e=l(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),t=e.next();!t.done;t=e.next())Tm(t.value)}function Tm(e){var t="aria-"+e.toLowerCase().replace(/^aria/,"");Object.defineProperty(Element.prototype,e,{get:function(){return this.getAttribute(t)},set:function(e){null==e||null==e?this.removeAttribute(t):this.setAttribute(t,e)}})}function Am(){}function Sm(){FE()}function wm(){}function Cm(){if(e.Document){var t=Element.prototype;t.requestFullscreen=t.requestFullscreen||t.mozRequestFullScreen||t.msRequestFullscreen||t.webkitRequestFullscreen,(t=Document.prototype).exitFullscreen=t.exitFullscreen||t.mozCancelFullScreen||t.msExitFullscreen||t.webkitCancelFullScreen,"fullscreenElement"in document||(Object.defineProperty(document,"fullscreenElement",{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitCurrentFullScreenElement||document.webkitFullscreenElement}}),Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}})),document.addEventListener("webkitfullscreenchange",xm),document.addEventListener("webkitfullscreenerror",xm),document.addEventListener("mozfullscreenchange",xm),document.addEventListener("mozfullscreenerror",xm),document.addEventListener("MSFullscreenChange",xm),document.addEventListener("MSFullscreenError",xm)}}function xm(e){var t=e.type.replace(/^(webkit|moz|MS)/,"").toLowerCase(),n=document.createEvent("Event");n.initEvent(t,e.bubbles,e.cancelable),e.target.dispatchEvent(n)}function Pm(){}function Rm(){var e=!0;!Lt()||Lt()&&Ht("Android")||Lt()&&Ht("Fuchsia")||(e=!1),(Nt()||Ut()||Bt()||Dt()||Pt()||Ht("PC=EOS")||Ft())&&(e=!1),e&&navigator.mediaCapabilities||(navigator.mediaCapabilities||(navigator.mediaCapabilities={}),Dm=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=Im)}function Im(t){var n,r,i,a,o,s,l;return I((function(u){switch(u.g){case 1:if(n={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:t},r=t.video,i=t.audio,"media-source"!=t.type){if("file"!=t.type)return u.return(n);if(r&&(a=r.contentType,!St(a))||i&&(o=i.contentType,!St(o)))return u.return(n);u.u(2);break}if(!At())return u.return(n);if(!r){u.u(3);break}return b(u,function(t){var n,r;return I((function(i){return 1==i.g?Lt()?b(i,function(t){var n,r;return I((function(i){return 1==i.g?e.cast&&cast.__platform__&&cast.__platform__.canDisplayType?(n=t.contentType,t.width&&t.height&&(n+="; width="+t.width+"; height="+t.height),t.framerate&&(n+="; framerate="+t.framerate),"pq"===t.transferFunction&&(n+="; eotf=smpte2084"),r=!1,n in jm?(r=jm[n],i.u(2)):b(i,cast.__platform__.canDisplayType(n),3)):i.return(te(t.contentType)):(2!=i.g&&(r=i.h,jm[n]=r),i.return(r))}))}(t),3):Pt()?(n=t.contentType,t.width&&t.height&&(n+="; width="+t.width,n+="; height="+t.height),t.framerate&&(n+="; framerate="+t.framerate),t.bitrate&&(n+="; bitrate="+t.bitrate),i.return(te(n))):i.u(2):2!=i.g?(r=i.h,i.return(r)):i.return(te(t.contentType))}))}(r),4);case 4:if(!u.h)return u.return(n);case 3:if(i){var c=i.contentType;if(Lt()&&i.spatialRendering&&(c+="; spatialRendering=true"),!te(c))return u.return(n)}case 2:return t.keySystemConfiguration?(s=t.keySystemConfiguration,b(u,function(e,t,n){var r,i,a,o,s,l,u;return I((function(c){switch(c.g){case 1:if(r=[],i=[],n.audio&&(a={robustness:n.audio.robustness||"",contentType:t.contentType},Pt()&&t.contentType.includes('codecs="ac-3"')&&(a.contentType='audio/mp4; codecs="ec-3"'),n.audio.encryptionScheme&&(a.encryptionScheme=n.audio.encryptionScheme),r.push(a)),n.video&&(o={robustness:n.video.robustness||"",contentType:e.contentType},n.video.encryptionScheme&&(o.encryptionScheme=n.video.encryptionScheme),i.push(o)),s={initDataTypes:[n.initDataType],distinctiveIdentifier:n.distinctiveIdentifier,persistentState:n.persistentState,sessionTypes:n.sessionTypes},r.length&&(s.audioCapabilities=r),i.length&&(s.videoCapabilities=i),l=(e?e.contentType:"")+"#"+(t?t.contentType:"")+"#"+n.keySystem,u=null,E(c,2),l in Om){u=Om[l],c.u(4);break}return b(c,navigator.requestMediaKeySystemAccess(n.keySystem,[s]),5);case 5:u=c.h,Om[l]=u;case 4:T(c,3);break;case 2:A(c);case 3:return c.return(u)}}))}(r,i,s),6)):(n.supported=!0,u.return(n));case 6:(l=u.h)&&(n.supported=!0,n.keySystemAccess=l);case 5:return u.return(n)}}))}mm.prototype.abort=function(e){var t=this.g;t.h||(t.h=!0,t.g=e,void 0===t.g&&(t.g=new DOMException("signal is aborted without reason","AbortError")),e=new qr("abort"),t.onabort&&t.onabort(e),t.dispatchEvent(e))},a.Object.defineProperties(mm.prototype,{signal:{configurable:!0,enumerable:!0,get:function(){return this.g}}}),ym.AbortController=mm,mm.install=bm,y(km,$r),a.Object.defineProperties(km.prototype,{aborted:{configurable:!0,enumerable:!0,get:function(){return this.h}},reason:{configurable:!0,enumerable:!0,get:function(){return this.g}}}),gm(bm),ym.Aria=Em,Em.install=_m,gm(_m),ym.EncryptionScheme=Am,Am.install=Sm,gm(Sm,-2),ym.Fullscreen=wm,wm.install=Cm,gm(Cm),ym.MediaCapabilities=Pm,Pm.install=Rm;var Dm=null;Pm.originalMcap=Dm;var Om={};Pm.memoizedMediaKeySystemAccessRequests_=Om;var Lm,Mm,Nm,Um,Bm,Fm,jm={};function Hm(){}function Vm(){var t=jt();(e.MediaSource||e.ManagedMediaSource)&&(t?10>=t?e.MediaSource=null:12>=t?(Gm(),Km()):15>=t&&Gm():Ht("DT_STB_BCM")?(Gm(),Km()):(It()||Rt()||Ht("Tizen 4"))&&function(){var t=MediaSource.isTypeSupported.bind(MediaSource);if(MediaSource.isTypeSupported=function(e){return"opus"!=An(e)&&t(e)},e.ManagedMediaSource){var n=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);e.ManagedMediaSource.isTypeSupported=function(e){return"opus"!=An(e)&&n(e)}}}()),(e.MediaSource||e.ManagedMediaSource)&&function(){var t=MediaSource.isTypeSupported.bind(MediaSource);if(MediaSource.isTypeSupported=function(e){return"mp2t"!=_n(e)&&t(e)},e.ManagedMediaSource){var n=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);e.ManagedMediaSource.isTypeSupported=function(e){return"mp2t"!=_n(e)&&n(e)}}}(),e.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&function(){var e=MediaSource.isTypeSupported;Dt()||(MediaSource.isTypeSupported=function(t){var n=t.split(/ *; */),r=n.findIndex((function(e){return e.startsWith("codecs=")}));if(0>r)return e(t);var i=n[r].replace("codecs=","").replace(/"/g,"").split(/\s*,\s*/),a=i.findIndex((function(e){return e.startsWith("vp09")}));return 0<=a&&(i[a]="vp9",n[r]='codecs="'+i.join(",")+'"',t=n.join("; ")),e(t)})}()}function Gm(){var e=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var t=e.apply(this,D.apply(0,arguments));return t.abort=function(){},t}}function Km(){var e=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(t,n){return e.call(this,t,n-.001)}}function zm(){}function Wm(){screen.orientation&&screen.orientation.unlock||(null!=screen.orientation?(void 0===screen.orientation.lock&&(screen.orientation.lock=function(){return Promise.resolve()}),void 0===screen.orientation.unlock&&(screen.orientation.unlock=function(){})):null!=e.orientation&&function(){function t(){switch(e.orientation){case-90:n.type="landscape-secondary",n.angle=270;break;case 0:n.type="portrait-primary",n.angle=0;break;case 90:n.type="landscape-primary",n.angle=90;break;case 180:n.type="portrait-secondary",n.angle=180}}var n=new Ym;screen.orientation=n,t(),e.addEventListener("orientationchange",(function(){t();var e=new qr("change");n.dispatchEvent(e)}))}())}function Ym(){$r.call(this),this.type="",this.angle=0}function Zm(){}function qm(e,t){try{var n=new $m(e,t);return Promise.resolve(n)}catch(e){return Promise.reject(e)}}function Xm(e){var t=this.mediaKeys;return t&&t!=e&&eb(t,null),delete this.mediaKeys,(this.mediaKeys=e)?eb(e,this):Promise.resolve()}function Qm(e){if(ve(e=ye(e.initData)).getUint32(0,!0)+4!=e.byteLength)throw new RangeError("Malformed FairPlay init data");e=qt(e=Yt(e.subarray(4),!0));var t=new Event("encrypted");t.initDataType="skd",t.initData=he(e),this.dispatchEvent(t)}function $m(e,t){if(this.keySystem=e,e.startsWith("com.apple.fps"))for(t=(e=l(t)).next();!t.done;t=e.next()){var n=t.value;if("required"==n.persistentState)t=null;else{t={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:n.initDataTypes,sessionTypes:["temporary"],label:n.label};var r=!1,i=!1;if(n.audioCapabilities)for(var a=l(n.audioCapabilities),o=a.next();!o.done;o=a.next())(o=o.value).contentType&&(r=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,o.contentType.split(";")[0])&&(t.audioCapabilities.push(o),i=!0));if(n.videoCapabilities)for(o=(n=l(n.videoCapabilities)).next();!o.done;o=n.next())(a=o.value).contentType&&(r=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,a.contentType.split(";")[0])&&(t.videoCapabilities.push(a),i=!0));r||(i=WebKitMediaKeys.isTypeSupported(this.keySystem,"video/mp4")),t=i?t:null}if(t)return void(this.g=t)}throw(e=Error("Unsupported keySystem")).name="NotSupportedError",e.code=DOMException.NOT_SUPPORTED_ERR,e}function Jm(e){this.h=new WebKitMediaKeys(e),this.g=new $}function eb(e,t){if(e.g.ib(),!t)return Promise.resolve();e.g.D(t,"webkitneedkey",Qm);try{return fs(t,HTMLMediaElement.HAVE_METADATA,e.g,(function(){t.webkitSetMediaKeys(e.h)})),Promise.resolve()}catch(e){return Promise.reject(e)}}function tb(e){$r.call(this),this.i=null,this.l=e,this.g=this.h=null,this.j=new $,this.sessionId="",this.expiration=NaN,this.closed=new Vr,this.keyStatuses=new rb}function nb(e,t){var n=e.keyStatuses;n.size=null==t?0:1,n.g=t,t=new qr("keystatuseschange"),e.dispatchEvent(t)}function rb(){this.size=0,this.g=void 0}function ib(){}function ab(){e.MediaKeys&&(!MediaKeys.prototype.setServerCertificate||Rt()||Ht("Tizen 4")||Ht("Tizen 5.0")||Ot())&&(MediaKeys.prototype.setServerCertificate=ob)}function ob(){return Promise.resolve(!1)}function sb(){}function lb(){!e.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=ub,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=cb,e.MediaKeys=db,e.MediaKeySystemAccess=pb,e.shakaMediaKeysPolyfill=!0)}function ub(){return Promise.reject(Error("The key system specified is not supported."))}function cb(e){return null==e?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}function db(){throw new TypeError("Illegal constructor.")}function pb(){throw this.keySystem="",new TypeError("Illegal constructor.")}function fb(){}function hb(){if(!(!e.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)Cb="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=gb,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=vb,e.MediaKeys=bb,e.MediaKeySystemAccess=mb,e.shakaMediaKeysPolyfill=!0}}function yb(e){return Cb?Cb+e.charAt(0).toUpperCase()+e.slice(1):e}function gb(e,t){try{var n=new mb(e,t);return Promise.resolve(n)}catch(e){return Promise.reject(e)}}function vb(e){var t=this.mediaKeys;return t&&t!=e&&kb(t,null),delete this.mediaKeys,(this.mediaKeys=e)&&kb(e,this),Promise.resolve()}function mb(e,t){this.g=this.keySystem=e;var n=!1;"org.w3.clearkey"==e&&(this.g="webkit-org.w3.clearkey",n=!1);var r=!1,i=document.getElementsByTagName("video");i=i.length?i[0]:document.createElement("video");for(var a=(t=l(t)).next();!a.done;a=t.next()){var o={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:(a=a.value).initDataTypes,sessionTypes:["temporary"],label:a.label},s=!1;if(a.audioCapabilities)for(var u=l(a.audioCapabilities),c=u.next();!c.done;c=u.next())(c=c.value).contentType&&(s=!0,i.canPlayType(c.contentType.split(";")[0],this.g)&&(o.audioCapabilities.push(c),r=!0));if(a.videoCapabilities)for(c=(u=l(a.videoCapabilities)).next();!c.done;c=u.next())(c=c.value).contentType&&(s=!0,i.canPlayType(c.contentType,this.g)&&(o.videoCapabilities.push(c),r=!0));if(s||(r=i.canPlayType("video/mp4",this.g)||i.canPlayType("video/webm",this.g)),"required"==a.persistentState&&(n?(o.persistentState="required",o.sessionTypes=["persistent-license"]):r=!1),r)return void(this.h=o)}throw n="Unsupported keySystem","org.w3.clearkey"!=e&&"com.widevine.alpha"!=e||(n="None of the requested configurations were supported."),(e=Error(n)).name="NotSupportedError",e.code=DOMException.NOT_SUPPORTED_ERR,e}function bb(e){this.l=e,this.h=null,this.g=new $,this.i=[],this.j=new Map}function kb(e,t){e.h=t,e.g.ib();var n=Cb;t&&(e.g.D(t,n+"needkey",(function(t){var n=new CustomEvent("encrypted");n.initDataType="cenc",n.initData=he(t.initData),e.h.dispatchEvent(n)})),e.g.D(t,n+"keymessage",(function(t){var n=Eb(e,t.sessionId);n&&(t=new qr("message",t=(new Map).set("messageType",null==n.keyStatuses.Zb()?"licenserequest":"licenserenewal").set("message",t.message)),n.h&&(n.h.resolve(),n.h=null),n.dispatchEvent(t))})),e.g.D(t,n+"keyadded",(function(t){(t=Eb(e,t.sessionId))&&(Sb(t,"usable"),t.g&&t.g.resolve(),t.g=null)})),e.g.D(t,n+"keyerror",(function(t){var n=Eb(e,t.sessionId);if(n){var r=Error("EME v0.1b key error"),i=t.errorCode;i.systemCode=t.systemCode,r.errorCode=i,!t.sessionId&&n.h?(45==t.systemCode&&(r.message="Unsupported session type."),n.h.reject(r),n.h=null):t.sessionId&&n.g?(n.g.reject(r),n.g=null):(r=t.systemCode,t.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?Sb(n,"output-restricted"):Sb(n,1==r?"expired":"internal-error"))}})))}function Eb(e,t){var n=e.j.get(t);return n||((n=e.i.shift())?(n.sessionId=t,e.j.set(t,n),n):null)}function _b(e,t,n){$r.call(this),this.j=e,this.m=!1,this.g=this.h=null,this.i=t,this.l=n,this.sessionId="",this.expiration=NaN,this.closed=new Vr,this.keyStatuses=new wb}function Tb(e,t,n){if(e.m)return Promise.reject(Error("The session is already initialized."));e.m=!0;try{if("persistent-license"==e.l)if(n)var r=ye(qt("LOAD_SESSION|"+n));else{var i=qt("PERSISTENT|");r=sn(i,t)}else r=ye(t)}catch(e){return Promise.reject(e)}e.h=new Vr;var a=yb("generateKeyRequest");try{e.j[a](e.i,r)}catch(t){if("InvalidStateError"!=t.name)return e.h=null,Promise.reject(t);new Tt((function(){try{e.j[a](e.i,r)}catch(t){e.h.reject(t),e.h=null}})).U(.01)}return e.h}function Ab(e,t,n){if(e.g)e.g.then((function(){return Ab(e,t,n)})).catch((function(){return Ab(e,t,n)}));else{if(e.g=t,"webkit-org.w3.clearkey"==e.i){var r=Wt(n),i=JSON.parse(r);"oct"!=i.keys[0].kty&&(e.g.reject(Error("Response is not a valid JSON Web Key Set.")),e.g=null),r=rn(i.keys[0].k),i=rn(i.keys[0].kid)}else r=ye(n),i=null;var a=yb("addKey");try{e.j[a](e.i,r,i,e.sessionId)}catch(t){e.g.reject(t),e.g=null}}}function Sb(e,t){var n=e.keyStatuses;n.size=null==t?0:1,n.g=t,t=new qr("keystatuseschange"),e.dispatchEvent(t)}function wb(){this.size=0,this.g=void 0}Pm.memoizedCanDisplayTypeRequests_=jm,gm(Rm,-1),ym.MediaSource=Hm,Hm.install=Vm,gm(Vm),ym.Orientation=zm,zm.install=Wm,y(Ym,$r),Ym.prototype.lock=function(e){function t(e){return screen.lockOrientation?screen.lockOrientation(e):screen.mozLockOrientation?screen.mozLockOrientation(e):!!screen.msLockOrientation&&screen.msLockOrientation(e)}var n=!1;switch(e){case"natural":n=t("default");break;case"any":n=!0,this.unlock();break;default:n=t(e)}return n?Promise.resolve():((e=Error("screen.orientation.lock() is not available on this device")).name="NotSupportedError",e.code=DOMException.NOT_SUPPORTED_ERR,Promise.reject(e))},Ym.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()},gm(Wm),ym.PatchedMediaKeysApple=Zm,Zm.uninstall=function(){Lm&&(Lm=!1,Object.defineProperty(HTMLMediaElement.prototype,"mediaKeys",Mm),HTMLMediaElement.prototype.setMediaKeys=Nm,e.MediaKeys=Um,e.MediaKeySystemAccess=Bm,navigator.requestMediaKeySystemAccess=Fm,Mm=Fm=Nm=Bm=Um=null,e.shakaMediaKeysPolyfill=!1)},Zm.install=function(t){e.HTMLVideoElement&&e.WebKitMediaKeys&&(void 0!==t&&t&&(Lm=!0,Mm=Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype,"mediaKeys"),Nm=HTMLMediaElement.prototype.setMediaKeys,Um=e.MediaKeys,Bm=e.MediaKeySystemAccess,Fm=navigator.requestMediaKeySystemAccess),delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=Xm,e.MediaKeys=Jm,e.MediaKeySystemAccess=$m,navigator.requestMediaKeySystemAccess=qm,e.shakaMediaKeysPolyfill=!0)},$m.prototype.createMediaKeys=function(){var e=new Jm(this.keySystem);return Promise.resolve(e)},$m.prototype.getConfiguration=function(){return this.g},Jm.prototype.createSession=function(e){if("temporary"!=(e=e||"temporary"))throw new TypeError("Session type "+e+" is unsupported on this platform.");return new tb(this.h,e)},Jm.prototype.setServerCertificate=function(){return Promise.resolve(!1)},Jm.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")},y(tb,$r),(n=tb.prototype).generateRequest=function(e,t){var n=this;this.h=new Vr;try{var r=this.l.createSession("video/mp4",ye(t));this.i=r,this.sessionId=r.sessionId||"",this.j.D(this.i,"webkitkeymessage",(function(e){n.h&&(n.h.resolve(),n.h=null),e=new qr("message",e=(new Map).set("messageType",null==n.keyStatuses.Zb()?"license-request":"license-renewal").set("message",he(e.message))),n.dispatchEvent(e)})),this.j.D(r,"webkitkeyadded",(function(){n.g&&(nb(n,"usable"),n.g.resolve(),n.g=null)})),this.j.D(r,"webkitkeyerror",(function(){var e=Error("EME PatchedMediaKeysApple key error");if(e.errorCode=n.i.error,null!=n.h)n.h.reject(e),n.h=null;else if(null!=n.g)n.g.reject(e),n.g=null;else switch(n.i.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:nb(n,"output-not-allowed");break;default:nb(n,"internal-error")}})),nb(this,"status-pending")}catch(e){this.h.reject(e)}return this.h},n.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))},n.update=function(e){this.g=new Vr;try{this.i.update(ye(e))}catch(e){this.g.reject(e)}return this.g},n.close=function(){try{this.i.close(),this.closed.resolve(),this.j.ib()}catch(e){this.closed.reject(e)}return this.closed},n.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))},(n=rb.prototype).Zb=function(){return this.g},n.forEach=function(e){this.g&&e(this.g,Ca.value())},n.get=function(e){if(this.has(e))return this.g},n.has=function(e){var t=Ca.value();return!(!this.g||!pe(e,t))},n.entries=function(){},n.keys=function(){},n.values=function(){},ym.PatchedMediaKeysCert=ib,ib.install=ab,gm(ab),ym.PatchedMediaKeysNop=sb,sb.install=lb,db.prototype.createSession=function(){},db.prototype.setServerCertificate=function(){},db.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")},pb.prototype.getConfiguration=function(){},pb.prototype.createMediaKeys=function(){},gm(lb,-10),ym.PatchedMediaKeysWebkit=fb,fb.install=hb,mb.prototype.createMediaKeys=function(){var e=new bb(this.g);return Promise.resolve(e)},mb.prototype.getConfiguration=function(){return this.h},bb.prototype.createSession=function(e){if("temporary"!=(e=e||"temporary")&&"persistent-license"!=e)throw new TypeError("Session type "+e+" is unsupported on this platform.");var t=this.h||document.createElement("video");return t.src||(t.src="about:blank"),e=new _b(t,this.l,e),this.i.push(e),e},bb.prototype.setServerCertificate=function(){return Promise.resolve(!1)},bb.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")},y(_b,$r),(n=_b.prototype).generateRequest=function(e,t){return Tb(this,t,null)},n.load=function(e){return"persistent-license"==this.l?Tb(this,null,e):Promise.reject(Error("Not a persistent session."))},n.update=function(e){var t=new Vr;return Ab(this,t,e),t},n.close=function(){if("persistent-license"!=this.l){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var e=yb("cancelKeyRequest");try{this.j[e](this.i,this.sessionId)}catch(e){}}return this.closed.resolve(),this.closed},n.remove=function(){return"persistent-license"!=this.l?Promise.reject(Error("Not a persistent session.")):this.close()},(n=wb.prototype).Zb=function(){return this.g},n.forEach=function(e){this.g&&e(this.g,Ca.value())},n.get=function(e){if(this.has(e))return this.g},n.has=function(e){var t=Ca.value();return!(!this.g||!pe(e,t))},n.entries=function(){},n.keys=function(){},n.values=function(){};var Cb="";function xb(){}function Pb(){if(e.HTMLVideoElement){var t=HTMLVideoElement.prototype;t.requestPictureInPicture&&document.exitPictureInPicture||!t.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,t.requestPictureInPicture=Ib,Object.defineProperty(t,"disablePictureInPicture",{get:Ob,set:Lb,enumerable:!0,configurable:!0}),document.exitPictureInPicture=Db,document.addEventListener("webkitpresentationmodechanged",Rb,!0))}}function Rb(e){if("picture-in-picture"==(e=e.target).webkitPresentationMode){document.pictureInPictureElement=e;var t=new Event("enterpictureinpicture");e.dispatchEvent(t)}else document.pictureInPictureElement==e&&(document.pictureInPictureElement=null),t=new Event("leavepictureinpicture"),e.dispatchEvent(t)}function Ib(){return this.webkitSupportsPresentationMode("picture-in-picture")?(this.webkitSetPresentationMode("picture-in-picture"),document.pictureInPictureElement=this,Promise.resolve()):Promise.reject(Error("PiP not allowed by video element"))}function Db(){var e=document.pictureInPictureElement;return e?(e.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}function Ob(){return!!this.hasAttribute("disablePictureInPicture")||!this.webkitSupportsPresentationMode("picture-in-picture")}function Lb(e){e?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}function Mb(){}function Nb(){e.crypto&&("randomUUID"in e.crypto||(e.crypto.randomUUID=Ub))}function Ub(){var e=URL.createObjectURL(new Blob),t=e.toString();return URL.revokeObjectURL(e),t.substr(t.lastIndexOf("/")+1)}function Bb(){}function Fb(){var e=Symbol.prototype;"description"in e||Object.defineProperty(e,"description",{get:jb})}function jb(){var e=/\((.*)\)/.exec(this.toString());return e?e[1]:void 0}function Hb(){}function Vb(){if(e.HTMLMediaElement){var t=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var e=t.apply(this);return e&&e.catch((function(){})),e}}}function Gb(){}function Kb(){if(e.HTMLVideoElement){var t=HTMLVideoElement.prototype;!t.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in t||Ot())&&(t.getVideoPlaybackQuality=zb)}}function zb(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}function Wb(){}function Yb(){if(!e.VTTCue&&e.TextTrackCue){var t=null,n=TextTrackCue.length;if(3==n)t=Zb;else if(6==n)t=qb;else{try{var r=!!Zb(1,2,"")}catch(e){r=!1}r&&(t=Zb)}t&&(e.VTTCue=function(e,n,r){return t(e,n,r)})}}function Zb(t,n,r){return new e.TextTrackCue(t,n,r)}function qb(t,n,r){return new e.TextTrackCue(t+"-"+n+"-"+r,t,n,r)}function Xb(){}gm(hb),ym.PiPWebkit=xb,xb.install=Pb,gm(Pb),ym.RandomUUID=Mb,Mb.install=Nb,gm(Nb),ym.Symbol=Bb,Bb.install=Fb,gm(Fb),ym.VideoPlayPromise=Hb,Hb.install=Vb,gm(Vb),ym.VideoPlaybackQuality=Gb,Gb.install=Kb,gm(Kb),ym.VTTCue=Wb,Wb.install=Yb,gm(Yb),Xb.prototype.parseInit=function(){},Xb.prototype.setSequenceMode=function(){},Xb.prototype.setManifestType=function(){},Xb.prototype.parseMedia=function(e,t){for(var n=null,r=[],i=(e=l(e=Wt(e).split(/\r?\n/))).next();!i.done;i=e.next())if((i=i.value)&&!/^\s+$/.test(i)&&(i=Qb.exec(i))){var a=$b.exec(i[1]);i=new Ce(a=60*parseInt(a[1],10)+parseFloat(a[2].replace(",",".")),t.segmentEnd?t.segmentEnd:a+2,i[2]),n&&(n.endTime=a,r.push(n)),n=i}return n&&r.push(n),r},F("shaka.text.LrcTextParser",Xb),Xb.prototype.parseMedia=Xb.prototype.parseMedia,Xb.prototype.setManifestType=Xb.prototype.setManifestType,Xb.prototype.setSequenceMode=Xb.prototype.setSequenceMode,Xb.prototype.parseInit=Xb.prototype.parseInit;var Qb=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,$b=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;function Jb(){}function ek(e,t,n,r,i,a,o,s,u,c,d,p){var f=c;if(Mi(e)){if(!d)return null;var h={tagName:"span",children:[Ui(e)],attributes:{},parent:null}}else h=e;for(var y=null,g=l(wk),v=g.next();!v.done&&!(y=ok(h,"backgroundImage",r,"#",v.value)[0]);v=g.next());g=null;var m=zi(h,wk,"backgroundImage");if(p&&m&&!m.startsWith("#")&&(v=new rt(p),m=new rt(m),(v=v.resolve(m).toString())&&(g=v)),("p"==e.tagName||y||g)&&(d=!0),e=d,v="default"==(h.attributes["xml:space"]||(s?"default":"preserve")),s=[],!(m=h.children.every(Mi)))for(var b=l(h.children),k=b.next();!k.done;k=b.next())(k=ek(k.value,t,n,r,i,a,o,v,u,h,d,p))&&s.push(k);if(r=null!=c,p=Ui(h),p=h.children.length&&p&&/\S/.test(p),!((k=h.attributes.begin||h.attributes.end||h.attributes.dur)||p||"br"==h.tagName||0!=s.length||r&&!v))return null;for(p=(b=lk(h,n)).start,b=b.end;f&&f.tagName&&"tt"!=f.tagName;)p=(b=sk(f,n,p,b)).start,b=b.end,f=f.parent;if(null==p&&(p=0),p+=t.periodStart,b=null==b?1/0:b+t.periodStart,p=Math.max(p,t.segmentStart),b=Math.min(b,t.segmentEnd),!k&&0<s.length)for(p=1/0,b=0,n=(t=l(s)).next();!n.done;n=t.next())n=n.value,p=Math.min(p,n.startTime),b=Math.max(b,n.endTime);if("br"==h.tagName)return(i=new Ce(p,b,"")).lineBreak=!0,i;if(t="",m&&(t=$t(Ui(h)||""),v&&(t=t.replace(/\s+/g," "))),(t=new Ce(p,b,t)).nestedCues=s,d||(t.isContainer=!0),u&&(t.cellResolution=u),u=ok(h,"region",a,"")[0],h.attributes.region&&u&&u.attributes["xml:id"]){var E=u.attributes["xml:id"];t.region=o.filter((function(e){return e.id==E}))[0]}return o=u,c&&r&&!h.attributes.region&&!h.attributes.style&&(o=ok(c,"region",a,"")[0]),function(e,t,n,r,i,a,o,s){o=o||s,"rtl"==nk(t,n,a,"direction",o)&&(e.direction="rtl"),s=nk(t,n,a,"writingMode",o),"tb"==s||"tblr"==s?e.writingMode="vertical-lr":"tbrl"==s?e.writingMode="vertical-rl":"rltb"==s||"rl"==s?e.direction="rtl":s&&(e.direction=Me),(s=nk(t,n,a,"textAlign",!0))?(e.positionAlign=Tk[s],e.lineAlign=_k[s],e.textAlign=De[s.toUpperCase()]):e.textAlign=Ie,(s=nk(t,n,a,"displayAlign",!0))&&(e.displayAlign=Le[s.toUpperCase()]);(s=nk(t,n,a,"color",o))&&(e.color=s);(s=nk(t,n,a,"backgroundColor",o))&&(e.backgroundColor=s);(s=nk(t,n,a,"border",o))&&(e.border=s);if(s=nk(t,n,a,"fontFamily",o))switch(s){case"monospaceSerif":e.fontFamily="Courier New,Liberation Mono,Courier,monospace";break;case"proportionalSansSerif":e.fontFamily="Arial,Helvetica,Liberation Sans,sans-serif";break;case"sansSerif":e.fontFamily="sans-serif";break;case"monospaceSansSerif":e.fontFamily="Consolas,monospace";break;case"proportionalSerif":e.fontFamily="serif";break;default:e.fontFamily=s}(s=nk(t,n,a,"fontWeight",o))&&"bold"==s&&(e.fontWeight=700),s=nk(t,n,a,"wrapOption",o),e.wrapLine=!s||"noWrap"!=s,(s=nk(t,n,a,"lineHeight",o))&&s.match(hk)&&(e.lineHeight=s),(s=nk(t,n,a,"fontSize",o))&&(s.match(hk)||s.match(fk))&&(e.fontSize=s),(s=nk(t,n,a,"fontStyle",o))&&(e.fontStyle=Ke[s.toUpperCase()]);r?(i=r.attributes.imageType||r.attributes.imagetype,s=r.attributes.encoding,r=Ui(r).trim(),"PNG"==i&&"Base64"==s&&r&&(e.backgroundImage="data:image/png;base64,"+r)):i&&(e.backgroundImage=i),(r=nk(t,n,a,"textOutline",o))&&(r=r.split(" "),r[0].match(hk)?e.textStrokeColor=e.color:(e.textStrokeColor=r[0],r.shift()),r[0]&&r[0].match(hk)?e.textStrokeWidth=r[0]:e.textStrokeColor="");(r=nk(t,n,a,"letterSpacing",o))&&r.match(hk)&&(e.letterSpacing=r),(r=nk(t,n,a,"linePadding",o))&&r.match(hk)&&(e.linePadding=r),(r=nk(t,n,a,"opacity",o))&&(e.opacity=parseFloat(r));(r=rk(n,a,"textDecoration"))&&tk(e,r),(r=ik(t,a,"textDecoration"))&&tk(e,r),(r=nk(t,n,a,"textCombine",o))&&(e.textCombineUpright=r);switch(nk(t,n,a,"ruby",o)){case"container":e.rubyTag="ruby";break;case"text":e.rubyTag="rt"}}(t,h,o,y,g,i,e,0==s.length),t}function tk(e,t){for(var n=(t=l(t.split(" "))).next();!n.done;n=t.next())switch(n.value){case"underline":e.textDecoration.includes("underline")||e.textDecoration.push("underline");break;case"noUnderline":e.textDecoration.includes("underline")&&Ae(e.textDecoration,"underline");break;case"lineThrough":e.textDecoration.includes("lineThrough")||e.textDecoration.push("lineThrough");break;case"noLineThrough":e.textDecoration.includes("lineThrough")&&Ae(e.textDecoration,"lineThrough");break;case"overline":e.textDecoration.includes("overline")||e.textDecoration.push("overline");break;case"noOverline":e.textDecoration.includes("overline")&&Ae(e.textDecoration,"overline")}}function nk(e,t,n,r,i){return i=void 0===i||i,(e=ik(e,n,r))?e:i?rk(t,n,r):null}function rk(e,t,n){if(!e)return null;var r=zi(e,Sk,n);return r||ak(e,t,n)}function ik(e,t,n){var r=zi(e,Sk,n);return r||ak(e,t,n)}function ak(e,t,n){e=ok(e,"style",t,"");for(var r=null,i=0;i<e.length;i++){var a=Gi(e[i],"urn:ebu:tt:style",n);a||(a=zi(e[i],Sk,n)),a||(a=ik(e[i],t,n)),a&&(r=a)}return r}function ok(e,t,n,r,i){var a=[];if(!e||1>n.length)return a;var o=e;for(e=null;!e&&!(e=i?Gi(o,i,t):o.attributes[t])&&(o=o.parent););if(t=e)for(i=(t=l(t.split(" "))).next();!i.done;i=t.next())for(i=i.value,o=(e=l(n)).next();!o.done;o=e.next())if(r+(o=o.value).attributes["xml:id"]==i){a.push(o);break}return a}function sk(e,t,n,r){return e=lk(e,t),null==n?n=e.start:null!=e.start&&(n+=e.start),null==r?r=e.end:null!=e.start&&(r+=e.start),{start:n,end:r}}function lk(e,t){var n=uk(e.attributes.begin,t),r=uk(e.attributes.end,t);return e=uk(e.attributes.dur,t),null==r&&null!=e&&(r=n+e),{start:n,end:r}}function uk(e,t){var n=null;if(gk.test(e)){e=gk.exec(e),n=Number(e[1]);var r=Number(e[2]),i=Number(e[3]),a=Number(e[4]);n=(i+=(a+=(Number(e[5])||0)/t.h)/t.frameRate)+60*r+3600*n}else if(vk.test(e))n=ck(vk,e);else if(mk.test(e))n=ck(mk,e);else if(bk.test(e))e=bk.exec(e),n=Number(e[1])/t.frameRate;else if(kk.test(e))e=kk.exec(e),n=Number(e[1])/t.g;else if(Ek.test(e))n=ck(Ek,e);else if(e)throw new bt(2,2,2001,"Could not parse cue time range in TTML");return n}function ck(e,t){return null==(e=e.exec(t))||""==e[0]?null:(Number(e[4])||0)/1e3+(Number(e[3])||0)+60*(Number(e[2])||0)+3600*(Number(e[1])||0)}function dk(e,t,n,r){this.frameRate=Number(e)||30,this.h=Number(t)||1,this.g=Number(r),0==this.g&&(this.g=e?this.frameRate*this.h:1),n&&(e=/^(\d+) (\d+)$/g.exec(n))&&(this.frameRate*=Number(e[1])/Number(e[2]))}Mn["application/x-subtitle-lrc"]=function(){return new Xb},Jb.prototype.parseInit=function(){},Jb.prototype.setSequenceMode=function(){},Jb.prototype.setManifestType=function(){},Jb.prototype.parseMedia=function(e,t,n){var r=Wt(e);if(e=[],""==r)return e;var i=Oi(r,"tt");if(!i)throw new bt(2,2,2005,"Failed to parse TTML.");if(!(r=Fi(i,"body")[0]))return[];var a=zi(i,Ak,"frameRate"),o=zi(i,Ak,"subFrameRate"),s=zi(i,Ak,"frameRateMultiplier"),u=zi(i,Ak,"tickRate"),c=zi(i,Ak,"cellResolution"),d=i.attributes["xml:space"]||"default",p=zi(i,Sk,"extent");if("default"!=d&&"preserve"!=d)throw new bt(2,2,2005,"Invalid xml:space value: "+d);d="default"==d,a=new dk(a,o,s,u),c=c&&(c=/^(\d+) (\d+)$/.exec(c))?{Sb:parseInt(c[1],10),rows:parseInt(c[2],10)}:null,o=(o=Fi(i,"metadata")[0])?o.children:[],s=Fi(i,"style"),u=[];for(var f=l(i=Fi(i,"region")),h=f.next();!h.done;h=f.next()){var y=h.value;h=new ze;var g=y.attributes["xml:id"];if(g){h.id=g;var v=null;p&&(v=pk.exec(p)||yk.exec(p)),g=v?Number(v[1]):null,v=v?Number(v[2]):null;var m,b=rk(y,s,"extent");if(b){var k=(m=pk.exec(b))||yk.exec(b);null!=k&&(h.width=Number(k[1]),h.height=Number(k[2]),m||(null!=g&&(h.width=100*h.width/g),null!=v&&(h.height=100*h.height/v)),h.widthUnits=m||null!=g?We:0,h.heightUnits=m||null!=v?We:0)}(y=rk(y,s,"origin"))&&(null!=(k=(m=pk.exec(y))||yk.exec(y))&&(h.viewportAnchorX=Number(k[1]),h.viewportAnchorY=Number(k[2]),m?b||(h.width=100-h.viewportAnchorX,h.widthUnits=We,h.height=100-h.viewportAnchorY,h.heightUnits=We):(null!=v&&(h.viewportAnchorY=100*h.viewportAnchorY/v),null!=g&&(h.viewportAnchorX=100*h.viewportAnchorX/g)),h.viewportAnchorUnits=m||null!=g?We:0))}else h=null;h&&u.push(h)}if(Ni(r,"p").length)throw new bt(2,2,2001,"<p> can only be inside <div> in TTML");for(f=(p=l(Ni(r,"div"))).next();!f.done;f=p.next())if(Ni(f.value,"span").length)throw new bt(2,2,2001,"<span> can only be inside <p> in TTML");return(t=ek(r,t,a,o,s,i,u,d,c,null,!1,n))&&(t.backgroundColor||(t.backgroundColor="transparent"),e.push(t)),e},F("shaka.text.TtmlTextParser",Jb),Jb.prototype.parseMedia=Jb.prototype.parseMedia,Jb.prototype.setManifestType=Jb.prototype.setManifestType,Jb.prototype.setSequenceMode=Jb.prototype.setSequenceMode,Jb.prototype.parseInit=Jb.prototype.parseInit;var pk=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,fk=/^(\d{1,2}(?:\.\d+)?|100)%$/,hk=/^(\d+px|\d+em|\d*\.?\d+c)$/,yk=/^(\d+)px (\d+)px$/,gk=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,vk=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,mk=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,bk=/^(\d*(?:\.\d*)?)f$/,kk=/^(\d*(?:\.\d*)?)t$/,Ek=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),_k={left:Be,center:"center",right:"end",start:Be,end:"end"},Tk={left:"line-left",center:"center",right:"line-right"},Ak=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],Sk=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],wk=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];function Ck(){this.g=new Jb}function xk(){this.h=!1,this.g="UNKNOWN"}function Pk(e){for(var t=l(Object.entries(je)),n=t.next();!n.done;n=t.next()){var r=l(n.value);n=r.next().value,r=r.next().value;var i=new Ce(0,0,"");i.color=r,e.set("."+n,i)}for(n=(t=l(Object.entries(He))).next();!n.done;n=t.next())n=(r=l(n.value)).next().value,r=r.next().value,(i=new Ce(0,0,"")).backgroundColor=r,e.set("."+n,i)}function Rk(e,t,n){if(e.includes("<")){0===n.size&&Pk(n);var r=e;e=[];for(var i=-1,a=0;a<r.length;a++)"<"===r[a]?i=a+1:">"===r[a]&&0<i&&((i=r.substr(i,a-i)).match(Mk)&&e.push(i),i=-1);for(a=(e=l(e)).next();!a.done;a=e.next())a=a.value,r=r.replace("<"+a+">",'<div time="'+a+'">'),r+="</div>";e:{a=e=r,i=[];var o=-1;e="",r=!1;for(var s=0;s<a.length;s++)if("/"===a[s]){var u=a.indexOf(">",s);if(-1===u){e=a;break e}if((u=a.substring(s+1,u))&&"v"==u){r=!0;var c=null;if(i.length&&(c=i[i.length-1]),c){if(c===u)e+="/"+u+">";else{if(!c.startsWith("v")){e+=a[s];continue}e+="/"+c+">"}s+=u.length+1}else e+=a[s]}else e+=a[s]}else"<"===a[s]?"v"!=a[o=s+1]&&(o=-1):">"===a[s]&&0<o&&(i.push(a.substr(o,s-o)),o=-1),e+=a[s];for(i=(a=l(i)).next();!i.done;i=a.next())o=(i=i.value).replace(" ",".voice-"),e=(e=e.replace("<"+i+">","<"+o+">")).replace("</"+i+">","</"+o+">"),r||(e+="</"+o+">")}e=function(e){var t={"< ":""," >":" &gt;"},n=/(< +>|<\s|\s>)/g,r=RegExp(n.source);return e&&r.test(e)?e.replace(n,(function(e){return t[e]||""})):e||""}(e);try{var d=Oi("<span>"+e+"</span>","span")}catch(e){}if(d)if(1!=(d=d.children).length||d[0].tagName)for(e=(d=l(d)).next();!e.done;e=d.next())Dk(e.value,t,n);else t.payload=$t(e);else t.payload=$t(e)}else t.payload=$t(e)}function Ik(e,t){return e&&0<e.length?e:t}function Dk(e,t,n){var r=t.clone();if(r.nestedCues=[],r.payload="",r.rubyTag="",r.line=null,r.region=new ze,r.position=null,r.size=0,e.tagName)for(var i=l(e.tagName.split(/(?=[ .])+/g)),a=i.next();!a.done;a=i.next()){var o=a=a.value;if(o.startsWith(".voice-")){var s=o.split("-").pop();o='v[voice="'+s+'"]',n.has(o)||(o="v[voice="+s+"]")}switch(n.has(o)&&(o=n.get(o))&&(r.backgroundColor=Ik(o.backgroundColor,r.backgroundColor),r.color=Ik(o.color,r.color),r.fontFamily=Ik(o.fontFamily,r.fontFamily),r.fontSize=Ik(o.fontSize,r.fontSize),r.textShadow=Ik(o.textShadow,r.textShadow),r.fontWeight=o.fontWeight,r.fontStyle=o.fontStyle,r.opacity=o.opacity,r.rubyTag=o.rubyTag,r.textCombineUpright=o.textCombineUpright,r.wrapLine=o.wrapLine),a){case"br":return r=xe(r.startTime,r.endTime),void t.nestedCues.push(r);case"b":r.fontWeight=700;break;case"i":r.fontStyle="italic";break;case"u":r.textDecoration.push("underline");break;case"font":(a=e.attributes.color)&&(r.color=a);break;case"div":if(!(a=e.attributes.time))break;(a=Lk(new ay(a)))&&(r.startTime=a);break;case"ruby":case"rp":case"rt":r.rubyTag=a}}if(i=e.children,Mi(e)||1==i.length&&Mi(i[0]))for(n=Ui(e).split("\n"),e=!0,i=(n=l(n)).next();!i.done;i=n.next())i=i.value,e||(e=xe(r.startTime,r.endTime),t.nestedCues.push(e)),0<i.length&&((e=r.clone()).payload=$t(i),t.nestedCues.push(e)),e=!1;else for(t.nestedCues.push(r),e=(t=l(i)).next();!e.done;e=t.next())Dk(e.value,r,n)}function Ok(e,t,n){var r;(r=/^align:(start|middle|center|end|left|right)$/.exec(t))?(t=r[1],e.textAlign="middle"==t?Ie:De[t.toUpperCase()]):(r=/^vertical:(lr|rl)$/.exec(t))?e.writingMode="lr"==r[1]?"vertical-lr":"vertical-rl":(r=/^size:([\d.]+)%$/.exec(t))?e.size=Number(r[1]):(r=/^position:([\d.]+)%(?:,(line-left|line-right|middle|center|start|end|auto))?$/.exec(t))?(e.position=Number(r[1]),r[2]&&(t=r[2],e.positionAlign="line-left"==t||"start"==t?"line-left":"line-right"==t||"end"==t?"line-right":"center"==t||"middle"==t?"center":Re)):(r=/^region:(.*)$/.exec(t))?(t=function(e,t){return e=e.filter((function(e){return e.id==t})),e.length?e[0]:null}(n,r[1]))&&(e.region=t):(n=/^line:([\d.]+)%(?:,(start|end|center))?$/.exec(t))?(e.lineInterpretation=1,e.line=Number(n[1]),n[2]&&(e.lineAlign=Fe[n[2].toUpperCase()])):(n=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(t))&&(e.lineInterpretation=Ue,e.line=Number(n[1]),n[2]&&(e.lineAlign=Fe[n[2].toUpperCase()]))}function Lk(e){if(null==(e=sy(e,Mk)))return null;var t=Number(e[2]),n=Number(e[3]);return 59<t||59<n?null:Number(e[4])/1e3+n+60*t+3600*(Number(e[1])||0)}Mn["application/ttml+xml"]=function(){return new Jb},Ck.prototype.parseInit=function(e){var t=!1;if((new bi).box("moov",ki).box("trak",ki).box("mdia",ki).box("minf",ki).box("stbl",ki).O("stsd",Ei).box("stpp",(function(e){t=!0,e.parser.stop()})).parse(e),!t)throw new bt(2,2,2007)},Ck.prototype.setSequenceMode=function(){},Ck.prototype.setManifestType=function(){},Ck.prototype.parseMedia=function(e,t,n){var r=this,i=!1,a=[];if((new bi).box("mdat",Ai((function(e){i=!0,a=a.concat(r.g.parseMedia(e,t,n))}))).parse(e,!1),!i)throw new bt(2,2,2007);return a},F("shaka.text.Mp4TtmlParser",Ck),Ck.prototype.parseMedia=Ck.prototype.parseMedia,Ck.prototype.setManifestType=Ck.prototype.setManifestType,Ck.prototype.setSequenceMode=Ck.prototype.setSequenceMode,Ck.prototype.parseInit=Ck.prototype.parseInit,Mn['application/mp4; codecs="stpp"']=function(){return new Ck},Mn['application/mp4; codecs="stpp.ttml"']=function(){return new Ck},Mn['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new Ck},Mn['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new Ck},xk.prototype.parseInit=function(){},xk.prototype.setSequenceMode=function(e){this.h=e},xk.prototype.setManifestType=function(e){this.g=e},xk.prototype.parseMedia=function(e,t){var n=(e=(e=Wt(e)).replace(/\r\n|\r(?=[^\n]|$)/gm,"\n")).split(/\n{2,}/m);if(!/^WEBVTT($|[ \t\n])/m.test(n[0]))throw new bt(2,2,2e3);if(e=t.vttOffset,n[0].includes("X-TIMESTAMP-MAP")&&"HLS"==this.g)if(this.h){var r=n[0];if(e=r.match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m),r=r.match(/MPEGTS:(\d+)/m),!e||!r)throw new bt(2,2,2e3);if(null==(e=Lk(new ay(e[1]))))throw new bt(2,2,2e3);e=t.periodStart+Number(r[1])/9e4-e}else e=t.segmentStart;t=[];for(var i=(r=l(n[0].split("\n"))).next();!i.done;i=r.next())if(i=i.value,/^Region:/.test(i)){i=new ay(i);var a=new ze;ly(i),oy(i);for(var o=ly(i);o;){var s=a,u=o;(o=/^id=(.*)$/.exec(u))?s.id=o[1]:(o=/^width=(\d{1,2}|100)%$/.exec(u))?s.width=Number(o[1]):(o=/^lines=(\d+)$/.exec(u))?(s.height=Number(o[1]),s.heightUnits=2):(o=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(u))?(s.regionAnchorX=Number(o[1]),s.regionAnchorY=Number(o[2])):(o=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(u))?(s.viewportAnchorX=Number(o[1]),s.viewportAnchorY=Number(o[2])):/^scroll=up$/.exec(u)&&(s.scroll="up"),oy(i),o=ly(i)}t.push(a)}for(Pk(r=new Map),i=[],a=(n=l(n.slice(1))).next();!a.done;a=n.next()){if((1!=(a=a.value.split("\n")).length||a[0])&&!/^NOTE($|[ \t])/.test(a[0])&&"STYLE"==a[0]){for(s=[],o=-1,u=1;u<a.length;u++)a[u].includes("::cue")&&(s.push([]),o=s.length-1),-1!=o&&(s[o].push(a[u]),a[u].includes("}")&&(o=-1));for(o=(s=l(s)).next();!o.done;o=s.next()){var c=o.value;o="global",(u=c[0].match(/\((.*)\)/))&&(o=u.pop()),u=c.slice(1,-1),c[0].includes("}")&&(c=/\{(.*?)\}/.exec(c[0]))&&(u=c[1].split(";")),(c=r.get(o))||(c=new Ce(0,0,""));for(var d=!1,p=0;p<u.length;p++){var f=/^\s*([^:]+):\s*(.*)/.exec(u[p]);if(f){var h=f[2].trim().replace(";","");switch(f[1].trim()){case"background-color":case"background":d=!0,c.backgroundColor=h;break;case"color":d=!0,c.color=h;break;case"font-family":d=!0,c.fontFamily=h;break;case"font-size":d=!0,c.fontSize=h;break;case"font-weight":(700<=parseInt(h,10)||"bold"==h)&&(d=!0,c.fontWeight=700);break;case"font-style":switch(h){case"normal":d=!0,c.fontStyle=Ge;break;case"italic":d=!0,c.fontStyle="italic";break;case"oblique":d=!0,c.fontStyle="oblique"}break;case"opacity":d=!0,c.opacity=parseFloat(h);break;case"text-combine-upright":d=!0,c.textCombineUpright=h;break;case"text-shadow":d=!0,c.textShadow=h;break;case"white-space":d=!0,c.wrapLine="noWrap"!=h}}}d&&r.set(o,c)}}if(d=e,1==a.length&&!a[0]||/^NOTE($|[ \t])/.test(a[0])||"STYLE"==a[0]||"REGION"==a[0])a=null;else if(s=null,a[0].includes("--\x3e")||(s=a[0],a.splice(0,1)),u=Lk(o=new ay(a[0])),p=sy(o,/[ \t]+--\x3e[ \t]+/g),c=Lk(o),null==u||null==p||null==c)Y("Failed to parse VTT time code. Cue skipped:",s,a),a=null;else{for(u+=d,c+=d,a=a.slice(1).join("\n").trim(),r.has("global")?((d=r.get("global").clone()).startTime=u,d.endTime=c,d.payload=""):d=new Ce(u,c,""),oy(o),u=ly(o);u;)Ok(d,u,t),oy(o),u=ly(o);Rk(a,d,r),null!=s&&(d.id=s),a=d}a&&i.push(a)}return i},F("shaka.text.VttTextParser",xk),xk.prototype.parseMedia=xk.prototype.parseMedia,xk.prototype.setManifestType=xk.prototype.setManifestType,xk.prototype.setSequenceMode=xk.prototype.setSequenceMode,xk.prototype.parseInit=xk.prototype.parseInit;var Mk=/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g;function Nk(){this.g=null}function Uk(e,t,n){var r,i,a;return(new bi).box("payl",Ai((function(e){r=Wt(e)}))).box("iden",Ai((function(e){i=Wt(e)}))).box("sttg",Ai((function(e){a=Wt(e)}))).parse(e),r?function(e,t,n,r,i){if(r=new Ce(r,i,""),Rk(e,r,new Map),t&&(r.id=t),n)for(e=new ay(n),t=ly(e);t;)Ok(r,t,[]),oy(e),t=ly(e);return r}(r,i,a,t,n):null}function Bk(){}function Fk(e){if(null==(e=sy(e,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g)))return null;var t=Number(e[2]),n=Number(e[3]);return 59<t||59<n?null:Number(e[4])/1e3+n+60*t+3600*(Number(e[1])||0)}function jk(){this.g=new xk}function Hk(e){var t="WEBVTT\n\n";if(""==e)return t;for(var n=(e=l((e=(e=e.replace(/\r+/g,"")).trim()).split("\n\n"))).next();!n.done;n=e.next())(n=n.value.split(/\n/))[0].match(/\d+/)&&n.shift(),n[0]=n[0].replace(/,/g,"."),t+=n.join("\n").replace(/{b}/g,"<b>").replace(/{\/b}/g,"</b>").replace(/{i}/g,"<i>").replace(/{\/i}/g,"</i>").replace(/{u}/g,"<u>").replace(/{\/u}/g,"</u>")+"\n\n";return t}function Vk(){}function Gk(e,t){var n=t.Fontname;if(n&&(e.fontFamily=n),(n=t.Fontsize)&&(e.fontSize=n+"px"),(n=t.PrimaryColour)&&(n=Kk(n))&&(e.color=n),(n=t.BackColour)&&(n=Kk(n))&&(e.backgroundColor=n),t.Bold&&(e.fontWeight=700),t.Italic&&(e.fontStyle="italic"),t.Underline&&e.textDecoration.push("underline"),(n=t.Spacing)&&(e.letterSpacing=n+"px"),n=t.Alignment)switch(parseInt(n,10)){case 1:e.displayAlign=Oe,e.textAlign="start";break;case 2:e.displayAlign=Oe,e.textAlign=Ie;break;case 3:e.displayAlign=Oe,e.textAlign="end";break;case 5:e.displayAlign="before",e.textAlign="start";break;case 6:e.displayAlign="before",e.textAlign=Ie;break;case 7:e.displayAlign="before",e.textAlign="end";break;case 9:e.displayAlign="center",e.textAlign="start";break;case 10:e.displayAlign="center",e.textAlign=Ie;break;case 11:e.displayAlign="center",e.textAlign="end"}(t=t.AlphaLevel)&&(e.opacity=parseFloat(t))}function Kk(e){return 0<=(e=parseInt(e.replace("&H",""),16))?"rgba("+(255&e)+","+(e>>8&255)+","+(e>>16&255)+","+(e>>24&255^255)/255+")":null}function zk(e){return 3600*((e=qk.exec(e))[1]?parseInt(e[1].replace(":",""),10):0)+60*parseInt(e[2],10)+parseFloat(e[3])}Mn["text/vtt"]=function(){return new xk},Mn['text/vtt; codecs="vtt"']=function(){return new xk},Mn['text/vtt; codecs="wvtt"']=function(){return new xk},Nk.prototype.parseInit=function(e){var t=this,n=!1;if((new bi).box("moov",ki).box("trak",ki).box("mdia",ki).O("mdhd",(function(e){e=ao(e.reader,e.version),t.g=e.timescale})).box("minf",ki).box("stbl",ki).O("stsd",Ei).box("wvtt",(function(){n=!0})).parse(e),!this.g)throw new bt(2,2,2008);if(!n)throw new bt(2,2,2008)},Nk.prototype.setSequenceMode=function(){},Nk.prototype.setManifestType=function(){},Nk.prototype.parseMedia=function(e,t){if(!e.length)return[];if(!this.g)throw new bt(2,2,2008);var n,r=0,i=[],a=[],o=!1,s=!1,u=!1,c=null;if((new bi).box("moof",ki).box("traf",ki).O("tfdt",(function(e){o=!0,r=io(e.reader,e.version).baseMediaDecodeTime})).O("tfhd",(function(e){c=ro(e.reader,e.flags).Yf})).O("trun",(function(e){s=!0,i=oo(e.reader,e.version,e.flags).xg})).box("mdat",Ai((function(e){u=!0,n=e}))).parse(e,!1),!u&&!o&&!s)throw new bt(2,2,2008);e=r;for(var d=new gi(n,0),p=l(i),f=p.next();!f.done;f=p.next()){var h=(f=f.value).yf||c,y=f.ie?r+f.ie:e;e=y+(h||0);var g=0;do{var v=d.M();g+=v;var m=null;"vttc"==wi(d.M())?8<v&&(m=d.sb(v-8)):d.skip(v-8),h&&m&&(v=Uk(m,t.periodStart+y/this.g,t.periodStart+e/this.g),a.push(v))}while(f.sampleSize&&g<f.sampleSize)}return a.filter(Bn)},F("shaka.text.Mp4VttParser",Nk),Nk.prototype.parseMedia=Nk.prototype.parseMedia,Nk.prototype.setManifestType=Nk.prototype.setManifestType,Nk.prototype.setSequenceMode=Nk.prototype.setSequenceMode,Nk.prototype.parseInit=Nk.prototype.parseInit,Mn['application/mp4; codecs="wvtt"']=function(){return new Nk},Bk.prototype.parseInit=function(){},Bk.prototype.setSequenceMode=function(){},Bk.prototype.setManifestType=function(){},Bk.prototype.parseMedia=function(e){var t=Wt(e).replace(/\r+/g,"");if(e=[],""==(t=t.trim()))return e;for(var n=(t=l(t.split("\n\n"))).next();!n.done;n=t.next()){var r=new ay((n=n.value.split("\n"))[0]),i=Fk(r),a=sy(r,/,/g);if(r=Fk(r),null==i||null==a||null==r)throw new bt(2,2,2001,"Could not parse cue time range in SubViewer");e.push(new Ce(i,r,n.slice(1).join("\n").trim()))}return e},F("shaka.text.SbvTextParser",Bk),Bk.prototype.parseMedia=Bk.prototype.parseMedia,Bk.prototype.setManifestType=Bk.prototype.setManifestType,Bk.prototype.setSequenceMode=Bk.prototype.setSequenceMode,Bk.prototype.parseInit=Bk.prototype.parseInit,Mn["text/x-subviewer"]=function(){return new Bk},jk.prototype.parseInit=function(){},jk.prototype.setSequenceMode=function(){},jk.prototype.setManifestType=function(){},jk.prototype.parseMedia=function(e,t,n){return e=ye(qt(e=Hk(e=Wt(e)))),this.g.parseMedia(e,t,n)},F("shaka.text.SrtTextParser",jk),jk.srt2webvtt=Hk,jk.prototype.parseMedia=jk.prototype.parseMedia,jk.prototype.setManifestType=jk.prototype.setManifestType,jk.prototype.setSequenceMode=jk.prototype.setSequenceMode,jk.prototype.parseInit=jk.prototype.parseInit,Mn["text/srt"]=function(){return new jk},Vk.prototype.parseInit=function(){},Vk.prototype.setSequenceMode=function(){},Vk.prototype.setManifestType=function(){},Vk.prototype.parseMedia=function(e){for(var t="",n="",r=(e=l(e=Wt(e).split(/\r?\n\s*\r?\n/))).next();!r.done;r=e.next()){var i=Wk.exec(r.value);i&&(r=i[1],i=i[2],"V4 Styles"==r||"V4+ Styles"==r?t=i:"Events"==r&&(n=i))}e=[],r=null;for(var a=(t=l(t.split(/\r?\n/))).next();!a.done;a=t.next())if(i=a.value,!/^\s*;/.test(i)&&(a=Yk.exec(i)))if(i=a[1].trim(),a=a[2].trim(),"Format"==i)r=a.split(Zk);else if("Style"==i){i=a.split(Zk),a={};for(var o=0;o<r.length&&o<i.length;o++)a[r[o]]=i[o];e.push(a)}for(r=[],t=null,i={},a=(n=l(n.split(/\r?\n/))).next();!a.done;i={se:i.se},a=n.next())if(a=a.value,!/^\s*;/.test(a)&&(o=Yk.exec(a)))if(a=o[1].trim(),o=o[2].trim(),"Format"==a)t=o.split(Zk);else if("Dialogue"==a){o=o.split(Zk),a={};for(var s=0;s<t.length&&s<o.length;s++)a[t[s]]=o[s];o=new Ce(s=zk(a.Start),zk(a.End),o.slice(t.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,"")),i.se=a.Style,(a=e.find(function(e){return function(t){return t.Name==e.se}}(i)))&&Gk(o,a),r.push(o)}return r},F("shaka.text.SsaTextParser",Vk),Vk.prototype.parseMedia=Vk.prototype.parseMedia,Vk.prototype.setManifestType=Vk.prototype.setManifestType,Vk.prototype.setSequenceMode=Vk.prototype.setSequenceMode,Vk.prototype.parseInit=Vk.prototype.parseInit;var Wk=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,Yk=/^\s*([^:]+):\s*(.*)/,Zk=/\s*,\s*/,qk=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;function Xk(e,t){var n=1&e[t+1]?7:9;return t+n<=e.length&&0<(e=((3&e[t+3])<<11|e[t+4]<<3|(224&e[t+5])>>>5)-n)?{Qd:n,V:e}:null}function Qk(e,t){var n=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],r=(60&e[t+2])>>>2;if(r>n.length-1)return null;var i=1+((192&e[t+2])>>>6),a=(1&e[t+2])<<2;return a|=(192&e[t+3])>>>6,{sampleRate:n[r],channelCount:a,Ea:"mp4a.40."+i}}function $k(e,t){if(t+1<e.length&&255===e[t]&&240==(246&e[t+1])){var n=1&e[t+1]?7:9;if(t+n>=e.length)return!1;var r=(3&e[t+3])<<11|e[t+4]<<3|(224&e[t+5])>>>5;return!(r<=n)&&((t+=r)===e.length||t+1<e.length&&255===e[t]&&240==(246&e[t+1]))}return!1}function Jk(e){this.i=e,this.h=0,this.g=new Map}function eE(e,t){if(t+8>e.length||11!==e[t]||119!==e[t+1])return null;var n=e[t+4]>>6;if(3<=n)return null;var r=63&e[t+4],i=2*[64,69,96,64,70,96,80,87,120,80,88,120,96,104,144,96,105,144,112,121,168,112,122,168,128,139,192,128,140,192,160,174,240,160,175,240,192,208,288,192,209,288,224,243,336,224,244,336,256,278,384,256,279,384,320,348,480,320,349,480,384,417,576,384,418,576,448,487,672,448,488,672,512,557,768,512,558,768,640,696,960,640,697,960,768,835,1152,768,836,1152,896,975,1344,896,976,1344,1024,1114,1536,1024,1115,1536,1152,1253,1728,1152,1254,1728,1280,1393,1920,1280,1394,1920][3*r+n];if(t+i>e.length)return null;var a=e[t+6]>>5,o=0;2===a?o+=2:(1&a&&1!==a&&(o+=2),4&a&&(o+=2)),o=(e[t+6]<<8|e[t+7])>>12-o&1;var s=7&e[t+5];return e=new Uint8Array([n<<6|e[t+5]>>3<<1|s>>2,(3&s)<<6|a<<3|o<<2|r>>4,r<<4&224]),{sampleRate:[48e3,44100,32e3][n],channelCount:[2,1,2,3,3,4,4,5][a]+o,ga:e,V:i}}function tE(e,t){if(11===e[t]&&119===e[t+1]){var n,r,i=0,a=5;for(t+=a;0<a;){r=e[t];var o=Math.min(a,8),s=8-o;n=(r&(n=4278190080>>>24+s<<s))>>s,i=i?i<<o|n:n,t+=1,a-=o}if(16>i)return!0}return!1}function nE(e){this.i=e,this.h=0,this.g=new Map}function rE(e,t){if(t+8>e.length||2935!=(e[t]<<8|e[t+1]<<0))return null;var n=new po(e.subarray(t+2));ho(n,2),ho(n,3);var r=yo(n,11)+1<<1,i=yo(n,2);if(3==i){i=[24e3,22060,16e3][i=yo(n,2)];var a=3}else i=[48e3,44100,32e3][i],a=yo(n,2);var o=yo(n,3),s=yo(n,1);return n=yo(n,5),t+r>e.byteLength?null:(e=Math.floor(r*i/(16*[1,2,3,6][a])),e=new Uint8Array([(8160&e)>>5,(31&e)<<3,i<<6|n<<1|0,0|o<<1|s<<0,0]),{sampleRate:i,channelCount:[2,1,2,3,3,4,4,5][o]+s,ga:e,V:r})}function iE(e){this.i=e,this.h=0,this.g=new Map}function aE(e){for(var t=!1,n=[],r=e.find((function(e){return 7==e.type})),i=!1,a=(e=l(e)).next();!a.done;a=e.next()){var o=!1;switch((a=a.value).type){case 1:o=i=!0;var s=a.data;r&&4<s.length&&(2===(s=To(new po(s)))||4===s||7===s||9===s)&&(t=!0);break;case 5:t=o=i=!0;break;case 6:case 7:case 8:case 12:o=!0;break;case 9:i=o=!0;break;default:o=!1}i&&o&&(o=a.fullData.byteLength,(s=new Uint8Array(4))[0]=o>>24&255,s[1]=o>>16&255,s[2]=o>>8&255,s[3]=255&o,n.push(s),n.push(a.fullData))}return n.length?{data:sn.apply(en,u(n)),jd:t}:null}Mn["text/x-ssa"]=function(){return new Vk},(n=Jk.prototype).destroy=function(){this.g.clear()},n.isSupported=function(e){return"audio/aac"==e.toLowerCase().split(";")[0]&&te(this.convertCodecs("audio",e))},n.convertCodecs=function(e,t){return"audio/aac"==t.toLowerCase().split(";")[0]?'audio/mp4; codecs="'+(wn(t)||"mp4a.40.2")+'"':t},n.getOriginalMimeType=function(){return this.i},n.transmux=function(e,t,n,r){for(var i=ye(e),a=no(i),o=a.length;o<i.length&&!$k(i,o);o++);if(e=1e3*n.endTime,(a=to(a)).length&&n&&(n=a.find((function(e){return"com.apple.streaming.transportStreamTimestamp"===e.description})))&&(e=n.data),!(n=Qk(i,o)))return Promise.reject(new bt(2,3,3018));for(t.audioSamplingRate=n.sampleRate,t.channelsCount=n.channelCount,a=[];o<i.length;){var s=Xk(i,o);if(!s)return Promise.reject(new bt(2,3,3018));var l=s.Qd+s.V;o+l<=i.length&&a.push({data:i.subarray(o+s.Qd,o+l),size:s.V,duration:1024,Va:0,flags:{Xa:0,Ka:0,Ja:0,Ga:0,Ha:2,Ya:0}}),o+=l}return i=n.sampleRate,e=Math.floor(e*i/1e3),e=new vg([r={id:t.id,type:"audio",codecs:n.Ea,encrypted:t.encrypted&&0<t.drmInfos.length,timescale:i,duration:r,Qa:[],ga:new Uint8Array([]),oa:new Uint8Array([]),xa:0,ya:0,data:{jb:this.h,baseMediaDecodeTime:e,Oa:a},stream:t}]),this.g.has(t.id)?r=this.g.get(t.id):(r=mg(e),this.g.set(t.id,r)),t=Tg(e),this.h++,t=sn(r,t),Promise.resolve(t)},F("shaka.transmuxer.AacTransmuxer",Jk),Jk.prototype.transmux=Jk.prototype.transmux,Jk.prototype.getOriginalMimeType=Jk.prototype.getOriginalMimeType,Jk.prototype.convertCodecs=Jk.prototype.convertCodecs,Jk.prototype.isSupported=Jk.prototype.isSupported,Jk.prototype.destroy=Jk.prototype.destroy,qe("audio/aac",(function(){return new Jk("audio/aac")}),$e),(n=nE.prototype).destroy=function(){this.g.clear()},n.isSupported=function(e){return"audio/ac3"==e.toLowerCase().split(";")[0]&&te(this.convertCodecs("audio",e))},n.convertCodecs=function(e,t){return"audio/ac3"==t.toLowerCase().split(";")[0]?'audio/mp4; codecs="ac-3"':t},n.getOriginalMimeType=function(){return this.i},n.transmux=function(e,t,n,r){for(var i=no(e=ye(e)),a=i.length;a<e.length&&!tE(e,a);a++);var o=1e3*n.endTime;(i=to(i)).length&&n&&(n=i.find((function(e){return"com.apple.streaming.transportStreamTimestamp"===e.description})))&&(o=n.data),n=0,i=new Uint8Array([]);for(var s=[];a<e.length;){var l=eE(e,a);if(!l)return Promise.reject(new bt(2,3,3018));t.audioSamplingRate=l.sampleRate,t.channelsCount=l.channelCount,n=l.sampleRate,i=l.ga,s.push({data:e.subarray(a,a+l.V),size:l.V,duration:1536,Va:0,flags:{Xa:0,Ka:0,Ja:0,Ga:0,Ha:2,Ya:0}}),a+=l.V}return e=Math.floor(o*n/1e3),e=new vg([r={id:t.id,type:"audio",codecs:"ac-3",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:n,duration:r,Qa:[],ga:i,oa:new Uint8Array([]),xa:0,ya:0,data:{jb:this.h,baseMediaDecodeTime:e,Oa:s},stream:t}]),this.g.has(t.id)?r=this.g.get(t.id):(r=mg(e),this.g.set(t.id,r)),t=Tg(e),this.h++,t=sn(r,t),Promise.resolve(t)},F("shaka.transmuxer.Ac3Transmuxer",nE),nE.prototype.transmux=nE.prototype.transmux,nE.prototype.getOriginalMimeType=nE.prototype.getOriginalMimeType,nE.prototype.convertCodecs=nE.prototype.convertCodecs,nE.prototype.isSupported=nE.prototype.isSupported,nE.prototype.destroy=nE.prototype.destroy,qe("audio/ac3",(function(){return new nE("audio/ac3")}),$e),(n=iE.prototype).destroy=function(){this.g.clear()},n.isSupported=function(e){return"audio/ec3"==e.toLowerCase().split(";")[0]&&te(this.convertCodecs("audio",e))},n.convertCodecs=function(e,t){return"audio/ec3"==t.toLowerCase().split(";")[0]?'audio/mp4; codecs="ec-3"':t},n.getOriginalMimeType=function(){return this.i},n.transmux=function(e,t,n,r){for(var i=no(e=ye(e)),a=i.length;a<e.length&&2935!=(e[a]<<8|e[a+1]<<0);a++);var o=1e3*n.endTime;(i=to(i)).length&&n&&(n=i.find((function(e){return"com.apple.streaming.transportStreamTimestamp"===e.description})))&&(o=n.data),n=0,i=new Uint8Array([]);for(var s=[];a<e.length;){var l=rE(e,a);if(!l)return Promise.reject(new bt(2,3,3018));t.audioSamplingRate=l.sampleRate,t.channelsCount=l.channelCount,n=l.sampleRate,i=l.ga,s.push({data:e.subarray(a,a+l.V),size:l.V,duration:1536,Va:0,flags:{Xa:0,Ka:0,Ja:0,Ga:0,Ha:2,Ya:0}}),a+=l.V}return e=Math.floor(o*n/1e3),e=new vg([r={id:t.id,type:"audio",codecs:"ec-3",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:n,duration:r,Qa:[],ga:i,oa:new Uint8Array([]),xa:0,ya:0,data:{jb:this.h,baseMediaDecodeTime:e,Oa:s},stream:t}]),this.g.has(t.id)?r=this.g.get(t.id):(r=mg(e),this.g.set(t.id,r)),t=Tg(e),this.h++,t=sn(r,t),Promise.resolve(t)},F("shaka.transmuxer.Ec3Transmuxer",iE),iE.prototype.transmux=iE.prototype.transmux,iE.prototype.getOriginalMimeType=iE.prototype.getOriginalMimeType,iE.prototype.convertCodecs=iE.prototype.convertCodecs,iE.prototype.isSupported=iE.prototype.isSupported,iE.prototype.destroy=iE.prototype.destroy,qe("audio/ec3",(function(){return new iE("audio/ec3")}),$e);var oE=[100,110,122,244,44,83,86,118,128,138,139,134];function sE(e){if(!e.length)return null;var t=e.find((function(e){return 32==e.type})),n=e.find((function(e){return 33==e.type})),r=e.find((function(e){return 34==e.type}));if(!t||!n||!r)return null;var i=function(e){var t=new po(e,!0);return Eo(t),Eo(t),yo(t,4),yo(t,2),yo(t,6),e=yo(t,3),t=ko(t),{jf:e+1,If:t}}(t.fullData);e=function(e){e=new po(e,!0),Eo(e),Eo(e);var t=0,n=0,r=0,i=0;yo(e,4);var a=yo(e,3);ko(e);for(var o=yo(e,2),s=yo(e,1),l=yo(e,5),u=Eo(e),c=Eo(e),d=Eo(e),p=Eo(e),f=Eo(e),h=Eo(e),y=Eo(e),g=Eo(e),v=Eo(e),m=Eo(e),b=Eo(e),k=[],E=[],_=0;_<a;_++)k.push(ko(e)),E.push(ko(e));if(0<a)for(_=a;8>_;_++)yo(e,2);for(_=0;_<a;_++)k[_]&&yo(e,88),E[_]&&Eo(e);mo(e),k=mo(e),3==k&&yo(e,1),E=mo(e),_=mo(e),ko(e)&&(t+=mo(e),n+=mo(e),r+=mo(e),i+=mo(e));var T=mo(e),A=mo(e),S=mo(e);if(ko(e))for(var w=0;w<=a;w++)mo(e),mo(e),mo(e);else mo(e),mo(e),mo(e);if(mo(e),mo(e),mo(e),mo(e),mo(e),mo(e),ko(e)&&ko(e))for(w=0;4>w;w++)for(var C=0;C<(3===w?2:6);C++)if(ko(e)){var x=Math.min(64,1<<4+(w<<1));1<w&&bo(e);for(var P=0;P<x;P++)bo(e)}else mo(e);for(ko(e),ko(e),ko(e)&&(Eo(e),mo(e),mo(e),ko(e)),w=mo(e),x=C=0;x<w;x++)if(P=!1,0!==x&&(P=ko(e)),P){x===w&&mo(e),ko(e),mo(e);for(var R=P=0;R<=C;R++){var I=ko(e),D=!1;I||(D=ko(e)),(I||D)&&P++}C=P}else{for(C=(R=mo(e))+(P=mo(e)),I=0;I<R;I++)mo(e),ko(e);for(R=0;R<P;R++)mo(e),ko(e)}if(ko(e))for(w=mo(e),C=0;C<w;C++){for(x=0;x<S+4;x++)yo(e,1);yo(e,1)}if(w=S=1,C=0,ko(e),ko(e),ko(e)){if(ko(e)&&(P=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],R=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1],0<(x=Eo(e))&&16>=x?(S=P[x-1],w=R[x-1]):255===x&&(S=yo(e,16),w=yo(e,16))),ko(e)&&ko(e),ko(e)&&(yo(e,3),ko(e),ko(e)&&(Eo(e),Eo(e),Eo(e))),ko(e)&&(mo(e),mo(e)),ko(e),ko(e),ko(e),(x=ko(e))&&(mo(e),mo(e),mo(e),mo(e)),ko(e)&&(yo(e,32),yo(e,32),ko(e)&&mo(e),ko(e)))for(R=!1,x=ko(e),P=ko(e),(x||P)&&((R=ko(e))&&(Eo(e),yo(e,5),ko(e),yo(e,5)),yo(e,4),yo(e,4),R&&yo(e,4),yo(e,5),yo(e,5),yo(e,5)),I=0;I<=a;I++){var O=!0;D=1,ko(e)||(O=ko(e));var L=!1;if(O?mo(e):L=ko(e),L||(D=mo(e)+1),x){for(O=0;O<D;O++)mo(e),mo(e),R&&(mo(e),mo(e));ko(e)}if(P){for(O=0;O<D;O++)mo(e),mo(e),R&&(mo(e),mo(e));ko(e)}}ko(e)&&(ko(e),ko(e),ko(e),C=mo(e),mo(e),mo(e),mo(e),mo(e))}return{Le:b,Re:o,Se:s,Qe:l,Me:u,Ne:c,Oe:d,Pe:p,Fe:f,Ge:h,He:y,Ie:g,Je:v,Ke:m,be:C,Ce:0,Be:k,Ae:T,ze:A,width:E-(t+n)*(1===k||2===k?2:1),height:_-(r+i)*(1===k?2:1),ri:S,pi:w}}(n.fullData);var a=function(e){var t=new po(e,!0);Eo(t),Eo(t),mo(t),mo(t),ko(t),ko(t),yo(t,3),ko(t),ko(t),mo(t),mo(t),bo(t),ko(t),ko(t),ko(t)&&mo(t),bo(t),bo(t),ko(t),ko(t),ko(t),ko(t),e=ko(t),t=ko(t);var n=1;return t&&e?n=0:t?n=3:e&&(n=2),{pf:n}}(r.fullData);return t=function(e,t,n,r){var i=new Uint8Array(23+(5+e.byteLength)+(5+t.byteLength)+(5+n.byteLength));return i[0]=1,i[1]=(3&r.Re)<<6|(r.Se?1:0)<<5|31&r.Qe,i[2]=r.Me,i[3]=r.Ne,i[4]=r.Oe,i[5]=r.Pe,i[6]=r.Fe,i[7]=r.Ge,i[8]=r.He,i[9]=r.Ie,i[10]=r.Je,i[11]=r.Ke,i[12]=r.Le,i[13]=240|(3840&r.be)>>8,i[14]=255&r.be,i[15]=252|3&r.pf,i[16]=252|3&r.Be,i[17]=248|7&r.Ae,i[18]=248|7&r.ze,i[19]=0,i[20]=0,i[21]=(3&r.Ce)<<6|(7&r.jf)<<3|(r.If?1:0)<<2|3,i[22]=3,i[23]=160,i[24]=0,i[25]=1,i[26]=(65280&e.byteLength)>>8,i[27]=(255&e.byteLength)>>0,i.set(e,28),i[23+(5+e.byteLength)]=161,i[e.byteLength+29]=0,i[e.byteLength+30]=1,i[e.byteLength+31]=(65280&t.byteLength)>>8,i[e.byteLength+32]=(255&t.byteLength)>>0,i.set(t,e.byteLength+33),i[23+(e.byteLength+10+t.byteLength)]=162,i[e.byteLength+10+t.byteLength+24]=0,i[e.byteLength+10+t.byteLength+25]=1,i[e.byteLength+10+t.byteLength+26]=(65280&n.byteLength)>>8,i[e.byteLength+10+t.byteLength+27]=(255&n.byteLength)>>0,i.set(n,e.byteLength+10+t.byteLength+28),i}(t.fullData,n.fullData,r.fullData,{jf:i.jf,If:i.If,Re:e.Re,Se:e.Se,Le:e.Le,Qe:e.Qe,Me:e.Me,Ne:e.Ne,Oe:e.Oe,Pe:e.Pe,Fe:e.Fe,Ge:e.Ge,He:e.He,Ie:e.Ie,Je:e.Je,Ke:e.Ke,Ce:e.Ce,be:e.be,Be:e.Be,Ae:e.Ae,ze:e.ze,pf:a.pf}),{height:e.height,width:e.width,oa:t,xa:e.ri,ya:e.pi}}function lE(e,t){var n=e[t+1]>>3&3,r=e[t+1]>>1&3,i=e[t+2]>>4&15,a=e[t+2]>>2&3;if(1!==n&&0!==i&&15!==i&&3!==a){var o=e[t+3]>>6;i=1e3*dE[14*(3===n?3-r:3===r?3:4)+i-1],a=pE[3*(3===n?0:2===n?1:2)+a],n=fE[n][r];var s=hE[r],l=Math.floor(n*i/a+(e[t+2]>>1&1))*s,u=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);return(u=u?parseInt(u[1],10):0)&&87>=u&&2===r&&224e3<=i&&0===o&&(e[t+3]|=128),{sampleRate:a,channelCount:3===o?1:2,V:l,oi:8*n*s}}return null}function uE(e,t){return 255===e[t]&&224==(224&e[t+1])&&0!=(6&e[t+1])}function cE(e,t){if(t+1<e.length&&uE(e,t)){var n=lE(e,t),r=4;return n&&n.V&&(r=n.V),(t+=r)===e.length||t+1<e.length&&uE(e,t)}return!1}var dE=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],pE=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],fE=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],hE=[0,1,1,4];function yE(e){this.i=e,this.h=0,this.g=new Map}function gE(e){this.h=e,this.g=null}function vE(e){this.h=e,(this.g=Kh.get("ISOBoxer")())&&function(e){function t(){this._procFullBox(),1&this.flags&&(this._procField("AlgorithmID","uint",24),this._procField("IV_size","uint",8),this._procFieldArray("KID",16,"uint",8)),this._procField("sample_count","uint",32),this._procEntries("entry",this.sample_count,(function(e){this._procEntryField(e,"InitializationVector","data",8),2&this.flags&&(this._procEntryField(e,"NumberOfEntries","uint",16),this._procSubEntries(e,"clearAndCryptedData",e.NumberOfEntries,(function(e){this._procEntryField(e,"BytesOfClearData","uint",16),this._procEntryField(e,"BytesOfEncryptedData","uint",32)})))}))}e.g.addBoxProcessor("saio",(function(){this._procFullBox(),1&this.flags&&(this._procField("aux_info_type","uint",32),this._procField("aux_info_type_parameter","uint",32)),this._procField("entry_count","uint",32),this._procFieldArray("offset",this.entry_count,"uint",1===this.version?64:32)})),e.g.addBoxProcessor("saiz",(function(){this._procFullBox(),1&this.flags&&(this._procField("aux_info_type","uint",32),this._procField("aux_info_type_parameter","uint",32)),this._procField("default_sample_info_size","uint",8),this._procField("sample_count","uint",32),0===this.default_sample_info_size&&this._procFieldArray("sample_info_size",this.sample_count,"uint",8)})),e.g.addBoxProcessor("senc",t),e.g.addBoxProcessor("uuid",(function(){for(var e=!0,n=0;16>n;n++)this.usertype[n]!==bE[n]&&(e=!1);e&&(this._parsing&&(this.type="sepiff"),t.call(this))}))}(this)}function mE(e,t){for(var n=8,r=0;r<e.boxes.length&&e.boxes[r].type!==t;r++)n+=e.boxes[r].size;return n}(n=yE.prototype).destroy=function(){this.g.clear()},n.isSupported=function(e){return"audio/mpeg"==e.toLowerCase().split(";")[0]&&te(this.convertCodecs("audio",e))},n.convertCodecs=function(e,t){return"audio/mpeg"==t.toLowerCase().split(";")[0]?'audio/mp4; codecs="mp3"':t},n.getOriginalMimeType=function(){return this.i},n.transmux=function(e,t,n,r){for(var i=no(n=ye(e)).length;i<n.length&&!cE(n,i);i++);var a;for(e=[];i<n.length;){var o=lE(n,i);if(!o)return Promise.reject(new bt(2,3,3018));a||(a=o),i+o.V<=n.length&&e.push({data:n.subarray(i,i+o.V),size:o.V,duration:1152,Va:0,flags:{Xa:0,Ka:0,Ja:0,Ga:0,Ha:2,Ya:0}}),i+=o.V}return a?(n=9e4*a.oi/a.sampleRate*this.h,a=new vg([r={id:t.id,type:"audio",codecs:"mp3",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:a.sampleRate,duration:r,Qa:[],ga:new Uint8Array([]),oa:new Uint8Array([]),xa:0,ya:0,data:{jb:this.h,baseMediaDecodeTime:n,Oa:e},stream:t}]),this.g.has(t.id)?r=this.g.get(t.id):(r=mg(a),this.g.set(t.id,r)),t=Tg(a),this.h++,t=sn(r,t),Promise.resolve(t)):Promise.reject(new bt(2,3,3018))},F("shaka.transmuxer.Mp3Transmuxer",yE),yE.prototype.transmux=yE.prototype.transmux,yE.prototype.getOriginalMimeType=yE.prototype.getOriginalMimeType,yE.prototype.convertCodecs=yE.prototype.convertCodecs,yE.prototype.isSupported=yE.prototype.isSupported,yE.prototype.destroy=yE.prototype.destroy,qe("audio/mpeg",(function(){return new yE("audio/mpeg")}),$e),(n=gE.prototype).destroy=function(){},n.isSupported=function(e){if("video/mp2t"!=e.toLowerCase().split(";")[0])return!1;var t=wn(e).split(","),n=pn("audio",t);return t=pn("video",t),!(!n||t||"mp3"!=Tn(n))&&te(this.convertCodecs("audio",e))},n.convertCodecs=function(e,t){return"video/mp2t"==t.toLowerCase().split(";")[0]?"audio/mpeg":t},n.getOriginalMimeType=function(){return this.h},n.transmux=function(e,t,n,r,i){if(this.g?this.g.clearData():this.g=new Ao,e=ye(e),"mp3"!=(e=this.g.parse(e)).bd().audio||"audio"!=i)return Promise.reject(new bt(2,3,3018));for(i=new Uint8Array([]),t=(e=l(e.Gb())).next();!t.done;t=e.next())if(t=t.value.data)for(n=0;n<t.length;)(r=lE(t,n))?(n+r.V<=t.length&&(i=sn(i,t.subarray(n,n+r.V))),n+=r.V):n++;return Promise.resolve(i)},F("shaka.transmuxer.MpegTsTransmuxer",gE),gE.prototype.transmux=gE.prototype.transmux,gE.prototype.getOriginalMimeType=gE.prototype.getOriginalMimeType,gE.prototype.convertCodecs=gE.prototype.convertCodecs,gE.prototype.isSupported=gE.prototype.isSupported,gE.prototype.destroy=gE.prototype.destroy,qe("video/mp2t",(function(){return new gE("video/mp2t")}),Je),(n=vE.prototype).destroy=function(){},n.isSupported=function(e,t){var n=e.startsWith("mss/");return!(!this.g||!n)&&(t?te(this.convertCodecs(t,e)):(t=this.convertCodecs("audio",e),e=this.convertCodecs("video",e),te(t)||te(e)))},n.convertCodecs=function(e,t){return t.replace("mss/","")},n.getOriginalMimeType=function(){return this.h},n.transmux=function(e,t,n){if(!n)return Promise.resolve(ye(e));if(!t.mssPrivateData)return Promise.reject(new bt(2,3,3020));try{var r,i=this.g.parseBuffer(e),a=i.fetch("tfhd");a.track_ID=t.id+1;var o=i.fetch("tfdt"),s=i.fetch("traf");null===o&&((o=this.g.createFullBox("tfdt",s,a)).version=1,o.flags=0,o.baseMediaDecodeTime=Math.floor(n.startTime*t.mssPrivateData.timescale));var l=i.fetch("trun"),u=i.fetch("tfxd");u&&u._parent.boxes.splice(u._parent.boxes.indexOf(u),1);var c=i.fetch("tfrf");c&&c._parent.boxes.splice(c._parent.boxes.indexOf(c),1);var d=i.fetch("sepiff");if(null!==d){d.type="senc",d.usertype=void 0;var p=i.fetch("saio");if(null===p){(p=this.g.createFullBox("saio",s)).version=0,p.flags=0,p.entry_count=1,p.offset=[0];var f=this.g.createFullBox("saiz",s);if(f.version=0,f.flags=0,f.sample_count=d.sample_count,f.default_sample_info_size=0,f.sample_info_size=[],2&d.flags)for(r=0;r<d.sample_count;r+=1)f.sample_info_size[r]=10+6*d.entry[r].NumberOfEntries;else f.default_sample_info_size=8}}a.flags&=16777214,a.flags|=131072,l.flags|=1;var h=i.fetch("moof");l.data_offset=h.getLength()+8;var y=i.fetch("saio");null!==y&&(y.offset[0]=mE(h,"traf")+mE(s,"senc")+16);var g=ye(i.write());return Promise.resolve(g)}catch(e){return e instanceof bt?Promise.reject(e):Promise.reject(new bt(2,3,3022))}},F("shaka.transmuxer.MssTransmuxer",vE),vE.prototype.transmux=vE.prototype.transmux,vE.prototype.getOriginalMimeType=vE.prototype.getOriginalMimeType,vE.prototype.convertCodecs=vE.prototype.convertCodecs,vE.prototype.isSupported=vE.prototype.isSupported,vE.prototype.destroy=vE.prototype.destroy;var bE=new Uint8Array([162,57,79,82,90,155,79,20,162,68,108,66,124,100,141,244]);function kE(e){this.l=e,this.g=0,this.i=new Map,this.h=this.j=null}qe("mss/audio/mp4",(function(){return new vE("mss/audio/mp4")}),$e),qe("mss/video/mp4",(function(){return new vE("mss/video/mp4")}),$e),(n=kE.prototype).destroy=function(){this.i.clear(),this.h&&this.h.destroy()},n.isSupported=function(e,t){if("video/mp2t"!=e.toLowerCase().split(";")[0])return!1;var n=e;t&&(n=this.convertCodecs(t,e));var r=wn(n).split(",");return n=pn("audio",r),r=pn("video",r),!(n&&(n=Tn(n),!TE.includes(n))||r&&(n=Tn(r),!AE.includes(n)))&&(t?te(this.convertCodecs(t,e)):(t=this.convertCodecs("audio",e),e=this.convertCodecs("video",e),te(t)||te(e)))},n.convertCodecs=function(e,t){return"video/mp2t"==t.toLowerCase().split(";")[0]?(t=wn(t).replace("mp4a.40.34","mp3").split(",").map((function(e){return lr(e,"audio/mp4")})).map(ur).join(","),"audio"==e?'audio/mp4; codecs="'+t+'"':'video/mp4; codecs="'+t+'"'):t},n.getOriginalMimeType=function(){return this.l},n.transmux=function(e,t,n,r,i){var a=ye(e);if("audio"==i&&!Co(a)){for(var o=no(a),s=o.length;s<a.length;s++)if(cE(a,s))return Promise.reject(new bt(2,3,3018));for(s=o.length;s<a.length;s++)if($k(a,s))return this.h||(this.h=new Jk("audio/aac")),this.h.transmux(e,t,n,r,i);return Promise.reject(new bt(2,3,3018))}this.j?this.j.clearData():this.j=new Ao;var c=this.j.parse(a),d=[],p=c.bd();try{var f=null;if("video"==i){switch(p.video){case"avc":var h=[],y=null,g=[],v=c.uc();if(!v.length)throw new bt(2,3,3023);for(var m=0;m<v.length;m++){var b=v[m],k=b.nalus;g.push.apply(g,u(k));var E=aE(k);if(E){null==y&&(y=b.dts);var _;_=m+1<v.length?(v[m+1].dts||0)-(b.dts||0):1<v.length?(b.dts||0)-(v[m-1].dts||0):9e4*(n.endTime-n.startTime),h.push({data:E.data,size:E.data.byteLength,duration:_,Va:Math.round((b.pts||0)-(b.dts||0)),flags:{Xa:0,Ka:0,Ja:0,Ga:0,Ha:E.jd?2:1,Ya:E.jd?0:1}})}}var T=function(e){if(!e.length)return null;var t=e.find((function(e){return 7==e.type}));if(e=e.find((function(e){return 8==e.type})),!t||!e)return null;var n=new po(t.data),r=Eo(n);if(Eo(n),Eo(n),vo(n),oE.includes(r)&&(3===(r=mo(n))&&ho(n,1),vo(n),vo(n),ho(n,1),ko(n))){r=3!==r?8:12;for(var i=0;i<r;i++)ko(n)&&_o(n,6>i?16:64)}if(vo(n),0===(r=mo(n)))mo(n);else if(1===r)for(ho(n,1),vo(n),vo(n),r=mo(n),i=0;i<r;i++)vo(n);vo(n),ho(n,1);var a=mo(n),o=mo(n),s=yo(n,1);0===s&&ho(n,1),ho(n,1);var l=0,c=0,d=0,p=0;if(ko(n)&&(l=mo(n),c=mo(n),d=mo(n),p=mo(n)),i=r=1,ko(n)&&ko(n)){var f=Eo(n);0<f&&16>=f?(r=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2][f-1],i=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1][f-1]):255===f&&(r=yo(n,16),i=yo(n,16))}return n=(2-s)*(o+1)*16-2*d-2*p,a=16*(a+1)-2*l-2*c,l=[],t=t.fullData,l.push(t.byteLength>>>8&255),l.push(255&t.byteLength),l=l.concat.apply(l,u(t)),t=[],e=e.fullData,t.push(e.byteLength>>>8&255),t.push(255&e.byteLength),t=t.concat.apply(t,u(e)),{height:n,width:a,oa:e=new Uint8Array([1,l[3],l[4],l[5],255,225].concat(l,[1],t)),xa:r,ya:i}}(g);if(!T||null==y)throw new bt(2,3,3018);t.height=T.height,t.width=T.width,f={id:t.id,type:"video",codecs:"avc1",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:9e4,duration:r,Qa:[],ga:new Uint8Array([]),oa:T.oa,xa:T.xa,ya:T.ya,data:{jb:this.g,baseMediaDecodeTime:y,Oa:h},stream:t};break;case"hvc":var A=[],S=null,w=[],C=c.uc();if(!C.length)throw new bt(2,3,3023);for(var x=0;x<C.length;x++){var P=C[x],R=P.nalus;w.push.apply(w,u(R));for(var I=!1,D=[],O=!1,L=l(R),M=L.next();!M.done;M=L.next()){var N=M.value;switch(N.type){case 1:case 0:var U=O=!0;break;case 19:case 20:case 21:I=U=O=!0;break;case 32:case 33:case 34:case 39:case 40:U=!0;break;case 35:O=U=!0;break;default:U=!1}if(O&&U){var B=N.fullData.byteLength,F=new Uint8Array(4);F[0]=B>>24&255,F[1]=B>>16&255,F[2]=B>>8&255,F[3]=255&B,D.push(F),D.push(N.fullData)}}var j=D.length?{data:sn.apply(en,u(D)),jd:I}:null;if(j){null==S&&null!=P.dts&&(S=P.dts);var H;H=x+1<C.length?(C[x+1].dts||0)-(P.dts||0):1<C.length?(P.dts||0)-(C[x-1].dts||0):9e4*(n.endTime-n.startTime),A.push({data:j.data,size:j.data.byteLength,duration:H,Va:Math.round((P.pts||0)-(P.dts||0)),flags:{Xa:0,Ka:0,Ja:0,Ga:0,Ha:j.jd?2:1,Ya:j.jd?0:1}})}}var V=sE(w);if(!V||null==S)throw new bt(2,3,3018);t.height=V.height,t.width=V.width,f={id:t.id,type:"video",codecs:"hvc1",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:9e4,duration:r,Qa:[],ga:new Uint8Array([]),oa:V.oa,xa:V.xa,ya:V.ya,data:{jb:this.g,baseMediaDecodeTime:S,Oa:A},stream:t}}f&&(d.push(f),f=null)}if("audio"==i){switch(p.audio){case"aac":for(var G,K=[],z=null,W=l(c.Gb()),Y=W.next();!Y.done;Y=W.next()){var Z=Y.value,q=Z.data;if(q){var X=0;if(!(G=Qk(q,X)))throw new bt(2,3,3018);for(t.audioSamplingRate=G.sampleRate,t.channelsCount=G.channelCount,null==z&&null!==Z.pts&&(z=Z.pts);X<q.length;){var Q=Xk(q,X);if(Q){var $=Q.Qd+Q.V;X+$<=q.length&&K.push({data:q.subarray(X+Q.Qd,X+$),size:Q.V,duration:1024,Va:0,flags:{Xa:0,Ka:0,Ja:0,Ga:0,Ha:2,Ya:0}}),X+=$}else X++}}}if(!G||null==z){if(!c.uc().length)throw new bt(2,3,3018);z=9e4*n.startTime;var J=pn("audio",t.codecs.split(","));if(!J||!t.channelsCount||!t.audioSamplingRate)throw new bt(2,3,3018);G={sampleRate:t.audioSamplingRate,channelCount:t.channelsCount,Ea:J};var ee=function(e,t){if("mp4a.40.2"===e){if(1===t)return new Uint8Array([0,200,0,128,35,128]);if(2===t)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(6===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224])}else{if(1===t)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(2===t||3===t)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}return null}(J,t.channelsCount);if(!ee)throw new bt(2,3,3018);for(var te=z+9e4*(n.endTime-n.startTime),ne=z;ne<te;)K.push({data:ee,size:ee.byteLength,duration:1024,Va:0,flags:{Xa:0,Ka:0,Ja:0,Ga:0,Ha:2,Ya:0}}),ne+=1024/G.sampleRate*9e4}var re=G.sampleRate,ie=z/9e4*re;f={id:t.id,type:"audio",codecs:G.Ea,encrypted:t.encrypted&&0<t.drmInfos.length,timescale:re,duration:r,Qa:[],ga:new Uint8Array([]),oa:new Uint8Array([]),xa:0,ya:0,data:{jb:this.g,baseMediaDecodeTime:ie,Oa:K},stream:t};break;case"ac3":for(var ae=[],oe=0,se=new Uint8Array([]),le=null,ue=l(c.Gb()),ce=ue.next();!ce.done;ce=ue.next()){var de=ce.value,pe=de.data;null==le&&null!==de.pts&&(le=de.pts);for(var fe=0;fe<pe.length;){var he=eE(pe,fe);he?(t.audioSamplingRate=he.sampleRate,t.channelsCount=he.channelCount,oe=he.sampleRate,se=he.ga,ae.push({data:pe.subarray(fe,fe+he.V),size:he.V,duration:1536,Va:0,flags:{Xa:0,Ka:0,Ja:0,Ga:0,Ha:2,Ya:0}}),fe+=he.V):fe++}}if(0==oe||0==se.byteLength||null==le)throw new bt(2,3,3018);var ge=le/9e4*oe;f={id:t.id,type:"audio",codecs:"ac-3",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:oe,duration:r,Qa:[],ga:se,oa:new Uint8Array([]),xa:0,ya:0,data:{jb:this.g,baseMediaDecodeTime:ge,Oa:ae},stream:t};break;case"ec3":for(var ve=[],me=0,be=new Uint8Array([]),ke=null,Ee=l(c.Gb()),_e=Ee.next();!_e.done;_e=Ee.next()){var Te=_e.value,Ae=Te.data;null==ke&&null!==Te.pts&&(ke=Te.pts);for(var Se=0;Se<Ae.length;){var we=rE(Ae,Se);we?(t.audioSamplingRate=we.sampleRate,t.channelsCount=we.channelCount,me=we.sampleRate,be=we.ga,ve.push({data:Ae.subarray(Se,Se+we.V),size:we.V,duration:1536,Va:0,flags:{Xa:0,Ka:0,Ja:0,Ga:0,Ha:2,Ya:0}}),Se+=we.V):Se++}}if(0==me||0==be.byteLength||null==ke)throw new bt(2,3,3018);var Ce=ke/9e4*me;f={id:t.id,type:"audio",codecs:"ec-3",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:me,duration:r,Qa:[],ga:be,oa:new Uint8Array([]),xa:0,ya:0,data:{jb:this.g,baseMediaDecodeTime:Ce,Oa:ve},stream:t};break;case"mp3":for(var xe,Pe=[],Re=null,Ie=l(c.Gb()),De=Ie.next();!De.done;De=Ie.next()){var Oe=De.value,Le=Oe.data;if(Le){null==Re&&null!==Oe.pts&&(Re=Oe.pts);for(var Me=0;Me<Le.length;){var Ne=lE(Le,Me);Ne?(xe||(xe=Ne),Me+Ne.V<=Le.length&&Pe.push({data:Le.subarray(Me,Me+Ne.V),size:Ne.V,duration:1152,Va:0,flags:{Xa:0,Ka:0,Ja:0,Ga:0,Ha:2,Ya:0}}),Me+=Ne.V):Me++}}}if(!xe||null==Re)throw new bt(2,3,3018);var Ue=xe.sampleRate,Be=Re/9e4*Ue;f={id:t.id,type:"audio",codecs:"mp3",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:Ue,duration:r,Qa:[],ga:new Uint8Array([]),oa:new Uint8Array([]),xa:0,ya:0,data:{jb:this.g,baseMediaDecodeTime:Be,Oa:Pe},stream:t};break;case"opus":var Fe=[],je=null,He=c.F;if(!He)throw new bt(2,3,3018);var Ve=[];switch(He.ah){case 1:case 2:Ve=[0];break;case 0:Ve=[255,1,1,0,1];break;case 128:Ve=[255,2,0,0,1];break;case 3:Ve=[1,2,1,0,2,1];break;case 4:Ve=[1,2,2,0,1,2,3];break;case 5:Ve=[1,3,2,0,4,1,2,3];break;case 6:Ve=[1,4,2,0,4,1,2,3,5];break;case 7:Ve=[1,4,2,0,4,1,2,3,5,6];break;case 8:Ve=[1,5,3,0,6,1,2,3,4,5,7];break;case 130:Ve=[1,1,2,0,1];break;case 131:Ve=[1,1,3,0,1,2];break;case 132:Ve=[1,1,4,0,1,2,3];break;case 133:Ve=[1,1,5,0,1,2,3,4];break;case 134:Ve=[1,1,6,0,1,2,3,4,5];break;case 135:Ve=[1,1,7,0,1,2,3,4,5,6];break;case 136:Ve=[1,1,8,0,1,2,3,4,5,6,7]}for(var Ge=new Uint8Array([0,He.channelCount,0,0,He.sampleRate>>>24&255,He.sampleRate>>>17&255,He.sampleRate>>>8&255,He.sampleRate>>>0&255,0,0].concat(u(Ve))),Ke=He.sampleRate,ze=l(c.Gb()),We=ze.next();!We.done;We=ze.next()){var Ye=We.value,Ze=Ye.data;null==je&&null!==Ye.pts&&(je=Ye.pts);for(var qe=0;qe<Ze.length;){for(var Xe=0!=(16&Ze[qe+1]),Qe=0!=(8&Ze[qe+1]),$e=qe+2,Je=0;255===Ze[$e];)Je+=255,$e+=1;Je+=Ze[$e],$e+=1,$e+=Xe?2:0,$e+=Qe?2:0;var et=Ze.slice($e,$e+Je);Fe.push({data:et,size:et.byteLength,duration:960,Va:0,flags:{Xa:0,Ka:0,Ja:0,Ga:0,Ha:2,Ya:0}}),qe=$e+Je}}if(0==Ge.byteLength||null==je)throw new bt(2,3,3018);t.audioSamplingRate=He.sampleRate,t.channelsCount=He.channelCount;var tt=je/9e4*Ke;f={id:t.id,type:"audio",codecs:"opus",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:Ke,duration:r,Qa:[],ga:Ge,oa:new Uint8Array([]),xa:0,ya:0,data:{jb:this.g,baseMediaDecodeTime:tt,Oa:Fe},stream:t}}f&&(d.push(f),f=null)}}catch(e){return e&&3023==e.code?Promise.resolve(new Uint8Array([])):Promise.reject(e)}if(!d.length)return Promise.reject(new bt(2,3,3018));var nt=new vg(d);if(this.i.has(t.id))var rt=this.i.get(t.id);else rt=mg(nt),this.i.set(t.id,rt);var it=Tg(nt);this.g++;var at=sn(rt,it);return Promise.resolve(at)},F("shaka.transmuxer.TsTransmuxer",kE),kE.prototype.transmux=kE.prototype.transmux,kE.prototype.getOriginalMimeType=kE.prototype.getOriginalMimeType,kE.prototype.convertCodecs=kE.prototype.convertCodecs,kE.prototype.isSupported=kE.prototype.isSupported,kE.prototype.destroy=kE.prototype.destroy;var EE,_E,TE=["aac","ac-3","ec-3","mp3","opus"],AE=["avc","hevc"];function SE(){}function wE(){EE?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(EE=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=CE):console.debug("EmeEncryptionSchemePolyfill: EME not found")}function CE(e,t){var n,r=this;return I((function(i){return 1==i.g?(console.assert(r==navigator,'bad "this" for requestMediaKeySystemAccess'),b(i,EE.call(r,e,t),2)):UE(n=i.h)?(console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=EE,i.return(n)):(console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support."),navigator.requestMediaKeySystemAccess=xE,i.return(xE.call(r,e,t)))}))}function xE(e,t){var n,r,i,a,o,s,u,c,d,p,f=this;return I((function(h){if(1==h.g){for(console.assert(f==navigator,'bad "this" for requestMediaKeySystemAccess'),n=NE(e),r=[],i=l(t),a=i.next();!a.done;a=i.next())o=a.value,s=PE(o.videoCapabilities,n),u=PE(o.audioCapabilities,n),o.videoCapabilities&&o.videoCapabilities.length&&!s.length||o.audioCapabilities&&o.audioCapabilities.length&&!u.length||((c=Object.assign({},o)).videoCapabilities=s,c.audioCapabilities=u,r.push(c));if(!r.length)throw(d=Error("Unsupported keySystem or supportedConfigurations.")).name="NotSupportedError",d.code=DOMException.NOT_SUPPORTED_ERR,d;return b(h,EE.call(f,e,r),2)}return p=h.h,h.return(new ME(p,n))}))}function PE(e,t){return e?e.filter((function(e){return!e.encryptionScheme||e.encryptionScheme==t})):e}function RE(){}function IE(){_E?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(_E=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=DE):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}function DE(e){var t,n,r,i=this;return I((function(a){switch(a.g){case 1:return console.assert(i==navigator.mediaCapabilities,'bad "this" for decodingInfo'),b(a,_E.call(i,e),2);case 2:if(t=a.h,!e.keySystemConfiguration)return a.return(t);if((n=t.keySystemAccess)&&UE(n))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=_E,a.return(t);if(console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=OE,n){a.u(3);break}return r=t,b(a,LE(e),4);case 4:return r.keySystemAccess=a.h,a.return(t);case 3:return a.return(OE.call(i,e))}}))}function OE(e){var t,n,r,i,a,o,s,l,u=this;return I((function(c){switch(c.g){case 1:return console.assert(u==navigator.mediaCapabilities,'bad "this" for decodingInfo'),t=null,e.keySystemConfiguration&&(n=e.keySystemConfiguration,r=n.keySystem,i=n.audio&&n.audio.encryptionScheme,a=n.video&&n.video.encryptionScheme,t=NE(r),o={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:e},i&&i!=t||a&&a!=t)?c.return(o):b(c,_E.call(u,e),2);case 2:if((s=c.h).keySystemAccess){s.keySystemAccess=new ME(s.keySystemAccess,t),c.u(3);break}if(!e.keySystemConfiguration){c.u(3);break}return l=s,b(c,LE(e),5);case 5:l.keySystemAccess=c.h;case 3:return c.return(s)}}))}function LE(e){var t,n;return I((function(r){if(1==r.g){var i=e.keySystemConfiguration,a=[],o=[];return i.audio&&a.push({robustness:i.audio.robustness||"",contentType:e.audio.contentType}),i.video&&o.push({robustness:i.video.robustness||"",contentType:e.video.contentType}),i={initDataTypes:i.initDataType?[i.initDataType]:[],distinctiveIdentifier:i.distinctiveIdentifier,persistentState:i.persistentState,sessionTypes:i.sessionTypes},a.length&&(i.audioCapabilities=a),o.length&&(i.videoCapabilities=o),t=i,b(r,navigator.requestMediaKeySystemAccess(e.keySystemConfiguration.keySystem,[t]),2)}return n=r.h,r.return(n)}))}function ME(e,t){this.h=e,this.g=t,this.keySystem=e.keySystem}function NE(e){return e.startsWith("com.widevine")||e.startsWith("com.microsoft")||e.startsWith("com.chromecast")||e.startsWith("com.adobe")||e.startsWith("org.w3")?"cenc":e.startsWith("com.apple")?"cbcs-1-9":(console.warn("EmeEncryptionSchemePolyfill: Unknown key system:",e,"Please contribute!"),null)}function UE(e){var t=(e=e.getConfiguration()).audioCapabilities&&e.audioCapabilities[0];return!(!(e=e.videoCapabilities&&e.videoCapabilities[0]||t)||void 0===e.encryptionScheme)}function BE(){}function FE(){wE(),IE()}qe("video/mp2t",(function(){return new kE("video/mp2t")}),et),F("EmeEncryptionSchemePolyfill",SE),SE.install=wE,F("McEncryptionSchemePolyfill",RE),RE.install=IE,ME.prototype.getConfiguration=function(){var e=this.h.getConfiguration();if(e.videoCapabilities)for(var t=l(e.videoCapabilities),n=t.next();!n.done;n=t.next())n.value.encryptionScheme=this.g;if(e.audioCapabilities)for(n=(t=l(e.audioCapabilities)).next();!n.done;n=t.next())n.value.encryptionScheme=this.g;return e},ME.prototype.createMediaKeys=function(){return this.h.createMediaKeys()},F("EncryptionSchemePolyfills",BE),BE.install=FE,void 0!==module&&module.exports&&(module.exports=BE)}.call(r,e,e,void 0),r.shaka)t[i]=r.shaka[i]}()},701:module=>{"use strict";var e=[];function t(t){for(var n=-1,r=0;r<e.length;r++)if(e[r].identifier===t){n=r;break}return n}function n(n,i){for(var a={},o=[],s=0;s<n.length;s++){var l=n[s],u=i.base?l[0]+i.base:l[0],c=a[u]||0,d="".concat(u," ").concat(c);a[u]=c+1;var p=t(d),f={css:l[1],media:l[2],sourceMap:l[3],supports:l[4],layer:l[5]};if(-1!==p)e[p].references++,e[p].updater(f);else{var h=r(f,i);i.byIndex=s,e.splice(s,0,{identifier:d,updater:h,references:1})}o.push(d)}return o}function r(e,t){var n=t.domAPI(t);n.update(e);return function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;n.update(e=t)}else n.remove()}}module.exports=function(r,i){var a=n(r=r||[],i=i||{});return function(r){r=r||[];for(var o=0;o<a.length;o++){var s=t(a[o]);e[s].references--}for(var l=n(r,i),u=0;u<a.length;u++){var c=t(a[u]);0===e[c].references&&(e[c].updater(),e.splice(c,1))}a=l}}},80:module=>{"use strict";var e={};module.exports=function(t,n){var r=function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}e[t]=n}return e[t]}(t);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},182:module=>{"use strict";module.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},850:(module,e,t)=>{"use strict";module.exports=function(e){var n=t.nc;n&&e.setAttribute("nonce",n)}},236:module=>{"use strict";module.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var r="";n.supports&&(r+="@supports (".concat(n.supports,") {")),n.media&&(r+="@media ".concat(n.media," {"));var i=void 0!==n.layer;i&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,i&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}");var a=n.sourceMap;a&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(a))))," */")),t.styleTagTransform(r,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},213:module=>{"use strict";module.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var module=t[r]={id:r,exports:{}};return e[r](module,module.exports,n),module.exports}n.n=module=>{var e=module&&module.__esModule?()=>module.default:()=>module;return n.d(e,{a:e}),e},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nc=void 0;var r={};return(()=>{"use strict";n.r(r),n.d(r,{Ad:()=>Qa,AdBreak:()=>to,BasePlugin:()=>oe,KALTURA_PLAYER_START_TIME_QS:()=>Ot,KalturaPlayer:()=>Vi,LocalStorageManager:()=>it,PLAYER_NAME:()=>no,PLAYER_TYPE:()=>ro,SessionStorageManager:()=>Tt,VERSION:()=>io,cast:()=>Wa,core:()=>g,getPlayer:()=>zi,getPlayers:()=>Ki,playlist:()=>Ya,providers:()=>m,registerPlugin:()=>fe,setup:()=>qi,ui:()=>v});var e=n(701),t=n.n(e),i=n(236),a=n.n(i),o=n(80),s=n.n(o),l=n(850),u=n.n(l),c=n(182),d=n.n(c),p=n(213),f=n.n(p),h=n(129),y={};y.styleTagTransform=f(),y.setAttributes=u(),y.insert=s().bind(null,"head"),y.domAPI=a(),y.insertStyleElement=d();t()(h.Z,y);h.Z&&h.Z.locals&&h.Z.locals;var g=n(75),v=n(79),m=n(859);n(305),n(644);function b(e){return b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},b(e)}function k(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,_(r.key),r)}}function E(e,t,n){return(t=_(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _(e){var t=function(e,t){if("object"!=b(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=b(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==b(t)?t:String(t)}var T=function(){function e(t,n){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),E(this,"_disabled",!1),this._player=t;var i=n.ui;if(i.disable){this._disabled=!0;var a=document.getElementById(i.targetId);a&&a.appendChild(t.getView())}else this._uiManager=new v.UIManager(t,i),i.customPreset||window.kalturaCustomPresetMap&&window.kalturaCustomPresetMap[i.targetId]?this._uiManager.buildCustomUI(i.customPreset||window.kalturaCustomPresetMap[i.targetId].audioPlayer):this._uiManager.buildDefaultUI(),this._handleVr(n.plugins),this._handleExternalCSS(i);return new Proxy(this,{get:function(e,t){return r._disabled?function(){}:e[t]}})}var t,n,r;return t=e,n=[{key:"destroy",value:function(){this._uiManager.destroy()}},{key:"reset",value:function(){this._resetErrorState()}},{key:"setConfig",value:function(e,t){this._uiManager.setConfig(e,t)}},{key:"addComponent",value:function(e){return this._uiManager.addComponent(e)}},{key:"removeComponent",value:function(e){var t={label:"Remove_".concat(e.removeComponent),get:v.Components.Remove,presets:e.presets,area:e.area||e.container,replaceComponent:e.removeComponent};return this._uiManager.addComponent(t)}},{key:"store",get:function(){return this._uiManager.store}},{key:"registerManager",value:function(e,t){this._player.registerService(e,t)}},{key:"getManager",value:function(e){return this._player.getService(e)}},{key:"hasManager",value:function(e){return this._player.hasService(e)}},{key:"setLoadingSpinnerState",value:function(e){this.setConfig({show:e},"loading")}},{key:"_resetErrorState",value:function(){this.setConfig({hasError:!1},"engine")}},{key:"_handleExternalCSS",value:function(t){t.css&&g.Utils.Dom.loadStyleSheetAsync(t.css).then((function(){e._logger.debug("external css was loaded successfully")}),(function(){e._logger.error("external css failed to load")}))}},{key:"_handleVr",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.vr&&!e.vr.disable&&this._setStereoConfig(e.vr)}},{key:"_setStereoConfig",value:function(e){(e.toggleStereo||(g.Env.isMobile||g.Env.isTablet)&&!1!==e.toggleStereo)&&this.setConfig(g.Utils.Object.mergeDeep({},{vrStereoMode:!!e.startInStereo}),"vrStereo")}}],n&&k(t.prototype,n),r&&k(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function A(e){return A="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},A(e)}function S(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,C(r.key),r)}}function w(e,t,n){return(t=C(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function C(e){var t=function(e,t){if("object"!=A(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=A(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==A(t)?t:String(t)}E(T,"_logger",(0,g.getLogger)("UIWrapper"));var x=function(){function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),w(this,"_prebid",null),this._loadPromise=g.Utils.Object.defer(),this._loadPromise.catch((function(){return e._logger.warn("Prebid SDK failed to load")})),t?(this._config=t,this._loadPrebidSDKLib(this._config.libUrl).then((function(){n._isPrebidSDKLibLoaded()?(n._prebid=window.pbjs,n._loadPromise.resolve()):n._loadPromise.reject()})).catch((function(){n._loadPromise.reject()}))):this._loadPromise.reject()}var t,n,r;return t=e,(n=[{key:"_isPrebidSDKLibLoaded",value:function(){return window.pbjs&&window.pbjs.que}},{key:"_loadPrebidSDKLib",value:function(e){return this._isPrebidSDKLibLoaded()?Promise.resolve():g.Utils.Dom.loadScriptAsync(e)}},{key:"_load",value:function(t){var n=this;return new Promise((function(r,i){n._loadPromise.then((function(){var a=setTimeout(i,t.timeout||4e3);n._prebid.que.push((function(){n._prebid.addAdUnits(t.adUnit),t.options&&n._prebid.setConfig(t.options),n._prebid.requestBids({bidsBackHandler:function(o){if(e._logger.debug("returned bids",o),clearTimeout(a),t.params){var s={};t.adUnit&&(s.adUnit=t.adUnit),s.params=t.params;var l=n._prebid.adServers.dfp.buildVideoUrl(s);r([{vastUrl:l}])}else try{var u=o[t.adUnit.code||Object.keys(o)[0]].bids;r(u)}catch(e){i()}}})}))})).catch(i)}))}},{key:"load",value:function(e){return this._load(e||this._config)}}])&&S(t.prototype,n),r&&S(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function P(e){return P="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},P(e)}function R(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,N(r.key),r)}}function I(e,t,n){return t=O(t),function(e,t){if(t&&("object"===P(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return L(e)}(e,D()?Reflect.construct(t,n||[],O(e).constructor):t.apply(e,n))}function D(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(D=function(){return!!e})()}function O(e){return O=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},O(e)}function L(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function M(e,t){return M=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},M(e,t)}function N(e){var t=function(e,t){if("object"!=P(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=P(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==P(t)?t:String(t)}w(x,"_logger",(0,g.getLogger)("PrebidManager"));var U=function(e){function t(e){var n,r,i,a;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),n=I(this,t),r=L(n),a="AdLayoutMiddleware",(i=N(i="id"))in r?Object.defineProperty(r,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):r[i]=a,n._context=e,n}var n,r,i;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&M(e,t)}(t,e),n=t,(r=[{key:"load",value:function(e){var t=this;this._context.prerollReady.then((function(){return t.callNext(e)}))}},{key:"play",value:function(e){var t=this;this._context.prerollReady.then((function(){return t.callNext(e)}))}}])&&R(n.prototype,r),i&&R(n,i),Object.defineProperty(n,"prototype",{writable:!1}),t}(g.BaseMiddleware);function B(e){return B="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},B(e)}function F(e){return function(e){if(Array.isArray(e))return j(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return j(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return j(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function j(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function H(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function V(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Z(r.key),r)}}function G(e,t,n){return t=z(t),function(e,t){if(t&&("object"===B(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,K()?Reflect.construct(t,n||[],z(e).constructor):t.apply(e,n))}function K(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(K=function(){return!!e})()}function z(e){return z=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},z(e)}function W(e,t){return W=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},W(e,t)}function Y(e,t,n){return(t=Z(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Z(e){var t=function(e,t){if("object"!=B(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=B(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==B(t)?t:String(t)}var q=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=G(this,t))._player=e,r._eventManager=new g.EventManager,r._liveEventManager=new g.EventManager,r._adsPluginControllers=n,r._prebidManager=new x(r._player.config.advertising&&r._player.config.advertising.prebid),r._init(),r}var n,r,i;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&W(e,t)}(t,e),n=t,r=[{key:"allAdsCompleted",get:function(){return this._allAdsCompleted}},{key:"isAdPlaying",value:function(){return this.isAdBreak()&&this._isAdPlaying}},{key:"isAdBreak",value:function(){return!!this._adBreak}},{key:"getAdBreaksLayout",value:function(){return this._adBreaksLayout}},{key:"getAdBreak",value:function(){return this._adBreak}},{key:"getAd",value:function(){return this._ad}},{key:"skipAd",value:function(){var e=this._adsPluginControllers.find((function(e){return e.active}));e&&e.skipAd()}},{key:"playAdNow",value:function(e){var n=this;if(this.isAdBreak())t._logger.warn("Tried to call playAdNow during an ad break");else{var r=Promise.all(e.map((function(e){return n._getPrebidAds(e)})));this._playAdBreak({position:this._player.currentTime||0,ads:e,played:!1,loadedPromise:r})}}},{key:"getMiddleware",value:function(){return this._middleware?this._middleware:this._middleware=new U(this)}},{key:"_init",value:function(){this._initMembers(),this._addBindings()}},{key:"_initMembers",value:function(){this._allAdsCompleted=!0,this._adBreaksLayout=[],this._adBreak=void 0,this._ad=void 0,this._adPlayed=!1,this._snapback=0,this._adIsLoading=!1,this._isAdPlaying=!1,this._liveSeeking=!1}},{key:"_addBindings",value:function(){var e=this;this._eventManager.listen(this._player,g.CustomEventType.SOURCE_SELECTED,(function(){return e._handleConfiguredAdBreaks()})),this._eventManager.listen(this._player,g.AdEventType.AD_MANIFEST_LOADED,(function(t){return e._onAdManifestLoaded(t)})),this._eventManager.listen(this._player,g.AdEventType.AD_BREAK_START,(function(t){return e._onAdBreakStart(t)})),this._eventManager.listen(this._player,g.AdEventType.AD_LOADED,(function(){return e._onAdLoaded()})),this._eventManager.listen(this._player,g.AdEventType.AD_STARTED,(function(t){return e._onAdStarted(t)})),this._eventManager.listen(this._player,g.AdEventType.AD_COMPLETED,(function(){return e._isAdPlaying=!1})),this._eventManager.listen(this._player,g.AdEventType.AD_BREAK_END,(function(){return e._onAdBreakEnd()})),this._eventManager.listen(this._player,g.AdEventType.ADS_COMPLETED,(function(){return e._onAdsCompleted()})),this._eventManager.listen(this._player,g.AdEventType.AD_ERROR,(function(t){return e._onAdError(t)})),this._eventManager.listen(this._player,g.CustomEventType.PLAYER_RESET,(function(){return e._reset()})),this._eventManager.listen(this._player,g.CustomEventType.PLAYER_DESTROY,(function(){return e._destroy()})),this._eventManager.listenOnce(this._player,g.Html5EventType.ENDED,(function(){return e._onEnded()})),this._eventManager.listenOnce(this._player,g.CustomEventType.PLAYBACK_ENDED,(function(){return e._onPlaybackEnded()})),this._eventManager.listen(this._player,g.AdEventType.AD_RESUMED,(function(){return e._isAdPlaying=!0})),this._eventManager.listen(this._player,g.AdEventType.AD_PAUSED,(function(){return e._isAdPlaying=!1}))}},{key:"_handleConfiguredAdBreaks",value:function(){var e=this,t=this._player.config.advertising.playAdsAfterTime||this._player.config.sources.startTime;this._configAdBreaks=this._player.config.advertising.adBreaks.filter((function(e){return("number"==typeof e.every||"number"==typeof e.position||"number"==typeof e.percentage)&&e.ads.length})).map((function(n){e._validateOneTimeConfig(n);var r=n.position;0===n.percentage&&(r=0),100===n.percentage&&(r=-1),n.every&&(r=n.every);var i=e._player.isLive()?r<t:r<=t;return{position:r,percentage:n.percentage,every:n.every,ads:n.ads.slice(),played:-1<r&&i}})),this._configAdBreaks.length?(this._dispatchAdManifestLoaded(),this._handlePrebidAdConfig(),this._handleConfiguredPreroll(),this._eventManager.listenOnce(this._player,g.Html5EventType.DURATION_CHANGE,(function(){e._player.isLive()?e._eventManager.listenOnce(e._player,g.Html5EventType.SEEKING,(function(){e._pushNextAdsForLive(e._configAdBreaks,(function(t){return e._player.currentTime+t.every})),e._attachLiveSeekedHandler()})):e._handleEveryAndPercentage(),e._configAdBreaks.sort((function(e,t){return e.position-t.position})),e._configAdBreaks.some((function(e){return e.position>0}))&&e._handleConfiguredMidrolls()}))):this.prerollReady=Promise.resolve()}},{key:"_validateOneTimeConfig",value:function(e){"number"==typeof e.position&&("number"==typeof e.percentage&&(t._logger.warn("Validate ad break - ignore percentage ".concat(e.percentage," as position ").concat(e.position," configured")),delete e.percentage),"number"==typeof e.every&&(t._logger.warn("Validate ad break - ignore every ".concat(e.every," as position ").concat(e.position," configured")),delete e.every)),"number"==typeof e.percentage&&"number"==typeof e.every&&(t._logger.warn("Validate ad break - ignore every ".concat(e.every," as percentage ").concat(e.percentage," configured")),delete e.every)}},{key:"_dispatchAdManifestLoaded",value:function(){var e=this,n=Array.from(new Set(this._configAdBreaks.map((function(e){return e.every&&e.every+"s"||"number"==typeof e.percentage&&e.percentage+"%"||e.position}))));t._logger.debug(g.AdEventType.AD_MANIFEST_LOADED,n),this._player.dispatchEvent(new g.FakeEvent(g.AdEventType.AD_MANIFEST_LOADED,{adBreaksPosition:n})),this._player.hasService("timeline")&&this._player.config.advertising.showAdBreakCuePoint&&n.forEach((function(t){e._player.getService("timeline").addCuePoint(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?H(Object(n),!0).forEach((function(t){Y(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):H(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({time:-1!==t?t:1/0},e._player.config.advertising.adBreakCuePointStyle))}))}},{key:"_handlePrebidAdConfig",value:function(){var e=this;this._prebidManager&&this._configAdBreaks.filter((function(e){return!e.played})).map((function(t){var n=Promise.all(t.ads.map((function(t){return e._getPrebidAds(t)})));t.loadedPromise=n,n.then((function(e){return t.ads=e}))}))}},{key:"_getPrebidAds",value:function(e){var t=this;return new Promise((function(n){if(e.prebid&&t._prebidManager){var r=g.Utils.Object.mergeDeep({},e.prebid,t._player.config.advertising.prebid);t._prebidManager.load(r).then((function(t){var r=t.map((function(e){return e&&e.vastUrl}));e.url=r.concat(e.url),n(e)})).catch((function(){n(e)}))}else n(e)}))}},{key:"_handleConfiguredPreroll",value:function(){var e=this._configAdBreaks.filter((function(e){return 0===e.position&&!e.played})),t=this._mergeAdBreaks(e);this.prerollReady=t&&t.loadedPromise?t.loadedPromise:Promise.resolve(),t&&this._playAdBreak(t)}},{key:"_handleEveryAndPercentage",value:function(){var e=this;this._configAdBreaks.forEach((function(t){if(e._player.duration&&t.every)for(var n=2*t.every;n<=e._player.duration;)e._configAdBreaks.push({position:n,ads:t.ads,played:!1,loadedPromise:Promise.resolve()}),n+=t.every;else e._player.duration&&t.percentage&&!t.position&&(t.position=Math.floor(e._player.duration*t.percentage/100))}))}},{key:"_attachLiveSeekedHandler",value:function(){var e=this;this._eventManager.listenOnce(this._player,g.CustomEventType.FIRST_PLAYING,(function(){e._eventManager.listen(e._player,g.Html5EventType.SEEKING,(function(){e._liveSeeking=!0})),e._eventManager.listen(e._player,g.Html5EventType.SEEKED,(function(){e._liveSeeking=!1,e._pushNextAdsForLive(e._configAdBreaks,(function(t){return e._player.currentTime+t.every}))}))}))}},{key:"_pushNextAdsForLive",value:function(e,n){this._liveEventManager.removeAll();var r=[];e.forEach((function(e){if(![-1,0].includes(e.position)){var i=e.every,a=e.ads,o={every:i,position:n(e),ads:a,played:!1,loadedPromise:Promise.resolve()};t._logger.debug("Pushing next ad for live",o),r.push(o)}})),r.length&&(this._configAdBreaks=[].concat(r,F(this._configAdBreaks.filter((function(e){return-1===e.position})))))}},{key:"_handleConfiguredMidrolls",value:function(){var e=this;this._eventManager.listen(this._player,g.Html5EventType.TIME_UPDATE,(function(){if(!e._player.paused&&!e._liveSeeking){var n=e._configAdBreaks.filter((function(t){return!t.played&&e._player.currentTime&&t.position<=e._player.currentTime&&t.position>e._snapback}));if(n.length){var r=n[n.length-1].position,i=n.filter((function(e){return e.position===r}));e._player.isLive()?!e._player.isDvr()||e._player.isOnLiveEdge()&&e._player.config.advertising.returnToLive?e._handleReturnToLive(i):e._pushNextAdsForLive(i,(function(t){return(e._player.isOnLiveEdge()?e._player.currentTime:t.position)+t.every})):(e._snapback=r,t._logger.debug("Set snapback value ".concat(e._snapback)),e._eventManager.listen(e._player,g.Html5EventType.SEEKED,(function(){var n=e._configAdBreaks.findIndex((function(t){return t.played&&"number"==typeof e._player.currentTime&&e._player.currentTime<t.position}));n>0&&!e._configAdBreaks[n-1].played&&(e._snapback=0,t._logger.debug("Reset snapback value"))})));var a=e._mergeAdBreaks(i);a&&e._playAdBreak(a)}}}))}},{key:"_handleReturnToLive",value:function(e){var t=this;this._liveEventManager.listenOnce(this._player,g.AdEventType.AD_ERROR,(function(){t._pushNextAdsForLive(e,(function(e){return(t._player.isOnLiveEdge()?t._player.currentTime:e.position)+e.every}))})),this._liveEventManager.listenOnce(this._player,g.AdEventType.AD_BREAK_END,(function(){t._player.seekToLiveEdge()}))}},{key:"_playAdBreak",value:function(e){var n=this._adsPluginControllers.find((function(e){return"function"==typeof e.playAdNow}));n?(e.played=!0,this._adIsLoading=!0,t._logger.debug("Playing ad break positioned in ".concat(e.position)),e.loadedPromise.then((function(){return n.playAdNow(e.ads)}))):t._logger.warn("No ads plugin registered")}},{key:"_onAdManifestLoaded",value:function(e){this._adBreaksLayout=Array.from(new Set(this._adBreaksLayout.concat(e.payload.adBreaksPosition))).sort(),this._allAdsCompleted=!1}},{key:"_onAdBreakStart",value:function(e){this._adBreak=e.payload.adBreak}},{key:"_onAdLoaded",value:function(){this._adIsLoading=!1}},{key:"_onAdStarted",value:function(e){this._ad=e.payload.ad,this._adPlayed=!0,this._isAdPlaying=!0}},{key:"_onAdBreakEnd",value:function(){this._adBreak=void 0,this._ad=void 0}},{key:"_onAdsCompleted",value:function(){this._adsPluginControllers.every((function(e){return e.done}))&&this._configAdBreaks.every((function(e){return e.played}))&&(this._allAdsCompleted=!0,t._logger.debug(g.AdEventType.ALL_ADS_COMPLETED),this.dispatchEvent(new g.FakeEvent(g.AdEventType.ALL_ADS_COMPLETED)))}},{key:"_onAdError",value:function(e){this._adIsLoading=!1,e.payload.severity===g.Error.Severity.CRITICAL&&(this._isAdPlaying=!1,this._adsPluginControllers.every((function(e){return e.done}))&&this._configAdBreaks.every((function(e){return e.played}))&&(this._allAdsCompleted=!0,this._adPlayed&&(t._logger.debug(g.AdEventType.ALL_ADS_COMPLETED),this.dispatchEvent(new g.FakeEvent(g.AdEventType.ALL_ADS_COMPLETED)))))}},{key:"_isBumper",value:function(e){return"bumper"===e.name}},{key:"_onEnded",value:function(){var e=this;if(!this._adIsLoading){var t=this._adsPluginControllers.find((function(t){return e._isBumper(t)})),n=this._adsPluginControllers.find((function(t){return!e._isBumper(t)&&!t.done})),r=t&&"function"==typeof t.onPlaybackEnded?function(){return t.onPlaybackEnded()}:function(){return Promise.resolve()},i=n&&"function"==typeof n.onPlaybackEnded?function(){return n.onPlaybackEnded()}:function(){return Promise.resolve()};this._adBreaksLayout.includes(-1)||this._adBreaksLayout.includes("100%")||(this._allAdsCompleted=!0),r().finally((function(){i().finally((function(){return e._handleConfiguredPostroll()}))}))}}},{key:"_onPlaybackEnded",value:function(){this._configAdBreaks.forEach((function(e){return e.played=!0}))}},{key:"_handleConfiguredPostroll",value:function(){var e=this._configAdBreaks.filter((function(e){return!e.played&&-1===e.position}));if(e.length){var t=this._mergeAdBreaks(e);t&&this._playAdBreak(t)}this._configAdBreaks.forEach((function(e){return e.played=!0}))}},{key:"_reset",value:function(){this._eventManager.removeAll(),this._liveEventManager.removeAll(),this._init()}},{key:"_destroy",value:function(){this._adsPluginControllers=[],this._eventManager.destroy(),this._liveEventManager.destroy()}},{key:"_mergeAdBreaks",value:function(e){if(e.length)return e.forEach((function(e){return e.played=!0})),{position:e[0].position,ads:e.reduce((function(e,t){return e.concat(t.ads)}),[]),played:!1,loadedPromise:Promise.all(e.map((function(e){return e.loadedPromise})))}}}],r&&V(n.prototype,r),i&&V(n,i),Object.defineProperty(n,"prototype",{writable:!1}),t}(g.FakeEventTarget);function X(e){return X="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},X(e)}function Q(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,$(r.key),r)}}function $(e){var t=function(e,t){if("object"!=X(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=X(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==X(t)?t:String(t)}Y(q,"_logger",(0,g.getLogger)("AdsController"));var J=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._pluginManager=t}var t,n,r;return t=e,(n=[{key:"getAdsControllers",value:function(){return Object.values(this._pluginManager.getAll()).filter((function(e){return"function"==typeof e.getAdsController})).map((function(e){return e.getAdsController()}))}}])&&Q(t.prototype,n),r&&Q(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function ee(e){return ee="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ee(e)}function te(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ne(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?te(Object(n),!0).forEach((function(t){ie(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):te(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function re(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ae(r.key),r)}}function ie(e,t,n){return(t=ae(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ae(e){var t=function(e,t){if("object"!=ee(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=ee(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==ee(t)?t:String(t)}var oe=function(){function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.name=t,this.player=n,this.eventManager=new g.EventManager,this.logger=(0,g.getLogger)(g.Utils.String.capitlize(this.name)),this.config=ne(ne({},this.constructor.defaultConfig),r)}var t,n,r;return t=e,n=[{key:"getConfig",value:function(e){return e?g.Utils.Object.copyDeep(this.config[e]):g.Utils.Object.copyDeep(this.config)}},{key:"ready",get:function(){return Promise.resolve()}},{key:"updateConfig",value:function(e){g.Utils.Object.mergeDeep(this.config,e)}},{key:"loadMedia",value:function(){}},{key:"open",value:function(){throw new g.Error(g.Error.Severity.CRITICAL,g.Error.Category.PLAYER,g.Error.Code.RUNTIME_ERROR_METHOD_NOT_IMPLEMENTED,"showOverlay()")}},{key:"destroy",value:function(){this.eventManager.destroy()}},{key:"reset",value:function(){}},{key:"getName",value:function(){return this.name}},{key:"dispatchEvent",value:function(e,t){this.logger.debug("Fire event: "+e,t),this.player.dispatchEvent(new g.FakeEvent(e,t))}}],r=[{key:"isValid",value:function(){throw new g.Error(g.Error.Severity.CRITICAL,g.Error.Category.PLAYER,g.Error.Code.RUNTIME_ERROR_METHOD_NOT_IMPLEMENTED,"isValid()")}}],n&&re(t.prototype,n),r&&re(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function se(e){return se="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},se(e)}function le(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ce(r.key),r)}}function ue(e,t,n){return(t=ce(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ce(e){var t=function(e,t){if("object"!=se(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=se(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==se(t)?t:String(t)}ie(oe,"defaultConfig",{});var de="registeredpluginslistevent",pe=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),ue(this,"_plugins",{}),ue(this,"_isDisabledPluginMap",new Map)}var t,n,r;return t=e,n=[{key:"load",value:function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!e._registry.has(t))throw e._logger.warn("Plugin <".concat(t,"> loading failed, plugin is not registered")),new g.Error(g.Error.Severity.RECOVERABLE,g.Error.Category.PLAYER,g.Error.Code.RUNTIME_ERROR_NOT_REGISTERED_PLUGIN,t);var i=e._registry.get(t);"boolean"==typeof r.disable&&this._isDisabledPluginMap.set(t,r.disable);var a=!!this._isDisabledPluginMap.get(t),o=!!i&&i.isValid();if(i&&o&&!a){try{this._plugins[t]=new i(t,n,r)}catch(e){throw new g.Error(g.Error.Severity.RECOVERABLE,g.Error.Category.PLAYER,g.Error.Code.PLUGIN_LOAD_FAILED,e)}return this._isDisabledPluginMap.set(t,!1),e._logger.debug("Plugin <".concat(t,"> has been loaded")),!0}return e._logger.debug("Plugin <".concat(t,"> isn't loaded, isValid()=").concat(o.toString(),", disabled=").concat(a.toString())),!1}},{key:"getRegisterdPluginsList",value:function(){return Array.from(e._registry.keys())}},{key:"loadMedia",value:function(){var e=this;Object.keys(this._plugins).forEach((function(t){return e._plugins[t].loadMedia()}))}},{key:"destroy",value:function(){var e=this;Object.keys(this._plugins).forEach((function(t){e._plugins[t].destroy(),delete e._plugins[t]}))}},{key:"reset",value:function(){var e=this;Object.keys(this._plugins).forEach((function(t){return e._plugins[t].reset()}))}},{key:"get",value:function(e){return this._plugins[e]}},{key:"getAll",value:function(){return this._plugins}}],r=[{key:"register",value:function(t,n){return"function"==typeof n&&n.prototype instanceof oe?e._registry.has(t)?(e._logger.debug("Plugin <".concat(t,"> is already registered, do not register again")),!1):(e._registry.set(t,n),e._logger.debug("Plugin <".concat(t,"> has been registered successfully")),!0):(e._logger.error("Plugin <".concat(t,"> registration failed, plugin is not an instance of BasePlugin")),!1)}},{key:"unRegister",value:function(t){e._registry.has(t)&&(e._registry.delete(t),e._logger.debug("Unregistered <".concat(t,"> plugin.")))}}],n&&le(t.prototype,n),r&&le(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();ue(pe,"_logger",(0,g.getLogger)("PluginManager")),ue(pe,"_registry",new Map);var fe=pe.register;function he(e){return he="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},he(e)}function ye(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ge(r.key),r)}}function ge(e){var t=function(e,t){if("object"!=he(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=he(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==he(t)?t:String(t)}function ve(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a,o,s=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){u=!0,i=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return me(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return me(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function me(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var be={youbora:{playerVersion:"{{pVersion}}",playerName:"{{pName}}",entryId:"{{entryId}}",entryName:"{{entryName}}",entryType:"{{entryType}}",sessionId:"{{sessionId}}",uiConfId:"{{uiConfId}}"},googleAnalytics:{entryId:"{{entryId}}",entryName:"{{entryName}}",uiConfId:"{{uiConfId}}",partnerId:"{{partnerId}}"},ottAnalytics:{entryId:"{{entryId}}",ks:"{{ks}}",isAnonymous:"{{isAnonymous}}",partnerId:"{{partnerId}}",serviceUrl:"{{serviceUrl}}"},ima:{playerVersion:"{{pVersion}}",playerName:"{{pName}}"},kava:{playerVersion:"{{pVersion}}",playerName:"{{pName}}",partnerId:"{{partnerId}}",playlistId:"{{playlistId}}",entryId:"{{entryId}}",entryType:"{{entryType}}",sessionId:"{{sessionId}}",ks:"{{ks}}",uiConfId:"{{uiConfId}}",referrer:"{{referrer}}",encodedReferrer:"{{encodedReferrer}}",serviceUrl:"{{analyticsServiceUrl}}"},comscore:{playerVersion:"{{pVersion}}"},vr:{rootElement:"{{domRootElementId}}"},share:{partnerId:"{{partnerId}}",uiConfId:"{{uiConfId}}",entryId:"{{entryId}}",embedBaseUrl:"{{embedBaseUrl}}",embedWidth:"{{embedWidth}}",embedHeight:"{{embedHeight}}"}},ke=new RegExp("{{.*}}"),Ee=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.entries(t).reduce((function(t,n){var r=ve(n,2),i=r[0],a=r[1];return g.Utils.Object.isObject(a)?t[i]=e(a):"string"==typeof a&&ke.test(a)?t[i]=a:t[i]=void 0,t}),{})},_e=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.entries(t).reduce((function(t,n){var r=ve(n,2),i=r[0],a=r[1];return g.Utils.Object.isObject(a)?t[i]=e(a):a&&(t[i]=a),t}),{})};function Te(e){return Te="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Te(e)}function Ae(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Re(r.key),r)}}function Se(e,t,n){return t=Ce(t),function(e,t){if(t&&("object"===Te(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return xe(e)}(e,we()?Reflect.construct(t,n||[],Ce(e).constructor):t.apply(e,n))}function we(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(we=function(){return!!e})()}function Ce(e){return Ce=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ce(e)}function xe(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Pe(e,t){return Pe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Pe(e,t)}function Re(e){var t=function(e,t){if("object"!=Te(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Te(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Te(t)?t:String(t)}var Ie=function(e){function t(){var e,n,r,i;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),e=Se(this,t),n=xe(e),i={ottAnalytics:{}},(r=Re(r="_ovpPluginsConfig"))in n?Object.defineProperty(n,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[r]=i,e._config=g.Utils.Object.mergeDeep({},e._basePluginsConfig,e._ovpPluginsConfig),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Pe(e,t)}(t,e),n=t,r&&Ae(n.prototype,r),i&&Ae(n,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,i}(function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._basePluginsConfig=g.Utils.Object.copyDeep(be)}var t,n,r;return t=e,(n=[{key:"get",value:function(){return this._config}},{key:"set",value:function(e){if(e){var t=Ee(e);this._config=_e(g.Utils.Object.mergeDeep(this._config,t))}}},{key:"reset",value:function(){this._config=g.Utils.Object.copyDeep(be)}}])&&ye(t.prototype,n),r&&ye(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}());const De=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{var n,r=e;for(var i in t){var a=void 0!==t[i]&&null!==t[i]?t[i]:"";"string"==typeof a&&a.indexOf('"')>-1&&(a=a.replace(/"/g,'\\"')),n=new RegExp("{{"+i+"}}","g"),r=r.replace(n,a)}return r}catch(e){return""}};function Oe(e,t){var n=function(e){var t=document.createElement("a");return t.href=e,t.hostname},r=n(t),i=!1,a="",o="";return e&&(e.flavors&&Array.isArray(e.flavors)?(a=(i=1===e.flavors.length)&&n(e.flavors[0].url),o=e.flavors[0].url):e.result&&(i=!0,a=n(e.result.url),o=e.result.url)),i&&r!==a?o:t}function Le(e,t){var n,r={};if((null==t||null===(n=t.sources)||void 0===n?void 0:n.type)===g.MediaType.LIVE&&("IE"===g.Env.browser.name||"Chromecast"===g.Env.device.model)){var i=g.Utils.Object.getPropertyPath(e,"sources.options.forceRedirectExternalStreams"),a=g.Utils.Object.getPropertyPath(t,"sources.options.forceRedirectExternalStreams");"boolean"!=typeof i&&"boolean"!=typeof a&&g.Utils.Object.mergeDeep(r,{sources:{options:{forceRedirectExternalStreams:!0}}})}return g.Utils.Object.mergeDeep(r,function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={},r=g.Utils.Object.getPropertyPath(e,"sources.options.redirectExternalStreamsHandler"),i=g.Utils.Object.getPropertyPath(t,"sources.options.redirectExternalStreamsHandler");return"function"!=typeof r&&"function"!=typeof i&&g.Utils.Object.mergeDeep(n,{sources:{options:{redirectExternalStreamsHandler:Oe}}}),n}(e,t))}var Me={INITIAL_CONFIG_REQUIRED:"Must provide initial providers config",PARTNER_ID_REQUIRED:"Must provide partner id",TARGET_ID_REQUIRED:"Must provide target id",DOM_ELEMENT_WITH_TARGET_ID_REQUIRED:"Must provide DOM element with id of: ",TARGET_ID_ALREADY_USED:"The target id provided is already in use. Id: "};function Ne(e){return Ne="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ne(e)}function Ue(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Be(r.key),r)}}function Be(e){var t=function(e,t){if("object"!=Ne(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Ne(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Ne(t)?t:String(t)}var Fe,je,He,Ve="@playkit-js/kaltura-player-js_",Ge=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,r;return t=e,r=[{key:"isStorageAvailable",value:function(e){if("undefined"==typeof Storage)return!1;try{return e.setItem("test","test"),e.removeItem("test"),!0}catch(e){return!1}}},{key:"getStorageSize",value:function(e){return Object.keys(e).filter((function(e){return e.startsWith(Ve)})).length}},{key:"setItem",value:function(t,n,r){e._validateKey(t);try{e._logger.debug("Sets item for key: "+t,n),r.setItem(Ve+t,n)}catch(t){e._isQuotaExceeded(t)?e._logger.error("Quota exceeded: "+t.message):e._logger.error(t.message)}}},{key:"getItem",value:function(t,n){e._validateKey(t);var r=null;try{return"string"==typeof(r=n.getItem(Ve+t))?JSON.parse(r):null}catch(e){return r}}},{key:"_isQuotaExceeded",value:function(e){var t=!1;if(e)if(e.code)switch(e.code){case 22:t=!0;break;case 1014:"NS_ERROR_DOM_QUOTA_REACHED"===e.name&&(t=!0)}else-2147024882===e.number&&(t=!0);return t}},{key:"_validateKey",value:function(e){if("string"!=typeof e||0===e.length)throw new Error("Invalid key")}}],(n=null)&&Ue(t.prototype,n),r&&Ue(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Ke(e){return Ke="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ke(e)}function ze(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function We(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Ze(r.key),r)}}function Ye(e,t,n){return t&&We(e.prototype,t),n&&We(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ze(e){var t=function(e,t){if("object"!=Ke(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Ke(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Ke(t)?t:String(t)}Fe=Ge,je="_logger",He=(0,g.getLogger)("StorageWrapper"),(je=Be(je))in Fe?Object.defineProperty(Fe,je,{value:He,enumerable:!0,configurable:!0,writable:!0}):Fe[je]=He;var qe=function(){function e(){ze(this,e),this.storageManagers=[]}return Ye(e,[{key:"addManager",value:function(e){this.storageManagers.push(e)}}],[{key:"getInstance",value:function(){return null===this.instance&&(this.instance=new e),this.instance}}]),e}();!function(e,t,n){(t=Ze(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(qe,"instance",null);var Xe=function(){function e(){ze(this,e)}return Ye(e,null,[{key:"init",value:function(e){this._logger=(0,g.getLogger)(e),qe.getInstance().addManager(this)}},{key:"attachAll",value:function(e){qe.getInstance().storageManagers.forEach((function(t){t.isStorageAvailable()&&t.attach(e)}))}},{key:"setStorageConfig",value:function(e){qe.getInstance().storageManagers.forEach((function(t){t.isStorageAvailable()&&t.hasStorage()&&g.Utils.Object.mergeDeep(e,t.getStorageConfig())}))}},{key:"isStorageAvailable",value:function(){return Ge.isStorageAvailable(this.getStorageObject())}},{key:"hasStorage",value:function(){var e=this.getStorageSize(),t=0!==e;return t?this._logger.debug("Storage found with size of ",e):this._logger.debug("No storage found"),t}},{key:"setItem",value:function(e,t){Ge.setItem(e,t,this.getStorageObject())}},{key:"getItem",value:function(e){return Ge.getItem(e,this.getStorageObject())}},{key:"getStorageSize",value:function(){return Ge.getStorageSize(this.getStorageObject())}},{key:"getStorageConfig",value:function(){var e=this._getExistingValues(),t=this._buildStorageConfig(e);return this._logger.debug("Gets storage config",t),t}},{key:"_getExistingValues",value:function(){var e=this,t={};return Object.keys(this.StorageKeys).forEach((function(n){var r=e.StorageKeys[n],i=e.getItem(r);null!=i&&(t[r]=i)})),t}},{key:"_buildStorageConfig",value:function(e){var t=g.Utils.Object.mergeDeep({},e);return delete t.textStyle,{playback:t}}},{key:"getStorageObject",value:function(){throw new g.Error(g.Error.Severity.CRITICAL,g.Error.Category.PLAYER,g.Error.Code.RUNTIME_ERROR_METHOD_NOT_IMPLEMENTED,"getStorageObject()")}},{key:"attach",value:function(e){throw new g.Error(g.Error.Severity.CRITICAL,g.Error.Category.PLAYER,g.Error.Code.RUNTIME_ERROR_METHOD_NOT_IMPLEMENTED,"attach()")}},{key:"initialize",value:function(){throw new g.Error(g.Error.Severity.CRITICAL,g.Error.Category.PLAYER,g.Error.Code.RUNTIME_ERROR_METHOD_NOT_IMPLEMENTED,"initialize()")}}]),e}();function Qe(e){return Qe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Qe(e)}function $e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,rt(r.key),r)}}function Je(e,t,n){return t=tt(t),function(e,t){if(t&&("object"===Qe(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,et()?Reflect.construct(t,n||[],tt(e).constructor):t.apply(e,n))}function et(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(et=function(){return!!e})()}function tt(e){return tt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},tt(e)}function nt(e,t){return nt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},nt(e,t)}function rt(e){var t=function(e,t){if("object"!=Qe(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Qe(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Qe(t)?t:String(t)}var it=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Je(this,t,arguments)}var n,r,i;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&nt(e,t)}(t,e),n=t,i=[{key:"initialize",value:function(){this.init(this.name)}},{key:"getStorageObject",value:function(){return localStorage}},{key:"attach",value:function(e){var t=this;this._logger.debug("Attach local storage");var n=new g.EventManager;n.listen(e,e.Event.UI.USER_CLICKED_MUTE,(function(){e.isCasting()||t.setItem(t.StorageKeys.MUTED,e.muted)})),n.listen(e,e.Event.UI.USER_CLICKED_UNMUTE,(function(){e.isCasting()||t.setItem(t.StorageKeys.MUTED,e.muted)})),n.listen(e,e.Event.UI.USER_CHANGED_VOLUME,(function(){e.isCasting()||(t.setItem(t.StorageKeys.MUTED,!e.volume),t.setItem(t.StorageKeys.VOLUME,e.volume))})),n.listen(e,e.Event.UI.USER_SELECTED_AUDIO_TRACK,(function(e){var n=e.payload.audioTrack;t.setItem(t.StorageKeys.AUDIO_LANG,n.language)})),n.listen(e,e.Event.UI.USER_SELECTED_CAPTION_TRACK,(function(e){var n=e.payload.captionTrack;"off"!==n.language?(t.setItem(t.StorageKeys.TEXT_LANG,n.language),t.setItem(t.StorageKeys.CAPTIONS_DISPLAY,!0)):t.setItem(t.StorageKeys.CAPTIONS_DISPLAY,!1)}));var r=function(){n.listenOnce(e,e.Event.Core.TEXT_TRACK_CHANGED,(function(e){var n=e.payload.selectedTextTrack;"off"!==n.language?(t.setItem(t.StorageKeys.TEXT_LANG,n.language),t.setItem(t.StorageKeys.CAPTIONS_DISPLAY,!0)):t.setItem(t.StorageKeys.CAPTIONS_DISPLAY,!1)}))};n.listen(e,e.Event.UI.USER_SHOWED_CAPTIONS,r),n.listen(e,e.Event.UI.USER_HID_CAPTIONS,r),n.listen(e,e.Event.UI.USER_SELECTED_CAPTIONS_STYLE,(function(e){try{var n=JSON.stringify(e.payload.captionsStyle);t.setItem(t.StorageKeys.TEXT_STYLE,n)}catch(e){t._logger.error(e.message)}})),n.listen(e,e.Event.Core.PLAYER_DESTROY,(function(){return n.destroy()}))}},{key:"getPlayerTextStyle",value:function(){return this.getItem(this.StorageKeys.TEXT_STYLE)}}],(r=null)&&$e(n.prototype,r),i&&$e(n,i),Object.defineProperty(n,"prototype",{writable:!1}),t}(Xe);function at(e){return at="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},at(e)}function ot(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function st(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ut(r.key),r)}}function lt(e,t,n){return t&&st(e.prototype,t),n&&st(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function ut(e){var t=function(e,t){if("object"!=at(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=at(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==at(t)?t:String(t)}!function(e,t,n){(t=rt(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(it,"StorageKeys",{MUTED:"muted",VOLUME:"volume",AUDIO_LANG:"audioLanguage",TEXT_LANG:"textLanguage",CAPTIONS_DISPLAY:"captionsDisplay",TEXT_STYLE:"textStyle"});var ct=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};ot(this,e),t.observedThresholds=t.observedThresholds||ht,t.playerThreshold="number"==typeof t.playerThreshold?t.playerThreshold:yt,this._config=t,this._eventManager=new g.EventManager,this._targetsObserved=new g.Utils.MultiMap;var n={threshold:t.observedThresholds.map((function(e){return e/100}))};this._observer=new window.IntersectionObserver(this._intersectionChangedHandler.bind(this),n),this._initTabVisibility()}return lt(e,[{key:"_intersectionChangedHandler",value:function(e){var t=this;e.forEach((function(e){t._targetsObserved.get(e.target).forEach((function(t){var n=e.intersectionRatio>=t.threshold;t.lastIntersectionRatio=e.intersectionRatio,n!==t.lastVisible&&(t.lastVisible=n,t.listener(n,dt.VIEWPORT))}))}))}},{key:"_handleTabVisibilityChange",value:function(){var e=this;this._isTabVisible=!document[this._visibilityTabHiddenAttr],this._targetsObserved.getAll().forEach((function(t){t.lastVisible&&t.listener(e._isTabVisible,dt.TAB)}))}},{key:"_initTabVisibility",value:function(){void 0!==document.hidden&&(this._visibilityTabHiddenAttr="hidden",this._visibilityTabChangeEventName="visibilitychange"),this._visibilityTabHiddenAttr&&this._visibilityTabChangeEventName&&(this._eventManager.listen(document,this._visibilityTabChangeEventName,this._handleTabVisibilityChange.bind(this)),this._isTabVisible=!document[this._visibilityTabHiddenAttr])}},{key:"observe",value:function(e,t,n){if(this._observer){var r="number"==typeof n?n:this._config.playerThreshold,i=new pt(r/100,t);if(this._targetsObserved.has(e)){var a=this._targetsObserved.get(e)[0].lastIntersectionRatio;void 0!==a&&(i.lastIntersectionRatio=a,i.listener(this._isTabVisible&&a>=i.threshold,dt.VIEWPORT))}else this._observer.observe(e);this._targetsObserved.push(e,i)}}},{key:"unObserve",value:function(e,t){this._observer&&(this._targetsObserved.remove(e,t),this._targetsObserved.has(e)||this._observer.unobserve(e))}},{key:"destroy",value:function(){this._observer&&(this._eventManager.destroy(),this._observer.disconnect(),this._targetsObserved.clear())}}]),e}(),dt={VIEWPORT:"viewport",TAB:"tab"},pt=lt((function e(t,n){ot(this,e),this.threshold=t,this.listener=n})),ft="visibilitychange",ht=[0,10,20,30,40,50,60,70,80,90,100],yt=50;function gt(e){return gt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},gt(e)}function vt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,_t(r.key),r)}}function mt(e,t,n){return t=kt(t),function(e,t){if(t&&("object"===gt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,bt()?Reflect.construct(t,n||[],kt(e).constructor):t.apply(e,n))}function bt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(bt=function(){return!!e})()}function kt(e){return kt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},kt(e)}function Et(e,t){return Et=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Et(e,t)}function _t(e){var t=function(e,t){if("object"!=gt(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=gt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==gt(t)?t:String(t)}var Tt=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),mt(this,t,arguments)}var n,r,i;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Et(e,t)}(t,e),n=t,i=[{key:"initialize",value:function(){this.init(this.name)}},{key:"getStorageObject",value:function(){return sessionStorage}},{key:"attach",value:function(e){var t=this;this._logger.debug("Attach session storage"),(new g.EventManager).listen(e,e.Event.UI.USER_SELECTED_SPEED,(function(){e.isCasting()||t.setItem(t.StorageKeys.PLAYBACK_RATE,e.playbackRate)}))}}],(r=null)&&vt(n.prototype,r),i&&vt(n,i),Object.defineProperty(n,"prototype",{writable:!1}),t}(Xe);function At(e){return At="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},At(e)}function St(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,wt(r.key),r)}}function wt(e){var t=function(e,t){if("object"!=At(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=At(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==At(t)?t:String(t)}!function(e,t,n){(t=_t(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(Tt,"StorageKeys",{PLAYBACK_RATE:"playbackRate"});var Ct=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,r;return t=e,r=[{key:"init",value:function(){e._value="".concat(g.Utils.Generator.guid(),":").concat(g.Utils.Generator.guid())}},{key:"next",value:function(){if(!e._value)return this.init(),e._value;var t=e._value,n=/:((?:[a-z0-9]|-)*)/i.exec(t);return n&&n[1]&&(e._value=t.replace(n[1],g.Utils.Generator.guid())),t}}],(n=null)&&St(t.prototype,n),r&&St(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function xt(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a,o,s=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){u=!0,i=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Pt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Pt(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Pt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}!function(e,t,n){(t=wt(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(Ct,"_value","");var Rt=[],It="kaltura-player-container",Dt="debugKalturaPlayer",Ot="kalturaStartTime",Lt="kalturaSeekFrom",Mt="kalturaClipTo",Nt=2504201,Ut="https://analytics.kaltura.com/api_v3/index.php?service=analytics&action=trackEvent&apiVersion=3.3.0&format=1&eventType=1&partnerId=".concat(Nt,"&entryId=1_3bwzbc9o&&eventIndex=1&position=0");function Bt(e){if(!e)throw new Error(Me.INITIAL_CONFIG_REQUIRED);!function(e){if(!e)throw new Error(Me.TARGET_ID_REQUIRED);var t=document.getElementById(e);if(!t)throw new Error(Me.DOM_ELEMENT_WITH_TARGET_ID_REQUIRED+e);if(t.getElementsByClassName(It).length>0)throw new Error(Me.TARGET_ID_ALREADY_USED+e)}(e.targetId)}function Ft(e){g.Utils.Object.getPropertyPath(e,"ui.log")||g.Utils.Object.createPropertyPath(e,"ui.log",{}),g.Utils.Object.getPropertyPath(e,"provider.log")||g.Utils.Object.createPropertyPath(e,"provider.log",{}),g.Utils.Object.getPropertyPath(e,"log")||g.Utils.Object.createPropertyPath(e,"log",{}),e.log&&"function"==typeof e.log.handler&&((0,g.setLogHandler)(e.log.handler),e.ui.log.handler=e.provider.log.handler=e.log.handler);var t=g.LogLevel.ERROR;!e.log||!0!==window.DEBUG_KALTURA_PLAYER&&""!==jt(Dt)?e.log&&e.log.level&&g.LogLevel[e.log.level]&&(t=g.LogLevel[e.log.level]):(t=g.LogLevel.DEBUG,e.log.level=g.LogLevel.DEBUG.name),e.ui.log.level=e.provider.log.level=t.name,(0,g.setLogLevel)(t)}function jt(e){var t;window.URLSearchParams?t=new URLSearchParams(window.location.search).get(e):t=function(e){e=e.replace(/[[]/,"\\[").replace(/[\]]/,"\\]");var t=new RegExp("[\\?&]"+e+"=([^&#]*)").exec(location.search),n=location.search.indexOf(e)>-1;return null===t?n?"":null:decodeURIComponent(t[1].replace(/\+/g," "))}(e);return t}function Ht(){return window.__kalturaplayerdata||{}}function Vt(e){var t=function(e){var t=document.createElement("div");t.id=g.Utils.Generator.uniqueId(5),t.className=It,t.setAttribute("tabindex","-1");var n=document.getElementById(e);return n&&t&&n.appendChild(t),t.id}(e.targetId),n={targetId:e.targetId,provider:{partnerId:e.provider.partnerId},ui:{targetId:t},plugins:{},advertising:{adBreaks:[]},viewability:{observedThresholds:ht,playerThreshold:yt}};if(g.Utils.Object.mergeDeep(n,e),!e.provider.ignoreServerConfig){var r=g.Utils.Object.copyDeep(Ht());delete r.productVersion,n=g.Utils.Object.mergeDeep({},Gt(r),n)}return function(e){if(g.Env.isMacOS&&g.Env.isSafari||g.Env.isIOS){"boolean"!=typeof g.Utils.Object.getPropertyPath(e,"playback.preferNative.hls")&&g.Utils.Object.mergeDeep(e,{playback:{preferNative:{hls:!0}}})}}(n),function(e){if(g.Env.isMacOS&&g.Env.isSafari||g.Env.isIOS){"boolean"!=typeof g.Utils.Object.getPropertyPath(e,"text.useNativeTextTrack")&&g.Utils.Object.mergeDeep(e,{text:{useNativeTextTrack:!0}})}}(n),function(e){var t=g.Utils.Object.getPropertyPath(e,"plugins.kava");t||(t=g.Utils.Object.mergeDeep(e,{plugins:{kava:{}}}))}(n),function(e){if(g.Env.isSmartTV){if((0,g.setCapabilities)(g.EngineType.HTML5,{autoplay:!0}),function(e){var t=g.Utils.Object.getPropertyPath(e,"playback.playAdsWithMSE");"boolean"!=typeof t&&(e=g.Utils.Object.createPropertyPath(e,"playback.playAdsWithMSE",!0));var n=g.Utils.Object.getPropertyPath(e,"plugins.ima.disableMediaPreload"),r=g.Utils.Object.getPropertyPath(e,"plugins.bumper.disableMediaPreload");e.plugins&&e.plugins.ima&&"boolean"!=typeof n&&(e=g.Utils.Object.createPropertyPath(e,"plugins.ima.disableMediaPreload",!0));e.plugins&&e.plugins.bumper&&"boolean"!=typeof r&&(e=g.Utils.Object.createPropertyPath(e,"plugins.bumper.disableMediaPreload",!0))}(e),function(e){var t=g.Utils.Object.getPropertyPath(e,"playback.options.html5.hls.liveSyncDurationCount");"boolean"!=typeof t&&g.Env.isSafari&&(e=g.Utils.Object.createPropertyPath(e,"playback.options.html5.hls.liveSyncDurationCount",2))}(e),e.plugins&&e.plugins.ima){var t=g.Utils.Object.getPropertyPath(e,"plugins.ima.forceReloadMediaAfterAds"),n=g.Utils.Object.getPropertyPath(e,"plugins.ima.delayInitUntilSourceSelected");"boolean"!=typeof t&&(e=g.Utils.Object.createPropertyPath(e,"plugins.ima.forceReloadMediaAfterAds",!0)),"boolean"!=typeof n&&(e=g.Utils.Object.createPropertyPath(e,"plugins.ima.delayInitUntilSourceSelected",!0))}if(e.plugins&&e.plugins.youbora)"number"!=typeof g.Utils.Object.getPropertyPath(e,"plugins.youbora.playheadMonitorInterval")&&(e=g.Utils.Object.createPropertyPath(e,"plugins.youbora.playheadMonitorInterval",2e3));"boolean"!=typeof g.Utils.Object.getPropertyPath(e,"streaming.lowLatencyMode")&&(e=g.Utils.Object.createPropertyPath(e,"streaming.lowLatencyMode",!1))}}(n),function(e){if("Edge"===g.Env.browser.name){g.Utils.Object.getPropertyPath(e,"drm.keySystem")||(e="Windows"===g.Env.os.name?g.Utils.Object.createPropertyPath(e,"drm.keySystem",g.DrmScheme.PLAYREADY):g.Utils.Object.createPropertyPath(e,"drm.keySystem",g.DrmScheme.WIDEVINE))}}(n),function(e){if(g.Env.isIOS&&e.plugins&&e.plugins.ima&&!e.plugins.ima.disable){var t=g.Utils.Object.getPropertyPath(e,"playback.playsinline"),n=g.Utils.Object.getPropertyPath(e,"plugins.ima.disableMediaPreload");!1===t&&"boolean"!=typeof n&&g.Utils.Object.createPropertyPath(e,"plugins.ima.disableMediaPreload",!0)}}(n),function(e){if(e.plugins&&e.plugins.imadai&&!e.plugins.imadai.disable){"boolean"!=typeof g.Utils.Object.getPropertyPath(e,"playback.options.html5.hls.autoStartLoad")&&g.Utils.Object.mergeDeep(e,{playback:{options:{html5:{hls:{autoStartLoad:!1}}}}})}}(n),function(e){var t=g.Utils.Object.getPropertyPath(e,"plugins.bumper"),n=g.Utils.Object.getPropertyPath(e,"plugins.imadai");if(t){var r={};"boolean"!=typeof t.playOnMainVideoTag&&(g.Env.isSmartTV||g.Env.isIOS&&e.playback&&!1===e.playback.playsinline)&&(r.playOnMainVideoTag=!0),n&&!n.disable&&(Array.isArray(t.position)||(r.position=[0]),"boolean"!=typeof t.disableMediaPreload&&(r.disableMediaPreload=!0)),g.Utils.Object.mergeDeep(e,{plugins:{bumper:r}})}}(n),function(e){var t=g.Utils.Object.getPropertyPath(e,"plugins.vr");if(t&&!t.disable){"boolean"!=typeof g.Utils.Object.getPropertyPath(e,"playback.inBrowserFullscreen")&&g.Utils.Object.mergeDeep(e,{playback:{inBrowserFullscreen:!0}})}}(n),function(e){if(g.Env.isIOS){var t=!1!==g.Utils.Object.getPropertyPath(e,"playback.playsinline");g.Utils.Object.hasPropertyPath(e,"plugins.airplay")?(0,g.setCapabilities)(g.EngineType.HTML5,{autoplay:!1,mutedAutoPlay:t}):"iPhone"!==g.Env.device.model||t||(0,g.setCapabilities)(g.EngineType.HTML5,{autoplay:!1,mutedAutoPlay:!1})}}(n),n}function Gt(e){return function(){if(e.player){Rt.push({level:"warn",msg:"Path config.player will be deprecated soon. Please update your config structure as describe here: ".concat("https://github.com/kaltura/kaltura-player-js/blob/master/docs/configuration.md")});var t=g.Utils.Object.copyDeep(e.player);delete e.player,g.Utils.Object.mergeDeep(e,t)}}(),[["duration","sources.duration"],["type","sources.type"],["dvr","sources.dvr"],["id","sources.id"],["name","metadata.name"],["metadata.poster","sources.poster"],["metadata","sources.metadata"],["logLevel","log.level"],["ui.components.fullscreen.inBrowserFullscreenForIOS","playback.inBrowserFullscreen"],["playback.enableCEA708Captions","text.enableCEA708Captions"],["playback.useNativeTextTrack","text.useNativeTextTrack"],["playback.options.html5.dash.useShakaTextTrackDisplay","text.useShakaTextTrackDisplay"],["playback.captionsTextTrack1Label","text.captionsTextTrack1Label"],["playback.captionsTextTrack1LanguageCode","text.captionsTextTrack1LanguageCode"],["playback.captionsTextTrack2Label","text.captionsTextTrack2Label"],["playback.captionsTextTrack2LanguageCode","text.captionsTextTrack2LanguageCode"],["plugins.visibility.threshold","viewability.playerThreshold"],["plugins.visibility.floating","plugins.floating"],["playback.startTime","sources.startTime"]].forEach((function(t){return function(t,n){if(g.Utils.Object.hasPropertyPath(e,t))if(Rt.push({level:"warn",msg:"Path config.player.".concat(t," will be deprecated soon. Please update your config structure as describe here: ").concat("https://github.com/kaltura/kaltura-player-js/blob/master/docs/configuration.md")}),g.Utils.Object.hasPropertyPath(e,n))g.Utils.Object.deletePropertyPath(e,t);else{var r=g.Utils.Object.getPropertyPath(e,t),i=g.Utils.Object.createPropertyPath({},n,r);g.Utils.Object.mergeDeep(e,i),g.Utils.Object.deletePropertyPath(e,t)}}(t[0],t[1])})),e}function Kt(e,t,n){var r=e.config.playback,i=!1;return r.streamPriority.forEach((function(e){e.engine===t&&(i=!0)})),i||r.streamPriority.push({engine:t,format:n}),r}function zt(e){var t=e&&e.progressive;return!(!t||!t[0]||"video/youtube"!==t[0].mimetype)}function Wt(e){var t=e&&e.image;return!(!t||!t[0])}function Yt(e){var t=e&&e.document;return!(!t||!t[0])}function Zt(e,t){var n={},r={};return g.Utils.Object.isObject(e)&&Object.entries(e).forEach((function(e){var i=xt(e,2),a=i[0],o=i[1];n[a]={},r[a]={},Object.entries(o).forEach((function(e){var i=xt(e,2),o=i[0],s=i[1],l=g.Utils.Object.getPropertyPath(t[a],o);n[a][o]=l||s,r[a][o]=l}))})),[n,r]}var qt="playSessionId=",Xt="referrer=",Qt="uiConfId=",$t="clientTag=html5:v",Jt="kaltura.com",en="custom_data=",tn="signature=",nn="seekFrom=",rn="clipTo=";function an(e,t){var n,r,i;e.config.session&&e.config.session.id?function(e,t){var n,r,i=null===(n=t.sources)||void 0===n?void 0:n.id;if(null!=e&&null!==(r=e.playlist)&&void 0!==r&&null!==(r=r.items)&&void 0!==r&&r.length){if(i){var a;if(null!==(a=e.sessionIdCache)&&void 0!==a&&a.get(i)){var o;on(t,null===(o=e.sessionIdCache)||void 0===o?void 0:o.get(i))}else{var s,l=Ct.next();null===(s=e.sessionIdCache)||void 0===s||s.set(i,l),on(t,l)}}}else on(t,Ct.next())}(e,t):(function(e){on(e,Ct.next())}(t),null!=e&&null!==(n=e.playlist)&&void 0!==n&&null!==(n=n.items)&&void 0!==n&&n.length&&null!==(r=t.sources)&&void 0!==r&&r.id&&(null===(i=e.sessionIdCache)||void 0===i||i.set(t.sources.id,t.session.id)))}function on(e,t){e.session=e.session||{},e.session.id=t}function sn(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:qt;if(n){var i,a=new RegExp(r+"((?:[a-z0-9]|-)*:(?:[a-z0-9]|-)*)","i").exec(t);if(a&&a[1])null!=e&&null!==(i=e.playlist)&&void 0!==i&&null!==(i=i.items)&&void 0!==i&&i.length||(t=t.replace(a[1],n));else t+=cn(t)+r+n}return t}function ln(){var e;try{e=window.parent.document.URL}catch(t){e=window.originalRequestReferrer||document.referrer}return e}function un(e){if(-1===e.indexOf(Xt)){var t=btoa(ln().substr(0,1e3));e+=cn(e)+Xt+t}return e}function cn(e){return-1===e.indexOf("?")?"?":"&"}function dn(e,t){return-1===e.indexOf($t)&&(e+=cn(e)+$t+(t||"3.17.26")),e}function pn(e,t){var n=g.Utils.Object.getPropertyPath(t,"seekFrom"),r=g.Utils.Object.getPropertyPath(t,"clipTo");return"number"==typeof n&&-1===e.indexOf(nn)&&(e+=cn(e)+nn+1e3*n),"number"==typeof r&&-1===e.indexOf(rn)&&(e+=cn(e)+rn+1e3*r),e}function fn(e,t){var n;an(e,t);var r=t.sources,i=t.session&&t.session.id,a=null===(n=Ht())||void 0===n?void 0:n.productVersion;Object.values(g.StreamType).forEach((function(n){r[n]&&r[n].forEach((function(n){"string"==typeof n.url&&n.url.toLowerCase().indexOf("playmanifest/")>-1&&!n.localSource&&(n.url=sn(e,n.url,i),n.url=un(n.url),n.url=dn(n.url,a),n.url=pn(n.url,r)),n.drmData&&n.drmData.length&&n.drmData.forEach((function(n){"string"==typeof n.licenseUrl&&[Jt,en,tn].every((function(e){return n.licenseUrl.includes(e)}))&&(n.licenseUrl=sn(e,n.licenseUrl,i,"sessionId="),n.licenseUrl=dn(n.licenseUrl,a),n.licenseUrl=un(n.licenseUrl),n.licenseUrl=function(e,t){var n=g.Utils.Object.getPropertyPath(t,"provider.uiConfId");return-1===e.indexOf(Qt)&&"number"==typeof n&&(e+=cn(e)+Qt+n),e}(n.licenseUrl,t))}))}))}))}function hn(e){return hn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},hn(e)}function yn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,gn(r.key),r)}}function gn(e){var t=function(e,t){if("object"!=hn(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=hn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==hn(t)?t:String(t)}function vn(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a,o,s=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){u=!0,i=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return mn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return mn(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function mn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var bn=(0,g.getLogger)("PluginsConfig"),kn=function(e){return("number"==typeof e||"function"==typeof e||"string"==typeof e||"boolean"==typeof e||g.Utils.Object.isClassInstance(e))&&!ke.test(e.toString())},En=function(e){return g.Utils.Object.isObject(e)&&"function"!=typeof e&&!g.Utils.Object.isClassInstance(e)},_n=function(e){return e.map((function(e){if(En(e)){var t=Tn(e);return g.Utils.Object.isEmptyObject(t)?null:t}return kn(e)?e:null})).filter((function(e){return null!==e}))},Tn=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.entries(t).reduce((function(t,n){var r=vn(n,2),i=r[0],a=r[1];return En(a)?t[i]=e(a):Array.isArray(a)?t[i]=_n(a):kn(a)&&(t[i]=a),t}),{})};var An=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._pluginConfigStore=new Ie}var t,n,r;return t=e,n=[{key:"evaluatePluginsConfig",value:function(e,t){if(e){this._pluginConfigStore.set(e);var n=function(e){var t,n={pVersion:(null===(t=Ht())||void 0===t?void 0:t.productVersion)||"3.17.26",pName:"@playkit-js/kaltura-player-js"};if(e.targetId&&(n.domRootElementId=e.targetId),e.provider&&e.provider.env){n.serviceUrl=e.provider.env.serviceUrl;var r=g.Utils.Object.getPropertyPath(e,"provider.env.analyticsServiceUrl");r&&(n.analyticsServiceUrl="".concat(r,"/api_v3/index.php")),n.serviceUrl&&(n.embedBaseUrl=n.serviceUrl.replace("api_v3",""))}var i,a={referrer:ln(),encodedReferrer:(i=ln(),encodeURIComponent(i))};e.provider&&g.Utils.Object.mergeDeep(a,{ks:e.provider.ks,uiConfId:e.provider.uiConfId,partnerId:e.provider.partnerId}),e.session&&g.Utils.Object.mergeDeep(a,{sessionId:e.session.id,ks:e.session.ks,isAnonymous:e.session.isAnonymous,uiConfId:e.session.uiConfId,partnerId:e.session.partnerId}),e.sources&&g.Utils.Object.mergeDeep(a,{entryId:e.sources.id,entryName:e.sources.metadata&&e.sources.metadata.name,entryType:e.sources.type}),e.playlist&&g.Utils.Object.mergeDeep(a,{playlistId:e.playlist.id}),Object.keys(a).forEach((function(e){void 0===a[e]&&delete a[e]})),g.Utils.Object.mergeDeep(n,a);var o=e.uiConfData;return o&&(n.embedWidth=o.width,n.embedHeight=o.height),n}(t),r=g.Utils.Object.mergeDeep({},this._pluginConfigStore.get(),e),i=function(e){var t,n;e=(n=e)?n.replace(/\\n/g,"\\n").replace(/\\'/g,"\\'").replace(/\\"/g,'\\"').replace(/\\&/g,"\\&").replace(/\\r/g,"\\r").replace(/\\t/g,"\\t").replace(/\\b/g,"\\b").replace(/\\f/g,"\\f").replace(/[\u0000-\u0019]+/g,""):"";try{t=JSON.parse(e,(function(e){try{return JSON.parse(this[e])}catch(t){return this[e]}}))}catch(e){bn.error("An error occurred while formatting config string.",e),t={}}return t}(De(JSON.stringify(r),n));!function(e,t){var n=Tn(t),r=Tn(e);r&&n&&Object.keys(e).forEach((function(t){e&&e[t]&&(e[t]=g.Utils.Object.mergeDeep({},n[t],r[t]))}))}(e,i)}}}],n&&yn(t.prototype,n),r&&yn(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Sn(e){return Sn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Sn(e)}function wn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,On(r.key),r)}}function Cn(e,t,n){return t=Pn(t),function(e,t){if(t&&("object"===Sn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Rn(e)}(e,xn()?Reflect.construct(t,n||[],Pn(e).constructor):t.apply(e,n))}function xn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(xn=function(){return!!e})()}function Pn(e){return Pn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Pn(e)}function Rn(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function In(e,t){return In=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},In(e,t)}function Dn(e,t,n){return(t=On(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function On(e){var t=function(e,t){if("object"!=Sn(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Sn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Sn(t)?t:String(t)}var Ln=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Dn(Rn(n=Cn(this,t)),"id","PluginReadinessMiddleware"),n._plugins=e,t._logger.debug("plugins readiness",n._plugins),n}var n,r,i;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&In(e,t)}(t,e),n=t,(r=[{key:"load",value:function(e){this._checkNextSettle(0,e)}},{key:"_checkNextSettle",value:function(e,t){e<this._plugins.length?this._checkSettle(e,t):this.callNext(t)}},{key:"_checkSettle",value:function(e,n){var r=this;(this._plugins[e].ready?this._plugins[e].ready:Promise.resolve()).then((function(){t._logger.debug("plugin ".concat(r._plugins[e].name," ready promise resolved")),r._checkNextSettle(e+1,n)})).catch((function(){t._logger.debug("plugin ".concat(r._plugins[e].name," ready promise rejected")),r._checkNextSettle(e+1,n)}))}},{key:"play",value:function(e){this._checkNextSettle(0,e)}}])&&wn(n.prototype,r),i&&wn(n,i),Object.defineProperty(n,"prototype",{writable:!1}),t}(g.BaseMiddleware);function Mn(e){return Mn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Mn(e)}function Nn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Un(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Nn(Object(n),!0).forEach((function(t){Fn(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Nn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Bn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,jn(r.key),r)}}function Fn(e,t,n){return(t=jn(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function jn(e){var t=function(e,t){if("object"!=Mn(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Mn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Mn(t)?t:String(t)}Dn(Ln,"_logger",(0,g.getLogger)("PluginReadinessMiddleware"));var Hn={thumbsWidth:164,thumbsHeight:92,thumbsSlices:100},Vn=/.*\/p\/\d+\/(?:[a-zA-Z]+\/\d+\/)*thumbnail\/entry_id\/\w+\/.*\d+/,Gn=function(){function e(t,n,r){var i=this;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Fn(this,"_isUsingKalturaThumbnail",(function(){return!(!i._thumbnailConfig||!i._thumbnailConfig.thumbsSprite)})),Fn(this,"_convertKalturaThumbnailToThumbnailInfo",(function(e){if(i._thumbnailConfig){var t=i._thumbnailConfig,n=t.thumbsSprite,r=t.thumbsWidth,a=t.thumbsSlices,o=i._player.duration/a,s={x:Math.floor(e/o)*r,y:0,url:n,height:i._thumbsHeight,width:r};return new g.ThumbnailInfo(s)}return null})),Fn(this,"_buildKalturaThumbnailConfig",(function(e,t){var n,r,a,o=g.Utils.Object.getPropertyPath(e,"components.seekbar"),s=null===(n=t.sources)||void 0===n?void 0:n.rawThumbnailUrl,l=(null===(r=t.sources)||void 0===r?void 0:r.type)===g.MediaType.VOD,u=i._player.shouldAddKs(t)?null===(a=t.session)||void 0===a?void 0:a.ks:"",c=g.Utils.Object.mergeDeep(Hn,o);return Un({thumbsSprite:l?i._getThumbSlicesUrl(s,u,c):""},c)})),Fn(this,"_maybeCutThumbnail",(function(e){var t=g.Utils.Object.getPropertyPath(i._player.config.sources,"seekFrom"),n=g.Utils.Object.getPropertyPath(i._player.config.sources,"clipTo"),r=e;return"number"==typeof t&&(r+="/start_sec/".concat(t)),"number"==typeof n&&(r+="/end_sec/".concat(n)),r})),Fn(this,"_getThumbSlicesUrl",(function(e,t,n){if("string"==typeof e&&Vn.test(e))try{var r=Un({thumbnailUrl:e},n),a=De("{{thumbnailUrl}}/width/{{thumbsWidth}}/vid_slices/{{thumbsSlices}}",r),o=i._maybeCutThumbnail(a);return t?o+"/ks/".concat(t):o}catch(e){return""}return""})),this._player=t,this._thumbnailConfig=this._buildKalturaThumbnailConfig(n,r),this._eventManager=new g.EventManager,this._isUsingKalturaThumbnail()){var a,o=new Image;this._eventManager.listenOnce(o,"load",(function(){i._thumbsHeight=o.naturalHeight})),o.src=(null===(a=this._thumbnailConfig)||void 0===a?void 0:a.thumbsSprite)||""}}var t,n,r;return t=e,(n=[{key:"destroy",value:function(){this._eventManager.destroy()}},{key:"getThumbnail",value:function(e){return this._isUsingKalturaThumbnail()?this._convertKalturaThumbnailToThumbnailInfo(e):this._player._localPlayer.getThumbnail(e)}},{key:"getKalturaThumbnailConfig",value:function(){return this._thumbnailConfig}}])&&Bn(t.prototype,n),r&&Bn(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Kn(e){return Kn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Kn(e)}function zn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Wn(r.key),r)}}function Wn(e){var t=function(e,t){if("object"!=Kn(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Kn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Kn(t)?t:String(t)}var Yn=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._player=t}var t,n,r;return t=e,(n=[{key:"_addTextTrack",value:function(){this._textTrack=this._player.addTextTrack(g.PKTextTrack.KIND.METADATA,"CuePoints")}},{key:"_getMetadataTracks",value:function(){return this._player.getNativeTextTracks().filter((function(e){return e.kind===g.PKTextTrack.KIND.METADATA&&e.cues}))}},{key:"_createTextTrackCue",value:function(e){var t=e.startTime,n=e.endTime,r=e.id,i=e.metadata;return(0,g.createTextTrackCue)({startTime:t,endTime:n,id:r,type:g.TimedMetadata.TYPE.CUE_POINT,metadata:i})}},{key:"_cuesSorter",value:function(e,t){return e.startTime-t.startTime}},{key:"getAllCuePoints",value:function(){return this._getMetadataTracks().reduce((function(e,t){return e.concat(Array.from(t.cues).map((function(e){return(0,g.createTimedMetadata)(e)})))}),[]).sort(this._cuesSorter)}},{key:"getActiveCuePoints",value:function(){return this._getMetadataTracks().reduce((function(e,t){return e.concat(Array.from(t.activeCues).map((function(e){return(0,g.createTimedMetadata)(e)})))}),[]).sort(this._cuesSorter)}},{key:"_getTextTrackCueById",value:function(e){var t=null;return this._getMetadataTracks().some((function(n){return t=n.cues.getCueById(e)})),t}},{key:"_removeTextTrackCue",value:function(e){try{var t;null===(t=e.track)||void 0===t||t.removeCue(e)}catch(e){}}},{key:"addCuePoints",value:function(e){var t=this;this._player.ready().then((function(){t._textTrack||t._addTextTrack();var n=[];e.forEach((function(e){var r,i=t._createTextTrackCue(e),a=t._getTextTrackCueById(e.id);a&&t._removeTextTrackCue(a),null===(r=t._textTrack)||void 0===r||r.addCue(i),n.push((0,g.createTimedMetadata)(i))})),t._player.dispatchEvent(new g.FakeEvent(g.EventType.TIMED_METADATA_ADDED,{cues:n}))}))}},{key:"_clearAllTextTrackCues",value:function(){var e=this;this._getMetadataTracks().forEach((function(t){for(;t.cues.length;)e._removeTextTrackCue(t.cues[0])}))}},{key:"reset",value:function(){this._clearAllTextTrackCues()}},{key:"destroy",value:function(){this.reset()}}])&&zn(t.prototype,n),r&&zn(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Zn(e){return Zn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Zn(e)}function qn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Xn(r.key),r)}}function Xn(e){var t=function(e,t){if("object"!=Zn(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Zn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Zn(t)?t:String(t)}var Qn=function(){function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),function(e,t,n){(t=Xn(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(this,"_servicesRegistry",new Map),e._logger=(0,g.getLogger)("ServiceProvider"),this._eventManager=new g.EventManager,this._eventManager.listen(t,t.Event.Core.PLAYER_RESET,(function(){return n.reset()}))}var t,n,r;return t=e,(n=[{key:"register",value:function(t,n){this._servicesRegistry.has(t)?e._logger.debug("".concat(t," service already exists")):(this._servicesRegistry.set(t,n),e._logger.debug("".concat(t," service registered")))}},{key:"get",value:function(e){return this._servicesRegistry.get(e)}},{key:"has",value:function(e){return this._servicesRegistry.has(e)}},{key:"reset",value:function(){this._servicesRegistry.forEach((function(e){return"function"==typeof e.reset&&e.reset()}))}},{key:"destroy",value:function(){this._servicesRegistry.forEach((function(e){return"function"==typeof e.destroy&&e.destroy()})),this._eventManager.removeAll(),this._servicesRegistry.clear()}}])&&qn(t.prototype,n),r&&qn(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}(),$n="kaltura-player",Jn={PLAYLIST_LOADED:"".concat($n,"-playlistloaded"),PLAYLIST_ITEM_CHANGED:"".concat($n,"-playlistitemchanged"),PLAYLIST_ENDED:"".concat($n,"-playlistended")};function er(e){return er="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},er(e)}function tr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,nr(r.key),r)}}function nr(e){var t=function(e,t){if("object"!=er(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=er(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==er(t)?t:String(t)}var rr=["hls","dash","progressive","image","document"],ir=function(){function e(t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._sources=t,this._config=n,this._index=r}var t,n,r;return t=e,(n=[{key:"updateSources",value:function(e){this._sources=g.Utils.Object.mergeDeep({},e)}},{key:"updatePlugins",value:function(e){this._plugins=g.Utils.Object.copyDeep(e)}},{key:"sources",get:function(){var e=this;return rr.forEach((function(t){e._sources&&e._sources[t]&&0===e._sources[t].length&&delete e._sources[t]})),this._sources}},{key:"config",get:function(){return this._config}},{key:"plugins",get:function(){return this._plugins||{}}},{key:"index",get:function(){return this._index}},{key:"isPlayable",value:function(){var e=this;return!!rr.find((function(t){return e._sources&&e._sources[t]&&e._sources[t].length}))}}])&&tr(t.prototype,n),r&&tr(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function ar(e){return ar="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ar(e)}function or(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,sr(r.key),r)}}function sr(e){var t=function(e,t){if("object"!=ar(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=ar(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==ar(t)?t:String(t)}var lr=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._id="",this._metadata={name:"",description:""},this._poster="",this._items=[],this._activeItemIndex=-1}var t,n,r;return t=e,(n=[{key:"configure",value:function(e,t){var n=this;this._id=e.id?e.id:this._id,this._poster=e.poster?e.poster:this._poster,this._metadata=e.metadata?e.metadata:this._metadata,e.items&&(this._items=[],e.items.forEach((function(e,r){if(e.sources){var i=g.Utils.Object.mergeDeep({},t),a=e.sources.options||{};e.sources.options=g.Utils.Object.mergeDeep(i,a)}n._items.push(new ir(e.sources,e.config,r))})))}},{key:"updateItemSources",value:function(e,t){this._items[e].updateSources(t)}},{key:"updateItemPlugins",value:function(e,t){this._items[e].updatePlugins(t)}},{key:"id",get:function(){return this._id}},{key:"items",get:function(){return this._items}},{key:"metadata",get:function(){return this._metadata}},{key:"poster",get:function(){return this._poster}},{key:"current",get:function(){return this._items[this._activeItemIndex]||null}},{key:"getNext",value:function(e){var t=e?(this._activeItemIndex+1)%this._items.length:this._activeItemIndex+1;return this._items[t]||null}},{key:"prev",get:function(){return this._items[this._activeItemIndex-1]||null}},{key:"activeItemIndex",set:function(e){this._activeItemIndex=e}}])&&or(t.prototype,n),r&&or(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function ur(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return cr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return cr(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}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 a,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function cr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function dr(e){return dr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},dr(e)}function pr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,fr(r.key),r)}}function fr(e){var t=function(e,t){if("object"!=dr(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=dr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==dr(t)?t:String(t)}var hr=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._player=t,this._eventManager=new g.EventManager,this._playlist=new lr,this._options={autoContinue:!0,loop:!1,imageDuration:5,documentDuration:10},this._countdown={duration:10,showing:!0},this._mediaInfoList=[],this._playerOptions=n,this._appPluginConfig={}}var t,n,r;return t=e,(n=[{key:"configure",value:function(e,t){if(e&&(this._playlist.configure(e,g.Utils.Object.getPropertyPath(this._player.sources,"options")),g.Utils.Object.mergeDeep(this._options,e.options),g.Utils.Object.mergeDeep(this._countdown,e.countdown),e.items&&e.items.find((function(e){return!!e.sources})))){var n;this._mediaInfoList=e.items.map((function(e,n){return t&&t.entries&&"object"===dr(t.entries[n])?t.entries[n]:{entryId:e.sources.id}})),this._player.dispatchEvent(new g.FakeEvent(Jn.PLAYLIST_LOADED,{playlist:this})),this._addBindings();var r=null===(n=e.options)||void 0===n?void 0:n.startAtEntryId,i=!1;if(r&&"string"==typeof r){var a=this._playlist.items.find((function(e){return e.sources.id===r}));a&&(i=!0,this.playItem(a.index))}i||this.playNext()}}},{key:"load",value:function(e,t,n){var r=this._getMergedPlaylistData(e,t);this.configure(r,n)}},{key:"reset",value:function(){this._eventManager.removeAll(),this._playlist=new lr,this._mediaInfoList=[]}},{key:"playNext",value:function(){e._logger.debug("playNext");var t=this._playlist.getNext(!0);t&&this._setItem(t)}},{key:"playPrev",value:function(){e._logger.debug("playPrev");var t=this._playlist.prev;t&&this._setItem(t)}},{key:"playItem",value:function(t){e._logger.debug("playItem(".concat(t,")"));var n=this._playlist.items[t];n&&this._setItem(n)}},{key:"items",get:function(){return this._playlist.items}},{key:"current",get:function(){return this._playlist.current}},{key:"next",get:function(){return this._playlist.getNext(this._options.loop)}},{key:"prev",get:function(){return this._playlist.prev}},{key:"id",get:function(){return this._playlist.id}},{key:"metadata",get:function(){return this._playlist.metadata}},{key:"poster",get:function(){return this._playlist.poster}},{key:"countdown",get:function(){if(this._playlist.current&&this._playlist.current.config){var e={duration:10,showing:!0};return g.Utils.Object.mergeDeep(e,this._countdown,this._playlist.current.config.countdown),e}return this._countdown}},{key:"options",get:function(){return this._options}},{key:"_getMergedPlaylistData",value:function(e,t){var n=this;return{id:e.id,metadata:e.metadata,poster:e.poster,options:t?t.options:this._options,countdown:t?t.countdown:this.countdown,items:e.items.map((function(e,r){var i,a=g.Utils.Object.copyDeep(e);return a.sources.mediaEntryType=null==e||null===(i=e.sources)||void 0===i?void 0:i.type,["sources.dvr","sources.type"].forEach((function(e){g.Utils.Object.deletePropertyPath(a,e)})),g.Utils.Object.mergeDeep(a.sources,t&&t.items&&t.items[r]&&t.items[r].sources),Array.isArray(a.sources.poster)&&n._player.updateKalturaPoster(a.sources,e.sources,n._player.dimensions),{sources:a.sources,config:t&&t.items&&t.items[r]&&t.items[r].config}}))}}},{key:"_addBindings",value:function(){var e=this;this._eventManager.listen(this._player,this._player.Event.Core.PLAYBACK_ENDED,(function(){return e._onPlaybackEnded()})),this._eventManager.listen(this._player,this._player.Event.Core.CHANGE_SOURCE_STARTED,(function(){return e._onChangeSourceStarted()}))}},{key:"_onPlaybackEnded",value:function(){var e=this._playlist.getNext(!1);e||this._player.dispatchEvent(new g.FakeEvent(Jn.PLAYLIST_ENDED)),!this._playerOptions.ui.disable&&this.countdown.showing||(e&&this._options.autoContinue||this._options.loop)&&this.playNext()}},{key:"_onChangeSourceStarted",value:function(){this._player.isImage()?this._player.configure({sources:{duration:this._options.imageDuration}}):this._player.isDocument()&&this._player.configure({sources:{duration:this._options.documentDuration}})}},{key:"_setItem",value:function(t){var n=this,r=t.index;e._logger.debug("Playing item number ".concat(r),t);var i={loop:!1};if(this._playlist.current&&(this._player._playbackStart?i.autoplay=!0:i.autoplay=!!this._playerOptions.playback.autoplay),this._player.configure({playback:i}),this._playlist.activeItemIndex=r,Promise.all(this.getEntryPromises([r-1,r+1])).then((function(e){var t,r=[],i=ur(e);try{for(i.s();!(t=i.n()).done;){var a,o=t.value;null!==(a=o.sources.dash)&&void 0!==a&&a.length&&(r=r.concat(o.sources.dash.map((function(e){return e.url}))))}}catch(e){i.e(e)}finally{i.f()}n._player.setCachedUrls(r)})),t.isPlayable()){var a,o;this._resetProviderPluginsConfig();var s=Zt(t.plugins,this._player.config.plugins),l=s[0];this._appPluginConfig=s[1];var u={session:this._player.config.session,plugins:l,sources:t.sources};return this._player.setMedia(u),this._player.dispatchEvent(new g.FakeEvent(Jn.PLAYLIST_ITEM_CHANGED,{index:r,activeItem:t,entryId:(null===(a=this._mediaInfoList[r])||void 0===a?void 0:a.entryId)||(null===(o=t.sources)||void 0===o?void 0:o.id)})),Promise.resolve()}if(this._mediaInfoList[r]){this._resetProviderPluginsConfig();var c={sources:t.sources};return this._player.setMedia(c),this._player.loadMedia(this._mediaInfoList[r]).then((function(e){var i;n._playlist.updateItemSources(r,e.sources),n._playlist.updateItemPlugins(r,e.plugins);var a,o=null===(i=n._player.sessionIdCache)||void 0===i?void 0:i.get(e.sources.id);o||(o=Ct.next(),null===(a=n._player.sessionIdCache)||void 0===a||a.set(e.sources.id,o)),e.sources.dash=e.sources.dash.map((function(t){return t.url=sn(n._player,t.url,o),t.url=un(t.url),t.url=dn(t.url,e.productVersion),t.url=pn(t.url,e.sources),t})),n._player.dispatchEvent(new g.FakeEvent(Jn.PLAYLIST_ITEM_CHANGED,{index:r,activeItem:t,entryId:n._mediaInfoList[r].entryId}))}))}return Promise.reject()}},{key:"_resetProviderPluginsConfig",value:function(){this._player.configure({plugins:this._appPluginConfig}),this._appPluginConfig={}}},{key:"destroy",value:function(){this._eventManager.destroy()}},{key:"getEntryPromise",value:function(e){var t=this;return this._playlist.items[e].isPlayable()?Promise.resolve({sources:this._playlist.items[e].sources}):this._player.provider.getMediaConfig(this._mediaInfoList[e]).then((function(n){var r,i=g.Utils.Object.copyDeep(n);t._playlist.updateItemSources(e,i.sources),t._playlist.updateItemPlugins(e,i.plugins);var a,o=null===(r=t._player.sessionIdCache)||void 0===r?void 0:r.get(i.sources.id);return o||(o=Ct.next(),null===(a=t._player.sessionIdCache)||void 0===a||a.set(i.sources.id,o)),i.sources.dash=i.sources.dash.map((function(e){return e.url=sn(t._player,e.url,o),e.url=un(e.url),e.url=dn(e.url,i.productVersion),e.url=pn(e.url,i.sources),e})),Promise.resolve(i)}))}},{key:"getEntryPromises",value:function(e){var t,n=[],r=ur(e);try{for(r.s();!(t=r.n()).done;){var i=t.value,a=this._playlist.items[i];if(null!=a&&a.sources){var o=a.sources,s=o.type,l=o.mediaEntryType;s!==g.MediaType.VOD&&l!==g.MediaType.VOD||n.push(this.getEntryPromise(i))}}}catch(e){r.e(e)}finally{r.f()}return n}}])&&pr(t.prototype,n),r&&pr(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function yr(e){return yr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},yr(e)}function gr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,mr(r.key),r)}}function vr(e,t,n){return t&&gr(e.prototype,t),n&&gr(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function mr(e){var t=function(e,t){if("object"!=yr(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=yr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==yr(t)?t:String(t)}!function(e,t,n){(t=fr(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(hr,"_logger",(0,g.getLogger)("PlaylistManager"));var br=vr((function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.textStyle=t.textStyle,this.mediaInfo=t.getMediaInfo(),this.mediaConfig=t.getMediaConfig(),this.advertising=t.config.plugins&&t.config.plugins.ima,this.config=g.Utils.Object.mergeDeep({},t.config,{sources:{startTime:kr(t)},playback:{autoplay:0===t.currentTime||!t.paused,audioLanguage:Er(g.TrackType.AUDIO,t),textLanguage:Er(g.TrackType.TEXT,t)}})}));function kr(e){return e.isLive()?e.isDvr()?e.duration-e.currentTime<e.config.cast.dvrThreshold||!e.currentTime?-1:e.currentTime:-1:!e.isCasting()&&!e.currentTime&&e.config.sources.startTime>-1?e.config.sources.startTime:e.currentTime}function Er(e,t){var n=t.getActiveTracks();if(n[e])return n[e].language;try{return t.config.playback["".concat(e,"Language")]}catch(e){return null}}var _r="kaltura-player",Tr={CAST_SESSION_START_FAILED:"".concat(_r,"-castsessionstartfailed"),CAST_SESSION_STARTING:"".concat(_r,"-castsessionstarting"),CAST_SESSION_STARTED:"".concat(_r,"-castsessionstarted"),CAST_SESSION_ENDING:"".concat(_r,"-castsessionending"),CAST_SESSION_ENDED:"".concat(_r,"-castsessionended"),CAST_AVAILABLE:"".concat(_r,"-castavailable")};function Ar(e){return Ar="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ar(e)}function Sr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Cr(r.key),r)}}function wr(e,t,n){return t&&Sr(e.prototype,t),n&&Sr(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Cr(e){var t=function(e,t){if("object"!=Ar(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Ar(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Ar(t)?t:String(t)}var xr=wr((function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.getPlayerSnapshot=Mr.bind(t),this.getUIWrapper=Ur.bind(t),this.onRemoteDeviceAvailable=Or.bind(t),this.onRemoteDeviceConnected=Rr.bind(t),this.onRemoteDeviceDisconnected=Dr.bind(t),this.onRemoteDeviceConnecting=Pr.bind(t),this.onRemoteDeviceDisconnecting=Ir.bind(t),this.onRemoteDeviceConnectFailed=Lr.bind(t),this.getPlayerSelectedSource=Nr.bind(t)}));function Pr(){xr._logger.debug("onRemoteDeviceConnecting"),this.dispatchEvent(new g.FakeEvent(Tr.CAST_SESSION_STARTING))}function Rr(e){var t=this;xr._logger.debug("onRemoteDeviceConnected",e);var n=e.player,r=e.ui,i=e.session;this._eventManager.removeAll(),Object.values(g.EventType).forEach((function(e){return t._eventManager.listen(n,e,(function(e){return t.dispatchEvent(e)}))}));var a=this.config;r&&g.Utils.Object.mergeDeep(a,{ui:{customPreset:r.uis}}),this.configure({playback:{muted:this.muted,volume:this.volume}}),this._localPlayer.reset(),this._uiWrapper.destroy(),this._remotePlayer=n,this._uiWrapper=new T(this,a),this.dispatchEvent(new g.FakeEvent(Tr.CAST_SESSION_STARTED,{session:i}))}function Ir(){xr._logger.debug("onRemoteDeviceDisconnecting"),this.dispatchEvent(new g.FakeEvent(Tr.CAST_SESSION_ENDING))}function Dr(e){var t=this;xr._logger.debug("onRemoteDeviceDisconnected",e);var n=e.player,r=e.snapshot;if(this._remotePlayer&&this._remotePlayer===n&&(this._eventManager.removeAll(),Br.call(this,r),r)){this.dispatchEvent(new g.FakeEvent(Tr.CAST_SESSION_ENDED));var i,a=this.config,o=!r.config.playback.autoplay,s=r.mediaInfo,l=r.mediaConfig;r.config.playback.autoplay=!0,Fr.call(this,r.config),this._eventManager.listenOnce(this,this.Event.Core.CHANGE_SOURCE_ENDED,(function(){jr.call(t,r.config.sources)})),s?i=this.loadMedia(s):l&&(i=Promise.resolve(),this.setMedia(l)),i&&i.then((function(){t._eventManager.listenOnce(t,t.Event.Core.FIRST_PLAYING,(function(){t.textStyle=r.textStyle,Fr.call(t,a),Hr.call(t,r.config.playback),o&&t.pause()}))}))}}function Or(e){xr._logger.debug("onRemoteDeviceAvailable",e);var t=e.player,n=e.available;this.dispatchEvent(new g.FakeEvent(Tr.CAST_AVAILABLE,{type:t.type,available:n}))}function Lr(){xr._logger.debug("onRemoteDeviceConnectFailed"),this.dispatchEvent(new g.FakeEvent(Tr.CAST_SESSION_START_FAILED))}function Mr(){var e=new br(this);return xr._logger.debug("getPlayerSnapshot",e),e}function Nr(){var e=this._sourceSelected,t=null!=e&&e.url?e.url:window.sessionStorage.getItem("sourceUrl");return window.sessionStorage.setItem("sourceUrl",t),xr._logger.debug("getPlayerSelectedSource",t),t}function Ur(){return xr._logger.debug("getUIWrapper"),this._uiWrapper}function Br(e){var t=this;this._uiWrapper.destroy();var n=this._localPlayer.config;if(n.plugins&&n.plugins.ima){var r={};if(n.cast.advertising&&n.cast.advertising.vast){if(e.config.sources.startTime>0){var i=n.plugins.ima.adTagUrl;r={adTagUrl:""},this._eventManager.listen(this,g.EventType.FIRST_PLAYING,(function(){return t.configure({plugins:{ima:{adTagUrl:i}}})}))}}else r={delayInitUntilSourceSelected:!0};g.Utils.Object.mergeDeep(n,{plugins:{ima:r}}),this._localPlayer.destroy(),this._remotePlayer=null,this._localPlayer=(0,g.loadPlayer)(n)}else this._remotePlayer=null;Object.values(g.EventType).forEach((function(e){return t._eventManager.listen(t._localPlayer,e,(function(e){return t.dispatchEvent(e)}))})),this._uiWrapper=new T(this,this.config),this._uiWrapper.setConfig({isCastAvailable:this.isCastAvailable()},"engine")}function Fr(e){var t=e.sources.startTime,n=e.playback.autoplay;this.configure({sources:{startTime:t},playback:{autoplay:n}})}function jr(e){var t;if(null!==(t=e.captions)&&void 0!==t&&t.length){var n=e.captions;this.configure({sources:{captions:n}})}}function Hr(e){if(e.audioLanguage){var t=this.getTracks(g.TrackType.AUDIO).find((function(t){return t.language===e.audioLanguage}));this.selectTrack(t)}if(e.textLanguage){var n=this.getTracks(g.TrackType.TEXT).find((function(t){return t.language===e.textLanguage}));this.selectTrack(n)}}function Vr(e){return Vr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Vr(e)}function Gr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,zr(r.key),r)}}function Kr(e,t,n){return(t=zr(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zr(e){var t=function(e,t){if("object"!=Vr(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Vr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Vr(t)?t:String(t)}!function(e,t,n){(t=Cr(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(xr,"_logger",(0,g.getLogger)("RemoteControl"));var Wr=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Kr(this,"_remotePlayers",new Map)}var t,n,r;return t=e,r=[{key:"register",value:function(t,n){"function"==typeof n?e._registry.has(t)?e._logger.debug("Remote player of type ".concat(t," is already registered")):(e._logger.debug("Register remote player of type ".concat(t)),e._registry.set(t,n)):e._logger.debug("remote player must be instance of BaseRemotePlayer")}}],(n=[{key:"load",value:function(t,n){var r=this;e._registry.forEach((function(i,a){e._logger.debug("Load remote player of type ".concat(a));var o=new i(t,new xr(n),n.config.targetId);r._remotePlayers.set(a,o)}))}},{key:"startCasting",value:function(t){e._logger.debug("Start casting");var n=this._getRemotePlayer(t);return n?n.startCasting():Promise.reject()}},{key:"isCastAvailable",value:function(t){var n=this._getRemotePlayer(t);return!!n&&(e._logger.debug("isCastAvailable: ".concat(n.isCastAvailable())),n.isCastAvailable())}},{key:"destroy",value:function(){var e=this._remotePlayers;Array.from(e.values()).forEach((function(e){return e.destroy()}))}},{key:"setIsCastInitiator",value:function(e,t){var n=this._getRemotePlayer(e);n&&(n.isCastInitiator=t)}},{key:"_getRemotePlayer",value:function(e){var t=this._remotePlayers;return e&&t.get(e)?t.get(e):t.size>0?Array.from(t.values())[0]:void 0}}])&&Gr(t.prototype,n),r&&Gr(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Yr(e){return Yr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Yr(e)}function Zr(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a,o,s=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){u=!0,i=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}(e,t)||Xr(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function qr(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=Xr(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}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 a,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function Xr(e,t){if(e){if("string"==typeof e)return Qr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Qr(e,t):void 0}}function Qr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function $r(){$r=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,n){return e[t]=n}}function c(e,t,n,r){var a=t&&t.prototype instanceof v?t:v,o=Object.create(a.prototype),s=new R(r||[]);return i(o,"_invoke",{value:w(e,n,s)}),o}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=c;var p="suspendedStart",f="suspendedYield",h="executing",y="completed",g={};function v(){}function m(){}function b(){}var k={};u(k,o,(function(){return this}));var E=Object.getPrototypeOf,_=E&&E(E(I([])));_&&_!==n&&r.call(_,o)&&(k=_);var T=b.prototype=v.prototype=Object.create(k);function A(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function S(e,t){function n(i,a,o,s){var l=d(e[i],e,a);if("throw"!==l.type){var u=l.arg,c=u.value;return c&&"object"==Yr(c)&&r.call(c,"__await")?t.resolve(c.__await).then((function(e){n("next",e,o,s)}),(function(e){n("throw",e,o,s)})):t.resolve(c).then((function(e){u.value=e,o(u)}),(function(e){return n("throw",e,o,s)}))}s(l.arg)}var a;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return a=a?a.then(i,i):i()}})}function w(t,n,r){var i=p;return function(a,o){if(i===h)throw new Error("Generator is already running");if(i===y){if("throw"===a)throw o;return{value:e,done:!0}}for(r.method=a,r.arg=o;;){var s=r.delegate;if(s){var l=C(s,r);if(l){if(l===g)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===p)throw i=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=h;var u=d(t,n,r);if("normal"===u.type){if(i=r.done?y:f,u.arg===g)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(i=y,r.method="throw",r.arg=u.arg)}}}function C(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,C(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var a=d(i,t.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,g;var o=a.arg;return o?o.done?(n[t.resultName]=o.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,g):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function x(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function R(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(x,this),this.reset(!0)}function I(t){if(t||""===t){var n=t[o];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,a=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return a.next=a}}throw new TypeError(Yr(t)+" is not iterable")}return m.prototype=b,i(T,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:m,configurable:!0}),m.displayName=u(b,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,u(e,l,"GeneratorFunction")),e.prototype=Object.create(T),e},t.awrap=function(e){return{__await:e}},A(S.prototype),u(S.prototype,s,(function(){return this})),t.AsyncIterator=S,t.async=function(e,n,r,i,a){void 0===a&&(a=Promise);var o=new S(c(e,n,r,i),a);return t.isGeneratorFunction(n)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},A(T),u(T,l,"Generator"),u(T,o,(function(){return this})),u(T,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=I,R.prototype={constructor:R,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],s=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var l=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(l&&u){if(this.prev<o.catchLoc)return i(o.catchLoc,!0);if(this.prev<o.finallyLoc)return i(o.finallyLoc)}else if(l){if(this.prev<o.catchLoc)return i(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return i(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=e,o.arg=t,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),P(n),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;P(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:I(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),g}},t}function Jr(e,t,n,r,i,a,o){try{var s=e[a](o),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,i)}function ei(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var a=e.apply(t,n);function o(e){Jr(a,r,i,o,s,"next",e)}function s(e){Jr(a,r,i,o,s,"throw",e)}o(void 0)}))}}Kr(Wr,"_registry",new Map),Kr(Wr,"_logger",(0,g.getLogger)("RemotePlayerManager"));var ti='video/mp4;codecs="avc1.42E01E"',ni=[["widevine","com.widevine.alpha"],["playready","com.microsoft.playready"],["fairplay","com.apple.fps"]],ri='video/mp4; codecs="hvc1.1.6.L150.90"',ii=1920,ai=1080,oi=12e5,si=30,li=(0,g.getLogger)("MediaCapabilities"),ui={SUPPORTED:1,NOT_SUPPORTED:0,MAYBE_SUPPORTED:-1};function ci(){return(ci=ei($r().mark((function e(t){var n,r,i;return $r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,li.debug("Starting to get media capabilities..."),e.next=4,fi(t);case 4:return r=e.sent,e.next=7,di();case 7:return i=e.sent,n=Object.assign({},r,i),li.debug("Finished getting media capabilities ",{mediaCapabilities:n}),e.abrupt("return",n);case 13:return e.prev=13,e.t0=e.catch(0),li.debug("There was a problem with getting the media capabilities, ",e.t0.message),n={isHEVCSupported:ui.NOT_SUPPORTED,isPowerEfficient:ui.NOT_SUPPORTED,isDRMSupported:ui.NOT_SUPPORTED,supportedDRMs:[]},li.debug("Returning media capabilities defaults ",{mediaCapabilities:n}),e.abrupt("return",n);case 19:case"end":return e.stop()}}),e,null,[[0,13]])})))).apply(this,arguments)}function di(){return pi.apply(this,arguments)}function pi(){return(pi=ei($r().mark((function e(){var t,n,r,i,a,o,s,l;return $r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t={isDRMSupported:ui.MAYBE_SUPPORTED,supportedDRMs:[]},navigator.requestMediaKeySystemAccess){e.next=3;break}return e.abrupt("return",t);case 3:n=[{initDataTypes:["cenc"],videoCapabilities:[{contentType:ti}]}],r=new Map(ni),i=qr(r),e.prev=6,i.s();case 8:if((a=i.n()).done){e.next=21;break}return o=Zr(a.value,2),s=o[0],l=o[1],e.prev=10,e.next=13,navigator.requestMediaKeySystemAccess(l,n);case 13:t.supportedDRMs.push(s),e.next=19;break;case 16:e.prev=16,e.t0=e.catch(10),li.debug(l+" not supported ("+e.t0.name+": "+e.t0.message+").");case 19:e.next=8;break;case 21:e.next=26;break;case 23:e.prev=23,e.t1=e.catch(6),i.e(e.t1);case 26:return e.prev=26,i.f(),e.finish(26);case 29:return t.isDRMSupported=t.supportedDRMs.length>0?ui.SUPPORTED:ui.NOT_SUPPORTED,e.abrupt("return",t);case 31:case"end":return e.stop()}}),e,null,[[6,23,26,29],[10,16]])})))).apply(this,arguments)}function fi(e){return hi.apply(this,arguments)}function hi(){return(hi=ei($r().mark((function e(t){var n,r,i;return $r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n={isHEVCSupported:ui.MAYBE_SUPPORTED,isPowerEfficient:ui.MAYBE_SUPPORTED},navigator.mediaCapabilities&&navigator.mediaCapabilities.decodingInfo){e.next=3;break}return e.abrupt("return",n);case 3:return r={type:"media-source",video:{contentType:ri,width:(null==t?void 0:t.width)||ii,height:(null==t?void 0:t.height)||ai,bitrate:(null==t?void 0:t.bitrate)||oi,framerate:(null==t?void 0:t.framerate)||si}},e.prev=4,e.next=7,navigator.mediaCapabilities.decodingInfo(r);case 7:i=e.sent,n.isHEVCSupported=i.supported?ui.SUPPORTED:ui.NOT_SUPPORTED,n.isPowerEfficient=i.powerEfficient?ui.SUPPORTED:ui.NOT_SUPPORTED,e.next=17;break;case 12:e.prev=12,e.t0=e.catch(4),li.debug("Failed to get the media capabilities from navigator. ("+e.t0.name+": "+e.t0.message+")."),n.isHEVCSupported=ui.MAYBE_SUPPORTED,n.isPowerEfficient=ui.MAYBE_SUPPORTED;case 17:return e.abrupt("return",n);case 18:case"end":return e.stop()}}),e,null,[[4,12]])})))).apply(this,arguments)}const yi=function(e){return ci.apply(this,arguments)};function gi(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a,o,s=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){u=!0,i=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return vi(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return vi(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function vi(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var mi=function(e){return 2===e.category},bi=function(e){return 2001===e.code},ki=[[function(e){return mi(e)&&bi(e)&&function(e){var t,n;return(null===(t=e.data)||void 0===t?void 0:t.messages)&&"SESSION_RESTRICTED"===(null===(n=e.data)||void 0===n?void 0:n.messages[0].code)}(e)},g.Error.Category.MEDIA_UNAVAILABLE],[function(e){return mi(e)&&bi(e)&&function(e){var t,n;return(null===(t=e.data)||void 0===t?void 0:t.messages)&&"COUNTRY_RESTRICTED"===(null===(n=e.data)||void 0===n?void 0:n.messages[0].code)}(e)},g.Error.Category.GEO_LOCATION],[function(e){return mi(e)&&function(e){return 2002===e.code}(e)},g.Error.Category.MEDIA_NOT_READY],[function(e){return mi(e)&&bi(e)&&function(e){var t,n;return(null===(t=e.data)||void 0===t?void 0:t.messages)&&"IP_RESTRICTED"===(null===(n=e.data)||void 0===n?void 0:n.messages[0].code)}(e)},g.Error.Category.IP_RESTRICTED]];const Ei=function(e){return gi(ki.find((function(t){return t[0](e)}))||[],2)[1]||g.Error.Category.PLAYER};function _i(e){return _i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_i(e)}function Ti(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Ai(r.key),r)}}function Ai(e){var t=function(e,t){if("object"!=_i(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=_i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==_i(t)?t:String(t)}var Si=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),function(e,t,n){(t=Ai(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(this,"cache",new Map)}var t,n,r;return t=e,n=[{key:"set",value:function(e,t){this.cache.set(e,t)}},{key:"get",value:function(e){return this.cache.get(e)}},{key:"clear",value:function(){this.cache.clear()}}],n&&Ti(t.prototype,n),r&&Ti(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function wi(e){return wi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},wi(e)}function Ci(e){return function(e){if(Array.isArray(e))return xi(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return xi(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return xi(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function xi(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Pi(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ri(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Pi(Object(n),!0).forEach((function(t){ji(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Pi(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ii(){Ii=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,n){return e[t]=n}}function c(e,t,n,r){var a=t&&t.prototype instanceof v?t:v,o=Object.create(a.prototype),s=new R(r||[]);return i(o,"_invoke",{value:w(e,n,s)}),o}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=c;var p="suspendedStart",f="suspendedYield",h="executing",y="completed",g={};function v(){}function m(){}function b(){}var k={};u(k,o,(function(){return this}));var E=Object.getPrototypeOf,_=E&&E(E(I([])));_&&_!==n&&r.call(_,o)&&(k=_);var T=b.prototype=v.prototype=Object.create(k);function A(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function S(e,t){function n(i,a,o,s){var l=d(e[i],e,a);if("throw"!==l.type){var u=l.arg,c=u.value;return c&&"object"==wi(c)&&r.call(c,"__await")?t.resolve(c.__await).then((function(e){n("next",e,o,s)}),(function(e){n("throw",e,o,s)})):t.resolve(c).then((function(e){u.value=e,o(u)}),(function(e){return n("throw",e,o,s)}))}s(l.arg)}var a;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return a=a?a.then(i,i):i()}})}function w(t,n,r){var i=p;return function(a,o){if(i===h)throw new Error("Generator is already running");if(i===y){if("throw"===a)throw o;return{value:e,done:!0}}for(r.method=a,r.arg=o;;){var s=r.delegate;if(s){var l=C(s,r);if(l){if(l===g)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===p)throw i=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=h;var u=d(t,n,r);if("normal"===u.type){if(i=r.done?y:f,u.arg===g)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(i=y,r.method="throw",r.arg=u.arg)}}}function C(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,C(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var a=d(i,t.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,g;var o=a.arg;return o?o.done?(n[t.resultName]=o.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,g):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function x(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function R(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(x,this),this.reset(!0)}function I(t){if(t||""===t){var n=t[o];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,a=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return a.next=a}}throw new TypeError(wi(t)+" is not iterable")}return m.prototype=b,i(T,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:m,configurable:!0}),m.displayName=u(b,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,u(e,l,"GeneratorFunction")),e.prototype=Object.create(T),e},t.awrap=function(e){return{__await:e}},A(S.prototype),u(S.prototype,s,(function(){return this})),t.AsyncIterator=S,t.async=function(e,n,r,i,a){void 0===a&&(a=Promise);var o=new S(c(e,n,r,i),a);return t.isGeneratorFunction(n)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},A(T),u(T,l,"Generator"),u(T,o,(function(){return this})),u(T,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=I,R.prototype={constructor:R,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],s=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var l=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(l&&u){if(this.prev<o.catchLoc)return i(o.catchLoc,!0);if(this.prev<o.finallyLoc)return i(o.finallyLoc)}else if(l){if(this.prev<o.catchLoc)return i(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return i(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=e,o.arg=t,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),P(n),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;P(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:I(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),g}},t}function Di(e,t,n,r,i,a,o){try{var s=e[a](o),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,i)}function Oi(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var a=e.apply(t,n);function o(e){Di(a,r,i,o,s,"next",e)}function s(e){Di(a,r,i,o,s,"throw",e)}o(void 0)}))}}function Li(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Hi(r.key),r)}}function Mi(e,t,n){return t=Ui(t),function(e,t){if(t&&("object"===wi(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Bi(e)}(e,Ni()?Reflect.construct(t,n||[],Ui(e).constructor):t.apply(e,n))}function Ni(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Ni=function(){return!!e})()}function Ui(e){return Ui=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ui(e)}function Bi(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Fi(e,t){return Fi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Fi(e,t)}function ji(e,t,n){return(t=Hi(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Hi(e){var t=function(e,t){if("object"!=wi(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=wi(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==wi(t)?t:String(t)}var Vi=function(e){function t(e){var n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),ji(Bi(n=Mi(this,t)),"_eventManager",new g.EventManager),ji(Bi(n),"_mediaInfo",null),ji(Bi(n),"_remotePlayer",null),ji(Bi(n),"_pluginManager",new pe),ji(Bi(n),"_pluginsConfig",{}),ji(Bi(n),"_reset",!0),ji(Bi(n),"_firstPlay",!0),ji(Bi(n),"_sourceSelected",null),ji(Bi(n),"_appPluginConfig",{}),ji(Bi(n),"_thumbnailManager",null),ji(Bi(n),"_isVisible",!1),ji(Bi(n),"_autoPaused",!1),ji(Bi(n),"_sessionIdCache",null);var r=e.sources,i=e.plugins;n._sessionIdCache=new Si,n._configEvaluator=new An,n._configEvaluator.evaluatePluginsConfig(i,e),n._addCustomPreset(e),n._playbackStart=!1;var a=g.Utils.Object.mergeDeep({},e);delete a.plugins,delete a.sources,n._localPlayer=(0,g.loadPlayer)(a),n._controllerProvider=new J(n._pluginManager),n._viewabilityManager=new ct(n.config.viewability),n._serviceProvider=new Qn(Bi(n)),n._uiWrapper=new T(Bi(n),g.Utils.Object.mergeDeep(e,{ui:{logger:{getLogger:g.getLogger,LogLevel:g.LogLevel}}})),n._cuepointManager=new Yn(Bi(n)),n._provider=new m.Provider(g.Utils.Object.mergeDeep(e.provider,{logger:{getLogger:g.getLogger,LogLevel:g.LogLevel},referrer:window.originalRequestReferrer}),"3.17.26"),n._playlistManager=new hr(Bi(n),e),Object.values(g.EventType).forEach((function(e){return n._eventManager.listen(n._localPlayer,e,(function(e){return n.dispatchEvent(e)}))})),n._addBindings();var o=g.Utils.Object.mergeDeep({},e.playlist,{items:null});return n._playlistManager.configure(o),n.configure({plugins:i}),n._playlistManager.configure({items:e.playlist&&e.playlist.items||[]}),n._remotePlayerManager=new Wr,n._localPlayer.setSources(r||{}),n}var n,r,i,a,o,s,l;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Fi(e,t)}(t,e),n=t,r=[{key:"loadMedia",value:(l=Oi(Ii().mark((function e(n,r){var i,a,o,s,l;return Ii().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t._logger.debug("loadMedia",n),this._mediaInfo=n,this.reset(),this._localPlayer.loadingMedia=!0,this._uiWrapper.setLoadingSpinnerState(!0),e.prev=5,e.next=8,this._provider.getMediaConfig(n);case 8:return i=e.sent,a=g.Utils.Object.copyDeep(i),r&&(a.sources=a.sources||{},a.sources=g.Utils.Object.mergeDeep(a.sources,r)),o=Zt(a.plugins,this.config.plugins),a.plugins=o[0],this._appPluginConfig=o[1],this.configure(Le({sources:this.sources},a)),this.setMedia(a),e.abrupt("return",a);case 19:throw e.prev=19,e.t0=e.catch(5),s=Ei(e.t0),l=new g.Error(g.Error.Severity.CRITICAL,s,g.Error.Code.LOAD_FAILED,e.t0),this._localPlayer.dispatchEvent(new g.FakeEvent(g.EventType.ERROR,l)),e.t0;case 25:case"end":return e.stop()}}),e,this,[[5,19]])}))),function(e,t){return l.apply(this,arguments)})},{key:"setMedia",value:function(e){var n;t._logger.debug("setMedia",e),this.reset(!0);var r=g.Utils.Object.copyDeep(e),i=g.Utils.Object.mergeDeep({},r.sources,this._localPlayer.sources);r.sources.type===g.MediaType.VOD&&(null===(n=this._localPlayer.sources.mediaEntryType)||void 0===n?void 0:n.toString())===g.MediaType.LIVE&&(i.id=r.sources.id,i.duration=r.sources.duration),delete r.sources,g.Utils.Object.mergeDeep(r.session,this._localPlayer.config.session),r.plugins=r.plugins||{},Object.keys(this._pluginsConfig).forEach((function(e){r.plugins[e]=r.plugins[e]||{}})),this.configure({session:e.session}),zt(i)||Wt(i)||Yt(i)?this._thumbnailManager=null:this._thumbnailManager=new Gn(this,this.config.ui,e),this.updateKalturaPoster(i,e.sources,this._localPlayer.dimensions),fn(this,Ri(Ri({},r),{},{sources:i}));var a=function(e,t){return t&&zt(t)?Kt(e,"youtube","progressive"):t&&Wt(t)?Kt(e,"image","image"):t&&Yt(t)?Kt(e,"document","document"):null}(this,i);a&&(r.playback=a),this.configure(Ri(Ri({},r),{},{sources:i})),this._configureInformationForDevice(e)}},{key:"loadPlaylist",value:(s=Oi(Ii().mark((function e(n,r){var i,a;return Ii().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t._logger.debug("loadPlaylist",n),this._uiWrapper.setLoadingSpinnerState(!0),e.prev=2,e.next=5,this._provider.getPlaylistConfig(n);case 5:return i=e.sent,this.setPlaylist(i,r),e.abrupt("return",i);case 10:throw e.prev=10,e.t0=e.catch(2),a=new g.Error(g.Error.Severity.CRITICAL,g.Error.Category.PLAYER,g.Error.Code.LOAD_FAILED,e.t0),this._localPlayer.dispatchEvent(new g.FakeEvent(g.EventType.ERROR,a)),e.t0;case 15:case"end":return e.stop()}}),e,this,[[2,10]])}))),function(e,t){return s.apply(this,arguments)})},{key:"loadPlaylistByEntryList",value:(o=Oi(Ii().mark((function e(n,r){var i,a;return Ii().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t._logger.debug("loadPlaylistByEntryList",n),this._uiWrapper.setLoadingSpinnerState(!0),e.prev=2,e.next=5,this._provider.getEntryListConfig(n);case 5:return i=e.sent,this.setPlaylist(i,r,n),e.abrupt("return",i);case 10:throw e.prev=10,e.t0=e.catch(2),a=new g.Error(g.Error.Severity.CRITICAL,g.Error.Category.PLAYER,g.Error.Code.LOAD_FAILED,e.t0),this._localPlayer.dispatchEvent(new g.FakeEvent(g.EventType.ERROR,a)),e.t0;case 15:case"end":return e.stop()}}),e,this,[[2,10]])}))),function(e,t){return o.apply(this,arguments)})},{key:"setPlaylist",value:function(e,n,r){t._logger.debug("setPlaylist",e);var i={playlist:e,plugins:{}};Object.keys(this._pluginsConfig).forEach((function(e){i.plugins[e]={}})),this._configEvaluator.evaluatePluginsConfig(i.plugins,i),this._configureOrLoadPlugins(i.plugins),this._playlistManager.load(e,n,r)}},{key:"configure",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e=Gt(e);var t=g.Utils.Object.mergeDeep({},this.config,e);this._configEvaluator.evaluatePluginsConfig(e.plugins,t),this._configureOrLoadPlugins(e.plugins);var n=g.Utils.Object.mergeDeep({},e);if(delete n.plugins,n.sources){var r=n.sources;delete n.sources,this._localPlayer.configure(n),this._localPlayer.setSources(r||{})}else this._localPlayer.configure(n);e.ui&&this._uiWrapper.setConfig(t.ui),e.playlist&&this._playlistManager.configure(e.playlist)}},{key:"updateKalturaPoster",value:function(e,t,n){var r;!function(e,t,n,r){var i=e.poster,a=t.poster,o=n.width,s=n.height,l=t.rawThumbnailUrl;"string"==typeof i&&Vn.test(i)&&i===a&&"string"==typeof l&&(e.poster="".concat(l,"/height/").concat(s,"/width/").concat(o).concat(r?"/ks/".concat(r):"")),t.poster=e.poster||""}(e,t,n,this.shouldAddKs()?null===(r=this.config)||void 0===r||null===(r=r.session)||void 0===r?void 0:r.ks:"")}},{key:"shouldAddKs",value:function(e){var t,n;return!(null===(t=this.config)||void 0===t||null===(t=t.provider)||void 0===t||!t.loadThumbnailWithKs||!1!==(null===(n=e||this.config)||void 0===n||null===(n=n.session)||void 0===n?void 0:n.isAnonymous))}},{key:"getMediaInfo",value:function(){return g.Utils.Object.copyDeep(this._mediaInfo)}},{key:"getDrmInfo",value:function(){return this._localPlayer.getDrmInfo()}},{key:"getMediaConfig",value:function(){var e={sources:this._localPlayer.sources,plugins:this._pluginsConfig};return g.Utils.Object.copyDeep(e)}},{key:"setSourcesMetadata",value:function(e){this._localPlayer.setSourcesMetadata(e)}},{key:"ready",value:function(){return this._localPlayer.ready()}},{key:"load",value:function(){this._localPlayer.load()}},{key:"play",value:function(){this._localPlayer.play()}},{key:"pause",value:function(){this._localPlayer.pause()}},{key:"getView",value:function(){return this._localPlayer.getView()}},{key:"getVideoElement",value:function(){return this._localPlayer.getVideoElement()}},{key:"reset",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this._reset||(this._reset=!0,this._firstPlay=!0,this._sourceSelected=null,this._attachEventManager&&this._attachEventManager.removeAll(),this._uiWrapper.reset(),this._resetProviderPluginsConfig(),this._pluginManager.reset(),this._cuepointManager.reset(),this._localPlayer.reset(t),null===(e=this._thumbnailManager)||void 0===e||e.destroy())}},{key:"destroy",value:function(){var e,t,n=this.config.ui.targetId;this._reset=!0,this._playbackStart=!1,this._firstPlay=!0,this._uiWrapper.destroy(),this._pluginManager.destroy(),this._cuepointManager.destroy(),this._playlistManager.destroy(),this._localPlayer.destroy(),this._eventManager.destroy(),null===(e=this._thumbnailManager)||void 0===e||e.destroy(),this._viewabilityManager.destroy(),this._remotePlayerManager.destroy(),this._pluginsConfig={};var r=document.getElementById(n);r&&r.parentNode&&g.Utils.Dom.removeChild(r.parentNode,r),null===(t=this._sessionIdCache)||void 0===t||t.clear()}},{key:"isLive",value:function(){return this._localPlayer.isLive()}},{key:"isOnLiveEdge",value:function(){return this._localPlayer.isOnLiveEdge()}},{key:"isDvr",value:function(){return this._localPlayer.isDvr()}},{key:"isUntimedImg",value:function(){return Wt(this.sources)&&!("number"==typeof this.config.sources.duration&&this.config.sources.duration>0)}},{key:"isUntimedDocument",value:function(){return Yt(this.sources)&&!("number"==typeof this.config.sources.duration&&this.config.sources.duration>0)}},{key:"isImage",value:function(){return Wt(this.sources)}},{key:"isDocument",value:function(){return Yt(this.sources)}},{key:"isAudio",value:function(){return this._localPlayer.isAudio()}},{key:"seekToLiveEdge",value:function(){this._localPlayer.seekToLiveEdge()}},{key:"getStartTimeOfDvrWindow",value:function(){return this._localPlayer.getStartTimeOfDvrWindow()}},{key:"getTracks",value:function(e){return this._localPlayer.getTracks(e)}},{key:"getActiveTracks",value:function(){return this._localPlayer.getActiveTracks()}},{key:"selectTrack",value:function(e){this._localPlayer.selectTrack(e)}},{key:"hideTextTrack",value:function(){this._localPlayer.hideTextTrack()}},{key:"showTextTrack",value:function(){this._localPlayer.showTextTrack()}},{key:"changeQuality",value:function(e){this._localPlayer.changeQuality(e)}},{key:"enableAdaptiveBitrate",value:function(){this._localPlayer.enableAdaptiveBitrate()}},{key:"isAdaptiveBitrateEnabled",value:function(){return this._localPlayer.isAdaptiveBitrateEnabled()}},{key:"setTextDisplaySettings",value:function(e){this._localPlayer.setTextDisplaySettings(e)}},{key:"textDisplaySetting",get:function(){return this._localPlayer.textDisplaySetting}},{key:"isFullscreen",value:function(){return this._localPlayer.isFullscreen()}},{key:"notifyEnterFullscreen",value:function(){this._localPlayer.notifyEnterFullscreen()}},{key:"notifyExitFullscreen",value:function(){this._localPlayer.notifyExitFullscreen()}},{key:"enterFullscreen",value:function(e){var t=e||this.config.ui.targetId;this._localPlayer.enterFullscreen(t)}},{key:"exitFullscreen",value:function(){this._localPlayer.exitFullscreen()}},{key:"enterPictureInPicture",value:function(){this._localPlayer.enterPictureInPicture()}},{key:"exitPictureInPicture",value:function(){this._localPlayer.exitPictureInPicture()}},{key:"isInPictureInPicture",value:function(){return this._localPlayer.isInPictureInPicture()}},{key:"isPictureInPictureSupported",value:function(){return this._localPlayer.isPictureInPictureSupported()}},{key:"getLogLevel",value:function(e){return this._localPlayer.getLogLevel(e)}},{key:"startCasting",value:function(e){var t=this;return this.setIsCastInitiator(e,!0),new Promise((function(n,r){t.remotePlayerManager.startCasting(e).then(n).catch((function(){t.setIsCastInitiator(e,!1),r()}))}))}},{key:"setIsCastInitiator",value:function(e,t){this._remotePlayerManager.setIsCastInitiator(e,t)}},{key:"isCastAvailable",value:function(e){return this._remotePlayerManager.isCastAvailable(e)}},{key:"getCastSession",value:function(){return null}},{key:"stopCasting",value:function(){}},{key:"isCasting",value:function(){return!1}},{key:"isVr",value:function(){return this._localPlayer.isVr()}},{key:"toggleVrStereoMode",value:function(){var e=this._pluginManager.get("vr");e&&"function"==typeof e.toggleVrStereoMode&&e.toggleVrStereoMode()}},{key:"isInVrStereoMode",value:function(){var e=this._pluginManager.get("vr");return!(!e||"function"!=typeof e.isInStereoMode)&&e.isInStereoMode()}},{key:"setLogLevel",value:function(e,t){this._localPlayer.setLogLevel(e,t)}},{key:"getThumbnail",value:function(e){if(!e){if(isNaN(this.currentTime))return null;e=this.currentTime}return e=this.isLive()?e+this.getStartTimeOfDvrWindow():e,this._thumbnailManager?this._thumbnailManager.getThumbnail(e):null}},{key:"textStyle",get:function(){return this._localPlayer.textStyle},set:function(e){this._localPlayer.textStyle=e}},{key:"buffered",get:function(){return this._localPlayer.buffered}},{key:"stats",get:function(){return this._localPlayer.stats}},{key:"currentTime",get:function(){return this._localPlayer.currentTime},set:function(e){this._localPlayer.currentTime=e}},{key:"duration",get:function(){return this._localPlayer.duration}},{key:"liveDuration",get:function(){return this._localPlayer.liveDuration}},{key:"normalizedCurrentTime",get:function(){return this.isLive()?this.currentTime-this.getStartTimeOfDvrWindow():this.currentTime},set:function(e){this.isLive()?this.currentTime=e+this.getStartTimeOfDvrWindow():this.currentTime=e}},{key:"normalizedDuration",get:function(){return this.isLive()?this.liveDuration-this.getStartTimeOfDvrWindow():this.duration}},{key:"volume",get:function(){return this._localPlayer.volume},set:function(e){this._localPlayer.volume=e}},{key:"paused",get:function(){return this._localPlayer.paused}},{key:"seeking",get:function(){return this._localPlayer.seeking}},{key:"playsinline",get:function(){return this._localPlayer.playsinline},set:function(e){this._localPlayer.playsinline=e}},{key:"muted",get:function(){return this._localPlayer.muted},set:function(e){this._localPlayer.muted=e}},{key:"src",get:function(){return this._localPlayer.src}},{key:"videoHeight",get:function(){return this._localPlayer.videoHeight}},{key:"videoWidth",get:function(){return this._localPlayer.videoWidth}},{key:"dimensions",get:function(){return this._localPlayer.dimensions},set:function(e){this._localPlayer.dimensions=e}},{key:"poster",get:function(){return this._localPlayer.poster}},{key:"ended",get:function(){return this._localPlayer.ended}},{key:"playbackRate",get:function(){return this._localPlayer.playbackRate},set:function(e){this._localPlayer.playbackRate=e}},{key:"playbackRates",get:function(){return this._localPlayer.playbackRates}},{key:"defaultPlaybackRate",get:function(){return this._localPlayer.defaultPlaybackRate}},{key:"engineType",get:function(){return this._localPlayer.engineType}},{key:"streamType",get:function(){return this._localPlayer.streamType}},{key:"env",get:function(){return this._localPlayer.env}},{key:"selectedSource",get:function(){return this._sourceSelected}},{key:"sources",get:function(){return Ri({},this._localPlayer.sources)}},{key:"config",get:function(){return Ri(Ri({},this._localPlayer.config),{},{plugins:this._pluginsConfig,sources:this._localPlayer.sources})}},{key:"hasUserInteracted",get:function(){return this._localPlayer.hasUserInteracted}},{key:"loadingMedia",set:function(e){this._localPlayer.loadingMedia=e}},{key:"ads",get:function(){return this._adsController}},{key:"plugins",get:function(){return this._pluginManager.getAll()}},{key:"provider",get:function(){return this._provider}},{key:"ui",get:function(){return this._uiWrapper}},{key:"playlist",get:function(){return this._playlistManager}},{key:"Event",get:function(){return Ri({Cast:Tr,Core:g.EventType,Playlist:Jn,UI:v.EventType,VISIBILITY_CHANGE:ft,REGISTERED_PLUGINS_LIST_EVENT:de},g.EventType)}},{key:"TextStyle",get:function(){return this._localPlayer.TextStyle}},{key:"ViewabilityType",get:function(){return dt}},{key:"State",get:function(){return this._localPlayer.State}},{key:"Track",get:function(){return this._localPlayer.Track}},{key:"LogLevelType",get:function(){return this._localPlayer.LogLevelType}},{key:"LogLevel",get:function(){return this._localPlayer.LogLevel}},{key:"AbrMode",get:function(){return this._localPlayer.AbrMode}},{key:"MediaType",get:function(){return this._localPlayer.MediaType}},{key:"StreamType",get:function(){return this._localPlayer.StreamType}},{key:"EngineType",get:function(){return this._localPlayer.EngineType}},{key:"Error",get:function(){return this._localPlayer.Error}},{key:"_addCustomPreset",value:function(e){e.plugins&&Object.keys(e.plugins).forEach((function(t){window.kalturaCustomPreset&&window.kalturaCustomPreset[t]&&(window.kalturaCustomPresetMap||(window.kalturaCustomPresetMap={}),window.kalturaCustomPresetMap[e.ui.targetId]||(window.kalturaCustomPresetMap[e.ui.targetId]={}),window.kalturaCustomPresetMap[e.ui.targetId][t]=window.kalturaCustomPreset[t])}))}},{key:"_configureInformationForDevice",value:function(e){var t;if(navigator.mediaSession){var n,r="string"==typeof(t=e.sources.poster)?t:Array.isArray(t)&&t.length>0?t[0]:"";navigator.mediaSession.metadata=new MediaMetadata({title:(null===(n=e.sources.metadata)||void 0===n?void 0:n.name)||"",artwork:r?[{src:r}]:[]})}}},{key:"_addBindings",value:function(){var e=this;this._eventManager.listen(this,g.EventType.CHANGE_SOURCE_STARTED,(function(){return e._onChangeSourceStarted()})),this._eventManager.listen(this,g.EventType.CHANGE_SOURCE_ENDED,(function(){return e._onChangeSourceEnded()})),this._eventManager.listen(this,g.EventType.PLAYER_RESET,(function(){return e._onPlayerReset()})),this._eventManager.listen(this,g.EventType.ENDED,(function(){return e._onEnded()})),this._eventManager.listen(this,g.EventType.FIRST_PLAY,(function(){return e._firstPlay=!1})),this._eventManager.listen(this,g.EventType.SOURCE_SELECTED,(function(t){return e._sourceSelected=t.payload.selectedSource[0]})),this._eventManager.listen(this,g.EventType.PLAYBACK_ENDED,(function(){return e._onPlaybackEnded()})),this._eventManager.listen(this,g.EventType.PLAYBACK_START,(function(){e._playbackStart=!0})),this._eventManager.listen(this,g.AdEventType.AD_AUTOPLAY_FAILED,(function(t){return e._onAdAutoplayFailed(t)})),this._eventManager.listen(this,g.AdEventType.AD_STARTED,(function(){return e._onAdStarted()})),this.config.playback.playAdsWithMSE&&(this._attachEventManager=new g.EventManager,this._eventManager.listen(this,g.AdEventType.AD_LOADED,(function(t){var n=t.payload.ad;n&&n.linear&&1===n.position&&!n.inStream&&e.src?(e._attachEventManager.listenOnce(e,g.AdEventType.AD_BREAK_START,(function(){return e.detachMediaSource()})),e._attachEventManager.listenOnce(e,g.AdEventType.AD_BREAK_END,(function(){return e.attachMediaSource()})),e._attachEventManager.listenOnce(e,g.AdEventType.AD_ERROR,(function(){return e.attachMediaSource()}))):e._attachEventManager.removeAll()}))),this._eventManager.listen(this,g.EventType.ERROR,(function(t){t.payload.severity===g.Error.Severity.CRITICAL&&(e._reset=!1)}))}},{key:"_onChangeSourceEnded",value:function(){g.Utils.Object.getPropertyPath(this.config,"ui.targetId")?this._viewabilityManager.observe(document.getElementById(this.config.ui.targetId),this._handleVisibilityChange.bind(this)):t._logger.warn("Cannot observe visibility change without config.ui.targetId")}},{key:"_onPlayerReset",value:function(){this._playbackStart=!1,g.Utils.Object.getPropertyPath(this.config,"ui.targetId")&&this._viewabilityManager.unObserve(document.getElementById(this.config.ui.targetId),this._handleVisibilityChange.bind(this))}},{key:"_onChangeSourceStarted",value:function(){this._configureOrLoadPlugins(this._pluginsConfig),this.reset(),this._pluginManager.loadMedia(),this._reset=!1,this.dispatchEvent(new g.FakeEvent(de,this._pluginManager.getRegisterdPluginsList()))}},{key:"_onEnded",value:function(){var e=this;setTimeout((function(){e._adsController&&!e._adsController.allAdsCompleted?e._eventManager.listenOnce(e._adsController,g.AdEventType.ALL_ADS_COMPLETED,(function(){e.dispatchEvent(new g.FakeEvent(g.EventType.PLAYBACK_ENDED))})):e.dispatchEvent(new g.FakeEvent(g.EventType.PLAYBACK_ENDED))}))}},{key:"_onPlaybackEnded",value:function(){this.config.playback.loop&&(this.currentTime=0,this.play())}},{key:"_onAdStarted",value:function(){this._firstPlay&&(this._localPlayer.posterManager.hide(),this._localPlayer.hideBlackCover())}},{key:"_onAdAutoplayFailed",value:function(e){this._firstPlay&&this.config.playback.autoplay&&(this._localPlayer.posterManager.show(),this.dispatchEvent(new g.FakeEvent(g.EventType.AUTOPLAY_FAILED,e.payload)))}},{key:"_configureOrLoadPlugins",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=[],r=[],i=[];Object.keys(t).forEach((function(a){var o=e._pluginManager.get(a);if(o)o.updateConfig(t[a]),t[a]=o.getConfig();else if(e._sourceSelected)delete t[a];else{try{e._pluginManager.load(a,e,t[a])}catch(t){e.dispatchEvent(new g.FakeEvent(g.Error.Code.ERROR,t))}var s=e._pluginManager.get(a);s&&(i.push(s),t[a]=s.getConfig(),"function"==typeof s.getMiddlewareImpl&&("bumper"===s.name?n.push(s.getMiddlewareImpl()):n.unshift(s.getMiddlewareImpl())),"function"==typeof s.getUIComponents&&r.push.apply(r,Ci(s.getUIComponents()||[])),"function"==typeof s.getEngineDecorator&&e._localPlayer.registerEngineDecoratorProvider(new g.EngineDecoratorProvider(s)))}})),r.forEach((function(t){return e._uiWrapper.addComponent(t)})),this._pluginReadinessMiddleware||(this._pluginReadinessMiddleware=new Ln(i),this._localPlayer.playbackMiddleware.use(this._pluginReadinessMiddleware)),this._maybeCreateAdsController(),n.forEach((function(t){return e._localPlayer.playbackMiddleware.use(t)})),g.Utils.Object.mergeDeep(this._pluginsConfig,t)}},{key:"_maybeCreateAdsController",value:function(){var e=this;if(!this._adsController){var t=this._controllerProvider.getAdsControllers();t.length&&(this._adsController=new q(this,t),this._localPlayer.playbackMiddleware.use(this._adsController.getMiddleware()),this._eventManager.listen(this._adsController,g.AdEventType.ALL_ADS_COMPLETED,(function(t){e.dispatchEvent(t)})))}}},{key:"attachMediaSource",value:function(){this._localPlayer.attachMediaSource()}},{key:"detachMediaSource",value:function(){this._localPlayer.detachMediaSource()}},{key:"_resetProviderPluginsConfig",value:function(){this.configure({plugins:this._appPluginConfig}),this._appPluginConfig={}}},{key:"crossOrigin",get:function(){return this._localPlayer.crossOrigin},set:function(e){this._localPlayer.crossOrigin=e}},{key:"isVisible",get:function(){return this._isVisible}},{key:"viewabilityManager",get:function(){return this._viewabilityManager}},{key:"_handleVisibilityChange",value:function(e){this._isVisible=e,this.dispatchEvent(new g.FakeEvent(ft,{visible:this._isVisible})),this.config.playback.autoplay===g.AutoPlayType.IN_VIEW&&this._isVisible&&!this._playbackStart&&this._localPlayer.play({programmatic:!0}),!0===this.config.playback.autopause&&this._handleAutoPause(e)}},{key:"_handleAutoPause",value:function(e){var t=!this.paused||this._adsController&&this._adsController.isAdPlaying(),n=!this.isInPictureInPicture()&&this._playbackStart&&t;e?this._autoPaused&&(this.paused&&this.play(),this._autoPaused=!1):n&&(this.pause(),this._autoPaused=!0)}},{key:"getService",value:function(e){return this._serviceProvider.get(e)}},{key:"hasService",value:function(e){return this._serviceProvider.has(e)}},{key:"registerService",value:function(e,t){this._serviceProvider.register(e,t)}},{key:"cuePointManager",get:function(){return this._cuepointManager}},{key:"addTextTrack",value:function(e,t){return this._localPlayer.addTextTrack(e,t)}},{key:"getNativeTextTracks",value:function(){return this._localPlayer.getNativeTextTracks()}},{key:"remotePlayerManager",get:function(){return this._remotePlayerManager}},{key:"getMediaCapabilities",value:(a=Oi(Ii().mark((function e(t){return Ii().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",yi(t));case 1:case"end":return e.stop()}}),e)}))),function(e){return a.apply(this,arguments)})},{key:"setCachedUrls",value:function(e){this.config.playback.enableCachedUrls&&this._localPlayer.setCachedUrls(e)}},{key:"sessionIdCache",get:function(){return this._sessionIdCache}}],r&&Li(n.prototype,r),i&&Li(n,i),Object.defineProperty(n,"prototype",{writable:!1}),t}(g.FakeEventTarget);ji(Vi,"_logger",(0,g.getLogger)("KalturaPlayer"+g.Utils.Generator.uniqueId(5)));var Gi={};function Ki(){return Gi}function zi(e){return Gi[e]?Gi[e]:null}var Wi=["_remotePlayer","_listeners","_uiWrapper"],Yi={get:function(e,t){if("destroy"===t){var n=e.config.targetId;delete Gi[n]}return t in g.FakeEventTarget.prototype||Wi.includes(t)?e[t]:e._remotePlayer&&t in e._remotePlayer?e._remotePlayer[t]:e[t]},set:function(e,t,n){return e._remotePlayer&&!Wi.includes(t)?t in e._remotePlayer&&(e._remotePlayer[t]=n):e[t]=n,!0}},Zi=function(e){var t=new Vi(e),n=new Proxy(t,Yi);return Gi[e.targetId]=n,n};function qi(e){!function(e){!1!==g.Utils.Object.getPropertyPath(e,"log.playerVersion")&&((0,g.setLogLevel)(g.LogLevel.INFO),(0,g.getLogger)().log("%c ".concat("@playkit-js/kaltura-player-js"," ").concat("3.17.26"),"color: #ff98f9;  font-size: large"),(0,g.getLogger)().log("%c For more details see ".concat("https://github.com/kaltura/kaltura-player-js"),"color: #ff98f9;"))}(e),Bt(e=Gt(e));var t=Vt(e);!function(e){var t,n=e.provider,r=null===(t=Ht())||void 0===t?void 0:t.productVersion;if(!n.partnerId||n.partnerId===Nt){var i={url:Ut,mimetype:""};i.url=function(e,t){return t&&(e+="&clientVer=".concat(t)),e}(i.url,r),i.url=un(i.url),i.url=dn(i.url,r),i.url=sn(null,i.url,Ct.next()),navigator.sendBeacon&&navigator.sendBeacon(i.url)}}(t),Ft(t),function(e){var t=parseFloat(jt(Ot));isNaN(t)||g.Utils.Object.createPropertyPath(e,"sources.startTime",t)}(t),function(e){var t=parseFloat(jt(Lt));isNaN(t)||g.Utils.Object.createPropertyPath(e,"sources.seekFrom",t);var n=parseFloat(jt(Mt));isNaN(n)||g.Utils.Object.createPropertyPath(e,"sources.clipTo",n)}(t),Rt.forEach((function(e){return(0,g.getLogger)("KalturaPlayer:Setup")[e.level](e.msg)})),it.initialize(),Tt.initialize(),function(e){e.disableUserCache||Xe.setStorageConfig(e)}(t);var n=Zi(t);return function(e){if(!e.config.disableUserCache&&it.isStorageAvailable()){var t=it.getPlayerTextStyle();t&&(e.textStyle=g.Utils.Object.mergeDeep(new g.TextStyle,t))}}(n),function(e){Xe.attachAll(e)}(n),function(e,t){e.cast&&t.remotePlayerManager.load(e.cast,t)}(t,n),function(e){if(g.Env.isIOS||g.Env.isIPadOS){var t=function t(){e.removeEventListener(e.Event.UI.UI_CLICKED,t),(0,g.setCapabilities)(g.EngineType.HTML5,{autoplay:!0})};e.addEventListener(e.Event.SOURCE_SELECTED,(function n(){e.removeEventListener(e.Event.SOURCE_SELECTED,n),e.addEventListener(e.Event.UI.UI_CLICKED,t)}))}}(n),n}function Xi(e){return Xi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Xi(e)}function Qi(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,$i(r.key),r)}}function $i(e){var t=function(e,t){if("object"!=Xi(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Xi(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Xi(t)?t:String(t)}var Ji=function(){function e(t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._id=t,this._friendlyName=n,this._resuming=r}var t,n,r;return t=e,(n=[{key:"deviceFriendlyName",get:function(){return this._friendlyName}},{key:"id",get:function(){return this._id}},{key:"resuming",get:function(){return this._resuming}}])&&Qi(t.prototype,n),r&&Qi(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function ea(e){return ea="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ea(e)}function ta(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,la(r.key),r)}}function na(e,t,n){return t=ia(t),function(e,t){if(t&&("object"===ea(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return aa(e)}(e,ra()?Reflect.construct(t,n||[],ia(e).constructor):t.apply(e,n))}function ra(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(ra=function(){return!!e})()}function ia(e){return ia=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ia(e)}function aa(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function oa(e,t){return oa=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},oa(e,t)}function sa(e,t,n){return(t=la(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function la(e){var t=function(e,t){if("object"!=ea(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=ea(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==ea(t)?t:String(t)}var ua=function(e){function t(e,n,r){var i;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),sa(aa(i=na(this,t)),"_isCastInitiator",!1),i._playerConfig={},t._logger=(0,g.getLogger)(e),i._remoteControl=r,i._castConfig=g.Utils.Object.mergeDeep({},i.constructor.defaultConfig,n),i._eventManager=new g.EventManager,t._logger.debug("Initialized"),i}var n,r,i;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&oa(e,t)}(t,e),n=t,i=[{key:"isSupported",value:function(){return!0}}],(r=[{key:"loadMedia",value:function(e){return Promise.resolve()}},{key:"setMedia",value:function(e){}},{key:"getMediaInfo",value:function(){}},{key:"getMediaConfig",value:function(){}},{key:"configure",value:function(){}},{key:"ready",value:function(){return Promise.resolve()}},{key:"load",value:function(){}},{key:"play",value:function(){}},{key:"pause",value:function(){}},{key:"reset",value:function(){}},{key:"destroy",value:function(){}},{key:"isLive",value:function(){return!1}},{key:"isDvr",value:function(){return!1}},{key:"seekToLiveEdge",value:function(){}},{key:"getStartTimeOfDvrWindow",value:function(){return 0}},{key:"getTracks",value:function(e){return[]}},{key:"getActiveTracks",value:function(){return{audio:void 0,video:void 0,text:void 0}}},{key:"selectTrack",value:function(e){}},{key:"hideTextTrack",value:function(){}},{key:"enableAdaptiveBitrate",value:function(){}},{key:"isAdaptiveBitrateEnabled",value:function(){return!0}},{key:"setTextDisplaySettings",value:function(e){}},{key:"startCasting",value:function(){return Promise.reject("startCasting method was not overridden")}},{key:"stopCasting",value:function(){}},{key:"isCasting",value:function(){return!0}},{key:"isCastAvailable",value:function(){return!0}},{key:"getCastSession",value:function(){return new Ji("","")}},{key:"isVr",value:function(){return!1}},{key:"toggleVrStereoMode",value:function(){}},{key:"isInVrStereoMode",value:function(){return!1}},{key:"ads",get:function(){return null}},{key:"textStyle",get:function(){return new g.TextStyle},set:function(e){}},{key:"buffered",get:function(){return[]}},{key:"currentTime",get:function(){return 0},set:function(e){}},{key:"duration",get:function(){return 0}},{key:"liveDuration",get:function(){return NaN}},{key:"volume",get:function(){return 1},set:function(e){}},{key:"paused",get:function(){return!1}},{key:"ended",get:function(){return!1}},{key:"seeking",get:function(){return!1}},{key:"muted",get:function(){return!1},set:function(e){}},{key:"src",get:function(){return""}},{key:"poster",get:function(){return""}},{key:"playbackRate",get:function(){return 1},set:function(e){}},{key:"engineType",get:function(){return""}},{key:"streamType",get:function(){return""}},{key:"type",get:function(){return t.Type}},{key:"config",get:function(){return this._playerConfig}},{key:"isCastInitiator",get:function(){return this._isCastInitiator},set:function(e){this._isCastInitiator=e}}])&&ta(n.prototype,r),i&&ta(n,i),Object.defineProperty(n,"prototype",{writable:!1}),t}(g.FakeEventTarget);function ca(e,t,n){return t=pa(t),function(e,t){if(t&&("object"===ya(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,da()?Reflect.construct(t,n||[],pa(e).constructor):t.apply(e,n))}function da(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(da=function(){return!!e})()}function pa(e){return pa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},pa(e)}function fa(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ha(e,t)}function ha(e,t){return ha=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ha(e,t)}function ya(e){return ya="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ya(e)}function ga(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function va(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ba(r.key),r)}}function ma(e,t,n){return t&&va(e.prototype,t),n&&va(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function ba(e){var t=function(e,t){if("object"!=ya(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=ya(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==ya(t)?t:String(t)}sa(ua,"defaultConfig",{}),sa(ua,"Type","BaseRemotePlayer");var ka=function(){function e(t){ga(this,e),this._player=t}return ma(e,[{key:"player",get:function(){return this._player}}]),e}(),Ea=function(e){function t(e,n,r){var i;return ga(this,t),(i=ca(this,t,[e]))._session=n,r&&(i._ui=r),i}return fa(t,e),ma(t,[{key:"ui",get:function(){return this._ui}},{key:"session",get:function(){return this._session}}]),t}(ka),_a=function(e){function t(e,n){var r;return ga(this,t),(r=ca(this,t,[e]))._snapshot=n,r}return fa(t,e),ma(t,[{key:"snapshot",get:function(){return this._snapshot}}]),t}(ka),Ta=function(e){function t(e,n){var r;return ga(this,t),(r=ca(this,t,[e]))._available=n,r}return fa(t,e),ma(t,[{key:"available",get:function(){return this._available}}]),t}(ka);function Aa(e){return Aa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Aa(e)}function Sa(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,wa(r.key),r)}}function wa(e){var t=function(e,t){if("object"!=Aa(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Aa(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Aa(t)?t:String(t)}var Ca=function(){function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),function(e,t,n){(t=wa(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(this,"_uis",[{template:function(e){return t.idleUI(e)},condition:function(e){return e.engine.isIdle}},{template:function(e){return t.errorUI(e)},condition:function(e){return e.engine.hasError}},{template:function(e){return t.adsUI(e)},condition:function(e){return e.engine.adBreak}},{template:function(e){return t.liveUI(e)},condition:function(e){return e.engine.isLive}},{template:function(e){return t.playbackUI(e)}}])}var t,n,r;return t=e,(n=[{key:"playbackUI",value:function(e){return v.Presets.playbackUI(e)}},{key:"idleUI",value:function(e){return v.Presets.idleUI(e)}},{key:"adsUI",value:function(e){return v.Presets.adsUI(e)}},{key:"liveUI",value:function(e){return v.Presets.liveUI(e)}},{key:"errorUI",value:function(e){return v.Presets.errorUI(e)}},{key:"uis",get:function(){return this._uis}}])&&Sa(t.prototype,n),r&&Sa(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function xa(e){return xa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},xa(e)}function Pa(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Ra(r.key),r)}}function Ra(e){var t=function(e,t){if("object"!=xa(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=xa(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==xa(t)?t:String(t)}var Ia=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,r;return t=e,r=[{key:"toCastTextStyle",value:function(t){if(window.chrome&&window.chrome.cast){var n=new window.chrome.cast.media.TextTrackStyle;return n.fontFamily=t.fontFamily,n.backgroundColor=e.rgbToHex(t.backgroundColor),n.foregroundColor=e.rgbToHex(t.fontColor),n.fontScale=Number.parseFloat(t.fontSize)/100,n}return{}}},{key:"toPlayerTextStyle",value:function(t){var n=new g.TextStyle;return n.fontFamily=t.fontFamily,n.fontSize=100*t.fontScale+"%",n.fontColor=e.hexToRGB(t.foregroundColor),n.backgroundColor=e.hexToRGB(t.backgroundColor),n}},{key:"rgbToHex",value:function(e){var t="#"+("0"+parseInt(e[0],10).toString(16)).slice(-2)+("0"+parseInt(e[1],10).toString(16)).slice(-2)+("0"+parseInt(e[2],10).toString(16)).slice(-2);if(e[3]){var n=e[3];n=Math.round(100*n)/100,t+=(Math.round(255*n)+65536).toString(16).substr(-2).toUpperCase()}else t+="FF";return t.toUpperCase()}},{key:"hexToRGB",value:function(e){for(var t=[],n=(e=e.slice(1)).match(/.{1,2}/g),r=0;r<3;r++){var i=n&&n[r];i&&t.push(parseInt(i,16))}return t}}],(n=null)&&Pa(t.prototype,n),r&&Pa(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Da(e){return Da="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Da(e)}function Oa(e,t,n){return t=Ma(t),function(e,t){if(t&&("object"===Da(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,La()?Reflect.construct(t,n||[],Ma(e).constructor):t.apply(e,n))}function La(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(La=function(){return!!e})()}function Ma(e){return Ma=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ma(e)}function Na(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ua(e,t)}function Ua(e,t){return Ua=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ua(e,t)}function Ba(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ja(r.key),r)}}function Fa(e,t,n){return t&&Ba(e.prototype,t),n&&Ba(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function ja(e){var t=function(e,t){if("object"!=Da(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Da(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Da(t)?t:String(t)}function Ha(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var Va={ACTION:"action",EVENT:"event"},Ga=Fa((function e(t){Ha(this,e),this.type=t})),Ka=function(e){function t(e,n){var r;return Ha(this,t),(r=Oa(this,t,[Va.EVENT])).event=e,r.payload=n,r}return Na(t,e),Fa(t)}(Ga),za=function(e){function t(e,n){var r;return Ha(this,t),(r=Oa(this,t,[Va.ACTION])).action=e,r.args=n,r}return Na(t,e),Fa(t)}(Ga),Wa={registerRemotePlayer:Wr.register,PlayerSnapshot:br,RemoteControl:xr,RemoteSession:Ji,BaseRemotePlayer:ua,RemoteConnectedPayload:Ea,RemoteDisconnectedPayload:_a,RemoteAvailablePayload:Ta,RemotePlayerUI:Ca,CastEventType:Tr,RemotePlayerType:{CHROMECAST:"chromecast"},TextStyleConverter:Ia,CustomEventMessage:Ka,CustomActionMessage:za,CustomMessageType:Va,CustomActionType:{SKIP_AD:"skipAd"},CustomMessage:Ga},Ya={PlaylistEventType:Jn};function Za(e){return Za="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Za(e)}function qa(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Xa(r.key),r)}}function Xa(e){var t=function(e,t){if("object"!=Za(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Za(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Za(t)?t:String(t)}var Qa=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._id=t,this._system=n.system,this._url=n.url,this._contentType=n.contentType,this._title=n.title,this._position=n.position,this._duration=n.duration,this._clickThroughUrl=n.clickThroughUrl,this._posterUrl=n.posterUrl,this._skipOffset=n.skipOffset,this._linear=n.linear,this._width=n.width||0,this._height=n.height||0,this._bitrate=n.bitrate||0,this._bumper=n.bumper,this._inStream=n.inStream||!1,this._vpaid=n.vpaid||!1,this._streamId=n.streamId||"",this._wrapperAdIds=n.wrapperAdIds,this._wrapperCreativeIds=n.wrapperCreativeIds,this._wrapperAdSystems=n.wrapperAdSystems}var t,n,r;return t=e,(n=[{key:"id",get:function(){return this._id}},{key:"system",get:function(){return this._system}},{key:"contentType",get:function(){return this._contentType}},{key:"url",get:function(){return this._url}},{key:"title",get:function(){return this._title}},{key:"position",get:function(){return this._position}},{key:"duration",get:function(){return this._duration}},{key:"clickThroughUrl",get:function(){return this._clickThroughUrl}},{key:"posterUrl",get:function(){return this._posterUrl}},{key:"skipOffset",get:function(){return this._skipOffset}},{key:"linear",get:function(){return this._linear}},{key:"width",get:function(){return this._width}},{key:"height",get:function(){return this._height}},{key:"bitrate",get:function(){return this._bitrate}},{key:"bumper",get:function(){return this._bumper}},{key:"inStream",get:function(){return this._inStream}},{key:"skippable",get:function(){return!!(this.skipOffset&&this.skipOffset>0)}},{key:"vpaid",get:function(){return this._vpaid}},{key:"streamId",get:function(){return this._streamId}},{key:"wrapperAdIds",get:function(){return this._wrapperAdIds}},{key:"wrapperCreativeIds",get:function(){return this._wrapperCreativeIds}},{key:"wrapperAdSystems",get:function(){return this._wrapperAdSystems}},{key:"toJSON",value:function(){return{id:this.id,system:this.system,url:this.url,contentType:this.contentType,title:this.title,position:this.position,duration:this.duration,clickThroughUrl:this.clickThroughUrl,posterUrl:this.posterUrl,skipOffset:this.skipOffset,linear:this.linear,skippable:this.skippable,width:this.width,height:this.height,bitrate:this.bitrate,bumper:this.bumper,inStream:this.inStream,vpaid:this.vpaid}}}])&&qa(t.prototype,n),r&&qa(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function $a(e){return $a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$a(e)}function Ja(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,eo(r.key),r)}}function eo(e){var t=function(e,t){if("object"!=$a(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=$a(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==$a(t)?t:String(t)}var to=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._type=t.type,this._position=t.position,this._numAds=t.numAds}var t,n,r;return t=e,(n=[{key:"type",get:function(){return this._type}},{key:"position",get:function(){return this._position}},{key:"numAds",get:function(){return this._numAds}},{key:"toJSON",value:function(){return{type:this.type,position:this.position,numAds:this.numAds}}}])&&Ja(t.prototype,n),r&&Ja(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();g.Ad=Qa,g.AdBreak=to,g.BasePlugin=oe,g.registerPlugin=fe;var no="@playkit-js/kaltura-player-js",ro="ovp",io="3.17.26"})(),r})()));

var KalturaPlayer="object"==typeof KalturaPlayer?KalturaPlayer:{};KalturaPlayer.plugins=KalturaPlayer.plugins||{},KalturaPlayer.plugins.kalturaCuepoints=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=33)}([function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||t.hasOwnProperty(n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(n(2),t),i(n(17),t),i(n(41),t),i(n(42),t),i(n(43),t),i(n(44),t),i(n(45),t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CuePointTags=t.KalturaCuePointType=t.KalturaThumbCuePointSubType=void 0,function(e){e[e.SLIDE=1]="SLIDE",e[e.CHAPTER=2]="CHAPTER"}(t.KalturaThumbCuePointSubType||(t.KalturaThumbCuePointSubType={})),function(e){e.PUBLIC_QNA="publicqna",e.USER_QNA="userqna",e.CODE_QNA="codeqna",e.QUIZ="quiz",e.SLIDE="slide",e.VIEW_CHANGE="viewchange",e.CHAPTER="chapter",e.HOTSPOT="hotspot",e.CAPTION="caption"}(t.KalturaCuePointType||(t.KalturaCuePointType={})),function(e){e.ANSWERONAIR="qna",e.HOTSPOT="hotspots"}(t.CuePointTags||(t.CuePointTags={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KalturaCuePoint=void 0;var r=function(){function e(e){this.partnerData="",this.id=e.id,this.intId=e.intId,this.cuePointType=e.cuePointType,this.status=e.status,this.entryId=e.entryId,this.partnerId=e.partnerId,this.createdAt=e.createdAt,this.updatedAt=e.updatedAt,this.triggeredAt=e.triggeredAt,this.startTime=e.startTime;try{this.partnerData=JSON.parse(e.partnerData)}catch(e){}}return e.KalturaCuePointType={AD:"adCuePoint.Ad",ANNOTATION:"annotation.Annotation",CODE:"codeCuePoint.Code",EVENT:"eventCuePoint.Event",QUIZ_QUESTION:"quiz.QUIZ_QUESTION",THUMB:"thumbCuePoint.Thumb",CAPTION:"kalturaCaption"},e.KalturaCuePointStatus={READY:1,DELETED:2,HANDLED:3,PENDING:4},e}();t.KalturaCuePoint=r},function(e,t,n){function r(e){if(e)return function(e){for(var t in r.prototype)e[t]=r.prototype[t];return e}(e)}e.exports=r,r.prototype.on=r.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},r.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},r.prototype.off=r.prototype.removeListener=r.prototype.removeAllListeners=r.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,r=this._callbacks["$"+e];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var i=0;i<r.length;i++)if((n=r[i])===t||n.fn===t){r.splice(i,1);break}return 0===r.length&&delete this._callbacks["$"+e],this},r.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){r=0;for(var i=(n=n.slice(0)).length;r<i;++r)n[r].apply(this,t)}return this},r.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},r.prototype.hasListeners=function(e){return!!this.listeners(e).length}},function(e,t,n){var r,i=n(76),o=n(27),s=n(78),a=n(79),u=n(80);"undefined"!=typeof ArrayBuffer&&(r=n(81));var c="undefined"!=typeof navigator&&/Android/i.test(navigator.userAgent),h="undefined"!=typeof navigator&&/PhantomJS/i.test(navigator.userAgent),p=c||h;t.protocol=3;var f=t.packets={open:0,close:1,ping:2,pong:3,message:4,upgrade:5,noop:6},l=i(f),d={type:"error",data:"parser error"},y=n(82);function g(e,t,n){for(var r=new Array(e.length),i=a(e.length,n),o=function(e,n,i){t(n,(function(t,n){r[e]=n,i(t,r)}))},s=0;s<e.length;s++)o(s,e[s],i)}t.encodePacket=function(e,n,r,i){"function"==typeof n&&(i=n,n=!1),"function"==typeof r&&(i=r,r=null);var o=void 0===e.data?void 0:e.data.buffer||e.data;if("undefined"!=typeof ArrayBuffer&&o instanceof ArrayBuffer)return function(e,n,r){if(!n)return t.encodeBase64Packet(e,r);var i=e.data,o=new Uint8Array(i),s=new Uint8Array(1+i.byteLength);s[0]=f[e.type];for(var a=0;a<o.length;a++)s[a+1]=o[a];return r(s.buffer)}(e,n,i);if(void 0!==y&&o instanceof y)return function(e,n,r){if(!n)return t.encodeBase64Packet(e,r);if(p)return function(e,n,r){if(!n)return t.encodeBase64Packet(e,r);var i=new FileReader;return i.onload=function(){t.encodePacket({type:e.type,data:i.result},n,!0,r)},i.readAsArrayBuffer(e.data)}(e,n,r);var i=new Uint8Array(1);i[0]=f[e.type];var o=new y([i.buffer,e.data]);return r(o)}(e,n,i);if(o&&o.base64)return function(e,n){var r="b"+t.packets[e.type]+e.data.data;return n(r)}(e,i);var s=f[e.type];return void 0!==e.data&&(s+=r?u.encode(String(e.data),{strict:!1}):String(e.data)),i(""+s)},t.encodeBase64Packet=function(e,n){var r,i="b"+t.packets[e.type];if(void 0!==y&&e.data instanceof y){var o=new FileReader;return o.onload=function(){var e=o.result.split(",")[1];n(i+e)},o.readAsDataURL(e.data)}try{r=String.fromCharCode.apply(null,new Uint8Array(e.data))}catch(t){for(var s=new Uint8Array(e.data),a=new Array(s.length),u=0;u<s.length;u++)a[u]=s[u];r=String.fromCharCode.apply(null,a)}return i+=btoa(r),n(i)},t.decodePacket=function(e,n,r){if(void 0===e)return d;if("string"==typeof e){if("b"===e.charAt(0))return t.decodeBase64Packet(e.substr(1),n);if(r&&!1===(e=function(e){try{e=u.decode(e,{strict:!1})}catch(e){return!1}return e}(e)))return d;var i=e.charAt(0);return Number(i)==i&&l[i]?e.length>1?{type:l[i],data:e.substring(1)}:{type:l[i]}:d}i=new Uint8Array(e)[0];var o=s(e,1);return y&&"blob"===n&&(o=new y([o])),{type:l[i],data:o}},t.decodeBase64Packet=function(e,t){var n=l[e.charAt(0)];if(!r)return{type:n,data:{base64:!0,data:e.substr(1)}};var i=r.decode(e.substr(1));return"blob"===t&&y&&(i=new y([i])),{type:n,data:i}},t.encodePayload=function(e,n,r){"function"==typeof n&&(r=n,n=null);var i=o(e);if(n&&i)return y&&!p?t.encodePayloadAsBlob(e,r):t.encodePayloadAsArrayBuffer(e,r);if(!e.length)return r("0:");g(e,(function(e,r){t.encodePacket(e,!!i&&n,!1,(function(e){r(null,function(e){return e.length+":"+e}(e))}))}),(function(e,t){return r(t.join(""))}))},t.decodePayload=function(e,n,r){if("string"!=typeof e)return t.decodePayloadAsBinary(e,n,r);var i;if("function"==typeof n&&(r=n,n=null),""===e)return r(d,0,1);for(var o,s,a="",u=0,c=e.length;u<c;u++){var h=e.charAt(u);if(":"===h){if(""===a||a!=(o=Number(a)))return r(d,0,1);if(a!=(s=e.substr(u+1,o)).length)return r(d,0,1);if(s.length){if(i=t.decodePacket(s,n,!1),d.type===i.type&&d.data===i.data)return r(d,0,1);if(!1===r(i,u+o,c))return}u+=o,a=""}else a+=h}return""!==a?r(d,0,1):void 0},t.encodePayloadAsArrayBuffer=function(e,n){if(!e.length)return n(new ArrayBuffer(0));g(e,(function(e,n){t.encodePacket(e,!0,!0,(function(e){return n(null,e)}))}),(function(e,t){var r=t.reduce((function(e,t){var n;return e+(n="string"==typeof t?t.length:t.byteLength).toString().length+n+2}),0),i=new Uint8Array(r),o=0;return t.forEach((function(e){var t="string"==typeof e,n=e;if(t){for(var r=new Uint8Array(e.length),s=0;s<e.length;s++)r[s]=e.charCodeAt(s);n=r.buffer}i[o++]=t?0:1;var a=n.byteLength.toString();for(s=0;s<a.length;s++)i[o++]=parseInt(a[s]);i[o++]=255;for(r=new Uint8Array(n),s=0;s<r.length;s++)i[o++]=r[s]})),n(i.buffer)}))},t.encodePayloadAsBlob=function(e,n){g(e,(function(e,n){t.encodePacket(e,!0,!0,(function(e){var t=new Uint8Array(1);if(t[0]=1,"string"==typeof e){for(var r=new Uint8Array(e.length),i=0;i<e.length;i++)r[i]=e.charCodeAt(i);e=r.buffer,t[0]=0}var o=(e instanceof ArrayBuffer?e.byteLength:e.size).toString(),s=new Uint8Array(o.length+1);for(i=0;i<o.length;i++)s[i]=parseInt(o[i]);if(s[o.length]=255,y){var a=new y([t.buffer,s.buffer,e]);n(null,a)}}))}),(function(e,t){return n(new y(t))}))},t.decodePayloadAsBinary=function(e,n,r){"function"==typeof n&&(r=n,n=null);for(var i=e,o=[];i.byteLength>0;){for(var a=new Uint8Array(i),u=0===a[0],c="",h=1;255!==a[h];h++){if(c.length>310)return r(d,0,1);c+=a[h]}i=s(i,2+c.length),c=parseInt(c);var p=s(i,0,c);if(u)try{p=String.fromCharCode.apply(null,new Uint8Array(p))}catch(e){var f=new Uint8Array(p);p="";for(h=0;h<f.length;h++)p+=String.fromCharCode(f[h])}o.push(p),i=s(i,c)}var l=o.length;o.forEach((function(e,i){r(t.decodePacket(e,n,!0),i,l)}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sortArrayBy=t.generateThumb=t.makeAssetUrl=t.getDomainFromUrl=t.isEmptyObject=void 0,t.isEmptyObject=function(e){return 0===Object.keys(e).length&&e.constructor===Object},t.getDomainFromUrl=function(e){return e.replace(/^(.*\/\/[^\/?#]*).*$/,"$1")},t.makeAssetUrl=function(e,t){var n="";return void 0!==t&&(n=e.replace(/thumbAssetId\/([^\/]+)/,"/thumbAssetId/"+t)),n},t.generateThumb=function(e,t,n,r,i){return void 0===t&&(t=""),void 0===i&&(i=""),e.split("api_v3")[0]+"/p/"+t+"/sp/"+t+"00/thumbnail/entry_id/"+n+"/width/400/vid_sec/"+(r/1e3).toFixed(2)+(i?"/ks/"+i:"")},t.sortArrayBy=function(e,t,n){return e.sort((function(e,r){return n?e[t]-r[t]||e[n]-r[n]:e[t]-r[t]}))}},function(e,t,n){(function(r){function i(){var e;try{e=t.storage.debug}catch(e){}return!e&&void 0!==r&&"env"in r&&(e=r.env.DEBUG),e}(t=e.exports=n(62)).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},t.formatArgs=function(e){var n=this.useColors;if(e[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+e[0]+(n?"%c ":" ")+"+"+t.humanize(this.diff),!n)return;var r="color: "+this.color;e.splice(1,0,r,"color: inherit");var i=0,o=0;e[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(i++,"%c"===e&&(o=i))})),e.splice(o,0,r)},t.save=function(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(e){}},t.load=i,t.useColors=function(){if("undefined"!=typeof window&&window.process&&"renderer"===window.process.type)return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},t.enable(i())}).call(this,n(10))},function(e,t){t.encode=function(e){var t="";for(var n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t},t.decode=function(e){for(var t={},n=e.split("&"),r=0,i=n.length;r<i;r++){var o=n[r].split("=");t[decodeURIComponent(o[0])]=decodeURIComponent(o[1])}return t}},function(e,t){e.exports=function(e,t){var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t,n){(function(r){function i(){var e;try{e=t.storage.debug}catch(e){}return!e&&void 0!==r&&"env"in r&&(e=r.env.DEBUG),e}(t=e.exports=n(83)).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},t.formatArgs=function(e){var n=this.useColors;if(e[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+e[0]+(n?"%c ":" ")+"+"+t.humanize(this.diff),!n)return;var r="color: "+this.color;e.splice(1,0,r,"color: inherit");var i=0,o=0;e[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(i++,"%c"===e&&(o=i))})),e.splice(o,0,r)},t.save=function(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(e){}},t.load=i,t.useColors=function(){if("undefined"!=typeof window&&window.process&&"renderer"===window.process.type)return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},t.enable(i())}).call(this,n(10))},function(e,t){var n,r,i=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(e){if(n===setTimeout)return setTimeout(e,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(e){n=o}try{r="function"==typeof clearTimeout?clearTimeout:s}catch(e){r=s}}();var u,c=[],h=!1,p=-1;function f(){h&&u&&(h=!1,u.length?c=u.concat(c):p=-1,c.length&&l())}function l(){if(!h){var e=a(f);h=!0;for(var t=c.length;t;){for(u=c,c=[];++p<t;)u&&u[p].run();p=-1,t=c.length}u=null,h=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===s||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function d(e,t){this.fun=e,this.array=t}function y(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];c.push(new d(e,t)),1!==c.length||h||a(l)},d.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=y,i.addListener=y,i.once=y,i.off=y,i.removeListener=y,i.removeAllListeners=y,i.emit=y,i.prependListener=y,i.prependOnceListener=y,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(e,t,n){var r=n(64)("socket.io-parser"),i=n(3),o=n(67),s=n(22),a=n(23);function u(){}t.protocol=4,t.types=["CONNECT","DISCONNECT","EVENT","ACK","ERROR","BINARY_EVENT","BINARY_ACK"],t.CONNECT=0,t.DISCONNECT=1,t.EVENT=2,t.ACK=3,t.ERROR=4,t.BINARY_EVENT=5,t.BINARY_ACK=6,t.Encoder=u,t.Decoder=p;var c=t.ERROR+'"encode error"';function h(e){var n=""+e.type;if(t.BINARY_EVENT!==e.type&&t.BINARY_ACK!==e.type||(n+=e.attachments+"-"),e.nsp&&"/"!==e.nsp&&(n+=e.nsp+","),null!=e.id&&(n+=e.id),null!=e.data){var i=function(e){try{return JSON.stringify(e)}catch(e){return!1}}(e.data);if(!1===i)return c;n+=i}return r("encoded %j as %s",e,n),n}function p(){this.reconstructor=null}function f(e){this.reconPack=e,this.buffers=[]}function l(e){return{type:t.ERROR,data:"parser error: "+e}}u.prototype.encode=function(e,n){(r("encoding packet %j",e),t.BINARY_EVENT===e.type||t.BINARY_ACK===e.type)?function(e,t){o.removeBlobs(e,(function(e){var n=o.deconstructPacket(e),r=h(n.packet),i=n.buffers;i.unshift(r),t(i)}))}(e,n):n([h(e)])},i(p.prototype),p.prototype.add=function(e){var n;if("string"==typeof e)n=function(e){var n=0,i={type:Number(e.charAt(0))};if(null==t.types[i.type])return l("unknown packet type "+i.type);if(t.BINARY_EVENT===i.type||t.BINARY_ACK===i.type){for(var o=n+1;"-"!==e.charAt(++n)&&n!=e.length;);var a=e.substring(o,n);if(a!=Number(a)||"-"!==e.charAt(n))throw new Error("Illegal attachments");i.attachments=Number(a)}if("/"===e.charAt(n+1)){for(o=n+1;++n;){if(","===(c=e.charAt(n)))break;if(n===e.length)break}i.nsp=e.substring(o,n)}else i.nsp="/";var u=e.charAt(n+1);if(""!==u&&Number(u)==u){for(o=n+1;++n;){var c;if(null==(c=e.charAt(n))||Number(c)!=c){--n;break}if(n===e.length)break}i.id=Number(e.substring(o,n+1))}if(e.charAt(++n)){var h=function(e){try{return JSON.parse(e)}catch(e){return!1}}(e.substr(n));if(!(!1!==h&&(i.type===t.ERROR||s(h))))return l("invalid payload");i.data=h}return r("decoded %s as %j",e,i),i}(e),t.BINARY_EVENT===n.type||t.BINARY_ACK===n.type?(this.reconstructor=new f(n),0===this.reconstructor.reconPack.attachments&&this.emit("decoded",n)):this.emit("decoded",n);else{if(!a(e)&&!e.base64)throw new Error("Unknown type: "+e);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");(n=this.reconstructor.takeBinaryData(e))&&(this.reconstructor=null,this.emit("decoded",n))}},p.prototype.destroy=function(){this.reconstructor&&this.reconstructor.finishedReconstruction()},f.prototype.takeBinaryData=function(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){var t=o.reconstructPacket(this.reconPack,this.buffers);return this.finishedReconstruction(),t}return null},f.prototype.finishedReconstruction=function(){this.reconPack=null,this.buffers=[]}},function(e,t,n){"use strict";(function(e){
/*!
 * The buffer module from node.js, for the browser.
 *
 * @author   Feross Aboukhadijeh <http://feross.org>
 * @license  MIT
 */
var r=n(69),i=n(70),o=n(71);function s(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(e,t){if(s()<t)throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=u.prototype:(null===e&&(e=new u(t)),e.length=t),e}function u(e,t,n){if(!(u.TYPED_ARRAY_SUPPORT||this instanceof u))return new u(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return p(this,e)}return c(this,e,t,n)}function c(e,t,n,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r);u.TYPED_ARRAY_SUPPORT?(e=t).__proto__=u.prototype:e=f(e,t);return e}(e,t,n,r):"string"==typeof t?function(e,t,n){"string"==typeof n&&""!==n||(n="utf8");if(!u.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|d(t,n),i=(e=a(e,r)).write(t,n);i!==r&&(e=e.slice(0,i));return e}(e,t,n):function(e,t){if(u.isBuffer(t)){var n=0|l(t.length);return 0===(e=a(e,n)).length||t.copy(e,0,0,n),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(r=t.length)!=r?a(e,0):f(e,t);if("Buffer"===t.type&&o(t.data))return f(e,t.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function h(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function p(e,t){if(h(t),e=a(e,t<0?0:0|l(t)),!u.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function f(e,t){var n=t.length<0?0:0|l(t.length);e=a(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function l(e){if(e>=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|e}function d(e,t){if(u.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return j(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return q(e).length;default:if(r)return j(e).length;t=(""+t).toLowerCase(),r=!0}}function y(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return S(this,t,n);case"utf8":case"utf-8":return E(this,t,n);case"ascii":return k(this,t,n);case"latin1":case"binary":return O(this,t,n);case"base64":return A(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function g(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function v(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=u.from(t,r)),u.isBuffer(t))return 0===t.length?-1:m(e,t,n,r,i);if("number"==typeof t)return t&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):m(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function m(e,t,n,r,i){var o,s=1,a=e.length,u=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;s=2,a/=2,u/=2,n/=2}function c(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(i){var h=-1;for(o=n;o<a;o++)if(c(e,o)===c(t,-1===h?0:o-h)){if(-1===h&&(h=o),o-h+1===u)return h*s}else-1!==h&&(o-=o-h),h=-1}else for(n+u>a&&(n=a-u),o=n;o>=0;o--){for(var p=!0,f=0;f<u;f++)if(c(e,o+f)!==c(t,f)){p=!1;break}if(p)return o}return-1}function _(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var s=0;s<r;++s){var a=parseInt(t.substr(2*s,2),16);if(isNaN(a))return s;e[n+s]=a}return s}function C(e,t,n,r){return K(j(t,e.length-n),e,n,r)}function b(e,t,n,r){return K(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function P(e,t,n,r){return b(e,t,n,r)}function T(e,t,n,r){return K(q(t),e,n,r)}function w(e,t,n,r){return K(function(e,t){for(var n,r,i,o=[],s=0;s<e.length&&!((t-=2)<0);++s)n=e.charCodeAt(s),r=n>>8,i=n%256,o.push(i),o.push(r);return o}(t,e.length-n),e,n,r)}function A(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function E(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var o,s,a,u,c=e[i],h=null,p=c>239?4:c>223?3:c>191?2:1;if(i+p<=n)switch(p){case 1:c<128&&(h=c);break;case 2:128==(192&(o=e[i+1]))&&(u=(31&c)<<6|63&o)>127&&(h=u);break;case 3:o=e[i+1],s=e[i+2],128==(192&o)&&128==(192&s)&&(u=(15&c)<<12|(63&o)<<6|63&s)>2047&&(u<55296||u>57343)&&(h=u);break;case 4:o=e[i+1],s=e[i+2],a=e[i+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(u=(15&c)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(h=u)}null===h?(h=65533,p=1):h>65535&&(h-=65536,r.push(h>>>10&1023|55296),h=56320|1023&h),r.push(h),i+=p}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=4096));return n}(r)}t.Buffer=u,t.SlowBuffer=function(e){+e!=e&&(e=0);return u.alloc(+e)},t.INSPECT_MAX_BYTES=50,u.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=s(),u.poolSize=8192,u._augment=function(e){return e.__proto__=u.prototype,e},u.from=function(e,t,n){return c(null,e,t,n)},u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0})),u.alloc=function(e,t,n){return function(e,t,n,r){return h(t),t<=0?a(e,t):void 0!==n?"string"==typeof r?a(e,t).fill(n,r):a(e,t).fill(n):a(e,t)}(null,e,t,n)},u.allocUnsafe=function(e){return p(null,e)},u.allocUnsafeSlow=function(e){return p(null,e)},u.isBuffer=function(e){return!(null==e||!e._isBuffer)},u.compare=function(e,t){if(!u.isBuffer(e)||!u.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,i=0,o=Math.min(n,r);i<o;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0},u.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(e,t){if(!o(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return u.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=u.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){var s=e[n];if(!u.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(r,i),i+=s.length}return r},u.byteLength=d,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)g(this,t,t+1);return this},u.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)g(this,t,t+3),g(this,t+1,t+2);return this},u.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)g(this,t,t+7),g(this,t+1,t+6),g(this,t+2,t+5),g(this,t+3,t+4);return this},u.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?E(this,0,e):y.apply(this,arguments)},u.prototype.equals=function(e){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===u.compare(this,e)},u.prototype.inspect=function(){var e="",n=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),"<Buffer "+e+">"},u.prototype.compare=function(e,t,n,r,i){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(r>>>=0),s=(n>>>=0)-(t>>>=0),a=Math.min(o,s),c=this.slice(r,i),h=e.slice(t,n),p=0;p<a;++p)if(c[p]!==h[p]){o=c[p],s=h[p];break}return o<s?-1:s<o?1:0},u.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},u.prototype.indexOf=function(e,t,n){return v(this,e,t,n,!0)},u.prototype.lastIndexOf=function(e,t,n){return v(this,e,t,n,!1)},u.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return _(this,e,t,n);case"utf8":case"utf-8":return C(this,e,t,n);case"ascii":return b(this,e,t,n);case"latin1":case"binary":return P(this,e,t,n);case"base64":return T(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return w(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function k(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function O(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function S(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var i="",o=t;o<n;++o)i+=U(e[o]);return i}function N(e,t,n){for(var r=e.slice(t,n),i="",o=0;o<r.length;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function I(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function R(e,t,n,r,i,o){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function F(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-n,2);i<o;++i)e[n+i]=(t&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function x(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-n,4);i<o;++i)e[n+i]=t>>>8*(r?i:3-i)&255}function L(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function B(e,t,n,r,o){return o||L(e,0,n,4),i.write(e,t,n,r,23,4),n+4}function M(e,t,n,r,o){return o||L(e,0,n,8),i.write(e,t,n,r,52,8),n+8}u.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e),u.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=u.prototype;else{var i=t-e;n=new u(i,void 0);for(var o=0;o<i;++o)n[o]=this[o+e]}return n},u.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||I(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r},u.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||I(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},u.prototype.readUInt8=function(e,t){return t||I(e,1,this.length),this[e]},u.prototype.readUInt16LE=function(e,t){return t||I(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUInt16BE=function(e,t){return t||I(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUInt32LE=function(e,t){return t||I(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUInt32BE=function(e,t){return t||I(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||I(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*t)),r},u.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||I(e,t,this.length);for(var r=t,i=1,o=this[e+--r];r>0&&(i*=256);)o+=this[e+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},u.prototype.readInt8=function(e,t){return t||I(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){t||I(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt16BE=function(e,t){t||I(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt32LE=function(e,t){return t||I(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return t||I(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readFloatLE=function(e,t){return t||I(e,4,this.length),i.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return t||I(e,4,this.length),i.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return t||I(e,8,this.length),i.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return t||I(e,8,this.length),i.read(this,e,!1,52,8)},u.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||R(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[t]=255&e;++o<n&&(i*=256);)this[t+o]=e/i&255;return t+n},u.prototype.writeUIntBE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||R(this,e,t,n,Math.pow(2,8*n)-1,0);var i=n-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+n},u.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,1,255,0),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},u.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):F(this,e,t,!0),t+2},u.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):F(this,e,t,!1),t+2},u.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):x(this,e,t,!0),t+4},u.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):x(this,e,t,!1),t+4},u.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);R(this,e,t,n,i-1,-i)}var o=0,s=1,a=0;for(this[t]=255&e;++o<n&&(s*=256);)e<0&&0===a&&0!==this[t+o-1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+n},u.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);R(this,e,t,n,i-1,-i)}var o=n-1,s=1,a=0;for(this[t+o]=255&e;--o>=0&&(s*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+n},u.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,1,127,-128),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):F(this,e,t,!0),t+2},u.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):F(this,e,t,!1),t+2},u.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):x(this,e,t,!0),t+4},u.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):x(this,e,t,!1),t+4},u.prototype.writeFloatLE=function(e,t,n){return B(this,e,t,!0,n)},u.prototype.writeFloatBE=function(e,t,n){return B(this,e,t,!1,n)},u.prototype.writeDoubleLE=function(e,t,n){return M(this,e,t,!0,n)},u.prototype.writeDoubleBE=function(e,t,n){return M(this,e,t,!1,n)},u.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var i,o=r-n;if(this===e&&n<t&&t<r)for(i=o-1;i>=0;--i)e[i+t]=this[i+n];else if(o<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)e[i+t]=this[i+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+o),t);return o},u.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===e.length){var i=e.charCodeAt(0);i<256&&(e=i)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!u.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var o;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(o=t;o<n;++o)this[o]=e;else{var s=u.isBuffer(e)?e:j(new u(e,r).toString()),a=s.length;for(o=0;o<n-t;++o)this[o+t]=s[o%a]}return this};var D=/[^+\/0-9A-Za-z-_]/g;function U(e){return e<16?"0"+e.toString(16):e.toString(16)}function j(e,t){var n;t=t||1/0;for(var r=e.length,i=null,o=[],s=0;s<r;++s){if((n=e.charCodeAt(s))>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function q(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(D,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function K(e,t,n,r){for(var i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}}).call(this,n(68))},function(e,t,n){var r=n(74),i=n(14);e.exports=function(e){var t=e.xdomain,n=e.xscheme,o=e.enablesXDR;try{if("undefined"!=typeof XMLHttpRequest&&(!t||r))return new XMLHttpRequest}catch(e){}try{if("undefined"!=typeof XDomainRequest&&!n&&o)return new XDomainRequest}catch(e){}if(!t)try{return new(i[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(e){}}},function(e,t){e.exports="undefined"!=typeof self?self:"undefined"!=typeof window?window:Function("return this")()},function(e,t,n){var r=n(4),i=n(3);function o(e){this.path=e.path,this.hostname=e.hostname,this.port=e.port,this.secure=e.secure,this.query=e.query,this.timestampParam=e.timestampParam,this.timestampRequests=e.timestampRequests,this.readyState="",this.agent=e.agent||!1,this.socket=e.socket,this.enablesXDR=e.enablesXDR,this.withCredentials=e.withCredentials,this.pfx=e.pfx,this.key=e.key,this.passphrase=e.passphrase,this.cert=e.cert,this.ca=e.ca,this.ciphers=e.ciphers,this.rejectUnauthorized=e.rejectUnauthorized,this.forceNode=e.forceNode,this.isReactNative=e.isReactNative,this.extraHeaders=e.extraHeaders,this.localAddress=e.localAddress}e.exports=o,i(o.prototype),o.prototype.onError=function(e,t){var n=new Error(e);return n.type="TransportError",n.description=t,this.emit("error",n),this},o.prototype.open=function(){return"closed"!==this.readyState&&""!==this.readyState||(this.readyState="opening",this.doOpen()),this},o.prototype.close=function(){return"opening"!==this.readyState&&"open"!==this.readyState||(this.doClose(),this.onClose()),this},o.prototype.send=function(e){if("open"!==this.readyState)throw new Error("Transport not open");this.write(e)},o.prototype.onOpen=function(){this.readyState="open",this.writable=!0,this.emit("open")},o.prototype.onData=function(e){var t=r.decodePacket(e,this.socket.binaryType);this.onPacket(t)},o.prototype.onPacket=function(e){this.emit("packet",e)},o.prototype.onClose=function(){this.readyState="closed",this.emit("close")}},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},i=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},o=this&&this.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],s=0,a=o.length;s<a;s++,i++)r[i]=o[s];return r};Object.defineProperty(t,"__esModule",{value:!0}),t.Provider=void 0;var s=n(1),a=n(37),u=n(0),c=n(18),h=n(5),p=n(47),f=n(48),l=function(){function e(e,t,n,r){var i=this;this.cuePointManager=null,this._dataAggregator=null,this._pendingCuesManager=null,this._maybeForcePushingCuePoints=function(){var e;i._isPreventSeek()&&i._player.paused&&(null===(e=i._pendingCuesManager)||void 0===e||e.checkCues())},this._types=r,this._logger=n,this._player=e,this._eventManager=t,this._logger=n,this._player.isLive()&&!this._player.isDvr()&&this._initDataAggregator(),this._pendingCuesManager=new f.PendingCuesManager({player:this._player,eventManager:this._eventManager})}return e.prototype._addCuePointToPlayer=function(e,t){var n,r=this,o=void 0===t?{}:t,s=o.useDataAggregator,c=void 0===s?Boolean(this._dataAggregator):s,h=o.usePendingQueManager,p=void 0===h?this._isPreventSeek():h;if(e.length){var f=e.map((function(e){return{startTime:e.startTime,endTime:e.endTime,id:e.id,metadata:i(e,["startTime","endTime","id"])}}));"youtube"===this._player.engineType?(this.cuePointManager||(this.cuePointManager=new a.CuePointManager(this._player,this._eventManager)),this.cuePointManager.addCuePoints(f)):c?f.forEach((function(e){e.metadata.cuePointType===u.KalturaCuePoint.KalturaCuePointType.CODE&&r._player.cuePointManager.addCuePoints(f),r._dataAggregator.addData(e)})):p?null===(n=this._pendingCuesManager)||void 0===n||n.addCuePoint(f):this._player.cuePointManager.addCuePoints(f)}},e.prototype._shiftCuePoints=function(e,t){e.forEach((function(e){e.startTime=e.startTime-t,e.endTime!==Number.MAX_SAFE_INTEGER&&(e.endTime=e.endTime-t)}))},e.prototype._filterCuePointsOutOfVideoRange=function(e,t,n){return e.filter((function(e){return e.startTime>=t&&(!n||e.startTime<n)}))},e.prototype._filterAndShiftCuePoints=function(e){var t=this._player.sources,n=t.seekFrom,r=t.clipTo;if(e.length&&(n||r)){var i=this._filterCuePointsOutOfVideoRange(e,n||0,r);return this._shiftCuePoints(i,n||0),i}return e},e.prototype._fixCuePointsEndTime=function(e){return e.map((function(t,n){if(t.endTime===Number.MAX_SAFE_INTEGER)for(var i=n+1;e[i];){if(e[i].startTime!==t.startTime)return r(r({},t),{endTime:e[i].startTime});i++}return t}))},e.prototype._handleThumbResponse=function(e,t){var n,a=this;void 0===t&&(t={});var u=t.cuepointOffset,p=void 0===u?0:u,f=i(t,["cuepointOffset"]),l=function(e){return function(t){return h.makeAssetUrl(e,t.assetId)}},d=function(e){var t,n=a._player.config.provider;return h.generateThumb(null===(t=null==n?void 0:n.env)||void 0===t?void 0:t.serviceUrl,null==n?void 0:n.partnerId,a._player.sources.id,e.startTime,null==n?void 0:n.ks)},y=function(e,t){var n=e.map((function(e){return{assetUrl:t(e),id:e.id,cuePointType:e.cuePointType,title:e.title,description:e.description,subType:e.subType,startTime:e.startTime/1e3+p,endTime:Number.MAX_SAFE_INTEGER,isDefaultThumb:!e.assetId}}));n=h.sortArrayBy(n,"startTime"),n=a._fixCuePointsEndTime(n),n=a._filterAndShiftCuePoints(n),a._addCuePointToPlayer(n,f)},g=e.get(c.ThumbLoader.id),v=(null==g?void 0:g.response.thumbCuePoints)||[];if(this._logger.debug("_fetchVodData thumb response successful with "+v.length+" cue points"),v.length){var m=v.reduce((function(e,t){return t.subType===s.KalturaThumbCuePointSubType.SLIDE?r(r({},e),{slideCuePoints:o(e.slideCuePoints,[t])}):t.subType===s.KalturaThumbCuePointSubType.CHAPTER?r(r({},e),{chapterCuePoints:o(e.chapterCuePoints,[t])}):e}),{slideCuePoints:[],chapterCuePoints:[]}),_=m.slideCuePoints,C=m.chapterCuePoints,b=null===(n=v.find((function(e){return e.assetId})))||void 0===n?void 0:n.assetId;b?this._player.provider.doRequest([{loader:c.ThumbUrlLoader,params:{thumbAssetId:b}}]).then((function(e){if(e){if(e.has(c.ThumbUrlLoader.id)){var t=e.get(c.ThumbUrlLoader.id),n=null==t?void 0:t.response;if(n&&_.length&&y(_,l(n)),n&&C.length){y(C,(function(e){return e.assetId?l(n)(e):d(e)}))}}}else a._logger.warn("ThumbUrlLoader doRequest doesn't have data")})).catch((function(e){a._logger.warn("ThumbUrlLoader doRequest was rejected")})):C.length&&y(C,d)}},e.prototype._handleHotspotResponse=function(e,t){void 0===t&&(t={});var n=t.cuepointOffset,r=void 0===n?0:n,o=i(t,["cuepointOffset"]),s=e.get(c.HotspotLoader.id),a=(null==s?void 0:s.response.hotspotCuePoints)||[];if(this._logger.debug("_fetchVodData hotspots response successful with "+a.length+" cue points"),a.length){var u=function(e){return e.map((function(e){return{id:e.id,cuePointType:e.cuePointType,text:e.text,partnerData:e.partnerData,startTime:e.startTime/1e3+r,endTime:e.endTime?e.endTime/1e3+r:Number.MAX_SAFE_INTEGER,tags:e.tags}}))}(a);u=this._filterAndShiftCuePoints(u),u=h.sortArrayBy(u,"startTime","createdAt"),this._addCuePointToPlayer(u,o)}},e.prototype._isPreventSeek=function(){return this._player.ui.store.getState().seekbar.isPreventSeek},e.prototype._initDataAggregator=function(){var e=this;this._dataAggregator=new p.DataAggregator({onTimeoutFn:function(t){var n=new Map;t.forEach((function(e){n.set(e.id,e)})),n.forEach((function(t){t.endTime===Number.MAX_SAFE_INTEGER&&e._player.cuePointManager.addCuePoints([t])}))}})},e.prototype.destroy=function(){this.cuePointManager&&this.cuePointManager.destroy(),this._dataAggregator&&(this._dataAggregator.destroy(),this._dataAggregator=null),this._pendingCuesManager&&(this._pendingCuesManager.destroy(),this._pendingCuesManager=null)},e}();t.Provider=l},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.KalturaCodeCuePoint=void 0;var o=function(e){function t(t){var n=e.call(this,t)||this;return n.tags="",n.code=t.code,n.description=t.description,n.endTime=t.endTime,n.duration=t.duration,n.tags=t.tags,n}return i(t,e),t}(n(2).KalturaCuePoint);t.KalturaCodeCuePoint=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(19);Object.defineProperty(t,"HotspotLoader",{enumerable:!0,get:function(){return r.HotspotLoader}});var i=n(20);Object.defineProperty(t,"ThumbLoader",{enumerable:!0,get:function(){return i.ThumbLoader}});var o=n(46);Object.defineProperty(t,"ThumbUrlLoader",{enumerable:!0,get:function(){return o.ThumbUrlLoader}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HotspotLoader=void 0;var r=n(0),i=n(1),o=KalturaPlayer.providers.RequestBuilder,s=function(){function e(e){this._entryId="",this._requests=[],this._response={hotspotCuePoints:[]},this._entryId=e.entryId;var t=new Map,n=new o(t);n.service="cuepoint_cuepoint",n.action="list",n.params={filter:{objectType:"KalturaCuePointFilter",entryIdEqual:this._entryId,cuePointTypeEqual:r.KalturaCuePoint.KalturaCuePointType.ANNOTATION,tagsLike:i.CuePointTags.HOTSPOT},responseProfile:{type:1,fields:"id, startTime, endTime, cuePointType, partnerData, text, tags"}},this.requests.push(n)}return Object.defineProperty(e,"id",{get:function(){return"hotspot"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"requests",{get:function(){return this._requests},set:function(e){this._requests=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"response",{get:function(){return this._response},set:function(e){var t,n=new r.KalturaCuePointListResponse(null===(t=e[0])||void 0===t?void 0:t.data,r.KalturaHotspotCuePoint);n.totalCount&&(this._response.hotspotCuePoints=n.cuePoints)},enumerable:!1,configurable:!0}),e.prototype.isValid=function(){return!!this._entryId},e}();t.HotspotLoader=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ThumbLoader=void 0;var r=n(0),i=KalturaPlayer.providers.RequestBuilder,o=function(){function e(e){this._entryId="",this._requests=[],this._response={thumbCuePoints:[]},this._entryId=e.entryId;var t=new Map,n=new i(t);n.service="cuepoint_cuepoint",n.action="list",n.params={filter:{objectType:"KalturaThumbCuePointFilter",entryIdEqual:this._entryId,cuePointTypeEqual:r.KalturaCuePoint.KalturaCuePointType.THUMB,subTypeIn:e.subTypesFilter},responseProfile:{type:1,fields:"id, assetId, startTime, cuePointType, title, description, subType"}},this.requests.push(n)}return Object.defineProperty(e,"id",{get:function(){return"thumb"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"requests",{get:function(){return this._requests},set:function(e){this._requests=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"response",{get:function(){return this._response},set:function(e){var t,n=new r.KalturaCuePointListResponse(null===(t=e[0])||void 0===t?void 0:t.data,r.KalturaThumbCuePoint);n.totalCount&&(this._response.thumbCuePoints=n.cuePoints)},enumerable:!1,configurable:!0}),e.prototype.isValid=function(){return!!this._entryId},e}();t.ThumbLoader=o},function(e,t){var n=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,r=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];e.exports=function(e){var t=e,i=e.indexOf("["),o=e.indexOf("]");-1!=i&&-1!=o&&(e=e.substring(0,i)+e.substring(i,o).replace(/:/g,";")+e.substring(o,e.length));for(var s,a,u=n.exec(e||""),c={},h=14;h--;)c[r[h]]=u[h]||"";return-1!=i&&-1!=o&&(c.source=t,c.host=c.host.substring(1,c.host.length-1).replace(/;/g,":"),c.authority=c.authority.replace("[","").replace("]","").replace(/;/g,":"),c.ipv6uri=!0),c.pathNames=function(e,t){var n=t.replace(/\/{2,9}/g,"/").split("/");"/"!=t.substr(0,1)&&0!==t.length||n.splice(0,1);"/"==t.substr(t.length-1,1)&&n.splice(n.length-1,1);return n}(0,c.path),c.queryKey=(s=c.query,a={},s.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,(function(e,t,n){t&&(a[t]=n)})),a),c}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){(function(t){e.exports=function(e){return n&&t.isBuffer(e)||r&&(e instanceof ArrayBuffer||function(e){return"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer}(e))};var n="function"==typeof t&&"function"==typeof t.isBuffer,r="function"==typeof ArrayBuffer}).call(this,n(12).Buffer)},function(e,t,n){var r=n(72),i=n(30),o=n(3),s=n(11),a=n(31),u=n(32),c=n(6)("socket.io-client:manager"),h=n(29),p=n(89),f=Object.prototype.hasOwnProperty;function l(e,t){if(!(this instanceof l))return new l(e,t);e&&"object"==typeof e&&(t=e,e=void 0),(t=t||{}).path=t.path||"/socket.io",this.nsps={},this.subs=[],this.opts=t,this.reconnection(!1!==t.reconnection),this.reconnectionAttempts(t.reconnectionAttempts||1/0),this.reconnectionDelay(t.reconnectionDelay||1e3),this.reconnectionDelayMax(t.reconnectionDelayMax||5e3),this.randomizationFactor(t.randomizationFactor||.5),this.backoff=new p({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==t.timeout?2e4:t.timeout),this.readyState="closed",this.uri=e,this.connecting=[],this.lastPing=null,this.encoding=!1,this.packetBuffer=[];var n=t.parser||s;this.encoder=new n.Encoder,this.decoder=new n.Decoder,this.autoConnect=!1!==t.autoConnect,this.autoConnect&&this.open()}e.exports=l,l.prototype.emitAll=function(){for(var e in this.emit.apply(this,arguments),this.nsps)f.call(this.nsps,e)&&this.nsps[e].emit.apply(this.nsps[e],arguments)},l.prototype.updateSocketIds=function(){for(var e in this.nsps)f.call(this.nsps,e)&&(this.nsps[e].id=this.generateId(e))},l.prototype.generateId=function(e){return("/"===e?"":e+"#")+this.engine.id},o(l.prototype),l.prototype.reconnection=function(e){return arguments.length?(this._reconnection=!!e,this):this._reconnection},l.prototype.reconnectionAttempts=function(e){return arguments.length?(this._reconnectionAttempts=e,this):this._reconnectionAttempts},l.prototype.reconnectionDelay=function(e){return arguments.length?(this._reconnectionDelay=e,this.backoff&&this.backoff.setMin(e),this):this._reconnectionDelay},l.prototype.randomizationFactor=function(e){return arguments.length?(this._randomizationFactor=e,this.backoff&&this.backoff.setJitter(e),this):this._randomizationFactor},l.prototype.reconnectionDelayMax=function(e){return arguments.length?(this._reconnectionDelayMax=e,this.backoff&&this.backoff.setMax(e),this):this._reconnectionDelayMax},l.prototype.timeout=function(e){return arguments.length?(this._timeout=e,this):this._timeout},l.prototype.maybeReconnectOnOpen=function(){!this.reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()},l.prototype.open=l.prototype.connect=function(e,t){if(c("readyState %s",this.readyState),~this.readyState.indexOf("open"))return this;c("opening %s",this.uri),this.engine=r(this.uri,this.opts);var n=this.engine,i=this;this.readyState="opening",this.skipReconnect=!1;var o=a(n,"open",(function(){i.onopen(),e&&e()})),s=a(n,"error",(function(t){if(c("connect_error"),i.cleanup(),i.readyState="closed",i.emitAll("connect_error",t),e){var n=new Error("Connection error");n.data=t,e(n)}else i.maybeReconnectOnOpen()}));if(!1!==this._timeout){var u=this._timeout;c("connect attempt will timeout after %d",u),0===u&&o.destroy();var h=setTimeout((function(){c("connect attempt timed out after %d",u),o.destroy(),n.close(),n.emit("error","timeout"),i.emitAll("connect_timeout",u)}),u);this.subs.push({destroy:function(){clearTimeout(h)}})}return this.subs.push(o),this.subs.push(s),this},l.prototype.onopen=function(){c("open"),this.cleanup(),this.readyState="open",this.emit("open");var e=this.engine;this.subs.push(a(e,"data",u(this,"ondata"))),this.subs.push(a(e,"ping",u(this,"onping"))),this.subs.push(a(e,"pong",u(this,"onpong"))),this.subs.push(a(e,"error",u(this,"onerror"))),this.subs.push(a(e,"close",u(this,"onclose"))),this.subs.push(a(this.decoder,"decoded",u(this,"ondecoded")))},l.prototype.onping=function(){this.lastPing=new Date,this.emitAll("ping")},l.prototype.onpong=function(){this.emitAll("pong",new Date-this.lastPing)},l.prototype.ondata=function(e){this.decoder.add(e)},l.prototype.ondecoded=function(e){this.emit("packet",e)},l.prototype.onerror=function(e){c("error",e),this.emitAll("error",e)},l.prototype.socket=function(e,t){var n=this.nsps[e];if(!n){n=new i(this,e,t),this.nsps[e]=n;var r=this;n.on("connecting",o),n.on("connect",(function(){n.id=r.generateId(e)})),this.autoConnect&&o()}function o(){~h(r.connecting,n)||r.connecting.push(n)}return n},l.prototype.destroy=function(e){var t=h(this.connecting,e);~t&&this.connecting.splice(t,1),this.connecting.length||this.close()},l.prototype.packet=function(e){c("writing packet %j",e);var t=this;e.query&&0===e.type&&(e.nsp+="?"+e.query),t.encoding?t.packetBuffer.push(e):(t.encoding=!0,this.encoder.encode(e,(function(n){for(var r=0;r<n.length;r++)t.engine.write(n[r],e.options);t.encoding=!1,t.processPacketQueue()})))},l.prototype.processPacketQueue=function(){if(this.packetBuffer.length>0&&!this.encoding){var e=this.packetBuffer.shift();this.packet(e)}},l.prototype.cleanup=function(){c("cleanup");for(var e=this.subs.length,t=0;t<e;t++){this.subs.shift().destroy()}this.packetBuffer=[],this.encoding=!1,this.lastPing=null,this.decoder.destroy()},l.prototype.close=l.prototype.disconnect=function(){c("disconnect"),this.skipReconnect=!0,this.reconnecting=!1,"opening"===this.readyState&&this.cleanup(),this.backoff.reset(),this.readyState="closed",this.engine&&this.engine.close()},l.prototype.onclose=function(e){c("onclose"),this.cleanup(),this.backoff.reset(),this.readyState="closed",this.emit("close",e),this._reconnection&&!this.skipReconnect&&this.reconnect()},l.prototype.reconnect=function(){if(this.reconnecting||this.skipReconnect)return this;var e=this;if(this.backoff.attempts>=this._reconnectionAttempts)c("reconnect failed"),this.backoff.reset(),this.emitAll("reconnect_failed"),this.reconnecting=!1;else{var t=this.backoff.duration();c("will wait %dms before reconnect attempt",t),this.reconnecting=!0;var n=setTimeout((function(){e.skipReconnect||(c("attempting reconnect"),e.emitAll("reconnect_attempt",e.backoff.attempts),e.emitAll("reconnecting",e.backoff.attempts),e.skipReconnect||e.open((function(t){t?(c("reconnect attempt error"),e.reconnecting=!1,e.reconnect(),e.emitAll("reconnect_error",t.data)):(c("reconnect success"),e.onreconnect())})))}),t);this.subs.push({destroy:function(){clearTimeout(n)}})}},l.prototype.onreconnect=function(){var e=this.backoff.attempts;this.reconnecting=!1,this.backoff.reset(),this.updateSocketIds(),this.emitAll("reconnect",e)}},function(e,t,n){var r=n(13),i=n(75),o=n(85),s=n(86);t.polling=function(e){var t=!1,n=!1,s=!1!==e.jsonp;if("undefined"!=typeof location){var a="https:"===location.protocol,u=location.port;u||(u=a?443:80),t=e.hostname!==location.hostname||u!==e.port,n=e.secure!==a}if(e.xdomain=t,e.xscheme=n,"open"in new r(e)&&!e.forceJSONP)return new i(e);if(!s)throw new Error("JSONP disabled");return new o(e)},t.websocket=s},function(e,t,n){var r=n(15),i=n(7),o=n(4),s=n(8),a=n(28),u=n(9)("engine.io-client:polling");e.exports=h;var c=null!=new(n(13))({xdomain:!1}).responseType;function h(e){var t=e&&e.forceBase64;c&&!t||(this.supportsBinary=!1),r.call(this,e)}s(h,r),h.prototype.name="polling",h.prototype.doOpen=function(){this.poll()},h.prototype.pause=function(e){var t=this;function n(){u("paused"),t.readyState="paused",e()}if(this.readyState="pausing",this.polling||!this.writable){var r=0;this.polling&&(u("we are currently polling - waiting to pause"),r++,this.once("pollComplete",(function(){u("pre-pause polling complete"),--r||n()}))),this.writable||(u("we are currently writing - waiting to pause"),r++,this.once("drain",(function(){u("pre-pause writing complete"),--r||n()})))}else n()},h.prototype.poll=function(){u("polling"),this.polling=!0,this.doPoll(),this.emit("poll")},h.prototype.onData=function(e){var t=this;u("polling got data %s",e);o.decodePayload(e,this.socket.binaryType,(function(e,n,r){if("opening"===t.readyState&&t.onOpen(),"close"===e.type)return t.onClose(),!1;t.onPacket(e)})),"closed"!==this.readyState&&(this.polling=!1,this.emit("pollComplete"),"open"===this.readyState?this.poll():u('ignoring poll - transport state "%s"',this.readyState))},h.prototype.doClose=function(){var e=this;function t(){u("writing close packet"),e.write([{type:"close"}])}"open"===this.readyState?(u("transport open - closing"),t()):(u("transport not open - deferring close"),this.once("open",t))},h.prototype.write=function(e){var t=this;this.writable=!1;var n=function(){t.writable=!0,t.emit("drain")};o.encodePayload(e,this.supportsBinary,(function(e){t.doWrite(e,n)}))},h.prototype.uri=function(){var e=this.query||{},t=this.secure?"https":"http",n="";return!1!==this.timestampRequests&&(e[this.timestampParam]=a()),this.supportsBinary||e.sid||(e.b64=1),e=i.encode(e),this.port&&("https"===t&&443!==Number(this.port)||"http"===t&&80!==Number(this.port))&&(n=":"+this.port),e.length&&(e="?"+e),t+"://"+(-1!==this.hostname.indexOf(":")?"["+this.hostname+"]":this.hostname)+n+this.path+e}},function(e,t,n){(function(t){var r=n(77),i=Object.prototype.toString,o="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===i.call(Blob),s="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===i.call(File);e.exports=function e(n){if(!n||"object"!=typeof n)return!1;if(r(n)){for(var i=0,a=n.length;i<a;i++)if(e(n[i]))return!0;return!1}if("function"==typeof t&&t.isBuffer&&t.isBuffer(n)||"function"==typeof ArrayBuffer&&n instanceof ArrayBuffer||o&&n instanceof Blob||s&&n instanceof File)return!0;if(n.toJSON&&"function"==typeof n.toJSON&&1===arguments.length)return e(n.toJSON(),!0);for(var u in n)if(Object.prototype.hasOwnProperty.call(n,u)&&e(n[u]))return!0;return!1}}).call(this,n(12).Buffer)},function(e,t,n){"use strict";var r,i="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),o={},s=0,a=0;function u(e){var t="";do{t=i[e%64]+t,e=Math.floor(e/64)}while(e>0);return t}function c(){var e=u(+new Date);return e!==r?(s=0,r=e):e+"."+u(s++)}for(;a<64;a++)o[i[a]]=a;c.encode=u,c.decode=function(e){var t=0;for(a=0;a<e.length;a++)t=64*t+o[e.charAt(a)];return t},e.exports=c},function(e,t){var n=[].indexOf;e.exports=function(e,t){if(n)return e.indexOf(t);for(var r=0;r<e.length;++r)if(e[r]===t)return r;return-1}},function(e,t,n){var r=n(11),i=n(3),o=n(88),s=n(31),a=n(32),u=n(6)("socket.io-client:socket"),c=n(7),h=n(27);e.exports=l;var p={connect:1,connect_error:1,connect_timeout:1,connecting:1,disconnect:1,error:1,reconnect:1,reconnect_attempt:1,reconnect_failed:1,reconnect_error:1,reconnecting:1,ping:1,pong:1},f=i.prototype.emit;function l(e,t,n){this.io=e,this.nsp=t,this.json=this,this.ids=0,this.acks={},this.receiveBuffer=[],this.sendBuffer=[],this.connected=!1,this.disconnected=!0,this.flags={},n&&n.query&&(this.query=n.query),this.io.autoConnect&&this.open()}i(l.prototype),l.prototype.subEvents=function(){if(!this.subs){var e=this.io;this.subs=[s(e,"open",a(this,"onopen")),s(e,"packet",a(this,"onpacket")),s(e,"close",a(this,"onclose"))]}},l.prototype.open=l.prototype.connect=function(){return this.connected||(this.subEvents(),this.io.reconnecting||this.io.open(),"open"===this.io.readyState&&this.onopen(),this.emit("connecting")),this},l.prototype.send=function(){var e=o(arguments);return e.unshift("message"),this.emit.apply(this,e),this},l.prototype.emit=function(e){if(p.hasOwnProperty(e))return f.apply(this,arguments),this;var t=o(arguments),n={type:(void 0!==this.flags.binary?this.flags.binary:h(t))?r.BINARY_EVENT:r.EVENT,data:t,options:{}};return n.options.compress=!this.flags||!1!==this.flags.compress,"function"==typeof t[t.length-1]&&(u("emitting packet with ack id %d",this.ids),this.acks[this.ids]=t.pop(),n.id=this.ids++),this.connected?this.packet(n):this.sendBuffer.push(n),this.flags={},this},l.prototype.packet=function(e){e.nsp=this.nsp,this.io.packet(e)},l.prototype.onopen=function(){if(u("transport is open - connecting"),"/"!==this.nsp)if(this.query){var e="object"==typeof this.query?c.encode(this.query):this.query;u("sending connect packet with query %s",e),this.packet({type:r.CONNECT,query:e})}else this.packet({type:r.CONNECT})},l.prototype.onclose=function(e){u("close (%s)",e),this.connected=!1,this.disconnected=!0,delete this.id,this.emit("disconnect",e)},l.prototype.onpacket=function(e){var t=e.nsp===this.nsp,n=e.type===r.ERROR&&"/"===e.nsp;if(t||n)switch(e.type){case r.CONNECT:this.onconnect();break;case r.EVENT:case r.BINARY_EVENT:this.onevent(e);break;case r.ACK:case r.BINARY_ACK:this.onack(e);break;case r.DISCONNECT:this.ondisconnect();break;case r.ERROR:this.emit("error",e.data)}},l.prototype.onevent=function(e){var t=e.data||[];u("emitting event %j",t),null!=e.id&&(u("attaching ack callback to event"),t.push(this.ack(e.id))),this.connected?f.apply(this,t):this.receiveBuffer.push(t)},l.prototype.ack=function(e){var t=this,n=!1;return function(){if(!n){n=!0;var i=o(arguments);u("sending ack %j",i),t.packet({type:h(i)?r.BINARY_ACK:r.ACK,id:e,data:i})}}},l.prototype.onack=function(e){var t=this.acks[e.id];"function"==typeof t?(u("calling ack %s with %j",e.id,e.data),t.apply(this,e.data),delete this.acks[e.id]):u("bad ack %s",e.id)},l.prototype.onconnect=function(){this.connected=!0,this.disconnected=!1,this.emit("connect"),this.emitBuffered()},l.prototype.emitBuffered=function(){var e;for(e=0;e<this.receiveBuffer.length;e++)f.apply(this,this.receiveBuffer[e]);for(this.receiveBuffer=[],e=0;e<this.sendBuffer.length;e++)this.packet(this.sendBuffer[e]);this.sendBuffer=[]},l.prototype.ondisconnect=function(){u("server disconnect (%s)",this.nsp),this.destroy(),this.onclose("io server disconnect")},l.prototype.destroy=function(){if(this.subs){for(var e=0;e<this.subs.length;e++)this.subs[e].destroy();this.subs=null}this.io.destroy(this)},l.prototype.close=l.prototype.disconnect=function(){return this.connected&&(u("performing disconnect (%s)",this.nsp),this.packet({type:r.DISCONNECT})),this.destroy(),this.connected&&this.onclose("io client disconnect"),this},l.prototype.compress=function(e){return this.flags.compress=e,this},l.prototype.binary=function(e){return this.flags.binary=e,this}},function(e,t){e.exports=function(e,t,n){return e.on(t,n),{destroy:function(){e.removeListener(t,n)}}}},function(e,t){var n=[].slice;e.exports=function(e,t){if("string"==typeof t&&(t=e[t]),"function"!=typeof t)throw new Error("bind() requires a function");var r=n.call(arguments,2);return function(){return t.apply(e,r.concat(n.call(arguments)))}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NAME=t.VERSION=t.Plugin=void 0;var r=n(34);Object.defineProperty(t,"Plugin",{enumerable:!0,get:function(){return r.Cuepoints}});t.VERSION="3.0.14";t.NAME="@playkit-js/playkit-js-kaltura-cuepoints";KalturaPlayer.core.registerPlugin("kalturaCuepoints",r.Cuepoints)},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.Cuepoints=void 0;var o=n(35),s=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r._cuePointService=new o.CuepointService(n,r.eventManager,r.logger),n.registerService("kalturaCuepoints",r._cuePointService),r}return i(t,e),t.prototype.reset=function(){this._cuePointService.reset()},t.prototype.destroy=function(){this.eventManager.destroy(),this._cuePointService.reset()},t.isValid=function(){return!0},t.defaultConfig={},t}(KalturaPlayer.core.BasePlugin);t.Cuepoints=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CuepointService=void 0;var r=n(36),i=n(52),o=n(0),s=n(1),a=function(){function e(e,t,n){var r=this;this._types=new Map,this._mediaLoaded=!1,this._logger=n,this._player=e,this._eventManager=t,t.listen(this._player,this._player.Event.CHANGE_SOURCE_ENDED,(function(){r._initProvider()}))}return Object.defineProperty(e.prototype,"CuepointType",{get:function(){return s.KalturaCuePointType},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"KalturaThumbCuePointSubType",{get:function(){return s.KalturaThumbCuePointSubType},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"KalturaCuePointType",{get:function(){return o.KalturaCuePoint.KalturaCuePointType},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"KalturaCuePointTags",{get:function(){return s.CuePointTags},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"cuePointManager",{get:function(){var e;return(null===(e=this._provider)||void 0===e?void 0:e.cuePointManager)||null},enumerable:!1,configurable:!0}),e.prototype.registerTypes=function(e){var t=this;this._mediaLoaded?this._logger.warn("Cue point registration should occur on loadMedia (or before)"):e.forEach((function(e){Object.values(s.KalturaCuePointType).includes(e)?t._types.set(e,!0):t._logger.warn('"'+e+'" is not a valid cue point type for registration')}))},e.prototype._initProvider=function(){this._mediaLoaded=!0,0!=this._types.size?this._player.isLive()?this._provider=new i.LiveProvider(this._player,this._eventManager,this._logger,this._types):this._provider=new r.VodProvider(this._player,this._eventManager,this._logger,this._types):this._logger.warn("Cue points provider was not initialized because there are no registered types")},e.prototype.reset=function(){var e;this._mediaLoaded=!1,null===(e=this._provider)||void 0===e||e.destroy(),this._types.clear()},e}();t.CuepointService=a},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__assign||function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},s=this&&this.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],s=0,a=o.length;s<a;s++,i++)r[i]=o[s];return r};Object.defineProperty(t,"__esModule",{value:!0}),t.VodProvider=void 0;var a=n(16),u=n(20),c=n(1),h=n(5),p=n(49),f=n(50),l=n(19),d=n(51),y=function(e){function t(t,n,r,i){var s=e.call(this,t,n,r,i)||this;return s._fetchedCaptionKeys=[],s._fetchingCaptionKey=null,s._handleLanguageChange=function(){var e=(s._player.getTracks(s._player.Track.TEXT)||[]).find((function(e){return e.active})),t=s._player.sources.captions;if(e&&Array.isArray(t)&&t.length){var n=t.find((function(t){return t.language===e.language&&t.label===e.label}))||t[0];s._loadCaptions(n)}},s._loadCaptions=function(e){var t=e.language+"-"+e.label;if(!s._fetchedCaptionKeys.includes(t)&&s._fetchingCaptionKey!==t){var n=e.url.match("/captionAssetId/(.*?)(/|$)");if(n&&n[1]){s._fetchingCaptionKey=t;var r=s._player.config.session,i=(null==r?void 0:r.isAnonymous)?s._player.config.session.ks:void 0;s._player.provider.doRequest([{loader:d.CaptionLoader,params:{captionAssetId:n[1]}}],i).then((function(n){if(n){if(n.has(d.CaptionLoader.id)){var r=n.get(d.CaptionLoader.id),i=null==r?void 0:r.response.captions;if(i.length){var a=i.map((function(t){return o(o({},t),{language:e.language,label:e.label,startTime:t.startTime/1e3,endTime:t.endTime/1e3,text:t.content.reduce((function(e,t){return""+e+t.text}),"")})}));a=a.filter((function(e){return e.text})),a=s._filterAndShiftCuePoints(a),s._addCuePointToPlayer(a),s._fetchedCaptionKeys.push(t),s._maybeForcePushingCuePoints()}}}else s._logger.warn("CaptionLoader doRequest doesn't have data")})).catch((function(e){s._logger.warn("Fetching captions "+t+" has failed")})).finally((function(){s._fetchingCaptionKey=null}))}}},s._addListeners(),s._fetchVodData(),s}return i(t,e),t.prototype._addListeners=function(){this._types.has(c.KalturaCuePointType.CAPTION)&&(this._eventManager.listenOnce(this._player,this._player.Event.TEXT_TRACK_ADDED,this._handleLanguageChange),this._eventManager.listen(this._player,this._player.Event.TEXT_TRACK_CHANGED,this._handleLanguageChange))},t.prototype._removeListeners=function(){this._types.has(c.KalturaCuePointType.CAPTION)&&(this._eventManager.unlisten(this._player,this._player.Event.TEXT_TRACK_ADDED,this._handleLanguageChange),this._eventManager.unlisten(this._player,this._player.Event.TEXT_TRACK_CHANGED,this._handleLanguageChange))},t.prototype._fetchVodData=function(){var e=this,t="";this._types.has(c.KalturaCuePointType.SLIDE)&&(t=c.KalturaThumbCuePointSubType.SLIDE+","),this._types.has(c.KalturaCuePointType.CHAPTER)&&(t+=c.KalturaThumbCuePointSubType.CHAPTER+",");var n=[];t&&n.push({loader:u.ThumbLoader,params:{entryId:this._player.sources.id,subTypesFilter:t}}),this._types.has(c.KalturaCuePointType.VIEW_CHANGE)&&n.push({loader:p.ViewChangeLoader,params:{entryId:this._player.sources.id}}),this._types.has(c.KalturaCuePointType.QUIZ)&&n.push({loader:f.QuizQuestionLoader,params:{entryId:this._player.sources.id}}),this._types.has(c.KalturaCuePointType.HOTSPOT)&&n.push({loader:l.HotspotLoader,params:{entryId:this._player.sources.id}}),n.length&&this._player.provider.doRequest(n).then((function(t){t?(t.has(u.ThumbLoader.id)&&e._handleThumbResponse(t),t.has(p.ViewChangeLoader.id)&&e._handleViewChangeResponse(t),t.has(f.QuizQuestionLoader.id)&&e._handleQuizQuestionResponse(t),t.has(l.HotspotLoader.id)&&e._handleHotspotResponse(t)):e._logger.warn("Provider cue points doRequest doesn't have data")})).catch((function(t){e._logger.warn("Provider cue points doRequest was rejected")}))},t.prototype._handleViewChangeResponse=function(e){var t=e.get(p.ViewChangeLoader.id),n=(null==t?void 0:t.response.viewChangeCuePoints)||[];if(this._logger.debug("_fetchVodData viewChange response successful with "+n.length+" cue points"),n.length){var r=function(e){return e.map((function(e){return{id:e.id,startTime:e.startTime/1e3,endTime:e.endTime||Number.MAX_SAFE_INTEGER,cuePointType:e.cuePointType,partnerData:e.partnerData,tags:e.tags}}))}(n).reduce((function(e,t){var n;return(null===(n=t.partnerData)||void 0===n?void 0:n.viewModeLockState)?{lockedCuePoints:s(e.lockedCuePoints,[t]),viewChangeCuePoints:e.viewChangeCuePoints}:{lockedCuePoints:e.lockedCuePoints,viewChangeCuePoints:s(e.viewChangeCuePoints,[t])}}),{lockedCuePoints:[],viewChangeCuePoints:[]}),i=r.lockedCuePoints,o=r.viewChangeCuePoints;i=h.sortArrayBy(i,"startTime"),i=this._fixCuePointsEndTime(i),i=this._filterAndShiftCuePoints(i),o=h.sortArrayBy(o,"startTime"),o=this._fixCuePointsEndTime(o),o=this._filterAndShiftCuePoints(o),this._addCuePointToPlayer(o),this._addCuePointToPlayer(i)}},t.prototype._handleQuizQuestionResponse=function(e){var t=e.get(f.QuizQuestionLoader.id),n=(null==t?void 0:t.response.quizQuestionCuePoints)||[];if(this._logger.debug("_fetchVodData quiz question response successful with "+n.length+" cue points"),n.length){var r=function(e){return e.map((function(e){var t=e.startTime/1e3;return o(o({},e),{startTime:t,endTime:t+.5})}))}(n);r=this._filterAndShiftCuePoints(r),r=h.sortArrayBy(r,"startTime","createdAt"),this._addCuePointToPlayer(r)}},t.prototype.destroy=function(){e.prototype.destroy.call(this),this._fetchedCaptionKeys=[],this._fetchingCaptionKey=null,this._removeListeners()},t}(a.Provider);t.VodProvider=y},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||t.hasOwnProperty(n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(n(38),t)},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},i=this&&this.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],s=0,a=o.length;s<a;s++,i++)r[i]=o[s];return r};Object.defineProperty(t,"__esModule",{value:!0}),t.CuePointManager=void 0;var o=n(39),s=n(40),a=function(){function e(e,t){var n=this;this._player=e,this._eventManager=t,this._engine=null,this._activeCuePoints=[],this._allCuePoints=[],this.addCuePoints=function(e){e&&0!==e.length&&n._player.ready().then((function(){var t=e.map((function(e){return r(r({},e),{type:o.core.TimedMetadata.TYPE.CUE_POINT})}));n._player.dispatchEvent(new o.core.FakeEvent(o.core.EventType.TIMED_METADATA_ADDED,{cues:t})),n._allCuePoints=i(n._allCuePoints,t),n._engine=new s.CuepointEngine(n._allCuePoints),n._activeCuePoints=[],n._getActiveCuePoints(null,!0)}))},this._setActiveCuePoints=function(e){n._activeCuePoints=e,n._player.dispatchEvent(new o.core.FakeEvent(o.core.EventType.TIMED_METADATA_CHANGE,{cues:n._activeCuePoints}))},this._getActiveCuePoints=function(e,t){var r,o,s,a;if(void 0===t&&(t=!1),n._engine){var u=n._engine.updateTime(n._player.currentTime,t);if(u.snapshot&&u.snapshot.length>0&&(u.snapshot.length!==n._activeCuePoints.length||(null===(r=u.snapshot[0])||void 0===r?void 0:r.id)!==(null===(o=n._activeCuePoints[0])||void 0===o?void 0:o.id)||(null===(s=u.snapshot[u.snapshot.length-1])||void 0===s?void 0:s.id)!==(null===(a=n._activeCuePoints[n._activeCuePoints.length-1])||void 0===a?void 0:a.id))&&n._setActiveCuePoints(u.snapshot),u.delta){var c=u.delta,h=c.show,p=c.hide;(h.length>0||p.length>0)&&(n._activeCuePoints=n._activeCuePoints.filter((function(e){return!p.find((function(t){return e.id===t.id}))})),n._setActiveCuePoints(i(n._activeCuePoints,h)))}}},this._eventManager.listen(this._player,this._player.Event.TIME_UPDATE,this._getActiveCuePoints)}return Object.defineProperty(e.prototype,"allCuePoints",{get:function(){return this._allCuePoints},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"activeCuePoints",{get:function(){return this._activeCuePoints},enumerable:!1,configurable:!0}),e.prototype.destroy=function(){this._engine=null,this._eventManager.unlisten(this._player,this._player.Event.TIME_UPDATE,this._getActiveCuePoints)},e}();t.CuePointManager=a},function(e,t){e.exports=KalturaPlayer},function(e,t,n){"use strict";var r,i=this&&this.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],s=0,a=o.length;s<a;s++,i++)r[i]=o[s];return r};Object.defineProperty(t,"__esModule",{value:!0}),t.CuepointEngine=void 0,function(e){e.Show="show",e.Hide="hide"}(r||(r={}));var o=function(){function e(e,t){this.isFirstTime=!0,this.enabled=!0,this.lastHandledTime=null,this.lastHandledTimeIndex=null,this.nextTimeToHandle=null,this.cuepointChanges=[],this.reasonableSeekThreshold=Math.max(2e3,t&&t.reasonableSeekThreshold||0),this._cuepoints=e,this.prepareCuepoint()}return Object.defineProperty(e.prototype,"cuepoints",{get:function(){return i(this._cuepoints)},enumerable:!1,configurable:!0}),e.prototype.getSnapshot=function(e){var t=this.findClosestLastIndexByTime(e);return this.createCuepointSnapshot(t)},e.prototype.updateTime=function(e,t,n){void 0===t&&(t=!1);var r=this.isFirstTime,i=this.lastHandledTime,o=this.nextTimeToHandle;if(0===this.cuepointChanges.length)return r&&(this.isFirstTime=!1),{snapshot:[]};var s=!r&&null!==i&&null!==o&&(i>e||e-o>this.reasonableSeekThreshold),a=r||null!==this.lastHandledTime&&this.lastHandledTime>e||null!=this.nextTimeToHandle&&e>=this.nextTimeToHandle,u=this.findClosestLastIndexByTime(e),c=u<0?0:this.cuepointChanges[u].time;if(!a)return t?{snapshot:this.createCuepointSnapshot(u,n)}:{delta:this.createEmptyDelta()};if(r||t||s){var h=this.createCuepointSnapshot(u,n);return this.updateInternals(c,u),{snapshot:h}}var p=this.createCuepointDelta(u,n);return this.updateInternals(c,u),{delta:p}},e.prototype.getCurrentCuepointSnapshot=function(){return this.lastHandledTimeIndex?this.createCuepointSnapshot(this.lastHandledTimeIndex):[]},e.prototype.createCuepointSnapshot=function(e,t){if(!this.enabled||e<0||!this.cuepointChanges||0===this.cuepointChanges.length)return[];for(var n=[],i=0;i<=e;i++){var o=this.cuepointChanges[i],s=n.indexOf(o.cuePoint);o.type===r.Show?-1===s&&n.push(o.cuePoint):-1!==s&&n.splice(s,1)}return t&&(n=n.filter(t)),n},e.prototype.createCuepointDelta=function(e,t){if(!this.enabled||!this.cuepointChanges||0===this.cuepointChanges.length)return this.createEmptyDelta();var n=this.lastHandledTimeIndex;if(null===n)return this.createEmptyDelta();for(var i=[],o=[],s=n+1;s<=e;s++){var a=this.cuepointChanges[s],u=i.indexOf(a.cuePoint);a.type===r.Show?-1===u&&i.push(a.cuePoint):-1!==u?i.splice(u,1):-1===o.indexOf(a.cuePoint)&&o.push(a.cuePoint)}return t&&(i=i.filter(t),o=o.filter(t)),{show:i,hide:o}},e.prototype.updateInternals=function(e,t){var n=this.cuepointChanges;if(n&&0!==n.length){var r=t>=n.length-1,i=null===t;this.lastHandledTime=e,this.lastHandledTimeIndex=t,this.nextTimeToHandle=i?n[0].time:r?n[n.length-1].time:n[t+1].time,this.isFirstTime=!1}},e.prototype.createEmptyDelta=function(){return{show:[],hide:[]}},e.prototype.binarySearch=function(e,t){if(!e||0===e.length)return null;if(t<e[0].time)return-1;if(t>e[e.length-1].time)return e.length-1;for(var n=0,r=e.length-1;n<=r;){var i=Math.floor((r+n+1)/2);if(t<e[i].time)r=i-1;else{if(!(t>e[i].time))return i;n=i+1}}return Math.min(n,r)},e.prototype.findClosestLastIndexByTime=function(e){var t=this.cuepointChanges,n=this.binarySearch(t,e);if(null===n)return-1;for(var r=t.length;n<r-1&&t[n+1].time===e;)n++;return n},e.prototype.prepareCuepoint=function(){var e=this;(this._cuepoints||[]).forEach((function(t){null!==t.startTime&&void 0!==t.startTime&&t.startTime>=0&&e.cuepointChanges.push({time:t.startTime,type:r.Show,cuePoint:t}),null!==t.endTime&&void 0!==t.endTime&&t.endTime>=0&&e.cuepointChanges.push({time:t.endTime,type:r.Hide,cuePoint:t})})),this.cuepointChanges.sort((function(e,t){return e.time<t.time?-1:e.time===t.time?0:1}))},e}();t.CuepointEngine=o},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.KalturaThumbCuePoint=void 0;var o=function(e){function t(t){var n=e.call(this,t)||this;return n.assetId=t.assetId,n.description=t.description,n.title=t.title,n.subType=t.subType,n}return i(t,e),t}(n(2).KalturaCuePoint);t.KalturaThumbCuePoint=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KalturaCuePointListResponse=void 0;var r=function(e,t){var n=this;this.totalCount=0,this.cuePoints=[],this.totalCount=e.totalCount,this.totalCount>0&&e.objects.map((function(e){var r=new t(e);n.cuePoints.push(r)}))};t.KalturaCuePointListResponse=r},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.KalturaQuizQuestionCuePoint=t.KalturaQuestionType=void 0;var o=n(2);!function(e){e[e.fillInBlank=5]="fillInBlank",e[e.goTo=7]="goTo",e[e.hotSpot=6]="hotSpot",e[e.multipleAnswerQuestion=4]="multipleAnswerQuestion",e[e.multipleChoiceAnswer=1]="multipleChoiceAnswer",e[e.openQuestion=8]="openQuestion",e[e.reflectionPoint=3]="reflectionPoint",e[e.trueFalse=2]="trueFalse"}(t.KalturaQuestionType||(t.KalturaQuestionType={}));var s=function(e){function t(t){var n=e.call(this,t)||this;return n.excludeFromScore=t.excludeFromScore,n.objectType=t.objectType,n.optionalAnswers=t.optionalAnswers,n.hint=t.hint,n.explanation=t.explanation,n.question=t.question,n.questionType=t.questionType,n.userId=t.userId,n}return i(t,e),t}(o.KalturaCuePoint);t.KalturaQuizQuestionCuePoint=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.KalturaHotspotCuePoint=void 0;var o=function(e){function t(t){var n=e.call(this,t)||this;return n.text=t.text,n.endTime=t.endTime,n.tags=t.tags,n}return i(t,e),t}(n(2).KalturaCuePoint);t.KalturaHotspotCuePoint=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KalturaCaption=void 0;var r=n(2),i=function(e,t){this.cuePointType=r.KalturaCuePoint.KalturaCuePointType.CAPTION,this.id=t,this.startTime=e.startTime,this.endTime=e.endTime,this.content=e.content};t.KalturaCaption=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ThumbUrlLoader=void 0;var r=KalturaPlayer.providers.RequestBuilder,i=function(){function e(e){this._thumbAssetId="",this._requests=[],this._response="";var t=new Map,n=new r(t);this._thumbAssetId=e.thumbAssetId,n.service="thumbAsset",n.action="getUrl",n.params={id:this._thumbAssetId},this.requests.push(n)}return Object.defineProperty(e,"id",{get:function(){return"thumburlloader"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"requests",{get:function(){return this._requests},set:function(e){this._requests=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"response",{get:function(){return this._response},set:function(e){var t;this._response=null===(t=e[0])||void 0===t?void 0:t.data},enumerable:!1,configurable:!0}),e.prototype.isValid=function(){return!!this._thumbAssetId},e}();t.ThumbUrlLoader=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DataAggregator=void 0;var r=function(){function e(e){this._data=[],this._timerId=null,this._onTimeoutFn=e.onTimeoutFn,this._throttleTimeout=e.throttleTimeout||350}return e.prototype.addData=function(e){var t=this;this._data.push(e),this._timerId||(this._timerId=setTimeout((function(){t._useData(),t._clearData(),t._timerId=null}),this._throttleTimeout))},e.prototype._useData=function(){this._data.length>0&&this._onTimeoutFn(this._data)},e.prototype._clearData=function(){this._data=[]},e.prototype.destroy=function(){this._timerId&&(clearTimeout(this._timerId),this._clearData())},e}();t.DataAggregator=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PendingCuesManager=void 0;var r=function(){function e(e){var t=this;this._lastPositionCuePointsPushed=0,this._pendingCuePointsData=[],this._activeListener=!1,this._onTimeUpdate=function(){1e3*t._player.currentTime-t._lastPositionCuePointsPushed>=t._timeUpdateDelta&&(t._pushCuePointsToPlayer(),t._lastPositionCuePointsPushed=1e3*t._player.currentTime)},this._addListener=function(){t._activeListener||(t._eventManager.listen(t._player,t._player.Event.TIME_UPDATE,t._onTimeUpdate),t._activeListener=!0)},this._removeListener=function(){t._activeListener&&(t._eventManager.unlisten(t._player,t._player.Event.TIME_UPDATE,t._onTimeUpdate),t._activeListener=!1)},this._player=e.player,this._timeUpdateDelta=e.timeUpdateDelta||400,this._eventManager=e.eventManager}return e.prototype.addCuePoint=function(e){this._addListener(),this._pendingCuePointsData.push(e)},e.prototype.checkCues=function(){this._pushCuePointsToPlayer()},e.prototype._pushCuePointsToPlayer=function(){for(var e=0,t=this._pendingCuePointsData;e<t.length;e++){for(var n=t[e],r=[],i=0;i<n.length;i++){var o=n[i];if(!(Math.floor(o.startTime)<=this._player.currentTime))break;r.push(o)}n.splice(0,r.length),r.length&&this._player.cuePointManager.addCuePoints(r)}this._pendingCuePointsData.every((function(e){return 0===e.length}))&&(this._pendingCuePointsData=[],this._removeListener())},e.prototype.destroy=function(){this._lastPositionCuePointsPushed=0,this._pendingCuePointsData=[],this._removeListener()},e}();t.PendingCuesManager=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ViewChangeLoader=void 0;var r=n(0),i=n(17),o=KalturaPlayer.providers.RequestBuilder,s=function(){function e(e){this._entryId="",this._requests=[],this._response={viewChangeCuePoints:[]},this._entryId=e.entryId;var t=new Map,n=new o(t);n.service="cuepoint_cuepoint",n.action="list",n.params={filter:{objectType:"KalturaCodeCuePointFilter",entryIdEqual:this._entryId,cuePointTypeEqual:r.KalturaCuePoint.KalturaCuePointType.CODE},responseProfile:{type:1,fields:"id, startTime, endTime, partnerData, cuePointType, tags"}},this.requests.push(n)}return Object.defineProperty(e,"id",{get:function(){return"viewchange"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"requests",{get:function(){return this._requests},set:function(e){this._requests=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"response",{get:function(){return this._response},set:function(e){var t,n=new r.KalturaCuePointListResponse(null===(t=e[0])||void 0===t?void 0:t.data,i.KalturaCodeCuePoint);n.totalCount&&(this._response.viewChangeCuePoints=n.cuePoints)},enumerable:!1,configurable:!0}),e.prototype.isValid=function(){return!!this._entryId},e}();t.ViewChangeLoader=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QuizQuestionLoader=void 0;var r=n(0),i=KalturaPlayer.providers.RequestBuilder,o=function(){function e(e){this._entryId="",this._requests=[],this._response={quizQuestionCuePoints:[]},this._entryId=e.entryId;var t=new Map,n=new i(t);n.service="cuepoint_cuepoint",n.action="list",n.params={filter:{objectType:"KalturaQuestionCuePointFilter",entryIdEqual:this._entryId,cuePointTypeEqual:r.KalturaCuePoint.KalturaCuePointType.QUIZ_QUESTION,orderBy:"+startTime"}},this.requests.push(n)}return Object.defineProperty(e,"id",{get:function(){return"quiz-question"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"requests",{get:function(){return this._requests},set:function(e){this._requests=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"response",{get:function(){return this._response},set:function(e){var t,n=new r.KalturaCuePointListResponse(null===(t=e[0])||void 0===t?void 0:t.data,r.KalturaQuizQuestionCuePoint);n.totalCount&&(this._response.quizQuestionCuePoints=n.cuePoints)},enumerable:!1,configurable:!0}),e.prototype.isValid=function(){return!!this._entryId},e}();t.QuizQuestionLoader=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CaptionLoader=void 0;var r=n(0),i=KalturaPlayer.providers.RequestBuilder,o=function(){function e(e){this._captionAssetId="",this._requests=[],this._response={captions:[]},this._captionAssetId=e.captionAssetId;var t=new Map,n=new i(t);n.service="caption_captionasset",n.action="serveAsJson",n.params={captionAssetId:this._captionAssetId},this.requests.push(n)}return Object.defineProperty(e,"id",{get:function(){return"caption"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"requests",{get:function(){return this._requests},set:function(e){this._requests=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"response",{get:function(){return this._response},set:function(e){var t,n,i=this,o=null===(n=null===(t=e[0])||void 0===t?void 0:t.data)||void 0===n?void 0:n.objects;o&&Array.isArray(o)&&(this._response.captions=o.map((function(e,t){return new r.KalturaCaption(e,i._captionAssetId+"-"+t)})))},enumerable:!1,configurable:!0}),e.prototype.isValid=function(){return!!this._captionAssetId},e}();t.CaptionLoader=o},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__assign||function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},s=this&&this.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],s=0,a=o.length;s<a;s++,i++)r[i]=o[s];return r};Object.defineProperty(t,"__esModule",{value:!0}),t.LiveProvider=void 0;var a=n(16),u=n(1),c=n(53),h=n(5),p=n(18),f=function(e){function t(t,n,r,i){var a=e.call(this,t,n,r,i)||this;return a._thumbCuePoints=[],a._slideViewChangeCuePoints=[],a._id3Timestamp=0,a._currentTime=0,a._currentTimeLive=0,a._seekDifference=0,a._currentTimeLiveResolvePromise=function(){},a._baseThumbAssetUrl="",a._thumbUrlLoaderResolvePromise=function(){},a._thumbUrlIsLoaderActive=!1,a._thumbUrlAssetIdQueue=[],a._makeCurrentTimeLiveReadyPromise=function(){return new Promise((function(e){a._currentTimeLiveResolvePromise=e}))},a._makeThumbUrlLoaderResolvePromise=function(){return new Promise((function(e){a._thumbUrlLoaderResolvePromise=e}))},a._onTimedMetadataLoaded=function(e){var t=e.payload.cues.filter((function(e){return e.value&&"TEXT"===e.value.key}));if(t.length)try{var n=t[t.length-1],r=JSON.parse(n.value.data),i=r.timestamp,o=(r.clipId,r.setId,Math.ceil(i/1e3));if(o&&(a._id3Timestamp=o),!r.clipId||!r.setId)return;var u=r.clipId.split("-"),c=(u[0],u[1]),h=u[2],p=a._getSimuliveCuepointOffset(r.timestamp,r.setId,r.clipId,t[t.length-1].startTime);if(null===p)return;var f=s(a._player.getVideoElement().textTracks).find((function(e){return"CuePoints"===e.label})),l=null==f?void 0:f.activeCues;if(l)for(var d=0,y=l;d<y.length;d++){var g=y[d],v=a._player.getStartTimeOfDvrWindow()+p;g.startTime<v&&g.endTime>v&&(g.endTime=v)}a._simuliveClipTimestamps.has(h)||(a._simuliveClipTimestamps.add(h),a._addSimuliveCuepoints(c,p))}catch(e){a._logger.debug("Failed retrieving id3 tag metadata")}},a._onTimeUpdate=function(){var e=Math.ceil(a._player.currentTime);if(e!==a._currentTime){if(a._currentTime=e,null!==a._seekDifference&&a._currentTimeLive)a._currentTimeLive=a._currentTimeLive-a._seekDifference;else if(a._id3Timestamp){if(a._id3Timestamp===a._currentTimeLive)return void(a._id3Timestamp=null);a._currentTimeLive=a._id3Timestamp}else a._currentTimeLive++;a._id3Timestamp&&a._currentTimeLiveResolvePromise(),a._id3Timestamp=null,a._seekDifference=null}},a._handleSeeking=function(){a._seekDifference=Math.ceil(a._currentTime-a._player.currentTime)},a._handleConnection=function(){a._logger.debug("Connected to push server")},a._handleConnectionError=function(){a._logger.error("Got an error during connection to push server")},a._makeCuePointStartEndTime=function(e,t){var n=a._player.currentTime-(a._currentTimeLive-e),r=t?a._player.currentTime-(a._currentTimeLive-t):Number.MAX_SAFE_INTEGER;a._player.isDvr()||a._currentTimeLive-e>0&&(n=a._player.currentTime);return{startTime:n,endTime:r}},a._isCueInvalid=function(e){return isNaN(e.startTime)||e.startTime<0},a._prepareThumbCuePoints=function(e){var t=o(o(o({},e),a._makeCuePointStartEndTime(e.createdAt)),{assetUrl:h.makeAssetUrl(a._baseThumbAssetUrl,e.assetId)});a._isCueInvalid(t)||(a._thumbCuePoints.push(t),a._thumbCuePoints=a._fixCuePointEndTime(a._thumbCuePoints),a._addCuePointToPlayer([t]))},a._prepareViewChangeCuePoints=function(e){try{var t=JSON.parse(e.partnerData),n=o(o(o({},e),a._makeCuePointStartEndTime(e.createdAt)),{partnerData:t});if(a._isCueInvalid(n))return;a._slideViewChangeCuePoints.push(n),a._slideViewChangeCuePoints=a._fixCuePointEndTime(a._slideViewChangeCuePoints),a._addCuePointToPlayer([n])}catch(e){a._logger.error("Unnable parse slide-view change cue-point")}},a._preparePublicQnaCuePoints=function(e){var t=o(o(o({},e),{cueType:u.KalturaCuePointType.PUBLIC_QNA}),a._makeCuePointStartEndTime(e.createdAt,e.endTime));a._isCueInvalid(t)||a._addCuePointToPlayer([t])},a._prepareUserQnaCuePoints=function(e){var t=o(o({},e),{cueType:u.KalturaCuePointType.USER_QNA,startTime:0,endTime:0});a._addCuePointToPlayer([t],{useDataAggregator:!1})},a._prepareCodeQnaCuePoints=function(e){try{var t=JSON.parse(e.partnerData),n=o(o({},e),{partnerData:t});a._addCuePointToPlayer([n])}catch(e){a._logger.error("Unnable parse code qna cue-point")}},a._getBaseThumbAssetUrl=function(){if(!a._thumbUrlIsLoaderActive){a._thumbUrlIsLoaderActive=!0;var e=a._thumbUrlAssetIdQueue.shift();a._player.provider.doRequest([{loader:p.ThumbUrlLoader,params:{thumbAssetId:e}}]).then((function(e){if(a._thumbUrlIsLoaderActive=!1,e.has(p.ThumbUrlLoader.id)){a._logger.debug("baseThumbAssetUrl fetched");var t=e.get(p.ThumbUrlLoader.id);a._baseThumbAssetUrl=null==t?void 0:t.response,a._thumbUrlAssetIdQueue=[],a._thumbUrlLoaderResolvePromise()}})).catch((function(e){a._thumbUrlIsLoaderActive=!1,a._logger.warn("can't get baseThumbAssetUrl"),a._thumbUrlAssetIdQueue.length&&(a._logger.debug("try get next thumbAssetId from queue"),a._getBaseThumbAssetUrl())}))}},a._handleThumbNotificationData=function(e){var t,n,r=e.thumbs;!a._baseThumbAssetUrl&&(null===(t=r[0])||void 0===t?void 0:t.assetId)&&(a._thumbUrlAssetIdQueue.push(null===(n=r[0])||void 0===n?void 0:n.assetId),a._getBaseThumbAssetUrl()),Promise.all([a._currentTimeLivePromise,a._thumbUrlLoaderPromise]).then((function(){r.forEach((function(e){return a._prepareThumbCuePoints(e)}))}))},a._handleSlideViewChangeNotificationData=function(e){var t=e.slideViewChanges;a._currentTimeLivePromise.then((function(){t.forEach((function(e){return a._prepareViewChangeCuePoints(e)}))}))},a._handlePublicQnaNotificationsData=function(e){var t=e.messages;a._currentTimeLivePromise.then((function(){t.forEach((function(e){return a._preparePublicQnaCuePoints(e)}))}))},a._handleUserQnaNotificationsData=function(e){var t=e.messages;a._currentTimeLivePromise.then((function(){t.forEach((function(e){return a._prepareUserQnaCuePoints(e)}))}))},a._handleCodeQnaNotificationsData=function(e){var t=e.settings;a._currentTimeLivePromise.then((function(){t.forEach((function(e){return a._prepareCodeQnaCuePoints(e)}))}))},a._pushNotification=new c.PushNotificationPrivider(a._player,a._logger),a._currentTimeLivePromise=a._makeCurrentTimeLiveReadyPromise(),a._thumbUrlLoaderPromise=a._makeThumbUrlLoaderResolvePromise(),a._pushNotification.init(),a._constructPushNotificationListener(),a._pushNotification.registerToPushServer(a._player.sources.id,i,a._handleConnection,a._handleConnectionError),a._addBindings(),a._simuliveClipTimestamps=new Set,a}return i(t,e),t.prototype._addBindings=function(){var e=this;this._eventManager.listen(this._player,this._player.Event.TIMED_METADATA,(function(t){return e._onTimedMetadataLoaded(t)})),this._eventManager.listen(this._player,this._player.Event.SEEKING,this._handleSeeking),this._eventManager.listen(this._player,this._player.Event.TIME_UPDATE,this._onTimeUpdate)},t.prototype._fixCuePointEndTime=function(e){var t=this;return h.sortArrayBy(e,"createdAt").map((function(n,r){if(n.endTime===Number.MAX_SAFE_INTEGER&&r!==e.length-1){var i=o(o({},n),{endTime:e[r+1].startTime});return t._addCuePointToPlayer([i]),i}return n}))},t.prototype._handlePushNotificationsErrorData=function(e){this._logger.warn("Got an error from push notification server - ",e)},t.prototype._constructPushNotificationListener=function(){this._pushNotification.on(c.PushNotificationEventTypes.PushNotificationsError,this._handlePushNotificationsErrorData),this._types.has(u.KalturaCuePointType.SLIDE)&&this._pushNotification.on(c.PushNotificationEventTypes.ThumbNotification,this._handleThumbNotificationData),this._types.has(u.KalturaCuePointType.VIEW_CHANGE)&&this._pushNotification.on(c.PushNotificationEventTypes.SlideViewChangeNotification,this._handleSlideViewChangeNotificationData),this._types.has(u.KalturaCuePointType.PUBLIC_QNA)&&this._pushNotification.on(c.PushNotificationEventTypes.PublicNotifications,this._handlePublicQnaNotificationsData),this._types.has(u.KalturaCuePointType.USER_QNA)&&this._pushNotification.on(c.PushNotificationEventTypes.UserNotifications,this._handleUserQnaNotificationsData),this._types.has(u.KalturaCuePointType.CODE_QNA)&&this._pushNotification.on(c.PushNotificationEventTypes.CodeNotifications,this._handleCodeQnaNotificationsData)},t.prototype._removePushNotificationListener=function(){this._pushNotification.off(c.PushNotificationEventTypes.PushNotificationsError,this._handlePushNotificationsErrorData),this._types.has(u.KalturaCuePointType.SLIDE)&&this._pushNotification.off(c.PushNotificationEventTypes.ThumbNotification,this._handleThumbNotificationData),this._types.has(u.KalturaCuePointType.VIEW_CHANGE)&&this._pushNotification.off(c.PushNotificationEventTypes.SlideViewChangeNotification,this._handleSlideViewChangeNotificationData),this._types.has(u.KalturaCuePointType.PUBLIC_QNA)&&this._pushNotification.off(c.PushNotificationEventTypes.PublicNotifications,this._handlePublicQnaNotificationsData),this._types.has(u.KalturaCuePointType.USER_QNA)&&this._pushNotification.off(c.PushNotificationEventTypes.UserNotifications,this._handleUserQnaNotificationsData),this._types.has(u.KalturaCuePointType.CODE_QNA)&&this._pushNotification.off(c.PushNotificationEventTypes.CodeNotifications,this._handleCodeQnaNotificationsData)},t.prototype._getSimuliveCuepointOffset=function(e,t,n,r){var i=t.split(",").reduce((function(e,t){var n,r=t.split("="),i=r[0],s=r[1];return o(o({},e),((n={})[i]=s,n))}),{}),s=n.split("-"),a=(s[0],s[1],s[2]);if(!a||void 0===i.offset)return null;var u=+e-+i.offset-1e3*r;return this._player.getStartTimeOfDvrWindow()+(a-u)/1e3},t.prototype._addSimuliveCuepoints=function(e,t){var n=this,r=[],i="";this._types.has(u.KalturaCuePointType.SLIDE)&&(i=u.KalturaThumbCuePointSubType.SLIDE+","),i&&r.push({loader:p.ThumbLoader,params:{entryId:e,subTypesFilter:i}}),this._types.has(u.KalturaCuePointType.HOTSPOT)&&r.push({loader:p.HotspotLoader,params:{entryId:e}}),r.length&&this._player.provider.doRequest(r).then((function(e){e?(e.has(p.ThumbLoader.id)&&n._handleThumbResponse(e,{cuepointOffset:t,useDataAggregator:!1,usePendingQueManager:!0}),e.has(p.HotspotLoader.id)&&n._handleHotspotResponse(e,{cuepointOffset:t,useDataAggregator:!1,usePendingQueManager:!0})):n._logger.warn("Simulive cue points doRequest doesn't have data")}))},t.prototype.destroy=function(){this._pushNotification.reset(),this._removePushNotificationListener(),this._currentTimeLivePromise=this._makeCurrentTimeLiveReadyPromise(),this._thumbUrlLoaderPromise=this._makeThumbUrlLoaderResolvePromise()},t}(a.Provider);t.LiveProvider=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PushNotificationPrivider=t.PushNotificationEventTypes=void 0;var r,i=n(54),o=n(57),s=n(1);!function(e){e.PushNotificationsError="PUSH_NOTIFICATIONS_ERROR",e.ThumbNotification="THUMB_CUE_POINT_READY_NOTIFICATION",e.SlideViewChangeNotification="SLIDE_VIEW_CHANGE_CODE_CUE_POINT",e.PublicNotifications="PUBLIC_QNA_NOTIFICATIONS",e.UserNotifications="USER_QNA_NOTIFICATIONS",e.CodeNotifications="CODE_QNA_NOTIFICATIONS"}(r=t.PushNotificationEventTypes||(t.PushNotificationEventTypes={}));var a=function(){function e(e,t){this._player=e,this._logger=t,this._pushServerInstance=null,this._registeredToMessages=!1,this._events=new i.EventsManager,this._initialized=!1,this.on=this._events.on.bind(this._events),this.off=this._events.off.bind(this._events)}return e.prototype.init=function(){this._initialized||(this._initialized=!0,this._pushServerInstance=new o.PushNotifications(this._player,this._logger))},e.prototype.reset=function(){this._registeredToMessages=!1},e.prototype.registerToPushServer=function(e,t,n,o){var a=this;if(this._registeredToMessages)throw this._logger.error("Multiple registration error"),new Error("Already register to push server");if(this._logger.info("Registering for push notifications server"),!this._pushServerInstance)return this._logger.error("Can't register to notifications as _pushServerInstance doesn't exists"),void this._events.emit({type:r.PushNotificationsError,error:"Can't register to notifications as _pushServerInstance doesn't exists"});var u=[];if(t.has(s.KalturaCuePointType.SLIDE)&&u.push(this._createThumbRegistration(e)),t.has(s.KalturaCuePointType.VIEW_CHANGE)&&u.push(this._createSlideViewChangeRegistration(e)),t.has(s.KalturaCuePointType.PUBLIC_QNA)&&u.push(this._createPublicQnaRegistration(e)),t.has(s.KalturaCuePointType.USER_QNA)){var c=i.getQnaUserId(this._player);u.push(this._createUserQnaRegistration(e,c))}t.has(s.KalturaCuePointType.CODE_QNA)&&u.push(this._createCodeQnaRegistration(e)),this._pushServerInstance.registerNotifications({prepareRegisterRequestConfigs:u,onSocketReconnect:function(){}}).then((function(){a._logger.info("Registered push notification service"),a._registeredToMessages=!0,n()}),(function(e){a._logger.error("Registration for push notification error"),o(),a._events.emit({type:r.PushNotificationsError,error:e})}))},e.prototype._createThumbRegistration=function(e){var t=this;return this._logger.info("Register thumb notification"),{eventName:r.ThumbNotification,eventParams:{entryId:e},onMessage:function(e){t._events.emit({type:r.ThumbNotification,thumbs:e})}}},e.prototype._createSlideViewChangeRegistration=function(e){var t=this;return this._logger.info("Register slide notification"),{eventName:r.SlideViewChangeNotification,eventParams:{entryId:e},onMessage:function(e){t._events.emit({type:r.SlideViewChangeNotification,slideViewChanges:e})}}},e.prototype._createPublicQnaRegistration=function(e){var t=this;return this._logger.info("Register public qna notification"),{eventName:r.PublicNotifications,eventParams:{entryId:e},onMessage:function(e){t._events.emit({type:r.PublicNotifications,messages:e})}}},e.prototype._createUserQnaRegistration=function(e,t){var n=this;return this._logger.info("Register user qna notification"),{eventName:r.UserNotifications,eventParams:{entryId:e,userId:t},onMessage:function(e){n._events.emit({type:r.UserNotifications,messages:e})}}},e.prototype._createCodeQnaRegistration=function(e){var t=this;return this._logger.info("Register code qna notification"),{eventName:r.CodeNotifications,eventParams:{entryId:e},onMessage:function(e){t._events.emit({type:r.CodeNotifications,settings:e})}}},e}();t.PushNotificationPrivider=a},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(n(55),t),i(n(56),t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EventsManager=void 0;var r=function(){function e(){this._eventListeners={},this._wildcardEventListeners=[]}return e.prototype.on=function(e,t){"*"!==e?(this._eventListeners[e]||(this._eventListeners[e]=[])).push(t):this._wildcardEventListeners.push(t)},e.prototype.off=function(e,t){if("*"!==e){var n=this._eventListeners[e];n&&n.splice(n.indexOf(t)>>>0,1)}else this._wildcardEventListeners.splice(this._wildcardEventListeners.indexOf(t)>>>0,1)},e.prototype.emit=function(e){(this._eventListeners[e.type]||[]).slice().map((function(t){t(e)})),this._wildcardEventListeners.slice().map((function(t){t(e)}))},e}();t.EventsManager=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.debounce=t.getQnaUserId=t.getUserId=t.generateId=void 0;t.generateId=function(){return(new Date).getTime().toString(36)+Math.random().toString(36).slice(2)};function r(){return"undefined"==typeof Storage?i():((e=localStorage.getItem("anonymousUserId"))||(e=i(),localStorage.setItem("anonymousUserId",e)),e);var e}t.getUserId=r;function i(){return"##".concat("Guest").concat("HashSeparator").concat(function(){for(var e=(0,t.generateId)(),n="",r=0;r<e.length;r++){var i=e.charAt(r);n+=Number.isNaN(+i)?i.charCodeAt(0):i}return n}(),"##")}t.getQnaUserId=function(e){var t,n,i,o,s=e,a=s.config,u=s.plugins,c=(null==a?void 0:a.session)||{},h=(null===(n=null===(t=null==u?void 0:u.qna)||void 0===t?void 0:t.config)||void 0===n?void 0:n.userRole)||c.userRole;return h&&"anonymousRole"!==h?(null===(o=null===(i=null==u?void 0:u.qna)||void 0===i?void 0:i.config)||void 0===o?void 0:o.userId)||c.userId:r()},t.debounce=function(e,t,n){var r;return void 0===t&&(t=50),void 0===n&&(n={isImmediate:!1}),function(){for(var i=this,o=[],s=0;s<arguments.length;s++)o[s]=arguments[s];var a=function(){r=void 0,n.isImmediate||e.apply(i,o)},u=n.isImmediate&&void 0===r;void 0!==r&&clearTimeout(r),r=setTimeout(a,t),u&&e.apply(this,o)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PushNotifications=t.isAPIErrorResponse=t.isAPINotificationResponse=void 0;var r=n(58),i=n(59),o=n(5);function s(e){return"KalturaPushNotificationData"===e.objectType}function a(e){return"KalturaAPIException"===e.objectType}t.isAPINotificationResponse=s,t.isAPIErrorResponse=a;var u=function(){function e(e,t){this._socketPool={},this._player=e,this._logger=t,this._onPlayerReset()}return e.prototype._onPlayerReset=function(){var e=this;this._player.addEventListener(this._player.Event.PLAYER_RESET,(function(){e.reset()}))},e.prototype.reset=function(){for(var e in this._socketPool)this._socketPool[e].destroy();this._socketPool={}},e.prototype.registerNotifications=function(e){var t=this,n=e.prepareRegisterRequestConfigs.map((function(e){return t._prepareRegisterRequest(e)}));return this._player.provider.doRequest([{loader:r.PushNotificationLoader,params:n}]).then((function(n){var i;if(n&&n.has(r.PushNotificationLoader.id)){var o=(null===(i=n.get(r.PushNotificationLoader.id))||void 0===i?void 0:i.response).map((function(n,r){return t._processResult(e.prepareRegisterRequestConfigs[r],n,e.onSocketDisconnect,e.onSocketReconnect)}));return Promise.all(o).then((function(){}))}})).catch((function(e){t._logger.warn("Error: failed to multirequest of register requests - ",e)}))},e.prototype._prepareRegisterRequest=function(e){var t={service:"eventnotification_eventnotificationtemplate",action:"register",notificationTemplateSystemName:e.eventName,pushNotificationParams:{objectType:"KalturaPushNotificationParams",userParams:{}}},n=0;for(var r in e.eventParams)t.pushNotificationParams.userParams["item"+n]={objectType:"KalturaPushNotificationParams",key:r,value:{objectType:"KalturaStringValue",value:e.eventParams[r]},sQueueKeyParam:1},n++;return t},e.prototype._processResult=function(e,t,n,r){if(a(t))return this._logger.error("Error fetching registration info from service "+e.eventName),Promise.reject(new Error(t.message));if(!s(t))return Promise.reject(new Error("invalid response structure"));var u=o.getDomainFromUrl(t.url),c=this._socketPool[u];return c||(c=new i.SocketWrapper({key:u,url:t.url,onSocketDisconnect:n,onSocketReconnect:r},this._logger),this._socketPool[u]=c),c.prepareForListening(e.eventName,t.queueName,t.queueKey,e.onMessage),Promise.resolve()},e}();t.PushNotifications=u},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},i=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.PushNotificationLoader=void 0;var o=KalturaPlayer.providers.RequestBuilder,s=function(){function e(e){var t=this;this._apiRequests=e,this._requests=[],this._response={};var n=new Map;e.forEach((function(e){var s=new o(n),a=e.action,u=e.service,c=i(e,["action","service"]);s.action=a,s.service=u,s.params=r({},c),t.requests.push(s)}))}return Object.defineProperty(e,"id",{get:function(){return"push-notification"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"requests",{get:function(){return this._requests},set:function(e){this._requests=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"response",{get:function(){return this._response},set:function(e){this._response=e.map((function(e){return e.data}))},enumerable:!1,configurable:!0}),e.prototype.isValid=function(){return this._apiRequests.length>0},e}();t.PushNotificationLoader=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SocketWrapper=void 0;var r=n(60),i=n(5),o=function(){function e(e,t){this._logger=t,this._listenKeys={},this._messageKeyToQueueKeyMap={},this._connected=!1,this._logger.info("Connecting to socket"),this._connectAndListenToSocket(e)}return e.prototype.destroy=function(){this._socket&&(this._socket.disconnect(),this._socket=null),this._listenKeys={},this._messageKeyToQueueKeyMap={},this._connected=!1},e.prototype._connectAndListenToSocket=function(t){var n=this;this._logger.info("connect to socket"),this._socket=r(t.url,{forceNew:!0,timeout:e.CONNECTION_TIMEOUT}),this._socket.on("validated",(function(){for(var e in n._connected=!0,n._listenKeys)n._logger.info("Emit listen to url"),n._socket.emit("listen",n._listenKeys[e].queueNameHash,n._listenKeys[e].queueKeyHash)})),this._socket.on("connected",(function(e,t){n._listenKeys[t]?(n._messageKeyToQueueKeyMap[e]=t,n._logger.info("Listening to queue")):n._logger.error("Cannot listen to queue, queueKeyHash not recognized")})),this._socket.on("message",(function(e,t){n._logger.debug("Cannot listen to queue, queueKeyHash not recognized"),n._messageKeyToQueueKeyMap[e]&&n._listenKeys[n._messageKeyToQueueKeyMap[e]]?n._listenKeys[n._messageKeyToQueueKeyMap[e]].onMessage.forEach((function(e){e(t)})):n._logger.error("couldn't find queueKey in map")})),this._socket.on("disconnect",(function(e){if(n._logger.info("push server was disconnected"),!i.isEmptyObject(n._listenKeys)){var r=t.onSocketDisconnect;r&&r(e)}})),this._socket.on("reconnect",(function(e){if(n._logger.info("push server was reconnected"),!i.isEmptyObject(n._listenKeys)){var r=t.onSocketReconnect;r&&r(e)}})),this._socket.on("reconnect_error",(function(e){n._logger.error("reconnection error")})),this._socket.on("errorMsg",(function(e){n._logger.error("error message recieved")}))},e.prototype.prepareForListening=function(e,t,n,r){this._listenKeys[n]?this._listenKeys[n].onMessage.push(r):this._listenKeys[n]={eventName:e,queueNameHash:t,queueKeyHash:n,onMessage:[r]},this._connected&&(this._logger.info("Listening to "+e),this._socket.emit("listen",t,n))},e.CONNECTION_TIMEOUT=6e5,e}();t.SocketWrapper=o},function(e,t,n){var r=n(61),i=n(11),o=n(24),s=n(6)("socket.io-client");e.exports=t=u;var a=t.managers={};function u(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var n,i=r(e),u=i.source,c=i.id,h=i.path,p=a[c]&&h in a[c].nsps;return t.forceNew||t["force new connection"]||!1===t.multiplex||p?(s("ignoring socket cache for %s",u),n=o(u,t)):(a[c]||(s("new io instance for %s",u),a[c]=o(u,t)),n=a[c]),i.query&&!t.query&&(t.query=i.query),n.socket(i.path,t)}t.protocol=i.protocol,t.connect=u,t.Manager=n(24),t.Socket=n(30)},function(e,t,n){var r=n(21),i=n(6)("socket.io-client:url");e.exports=function(e,t){var n=e;t=t||"undefined"!=typeof location&&location,null==e&&(e=t.protocol+"//"+t.host);"string"==typeof e&&("/"===e.charAt(0)&&(e="/"===e.charAt(1)?t.protocol+e:t.host+e),/^(https?|wss?):\/\//.test(e)||(i("protocol-less url %s",e),e=void 0!==t?t.protocol+"//"+e:"https://"+e),i("parse %s",e),n=r(e));n.port||(/^(http|ws)$/.test(n.protocol)?n.port="80":/^(http|ws)s$/.test(n.protocol)&&(n.port="443"));n.path=n.path||"/";var o=-1!==n.host.indexOf(":")?"["+n.host+"]":n.host;return n.id=n.protocol+"://"+o+":"+n.port,n.href=n.protocol+"://"+o+(t&&t.port===n.port?"":":"+n.port),n}},function(e,t,n){function r(e){var n;function r(){if(r.enabled){var e=r,i=+new Date,o=i-(n||i);e.diff=o,e.prev=n,e.curr=i,n=i;for(var s=new Array(arguments.length),a=0;a<s.length;a++)s[a]=arguments[a];s[0]=t.coerce(s[0]),"string"!=typeof s[0]&&s.unshift("%O");var u=0;s[0]=s[0].replace(/%([a-zA-Z%])/g,(function(n,r){if("%%"===n)return n;u++;var i=t.formatters[r];if("function"==typeof i){var o=s[u];n=i.call(e,o),s.splice(u,1),u--}return n})),t.formatArgs.call(e,s);var c=r.log||t.log||console.log.bind(console);c.apply(e,s)}}return r.namespace=e,r.enabled=t.enabled(e),r.useColors=t.useColors(),r.color=function(e){var n,r=0;for(n in e)r=(r<<5)-r+e.charCodeAt(n),r|=0;return t.colors[Math.abs(r)%t.colors.length]}(e),r.destroy=i,"function"==typeof t.init&&t.init(r),t.instances.push(r),r}function i(){var e=t.instances.indexOf(this);return-1!==e&&(t.instances.splice(e,1),!0)}(t=e.exports=r.debug=r.default=r).coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){t.enable("")},t.enable=function(e){var n;t.save(e),t.names=[],t.skips=[];var r=("string"==typeof e?e:"").split(/[\s,]+/),i=r.length;for(n=0;n<i;n++)r[n]&&("-"===(e=r[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")));for(n=0;n<t.instances.length;n++){var o=t.instances[n];o.enabled=t.enabled(o.namespace)}},t.enabled=function(e){if("*"===e[e.length-1])return!0;var n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=n(63),t.instances=[],t.names=[],t.skips=[],t.formatters={}},function(e,t){var n=1e3,r=6e4,i=60*r,o=24*i;function s(e,t,n){if(!(e<t))return e<1.5*t?Math.floor(e/t)+" "+n:Math.ceil(e/t)+" "+n+"s"}e.exports=function(e,t){t=t||{};var a,u=typeof e;if("string"===u&&e.length>0)return function(e){if((e=String(e)).length>100)return;var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(!t)return;var s=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*s;case"days":case"day":case"d":return s*o;case"hours":case"hour":case"hrs":case"hr":case"h":return s*i;case"minutes":case"minute":case"mins":case"min":case"m":return s*r;case"seconds":case"second":case"secs":case"sec":case"s":return s*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}(e);if("number"===u&&!1===isNaN(e))return t.long?s(a=e,o,"day")||s(a,i,"hour")||s(a,r,"minute")||s(a,n,"second")||a+" ms":function(e){if(e>=o)return Math.round(e/o)+"d";if(e>=i)return Math.round(e/i)+"h";if(e>=r)return Math.round(e/r)+"m";if(e>=n)return Math.round(e/n)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},function(e,t,n){(function(r){function i(){var e;try{e=t.storage.debug}catch(e){}return!e&&void 0!==r&&"env"in r&&(e=r.env.DEBUG),e}(t=e.exports=n(65)).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},t.formatArgs=function(e){var n=this.useColors;if(e[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+e[0]+(n?"%c ":" ")+"+"+t.humanize(this.diff),!n)return;var r="color: "+this.color;e.splice(1,0,r,"color: inherit");var i=0,o=0;e[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(i++,"%c"===e&&(o=i))})),e.splice(o,0,r)},t.save=function(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(e){}},t.load=i,t.useColors=function(){if("undefined"!=typeof window&&window.process&&"renderer"===window.process.type)return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},t.enable(i())}).call(this,n(10))},function(e,t,n){function r(e){var n;function r(){if(r.enabled){var e=r,i=+new Date,o=i-(n||i);e.diff=o,e.prev=n,e.curr=i,n=i;for(var s=new Array(arguments.length),a=0;a<s.length;a++)s[a]=arguments[a];s[0]=t.coerce(s[0]),"string"!=typeof s[0]&&s.unshift("%O");var u=0;s[0]=s[0].replace(/%([a-zA-Z%])/g,(function(n,r){if("%%"===n)return n;u++;var i=t.formatters[r];if("function"==typeof i){var o=s[u];n=i.call(e,o),s.splice(u,1),u--}return n})),t.formatArgs.call(e,s);var c=r.log||t.log||console.log.bind(console);c.apply(e,s)}}return r.namespace=e,r.enabled=t.enabled(e),r.useColors=t.useColors(),r.color=function(e){var n,r=0;for(n in e)r=(r<<5)-r+e.charCodeAt(n),r|=0;return t.colors[Math.abs(r)%t.colors.length]}(e),r.destroy=i,"function"==typeof t.init&&t.init(r),t.instances.push(r),r}function i(){var e=t.instances.indexOf(this);return-1!==e&&(t.instances.splice(e,1),!0)}(t=e.exports=r.debug=r.default=r).coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){t.enable("")},t.enable=function(e){var n;t.save(e),t.names=[],t.skips=[];var r=("string"==typeof e?e:"").split(/[\s,]+/),i=r.length;for(n=0;n<i;n++)r[n]&&("-"===(e=r[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")));for(n=0;n<t.instances.length;n++){var o=t.instances[n];o.enabled=t.enabled(o.namespace)}},t.enabled=function(e){if("*"===e[e.length-1])return!0;var n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=n(66),t.instances=[],t.names=[],t.skips=[],t.formatters={}},function(e,t){var n=1e3,r=6e4,i=60*r,o=24*i;function s(e,t,n){if(!(e<t))return e<1.5*t?Math.floor(e/t)+" "+n:Math.ceil(e/t)+" "+n+"s"}e.exports=function(e,t){t=t||{};var a,u=typeof e;if("string"===u&&e.length>0)return function(e){if((e=String(e)).length>100)return;var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(!t)return;var s=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*s;case"days":case"day":case"d":return s*o;case"hours":case"hour":case"hrs":case"hr":case"h":return s*i;case"minutes":case"minute":case"mins":case"min":case"m":return s*r;case"seconds":case"second":case"secs":case"sec":case"s":return s*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}(e);if("number"===u&&!1===isNaN(e))return t.long?s(a=e,o,"day")||s(a,i,"hour")||s(a,r,"minute")||s(a,n,"second")||a+" ms":function(e){if(e>=o)return Math.round(e/o)+"d";if(e>=i)return Math.round(e/i)+"h";if(e>=r)return Math.round(e/r)+"m";if(e>=n)return Math.round(e/n)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},function(e,t,n){var r=n(22),i=n(23),o=Object.prototype.toString,s="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===o.call(Blob),a="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===o.call(File);t.deconstructPacket=function(e){var t=[],n=e.data,o=e;return o.data=function e(t,n){if(!t)return t;if(i(t)){var o={_placeholder:!0,num:n.length};return n.push(t),o}if(r(t)){for(var s=new Array(t.length),a=0;a<t.length;a++)s[a]=e(t[a],n);return s}if("object"==typeof t&&!(t instanceof Date)){s={};for(var u in t)s[u]=e(t[u],n);return s}return t}(n,t),o.attachments=t.length,{packet:o,buffers:t}},t.reconstructPacket=function(e,t){return e.data=function e(t,n){if(!t)return t;if(t&&t._placeholder)return n[t.num];if(r(t))for(var i=0;i<t.length;i++)t[i]=e(t[i],n);else if("object"==typeof t)for(var o in t)t[o]=e(t[o],n);return t}(e.data,t),e.attachments=void 0,e},t.removeBlobs=function(e,t){var n=0,o=e;!function e(u,c,h){if(!u)return u;if(s&&u instanceof Blob||a&&u instanceof File){n++;var p=new FileReader;p.onload=function(){h?h[c]=this.result:o=this.result,--n||t(o)},p.readAsArrayBuffer(u)}else if(r(u))for(var f=0;f<u.length;f++)e(u[f],f,u);else if("object"==typeof u&&!i(u))for(var l in u)e(u[l],l,u)}(o),n||t(o)}},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";t.byteLength=function(e){var t=c(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,r=c(e),s=r[0],a=r[1],u=new o(function(e,t,n){return 3*(t+n)/4-n}(0,s,a)),h=0,p=a>0?s-4:s;for(n=0;n<p;n+=4)t=i[e.charCodeAt(n)]<<18|i[e.charCodeAt(n+1)]<<12|i[e.charCodeAt(n+2)]<<6|i[e.charCodeAt(n+3)],u[h++]=t>>16&255,u[h++]=t>>8&255,u[h++]=255&t;2===a&&(t=i[e.charCodeAt(n)]<<2|i[e.charCodeAt(n+1)]>>4,u[h++]=255&t);1===a&&(t=i[e.charCodeAt(n)]<<10|i[e.charCodeAt(n+1)]<<4|i[e.charCodeAt(n+2)]>>2,u[h++]=t>>8&255,u[h++]=255&t);return u},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],s=0,a=n-i;s<a;s+=16383)o.push(h(e,s,s+16383>a?a:s+16383));1===i?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return o.join("")};for(var r=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,u=s.length;a<u;++a)r[a]=s[a],i[s.charCodeAt(a)]=a;function c(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function h(e,t,n){for(var i,o,s=[],a=t;a<n;a+=3)i=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),s.push(r[(o=i)>>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return s.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(e,t){
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
t.read=function(e,t,n,r,i){var o,s,a=8*i-r-1,u=(1<<a)-1,c=u>>1,h=-7,p=n?i-1:0,f=n?-1:1,l=e[t+p];for(p+=f,o=l&(1<<-h)-1,l>>=-h,h+=a;h>0;o=256*o+e[t+p],p+=f,h-=8);for(s=o&(1<<-h)-1,o>>=-h,h+=r;h>0;s=256*s+e[t+p],p+=f,h-=8);if(0===o)o=1-c;else{if(o===u)return s?NaN:1/0*(l?-1:1);s+=Math.pow(2,r),o-=c}return(l?-1:1)*s*Math.pow(2,o-r)},t.write=function(e,t,n,r,i,o){var s,a,u,c=8*o-i-1,h=(1<<c)-1,p=h>>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,l=r?0:o-1,d=r?1:-1,y=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=h):(s=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-s))<1&&(s--,u*=2),(t+=s+p>=1?f/u:f*Math.pow(2,1-p))*u>=2&&(s++,u/=2),s+p>=h?(a=0,s=h):s+p>=1?(a=(t*u-1)*Math.pow(2,i),s+=p):(a=t*Math.pow(2,p-1)*Math.pow(2,i),s=0));i>=8;e[n+l]=255&a,l+=d,a/=256,i-=8);for(s=s<<i|a,c+=i;c>0;e[n+l]=255&s,l+=d,s/=256,c-=8);e[n+l-d]|=128*y}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){e.exports=n(73),e.exports.parser=n(4)},function(e,t,n){var r=n(25),i=n(3),o=n(9)("engine.io-client:socket"),s=n(29),a=n(4),u=n(21),c=n(7);function h(e,t){if(!(this instanceof h))return new h(e,t);t=t||{},e&&"object"==typeof e&&(t=e,e=null),e?(e=u(e),t.hostname=e.host,t.secure="https"===e.protocol||"wss"===e.protocol,t.port=e.port,e.query&&(t.query=e.query)):t.host&&(t.hostname=u(t.host).host),this.secure=null!=t.secure?t.secure:"undefined"!=typeof location&&"https:"===location.protocol,t.hostname&&!t.port&&(t.port=this.secure?"443":"80"),this.agent=t.agent||!1,this.hostname=t.hostname||("undefined"!=typeof location?location.hostname:"localhost"),this.port=t.port||("undefined"!=typeof location&&location.port?location.port:this.secure?443:80),this.query=t.query||{},"string"==typeof this.query&&(this.query=c.decode(this.query)),this.upgrade=!1!==t.upgrade,this.path=(t.path||"/engine.io").replace(/\/$/,"")+"/",this.forceJSONP=!!t.forceJSONP,this.jsonp=!1!==t.jsonp,this.forceBase64=!!t.forceBase64,this.enablesXDR=!!t.enablesXDR,this.withCredentials=!1!==t.withCredentials,this.timestampParam=t.timestampParam||"t",this.timestampRequests=t.timestampRequests,this.transports=t.transports||["polling","websocket"],this.transportOptions=t.transportOptions||{},this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.policyPort=t.policyPort||843,this.rememberUpgrade=t.rememberUpgrade||!1,this.binaryType=null,this.onlyBinaryUpgrades=t.onlyBinaryUpgrades,this.perMessageDeflate=!1!==t.perMessageDeflate&&(t.perMessageDeflate||{}),!0===this.perMessageDeflate&&(this.perMessageDeflate={}),this.perMessageDeflate&&null==this.perMessageDeflate.threshold&&(this.perMessageDeflate.threshold=1024),this.pfx=t.pfx||null,this.key=t.key||null,this.passphrase=t.passphrase||null,this.cert=t.cert||null,this.ca=t.ca||null,this.ciphers=t.ciphers||null,this.rejectUnauthorized=void 0===t.rejectUnauthorized||t.rejectUnauthorized,this.forceNode=!!t.forceNode,this.isReactNative="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase(),("undefined"==typeof self||this.isReactNative)&&(t.extraHeaders&&Object.keys(t.extraHeaders).length>0&&(this.extraHeaders=t.extraHeaders),t.localAddress&&(this.localAddress=t.localAddress)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingIntervalTimer=null,this.pingTimeoutTimer=null,this.open()}e.exports=h,h.priorWebsocketSuccess=!1,i(h.prototype),h.protocol=a.protocol,h.Socket=h,h.Transport=n(15),h.transports=n(25),h.parser=n(4),h.prototype.createTransport=function(e){o('creating transport "%s"',e);var t=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}(this.query);t.EIO=a.protocol,t.transport=e;var n=this.transportOptions[e]||{};return this.id&&(t.sid=this.id),new r[e]({query:t,socket:this,agent:n.agent||this.agent,hostname:n.hostname||this.hostname,port:n.port||this.port,secure:n.secure||this.secure,path:n.path||this.path,forceJSONP:n.forceJSONP||this.forceJSONP,jsonp:n.jsonp||this.jsonp,forceBase64:n.forceBase64||this.forceBase64,enablesXDR:n.enablesXDR||this.enablesXDR,withCredentials:n.withCredentials||this.withCredentials,timestampRequests:n.timestampRequests||this.timestampRequests,timestampParam:n.timestampParam||this.timestampParam,policyPort:n.policyPort||this.policyPort,pfx:n.pfx||this.pfx,key:n.key||this.key,passphrase:n.passphrase||this.passphrase,cert:n.cert||this.cert,ca:n.ca||this.ca,ciphers:n.ciphers||this.ciphers,rejectUnauthorized:n.rejectUnauthorized||this.rejectUnauthorized,perMessageDeflate:n.perMessageDeflate||this.perMessageDeflate,extraHeaders:n.extraHeaders||this.extraHeaders,forceNode:n.forceNode||this.forceNode,localAddress:n.localAddress||this.localAddress,requestTimeout:n.requestTimeout||this.requestTimeout,protocols:n.protocols||void 0,isReactNative:this.isReactNative})},h.prototype.open=function(){var e;if(this.rememberUpgrade&&h.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket"))e="websocket";else{if(0===this.transports.length){var t=this;return void setTimeout((function(){t.emit("error","No transports available")}),0)}e=this.transports[0]}this.readyState="opening";try{e=this.createTransport(e)}catch(e){return this.transports.shift(),void this.open()}e.open(),this.setTransport(e)},h.prototype.setTransport=function(e){o("setting transport %s",e.name);var t=this;this.transport&&(o("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=e,e.on("drain",(function(){t.onDrain()})).on("packet",(function(e){t.onPacket(e)})).on("error",(function(e){t.onError(e)})).on("close",(function(){t.onClose("transport close")}))},h.prototype.probe=function(e){o('probing transport "%s"',e);var t=this.createTransport(e,{probe:1}),n=!1,r=this;function i(){if(r.onlyBinaryUpgrades){var i=!this.supportsBinary&&r.transport.supportsBinary;n=n||i}n||(o('probe transport "%s" opened',e),t.send([{type:"ping",data:"probe"}]),t.once("packet",(function(i){if(!n)if("pong"===i.type&&"probe"===i.data){if(o('probe transport "%s" pong',e),r.upgrading=!0,r.emit("upgrading",t),!t)return;h.priorWebsocketSuccess="websocket"===t.name,o('pausing current transport "%s"',r.transport.name),r.transport.pause((function(){n||"closed"!==r.readyState&&(o("changing transport and sending upgrade packet"),f(),r.setTransport(t),t.send([{type:"upgrade"}]),r.emit("upgrade",t),t=null,r.upgrading=!1,r.flush())}))}else{o('probe transport "%s" failed',e);var s=new Error("probe error");s.transport=t.name,r.emit("upgradeError",s)}})))}function s(){n||(n=!0,f(),t.close(),t=null)}function a(n){var i=new Error("probe error: "+n);i.transport=t.name,s(),o('probe transport "%s" failed because of error: %s',e,n),r.emit("upgradeError",i)}function u(){a("transport closed")}function c(){a("socket closed")}function p(e){t&&e.name!==t.name&&(o('"%s" works - aborting "%s"',e.name,t.name),s())}function f(){t.removeListener("open",i),t.removeListener("error",a),t.removeListener("close",u),r.removeListener("close",c),r.removeListener("upgrading",p)}h.priorWebsocketSuccess=!1,t.once("open",i),t.once("error",a),t.once("close",u),this.once("close",c),this.once("upgrading",p),t.open()},h.prototype.onOpen=function(){if(o("socket open"),this.readyState="open",h.priorWebsocketSuccess="websocket"===this.transport.name,this.emit("open"),this.flush(),"open"===this.readyState&&this.upgrade&&this.transport.pause){o("starting upgrade probes");for(var e=0,t=this.upgrades.length;e<t;e++)this.probe(this.upgrades[e])}},h.prototype.onPacket=function(e){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(o('socket receive: type "%s", data "%s"',e.type,e.data),this.emit("packet",e),this.emit("heartbeat"),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"pong":this.setPing(),this.emit("pong");break;case"error":var t=new Error("server error");t.code=e.data,this.onError(t);break;case"message":this.emit("data",e.data),this.emit("message",e.data)}else o('packet received with socket readyState "%s"',this.readyState)},h.prototype.onHandshake=function(e){this.emit("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this.upgrades=this.filterUpgrades(e.upgrades),this.pingInterval=e.pingInterval,this.pingTimeout=e.pingTimeout,this.onOpen(),"closed"!==this.readyState&&(this.setPing(),this.removeListener("heartbeat",this.onHeartbeat),this.on("heartbeat",this.onHeartbeat))},h.prototype.onHeartbeat=function(e){clearTimeout(this.pingTimeoutTimer);var t=this;t.pingTimeoutTimer=setTimeout((function(){"closed"!==t.readyState&&t.onClose("ping timeout")}),e||t.pingInterval+t.pingTimeout)},h.prototype.setPing=function(){var e=this;clearTimeout(e.pingIntervalTimer),e.pingIntervalTimer=setTimeout((function(){o("writing ping packet - expecting pong within %sms",e.pingTimeout),e.ping(),e.onHeartbeat(e.pingTimeout)}),e.pingInterval)},h.prototype.ping=function(){var e=this;this.sendPacket("ping",(function(){e.emit("ping")}))},h.prototype.onDrain=function(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,0===this.writeBuffer.length?this.emit("drain"):this.flush()},h.prototype.flush=function(){"closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length&&(o("flushing %d packets in socket",this.writeBuffer.length),this.transport.send(this.writeBuffer),this.prevBufferLen=this.writeBuffer.length,this.emit("flush"))},h.prototype.write=h.prototype.send=function(e,t,n){return this.sendPacket("message",e,t,n),this},h.prototype.sendPacket=function(e,t,n,r){if("function"==typeof t&&(r=t,t=void 0),"function"==typeof n&&(r=n,n=null),"closing"!==this.readyState&&"closed"!==this.readyState){(n=n||{}).compress=!1!==n.compress;var i={type:e,data:t,options:n};this.emit("packetCreate",i),this.writeBuffer.push(i),r&&this.once("flush",r),this.flush()}},h.prototype.close=function(){if("opening"===this.readyState||"open"===this.readyState){this.readyState="closing";var e=this;this.writeBuffer.length?this.once("drain",(function(){this.upgrading?r():t()})):this.upgrading?r():t()}function t(){e.onClose("forced close"),o("socket closing - telling transport to close"),e.transport.close()}function n(){e.removeListener("upgrade",n),e.removeListener("upgradeError",n),t()}function r(){e.once("upgrade",n),e.once("upgradeError",n)}return this},h.prototype.onError=function(e){o("socket error %j",e),h.priorWebsocketSuccess=!1,this.emit("error",e),this.onClose("transport error",e)},h.prototype.onClose=function(e,t){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState){o('socket close with reason: "%s"',e);clearTimeout(this.pingIntervalTimer),clearTimeout(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),this.readyState="closed",this.id=null,this.emit("close",e,t),this.writeBuffer=[],this.prevBufferLen=0}},h.prototype.filterUpgrades=function(e){for(var t=[],n=0,r=e.length;n<r;n++)~s(this.transports,e[n])&&t.push(e[n]);return t}},function(e,t){try{e.exports="undefined"!=typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(t){e.exports=!1}},function(e,t,n){var r=n(13),i=n(26),o=n(3),s=n(8),a=n(9)("engine.io-client:polling-xhr"),u=n(14);function c(){}function h(e){if(i.call(this,e),this.requestTimeout=e.requestTimeout,this.extraHeaders=e.extraHeaders,"undefined"!=typeof location){var t="https:"===location.protocol,n=location.port;n||(n=t?443:80),this.xd="undefined"!=typeof location&&e.hostname!==location.hostname||n!==e.port,this.xs=e.secure!==t}}function p(e){this.method=e.method||"GET",this.uri=e.uri,this.xd=!!e.xd,this.xs=!!e.xs,this.async=!1!==e.async,this.data=void 0!==e.data?e.data:null,this.agent=e.agent,this.isBinary=e.isBinary,this.supportsBinary=e.supportsBinary,this.enablesXDR=e.enablesXDR,this.withCredentials=e.withCredentials,this.requestTimeout=e.requestTimeout,this.pfx=e.pfx,this.key=e.key,this.passphrase=e.passphrase,this.cert=e.cert,this.ca=e.ca,this.ciphers=e.ciphers,this.rejectUnauthorized=e.rejectUnauthorized,this.extraHeaders=e.extraHeaders,this.create()}if(e.exports=h,e.exports.Request=p,s(h,i),h.prototype.supportsBinary=!0,h.prototype.request=function(e){return(e=e||{}).uri=this.uri(),e.xd=this.xd,e.xs=this.xs,e.agent=this.agent||!1,e.supportsBinary=this.supportsBinary,e.enablesXDR=this.enablesXDR,e.withCredentials=this.withCredentials,e.pfx=this.pfx,e.key=this.key,e.passphrase=this.passphrase,e.cert=this.cert,e.ca=this.ca,e.ciphers=this.ciphers,e.rejectUnauthorized=this.rejectUnauthorized,e.requestTimeout=this.requestTimeout,e.extraHeaders=this.extraHeaders,new p(e)},h.prototype.doWrite=function(e,t){var n="string"!=typeof e&&void 0!==e,r=this.request({method:"POST",data:e,isBinary:n}),i=this;r.on("success",t),r.on("error",(function(e){i.onError("xhr post error",e)})),this.sendXhr=r},h.prototype.doPoll=function(){a("xhr poll");var e=this.request(),t=this;e.on("data",(function(e){t.onData(e)})),e.on("error",(function(e){t.onError("xhr poll error",e)})),this.pollXhr=e},o(p.prototype),p.prototype.create=function(){var e={agent:this.agent,xdomain:this.xd,xscheme:this.xs,enablesXDR:this.enablesXDR};e.pfx=this.pfx,e.key=this.key,e.passphrase=this.passphrase,e.cert=this.cert,e.ca=this.ca,e.ciphers=this.ciphers,e.rejectUnauthorized=this.rejectUnauthorized;var t=this.xhr=new r(e),n=this;try{a("xhr open %s: %s",this.method,this.uri),t.open(this.method,this.uri,this.async);try{if(this.extraHeaders)for(var i in t.setDisableHeaderCheck&&t.setDisableHeaderCheck(!0),this.extraHeaders)this.extraHeaders.hasOwnProperty(i)&&t.setRequestHeader(i,this.extraHeaders[i])}catch(e){}if("POST"===this.method)try{this.isBinary?t.setRequestHeader("Content-type","application/octet-stream"):t.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(e){}try{t.setRequestHeader("Accept","*/*")}catch(e){}"withCredentials"in t&&(t.withCredentials=this.withCredentials),this.requestTimeout&&(t.timeout=this.requestTimeout),this.hasXDR()?(t.onload=function(){n.onLoad()},t.onerror=function(){n.onError(t.responseText)}):t.onreadystatechange=function(){if(2===t.readyState)try{var e=t.getResponseHeader("Content-Type");(n.supportsBinary&&"application/octet-stream"===e||"application/octet-stream; charset=UTF-8"===e)&&(t.responseType="arraybuffer")}catch(e){}4===t.readyState&&(200===t.status||1223===t.status?n.onLoad():setTimeout((function(){n.onError("number"==typeof t.status?t.status:0)}),0))},a("xhr data %s",this.data),t.send(this.data)}catch(e){return void setTimeout((function(){n.onError(e)}),0)}"undefined"!=typeof document&&(this.index=p.requestsCount++,p.requests[this.index]=this)},p.prototype.onSuccess=function(){this.emit("success"),this.cleanup()},p.prototype.onData=function(e){this.emit("data",e),this.onSuccess()},p.prototype.onError=function(e){this.emit("error",e),this.cleanup(!0)},p.prototype.cleanup=function(e){if(void 0!==this.xhr&&null!==this.xhr){if(this.hasXDR()?this.xhr.onload=this.xhr.onerror=c:this.xhr.onreadystatechange=c,e)try{this.xhr.abort()}catch(e){}"undefined"!=typeof document&&delete p.requests[this.index],this.xhr=null}},p.prototype.onLoad=function(){var e;try{var t;try{t=this.xhr.getResponseHeader("Content-Type")}catch(e){}e=("application/octet-stream"===t||"application/octet-stream; charset=UTF-8"===t)&&this.xhr.response||this.xhr.responseText}catch(e){this.onError(e)}null!=e&&this.onData(e)},p.prototype.hasXDR=function(){return"undefined"!=typeof XDomainRequest&&!this.xs&&this.enablesXDR},p.prototype.abort=function(){this.cleanup()},p.requestsCount=0,p.requests={},"undefined"!=typeof document)if("function"==typeof attachEvent)attachEvent("onunload",f);else if("function"==typeof addEventListener){addEventListener("onpagehide"in u?"pagehide":"unload",f,!1)}function f(){for(var e in p.requests)p.requests.hasOwnProperty(e)&&p.requests[e].abort()}},function(e,t){e.exports=Object.keys||function(e){var t=[],n=Object.prototype.hasOwnProperty;for(var r in e)n.call(e,r)&&t.push(r);return t}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t){e.exports=function(e,t,n){var r=e.byteLength;if(t=t||0,n=n||r,e.slice)return e.slice(t,n);if(t<0&&(t+=r),n<0&&(n+=r),n>r&&(n=r),t>=r||t>=n||0===r)return new ArrayBuffer(0);for(var i=new Uint8Array(e),o=new Uint8Array(n-t),s=t,a=0;s<n;s++,a++)o[a]=i[s];return o.buffer}},function(e,t){function n(){}e.exports=function(e,t,r){var i=!1;return r=r||n,o.count=e,0===e?t():o;function o(e,n){if(o.count<=0)throw new Error("after called too many times");--o.count,e?(i=!0,t(e),t=r):0!==o.count||i||t(null,n)}}},function(e,t){
/*! https://mths.be/utf8js v2.1.2 by @mathias */
var n,r,i,o=String.fromCharCode;function s(e){for(var t,n,r=[],i=0,o=e.length;i<o;)(t=e.charCodeAt(i++))>=55296&&t<=56319&&i<o?56320==(64512&(n=e.charCodeAt(i++)))?r.push(((1023&t)<<10)+(1023&n)+65536):(r.push(t),i--):r.push(t);return r}function a(e,t){if(e>=55296&&e<=57343){if(t)throw Error("Lone surrogate U+"+e.toString(16).toUpperCase()+" is not a scalar value");return!1}return!0}function u(e,t){return o(e>>t&63|128)}function c(e,t){if(0==(4294967168&e))return o(e);var n="";return 0==(4294965248&e)?n=o(e>>6&31|192):0==(4294901760&e)?(a(e,t)||(e=65533),n=o(e>>12&15|224),n+=u(e,6)):0==(4292870144&e)&&(n=o(e>>18&7|240),n+=u(e,12),n+=u(e,6)),n+=o(63&e|128)}function h(){if(i>=r)throw Error("Invalid byte index");var e=255&n[i];if(i++,128==(192&e))return 63&e;throw Error("Invalid continuation byte")}function p(e){var t,o;if(i>r)throw Error("Invalid byte index");if(i==r)return!1;if(t=255&n[i],i++,0==(128&t))return t;if(192==(224&t)){if((o=(31&t)<<6|h())>=128)return o;throw Error("Invalid continuation byte")}if(224==(240&t)){if((o=(15&t)<<12|h()<<6|h())>=2048)return a(o,e)?o:65533;throw Error("Invalid continuation byte")}if(240==(248&t)&&(o=(7&t)<<18|h()<<12|h()<<6|h())>=65536&&o<=1114111)return o;throw Error("Invalid UTF-8 detected")}e.exports={version:"2.1.2",encode:function(e,t){for(var n=!1!==(t=t||{}).strict,r=s(e),i=r.length,o=-1,a="";++o<i;)a+=c(r[o],n);return a},decode:function(e,t){var a=!1!==(t=t||{}).strict;n=s(e),r=n.length,i=0;for(var u,c=[];!1!==(u=p(a));)c.push(u);return function(e){for(var t,n=e.length,r=-1,i="";++r<n;)(t=e[r])>65535&&(i+=o((t-=65536)>>>10&1023|55296),t=56320|1023&t),i+=o(t);return i}(c)}}},function(e,t){!function(e){"use strict";t.encode=function(t){var n,r=new Uint8Array(t),i=r.length,o="";for(n=0;n<i;n+=3)o+=e[r[n]>>2],o+=e[(3&r[n])<<4|r[n+1]>>4],o+=e[(15&r[n+1])<<2|r[n+2]>>6],o+=e[63&r[n+2]];return i%3==2?o=o.substring(0,o.length-1)+"=":i%3==1&&(o=o.substring(0,o.length-2)+"=="),o},t.decode=function(t){var n,r,i,o,s,a=.75*t.length,u=t.length,c=0;"="===t[t.length-1]&&(a--,"="===t[t.length-2]&&a--);var h=new ArrayBuffer(a),p=new Uint8Array(h);for(n=0;n<u;n+=4)r=e.indexOf(t[n]),i=e.indexOf(t[n+1]),o=e.indexOf(t[n+2]),s=e.indexOf(t[n+3]),p[c++]=r<<2|i>>4,p[c++]=(15&i)<<4|o>>2,p[c++]=(3&o)<<6|63&s;return h}}("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/")},function(e,t){var n=void 0!==n?n:"undefined"!=typeof WebKitBlobBuilder?WebKitBlobBuilder:"undefined"!=typeof MSBlobBuilder?MSBlobBuilder:"undefined"!=typeof MozBlobBuilder&&MozBlobBuilder,r=function(){try{return 2===new Blob(["hi"]).size}catch(e){return!1}}(),i=r&&function(){try{return 2===new Blob([new Uint8Array([1,2])]).size}catch(e){return!1}}(),o=n&&n.prototype.append&&n.prototype.getBlob;function s(e){return e.map((function(e){if(e.buffer instanceof ArrayBuffer){var t=e.buffer;if(e.byteLength!==t.byteLength){var n=new Uint8Array(e.byteLength);n.set(new Uint8Array(t,e.byteOffset,e.byteLength)),t=n.buffer}return t}return e}))}function a(e,t){t=t||{};var r=new n;return s(e).forEach((function(e){r.append(e)})),t.type?r.getBlob(t.type):r.getBlob()}function u(e,t){return new Blob(s(e),t||{})}"undefined"!=typeof Blob&&(a.prototype=Blob.prototype,u.prototype=Blob.prototype),e.exports=r?i?Blob:u:o?a:void 0},function(e,t,n){function r(e){var n;function r(){if(r.enabled){var e=r,i=+new Date,o=i-(n||i);e.diff=o,e.prev=n,e.curr=i,n=i;for(var s=new Array(arguments.length),a=0;a<s.length;a++)s[a]=arguments[a];s[0]=t.coerce(s[0]),"string"!=typeof s[0]&&s.unshift("%O");var u=0;s[0]=s[0].replace(/%([a-zA-Z%])/g,(function(n,r){if("%%"===n)return n;u++;var i=t.formatters[r];if("function"==typeof i){var o=s[u];n=i.call(e,o),s.splice(u,1),u--}return n})),t.formatArgs.call(e,s);var c=r.log||t.log||console.log.bind(console);c.apply(e,s)}}return r.namespace=e,r.enabled=t.enabled(e),r.useColors=t.useColors(),r.color=function(e){var n,r=0;for(n in e)r=(r<<5)-r+e.charCodeAt(n),r|=0;return t.colors[Math.abs(r)%t.colors.length]}(e),r.destroy=i,"function"==typeof t.init&&t.init(r),t.instances.push(r),r}function i(){var e=t.instances.indexOf(this);return-1!==e&&(t.instances.splice(e,1),!0)}(t=e.exports=r.debug=r.default=r).coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){t.enable("")},t.enable=function(e){var n;t.save(e),t.names=[],t.skips=[];var r=("string"==typeof e?e:"").split(/[\s,]+/),i=r.length;for(n=0;n<i;n++)r[n]&&("-"===(e=r[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")));for(n=0;n<t.instances.length;n++){var o=t.instances[n];o.enabled=t.enabled(o.namespace)}},t.enabled=function(e){if("*"===e[e.length-1])return!0;var n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=n(84),t.instances=[],t.names=[],t.skips=[],t.formatters={}},function(e,t){var n=1e3,r=6e4,i=60*r,o=24*i;function s(e,t,n){if(!(e<t))return e<1.5*t?Math.floor(e/t)+" "+n:Math.ceil(e/t)+" "+n+"s"}e.exports=function(e,t){t=t||{};var a,u=typeof e;if("string"===u&&e.length>0)return function(e){if((e=String(e)).length>100)return;var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(!t)return;var s=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*s;case"days":case"day":case"d":return s*o;case"hours":case"hour":case"hrs":case"hr":case"h":return s*i;case"minutes":case"minute":case"mins":case"min":case"m":return s*r;case"seconds":case"second":case"secs":case"sec":case"s":return s*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}(e);if("number"===u&&!1===isNaN(e))return t.long?s(a=e,o,"day")||s(a,i,"hour")||s(a,r,"minute")||s(a,n,"second")||a+" ms":function(e){if(e>=o)return Math.round(e/o)+"d";if(e>=i)return Math.round(e/i)+"h";if(e>=r)return Math.round(e/r)+"m";if(e>=n)return Math.round(e/n)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},function(e,t,n){var r=n(26),i=n(8),o=n(14);e.exports=h;var s,a=/\n/g,u=/\\n/g;function c(){}function h(e){r.call(this,e),this.query=this.query||{},s||(s=o.___eio=o.___eio||[]),this.index=s.length;var t=this;s.push((function(e){t.onData(e)})),this.query.j=this.index,"function"==typeof addEventListener&&addEventListener("beforeunload",(function(){t.script&&(t.script.onerror=c)}),!1)}i(h,r),h.prototype.supportsBinary=!1,h.prototype.doClose=function(){this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),this.form&&(this.form.parentNode.removeChild(this.form),this.form=null,this.iframe=null),r.prototype.doClose.call(this)},h.prototype.doPoll=function(){var e=this,t=document.createElement("script");this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),t.async=!0,t.src=this.uri(),t.onerror=function(t){e.onError("jsonp poll error",t)};var n=document.getElementsByTagName("script")[0];n?n.parentNode.insertBefore(t,n):(document.head||document.body).appendChild(t),this.script=t,"undefined"!=typeof navigator&&/gecko/i.test(navigator.userAgent)&&setTimeout((function(){var e=document.createElement("iframe");document.body.appendChild(e),document.body.removeChild(e)}),100)},h.prototype.doWrite=function(e,t){var n=this;if(!this.form){var r,i=document.createElement("form"),o=document.createElement("textarea"),s=this.iframeId="eio_iframe_"+this.index;i.className="socketio",i.style.position="absolute",i.style.top="-1000px",i.style.left="-1000px",i.target=s,i.method="POST",i.setAttribute("accept-charset","utf-8"),o.name="d",i.appendChild(o),document.body.appendChild(i),this.form=i,this.area=o}function c(){h(),t()}function h(){if(n.iframe)try{n.form.removeChild(n.iframe)}catch(e){n.onError("jsonp polling iframe removal error",e)}try{var e='<iframe src="javascript:0" name="'+n.iframeId+'">';r=document.createElement(e)}catch(e){(r=document.createElement("iframe")).name=n.iframeId,r.src="javascript:0"}r.id=n.iframeId,n.form.appendChild(r),n.iframe=r}this.form.action=this.uri(),h(),e=e.replace(u,"\\\n"),this.area.value=e.replace(a,"\\n");try{this.form.submit()}catch(e){}this.iframe.attachEvent?this.iframe.onreadystatechange=function(){"complete"===n.iframe.readyState&&c()}:this.iframe.onload=c}},function(e,t,n){(function(t){var r,i,o=n(15),s=n(4),a=n(7),u=n(8),c=n(28),h=n(9)("engine.io-client:websocket");if("undefined"!=typeof WebSocket?r=WebSocket:"undefined"!=typeof self&&(r=self.WebSocket||self.MozWebSocket),"undefined"==typeof window)try{i=n(87)}catch(e){}var p=r||i;function f(e){e&&e.forceBase64&&(this.supportsBinary=!1),this.perMessageDeflate=e.perMessageDeflate,this.usingBrowserWebSocket=r&&!e.forceNode,this.protocols=e.protocols,this.usingBrowserWebSocket||(p=i),o.call(this,e)}e.exports=f,u(f,o),f.prototype.name="websocket",f.prototype.supportsBinary=!0,f.prototype.doOpen=function(){if(this.check()){var e=this.uri(),t=this.protocols,n={};this.isReactNative||(n.agent=this.agent,n.perMessageDeflate=this.perMessageDeflate,n.pfx=this.pfx,n.key=this.key,n.passphrase=this.passphrase,n.cert=this.cert,n.ca=this.ca,n.ciphers=this.ciphers,n.rejectUnauthorized=this.rejectUnauthorized),this.extraHeaders&&(n.headers=this.extraHeaders),this.localAddress&&(n.localAddress=this.localAddress);try{this.ws=this.usingBrowserWebSocket&&!this.isReactNative?t?new p(e,t):new p(e):new p(e,t,n)}catch(e){return this.emit("error",e)}void 0===this.ws.binaryType&&(this.supportsBinary=!1),this.ws.supports&&this.ws.supports.binary?(this.supportsBinary=!0,this.ws.binaryType="nodebuffer"):this.ws.binaryType="arraybuffer",this.addEventListeners()}},f.prototype.addEventListeners=function(){var e=this;this.ws.onopen=function(){e.onOpen()},this.ws.onclose=function(){e.onClose()},this.ws.onmessage=function(t){e.onData(t.data)},this.ws.onerror=function(t){e.onError("websocket error",t)}},f.prototype.write=function(e){var n=this;this.writable=!1;for(var r=e.length,i=0,o=r;i<o;i++)!function(e){s.encodePacket(e,n.supportsBinary,(function(i){if(!n.usingBrowserWebSocket){var o={};if(e.options&&(o.compress=e.options.compress),n.perMessageDeflate)("string"==typeof i?t.byteLength(i):i.length)<n.perMessageDeflate.threshold&&(o.compress=!1)}try{n.usingBrowserWebSocket?n.ws.send(i):n.ws.send(i,o)}catch(e){h("websocket closed before onclose event")}--r||a()}))}(e[i]);function a(){n.emit("flush"),setTimeout((function(){n.writable=!0,n.emit("drain")}),0)}},f.prototype.onClose=function(){o.prototype.onClose.call(this)},f.prototype.doClose=function(){void 0!==this.ws&&this.ws.close()},f.prototype.uri=function(){var e=this.query||{},t=this.secure?"wss":"ws",n="";return this.port&&("wss"===t&&443!==Number(this.port)||"ws"===t&&80!==Number(this.port))&&(n=":"+this.port),this.timestampRequests&&(e[this.timestampParam]=c()),this.supportsBinary||(e.b64=1),(e=a.encode(e)).length&&(e="?"+e),t+"://"+(-1!==this.hostname.indexOf(":")?"["+this.hostname+"]":this.hostname)+n+this.path+e},f.prototype.check=function(){return!(!p||"__initialize"in p&&this.name===f.prototype.name)}}).call(this,n(12).Buffer)},function(e,t){},function(e,t){e.exports=function(e,t){for(var n=[],r=(t=t||0)||0;r<e.length;r++)n[r-t]=e[r];return n}},function(e,t){function n(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}e.exports=n,n.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=0==(1&Math.floor(10*t))?e-n:e+n}return 0|Math.min(e,this.max)},n.prototype.reset=function(){this.attempts=0},n.prototype.setMin=function(e){this.ms=e},n.prototype.setMax=function(e){this.max=e},n.prototype.setJitter=function(e){this.jitter=e}}]);

!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("kaltura-player-js")):"function"==typeof define&&define.amd?define("kava",["kaltura-player-js"],t):"object"==typeof exports?exports.kava=t(require("kaltura-player-js")):(e.KalturaPlayer=e.KalturaPlayer||{},e.KalturaPlayer.plugins=e.KalturaPlayer.plugins||{},e.KalturaPlayer.plugins.kava=t(e.KalturaPlayer))}(window,(function(e){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=2)}([function(t,n){t.exports=e},function(e,t,n){window,e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=10)}([function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(2);function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var a=function e(t,n,o){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};i(this,e),this.severity=t,this.category=n,this.code=o,this.data=a,Object(r.c)("Error")!==r.a.OFF&&e._logger.error("Category:".concat(n," | Code:").concat(o," |"),a)};o(a,"Severity",{RECOVERABLE:1,CRITICAL:2}),o(a,"Category",{NETWORK:1,SERVICE:2,PROVIDER:3}),o(a,"Code",{UNSUPPORTED_SCHEME:1e3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,BAD_SERVER_RESPONSE:1005,MULTIREQUEST_API_ERROR:1006,API_RESPONSE_MISMATCH:1007,ERROR:2e3,BLOCK_ACTION:2001,MEDIA_STATUS_NOT_READY:2002,MISSING_MANDATORY_PARAMS:3e3,MISSING_PLAY_SOURCE:3001,METHOD_NOT_IMPLEMENTED:3002}),o(a,"_logger",Object(r.b)("Error"))},function(e,t,n){var r,i;
/*!
 * js-logger - http://github.com/jonnyreeves/js-logger
 * Jonny Reeves, http://jonnyreeves.co.uk/
 * js-logger may be freely distributed under the MIT license.
 */!function(o){"use strict";var a,s={VERSION:"1.6.0"},u={},l=function(e,t){return function(){return t.apply(e,arguments)}},c=function(){var e,t,n=arguments,r=n[0];for(t=1;t<n.length;t++)for(e in n[t])!(e in r)&&n[t].hasOwnProperty(e)&&(r[e]=n[t][e]);return r},f=function(e,t){return{value:e,name:t}};s.TRACE=f(1,"TRACE"),s.DEBUG=f(2,"DEBUG"),s.INFO=f(3,"INFO"),s.TIME=f(4,"TIME"),s.WARN=f(5,"WARN"),s.ERROR=f(8,"ERROR"),s.OFF=f(99,"OFF");var d=function(e){this.context=e,this.setLevel(e.filterLevel),this.log=this.info};d.prototype={setLevel:function(e){e&&"value"in e&&(this.context.filterLevel=e)},getLevel:function(){return this.context.filterLevel},enabledFor:function(e){var t=this.context.filterLevel;return e.value>=t.value},trace:function(){this.invoke(s.TRACE,arguments)},debug:function(){this.invoke(s.DEBUG,arguments)},info:function(){this.invoke(s.INFO,arguments)},warn:function(){this.invoke(s.WARN,arguments)},error:function(){this.invoke(s.ERROR,arguments)},time:function(e){"string"==typeof e&&e.length>0&&this.invoke(s.TIME,[e,"start"])},timeEnd:function(e){"string"==typeof e&&e.length>0&&this.invoke(s.TIME,[e,"end"])},invoke:function(e,t){a&&this.enabledFor(e)&&a(t,c({level:e},this.context))}};var h,p=new d({filterLevel:s.OFF});(h=s).enabledFor=l(p,p.enabledFor),h.trace=l(p,p.trace),h.debug=l(p,p.debug),h.time=l(p,p.time),h.timeEnd=l(p,p.timeEnd),h.info=l(p,p.info),h.warn=l(p,p.warn),h.error=l(p,p.error),h.log=h.info,s.setHandler=function(e){a=e},s.setLevel=function(e){for(var t in p.setLevel(e),u)u.hasOwnProperty(t)&&u[t].setLevel(e)},s.getLevel=function(){return p.getLevel()},s.get=function(e){return u[e]||(u[e]=new d(c({name:e},p.context)))},s.createDefaultHandler=function(e){(e=e||{}).formatter=e.formatter||function(e,t){t.name&&e.unshift("["+t.name+"]")};var t={},n=function(e,t){Function.prototype.apply.call(e,console,t)};return"undefined"==typeof console?function(){}:function(r,i){r=Array.prototype.slice.call(r);var o,a=console.log;i.level===s.TIME?(o=(i.name?"["+i.name+"] ":"")+r[0],"start"===r[1]?console.time?console.time(o):t[o]=(new Date).getTime():console.timeEnd?console.timeEnd(o):n(a,[o+": "+((new Date).getTime()-t[o])+"ms"])):(i.level===s.WARN&&console.warn?a=console.warn:i.level===s.ERROR&&console.error?a=console.error:i.level===s.INFO&&console.info?a=console.info:i.level===s.DEBUG&&console.debug?a=console.debug:i.level===s.TRACE&&console.trace&&(a=console.trace),e.formatter(r,i),n(a,r))}},s.useDefaults=function(e){s.setLevel(e&&e.defaultLevel||s.DEBUG),s.setHandler(s.createDefaultHandler(e))},void 0===(i="function"==typeof(r=s)?r.call(t,n,t,e):r)||(e.exports=i)}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"c",(function(){return a}));var r=n(1),i={DEBUG:r.DEBUG,INFO:r.INFO,TIME:r.TIME,WARN:r.WARN,ERROR:r.ERROR,OFF:r.OFF};function o(e){return e?r.get(e):r}function a(e){return o(e).getLevel()}r.useDefaults({defaultLevel:r.ERROR}),t.b=o},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(0);function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var s=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Map;i(this,e),a(this,"retryConfig",{async:!0,timeout:0,maxAttempts:4}),a(this,"_attemptCounter",1),this.headers=t}var t,n;return t=e,(n=[{key:"getUrl",value:function(e){return e+"/service/"+this.service+(this.action?"/action/"+this.action:"")}},{key:"doHttpRequest",value:function(){var e=this,t=new Promise((function(t,n){e._requestPromise={resolve:t,reject:n}}));return this.url||this._requestPromise.reject(new r.a(r.a.Severity.CRITICAL,r.a.Category.NETWORK,r.a.Code.MALFORMED_DATA_URI,{url:this.url})),this._createXHR(),t}},{key:"_createXHR",value:function(){var e=this,t=new XMLHttpRequest;t.onreadystatechange=function(){if(4===t.readyState&&200===t.status)try{var n=JSON.parse(t.responseText);return e.responseHeaders=e._getResponseHeaders(t),e._requestPromise.resolve(n)}catch(n){e._requestPromise.reject(e._createError(t,r.a.Code.BAD_SERVER_RESPONSE,{text:t.responseText}))}},t.open(this.method,this.url,this.retryConfig.async),this.retryConfig.async&&this.retryConfig.timeout&&(t.timeout=this.retryConfig.timeout);var n=performance.now();t.ontimeout=function(){e._handleError(t,r.a.Code.TIMEOUT,{timeout:(performance.now()-n)/1e3,statusText:t.statusText})},t.onerror=t.onabort=function(){e._handleError(t,r.a.Code.HTTP_ERROR,{text:t.responseText,statusText:t.statusText})},this.headers.forEach((function(e,n){t.setRequestHeader(n,e)})),t.send(this.params)}},{key:"_getResponseHeaders",value:function(e){return e.getAllResponseHeaders().split("\n").filter((function(e){return 0===e.toLowerCase().indexOf("x-")}))}},{key:"_handleError",value:function(e,t,n){var r=this._createError(e,t,n);if(e.onreadystatechange=function(){},e.onerror=function(){},e.ontimeout=function(){},e.onabort=function(){},!(this.retryConfig.maxAttempts&&this._attemptCounter<this.retryConfig.maxAttempts))return this._requestPromise.reject(r);this._attemptCounter++,this._createXHR()}},{key:"_createError",value:function(e,t,n){return Object.assign(n,{url:this.url,headers:this._getResponseHeaders(e),attempt:this._attemptCounter}),new r.a(r.a.Severity.CRITICAL,r.a.Category.NETWORK,t,n)}}])&&o(t.prototype,n),e}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(5);function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var o={serviceUrl:"https://cdnapisec.kaltura.com/api_v3",cdnUrl:"https://cdnapisec.kaltura.com",serviceParams:{apiVersion:"3.3.0",format:1},useApiCaptions:!0},a=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n;return t=e,(n=[{key:"set",value:function(e){e&&Object.assign(o,e)}},{key:"get",value:function(){return Object(r.a)(o)}}])&&i(t,n),e}()},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}n.d(t,"a",(function(){return i}));var i=function e(t){var n;return Array.isArray(t)?(n=t.length>0?t.slice(0):[]).forEach((function(t,i){("object"===r(t)&&t!=={}||Array.isArray(t)&&t.length>0)&&(n[i]=e(t))})):"object"===r(t)?(n=Object.assign({},t),Object.keys(n).forEach((function(t){("object"===r(n[t])&&n[t]!=={}||Array.isArray(n[t])&&n[t].length>0)&&(n[t]=e(n[t]))}))):n=t,n}},function(e,t,n){"use strict";n.d(t,"a",(function(){return m}));var r=n(3),i=n(2);function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var a=function e(t){var n;o(this,e),(n="hasError")in this?Object.defineProperty(this,n,{value:!1,enumerable:!0,configurable:!0,writable:!0}):this[n]=!1,"KalturaAPIException"===t.objectType?(this.hasError=!0,this.error=new s(t.code,t.message)):t.error&&"KalturaAPIException"===t.error.objectType?(this.hasError=!0,this.error=new s(t.error.code,t.error.message)):this.data=t},s=function e(t,n){o(this,e),this.code=t,this.message=n},u=n(0);function l(e){return(l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function h(e,t){return!t||"object"!==l(t)&&"function"!=typeof t?p(e):t}function p(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function g(e){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function y(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var m=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&d(e,t)}(i,e);var t,n,r=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=g(e);if(t){var i=g(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return h(this,n)}}(i);function i(){var e;c(this,i);for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return y(p(e=r.call.apply(r,[this].concat(n))),"requests",[]),e}return t=i,(n=[{key:"add",value:function(e){this.requests.push(e);var t={},n={service:e.service,action:e.action};return Object.assign(t,y({},this.requests.length,Object.assign(n,e.params))),Object.assign(t,this.params),this.params=t,this}},{key:"execute",value:function(){var e=this;return new Promise((function(t,n){try{e.params=JSON.stringify(e.params)}catch(t){i._logger.error("".concat(t.message)),n(new u.a(u.a.Severity.CRITICAL,u.a.Category.PROVIDER,u.a.Code.FAILED_PARSING_REQUEST,{error:t,params:e.params}))}e.doHttpRequest().then((function(r){var i=new _(r);i.success?t({headers:e.responseHeaders,response:i}):n(new u.a(u.a.Severity.CRITICAL,u.a.Category.NETWORK,u.a.Code.MULTIREQUEST_API_ERROR,{url:e.url,headers:e.responseHeaders,results:i.results}))}),(function(e){n(e)}))}))}}])&&f(t.prototype,n),i}(r.a);y(m,"_logger",Object(i.b)("MultiRequestBuilder"));var _=function e(t){var n=this;c(this,e),y(this,"results",[]),this.success=!0,(t.result?t.result:t).forEach((function(t){var r=new a(t);if(n.results.push(r),r.hasError)return e._logger.error("Service returned an error with error code: ".concat(r.error.code," and message: ").concat(r.error.message,".")),void(n.success=!1)}))};y(_,"_logger",Object(i.b)("MultiRequestResult"))},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(6),i=n(4);function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var a=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n;return t=e,(n=[{key:"getMultiRequest",value:function(e,t,n){var o=i.a.get(),a=o.serviceParams;Object.assign(a,{ks:t,clientTag:"html5:v"+e}),n&&Object.assign(a,{partnerId:n});var s=new Map;s.set("Content-Type","application/json");var u=new r.a(s);return u.method="POST",u.service="multirequest",u.url=u.getUrl(o.serviceUrl),u.params=a,u}}])&&o(t,n),e}()},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}n.d(t,"a",(function(){return i}));var i=function(e){var t=[],n=/\[\]$/,i=function(e){return"[object Array]"===Object.prototype.toString.call(e)},o=function(e,n){n="function"==typeof n?n():null==n?"":n,t[t.length]=encodeURIComponent(e)+"="+encodeURIComponent(n)};return function e(a,s){var u,l,c;if(a)if(i(s))for(u=0,l=s.length;u<l;u++)n.test(a)?o(a,s[u]):e(a+":"+("object"===r(s[u])?u:""),s[u]);else if(s&&"[object Object]"===String(s))for(c in s)e(a+":"+c,s[c]);else o(a,s);else if(i(s))for(u=0,l=s.length;u<l;u++)o(s[u].name,s[u].value);else for(c in s)e(c,s[c]);return t}("",e).join("&").replace(/%20/g,"+")}},,function(e,t,n){"use strict";n.r(t),n.d(t,"OVPAnalyticsService",(function(){return p})),n.d(t,"OVPConfiguration",(function(){return i.a})),n.d(t,"RequestBuilder",(function(){return r.a})),n.d(t,"NAME",(function(){return g})),n.d(t,"VERSION",(function(){return y}));var r=n(3),i=n(4),o=n(7),a=n(8);function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=h(e);if(t){var i=h(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return d(this,n)}}function d(e,t){return!t||"object"!==s(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var p=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&c(e,t)}(s,e);var t,n,o=f(s);function s(){return u(this,s),o.apply(this,arguments)}return t=s,(n=[{key:"trackEvent",value:function(e,t){var n=i.a.get(),o={};Object.assign(o,n.serviceParams,t);var s=new r.a;return s.service="analytics",s.action="trackEvent",s.method="GET",s.tag="analytics-trackEvent",s.params=o,s.url=e+"?service="+s.service+"&action="+s.action+"&"+Object(a.a)(s.params),s}}])&&l(t,n),s}(o.a),g="playkit-js-providers-analytics-service",y="2.22.0"}])},function(e,t,n){"use strict";n.r(t),n.d(t,"Plugin",(function(){return O})),n.d(t,"EventType",(function(){return y})),n.d(t,"VERSION",(function(){return I})),n.d(t,"NAME",(function(){return D}));var r=n(0),i=n(1);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var a,s=function(){function e(e){o(this,"totalSegmentsDownloadTime",0),o(this,"totalSegmentsDownloadBytes",0),o(this,"maxSegmentDownloadTime",0),o(this,"maxManifestDownloadTime",0),o(this,"droppedFramesRatio",null),o(this,"maxNetworkConnectionOverhead",0),o(this,"flavorParamsId",NaN),o(this,"playerJSLoadTime",null),e&&this.updateModel(e)}var t=e.prototype;return t.getPlayTimeSum=function(){return this.playTimeSum},t.getCanPlayTime=function(){return this.canPlayTime},t.getBufferTime=function(){return this.bufferTime},t.getBufferTimeSum=function(){return this.bufferTimeSum},t.getPlayerJSLoadTime=function(){return this.playerJSLoadTime?Math.round(1e3*this.playerJSLoadTime)/1e3:null},t.getJoinTime=function(){return this.joinTime},t.getTargetPosition=function(){return this.targetPosition},t.getTargetBuffer=function(){return this.targetBuffer},t.getLanguage=function(){return this.language},t.getCaption=function(){return this.caption},t.getBandwidth=function(){return this.totalSegmentsDownloadTime>0?Math.round(8*this.totalSegmentsDownloadBytes/this.totalSegmentsDownloadTime)/1e3:0},t.getMaxManifestDownloadTime=function(){return this.maxManifestDownloadTime},t.getSegmentDownloadTime=function(){return this.maxSegmentDownloadTime},t.getForwardBufferHealth=function(){return this.forwardBufferHealth},t.getDroppedFramesRatio=function(){return this.droppedFramesRatio},t.getSoundMode=function(){return this.soundMode},t.getTabMode=function(){return this.tabMode},t.getNetworkConnectionType=function(){return this.networkConnectionType},t.getNetworkConnectionOverhead=function(){return Math.round(this.maxNetworkConnectionOverhead)/1e3},t.getErrorCode=function(){return this.errorCode},t.getFlavorParamsId=function(){return this.flavorParamsId},t.getErrorDetails=function(){var e="";if(this.errorDetails)try{e=JSON.stringify(this.errorDetails)}catch(e){}return e},t.getEventIndex=function(){return this.eventIndex},t.getErrorPosition=function(){return this.errorPosition},t.getSessionStartTime=function(){return this.sessionStartTime},t.updateModel=function(e){Object.assign(this,e)},t.getModel=function(e){return function(e,t){var n={eventType:e.index,partnerId:t.getPartnerId(),entryId:t.getEntryId(),sessionId:t.getSessionId(),eventIndex:t.getEventIndex(),referrer:t.getReferrer(),deliveryType:t.getDeliveryType(),playbackType:t.getPlaybackType(),clientVer:t.getClientVer(),clientTag:t.getClientTag(),position:t.getPosition(),playbackSpeed:t.getPlaybackSpeed()};t.getCaption()&&(n.caption=t.getCaption());t.getSessionStartTime()&&(n.sessionStartTime=t.getSessionStartTime());t.getKS()&&(n.ks=t.getKS());t.getUIConfId()&&(n.uiConfId=t.getUIConfId());t.getPlaylistId()&&(n.playlistId=t.getPlaylistId());t.getCustomVar1()&&(n.customVar1=t.getCustomVar1());t.getCustomVar2()&&(n.customVar2=t.getCustomVar2());t.getCustomVar3()&&(n.customVar3=t.getCustomVar3());t.getPlaybackContext()&&(n.playbackContext=t.getPlaybackContext());t.getApplicationVersion()&&(n.applicationVer=t.getApplicationVersion());t.getUserId()&&(n.userId=t.getUserId());t.getPersistentSessionId()&&(n.persistentSessionId=t.getPersistentSessionId());var r=e.getEventModel(t);return Object.assign(r,n)}(e,this)},e}(),u=1,l=2,c=1,f=2,d=3,h=1,p=2,g={VIEW:{type:"VIEW",index:99,getEventModel:function(e){var t={playTimeSum:e.getPlayTimeSum(),bufferTime:e.getBufferTime(),bufferTimeSum:e.getBufferTimeSum(),actualBitrate:e.getActualBitrate(),averageBitrate:e.getAverageBitrate(),audioLanguage:e.getLanguage(),soundMode:e.getSoundMode(),tabMode:e.getTabMode()};return isNaN(e.getForwardBufferHealth())||(t.forwardBufferHealth=e.getForwardBufferHealth()),e.getMaxManifestDownloadTime()>0&&(t.manifestDownloadTime=e.getMaxManifestDownloadTime()),e.getSegmentDownloadTime()>0&&(t.segmentDownloadTime=e.getSegmentDownloadTime()),e.getBandwidth()&&(t.bandwidth=e.getBandwidth()),null!=e.getDroppedFramesRatio()&&(t.droppedFramesRatio=e.getDroppedFramesRatio()),isNaN(e.getTargetBuffer())||(t.targetBuffer=e.getTargetBuffer()),""!==e.getNetworkConnectionType()&&(t.networkConnectionType=e.getNetworkConnectionType()),e.getNetworkConnectionOverhead()&&(t.networkConnectionOverhead=e.getNetworkConnectionOverhead()),isNaN(e.getFlavorParamsId())||(t.flavorParamsId=e.getFlavorParamsId()),t}},IMPRESSION:{type:"IMPRESSION",index:1,getEventModel:function(e){var t={};return null!=e.getPlayerJSLoadTime()&&(t.playerJSLoadTime=e.getPlayerJSLoadTime()),t}},PLAY_REQUEST:{type:"PLAY_REQUEST",index:2,getEventModel:function(){return{}}},PLAY:{type:"PLAY",index:3,getEventModel:function(e){var t={bufferTime:e.getBufferTime(),bufferTimeSum:e.getBufferTimeSum(),actualBitrate:e.getActualBitrate(),joinTime:e.getJoinTime(),canPlay:e.getCanPlayTime()};return""!==e.getNetworkConnectionType()&&(t.networkConnectionType=e.getNetworkConnectionType()),t}},RESUME:{type:"RESUME",index:4,getEventModel:function(e){return{bufferTime:e.getBufferTime(),bufferTimeSum:e.getBufferTimeSum(),actualBitrate:e.getActualBitrate()}}},PAUSE:{type:"PAUSE",index:33,getEventModel:function(){return{}}},BUFFER_START:{type:"BUFFER_START",index:45,getEventModel:function(){return{}}},BUFFER_END:{type:"BUFFER_END",index:46,getEventModel:function(){return{}}},REPLAY:{type:"REPLAY",index:34,getEventModel:function(){return{}}},SEEK:{type:"SEEK",index:35,getEventModel:function(e){return{targetPosition:e.getTargetPosition()}}},PLAY_REACHED_25_PERCENT:{type:"PLAY_REACHED_25_PERCENT",index:11,getEventModel:function(){return{}}},PLAY_REACHED_50_PERCENT:{type:"PLAY_REACHED_50_PERCENT",index:12,getEventModel:function(){return{}}},PLAY_REACHED_75_PERCENT:{type:"PLAY_REACHED_75_PERCENT",index:13,getEventModel:function(){return{}}},PLAY_REACHED_100_PERCENT:{type:"PLAY_REACHED_100_PERCENT",index:14,getEventModel:function(){return{}}},SOURCE_SELECTED:{type:"SOURCE_SELECTED",index:39,getEventModel:function(e){return{actualBitrate:e.getActualBitrate()}}},AUDIO_SELECTED:{type:"AUDIO_SELECTED",index:42,getEventModel:function(e){return{language:e.getLanguage()}}},FLAVOR_SWITCH:{type:"FLAVOR_SWITCH",index:43,getEventModel:function(e){return{actualBitrate:e.getActualBitrate()}}},SPEED:{type:"SPEED",index:41,getEventModel:function(){return{}}},CAPTIONS:{type:"CAPTIONS",index:38,getEventModel:function(){return{}}},ERROR:{type:"ERROR",index:98,getEventModel:function(e){return{errorCode:e.getErrorCode(),errorDetails:e.getErrorDetails(),errorPosition:e.getErrorPosition()}}}},y=(a={},Object.keys(g).forEach((function(e){return a[e]=e})),a);var m=function(){function e(){var e,t,n;n=[],(t="_rates")in(e=this)?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,this._rates=[]}var t=e.prototype;return t.setRates=function(e){var t=this;this._rates=[],e.forEach((function(e){t._rates.push({rate:e,active:!1,duration:0})}))},t.setCurrent=function(e){this._rates.forEach((function(e){return e.active=!1}));var t=this._rates.find((function(t){return t.rate===e}));t&&(t.active=!0)},t.getCurrent=function(){var e=this._rates.find((function(e){return e.active}));return e?e.rate:-1},t.countCurrent=function(){var e=this._rates.find((function(e){return e.active}));e&&e.duration++},t.getAverage=function(){var e=0,t=0;return this._rates.forEach((function(n){t+=n.rate*n.duration,e+=n.duration})),e?t/e:0},t.reset=function(){this._rates.forEach((function(e){return e.duration=0}))},t.destroy=function(){this._rates=[]},e}();var _,v,E,T=r.core.FakeEvent,b=r.core.FakeEventTarget,S=function(e){var t,n;function r(t){var n;return(n=e.call(this)||this)._config=t,n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.start=function(){var e=this;this._clearTimeout(),this._stopped=!1,this._resetCounter=0,this._eventCounter=0,this._intervalId=setInterval((function(){return e._monitor()}),1e3)},i.resume=function(){this._stopped=!1,this._resetCounter=0},i.stop=function(){this._stopped=!0},i.isStopped=function(){return this._stopped},i.destroy=function(){this._clearTimeout()},i._clearTimeout=function(){this._intervalId&&(clearInterval(this._intervalId),this._intervalId=null)},i._monitor=function(){this._stopped?(this._resetCounter===this._config.resetCounter&&(this.dispatchEvent(new T(r.Event.RESET)),this._resetCounter=0,this._eventCounter=0),this._resetCounter++):(this.dispatchEvent(new T(r.Event.TICK)),this._eventCounter===this._config.eventCounter&&(this.dispatchEvent(new T(r.Event.REPORT)),this._eventCounter=0),this._eventCounter++)},r}(b);function P(e){return(P="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function R(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function C(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function A(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}E={TICK:"tick",RESET:"reset",REPORT:"report"},(v="Event")in(_=S)?Object.defineProperty(_,v,{value:E,enumerable:!0,configurable:!0,writable:!0}):_[v]=E;var M=r.core.Error,w=(r.core.FakeEvent,r.core.Utils),O=function(e){var t,n;function r(t,n,r){var i;if(A(C(i=e.call(this,t,n,r)||this),"_lastDroppedFrames",0),A(C(i),"_lastTotalFrames",0),A(C(i),"_performanceEntries",[]),A(C(i),"_pendingFragLoadedUrls",[]),A(C(i),"_fragLoadedFiredOnce",!1),A(C(i),"_canPlayOccured",!1),A(C(i),"_isManualPreload",!1),i._rateHandler=new m,i._model=new s,i._setModelDelegates(),i._timer=new S({resetCounter:i.config.resetSessionCountdown,eventCounter:i.config.viewEventCountdown}),i._viewEventEnabled=!0,i._resetFlags(),i._addBindings(),i._model.updateModel({eventIndex:1,bufferTime:0,bufferTimeSum:0,playTimeSum:0}),performance&&i.config.uiConfId){var o=performance.getEntriesByType("resource").find((function(e){return e.name.match("embedPlaykitJs.*"+i.config.uiConfId)}));o&&i._model.updateModel({playerJSLoadTime:o.duration})}return i}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r.isValid=function(){return!0};var o,a,_,v=r.prototype;return v._updateSoundModeInModel=function(){this._model.updateModel({soundMode:this.player.muted||0===this.player.volume?u:l})},v._handleNewPerformanceEntries=function(e){for(var t=e.getEntries(),n=0;n<t.length;n++)this._performanceEntries.push(t[n]);for(;this._pendingFragLoadedUrls.length;)this._handleFragPerformanceObserver(this._pendingFragLoadedUrls.pop())},v.destroy=function(){this.eventManager.destroy(),this._reset()},v._reset=function(){this._timer.destroy(),this._rateHandler.destroy(),this._performanceObserver&&this._performanceObserver.disconnect(),this._performanceEntries=[],this._pendingFragLoadedUrls=[]},v.reset=function(){this.eventManager.removeAll(),this._resetFlags(),this._addBindings(),this._model.updateModel({eventIndex:1,bufferTime:0,bufferTimeSum:0,playTimeSum:0,sessionStartTime:null}),this._reset()},v.loadMedia=function(){window.PerformanceObserver&&(this._performanceObserver=new window.PerformanceObserver(this._handleNewPerformanceEntries.bind(this)),this._performanceObserver.observe({entryTypes:["resource"]}))},v.getEventModel=function(e){if(e)return this._model.getModel(g[e])},v.sendAnalytics=function(e){var t=this;return new Promise((function(n,r){i.OVPAnalyticsService.trackEvent(w.Http.protocol+t.config.serviceUrl,e).doHttpRequest().then((function(r){t._handleServerResponseSuccess(r,e),n()}),(function(n){t._handleServerResponseFailed(n,e),r(n)})),t._model.updateModel({eventIndex:t._model.getEventIndex()+1})}))},v._resetFlags=function(){this._previousCurrentTime=0,this._isPlaying=!1,this._isFirstPlay=!0,this._isFirstPlaying=!0,this._isEnded=!1,this._isPaused=!1,this._isBuffering=!1,this._timePercentEvent={PLAY_REACHED_25_PERCENT:!1,PLAY_REACHED_50_PERCENT:!1,PLAY_REACHED_75_PERCENT:!1,PLAY_REACHED_100_PERCENT:!1},this._canPlayOccured=!1,this._isManualPreload=!1},v._resetSession=function(){this.logger.debug("Reset KAVA session"),this._rateHandler.reset(),this._model.updateModel({eventIndex:1,bufferTimeSum:0,playTimeSum:0})},v._sendAnalytics=function(e){if(this._validate()){this._isBuffering&&(this._updateBufferModel(),this._bufferStartTime=Date.now());var t=this._model.getModel(e);if("function"==typeof this.config.tamperAnalyticsHandler)if(!this.config.tamperAnalyticsHandler(t))return void this.logger.debug("Cancel KAVA request",t);this.logger.debug("Sending KAVA event ".concat(t.eventType,":").concat(e.type)),this.sendAnalytics(t)}},v._handleServerResponseSuccess=function(e,t){this.logger.debug("KAVA event sent",t),this._updateSessionStartTimeModel(e)},v._handleServerResponseFailed=function(e,t){this.logger.error("Failed to send KAVA event",t,e)},v._addBindings=function(){var e=this;this.eventManager.listen(this._timer,S.Event.TICK,(function(){return e._rateHandler.countCurrent()})),this.eventManager.listen(this._timer,S.Event.REPORT,(function(){return e._onReport()})),this.eventManager.listen(this._timer,S.Event.RESET,(function(){return e._resetSession()})),this.eventManager.listen(this.player,this.player.Event.SOURCE_SELECTED,(function(){return e._onSourceSelected()})),this.eventManager.listen(this.player,this.player.Event.ERROR,(function(t){return e._onError(t)})),this.eventManager.listen(this.player,this.player.Event.FIRST_PLAY,(function(){return e._onFirstPlay()})),this.eventManager.listen(this.player,this.player.Event.FRAG_LOADED,(function(t){return e._onFragLoaded(t)})),this.eventManager.listen(this.player,this.player.Event.MANIFEST_LOADED,(function(t){return e._onManifestLoaded(t)})),this.eventManager.listen(this.player,this.player.Event.TIMED_METADATA,(function(t){return e._onTimedMetadataLoaded(t)})),this.eventManager.listen(this.player,this.player.Event.TRACKS_CHANGED,(function(){return e._setInitialTracks()})),this.eventManager.listen(this.player,this.player.Event.PLAYING,(function(){return e._onPlaying()})),this.eventManager.listen(this.player,this.player.Event.FIRST_PLAYING,(function(){return e._onFirstPlaying()})),this.eventManager.listen(this.player,this.player.Event.SEEKING,(function(){return e._onSeeking()})),this.eventManager.listen(this.player,this.player.Event.PAUSE,(function(){return e._onPause()})),this.eventManager.listen(this.player,this.player.Event.ENDED,(function(){return e._onEnded()})),this.eventManager.listen(this.player,this.player.Event.TIME_UPDATE,(function(){return e._onTimeUpdate()})),this.eventManager.listen(this.player,this.player.Event.VIDEO_TRACK_CHANGED,(function(t){return e._onVideoTrackChanged(t)})),this.eventManager.listen(this.player,this.player.Event.AUDIO_TRACK_CHANGED,(function(t){return e._onAudioTrackChanged(t)})),this.eventManager.listen(this.player,this.player.Event.TEXT_TRACK_CHANGED,(function(t){return e._onTextTrackChanged(t)})),this.eventManager.listen(this.player,this.player.Event.PLAYER_STATE_CHANGED,(function(t){return e._onPlayerStateChanged(t)})),this.eventManager.listen(this.player,this.player.Event.RATE_CHANGE,(function(){return e._onPlaybackRateChanged()})),this.eventManager.listen(this.player,this.player.Event.CAN_PLAY,(function(){return e._onCanPlay()})),this.eventManager.listen(this.player,this.player.Event.LOAD_START,(function(){return e._onLoadStart()})),this.eventManager.listen(this.player,this.player.Event.VOLUME_CHANGE,(function(){return e._updateSoundModeInModel()})),this.eventManager.listen(this.player,this.player.Event.MUTE_CHANGE,(function(){return e._updateSoundModeInModel()})),this._initTabMode(),this._initNetworkConnectionType()},v._onFirstPlaying=function(){this._isPlaying=!0,!this._fragLoadedFiredOnce&&this._performanceObserver&&(this._performanceObserver.disconnect(),this.logger.debug("This adapter / media doesn't fire fragLoaded - disconnect performance observer"))},v._onLoadStart=function(){this._loadStartTime=Date.now()},v._getRates=function(){var e=[];return this.player.getTracks(this.player.Track.VIDEO).forEach((function(t){return e.push(t.bandwidth/1024)})),e},v._setInitialTracks=function(){var e=this._getRates(),t=this.player.getActiveTracks();this._rateHandler.setRates(e),t.video&&this._rateHandler.setCurrent(t.video.bandwidth/1024),t.audio&&this._model.updateModel({language:t.audio.language}),t.text&&this._model.updateModel({caption:t.text.language})},v._getAvailableBuffer=function(){var e=NaN;return this.player.stats&&(e=this.player.stats.availableBuffer),e},v._getForwardBufferHealth=function(){var e=NaN,t=this._getAvailableBuffer(),n=this._getTargetBuffer();return isNaN(n)||(e=Math.round(1e3*t/n)/1e3),e},v._getTargetBuffer=function(){var e=NaN;return this.player.stats&&(e=this.player.stats.targetBuffer),e},v._getDroppedFramesRatio=function(){var e=-1,t=this._getDroppedAndDecodedFrames();if(t){var n,r,i=t[0],o=t[1];n=i-this._lastDroppedFrames,e=(r=o-this._lastTotalFrames)?Math.round(n/r*1e3)/1e3:0,this._lastTotalFrames=o,this._lastDroppedFrames=i}return e},v._getDroppedAndDecodedFrames=function(){if("function"==typeof this.player.getVideoElement().getVideoPlaybackQuality){var e=this.player.getVideoElement().getVideoPlaybackQuality();return[e.droppedVideoFrames,e.totalVideoFrames]}return"number"==typeof this.player.getVideoElement().webkitDroppedFrameCount&&"number"==typeof this.player.getVideoElement().webkitDecodedFrameCount?[this.player.getVideoElement().webkitDroppedFrameCount,this.player.getVideoElement().webkitDecodedFrameCount]:null},v._onReport=function(){this._viewEventEnabled?(this._updatePlayTimeSumModel(),this._model.updateModel({forwardBufferHealth:this._getForwardBufferHealth(),targetBuffer:this._getTargetBuffer(),droppedFramesRatio:this._getDroppedFramesRatio()}),this._sendAnalytics(g.VIEW)):this.logger.warn("VIEW event blocked because server response of viewEventsEnabled=false"),this._model.updateModel({totalSegmentsDownloadTime:0,totalSegmentsDownloadBytes:0,maxManifestDownloadTime:0,maxSegmentDownloadTime:0,maxNetworkConnectionOverhead:0,bufferTime:0})},v._updateNetworkConnectionTypeinModel=function(e){this._model.updateModel({networkConnectionType:e.effectiveType})},v._initNetworkConnectionType=function(){var e=this,t=window.navigator.connection||window.navigator.mozConnection||window.navigator.webkitConnection;t&&(this.eventManager.listen(t,"change",(function(){return e._updateNetworkConnectionTypeinModel(t)})),this._updateNetworkConnectionTypeinModel(t))},v._onPlaying=function(){if(this._isFirstPlaying){this._updateSoundModeInModel(),this._timer.start(),this._isFirstPlaying=!1;var e="auto"===this.player.config.playback.preload||this._isManualPreload?this._firstPlayRequestTime:this._loadStartTime;this._model.updateModel({joinTime:r._getTimeDifferenceInSeconds(e)}),this._sendAnalytics(g.PLAY),this._onReport()}else this._isEnded?(this._timer.start(),this._isEnded=!1,this._sendAnalytics(g.REPLAY)):this._isPaused&&(this._timer.resume(),this._isPaused=!1,this._sendAnalytics(g.RESUME))},v._onCanPlay=function(){this._canPlayOccured=!0,this._model.updateModel({canPlayTime:r._getTimeDifferenceInSeconds(this._loadStartTime)})},v._onFirstPlay=function(){this._canPlayOccured&&(this._isManualPreload=!0),this._isFirstPlay=!1,this._firstPlayRequestTime=Date.now(),this._sendAnalytics(g.PLAY_REQUEST)},v._onSourceSelected=function(){this._sendAnalytics(g.IMPRESSION)},v._onSeeking=function(){this._previousCurrentTime=this.player.currentTime,this._model.updateModel({targetPosition:this.player.currentTime}),this._sendAnalytics(g.SEEK)},v._onPause=function(){this._isPaused=!0,this._timer.stop(),this._sendAnalytics(g.PAUSE)},v._onEnded=function(){this._isEnded=!0,this._onTimeUpdate(),this._model.updateModel({bufferTime:0})},v._onTimeUpdate=function(){if(!this.player.isLive()){this._updatePlayTimeSumModel();var e=parseFloat((this.player.currentTime/this.player.duration).toFixed(2));!this._timePercentEvent.PLAY_REACHED_25&&e>=.25&&(this._timePercentEvent.PLAY_REACHED_25=!0,this._sendAnalytics(g.PLAY_REACHED_25_PERCENT)),!this._timePercentEvent.PLAY_REACHED_50&&e>=.5&&(this._timePercentEvent.PLAY_REACHED_50=!0,this._sendAnalytics(g.PLAY_REACHED_50_PERCENT)),!this._timePercentEvent.PLAY_REACHED_75&&e>=.75&&(this._timePercentEvent.PLAY_REACHED_75=!0,this._sendAnalytics(g.PLAY_REACHED_75_PERCENT)),this._timePercentEvent.PLAY_REACHED_100||1!==e||(this._timePercentEvent.PLAY_REACHED_100=!0,this._sendAnalytics(g.PLAY_REACHED_100_PERCENT))}},v._onFragLoaded=function(e){(this._fragLoadedFiredOnce||(this._fragLoadedFiredOnce=!0),this._updateFragLoadedStats(e),this._performanceObserver)&&(this._handleFragPerformanceObserver(e.payload.url)||this._pendingFragLoadedUrls.push(e.payload.url))},v._handleFragPerformanceObserver=function(e){var t=this._performanceEntries.filter((function(t){return t.name==e})),n=t&&t.length?t[t.length-1]:null;if(n){this._updateMaxNetworkConnectionOverhead(n.connectEnd-n.domainLookupStart);var r=this._performanceEntries.indexOf(n);return r>-1&&r<this._performanceEntries.length&&(this._performanceEntries=this._performanceEntries.splice(r+1,this._performanceEntries.length-(r+1))),!0}return!1},v._updateMaxNetworkConnectionOverhead=function(e){this._model.updateModel({maxNetworkConnectionOverhead:Math.max(this._model.maxNetworkConnectionOverhead,e)})},v._updateFragLoadedStats=function(e){var t=Math.round(e.payload.miliSeconds)/1e3;this._model.updateModel({totalSegmentsDownloadTime:this._model.totalSegmentsDownloadTime+t,totalSegmentsDownloadBytes:this._model.totalSegmentsDownloadBytes+e.payload.bytes,maxSegmentDownloadTime:Math.max(t,this._model.maxSegmentDownloadTime)})},v._onManifestLoaded=function(e){var t=Math.round(e.payload.miliSeconds)/1e3;this._model.updateModel({maxManifestDownloadTime:Math.max(t,this._model.maxManifestDownloadTime)})},v._onTimedMetadataLoaded=function(e){var t=e.payload.cues.filter((function(e){return e.value&&"TEXT"===e.value.key}));if(t.length)try{this._model.updateModel({flavorParamsId:Number(JSON.parse(t[t.length-1].value.data).sequenceId)})}catch(e){this.logger.debug("error parsing id3",e)}},v._onVideoTrackChanged=function(e){var t=e.payload.selectedVideoTrack;this._rateHandler.setCurrent(t.bandwidth/1024),this.player.isAdaptiveBitrateEnabled()?this._sendAnalytics(g.FLAVOR_SWITCH):this._sendAnalytics(g.SOURCE_SELECTED)},v._onAudioTrackChanged=function(e){var t=e.payload.selectedAudioTrack;this._model.updateModel({language:t.language}),this._sendAnalytics(g.AUDIO_SELECTED)},v._onTextTrackChanged=function(e){if(this._isPlaying){var t=e.payload.selectedTextTrack;this._model.updateModel({caption:t.language}),this._sendAnalytics(g.CAPTIONS)}},v._onError=function(e){e.payload&&e.payload.severity===M.Severity.CRITICAL&&(this._model.updateModel({errorCode:e.payload.code,errorDetails:e.payload.data,errorPosition:this._isFirstPlay?d:this._isFirstPlaying?h:p}),this._sendAnalytics(g.ERROR),this.reset())},v._onPlaybackRateChanged=function(){this._sendAnalytics(g.SPEED)},v._onPlayerStateChanged=function(e){var t=e.payload.oldState,n=e.payload.newState;t.type===this.player.State.BUFFERING&&(this._isBuffering=!1,this._updateBufferModel(),this._sendAnalytics(g.BUFFER_END)),n.type===this.player.State.BUFFERING&&(this._isBuffering=!0,this._bufferStartTime=Date.now(),this._sendAnalytics(g.BUFFER_START))},v._updateSessionStartTimeModel=function(e){!this._model.getSessionStartTime()&&e&&("object"===P(e)?(this._model.updateModel({sessionStartTime:e.time}),this._viewEventEnabled=e.viewEventsEnabled):this._model.updateModel({sessionStartTime:e})),this._timer.isStopped()&&this._model.updateModel({sessionStartTime:null})},v._updateBufferModel=function(){var e=r._getTimeDifferenceInSeconds(this._bufferStartTime);this._model.updateModel({bufferTime:this._model.getBufferTime()+e,bufferTimeSum:this._model.getBufferTimeSum()+e})},v._updatePlayTimeSumModel=function(){var e;this.player.isLive()?e=this.config.viewEventCountdown-this._model.getBufferTime():(e=this.player.currentTime-this._previousCurrentTime,this._previousCurrentTime=this.player.currentTime),this._model.updateModel({playTimeSum:this._model.getPlayTimeSum()+e})},v._setModelDelegates=function(){var e=this;this._model.getPlaybackSpeed=function(){return e.player.playbackRate},this._model.getActualBitrate=function(){return e._rateHandler.getCurrent()},this._model.getAverageBitrate=function(){return e._rateHandler.getAverage()},this._model.getPartnerId=function(){return e.config.partnerId},this._model.getEntryId=function(){return e.config.entryId},this._model.getPlaylistId=function(){return e.config.playlistId},this._model.getSessionId=function(){return e.config.sessionId},this._model.getPersistentSessionId=function(){return e.config.persistentSessionId},this._model.getClientVer=function(){return e.config.playerVersion},this._model.getClientTag=function(){return"html5:v"+e.config.playerVersion},this._model.getKS=function(){return e.config.ks},this._model.getUIConfId=function(){return e.config.uiConfId},this._model.getReferrer=function(){return e.config.referrer},this._model.getCustomVar1=function(){return e.config.customVar1},this._model.getCustomVar2=function(){return e.config.customVar2},this._model.getCustomVar3=function(){return e.config.customVar3},this._model.getPosition=function(){return e._getPosition()},this._model.getDeliveryType=function(){return e._getDeliveryType()},this._model.getPlaybackType=function(){return e._getPlaybackType()},this._model.getPlaybackContext=function(){return e.config.playbackContext},this._model.getApplicationVersion=function(){return e.config.applicationVersion},this._model.getUserId=function(){return e.config.userId}},v._getPosition=function(){return this.player.isLive()?Number.isNaN(this.player.duration)||this.player.duration-this.player.currentTime<1?0:-(this.player.duration-this.player.currentTime):this.player.currentTime},v._getDeliveryType=function(){return this.player.streamType===this.player.StreamType.PROGRESSIVE?"url":this.player.streamType},v._getPlaybackType=function(){if(this.player.isLive()){if(this.player.isDvr())if(this.player.duration-this.player.currentTime>=this.config.dvrThreshold)return"dvr";return"live"}return"vod"},v._validate=function(){return this.config.partnerId?!!this.config.entryId||(this._logMissingParam("entryId"),!1):(this._logMissingParam("partnerId"),!1)},v._logMissingParam=function(e){this.logger.warn("Kava analytics block report because of missing param ".concat(e))},r._getTimeDifferenceInSeconds=function(e){return(Date.now()-e)/1e3},v._updateTabModeInModel=function(e){this._model.updateModel({tabMode:document[e]?c:f})},v._initTabMode=function(){var e,t,n=this;void 0!==document.hidden?(e="hidden",t="visibilitychange"):void 0!==document.msHidden?(e="msHidden",t="msvisibilitychange"):void 0!==document.webkitHidden&&(e="webkitHidden",t="webkitvisibilitychange"),e&&t&&(this.eventManager.listen(document,t,(function(){return n._updateTabModeInModel(e)})),this._updateTabModeInModel(e))},o=r,(a=[{key:"EventType",get:function(){return w.Object.copyDeep(y)}}])&&R(o.prototype,a),_&&R(o,_),r}(r.BasePlugin);A(O,"defaultConfig",{serviceUrl:"//analytics.kaltura.com/api_v3/index.php",viewEventCountdown:10,resetSessionCountdown:30,dvrThreshold:120,playbackContext:"",applicationVersion:""});var I="0.18.0",D="@playkit-js/playkit-js-kava";Object(r.registerPlugin)("kava",O)}])}));

!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("playkit-navigation",[],e):"object"==typeof exports?exports["playkit-navigation"]=e():(t.KalturaPlayer=t.KalturaPlayer||{},t.KalturaPlayer.plugins=t.KalturaPlayer.plugins||{},t.KalturaPlayer.plugins["playkit-navigation"]=e())}(window,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=58)}([function(t,e,n){"use strict";n.r(e),n.d(e,"__extends",(function(){return o})),n.d(e,"__assign",(function(){return i})),n.d(e,"__rest",(function(){return a})),n.d(e,"__decorate",(function(){return s})),n.d(e,"__param",(function(){return c})),n.d(e,"__metadata",(function(){return u})),n.d(e,"__awaiter",(function(){return l})),n.d(e,"__generator",(function(){return p})),n.d(e,"__createBinding",(function(){return f})),n.d(e,"__exportStar",(function(){return h})),n.d(e,"__values",(function(){return d})),n.d(e,"__read",(function(){return g})),n.d(e,"__spread",(function(){return y})),n.d(e,"__spreadArrays",(function(){return m})),n.d(e,"__await",(function(){return v})),n.d(e,"__asyncGenerator",(function(){return _})),n.d(e,"__asyncDelegator",(function(){return b})),n.d(e,"__asyncValues",(function(){return C})),n.d(e,"__makeTemplateObject",(function(){return w})),n.d(e,"__importStar",(function(){return A})),n.d(e,"__importDefault",(function(){return x})),n.d(e,"__classPrivateFieldGet",(function(){return T})),n.d(e,"__classPrivateFieldSet",(function(){return E}));
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
var r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function o(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var i=function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};function a(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n}function s(t,e,n,r){var o,i=arguments.length,a=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,n,a):o(e,n))||a);return i>3&&a&&Object.defineProperty(e,n,a),a}function c(t,e){return function(n,r){e(n,r,t)}}function u(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function l(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{c(r.next(t))}catch(t){i(t)}}function s(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}c((r=r.apply(t,e||[])).next())}))}function p(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}function f(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}function h(t,e){for(var n in t)"default"===n||e.hasOwnProperty(n)||(e[n]=t[n])}function d(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function g(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function y(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(g(arguments[e]));return t}function m(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var r=Array(t),o=0;for(e=0;e<n;e++)for(var i=arguments[e],a=0,s=i.length;a<s;a++,o++)r[o]=i[a];return r}function v(t){return this instanceof v?(this.v=t,this):new v(t)}function _(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(t,e||[]),i=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(t){o[t]&&(r[t]=function(e){return new Promise((function(n,r){i.push([t,e,n,r])>1||s(t,e)}))})}function s(t,e){try{(n=o[t](e)).value instanceof v?Promise.resolve(n.value.v).then(c,u):l(i[0][2],n)}catch(t){l(i[0][3],t)}var n}function c(t){s("next",t)}function u(t){s("throw",t)}function l(t,e){t(e),i.shift(),i.length&&s(i[0][0],i[0][1])}}function b(t){var e,n;return e={},r("next"),r("throw",(function(t){throw t})),r("return"),e[Symbol.iterator]=function(){return this},e;function r(r,o){e[r]=t[r]?function(e){return(n=!n)?{value:v(t[r](e)),done:"return"===r}:o?o(e):e}:o}}function C(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,n=t[Symbol.asyncIterator];return n?n.call(t):(t=d(t),e={},r("next"),r("throw"),r("return"),e[Symbol.asyncIterator]=function(){return this},e);function r(n){e[n]=t[n]&&function(e){return new Promise((function(r,o){(function(t,e,n,r){Promise.resolve(r).then((function(e){t({value:e,done:n})}),e)})(r,o,(e=t[n](e)).done,e.value)}))}}}function w(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function A(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function x(t){return t&&t.__esModule?t:{default:t}}function T(t,e){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return e.get(t)}function E(t,e,n){if(!e.has(t))throw new TypeError("attempted to set private field on non-instance");return e.set(t,n),n}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(5),o={},i=function(){function t(){}return t.registerType=function(t,e){o[t]=e},t.createObject=function(t){var e="";t instanceof r.KalturaObjectBase?e=t.getTypeName():"string"==typeof t&&(e=t);var n=e?o[e]:null;return n?new n:null},t}();e.KalturaTypesFactory=i},function(t,e){t.exports=KalturaPlayer.ui.preact},function(t,e,n){"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n=function(t,e){var n=t[1]||"",r=t[3];if(!r)return n;if(e&&"function"==typeof btoa){var o=(a=r,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(a))))+" */"),i=r.sources.map((function(t){return"/*# sourceURL="+r.sourceRoot+t+" */"}));return[n].concat(i).concat([o]).join("\n")}var a;return[n].join("\n")}(e,t);return e[2]?"@media "+e[2]+"{"+n+"}":n})).join("")},e.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var r={},o=0;o<this.length;o++){var i=this[o][0];null!=i&&(r[i]=!0)}for(o=0;o<t.length;o++){var a=t[o];null!=a[0]&&r[a[0]]||(n&&!a[2]?a[2]=n:n&&(a[2]="("+a[2]+") and ("+n+")"),e.push(a))}},e}},function(t,e,n){var r,o,i={},a=(r=function(){return window&&document&&document.all&&!window.atob},function(){return void 0===o&&(o=r.apply(this,arguments)),o}),s=function(t,e){return e?e.querySelector(t):document.querySelector(t)},c=function(t){var e={};return function(t,n){if("function"==typeof t)return t();if(void 0===e[t]){var r=s.call(this,t,n);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(t){r=null}e[t]=r}return e[t]}}(),u=null,l=0,p=[],f=n(115);function h(t,e){for(var n=0;n<t.length;n++){var r=t[n],o=i[r.id];if(o){o.refs++;for(var a=0;a<o.parts.length;a++)o.parts[a](r.parts[a]);for(;a<r.parts.length;a++)o.parts.push(_(r.parts[a],e))}else{var s=[];for(a=0;a<r.parts.length;a++)s.push(_(r.parts[a],e));i[r.id]={id:r.id,refs:1,parts:s}}}}function d(t,e){for(var n=[],r={},o=0;o<t.length;o++){var i=t[o],a=e.base?i[0]+e.base:i[0],s={css:i[1],media:i[2],sourceMap:i[3]};r[a]?r[a].parts.push(s):n.push(r[a]={id:a,parts:[s]})}return n}function g(t,e){var n=c(t.insertInto);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var r=p[p.length-1];if("top"===t.insertAt)r?r.nextSibling?n.insertBefore(e,r.nextSibling):n.appendChild(e):n.insertBefore(e,n.firstChild),p.push(e);else if("bottom"===t.insertAt)n.appendChild(e);else{if("object"!=typeof t.insertAt||!t.insertAt.before)throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");var o=c(t.insertAt.before,n);n.insertBefore(e,o)}}function y(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t);var e=p.indexOf(t);e>=0&&p.splice(e,1)}function m(t){var e=document.createElement("style");if(void 0===t.attrs.type&&(t.attrs.type="text/css"),void 0===t.attrs.nonce){var r=function(){0;return n.nc}();r&&(t.attrs.nonce=r)}return v(e,t.attrs),g(t,e),e}function v(t,e){Object.keys(e).forEach((function(n){t.setAttribute(n,e[n])}))}function _(t,e){var n,r,o,i;if(e.transform&&t.css){if(!(i="function"==typeof e.transform?e.transform(t.css):e.transform.default(t.css)))return function(){};t.css=i}if(e.singleton){var a=l++;n=u||(u=m(e)),r=w.bind(null,n,a,!1),o=w.bind(null,n,a,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(t){var e=document.createElement("link");return void 0===t.attrs.type&&(t.attrs.type="text/css"),t.attrs.rel="stylesheet",v(e,t.attrs),g(t,e),e}(e),r=x.bind(null,n,e),o=function(){y(n),n.href&&URL.revokeObjectURL(n.href)}):(n=m(e),r=A.bind(null,n),o=function(){y(n)});return r(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;r(t=e)}else o()}}t.exports=function(t,e){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(e=e||{}).attrs="object"==typeof e.attrs?e.attrs:{},e.singleton||"boolean"==typeof e.singleton||(e.singleton=a()),e.insertInto||(e.insertInto="head"),e.insertAt||(e.insertAt="bottom");var n=d(t,e);return h(n,e),function(t){for(var r=[],o=0;o<n.length;o++){var a=n[o];(s=i[a.id]).refs--,r.push(s)}t&&h(d(t,e),e);for(o=0;o<r.length;o++){var s;if(0===(s=r[o]).refs){for(var c=0;c<s.parts.length;c++)s.parts[c]();delete i[s.id]}}}};var b,C=(b=[],function(t,e){return b[t]=e,b.filter(Boolean).join("\n")});function w(t,e,n,r){var o=n?"":r.css;if(t.styleSheet)t.styleSheet.cssText=C(e,o);else{var i=document.createTextNode(o),a=t.childNodes;a[e]&&t.removeChild(a[e]),a.length?t.insertBefore(i,a[e]):t.appendChild(i)}}function A(t,e){var n=e.css,r=e.media;if(r&&t.setAttribute("media",r),t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}function x(t,e,n){var r=n.css,o=n.sourceMap,i=void 0===e.convertToAbsoluteUrls&&o;(e.convertToAbsoluteUrls||i)&&(r=f(r)),o&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */");var a=new Blob([r],{type:"text/css"}),s=t.href;t.href=URL.createObjectURL(a),s&&URL.revokeObjectURL(s)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(62),o=n(1),i=new(n(63).KalturaLogger)("KalturaObjectBase"),a=function(){function t(t){this._allowedEmptyArray=[],this._dependentProperties={},t&&Object.assign(this,t),void 0===this.relatedObjects&&(this.relatedObjects={})}return t.prototype.allowEmptyArray=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n=this._getMetadata().properties,r=0,o=t;r<o.length;r++){var a=o[r],s=n[a];s?"a"!==s.type?i.warn("ignore property '"+a+"' flaged to allow empty array as it is not of type array (did you set the right property in method 'allowEmptyArray'?)"):this._allowedEmptyArray.push(a):i.warn("ignore property '"+a+"' flaged to allow empty array as it doesn't not exists on type (did you set the right property in method 'allowEmptyArray'?)")}return this},t.prototype.setData=function(t){return t&&t(this),this},t.prototype.getTypeName=function(){return this._getMetadata().properties.objectType.default},t.prototype._getMetadata=function(){return{properties:{relatedObjects:{type:"m",readOnly:!0,subTypeConstructor:null,subType:"KalturaListResponse"}}}},t.prototype.hasMetadataProperty=function(t){return!!this._getMetadata().properties[t]},t.prototype.toRequestObject=function(){var t=this,e=this._getMetadata(),n={};try{Object.keys(e.properties).forEach((function(r){var o=e.properties[r],i=t._createRequestPropertyValue(r,o);switch(i.status){case"exists":n[r]=i.value;break;case"removed":n[r+"__null"]=""}}))}catch(t){throw i.warn(t.message),t}return n},t.prototype.fromResponseObject=function(t){var e=this,n=this._getMetadata();try{Object.keys(n.properties).forEach((function(r){var o=n.properties[r],i=e._parseResponseProperty(r,o,t);null!=i&&void 0!==i&&(e[r]=i)}))}catch(t){throw i.warn(t.message),t}return{}},t.prototype._parseResponseProperty=function(t,e,n){var o,i=this,a=t?n[t]:n;if(void 0!==a)if(null===a)o=null;else switch(e.type){case"b":"boolean"==typeof a?o=a:a+""=="0"?o=!1:a+""=="1"&&(o=!0);break;case"s":o=a+"";break;case"n":case"en":o=1*a;break;case"es":o=null!=a?a.toString():void 0;break;case"o":var s=a.objectType;if(!s)throw new Error("Failed to create kaltura object for property '"+t+"' (type '"+e.subType+"'). provided response object is missing property 'objectType'.");if(!(o=this._createKalturaObject(s,e.subType)))throw new Error("Failed to create kaltura object of type '"+n.objectType+"' (fallback type '"+e.subType+"')");o.fromResponseObject(a);break;case"m":var c={};if(!(a instanceof Object))throw new Error("failed to parse property '"+t+". Expected type object, got type '"+typeof a);Object.keys(a).forEach((function(t){var n=a[t],r=i._createKalturaObject(n.objectType,e.subType);if(!n||!r)throw new Error("Failed to create kaltura object for type '"+e.subType+"'");r.fromResponseObject(n),c[t]=r})),o=c;break;case"a":if(!(a instanceof Array))throw new Error("failed to parse property '"+t+". Expected type array, got type '"+typeof a);var u=[];a.forEach((function(t){var n=i._createKalturaObject(t.objectType,e.subType);if(!n)throw new Error("Failed to create kaltura object for type '"+t.objectType+"' and for fallback type '"+e.subType+"'");n.fromResponseObject(t),u.push(n)})),o=u;break;case"d":if(!this._isNumeric(a))throw new Error("failed to parse property '"+t+". Expected type date, got type '"+typeof a);o=r.KalturaClientUtils.fromServerDate(1*a)}return o},t.prototype._isNumeric=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},t.prototype._createKalturaObject=function(t,e){var n=null,r=!1;return t&&(n=o.KalturaTypesFactory.createObject(t)),!n&&e&&(r=!0,n=o.KalturaTypesFactory.createObject(e)),r&&n?i.warn("[kaltura-client]: Could not find object type '"+t+"', Falling back to '"+e+"' object type. (Did you remember to set your accepted object types in the request “config.acceptedTypes” attribute?)"):n||i.warn("[kaltura-client]: Could not find object type '"+t+"'. (Did you remember to set your accepted object types in the request “config.acceptedTypes” attribute?)"),n},t.prototype._createRequestPropertyValue=function(e,n){var o={status:"missing"};if("c"===n.type)n.default&&(o={status:"exists",value:n.default});else if(this._dependentProperties[e]){var i=this._dependentProperties[e];o={status:"exists",value:"{"+i.request+":result"+(i.targetPath?":"+i.targetPath:"")+"}"}}else if(!n.readOnly){var a=this[e];if(void 0!==a)if(null===a)o={status:"removed"};else switch(n.type){case"b":o={status:"exists",value:a};break;case"s":o={status:"exists",value:a+""};break;case"n":case"en":o={status:"exists",value:1*a};break;case"o":if(!(a instanceof t))throw new Error("failed to parse property. Expected '"+e+" to be kaltura object");o={status:"exists",value:a.toRequestObject()};break;case"a":if(!(a instanceof Array))throw new Error("failed to parse property. Expected '"+e+" to be Array");var s=[];if(a.forEach((function(e){e instanceof t&&s.push(e.toRequestObject())})),-1!==this._allowedEmptyArray.indexOf(e)||0!==s.length){if(s.length!==a.length)throw new Error("failed to parse array. Expected all '"+e+" items to be kaltura object");o={status:"exists",value:s}}break;case"m":if(!(a instanceof Object))throw new Error("failed to parse property. Expected '"+e+" to be kaltura object");var c=Object.keys(a);if(c.length>0){var u={};if(c.forEach((function(e){var n=a[e];n instanceof t&&(u[e]=n.toRequestObject())})),c.length!==Object.keys(u).length)throw new Error("failed to parse map. Expected all '"+e+" items to be kaltura object");o={status:"exists",value:u}}break;case"d":if(!(a instanceof Date))throw new Error("failed to parse property. Expected '"+e+" to be date");o={status:"exists",value:r.KalturaClientUtils.toServerDate(a)};break;case"es":o={status:"exists",value:"string"==typeof a?a:void 0};break;case"f":a instanceof FormData&&(o={status:"exists",value:a})}}return o},t.prototype.setDependency=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n=0,r=t.length;n<r;n++){var o=t[n],i=o,a=i.property,s=i.request,c=i.targetPath;o instanceof Array&&(a=o[0],s=o[1],c=3===o.length?o[2]:null),s+=1,this._dependentProperties[a]={property:a,request:s,targetPath:c}}return this},t}();e.KalturaObjectBase=a},function(t,e,n){window,t.exports=function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=62)}([function(t,e,n){(function(e){var n=function(t){return t&&t.Math==Math&&t};t.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof e&&e)||Function("return this")()}).call(this,n(66))},function(t,e,n){var r=n(0),o=n(18),i=n(42),a=n(70),s=r.Symbol,c=o("wks");t.exports=function(t){return c[t]||(c[t]=a&&s[t]||(a?s:i)("Symbol."+t))}},function(t,e,n){var r=n(8);t.exports=function(t){if(!r(t))throw TypeError(String(t)+" is not an object");return t}},function(t,e,n){var r=n(6),o=n(11),i=n(19);t.exports=r?function(t,e,n){return o.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,n){var r=n(0),o=n(30).f,i=n(3),a=n(10),s=n(24),c=n(73),u=n(50);t.exports=function(t,e){var n,l,p,f,h,d=t.target,g=t.global,y=t.stat;if(n=g?r:y?r[d]||s(d,{}):(r[d]||{}).prototype)for(l in e){if(f=e[l],p=t.noTargetGet?(h=o(n,l))&&h.value:n[l],!u(g?l:d+(y?".":"#")+l,t.forced)&&void 0!==p){if(typeof f==typeof p)continue;c(f,p)}(t.sham||p&&p.sham)&&i(f,"sham",!0),a(n,l,f,t)}}},function(t,e,n){var r=n(4);t.exports=!r((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,n){var r=n(21),o=n(0),i=function(t){return"function"==typeof t?t:void 0};t.exports=function(t,e){return arguments.length<2?i(r[t])||i(o[t]):r[t]&&r[t][e]||o[t]&&o[t][e]}},function(t,e,n){var r=n(0),o=n(18),i=n(3),a=n(7),s=n(24),c=n(41),u=n(14),l=u.get,p=u.enforce,f=String(c).split("toString");o("inspectSource",(function(t){return c.call(t)})),(t.exports=function(t,e,n,o){var c=!!o&&!!o.unsafe,u=!!o&&!!o.enumerable,l=!!o&&!!o.noTargetGet;"function"==typeof n&&("string"!=typeof e||a(n,"name")||i(n,"name",e),p(n).source=f.join("string"==typeof e?e:"")),t!==r?(c?!l&&t[e]&&(u=!0):delete t[e],u?t[e]=n:i(t,e,n)):u?t[e]=n:s(e,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&l(this).source||c.call(this)}))},function(t,e,n){var r=n(6),o=n(39),i=n(2),a=n(40),s=Object.defineProperty;e.f=r?s:function(t,e,n){if(i(t),e=a(e,!0),i(n),o)try{return s(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t}},function(t,e){t.exports=!1},function(t,e,n){var r,o,i,a=n(68),s=n(0),c=n(8),u=n(3),l=n(7),p=n(26),f=n(27),h=s.WeakMap;if(a){var d=new h,g=d.get,y=d.has,m=d.set;r=function(t,e){return m.call(d,t,e),e},o=function(t){return g.call(d,t)||{}},i=function(t){return y.call(d,t)}}else{var v=p("state");f[v]=!0,r=function(t,e){return u(t,v,e),e},o=function(t){return l(t,v)?t[v]:{}},i=function(t){return l(t,v)}}t.exports={set:r,get:o,has:i,enforce:function(t){return i(t)?o(t):r(t,{})},getterFor:function(t){return function(e){var n;if(!c(e)||(n=o(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return n}}}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e){t.exports={}},function(t,e,n){"use strict";var r=n(12),o=function(t){var e,n;this.promise=new t((function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r})),this.resolve=r(e),this.reject=r(n)};t.exports.f=function(t){return new o(t)}},function(t,e,n){var r=n(13),o=n(67);(t.exports=function(t,e){return o[t]||(o[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.3.5",mode:r?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,n){var r=n(46),o=n(29);t.exports=function(t){return r(o(t))}},function(t,e,n){t.exports=n(0)},function(t,e,n){var r=n(2),o=n(90),i=n(48),a=n(55),s=n(91),c=n(92),u=function(t,e){this.stopped=t,this.result=e};(t.exports=function(t,e,n,l,p){var f,h,d,g,y,m,v,_=a(e,n,l?2:1);if(p)f=t;else{if("function"!=typeof(h=s(t)))throw TypeError("Target is not iterable");if(o(h)){for(d=0,g=i(t.length);g>d;d++)if((y=l?_(r(v=t[d])[0],v[1]):_(t[d]))&&y instanceof u)return y;return new u(!1)}f=h.call(t)}for(m=f.next;!(v=m.call(f)).done;)if("object"==typeof(y=c(f,_,v.value,l))&&y&&y instanceof u)return y;return new u(!1)}).stop=function(t){return new u(!0,t)}},function(t,e){t.exports=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}}},function(t,e,n){var r=n(0),o=n(3);t.exports=function(t,e){try{o(r,t,e)}catch(n){r[t]=e}return e}},function(t,e,n){var r=n(0),o=n(8),i=r.document,a=o(i)&&o(i.createElement);t.exports=function(t){return a?i.createElement(t):{}}},function(t,e,n){var r=n(18),o=n(42),i=r("keys");t.exports=function(t){return i[t]||(i[t]=o(t))}},function(t,e){t.exports={}},function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},function(t,e){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,n){var r=n(6),o=n(45),i=n(19),a=n(20),s=n(40),c=n(7),u=n(39),l=Object.getOwnPropertyDescriptor;e.f=r?l:function(t,e){if(t=a(t),e=s(e,!0),u)try{return l(t,e)}catch(t){}if(c(t,e))return i(!o.f.call(t,e),t[e])}},function(t,e){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(t,e,n){var r=n(7),o=n(33),i=n(26),a=n(79),s=i("IE_PROTO"),c=Object.prototype;t.exports=a?Object.getPrototypeOf:function(t){return t=o(t),r(t,s)?t[s]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?c:null}},function(t,e,n){var r=n(29);t.exports=function(t){return Object(r(t))}},function(t,e,n){var r=n(2),o=n(80),i=n(31),a=n(27),s=n(52),c=n(25),u=n(26)("IE_PROTO"),l=function(){},p=function(){var t,e=c("iframe"),n=i.length;for(e.style.display="none",s.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),p=t.F;n--;)delete p.prototype[i[n]];return p()};t.exports=Object.create||function(t,e){var n;return null!==t?(l.prototype=r(t),n=new l,l.prototype=null,n[u]=t):n=p(),void 0===e?n:o(n,e)},a[u]=!0},function(t,e,n){var r=n(47),o=n(31);t.exports=Object.keys||function(t){return r(t,o)}},function(t,e,n){var r=n(11).f,o=n(7),i=n(1)("toStringTag");t.exports=function(t,e,n){t&&!o(t=n?t:t.prototype,i)&&r(t,i,{configurable:!0,value:e})}},function(t,e,n){var r=n(9);t.exports=r("navigator","userAgent")||""},function(t,e,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.ObjectUtils=void 0;var o=function(){function t(){}return t.copyDeep=function(e){var n;return Array.isArray(e)?(n=e.length>0?e.slice(0):[]).forEach((function(e,r){("object"==typeof e&&e!=={}||Array.isArray(e)&&e.length>0)&&(n[r]=t.copyDeep(e))})):"object"==typeof e?(n=Object.assign({},e),Object.keys(n).forEach((function(e){("object"==typeof n[e]&&n[e]!=={}||Array.isArray(n[e])&&n[e].length>0)&&(n[e]=t.copyDeep(n[e]))}))):n=e,n},t.isObject=function(t){return t&&"object"==typeof t&&!Array.isArray(t)},t.mergeDeep=function(e,n,r){var o,i;if(!n.length)return e;var a=(r?r.explicitMerge:null)||[],s=n.shift();if(t.isObject(e)&&t.isObject(s))for(var c in s)t.isObject(s[c])?(e[c]||Object.assign(e,((o={})[c]={},o)),-1!==a.indexOf(c)?e[c]=t.explicitFlatMerge(e[c],s[c]):t.mergeDeep(e[c],[s[c]],r)):Object.assign(e,((i={})[c]=s[c],i));return t.mergeDeep(e,n,r)},t.mergeDefaults=function(e,n,r){return t.mergeDeep({},[n,e],r)},t.explicitFlatMerge=function(t,e){var n=r({},t);return Object.keys(e).forEach((function(t){null===e[t]||0===Object.keys(e[t]).length?delete n[t]:n[t]=e[t]})),n},t.get=function(t,e,n){for(var r=function(t){var e=[];return t.split(".").forEach((function(t){t.split(/\[([^}]+)\]/g).forEach((function(t){t.length>0&&e.push(t)}))})),e}(e),o=t,i=0;i<r.length;i++){if(!o[r[i]])return n;o=o[r[i]]}return o},t}();e.ObjectUtils=o},function(t,e,n){var r=n(6),o=n(4),i=n(25);t.exports=!r&&!o((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},function(t,e,n){var r=n(8);t.exports=function(t,e){if(!r(t))return t;var n,o;if(e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!r(o=n.call(t)))return o;if(!e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},function(t,e,n){var r=n(18);t.exports=r("native-function-to-string",Function.toString)},function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++n+r).toString(36)}},function(t,e,n){var r=n(15),o=n(1)("toStringTag"),i="Arguments"==r(function(){return arguments}());t.exports=function(t){var e,n,a;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),o))?n:i?r(e):"Object"==(a=r(e))&&"function"==typeof e.callee?"Arguments":a}},function(t,e,n){"use strict";var r=n(5),o=n(78),i=n(32),a=n(53),s=n(36),c=n(3),u=n(10),l=n(1),p=n(13),f=n(16),h=n(51),d=h.IteratorPrototype,g=h.BUGGY_SAFARI_ITERATORS,y=l("iterator"),m=function(){return this};t.exports=function(t,e,n,l,h,v,_){o(n,e,l);var b,C,w,A=function(t){if(t===h&&k)return k;if(!g&&t in E)return E[t];switch(t){case"keys":case"values":case"entries":return function(){return new n(this,t)}}return function(){return new n(this)}},x=e+" Iterator",T=!1,E=t.prototype,P=E[y]||E["@@iterator"]||h&&E[h],k=!g&&P||A(h),S="Array"==e&&E.entries||P;if(S&&(b=i(S.call(new t)),d!==Object.prototype&&b.next&&(p||i(b)===d||(a?a(b,d):"function"!=typeof b[y]&&c(b,y,m)),s(b,x,!0,!0),p&&(f[x]=m))),"values"==h&&P&&"values"!==P.name&&(T=!0,k=function(){return P.call(this)}),p&&!_||E[y]===k||c(E,y,k),f[e]=k,h)if(C={values:A("values"),keys:v?k:A("keys"),entries:A("entries")},_)for(w in C)(g||T||!(w in E))&&u(E,w,C[w]);else r({target:e,proto:!0,forced:g||T},C);return C}},function(t,e,n){"use strict";var r={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor,i=o&&!r.call({1:2},1);e.f=i?function(t){var e=o(this,t);return!!e&&e.enumerable}:r},function(t,e,n){var r=n(4),o=n(15),i="".split;t.exports=r((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==o(t)?i.call(t,""):Object(t)}:Object},function(t,e,n){var r=n(7),o=n(20),i=n(76).indexOf,a=n(27);t.exports=function(t,e){var n,s=o(t),c=0,u=[];for(n in s)!r(a,n)&&r(s,n)&&u.push(n);for(;e.length>c;)r(s,n=e[c++])&&(~i(u,n)||u.push(n));return u}},function(t,e,n){var r=n(28),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,n){var r=n(4),o=/#|\.prototype\./,i=function(t,e){var n=s[a(t)];return n==u||n!=c&&("function"==typeof e?r(e):!!e)},a=i.normalize=function(t){return String(t).replace(o,".").toLowerCase()},s=i.data={},c=i.NATIVE="N",u=i.POLYFILL="P";t.exports=i},function(t,e,n){"use strict";var r,o,i,a=n(32),s=n(3),c=n(7),u=n(1),l=n(13),p=u("iterator"),f=!1;[].keys&&("next"in(i=[].keys())?(o=a(a(i)))!==Object.prototype&&(r=o):f=!0),null==r&&(r={}),l||c(r,p)||s(r,p,(function(){return this})),t.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:f}},function(t,e,n){var r=n(9);t.exports=r("document","documentElement")},function(t,e,n){var r=n(2),o=n(81);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),e=n instanceof Array}catch(t){}return function(n,i){return r(n),o(i),e?t.call(n,i):n.__proto__=i,n}}():void 0)},function(t,e,n){var r=n(0);t.exports=r.Promise},function(t,e,n){var r=n(12);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 0:return function(){return t.call(e)};case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}}},function(t,e,n){var r=n(2),o=n(12),i=n(1)("species");t.exports=function(t,e){var n,a=r(t).constructor;return void 0===a||null==(n=r(a)[i])?e:o(n)}},function(t,e,n){var r,o,i,a=n(0),s=n(4),c=n(15),u=n(55),l=n(52),p=n(25),f=n(37),h=a.location,d=a.setImmediate,g=a.clearImmediate,y=a.process,m=a.MessageChannel,v=a.Dispatch,_=0,b={},C=function(t){if(b.hasOwnProperty(t)){var e=b[t];delete b[t],e()}},w=function(t){return function(){C(t)}},A=function(t){C(t.data)},x=function(t){a.postMessage(t+"",h.protocol+"//"+h.host)};d&&g||(d=function(t){for(var e=[],n=1;arguments.length>n;)e.push(arguments[n++]);return b[++_]=function(){("function"==typeof t?t:Function(t)).apply(void 0,e)},r(_),_},g=function(t){delete b[t]},"process"==c(y)?r=function(t){y.nextTick(w(t))}:v&&v.now?r=function(t){v.now(w(t))}:m&&!/(iphone|ipod|ipad).*applewebkit/i.test(f)?(i=(o=new m).port2,o.port1.onmessage=A,r=u(i.postMessage,i,1)):!a.addEventListener||"function"!=typeof postMessage||a.importScripts||s(x)?r="onreadystatechange"in p("script")?function(t){l.appendChild(p("script")).onreadystatechange=function(){l.removeChild(this),C(t)}}:function(t){setTimeout(w(t),0)}:(r=x,a.addEventListener("message",A,!1))),t.exports={set:d,clear:g}},function(t,e,n){var r=n(2),o=n(8),i=n(17);t.exports=function(t,e){if(r(t),o(e)&&e.constructor===t)return e;var n=i.f(t);return(0,n.resolve)(e),n.promise}},function(t,e,n){"use strict";var r=n(5),o=n(12),i=n(17),a=n(23),s=n(22);r({target:"Promise",stat:!0},{allSettled:function(t){var e=this,n=i.f(e),r=n.resolve,c=n.reject,u=a((function(){var n=o(e.resolve),i=[],a=0,c=1;s(t,(function(t){var o=a++,s=!1;i.push(void 0),c++,n.call(e,t).then((function(t){s||(s=!0,i[o]={status:"fulfilled",value:t},--c||r(i))}),(function(t){s||(s=!0,i[o]={status:"rejected",reason:t},--c||r(i))}))})),--c||r(i)}));return u.error&&c(u.value),n.promise}})},function(t,e,n){"use strict";function r(t){var e=t.kalturaPlayer,n=t.loggerName,r=e?e.getLogger:KalturaPlayer.ui.utils.getLogger;if(!r)return null;var o=r(n);return function(t){return t&&"setLevel"in t}(o)?o:null}Object.defineProperty(e,"__esModule",{value:!0}),e.enableLogIfNeeded=e.getContribLogger=e.ProxyLogger=e.NoopLogger=void 0;var o=function(){function t(){}return t.prototype.debug=function(t,e){},t.prototype.info=function(t,e){},t.prototype.trace=function(t,e){},t.prototype.warn=function(t,e){},t.prototype.error=function(t,e){},t}();e.NoopLogger=o;var i=r({}),a=new o,s=function(){function t(t,e){this._logger=t,this._defaultOptions=e}return t.prototype._log=function(t,e,n,r){var o=r.class||this._defaultOptions.class||"_",i=this._defaultOptions.module||"",a=r.method?"."+r.method+"()":"",s="["+i+"::"+o+"("+(this._defaultOptions.context?"'"+this._defaultOptions.context+"'":"")+")"+a+"] "+n;r.data?this._logger[t](s,r.data):this._logger[t](s)},t.prototype.debug=function(t,e){i&&this._log("debug",i.DEBUG,t,e)},t.prototype.info=function(t,e){i&&this._log("info",i.INFO,t,e)},t.prototype.trace=function(t,e){i&&this._log("trace",i.TRACE,t,e)},t.prototype.warn=function(t,e){i&&this._log("warn",i.WARN,t,e)},t.prototype.error=function(t,e){i&&this._log("error",i.ERROR,t,e)},t}();e.ProxyLogger=s,e.getContribLogger=function(t){void 0===t&&(t={});var e=t.kalturaPlayer,n=r({kalturaPlayer:e,loggerName:(e?e._playerId:"global")+"_contrib"});return n?new s(n,t):a},e.enableLogIfNeeded=function(){try{if(-1!==document.URL.indexOf("debugKalturaPlayer")){var t=r({});if(!t)return;t.setLevel(t.TRACE)}}catch(t){}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UUID=void 0;var r=n(116),o=function(){function t(){}return t.uuidV1=function(){return r.v1()},t.uuidV5=function(t,e){return r.v5(t,e)},t.numberedUuidV1=function(){for(var e=t.uuidV1(),n="",r=0;r<e.length;r++){var o=e.charAt(r);n+=Number.isNaN(+o)?o.charCodeAt(0):o}return n},t}();e.UUID=o},function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||e.hasOwnProperty(n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),n(63),n(102),n(106),Number.isNaN=Number.isNaN||function(t){return null!==t&&(t!=t||+t!=t)},o(n(109),e),o(n(110),e),o(n(111),e),o(n(112),e),o(n(60),e),o(n(61),e),o(n(113),e),o(n(38),e),o(n(114),e),o(n(115),e)},function(t,e,n){t.exports=n(64),n(98),n(99),n(100),n(101)},function(t,e,n){n(65),n(71),n(82),n(86),n(59),n(97);var r=n(21);t.exports=r.Promise},function(t,e,n){var r=n(10),o=n(69),i=Object.prototype;o!==i.toString&&r(i,"toString",o,{unsafe:!0})},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){var r=n(0),o=n(24),i=r["__core-js_shared__"]||o("__core-js_shared__",{});t.exports=i},function(t,e,n){var r=n(0),o=n(41),i=r.WeakMap;t.exports="function"==typeof i&&/native code/.test(o.call(i))},function(t,e,n){"use strict";var r=n(43),o={};o[n(1)("toStringTag")]="z",t.exports="[object z]"!==String(o)?function(){return"[object "+r(this)+"]"}:o.toString},function(t,e,n){var r=n(4);t.exports=!!Object.getOwnPropertySymbols&&!r((function(){return!String(Symbol())}))},function(t,e,n){"use strict";var r=n(72).charAt,o=n(14),i=n(44),a=o.set,s=o.getterFor("String Iterator");i(String,"String",(function(t){a(this,{type:"String Iterator",string:String(t),index:0})}),(function(){var t,e=s(this),n=e.string,o=e.index;return o>=n.length?{value:void 0,done:!0}:(t=r(n,o),e.index+=t.length,{value:t,done:!1})}))},function(t,e,n){var r=n(28),o=n(29),i=function(t){return function(e,n){var i,a,s=String(o(e)),c=r(n),u=s.length;return c<0||c>=u?t?"":void 0:(i=s.charCodeAt(c))<55296||i>56319||c+1===u||(a=s.charCodeAt(c+1))<56320||a>57343?t?s.charAt(c):i:t?s.slice(c,c+2):a-56320+(i-55296<<10)+65536}};t.exports={codeAt:i(!1),charAt:i(!0)}},function(t,e,n){var r=n(7),o=n(74),i=n(30),a=n(11);t.exports=function(t,e){for(var n=o(e),s=a.f,c=i.f,u=0;u<n.length;u++){var l=n[u];r(t,l)||s(t,l,c(e,l))}}},function(t,e,n){var r=n(9),o=n(75),i=n(49),a=n(2);t.exports=r("Reflect","ownKeys")||function(t){var e=o.f(a(t)),n=i.f;return n?e.concat(n(t)):e}},function(t,e,n){var r=n(47),o=n(31).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,o)}},function(t,e,n){var r=n(20),o=n(48),i=n(77),a=function(t){return function(e,n,a){var s,c=r(e),u=o(c.length),l=i(a,u);if(t&&n!=n){for(;u>l;)if((s=c[l++])!=s)return!0}else for(;u>l;l++)if((t||l in c)&&c[l]===n)return t||l||0;return!t&&-1}};t.exports={includes:a(!0),indexOf:a(!1)}},function(t,e,n){var r=n(28),o=Math.max,i=Math.min;t.exports=function(t,e){var n=r(t);return n<0?o(n+e,0):i(n,e)}},function(t,e,n){"use strict";var r=n(51).IteratorPrototype,o=n(34),i=n(19),a=n(36),s=n(16),c=function(){return this};t.exports=function(t,e,n){var u=e+" Iterator";return t.prototype=o(r,{next:i(1,n)}),a(t,u,!1,!0),s[u]=c,t}},function(t,e,n){var r=n(4);t.exports=!r((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},function(t,e,n){var r=n(6),o=n(11),i=n(2),a=n(35);t.exports=r?Object.defineProperties:function(t,e){i(t);for(var n,r=a(e),s=r.length,c=0;s>c;)o.f(t,n=r[c++],e[n]);return t}},function(t,e,n){var r=n(8);t.exports=function(t){if(!r(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype");return t}},function(t,e,n){var r=n(0),o=n(83),i=n(84),a=n(3),s=n(1),c=s("iterator"),u=s("toStringTag"),l=i.values;for(var p in o){var f=r[p],h=f&&f.prototype;if(h){if(h[c]!==l)try{a(h,c,l)}catch(t){h[c]=l}if(h[u]||a(h,u,p),o[p])for(var d in i)if(h[d]!==i[d])try{a(h,d,i[d])}catch(t){h[d]=i[d]}}}},function(t,e){t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},function(t,e,n){"use strict";var r=n(20),o=n(85),i=n(16),a=n(14),s=n(44),c=a.set,u=a.getterFor("Array Iterator");t.exports=s(Array,"Array",(function(t,e){c(this,{type:"Array Iterator",target:r(t),index:0,kind:e})}),(function(){var t=u(this),e=t.target,n=t.kind,r=t.index++;return!e||r>=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:e[r],done:!1}:{value:[r,e[r]],done:!1}}),"values"),i.Arguments=i.Array,o("keys"),o("values"),o("entries")},function(t,e,n){var r=n(1),o=n(34),i=n(3),a=r("unscopables"),s=Array.prototype;null==s[a]&&i(s,a,o(null)),t.exports=function(t){s[a][t]=!0}},function(t,e,n){"use strict";var r,o,i,a,s=n(5),c=n(13),u=n(0),l=n(9),p=n(54),f=n(10),h=n(87),d=n(36),g=n(88),y=n(8),m=n(12),v=n(89),_=n(15),b=n(22),C=n(93),w=n(56),A=n(57).set,x=n(94),T=n(58),E=n(95),P=n(17),k=n(23),S=n(14),O=n(50),B=n(1),M=n(96),j=B("species"),R="Promise",I=S.get,L=S.set,N=S.getterFor(R),F=p,D=u.TypeError,K=u.document,U=u.process,q=l("fetch"),z=P.f,V=z,W="process"==_(U),H=!!(K&&K.createEvent&&u.dispatchEvent),Y=O(R,(function(){if(66===M)return!0;if(!W&&"function"!=typeof PromiseRejectionEvent)return!0;if(c&&!F.prototype.finally)return!0;if(M>=51&&/native code/.test(F))return!1;var t=F.resolve(1),e=function(t){t((function(){}),(function(){}))};return(t.constructor={})[j]=e,!(t.then((function(){}))instanceof e)})),G=Y||!C((function(t){F.all(t).catch((function(){}))})),X=function(t){var e;return!(!y(t)||"function"!=typeof(e=t.then))&&e},Q=function(t,e,n){if(!e.notified){e.notified=!0;var r=e.reactions;x((function(){for(var o=e.value,i=1==e.state,a=0;r.length>a;){var s,c,u,l=r[a++],p=i?l.ok:l.fail,f=l.resolve,h=l.reject,d=l.domain;try{p?(i||(2===e.rejection&&tt(t,e),e.rejection=1),!0===p?s=o:(d&&d.enter(),s=p(o),d&&(d.exit(),u=!0)),s===l.promise?h(D("Promise-chain cycle")):(c=X(s))?c.call(s,f,h):f(s)):h(o)}catch(t){d&&!u&&d.exit(),h(t)}}e.reactions=[],e.notified=!1,n&&!e.rejection&&J(t,e)}))}},Z=function(t,e,n){var r,o;H?((r=K.createEvent("Event")).promise=e,r.reason=n,r.initEvent(t,!1,!0),u.dispatchEvent(r)):r={promise:e,reason:n},(o=u["on"+t])?o(r):"unhandledrejection"===t&&E("Unhandled promise rejection",n)},J=function(t,e){A.call(u,(function(){var n,r=e.value;if($(e)&&(n=k((function(){W?U.emit("unhandledRejection",r,t):Z("unhandledrejection",t,r)})),e.rejection=W||$(e)?2:1,n.error))throw n.value}))},$=function(t){return 1!==t.rejection&&!t.parent},tt=function(t,e){A.call(u,(function(){W?U.emit("rejectionHandled",t):Z("rejectionhandled",t,e.value)}))},et=function(t,e,n,r){return function(o){t(e,n,o,r)}},nt=function(t,e,n,r){e.done||(e.done=!0,r&&(e=r),e.value=n,e.state=2,Q(t,e,!0))},rt=function(t,e,n,r){if(!e.done){e.done=!0,r&&(e=r);try{if(t===n)throw D("Promise can't be resolved itself");var o=X(n);o?x((function(){var r={done:!1};try{o.call(n,et(rt,t,r,e),et(nt,t,r,e))}catch(n){nt(t,r,n,e)}})):(e.value=n,e.state=1,Q(t,e,!1))}catch(n){nt(t,{done:!1},n,e)}}};Y&&(F=function(t){v(this,F,R),m(t),r.call(this);var e=I(this);try{t(et(rt,this,e),et(nt,this,e))}catch(t){nt(this,e,t)}},(r=function(t){L(this,{type:R,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=h(F.prototype,{then:function(t,e){var n=N(this),r=z(w(this,F));return r.ok="function"!=typeof t||t,r.fail="function"==typeof e&&e,r.domain=W?U.domain:void 0,n.parent=!0,n.reactions.push(r),0!=n.state&&Q(this,n,!1),r.promise},catch:function(t){return this.then(void 0,t)}}),o=function(){var t=new r,e=I(t);this.promise=t,this.resolve=et(rt,t,e),this.reject=et(nt,t,e)},P.f=z=function(t){return t===F||t===i?new o(t):V(t)},c||"function"!=typeof p||(a=p.prototype.then,f(p.prototype,"then",(function(t,e){var n=this;return new F((function(t,e){a.call(n,t,e)})).then(t,e)}),{unsafe:!0}),"function"==typeof q&&s({global:!0,enumerable:!0,forced:!0},{fetch:function(t){return T(F,q.apply(u,arguments))}}))),s({global:!0,wrap:!0,forced:Y},{Promise:F}),d(F,R,!1,!0),g(R),i=l(R),s({target:R,stat:!0,forced:Y},{reject:function(t){var e=z(this);return e.reject.call(void 0,t),e.promise}}),s({target:R,stat:!0,forced:c||Y},{resolve:function(t){return T(c&&this===i?F:this,t)}}),s({target:R,stat:!0,forced:G},{all:function(t){var e=this,n=z(e),r=n.resolve,o=n.reject,i=k((function(){var n=m(e.resolve),i=[],a=0,s=1;b(t,(function(t){var c=a++,u=!1;i.push(void 0),s++,n.call(e,t).then((function(t){u||(u=!0,i[c]=t,--s||r(i))}),o)})),--s||r(i)}));return i.error&&o(i.value),n.promise},race:function(t){var e=this,n=z(e),r=n.reject,o=k((function(){var o=m(e.resolve);b(t,(function(t){o.call(e,t).then(n.resolve,r)}))}));return o.error&&r(o.value),n.promise}})},function(t,e,n){var r=n(10);t.exports=function(t,e,n){for(var o in e)r(t,o,e[o],n);return t}},function(t,e,n){"use strict";var r=n(9),o=n(11),i=n(1),a=n(6),s=i("species");t.exports=function(t){var e=r(t),n=o.f;a&&e&&!e[s]&&n(e,s,{configurable:!0,get:function(){return this}})}},function(t,e){t.exports=function(t,e,n){if(!(t instanceof e))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return t}},function(t,e,n){var r=n(1),o=n(16),i=r("iterator"),a=Array.prototype;t.exports=function(t){return void 0!==t&&(o.Array===t||a[i]===t)}},function(t,e,n){var r=n(43),o=n(16),i=n(1)("iterator");t.exports=function(t){if(null!=t)return t[i]||t["@@iterator"]||o[r(t)]}},function(t,e,n){var r=n(2);t.exports=function(t,e,n,o){try{return o?e(r(n)[0],n[1]):e(n)}catch(e){var i=t.return;throw void 0!==i&&r(i.call(t)),e}}},function(t,e,n){var r=n(1)("iterator"),o=!1;try{var i=0,a={next:function(){return{done:!!i++}},return:function(){o=!0}};a[r]=function(){return this},Array.from(a,(function(){throw 2}))}catch(t){}t.exports=function(t,e){if(!e&&!o)return!1;var n=!1;try{var i={};i[r]=function(){return{next:function(){return{done:n=!0}}}},t(i)}catch(t){}return n}},function(t,e,n){var r,o,i,a,s,c,u,l,p=n(0),f=n(30).f,h=n(15),d=n(57).set,g=n(37),y=p.MutationObserver||p.WebKitMutationObserver,m=p.process,v=p.Promise,_="process"==h(m),b=f(p,"queueMicrotask"),C=b&&b.value;C||(r=function(){var t,e;for(_&&(t=m.domain)&&t.exit();o;){e=o.fn,o=o.next;try{e()}catch(t){throw o?a():i=void 0,t}}i=void 0,t&&t.enter()},_?a=function(){m.nextTick(r)}:y&&!/(iphone|ipod|ipad).*applewebkit/i.test(g)?(s=!0,c=document.createTextNode(""),new y(r).observe(c,{characterData:!0}),a=function(){c.data=s=!s}):v&&v.resolve?(u=v.resolve(void 0),l=u.then,a=function(){l.call(u,r)}):a=function(){d.call(p,r)}),t.exports=C||function(t){var e={fn:t,next:void 0};i&&(i.next=e),o||(o=e,a()),i=e}},function(t,e,n){var r=n(0);t.exports=function(t,e){var n=r.console;n&&n.error&&(1===arguments.length?n.error(t):n.error(t,e))}},function(t,e,n){var r,o,i=n(0),a=n(37),s=i.process,c=s&&s.versions,u=c&&c.v8;u?o=(r=u.split("."))[0]+r[1]:a&&(r=a.match(/Chrome\/(\d+)/))&&(o=r[1]),t.exports=o&&+o},function(t,e,n){"use strict";var r=n(5),o=n(13),i=n(54),a=n(9),s=n(56),c=n(58),u=n(10);r({target:"Promise",proto:!0,real:!0},{finally:function(t){var e=s(this,a("Promise")),n="function"==typeof t;return this.then(n?function(n){return c(e,t()).then((function(){return n}))}:t,n?function(n){return c(e,t()).then((function(){throw n}))}:t)}}),o||"function"!=typeof i||i.prototype.finally||u(i.prototype,"finally",a("Promise").prototype.finally)},function(t,e,n){"use strict";var r=n(5),o=n(6),i=n(32),a=n(53),s=n(34),c=n(11),u=n(19),l=n(22),p=n(3),f=n(2),h=n(14),d=h.set,g=h.getterFor("AggregateError"),y=function(t,e){var n=this;if(!(n instanceof y))return new y(t,e);a&&(n=a(new Error(e),i(n)));var r=[];return l(t,r.push,r),o?d(n,{errors:r,type:"AggregateError"}):n.errors=r,void 0!==e&&p(n,"message",String(e)),n};y.prototype=s(Error.prototype,{constructor:u(5,y),message:u(5,""),name:u(5,"AggregateError"),toString:u(5,(function(){var t=f(this).name;t=void 0===t?"AggregateError":String(t);var e=this.message;return t+": "+(void 0===e?"":String(e))}))}),o&&c.f(y.prototype,"errors",{get:function(){return g(this).errors},configurable:!0}),r({global:!0},{AggregateError:y})},function(t,e,n){n(59)},function(t,e,n){"use strict";var r=n(5),o=n(17),i=n(23);r({target:"Promise",stat:!0},{try:function(t){var e=o.f(this),n=i(t);return(n.error?e.reject:e.resolve)(n.value),e.promise}})},function(t,e,n){"use strict";var r=n(5),o=n(12),i=n(9),a=n(17),s=n(23),c=n(22);r({target:"Promise",stat:!0},{any:function(t){var e=this,n=a.f(e),r=n.resolve,u=n.reject,l=s((function(){var n=o(e.resolve),a=[],s=0,l=1,p=!1;c(t,(function(t){var o=s++,c=!1;a.push(void 0),l++,n.call(e,t).then((function(t){c||p||(p=!0,r(t))}),(function(t){c||p||(c=!0,a[o]=t,--l||u(new(i("AggregateError"))(a,"No one promise resolved")))}))})),--l||u(new(i("AggregateError"))(a,"No one promise resolved"))}));return l.error&&u(l.value),n.promise}})},function(t,e,n){t.exports=n(103)},function(t,e,n){n(104);var r=n(21);t.exports=r.Object.assign},function(t,e,n){var r=n(5),o=n(105);r({target:"Object",stat:!0,forced:Object.assign!==o},{assign:o})},function(t,e,n){"use strict";var r=n(6),o=n(4),i=n(35),a=n(49),s=n(45),c=n(33),u=n(46),l=Object.assign;t.exports=!l||o((function(){var t={},e={},n=Symbol();return t[n]=7,"abcdefghijklmnopqrst".split("").forEach((function(t){e[t]=t})),7!=l({},t)[n]||"abcdefghijklmnopqrst"!=i(l({},e)).join("")}))?function(t,e){for(var n=c(t),o=arguments.length,l=1,p=a.f,f=s.f;o>l;)for(var h,d=u(arguments[l++]),g=p?i(d).concat(p(d)):i(d),y=g.length,m=0;y>m;)h=g[m++],r&&!f.call(d,h)||(n[h]=d[h]);return n}:l},function(t,e,n){t.exports=n(107)},function(t,e,n){n(108);var r=n(21);t.exports=r.Object.keys},function(t,e,n){var r=n(5),o=n(33),i=n(35);r({target:"Object",stat:!0,forced:n(4)((function(){i(1)}))},{keys:function(t){return i(o(t))}})},function(t,e,n){"use strict";var r=this&&this.__spreadArrays||function(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var r=Array(t),o=0;for(e=0;e<n;e++)for(var i=arguments[e],a=0,s=i.length;a<s;a++,o++)r[o]=i[a];return r};Object.defineProperty(e,"__esModule",{value:!0}),e.CuepointEngine=void 0;var o,i=n(60);!function(t){t.Show="show",t.Hide="hide"}(o||(o={}));var a=i.getContribLogger({module:"contrib-common",class:"CuepointEngine"}),s=function(){function t(t,e){this.isFirstTime=!0,this.enabled=!0,this.lastHandledTime=null,this.lastHandledTimeIndex=null,this.nextTimeToHandle=null,this.cuepointChanges=[],a.debug("executed",{method:"ctor"}),this.reasonableSeekThreshold=Math.max(2e3,e&&e.reasonableSeekThreshold||0),this._cuepoints=t,this.prepareCuepoint()}return Object.defineProperty(t.prototype,"cuepoints",{get:function(){return r(this._cuepoints)},enumerable:!1,configurable:!0}),t.prototype.getSnapshot=function(t){var e=this.findClosestLastIndexByTime(t);return a.debug("create snapshot based on time "+t,{method:"getSnapshot",data:{timeIndex:e}}),this.createCuepointSnapshot(e)},t.prototype.updateTime=function(t,e,n){void 0===e&&(e=!1);var r=this.isFirstTime,o=this.lastHandledTime,i=this.nextTimeToHandle;if(0===this.cuepointChanges.length)return r&&(a.info("cuepoint list empty. will always return empty snapshot",{method:"updateTime"}),this.isFirstTime=!1),{snapshot:[]};var s=!r&&null!==o&&null!==i&&(o>t||t-i>this.reasonableSeekThreshold),c=r||null!==this.lastHandledTime&&this.lastHandledTime>t||null!=this.nextTimeToHandle&&t>=this.nextTimeToHandle,u=this.findClosestLastIndexByTime(t),l=u<0?0:this.cuepointChanges[u].time;if(!c)return e?{snapshot:this.createCuepointSnapshot(u,n)}:{delta:this.createEmptyDelta()};if(a.debug("has changes to handle. check if need to return snapshot instead of delta based on provided new time",{method:"updateTime",data:{currentTime:t,closestChangeIndex:u,closestChangeTime:l,lastHandledTime:o,nextTimeToHandle:i,isFirstTime:r}}),r||e||s){a.debug("some conditions doesn't allow returning delta, return snapshot instead",{method:"updateTime",data:{isFirstTime:r,userSeeked:s,forceSnapshot:e}});var p=this.createCuepointSnapshot(u,n);return this.updateInternals(l,u),{snapshot:p}}var f=this.createCuepointDelta(u,n);return this.updateInternals(l,u),{delta:f}},t.prototype.getCurrentCuepointSnapshot=function(){return this.lastHandledTimeIndex?this.createCuepointSnapshot(this.lastHandledTimeIndex):[]},t.prototype.createCuepointSnapshot=function(t,e){if(!this.enabled||t<0||!this.cuepointChanges||0===this.cuepointChanges.length)return a.debug("resulted with empty snapshot",{method:"createCuepointSnapshot",data:{targetIndex:t,enabled:this.enabled,cuepointCount:(this.cuepointChanges||[]).length}}),[];for(var n=[],r=0;r<=t;r++){var i=this.cuepointChanges[r],s=n.indexOf(i.cuePoint);i.type===o.Show?-1===s&&n.push(i.cuePoint):-1!==s&&n.splice(s,1)}return a.debug("resulted snapshot",{method:"createCuepointSnapshot",data:{snapshot:n}}),e&&(n=n.filter(e)),n},t.prototype.createCuepointDelta=function(t,e){if(!this.enabled||!this.cuepointChanges||0===this.cuepointChanges.length)return a.debug("resulted with empty delta",{method:"createCuepointDelta",data:{enabled:this.enabled,cuepointCount:(this.cuepointChanges||[]).length}}),this.createEmptyDelta();var n=this.lastHandledTimeIndex;if(null===n)return a.debug("invalid internal state. resulted with empty delta",{method:"createCuepointDelta"}),this.createEmptyDelta();var r=[],i=[];a.info("find cuepoint that were added or removed",{method:"createCuepointDelta"});for(var s=n+1;s<=t;s++){var c=this.cuepointChanges[s],u=r.indexOf(c.cuePoint);c.type===o.Show?-1===u&&r.push(c.cuePoint):-1!==u?(a.info("cuepoint was marked with type "+c.type+" at "+c.time+". remove from new cuepoint list as it wasn't visible yet",{method:"createCuepointDelta",data:{cuepoint:c.cuePoint}}),r.splice(u,1)):-1===i.indexOf(c.cuePoint)&&(a.info("cuepoint was marked with type "+c.type+" at "+c.time+". add to removed cuepoint list",{method:"createCuepointDelta",data:{cuepoint:c.cuePoint}}),i.push(c.cuePoint))}return a.debug("resulted delta",{method:"createCuepointDelta",data:{newCuepoint:r,removedCuepoint:i}}),e&&(r=r.filter(e),i=i.filter(e)),{show:r,hide:i}},t.prototype.updateInternals=function(t,e){var n=this.cuepointChanges;if(n&&0!==n.length){var r=e>=n.length-1,o=null===e;this.lastHandledTime=t,this.lastHandledTimeIndex=e,this.nextTimeToHandle=o?n[0].time:r?n[n.length-1].time:n[e+1].time,this.isFirstTime=!1}},t.prototype.createEmptyDelta=function(){return{show:[],hide:[]}},t.prototype.binarySearch=function(t,e){if(!t||0===t.length)return null;if(e<t[0].time)return-1;if(e>t[t.length-1].time)return t.length-1;for(var n=0,r=t.length-1;n<=r;){var o=Math.floor((r+n+1)/2);if(e<t[o].time)r=o-1;else{if(!(e>t[o].time))return o;n=o+1}}return Math.min(n,r)},t.prototype.findClosestLastIndexByTime=function(t){var e=this.cuepointChanges,n=this.binarySearch(e,t);if(null===n)return-1;for(var r=e.length;n<r-1&&e[n+1].time===t;)n++;return n},t.prototype.prepareCuepoint=function(){var t=this;(this._cuepoints||[]).forEach((function(e){null!==e.startTime&&void 0!==e.startTime&&e.startTime>=0&&t.cuepointChanges.push({time:e.startTime,type:o.Show,cuePoint:e}),null!==e.endTime&&void 0!==e.endTime&&e.endTime>=0&&t.cuepointChanges.push({time:e.endTime,type:o.Hide,cuePoint:e})})),this.cuepointChanges.sort((function(t,e){return t.time<e.time?-1:t.time===e.time?0:1})),a.debug("tracking "+this.cuepointChanges.length+" changes",{method:"prepareCuepoint",data:{changes:this.cuepointChanges}})},t}();e.CuepointEngine=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PlayerContribRegistry=void 0;var r=function(){function t(){this._cache={}}return t.get=function(e){return e.__contrib__=e.__contrib__||{},e.__contrib__.services=e.__contrib__.services||new t,e.__contrib__.services},t.prototype.get=function(t){var e=this._cache[t];if(!e)throw new Error("cannot find resource with token "+t);return e},t.prototype.register=function(t,e){var n=this._cache[t];return n||(n=this._cache[t]={instance:e()}),n.instance},t}();e.PlayerContribRegistry=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.KalturaLiveServices=void 0;var r=n(61),o=function(){function t(){}return t.getAnonymousUserId=function(e){return"undefined"==typeof Storage?t._generateAnonymousUserId(e):((n=localStorage.getItem("anonymousUserId"))||(n=t._generateAnonymousUserId(e),localStorage.setItem("anonymousUserId",n)),n);var n},t._generateAnonymousUserId=function(t){return"##"+t+"HashSeparator"+r.UUID.numberedUuidV1()+"##"},t}();e.KalturaLiveServices=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EventsManager=void 0;var r=function(){function t(){this._eventListeners={},this._wildcardEventListeners=[]}return t.prototype.on=function(t,e){"*"!==t?(this._eventListeners[t]||(this._eventListeners[t]=[])).push(e):this._wildcardEventListeners.push(e)},t.prototype.off=function(t,e){if("*"!==t){var n=this._eventListeners[t];n&&n.splice(n.indexOf(e)>>>0,1)}else this._wildcardEventListeners.splice(this._wildcardEventListeners.indexOf(e)>>>0,1)},t.prototype.emit=function(t){(this._eventListeners[t.type]||[]).slice().map((function(e){e(t)})),this._wildcardEventListeners.slice().map((function(e){e(t)}))},t}();e.EventsManager=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.debounce=void 0,e.debounce=function(t,e,n){var r;return void 0===e&&(e=50),void 0===n&&(n={isImmediate:!1}),function(){for(var o=this,i=[],a=0;a<arguments.length;a++)i[a]=arguments[a];var s=function(){r=void 0,n.isImmediate||t.apply(o,i)},c=n.isImmediate&&void 0===r;void 0!==r&&clearTimeout(r),r=setTimeout(s,e),c&&t.apply(this,i)}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.KalturaPlayerUtils=void 0;var r=n(38),o=function(){function t(){}return t.getPlayerConfig=function(t,e,n,o){var i=r.ObjectUtils.get(t.config,e,{});return r.ObjectUtils.mergeDefaults(i,n,o)},t}();e.KalturaPlayerUtils=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ArrayUtils=void 0;var r=n(38),o=function(){function t(){}return t.findIndex=function(t,e){for(var n=0;n<t.length;){if(e(t[n]))return n;n++}return-1},t.sortByKey=function(t,e){return t.sort((function(t,n){var o=r.ObjectUtils.get(t,e,null),i=r.ObjectUtils.get(n,e,null);return o<i?-1:o>i?1:0}))},t}();e.ArrayUtils=o},function(t,e,n){"use strict";n.r(e),n.d(e,"v1",(function(){return g})),n.d(e,"v3",(function(){return T})),n.d(e,"v4",(function(){return E})),n.d(e,"v5",(function(){return S})),n.d(e,"NIL",(function(){return O})),n.d(e,"version",(function(){return B})),n.d(e,"validate",(function(){return s})),n.d(e,"stringify",(function(){return f})),n.d(e,"parse",(function(){return y}));var r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto),o=new Uint8Array(16);function i(){if(!r)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(o)}for(var a=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,s=function(t){return"string"==typeof t&&a.test(t)},c=[],u=0;u<256;++u)c.push((u+256).toString(16).substr(1));var l,p,f=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(c[t[e+0]]+c[t[e+1]]+c[t[e+2]]+c[t[e+3]]+"-"+c[t[e+4]]+c[t[e+5]]+"-"+c[t[e+6]]+c[t[e+7]]+"-"+c[t[e+8]]+c[t[e+9]]+"-"+c[t[e+10]]+c[t[e+11]]+c[t[e+12]]+c[t[e+13]]+c[t[e+14]]+c[t[e+15]]).toLowerCase();if(!s(n))throw TypeError("Stringified UUID is invalid");return n},h=0,d=0,g=function(t,e,n){var r=e&&n||0,o=e||new Array(16),a=(t=t||{}).node||l,s=void 0!==t.clockseq?t.clockseq:p;if(null==a||null==s){var c=t.random||(t.rng||i)();null==a&&(a=l=[1|c[0],c[1],c[2],c[3],c[4],c[5]]),null==s&&(s=p=16383&(c[6]<<8|c[7]))}var u=void 0!==t.msecs?t.msecs:Date.now(),g=void 0!==t.nsecs?t.nsecs:d+1,y=u-h+(g-d)/1e4;if(y<0&&void 0===t.clockseq&&(s=s+1&16383),(y<0||u>h)&&void 0===t.nsecs&&(g=0),g>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");h=u,d=g,p=s;var m=(1e4*(268435455&(u+=122192928e5))+g)%4294967296;o[r++]=m>>>24&255,o[r++]=m>>>16&255,o[r++]=m>>>8&255,o[r++]=255&m;var v=u/4294967296*1e4&268435455;o[r++]=v>>>8&255,o[r++]=255&v,o[r++]=v>>>24&15|16,o[r++]=v>>>16&255,o[r++]=s>>>8|128,o[r++]=255&s;for(var _=0;_<6;++_)o[r+_]=a[_];return e||f(o)},y=function(t){if(!s(t))throw TypeError("Invalid UUID");var e,n=new Uint8Array(16);return n[0]=(e=parseInt(t.slice(0,8),16))>>>24,n[1]=e>>>16&255,n[2]=e>>>8&255,n[3]=255&e,n[4]=(e=parseInt(t.slice(9,13),16))>>>8,n[5]=255&e,n[6]=(e=parseInt(t.slice(14,18),16))>>>8,n[7]=255&e,n[8]=(e=parseInt(t.slice(19,23),16))>>>8,n[9]=255&e,n[10]=(e=parseInt(t.slice(24,36),16))/1099511627776&255,n[11]=e/4294967296&255,n[12]=e>>>24&255,n[13]=e>>>16&255,n[14]=e>>>8&255,n[15]=255&e,n},m=function(t,e,n){function r(t,r,o,i){if("string"==typeof t&&(t=function(t){t=unescape(encodeURIComponent(t));for(var e=[],n=0;n<t.length;++n)e.push(t.charCodeAt(n));return e}(t)),"string"==typeof r&&(r=y(r)),16!==r.length)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var a=new Uint8Array(16+t.length);if(a.set(r),a.set(t,r.length),(a=n(a))[6]=15&a[6]|e,a[8]=63&a[8]|128,o){i=i||0;for(var s=0;s<16;++s)o[i+s]=a[s];return o}return f(a)}try{r.name=t}catch(t){}return r.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",r.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",r};function v(t){return 14+(t+64>>>9<<4)+1}function _(t,e){var n=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(n>>16)<<16|65535&n}function b(t,e,n,r,o,i){return _((a=_(_(e,t),_(r,i)))<<(s=o)|a>>>32-s,n);var a,s}function C(t,e,n,r,o,i,a){return b(e&n|~e&r,t,e,o,i,a)}function w(t,e,n,r,o,i,a){return b(e&r|n&~r,t,e,o,i,a)}function A(t,e,n,r,o,i,a){return b(e^n^r,t,e,o,i,a)}function x(t,e,n,r,o,i,a){return b(n^(e|~r),t,e,o,i,a)}var T=m("v3",48,(function(t){if("string"==typeof t){var e=unescape(encodeURIComponent(t));t=new Uint8Array(e.length);for(var n=0;n<e.length;++n)t[n]=e.charCodeAt(n)}return function(t){for(var e=[],n=32*t.length,r=0;r<n;r+=8){var o=t[r>>5]>>>r%32&255,i=parseInt("0123456789abcdef".charAt(o>>>4&15)+"0123456789abcdef".charAt(15&o),16);e.push(i)}return e}(function(t,e){t[e>>5]|=128<<e%32,t[v(e)-1]=e;for(var n=1732584193,r=-271733879,o=-1732584194,i=271733878,a=0;a<t.length;a+=16){var s=n,c=r,u=o,l=i;n=C(n,r,o,i,t[a],7,-680876936),i=C(i,n,r,o,t[a+1],12,-389564586),o=C(o,i,n,r,t[a+2],17,606105819),r=C(r,o,i,n,t[a+3],22,-1044525330),n=C(n,r,o,i,t[a+4],7,-176418897),i=C(i,n,r,o,t[a+5],12,1200080426),o=C(o,i,n,r,t[a+6],17,-1473231341),r=C(r,o,i,n,t[a+7],22,-45705983),n=C(n,r,o,i,t[a+8],7,1770035416),i=C(i,n,r,o,t[a+9],12,-1958414417),o=C(o,i,n,r,t[a+10],17,-42063),r=C(r,o,i,n,t[a+11],22,-1990404162),n=C(n,r,o,i,t[a+12],7,1804603682),i=C(i,n,r,o,t[a+13],12,-40341101),o=C(o,i,n,r,t[a+14],17,-1502002290),n=w(n,r=C(r,o,i,n,t[a+15],22,1236535329),o,i,t[a+1],5,-165796510),i=w(i,n,r,o,t[a+6],9,-1069501632),o=w(o,i,n,r,t[a+11],14,643717713),r=w(r,o,i,n,t[a],20,-373897302),n=w(n,r,o,i,t[a+5],5,-701558691),i=w(i,n,r,o,t[a+10],9,38016083),o=w(o,i,n,r,t[a+15],14,-660478335),r=w(r,o,i,n,t[a+4],20,-405537848),n=w(n,r,o,i,t[a+9],5,568446438),i=w(i,n,r,o,t[a+14],9,-1019803690),o=w(o,i,n,r,t[a+3],14,-187363961),r=w(r,o,i,n,t[a+8],20,1163531501),n=w(n,r,o,i,t[a+13],5,-1444681467),i=w(i,n,r,o,t[a+2],9,-51403784),o=w(o,i,n,r,t[a+7],14,1735328473),n=A(n,r=w(r,o,i,n,t[a+12],20,-1926607734),o,i,t[a+5],4,-378558),i=A(i,n,r,o,t[a+8],11,-2022574463),o=A(o,i,n,r,t[a+11],16,1839030562),r=A(r,o,i,n,t[a+14],23,-35309556),n=A(n,r,o,i,t[a+1],4,-1530992060),i=A(i,n,r,o,t[a+4],11,1272893353),o=A(o,i,n,r,t[a+7],16,-155497632),r=A(r,o,i,n,t[a+10],23,-1094730640),n=A(n,r,o,i,t[a+13],4,681279174),i=A(i,n,r,o,t[a],11,-358537222),o=A(o,i,n,r,t[a+3],16,-722521979),r=A(r,o,i,n,t[a+6],23,76029189),n=A(n,r,o,i,t[a+9],4,-640364487),i=A(i,n,r,o,t[a+12],11,-421815835),o=A(o,i,n,r,t[a+15],16,530742520),n=x(n,r=A(r,o,i,n,t[a+2],23,-995338651),o,i,t[a],6,-198630844),i=x(i,n,r,o,t[a+7],10,1126891415),o=x(o,i,n,r,t[a+14],15,-1416354905),r=x(r,o,i,n,t[a+5],21,-57434055),n=x(n,r,o,i,t[a+12],6,1700485571),i=x(i,n,r,o,t[a+3],10,-1894986606),o=x(o,i,n,r,t[a+10],15,-1051523),r=x(r,o,i,n,t[a+1],21,-2054922799),n=x(n,r,o,i,t[a+8],6,1873313359),i=x(i,n,r,o,t[a+15],10,-30611744),o=x(o,i,n,r,t[a+6],15,-1560198380),r=x(r,o,i,n,t[a+13],21,1309151649),n=x(n,r,o,i,t[a+4],6,-145523070),i=x(i,n,r,o,t[a+11],10,-1120210379),o=x(o,i,n,r,t[a+2],15,718787259),r=x(r,o,i,n,t[a+9],21,-343485551),n=_(n,s),r=_(r,c),o=_(o,u),i=_(i,l)}return[n,r,o,i]}(function(t){if(0===t.length)return[];for(var e=8*t.length,n=new Uint32Array(v(e)),r=0;r<e;r+=8)n[r>>5]|=(255&t[r/8])<<r%32;return n}(t),8*t.length))})),E=function(t,e,n){var r=(t=t||{}).random||(t.rng||i)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,e){n=n||0;for(var o=0;o<16;++o)e[n+o]=r[o];return e}return f(r)};function P(t,e,n,r){switch(t){case 0:return e&n^~e&r;case 1:return e^n^r;case 2:return e&n^e&r^n&r;case 3:return e^n^r}}function k(t,e){return t<<e|t>>>32-e}var S=m("v5",80,(function(t){var e=[1518500249,1859775393,2400959708,3395469782],n=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof t){var r=unescape(encodeURIComponent(t));t=[];for(var o=0;o<r.length;++o)t.push(r.charCodeAt(o))}else Array.isArray(t)||(t=Array.prototype.slice.call(t));t.push(128);for(var i=t.length/4+2,a=Math.ceil(i/16),s=new Array(a),c=0;c<a;++c){for(var u=new Uint32Array(16),l=0;l<16;++l)u[l]=t[64*c+4*l]<<24|t[64*c+4*l+1]<<16|t[64*c+4*l+2]<<8|t[64*c+4*l+3];s[c]=u}s[a-1][14]=8*(t.length-1)/Math.pow(2,32),s[a-1][14]=Math.floor(s[a-1][14]),s[a-1][15]=8*(t.length-1)&4294967295;for(var p=0;p<a;++p){for(var f=new Uint32Array(80),h=0;h<16;++h)f[h]=s[p][h];for(var d=16;d<80;++d)f[d]=k(f[d-3]^f[d-8]^f[d-14]^f[d-16],1);for(var g=n[0],y=n[1],m=n[2],v=n[3],_=n[4],b=0;b<80;++b){var C=Math.floor(b/20),w=k(g,5)+P(C,y,m,v)+_+e[C]+f[b]>>>0;_=v,v=m,m=k(y,30)>>>0,y=g,g=w}n[0]=n[0]+g>>>0,n[1]=n[1]+y>>>0,n[2]=n[2]+m>>>0,n[3]=n[3]+v>>>0,n[4]=n[4]+_>>>0}return[n[0]>>24&255,n[0]>>16&255,n[0]>>8&255,255&n[0],n[1]>>24&255,n[1]>>16&255,n[1]>>8&255,255&n[1],n[2]>>24&255,n[2]>>16&255,n[2]>>8&255,255&n[2],n[3]>>24&255,n[3]>>16&255,n[3]>>8&255,255&n[3],n[4]>>24&255,n[4]>>16&255,n[4]>>8&255,255&n[4]]})),O="00000000-0000-0000-0000-000000000000",B=function(t){if(!s(t))throw TypeError("Invalid UUID");return parseInt(t.substr(14,1),16)}}])},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),o=n(42),i=n(28),a=n(8),s=n(29),c=n(30),u=function(t){function e(e,n){var r=n.responseType,o=n.responseSubType,i=n.responseConstructor,a=t.call(this,e)||this;return a.responseSubType=o,a.responseType=r,a._responseConstructor=i,a}return r.__extends(e,t),e.prototype.setCompletion=function(t){return this.callback=t,this},e.prototype._unwrapResponse=function(t){if(c.environment.response.nestedResponse){if(t&&t.hasOwnProperty("result"))return t.result.hasOwnProperty("error")?t.result.error:t.result;if(t&&t.hasOwnProperty("error"))return t.error}return t},e.prototype.handleResponse=function(e){var n,r;try{var i=this._unwrapResponse(e),s=null;i&&(s=i instanceof a.KalturaAPIException?i:"KalturaAPIException"===i.objectType?new a.KalturaAPIException(i.message,i.code,i.args):t.prototype._parseResponseProperty.call(this,"",{type:this.responseType,subType:this.responseSubType},i)),s||"v"===this.responseType?s instanceof a.KalturaAPIException?r=s:n=s:r=new a.KalturaAPIException("server response is undefined, expected '"+this.responseType+" / "+this.responseSubType+"'","client::response_type_error",null)}catch(t){r=new a.KalturaAPIException(t.message,"client::general_error",null)}var c=new o.KalturaResponse(n,r);if(this.callback)try{this.callback(c)}catch(t){}return c},e.prototype.setRequestOptions=function(t){return this.__requestOptions__=t instanceof s.KalturaRequestOptions?t:new s.KalturaRequestOptions(t),this},e.prototype.getRequestOptions=function(){return this.__requestOptions__},e.prototype.buildRequest=function(t){var e=this.__requestOptions__?this.__requestOptions__.toRequestObject():{},n=t?t.toRequestObject():{};return Object.assign({},n,e,this.toRequestObject())},e}(i.KalturaRequestBase);e.KalturaRequest=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),o=function(t){function e(n,r,o){var i=t.call(this,n)||this;return i.message=n,i.code=r,i.args=o,Object.setPrototypeOf(i,e.prototype),i}return r.__extends(e,t),e}(Error);e.KalturaAPIException=o},function(t,e,n){"use strict";var r,o=this&&this.__assign||function(){return(o=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},i=this&&this.__spreadArrays||function(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var r=Array(t),o=0;for(e=0;e<n;e++)for(var i=arguments[e],a=0,s=i.length;a<s;a++,o++)r[o]=i[a];return r};Object.defineProperty(e,"__esModule",{value:!0}),e.filterCuepointsByStartTime=e.findCuepointType=e.isMapEqual=e.isDataEqual=e.isEmptyObject=e.prepareItemTypesOrder=e.checkResponce=e.prepareLiveData=e.preparePendingCuepoints=e.getAvailableTabs=e.filterDataByActiveTab=e.filterDataBySearchQuery=e.prepareVodData=e.addGroupData=e.sortItems=e.fillData=e.decodeString=e.convertTime=e.cuePointTags=e.cuePointTypes=e.itemTypesOrder=e.itemTypes=e.groupTypes=e.getConfigValue=void 0;var a,s,c,u,l=n(6).ObjectUtils.get;e.getConfigValue=function(t,e,n){var r=n;return"function"==typeof e&&e(t)&&(r=t),r},function(t){t.mid="mid",t.first="first",t.last="last"}(a=e.groupTypes||(e.groupTypes={})),function(t){t.All="All",t.AnswerOnAir="AnswerOnAir",t.Chapter="Chapter",t.Slide="Slide",t.Hotspot="Hotspot",t.Caption="Caption"}(s=e.itemTypes||(e.itemTypes={})),e.itemTypesOrder=((r={})[s.All]=0,r[s.Chapter]=1,r[s.Slide]=2,r[s.Hotspot]=3,r[s.AnswerOnAir]=4,r[s.Caption]=5,r),function(t){t.Annotation="annotation.Annotation",t.Thumb="thumbCuePoint.Thumb"}(c=e.cuePointTypes||(e.cuePointTypes={})),function(t){t.AnswerOnAir="qna",t.Hotspot="hotspots"}(u=e.cuePointTags||(e.cuePointTags={}));e.convertTime=function(t){var e=Math.floor(t/3600);e>=1&&(t-=3600*e);var n=Math.floor(t/60);return n>=1&&(t-=60*n),e?(e<10?"0"+e:e)+":"+(n<10?"0"+n:n)+":"+(t<10?"0"+t:t):(n<10?"0"+n:n)+":"+(t<10?"0"+t:t)},e.decodeString=function(t){return"string"!=typeof t?t:t.replace(/&lt;/gi,"<").replace(/&gt;/gi,">").replace(/&nbsp;/gi," ").replace(/&amp;/gi,"&").replace(/&quot;/gi,'"')},e.fillData=function(t,n,r,i,a){void 0===i&&(i=!1),void 0===a&&(a=!1);var l=o({},t);switch(l.liveType=a,a?l.startTime=l.createdAt:(l.startTime=l.startTime/1e3,l.displayTime=e.convertTime(Math.floor(l.startTime))),l.cuePointType){case s.Caption:l.itemType=s.Caption;case c.Annotation:switch(l.displayTitle=e.decodeString(l.text),l.tags){case u.Hotspot:l.itemType=s.Hotspot;break;case u.AnswerOnAir:l.itemType=s.AnswerOnAir}break;case c.Thumb:switch(l.displayDescription=e.decodeString(l.description),l.displayTitle=e.decodeString(l.title),l.assetId&&(l.previewImage=r+"/index.php/service/thumbAsset/action/serve/thumbAssetId/"+l.assetId+"/ks/"+n+"?thumbParams:objectType=KalturaThumbParams&thumbParams:width=400"),l.subType){case 1:l.itemType=s.Slide;break;case 2:l.itemType=s.Chapter,!l.previewImage&&i&&(l.previewImage=r.split("api_v3")[0]+"/p/"+l.partnerId+"/sp/"+l.partnerId+"00/thumbnail/entry_id/"+l.entryId+"/width/400/vid_sec/"+l.startTime+"/ks/"+n)}}if(l.displayTitle&&l.displayTitle.length>77&&l.itemType!==s.Caption){var p=l.displayTitle.slice(0,77);p=p.trim(),l.shorthandTitle=p+"... "}if(!l.displayTitle&&l.displayDescription&&l.displayDescription.length>79){var f=l.displayTitle.slice(0,77);f=f.trim(),l.shorthandDescription=f+"... "}return l.hasShowMore=l.displayDescription||l.shorthandDesctipyion,l},e.sortItems=function(t,e){return t.sort((function(t,n){return t.startTime===n.startTime?e[t.itemType]-e[n.itemType]:t.startTime-n.startTime}))},e.addGroupData=function(t){return t.reduce((function(t,e){var n=t.length>0&&t[t.length-1],r=t.length>1&&t[t.length-2];return n&&e.startTime===n.startTime&&(r.startTime===n.startTime&&(n.groupData=a.mid),n.groupData||n.groupData||(n.groupData=a.first),e.groupData=a.last),t.push(e),t}),[])},e.prepareVodData=function(t,n,r,i,a){var s=t.map((function(t){return o(o({},e.fillData(t,n,r,i,!1)),{liveTypeCuepoint:!1})}));return e.sortItems(s,a)};var p=function(t){return t.map((function(t){return o(o({},t),{groupData:null})}))};e.filterDataBySearchQuery=function(t,e){if(!t||!t.length)return[];if(!e)return t.filter((function(t){return t.itemType!==s.Caption}));var n=e.toLowerCase(),r=t.filter((function(t){return!!(t.displayTitle&&(""+t.displayTitle).toLowerCase().indexOf(n)>-1)||(!!(t.displayDescription&&(""+t.displayDescription).toLowerCase().indexOf(n)>-1)||(!!(t.displayTime&&/([0-1]?[0-9]|2[0-3]):[0-5][0-9]$/.test(n)&&t.displayTime.indexOf(n)>-1)||void 0))}));return p(r)},e.filterDataByActiveTab=function(t,e){if(!t||!t.length)return[];if(e===s.All)return t;var n=t.filter((function(t){return t.itemType===e}));return p(n)},e.getAvailableTabs=function(t,e){var n=i(t),r=n.reduce((function(t,e){return 1,e.itemType&&-1===t.indexOf(e.itemType)&&t.push(e.itemType),t}),[]);return r.length>1&&r.unshift(s.All),r.sort((function(t,n){return e[t]-e[n]}))},e.preparePendingCuepoints=function(t,e){return t.reduce((function(t,n){return e<n.startTime?{listData:t.listData,pendingData:i(t.pendingData,[n])}:{listData:i(t.listData,[n]),pendingData:t.pendingData}}),{listData:[],pendingData:[]})},e.prepareLiveData=function(t,n,r,o,a,s,c,u){if(!r||0===r.length)return{listData:t,pendingData:n};var l=r.filter((function(e){return!i(t,n).find((function(t){return t.id===e.id}))}));l=l.map((function(t){return e.fillData(t,o,a,s,!0)}));var p=e.preparePendingCuepoints(l,u),f=n.filter((function(t){return!p.listData.find((function(e){return e.id===t.id}))}));return p.listData=e.sortItems(t.concat(p.listData),c),p.pendingData=f.concat(p.pendingData),p},e.checkResponce=function(t,e){return!!l(t,"result.objects",[])&&(!e||t.result instanceof e)},e.prepareItemTypesOrder=function(t){return t&&"object"==typeof t?o(o({},e.itemTypesOrder),t):e.itemTypesOrder},e.isEmptyObject=function(t){return 0===Object.keys(t).length&&t.constructor===Object},e.isDataEqual=function(t,e){if(t.length!==e.length)return!1;if(t.length&&e.length){if(t[0].id!==e[0].id)return!1;if(t[t.length-1].id!==e[e.length-1].id)return!1;if(t[0].text&&e[0].text&&t[0].text!==e[0].text)return!1;if(t[t.length-1].text&&e[e.length-1].text&&t[t.length-1].text!==e[e.length-1].text)return!1}return!0},e.isMapEqual=function(t,e){var n=Object.keys(t),r=Object.keys(e);return!(n.length!==r.length||n[0]!==r[0]||n[n.length-1]!==r[r.length-1])},e.findCuepointType=function(t,e){return!!t.find((function(t){return t.itemType===e}))},e.filterCuepointsByStartTime=function(t,e){return t.filter((function(t){return t.startTime>=e}))}},function(t,e,n){"use strict";var r=n(21),o=Object.keys||function(t){var e=[];for(var n in t)e.push(n);return e};t.exports=p;var i=Object.create(n(16));i.inherits=n(13);var a=n(51),s=n(33);i.inherits(p,a);for(var c=o(s.prototype),u=0;u<c.length;u++){var l=c[u];p.prototype[l]||(p.prototype[l]=s.prototype[l])}function p(t){if(!(this instanceof p))return new p(t);a.call(this,t),s.call(this,t),t&&!1===t.readable&&(this.readable=!1),t&&!1===t.writable&&(this.writable=!1),this.allowHalfOpen=!0,t&&!1===t.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",f)}function f(){this.allowHalfOpen||this._writableState.ended||r.nextTick(h,this)}function h(t){t.end()}Object.defineProperty(p.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(p.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(t){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}}),p.prototype._destroy=function(t,e){this.push(null),this.end(),r.nextTick(e,t)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),o=function(t){function e(n,r,o){var i=t.call(this,r)||this;return i.code=n,i.message=r,i.args=o,Object.setPrototypeOf(i,e.prototype),i}return r.__extends(e,t),e}(Error);e.KalturaClientException=o},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e){"function"==typeof Object.create?t.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(t,e){if(e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),function(t){t[t.falseValue=0]="falseValue",t[t.nullValue=-1]="nullValue",t[t.trueValue=1]="trueValue"}(e.KalturaNullableBoolean||(e.KalturaNullableBoolean={}))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t){this._executors=[],this._onCancel=t(this._onResolve.bind(this),this._onReject.bind(this),this)}return t.resolve=function(e){return new t((function(t){t(e)}))},t.reject=function(e){return new t((function(t,n){n(e)}))},t.prototype._onResolve=function(t){this._notifyExecutor(t)},t.prototype._onReject=function(t){this._notifyExecutor(t)},t.prototype._notifyExecutor=function(e){var n,r=this._executors.length>0?this._executors.splice(0,1)[0]:null;if(r)try{if(e instanceof Error?r.reject?n=r.reject(e):this._handleErrorOriginatedFromExecuter(e):r.resolve&&(n=r.resolve(e)),n instanceof t)return void n.then(this._onResolve.bind(this),this._onReject.bind(this));if(n instanceof Promise)return void n.then(this._onResolve.bind(this),this._onReject.bind(this));n=void 0===n?e:n,this._notifyExecutor(n)}catch(t){this._handleErrorOriginatedFromExecuter(t)}},t.prototype._handleErrorOriginatedFromExecuter=function(t){if(!(this._executors.length>0))throw t;this._notifyExecutor(t)},t.prototype.cancel=function(){this._onCancel&&this._onCancel()},t.prototype.then=function(t,e){return this._executors.push({resolve:t,reject:e}),this},t.prototype.catch=function(t){return this._executors.push({resolve:null,reject:t}),this},t}();e.CancelableAction=r},function(t,e,n){(function(t){function n(t){return Object.prototype.toString.call(t)}e.isArray=function(t){return Array.isArray?Array.isArray(t):"[object Array]"===n(t)},e.isBoolean=function(t){return"boolean"==typeof t},e.isNull=function(t){return null===t},e.isNullOrUndefined=function(t){return null==t},e.isNumber=function(t){return"number"==typeof t},e.isString=function(t){return"string"==typeof t},e.isSymbol=function(t){return"symbol"==typeof t},e.isUndefined=function(t){return void 0===t},e.isRegExp=function(t){return"[object RegExp]"===n(t)},e.isObject=function(t){return"object"==typeof t&&null!==t},e.isDate=function(t){return"[object Date]"===n(t)},e.isError=function(t){return"[object Error]"===n(t)||t instanceof Error},e.isFunction=function(t){return"function"==typeof t},e.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},e.isBuffer=t.isBuffer}).call(this,n(19).Buffer)},function(t,e,n){"use strict";t.exports=function(t,e){return"string"!=typeof t?t:(/^['"].*['"]$/.test(t)&&(t=t.slice(1,-1)),/["'() \t\n]/.test(t)||e?'"'+t.replace(/"/g,'\\"').replace(/\n/g,"\\n")+'"':t)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(15),o=n(8),i=n(11),a=n(30);function s(t,e){var n=(t.getNetworkTag()||"").trim(),r=(e.clientTag||"").trim()||"ng-app";return n&&n.length?r+"_"+n:r}function c(t,e){var n,r=[];for(n in t)if(t.hasOwnProperty(n)){var o=e?e+"["+n+"]":n,i=t[n];r.push(null!==i&&"object"==typeof i?c(i,o):encodeURIComponent(o)+"="+encodeURIComponent(i))}return r.join("&")}e.createEndpoint=function(t,e,n,r){var o=e.endpointUrl,i=s(t,e),a=o+"/api_v3/service/"+n;return r&&(a+="/action/"+r),i&&(a+="?"+c({clientTag:i})),a},e.createClientTag=s,e.buildQuerystring=c,e.getHeaders=function(){return{Accept:"application/json","Content-Type":"application/json"}},e.prepareParameters=function(t,e,n){return Object.assign({},t.buildRequest(n),{apiVersion:a.environment.request.apiVersion,format:1})},e.createCancelableAction=function(t){return new r.CancelableAction((function(e,n){var r=new XMLHttpRequest,a=!1;return r.onreadystatechange=function(){if(4===r.readyState){if(a)return;a=!0;var t=void 0;try{t=200===r.status?JSON.parse(r.response):new i.KalturaClientException("client::requre-failure",r.responseText||"failed to transmit request")}catch(e){t=new Error(r.responseText)}t instanceof Error||t instanceof o.KalturaAPIException?n(t):e(t)}},r.open("POST",t.endpoint),t.headers&&Object.keys(t.headers).forEach((function(e){var n=t.headers[e];r.setRequestHeader(e,n)})),r.send(JSON.stringify(t.body)),function(){a||(a=!0,r.abort())}}))}},function(t,e,n){"use strict";(function(t){
/*!
 * The buffer module from node.js, for the browser.
 *
 * @author   Feross Aboukhadijeh <http://feross.org>
 * @license  MIT
 */
var r=n(88),o=n(89),i=n(50);function a(){return c.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(t,e){if(a()<e)throw new RangeError("Invalid typed array length");return c.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=c.prototype:(null===t&&(t=new c(e)),t.length=e),t}function c(t,e,n){if(!(c.TYPED_ARRAY_SUPPORT||this instanceof c))return new c(t,e,n);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return p(this,t)}return u(this,t,e,n)}function u(t,e,n,r){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,n,r){if(e.byteLength,n<0||e.byteLength<n)throw new RangeError("'offset' is out of bounds");if(e.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");e=void 0===n&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,n):new Uint8Array(e,n,r);c.TYPED_ARRAY_SUPPORT?(t=e).__proto__=c.prototype:t=f(t,e);return t}(t,e,n,r):"string"==typeof e?function(t,e,n){"string"==typeof n&&""!==n||(n="utf8");if(!c.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|d(e,n),o=(t=s(t,r)).write(e,n);o!==r&&(t=t.slice(0,o));return t}(t,e,n):function(t,e){if(c.isBuffer(e)){var n=0|h(e.length);return 0===(t=s(t,n)).length||e.copy(t,0,0,n),t}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||(r=e.length)!=r?s(t,0):f(t,e);if("Buffer"===e.type&&i(e.data))return f(t,e.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function l(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function p(t,e){if(l(e),t=s(t,e<0?0:0|h(e)),!c.TYPED_ARRAY_SUPPORT)for(var n=0;n<e;++n)t[n]=0;return t}function f(t,e){var n=e.length<0?0:0|h(e.length);t=s(t,n);for(var r=0;r<n;r+=1)t[r]=255&e[r];return t}function h(t){if(t>=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|t}function d(t,e){if(c.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var n=t.length;if(0===n)return 0;for(var r=!1;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return K(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return U(t).length;default:if(r)return K(t).length;e=(""+e).toLowerCase(),r=!0}}function g(t,e,n){var r=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return S(this,e,n);case"utf8":case"utf-8":return E(this,e,n);case"ascii":return P(this,e,n);case"latin1":case"binary":return k(this,e,n);case"base64":return T(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function y(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function m(t,e,n,r,o){if(0===t.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=o?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(o)return-1;n=t.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof e&&(e=c.from(e,r)),c.isBuffer(e))return 0===e.length?-1:v(t,e,n,r,o);if("number"==typeof e)return e&=255,c.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):v(t,[e],n,r,o);throw new TypeError("val must be string, number or Buffer")}function v(t,e,n,r,o){var i,a=1,s=t.length,c=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;a=2,s/=2,c/=2,n/=2}function u(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(o){var l=-1;for(i=n;i<s;i++)if(u(t,i)===u(e,-1===l?0:i-l)){if(-1===l&&(l=i),i-l+1===c)return l*a}else-1!==l&&(i-=i-l),l=-1}else for(n+c>s&&(n=s-c),i=n;i>=0;i--){for(var p=!0,f=0;f<c;f++)if(u(t,i+f)!==u(e,f)){p=!1;break}if(p)return i}return-1}function _(t,e,n,r){n=Number(n)||0;var o=t.length-n;r?(r=Number(r))>o&&(r=o):r=o;var i=e.length;if(i%2!=0)throw new TypeError("Invalid hex string");r>i/2&&(r=i/2);for(var a=0;a<r;++a){var s=parseInt(e.substr(2*a,2),16);if(isNaN(s))return a;t[n+a]=s}return a}function b(t,e,n,r){return q(K(e,t.length-n),t,n,r)}function C(t,e,n,r){return q(function(t){for(var e=[],n=0;n<t.length;++n)e.push(255&t.charCodeAt(n));return e}(e),t,n,r)}function w(t,e,n,r){return C(t,e,n,r)}function A(t,e,n,r){return q(U(e),t,n,r)}function x(t,e,n,r){return q(function(t,e){for(var n,r,o,i=[],a=0;a<t.length&&!((e-=2)<0);++a)n=t.charCodeAt(a),r=n>>8,o=n%256,i.push(o),i.push(r);return i}(e,t.length-n),t,n,r)}function T(t,e,n){return 0===e&&n===t.length?r.fromByteArray(t):r.fromByteArray(t.slice(e,n))}function E(t,e,n){n=Math.min(t.length,n);for(var r=[],o=e;o<n;){var i,a,s,c,u=t[o],l=null,p=u>239?4:u>223?3:u>191?2:1;if(o+p<=n)switch(p){case 1:u<128&&(l=u);break;case 2:128==(192&(i=t[o+1]))&&(c=(31&u)<<6|63&i)>127&&(l=c);break;case 3:i=t[o+1],a=t[o+2],128==(192&i)&&128==(192&a)&&(c=(15&u)<<12|(63&i)<<6|63&a)>2047&&(c<55296||c>57343)&&(l=c);break;case 4:i=t[o+1],a=t[o+2],s=t[o+3],128==(192&i)&&128==(192&a)&&128==(192&s)&&(c=(15&u)<<18|(63&i)<<12|(63&a)<<6|63&s)>65535&&c<1114112&&(l=c)}null===l?(l=65533,p=1):l>65535&&(l-=65536,r.push(l>>>10&1023|55296),l=56320|1023&l),r.push(l),o+=p}return function(t){var e=t.length;if(e<=4096)return String.fromCharCode.apply(String,t);var n="",r=0;for(;r<e;)n+=String.fromCharCode.apply(String,t.slice(r,r+=4096));return n}(r)}e.Buffer=c,e.SlowBuffer=function(t){+t!=t&&(t=0);return c.alloc(+t)},e.INSPECT_MAX_BYTES=50,c.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),e.kMaxLength=a(),c.poolSize=8192,c._augment=function(t){return t.__proto__=c.prototype,t},c.from=function(t,e,n){return u(null,t,e,n)},c.TYPED_ARRAY_SUPPORT&&(c.prototype.__proto__=Uint8Array.prototype,c.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&c[Symbol.species]===c&&Object.defineProperty(c,Symbol.species,{value:null,configurable:!0})),c.alloc=function(t,e,n){return function(t,e,n,r){return l(e),e<=0?s(t,e):void 0!==n?"string"==typeof r?s(t,e).fill(n,r):s(t,e).fill(n):s(t,e)}(null,t,e,n)},c.allocUnsafe=function(t){return p(null,t)},c.allocUnsafeSlow=function(t){return p(null,t)},c.isBuffer=function(t){return!(null==t||!t._isBuffer)},c.compare=function(t,e){if(!c.isBuffer(t)||!c.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var n=t.length,r=e.length,o=0,i=Math.min(n,r);o<i;++o)if(t[o]!==e[o]){n=t[o],r=e[o];break}return n<r?-1:r<n?1:0},c.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(t,e){if(!i(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return c.alloc(0);var n;if(void 0===e)for(e=0,n=0;n<t.length;++n)e+=t[n].length;var r=c.allocUnsafe(e),o=0;for(n=0;n<t.length;++n){var a=t[n];if(!c.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(r,o),o+=a.length}return r},c.byteLength=d,c.prototype._isBuffer=!0,c.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)y(this,e,e+1);return this},c.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)y(this,e,e+3),y(this,e+1,e+2);return this},c.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)y(this,e,e+7),y(this,e+1,e+6),y(this,e+2,e+5),y(this,e+3,e+4);return this},c.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?E(this,0,t):g.apply(this,arguments)},c.prototype.equals=function(t){if(!c.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===c.compare(this,t)},c.prototype.inspect=function(){var t="",n=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(t+=" ... ")),"<Buffer "+t+">"},c.prototype.compare=function(t,e,n,r,o){if(!c.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),e<0||n>t.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&e>=n)return 0;if(r>=o)return-1;if(e>=n)return 1;if(this===t)return 0;for(var i=(o>>>=0)-(r>>>=0),a=(n>>>=0)-(e>>>=0),s=Math.min(i,a),u=this.slice(r,o),l=t.slice(e,n),p=0;p<s;++p)if(u[p]!==l[p]){i=u[p],a=l[p];break}return i<a?-1:a<i?1:0},c.prototype.includes=function(t,e,n){return-1!==this.indexOf(t,e,n)},c.prototype.indexOf=function(t,e,n){return m(this,t,e,n,!0)},c.prototype.lastIndexOf=function(t,e,n){return m(this,t,e,n,!1)},c.prototype.write=function(t,e,n,r){if(void 0===e)r="utf8",n=this.length,e=0;else if(void 0===n&&"string"==typeof e)r=e,n=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var o=this.length-e;if((void 0===n||n>o)&&(n=o),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var i=!1;;)switch(r){case"hex":return _(this,t,e,n);case"utf8":case"utf-8":return b(this,t,e,n);case"ascii":return C(this,t,e,n);case"latin1":case"binary":return w(this,t,e,n);case"base64":return A(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,t,e,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function P(t,e,n){var r="";n=Math.min(t.length,n);for(var o=e;o<n;++o)r+=String.fromCharCode(127&t[o]);return r}function k(t,e,n){var r="";n=Math.min(t.length,n);for(var o=e;o<n;++o)r+=String.fromCharCode(t[o]);return r}function S(t,e,n){var r=t.length;(!e||e<0)&&(e=0),(!n||n<0||n>r)&&(n=r);for(var o="",i=e;i<n;++i)o+=D(t[i]);return o}function O(t,e,n){for(var r=t.slice(e,n),o="",i=0;i<r.length;i+=2)o+=String.fromCharCode(r[i]+256*r[i+1]);return o}function B(t,e,n){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>n)throw new RangeError("Trying to access beyond buffer length")}function M(t,e,n,r,o,i){if(!c.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>o||e<i)throw new RangeError('"value" argument is out of bounds');if(n+r>t.length)throw new RangeError("Index out of range")}function j(t,e,n,r){e<0&&(e=65535+e+1);for(var o=0,i=Math.min(t.length-n,2);o<i;++o)t[n+o]=(e&255<<8*(r?o:1-o))>>>8*(r?o:1-o)}function R(t,e,n,r){e<0&&(e=4294967295+e+1);for(var o=0,i=Math.min(t.length-n,4);o<i;++o)t[n+o]=e>>>8*(r?o:3-o)&255}function I(t,e,n,r,o,i){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function L(t,e,n,r,i){return i||I(t,0,n,4),o.write(t,e,n,r,23,4),n+4}function N(t,e,n,r,i){return i||I(t,0,n,8),o.write(t,e,n,r,52,8),n+8}c.prototype.slice=function(t,e){var n,r=this.length;if((t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t),c.TYPED_ARRAY_SUPPORT)(n=this.subarray(t,e)).__proto__=c.prototype;else{var o=e-t;n=new c(o,void 0);for(var i=0;i<o;++i)n[i]=this[i+t]}return n},c.prototype.readUIntLE=function(t,e,n){t|=0,e|=0,n||B(t,e,this.length);for(var r=this[t],o=1,i=0;++i<e&&(o*=256);)r+=this[t+i]*o;return r},c.prototype.readUIntBE=function(t,e,n){t|=0,e|=0,n||B(t,e,this.length);for(var r=this[t+--e],o=1;e>0&&(o*=256);)r+=this[t+--e]*o;return r},c.prototype.readUInt8=function(t,e){return e||B(t,1,this.length),this[t]},c.prototype.readUInt16LE=function(t,e){return e||B(t,2,this.length),this[t]|this[t+1]<<8},c.prototype.readUInt16BE=function(t,e){return e||B(t,2,this.length),this[t]<<8|this[t+1]},c.prototype.readUInt32LE=function(t,e){return e||B(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},c.prototype.readUInt32BE=function(t,e){return e||B(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},c.prototype.readIntLE=function(t,e,n){t|=0,e|=0,n||B(t,e,this.length);for(var r=this[t],o=1,i=0;++i<e&&(o*=256);)r+=this[t+i]*o;return r>=(o*=128)&&(r-=Math.pow(2,8*e)),r},c.prototype.readIntBE=function(t,e,n){t|=0,e|=0,n||B(t,e,this.length);for(var r=e,o=1,i=this[t+--r];r>0&&(o*=256);)i+=this[t+--r]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*e)),i},c.prototype.readInt8=function(t,e){return e||B(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},c.prototype.readInt16LE=function(t,e){e||B(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt16BE=function(t,e){e||B(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt32LE=function(t,e){return e||B(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},c.prototype.readInt32BE=function(t,e){return e||B(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},c.prototype.readFloatLE=function(t,e){return e||B(t,4,this.length),o.read(this,t,!0,23,4)},c.prototype.readFloatBE=function(t,e){return e||B(t,4,this.length),o.read(this,t,!1,23,4)},c.prototype.readDoubleLE=function(t,e){return e||B(t,8,this.length),o.read(this,t,!0,52,8)},c.prototype.readDoubleBE=function(t,e){return e||B(t,8,this.length),o.read(this,t,!1,52,8)},c.prototype.writeUIntLE=function(t,e,n,r){(t=+t,e|=0,n|=0,r)||M(this,t,e,n,Math.pow(2,8*n)-1,0);var o=1,i=0;for(this[e]=255&t;++i<n&&(o*=256);)this[e+i]=t/o&255;return e+n},c.prototype.writeUIntBE=function(t,e,n,r){(t=+t,e|=0,n|=0,r)||M(this,t,e,n,Math.pow(2,8*n)-1,0);var o=n-1,i=1;for(this[e+o]=255&t;--o>=0&&(i*=256);)this[e+o]=t/i&255;return e+n},c.prototype.writeUInt8=function(t,e,n){return t=+t,e|=0,n||M(this,t,e,1,255,0),c.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},c.prototype.writeUInt16LE=function(t,e,n){return t=+t,e|=0,n||M(this,t,e,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):j(this,t,e,!0),e+2},c.prototype.writeUInt16BE=function(t,e,n){return t=+t,e|=0,n||M(this,t,e,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):j(this,t,e,!1),e+2},c.prototype.writeUInt32LE=function(t,e,n){return t=+t,e|=0,n||M(this,t,e,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):R(this,t,e,!0),e+4},c.prototype.writeUInt32BE=function(t,e,n){return t=+t,e|=0,n||M(this,t,e,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):R(this,t,e,!1),e+4},c.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e|=0,!r){var o=Math.pow(2,8*n-1);M(this,t,e,n,o-1,-o)}var i=0,a=1,s=0;for(this[e]=255&t;++i<n&&(a*=256);)t<0&&0===s&&0!==this[e+i-1]&&(s=1),this[e+i]=(t/a>>0)-s&255;return e+n},c.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e|=0,!r){var o=Math.pow(2,8*n-1);M(this,t,e,n,o-1,-o)}var i=n-1,a=1,s=0;for(this[e+i]=255&t;--i>=0&&(a*=256);)t<0&&0===s&&0!==this[e+i+1]&&(s=1),this[e+i]=(t/a>>0)-s&255;return e+n},c.prototype.writeInt8=function(t,e,n){return t=+t,e|=0,n||M(this,t,e,1,127,-128),c.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},c.prototype.writeInt16LE=function(t,e,n){return t=+t,e|=0,n||M(this,t,e,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):j(this,t,e,!0),e+2},c.prototype.writeInt16BE=function(t,e,n){return t=+t,e|=0,n||M(this,t,e,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):j(this,t,e,!1),e+2},c.prototype.writeInt32LE=function(t,e,n){return t=+t,e|=0,n||M(this,t,e,4,2147483647,-2147483648),c.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):R(this,t,e,!0),e+4},c.prototype.writeInt32BE=function(t,e,n){return t=+t,e|=0,n||M(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),c.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):R(this,t,e,!1),e+4},c.prototype.writeFloatLE=function(t,e,n){return L(this,t,e,!0,n)},c.prototype.writeFloatBE=function(t,e,n){return L(this,t,e,!1,n)},c.prototype.writeDoubleLE=function(t,e,n){return N(this,t,e,!0,n)},c.prototype.writeDoubleBE=function(t,e,n){return N(this,t,e,!1,n)},c.prototype.copy=function(t,e,n,r){if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e<r-n&&(r=t.length-e+n);var o,i=r-n;if(this===t&&n<e&&e<r)for(o=i-1;o>=0;--o)t[o+e]=this[o+n];else if(i<1e3||!c.TYPED_ARRAY_SUPPORT)for(o=0;o<i;++o)t[o+e]=this[o+n];else Uint8Array.prototype.set.call(t,this.subarray(n,n+i),e);return i},c.prototype.fill=function(t,e,n,r){if("string"==typeof t){if("string"==typeof e?(r=e,e=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===t.length){var o=t.charCodeAt(0);o<256&&(t=o)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!c.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;var i;if(e>>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(i=e;i<n;++i)this[i]=t;else{var a=c.isBuffer(t)?t:K(new c(t,r).toString()),s=a.length;for(i=0;i<n-e;++i)this[i+e]=a[i%s]}return this};var F=/[^+\/0-9A-Za-z-_]/g;function D(t){return t<16?"0"+t.toString(16):t.toString(16)}function K(t,e){var n;e=e||1/0;for(var r=t.length,o=null,i=[],a=0;a<r;++a){if((n=t.charCodeAt(a))>55295&&n<57344){if(!o){if(n>56319){(e-=3)>-1&&i.push(239,191,189);continue}if(a+1===r){(e-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(e-=3)>-1&&i.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(e-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((e-=1)<0)break;i.push(n)}else if(n<2048){if((e-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function U(t){return r.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(F,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function q(t,e,n,r){for(var o=0;o<r&&!(o+n>=e.length||o>=t.length);++o)e[o+n]=t[o];return o}}).call(this,n(12))},function(t,e){var n,r,o=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(t){if(n===setTimeout)return setTimeout(t,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(t){n=i}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(t){r=a}}();var c,u=[],l=!1,p=-1;function f(){l&&c&&(l=!1,c.length?u=c.concat(u):p=-1,u.length&&h())}function h(){if(!l){var t=s(f);l=!0;for(var e=u.length;e;){for(c=u,u=[];++p<e;)c&&c[p].run();p=-1,e=u.length}c=null,l=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function d(t,e){this.fun=t,this.array=e}function g(){}o.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];u.push(new d(t,e)),1!==u.length||l||s(h)},d.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=g,o.addListener=g,o.once=g,o.off=g,o.removeListener=g,o.removeAllListeners=g,o.emit=g,o.prependListener=g,o.prependOnceListener=g,o.listeners=function(t){return[]},o.binding=function(t){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(t){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(t,e,n){"use strict";(function(e){void 0===e||!e.version||0===e.version.indexOf("v0.")||0===e.version.indexOf("v1.")&&0!==e.version.indexOf("v1.8.")?t.exports={nextTick:function(t,n,r,o){if("function"!=typeof t)throw new TypeError('"callback" argument must be a function');var i,a,s=arguments.length;switch(s){case 0:case 1:return e.nextTick(t);case 2:return e.nextTick((function(){t.call(null,n)}));case 3:return e.nextTick((function(){t.call(null,n,r)}));case 4:return e.nextTick((function(){t.call(null,n,r,o)}));default:for(i=new Array(s-1),a=0;a<i.length;)i[a++]=arguments[a];return e.nextTick((function(){t.apply(null,i)}))}}}:t.exports=e}).call(this,n(20))},function(t,e,n){var r=n(19),o=r.Buffer;function i(t,e){for(var n in t)e[n]=t[n]}function a(t,e,n){return o(t,e,n)}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?t.exports=r:(i(r,e),e.Buffer=a),i(o,a),a.from=function(t,e,n){if("number"==typeof t)throw new TypeError("Argument must not be a number");return o(t,e,n)},a.alloc=function(t,e,n){if("number"!=typeof t)throw new TypeError("Argument must be a number");var r=o(t);return void 0!==e?"string"==typeof n?r.fill(e,n):r.fill(e):r.fill(0),r},a.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return o(t)},a.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return r.SlowBuffer(t)}},function(t,e,n){var r;window,t.exports=(r=n(6),function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=37)}([function(t,e){t.exports=KalturaPlayer.ui.preact},function(t,e,n){"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n=function(t,e){var n,r,o,i=t[1]||"",a=t[3];if(!a)return i;if(e&&"function"==typeof btoa){var s=(n=a,r=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),o="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(r),"/*# ".concat(o," */")),c=a.sources.map((function(t){return"/*# sourceURL=".concat(a.sourceRoot||"").concat(t," */")}));return[i].concat(c).concat([s]).join("\n")}return[i].join("\n")}(e,t);return e[2]?"@media ".concat(e[2]," {").concat(n,"}"):n})).join("")},e.i=function(t,n,r){"string"==typeof t&&(t=[[null,t,""]]);var o={};if(r)for(var i=0;i<this.length;i++){var a=this[i][0];null!=a&&(o[a]=!0)}for(var s=0;s<t.length;s++){var c=[].concat(t[s]);r&&o[c[0]]||(n&&(c[2]?c[2]="".concat(n," and ").concat(c[2]):c[2]=n),e.push(c))}},e}},function(t,e){t.exports=r},function(t,e,n){"use strict";var r,o=function(){var t={};return function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}t[e]=n}return t[e]}}(),i=[];function a(t){for(var e=-1,n=0;n<i.length;n++)if(i[n].identifier===t){e=n;break}return e}function s(t,e){for(var n={},r=[],o=0;o<t.length;o++){var s=t[o],c=e.base?s[0]+e.base:s[0],u=n[c]||0,l="".concat(c," ").concat(u);n[c]=u+1;var p=a(l),f={css:s[1],media:s[2],sourceMap:s[3]};-1!==p?(i[p].references++,i[p].updater(f)):i.push({identifier:l,updater:g(f,e),references:1}),r.push(l)}return r}function c(t){var e=document.createElement("style"),r=t.attributes||{};if(void 0===r.nonce){var i=n.nc;i&&(r.nonce=i)}if(Object.keys(r).forEach((function(t){e.setAttribute(t,r[t])})),"function"==typeof t.insert)t.insert(e);else{var a=o(t.insert||"head");if(!a)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");a.appendChild(e)}return e}var u,l=(u=[],function(t,e){return u[t]=e,u.filter(Boolean).join("\n")});function p(t,e,n,r){var o=n?"":r.media?"@media ".concat(r.media," {").concat(r.css,"}"):r.css;if(t.styleSheet)t.styleSheet.cssText=l(e,o);else{var i=document.createTextNode(o),a=t.childNodes;a[e]&&t.removeChild(a[e]),a.length?t.insertBefore(i,a[e]):t.appendChild(i)}}function f(t,e,n){var r=n.css,o=n.media,i=n.sourceMap;if(o?t.setAttribute("media",o):t.removeAttribute("media"),i&&btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),t.styleSheet)t.styleSheet.cssText=r;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(r))}}var h=null,d=0;function g(t,e){var n,r,o;if(e.singleton){var i=d++;n=h||(h=c(e)),r=p.bind(null,n,i,!1),o=p.bind(null,n,i,!0)}else n=c(e),r=f.bind(null,n,e),o=function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(n)};return r(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;r(t=e)}else o()}}t.exports=function(t,e){(e=e||{}).singleton||"boolean"==typeof e.singleton||(e.singleton=(void 0===r&&(r=Boolean(window&&document&&document.all&&!window.atob)),r));var n=s(t=t||[],e);return function(t){if(t=t||[],"[object Array]"===Object.prototype.toString.call(t)){for(var r=0;r<n.length;r++){var o=a(n[r]);i[o].references--}for(var c=s(t,e),u=0;u<n.length;u++){var l=a(n[u]);0===i[l].references&&(i[l].updater(),i.splice(l,1))}n=c}}}},function(t,e,n){"use strict";var r=n(20),o=n(92),i=Object.prototype.toString;function a(t){return"[object Array]"===i.call(t)}function s(t){return null!==t&&"object"==typeof t}function c(t){return"[object Function]"===i.call(t)}function u(t,e){if(null!=t)if("object"!=typeof t&&(t=[t]),a(t))for(var n=0,r=t.length;n<r;n++)e.call(null,t[n],n,t);else for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.call(null,t[o],o,t)}t.exports={isArray:a,isArrayBuffer:function(t){return"[object ArrayBuffer]"===i.call(t)},isBuffer:o,isFormData:function(t){return"undefined"!=typeof FormData&&t instanceof FormData},isArrayBufferView:function(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&t.buffer instanceof ArrayBuffer},isString:function(t){return"string"==typeof t},isNumber:function(t){return"number"==typeof t},isObject:s,isUndefined:function(t){return void 0===t},isDate:function(t){return"[object Date]"===i.call(t)},isFile:function(t){return"[object File]"===i.call(t)},isBlob:function(t){return"[object Blob]"===i.call(t)},isFunction:c,isStream:function(t){return s(t)&&c(t.pipe)},isURLSearchParams:function(t){return"undefined"!=typeof URLSearchParams&&t instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:u,merge:function t(){var e={};function n(n,r){"object"==typeof e[r]&&"object"==typeof n?e[r]=t(e[r],n):e[r]=n}for(var r=0,o=arguments.length;r<o;r++)u(arguments[r],n);return e},deepMerge:function t(){var e={};function n(n,r){"object"==typeof e[r]&&"object"==typeof n?e[r]=t(e[r],n):e[r]="object"==typeof n?t({},n):n}for(var r=0,o=arguments.length;r<o;r++)u(arguments[r],n);return e},extend:function(t,e,n){return u(e,(function(e,o){t[o]=n&&"function"==typeof e?r(e,n):e})),t},trim:function(t){return t.replace(/^\s*/,"").replace(/\s*$/,"")}}},function(t,e,n){"use strict";t.exports=function(t,e){return e||(e={}),"string"!=typeof(t=t&&t.__esModule?t.default:t)?t:(/^['"].*['"]$/.test(t)&&(t=t.slice(1,-1)),e.hash&&(t+=e.hash),/["'() \t\n]/.test(t)||e.needQuotes?'"'.concat(t.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):t)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getContribConfig=void 0;var r=n(2);e.getContribConfig=function(t,e,n,o){return r.KalturaPlayerUtils.getPlayerConfig(t,"contrib."+e,n,o)}},function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||e.hasOwnProperty(n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),o(n(54),e)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PresetsUtils=void 0;var r=n(2).getContribLogger({module:"contrib-ui",class:"PresetsUtils"}),o=function(){function t(){}return t.groupPresetAreasByType=function(t){var e=t.presetAreasMapping,n=t.acceptableTypes,o={};return n.forEach((function(t){return o[t]={}})),Object.keys(e).forEach((function(t){Object.keys(e[t]).forEach((function(i){-1===n.indexOf(i)?r.warn("Unknown preset area type '"+i+"' provided, ignoring specific type mapping. Acceptable values are '"+n.join(", "),{}):o[i][t]=e[t][i]}))})),o},t}();e.PresetsUtils=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FloatingPositions=e.FloatingUIModes=void 0,function(t){t.MediaLoaded="MediaLoaded",t.OnDemand="OnDemand",t.Immediate="Immediate",t.FirstPlay="FirstPlay"}(e.FloatingUIModes||(e.FloatingUIModes={})),function(t){t.VideoArea="VideoArea",t.PresetArea="PresetArea",t.InteractiveArea="InteractiveArea"}(e.FloatingPositions||(e.FloatingPositions={}))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.KitchenSinkPositions=e.KitchenSinkExpandModes=void 0,function(t){t.AlongSideTheVideo="alongside",t.Hidden="hidden",t.OverTheVideo="over"}(e.KitchenSinkExpandModes||(e.KitchenSinkExpandModes={})),function(t){t.Top="top",t.Left="left",t.Right="right",t.Bottom="bottom"}(e.KitchenSinkPositions||(e.KitchenSinkPositions={}))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getVideoSize=e.getPlayerSize=void 0,e.getPlayerSize=function(t){return t?t.dimensions:{width:0,height:0}},e.getVideoSize=function(t){if(!t)return{width:0,height:0};var e=t.getActiveTracks().video;return e?{width:e.width,height:e.height}:{width:0,height:0}}},function(t,e,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},o=this&&this.__rest||function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};Object.defineProperty(e,"__esModule",{value:!0}),e.ToastManager=e.ToastSeverity=void 0;var i=n(2),a=n(9),s=n(47),c=n(0);!function(t){t.Info="Info",t.Success="Success",t.Warn="Warn",t.Error="Error"}(e.ToastSeverity||(e.ToastSeverity={}));var u=function(){function t(t){var e=this;this.options=t,this._toasts=[],this._floatingItem=null,this._remove=function(t){var n=e._findToastIndexById(t);-1!==n&&(clearTimeout(e._toasts[n].timerSubscription),e._toasts.splice(n,1),e._updateToastsUI(),0===e._toasts.length&&e._removeToastsContainer())},this._options=t}return t.prototype.add=function(t){var e=t.duration,n=o(t,["duration"]);this._floatingItem||this._addToastsContainer();var a={toastProps:r(r({},n),{id:i.UUID.uuidV1(),onClose:this._remove}),duration:e,timerSubscription:null};this._toasts.push(a),this._updateToastsUI(),this._startDurationTimer(a)},t.prototype.reset=function(){var t=this;this._toasts.forEach((function(e){t._remove(e.toastProps.id)}))},t.prototype._startDurationTimer=function(t){var e=this;t.timerSubscription=setTimeout((function(){e._remove(t.toastProps.id)}),t.duration)},t.prototype._addToastsContainer=function(){var t=this;this._floatingItem=this._options.floatingManager.add({label:"Toasts",mode:a.FloatingUIModes.Immediate,position:a.FloatingPositions.InteractiveArea,renderContent:function(){return c.h(s.ToastsContainer,{toasts:t._toasts.map((function(t){return t.toastProps}))})}})},t.prototype._removeToastsContainer=function(){this._floatingItem&&(this._options.floatingManager.remove(this._floatingItem),this._floatingItem=null)},t.prototype._updateToastsUI=function(){this._floatingItem&&this._floatingItem.update()},t.prototype._findToastIndexById=function(t){for(var e=0;e<this._toasts.length;){if(this._toasts[e].toastProps.id===t)return e;e++}return-1},t}();e.ToastManager=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FloatingItem=void 0;var r=n(0),o=n(2),i=n(9),a=n(7),s=function(){function t(t){var e=this;this._destroyed=!1,this._isShown=!1,this._componentRef=null,this.remove=function(){e._logger.info("remove item from player",{method:"remove"}),e._isShown=!1,e._componentRef&&e._componentRef.update()},this.add=function(){e._logger.info("add item to player",{method:"add"}),e._isShown=!0,e._componentRef&&e._componentRef.update()},this._handleMediaLoaded=function(){var t=e._options.kalturaPlayer;t.removeEventListener(t.Event.MEDIA_LOADED,e._handleMediaLoaded),e.add()},this._handleFirstPlay=function(){var t=e._options.kalturaPlayer;t.removeEventListener(t.Event.FIRST_PLAY,e._handleFirstPlay),e.add()},this._options=t,this._logger=o.getContribLogger({module:"contrib-ui",class:"FloatingItem",context:t.data.label}),this._logger.debug("executed",{method:"constructor",data:{options:t}}),this._logger.info("created item "+t.data.label,{method:"constructor"}),this._addPlayerBindings()}return Object.defineProperty(t.prototype,"data",{get:function(){return this._options.data},enumerable:!1,configurable:!0}),t.prototype.update=function(){this._componentRef&&this._componentRef.update()},t.prototype.destroy=function(){this._logger.info("destroy item",{method:"destroy"}),this._destroyed=!0,this.remove()},t.prototype.renderFloatingChild=function(t){var e=this,n=this._options.data.label;return r.h(a.ManagedComponent,{label:n,renderChildren:function(){return e._options.data.renderContent(t)},isShown:function(){return e._isShown},ref:function(t){return e._componentRef=t}})},t.prototype._addPlayerBindings=function(){var t=this._options,e=t.kalturaPlayer,n=t.data;n.mode===i.FloatingUIModes.MediaLoaded&&e.addEventListener(e.Event.MEDIA_LOADED,this._handleMediaLoaded),n.mode===i.FloatingUIModes.FirstPlay&&e.addEventListener(e.Event.FIRST_PLAY,this._handleFirstPlay),n.mode===i.FloatingUIModes.Immediate&&this.add()},t}();e.FloatingItem=s},function(t,e,n){"use strict";var r=this&&this.__spreadArrays||function(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var r=Array(t),o=0;for(e=0;e<n;e++)for(var i=arguments[e],a=0,s=i.length;a<s;a++,o++)r[o]=i[a];return r};Object.defineProperty(e,"__esModule",{value:!0}),e.PresetManager=e.PresetManagerEventTypes=void 0;var o,i=n(0),a=n(58),s=n(2),c=n(62),u=n(8),l=n(6);!function(t){t.PresetResizeEvent="PresetResizeEvent",t.VideoResizeEvent="VideoResizeEvent"}(o=e.PresetManagerEventTypes||(e.PresetManagerEventTypes={}));var p=["PlayerArea"],f={presetAreasMapping:{Playback:{PlayerArea:"PlayerArea"},Live:{PlayerArea:"PlayerArea"}}},h=function(){function t(t){var e=this;this._events=new s.EventsManager,this._isLocked=!1,this._items=[],this._pendingItems=[],this._registerToPlayer=function(t){t.addEventListener(KalturaPlayer.ui.EventType.UI_PRESET_RESIZE,e._notifyUIPresetResize),t.addEventListener(KalturaPlayer.ui.EventType.VIDEO_RESIZE,e._notifyVideoResize)},this._notifyVideoResize=function(){e._events.emit({type:o.VideoResizeEvent})},this._notifyUIPresetResize=function(){e._events.emit({type:o.PresetResizeEvent})},this._unregisterToPlayer=function(t){t.removeEventListener(KalturaPlayer.ui.EventType.UI_PRESET_RESIZE,e._notifyUIPresetResize),t.removeEventListener(KalturaPlayer.ui.EventType.VIDEO_RESIZE,e._notifyVideoResize)},this.on=this._events.on.bind(this._events),this.off=this._events.off.bind(this._events),this._options=t,this._presetConfig=l.getContribConfig(this._options.kalturaPlayer,"ui.preset",f,{explicitMerge:["presetAreasMapping"]});var n=u.PresetsUtils.groupPresetAreasByType({presetAreasMapping:this._presetConfig.presetAreasMapping,acceptableTypes:p});this.add({label:"preset-manager",presetAreas:n.PlayerArea,renderChild:function(){return i.h(c.UIPlayerAdapter,{onMount:e._registerToPlayer,onUnmount:e._unregisterToPlayer})}})}return t.prototype.add=function(t){if(this._isLocked)return console.warn("cannot add new preset items once player completed its' setup phase"),null;var e=new a.PresetItem({kalturaPlayer:this._options.kalturaPlayer,data:t});this._pendingItems.push(e)},t.prototype.lockManager=function(){this._isLocked=!0},t.prototype.registerComponents=function(){var t=[];return this._pendingItems.forEach((function(e){t=r(t,e.playerConfig)})),this._items=r(this._items,this._pendingItems),this._pendingItems=[],t.filter(Boolean)},t}();e.PresetManager=h},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RelativeToTypes=e.ReservedPresetAreas=e.ReservedPresetNames=void 0,function(t){t.Playback="Playback",t.Live="Live"}(e.ReservedPresetNames||(e.ReservedPresetNames={})),function(t){t.PresetFloating="PresetFloating",t.BottomBarLeftControls="BottomBarLeftControls",t.BottomBarRightControls="BottomBarRightControls",t.TopBarLeftControls="TopBarLeftControls",t.TopBarRightControls="TopBarRightControls",t.SidePanelTop="SidePanelTop",t.SidePanelLeft="SidePanelLeft",t.SidePanelRight="SidePanelRight",t.SidePanelBottom="SidePanelBottom",t.PresetArea="PresetArea",t.InteractiveArea="InteractiveArea",t.PlayerArea="PlayerArea",t.VideoArea="VideoArea"}(e.ReservedPresetAreas||(e.ReservedPresetAreas={})),function(t){t.Before="Before",t.After="After",t.Replace="Replace"}(e.RelativeToTypes||(e.RelativeToTypes={}))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UpperBarItem=void 0;var r=n(0),o=n(2);e.UpperBarItem=function(t){var e=this;this.renderChild=function(t){var n=e._options.data,o=n.onClick,i=n.renderItem,a=(n.label,i(t));return r.h("div",{onClick:o,className:"upper-bar-icon"},a)},this._options=t,this._logger=o.getContribLogger({module:"contrib-ui",class:"PresetItem",context:t.data.label}),this._logger.debug("executed",{method:"constructor",data:{options:t}}),this._logger.info("created item "+t.data.label,{method:"constructor"})}},function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||e.hasOwnProperty(n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),o(n(74),e)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.KitchenSinkItem=void 0;var r=n(0),o=n(2),i=n(7),a=n(19),s=n(85),c=function(){function t(t){var e=this;this._componentRef=null,this._destroyed=!1,this._activationStateChange=function(t){var n=t.item;e===n&&e.update()},this.renderContentChild=function(t){if(!e._isDestroyed()){var n=e._options.data,o=n.renderContent,a=n.label,c=e._options.kitchenSinkConfig;return r.h(i.ManagedComponent,{label:a,fillContainer:!1,renderChildren:function(){return r.h(s.KitchenSink,{children:o(t),isActive:e.isActive(),kitchenSinkConfig:c})},isShown:function(){return!e._destroyed},ref:function(t){return e._componentRef=t}})}},this._options=t,this._logger=o.getContribLogger({module:"contrib-ui",class:"KitchenSinkItem",context:t&&t.data&&t.data.label}),this._logger.debug("executed",{method:"constructor",data:{options:t}}),this._logger.info("created item "+t.data.label,{method:"constructor"}),this._options.eventManager.on(a.KitchenSinkEventTypes.ItemActiveStateChangeEvent,this._activationStateChange)}return Object.defineProperty(t.prototype,"data",{get:function(){if(!this._isDestroyed())return this._options.data},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"displayName",{get:function(){if(!this._isDestroyed())return this._options.data.label},enumerable:!1,configurable:!0}),t.prototype.update=function(){this._isDestroyed()||this._componentRef&&this._componentRef.update()},t.prototype.isActive=function(){if(!this._isDestroyed())return this._options.isActive(this)},t.prototype.activate=function(){this._isDestroyed()||this._options.activate(this)},t.prototype.deactivate=function(){this._isDestroyed()||this._options.deactivate(this)},t.prototype._destroy=function(){this._isDestroyed()||(this._options.eventManager.off(a.KitchenSinkEventTypes.ItemActiveStateChangeEvent,this._activationStateChange),this.update(),this._componentRef=null,this._options=null,this._destroyed=!0)},t.prototype._isDestroyed=function(){return!!this._destroyed&&(this._logger.warn("can't perform requested call, item was marked as destroyed",{}),!0)},t}();e.KitchenSinkItem=c},function(t,e,n){"use strict";var r=this&&this.__spreadArrays||function(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var r=Array(t),o=0;for(e=0;e<n;e++)for(var i=arguments[e],a=0,s=i.length;a<s;a++,o++)r[o]=i[a];return r};Object.defineProperty(e,"__esModule",{value:!0}),e.KitchenSinkManager=e.KitchenSinkEventTypes=e.ItemActiveStates=void 0;var o,i,a=n(0),s=n(10),c=n(18),u=n(2),l=n(80),p=n(83),f=n(7),h=n(8),d=n(6),g=["PlayerArea","SidePanelRight","SidePanelBottom"];!function(t){t.Active="Active",t.InActive="InActive"}(o=e.ItemActiveStates||(e.ItemActiveStates={})),function(t){t.ItemActiveStateChangeEvent="ItemActiveStateChangeEvent"}(i=e.KitchenSinkEventTypes||(e.KitchenSinkEventTypes={}));var y={theme:{backgroundColor:"rgba(0, 0, 0, .7)",blur:"10px"},presetAreasMapping:{Playback:{PlayerArea:"PlayerArea",SidePanelRight:"SidePanelRight",SidePanelBottom:"SidePanelBottom"},Live:{PlayerArea:"PlayerArea",SidePanelRight:"SidePanelRight",SidePanelBottom:"SidePanelBottom"}}},m=function(){function t(t){var e,n=this;this.options=t,this._events=new u.EventsManager,this._panels=((e={})[s.KitchenSinkPositions.Bottom]={ref:null,items:[],activeItem:null},e[s.KitchenSinkPositions.Right]={ref:null,items:[],activeItem:null},e[s.KitchenSinkPositions.Top]={ref:null,items:[],activeItem:null},e[s.KitchenSinkPositions.Left]={ref:null,items:[],activeItem:null},e),this._kitchenSinkAdapterRef=null,this.on=this._events.on.bind(this._events),this.off=this._events.off.bind(this._events),this._toggle=function(t){n._isActive(t)?n._deactivateItem(t):n._activateItem(t)},this._activateItem=function(t){var e=t.data,r=e.position,a=e.expandMode,s=n._panels[r];s.activeItem!==t&&(s.activeItem&&n._events.emit({type:i.ItemActiveStateChangeEvent,state:o.InActive,item:s.activeItem}),s.activeItem=t,n._events.emit({type:i.ItemActiveStateChangeEvent,state:o.Active,item:t}),n._expand(r,a))},this._deactivateItem=function(t){var e=t.data.position,r=n._panels[e];r.activeItem===t&&(n._collapse(e),n._events.emit({type:i.ItemActiveStateChangeEvent,state:o.InActive,item:r.activeItem}),r.activeItem=null)},this._isActive=function(t){return n._panels[t.data.position].activeItem===t},this._expand=function(t,e){n._kitchenSinkAdapterRef&&n._kitchenSinkAdapterRef.expand(t,e)},this._renderChild=function(t){return a.h(f.ManagedComponent,{label:"kitchen-sink-manager",renderChildren:function(){return n._renderKitchenSink(t)},isShown:function(){return!0},ref:function(e){return n._panels[t].ref=e}})},this._setRef=function(t){n._kitchenSinkAdapterRef=t||null},this._options=t,this._kitchenSinkConfig=d.getContribConfig(this._options.kalturaPlayer,"ui.kitchenSink",y,{explicitMerge:["presetAreasMapping"]});var r=h.PresetsUtils.groupPresetAreasByType({presetAreasMapping:this._kitchenSinkConfig.presetAreasMapping,acceptableTypes:g});this.options.presetManager.add({label:"kitchen-sink-right",fillContainer:!0,presetAreas:r.SidePanelRight,renderChild:this._renderChild.bind(this,s.KitchenSinkPositions.Right)}),this.options.presetManager.add({label:"kitchen-sink-bottom",fillContainer:!0,presetAreas:r.SidePanelBottom,renderChild:this._renderChild.bind(this,s.KitchenSinkPositions.Bottom)}),this.options.presetManager.add({label:"kitchen-sink-adapter",presetAreas:r.PlayerArea,renderChild:function(){return a.h(p.KitchenSinkAdapter,{ref:n._setRef})}})}return t.prototype.add=function(t){var e=this,n={data:t,isActive:this._isActive,activate:this._activateItem,deactivate:this._deactivateItem,eventManager:this._events,kitchenSinkConfig:this._kitchenSinkConfig},r=this._panels[t.position],o=new c.KitchenSinkItem(n),i=this.options.upperBarManager.add({label:t.label,renderItem:function(){return t.renderIcon(n.isActive(o))},onClick:function(){e._toggle(o),e.options.upperBarManager.update()}});return r.items.push({kitchenSinkItem:o,upperBarItem:i}),r.ref&&r.ref.update(),o},t.prototype.remove=function(t){var e=this._panels[t.data.position],n=u.ArrayUtils.findIndex(e.items,(function(e){var n=e.kitchenSinkItem;return t===n}));if(-1!==n){this._deactivateItem(t);var r=e.items[n].upperBarItem;t._destroy(),this.options.upperBarManager.remove(r),e.items.splice(n,1),e.ref&&e.ref.update()}},t.prototype._collapse=function(t){this._kitchenSinkAdapterRef&&this._kitchenSinkAdapterRef.collapse(t)},t.prototype._renderKitchenSink=function(t){var e=this,n=this._panels[t].items.map((function(t){var n=t.kitchenSinkItem,r={onClose:e._deactivateItem.bind(e,n)};return n.renderContentChild(r)}));return a.h(l.KitchenSinkContainer,null,n)},t.prototype.reset=function(){var t=this;r(this._panels[s.KitchenSinkPositions.Bottom].items,this._panels[s.KitchenSinkPositions.Left].items,this._panels[s.KitchenSinkPositions.Top].items,this._panels[s.KitchenSinkPositions.Right].items).forEach((function(e){var n=e.kitchenSinkItem;t.remove(n)}))},t}();e.KitchenSinkManager=m},function(t,e,n){"use strict";t.exports=function(t,e){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return t.apply(e,n)}}},function(t,e,n){"use strict";var r=n(4);function o(t){return encodeURIComponent(t).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}t.exports=function(t,e,n){if(!e)return t;var i;if(n)i=n(e);else if(r.isURLSearchParams(e))i=e.toString();else{var a=[];r.forEach(e,(function(t,e){null!=t&&(r.isArray(t)?e+="[]":t=[t],r.forEach(t,(function(t){r.isDate(t)?t=t.toISOString():r.isObject(t)&&(t=JSON.stringify(t)),a.push(o(e)+"="+o(t))})))})),i=a.join("&")}if(i){var s=t.indexOf("#");-1!==s&&(t=t.slice(0,s)),t+=(-1===t.indexOf("?")?"?":"&")+i}return t}},function(t,e,n){"use strict";t.exports=function(t){return!(!t||!t.__CANCEL__)}},function(t,e,n){"use strict";(function(e){var r=n(4),o=n(98),i={"Content-Type":"application/x-www-form-urlencoded"};function a(t,e){!r.isUndefined(t)&&r.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}var s,c={adapter:((void 0!==e&&"[object process]"===Object.prototype.toString.call(e)||"undefined"!=typeof XMLHttpRequest)&&(s=n(24)),s),transformRequest:[function(t,e){return o(e,"Accept"),o(e,"Content-Type"),r.isFormData(t)||r.isArrayBuffer(t)||r.isBuffer(t)||r.isStream(t)||r.isFile(t)||r.isBlob(t)?t:r.isArrayBufferView(t)?t.buffer:r.isURLSearchParams(t)?(a(e,"application/x-www-form-urlencoded;charset=utf-8"),t.toString()):r.isObject(t)?(a(e,"application/json;charset=utf-8"),JSON.stringify(t)):t}],transformResponse:[function(t){if("string"==typeof t)try{t=JSON.parse(t)}catch(t){}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};r.forEach(["delete","get","head"],(function(t){c.headers[t]={}})),r.forEach(["post","put","patch"],(function(t){c.headers[t]=r.merge(i)})),t.exports=c}).call(this,n(97))},function(t,e,n){"use strict";var r=n(4),o=n(99),i=n(21),a=n(101),s=n(102),c=n(25);t.exports=function(t){return new Promise((function(e,u){var l=t.data,p=t.headers;r.isFormData(l)&&delete p["Content-Type"];var f=new XMLHttpRequest;if(t.auth){var h=t.auth.username||"",d=t.auth.password||"";p.Authorization="Basic "+btoa(h+":"+d)}if(f.open(t.method.toUpperCase(),i(t.url,t.params,t.paramsSerializer),!0),f.timeout=t.timeout,f.onreadystatechange=function(){if(f&&4===f.readyState&&(0!==f.status||f.responseURL&&0===f.responseURL.indexOf("file:"))){var n="getAllResponseHeaders"in f?a(f.getAllResponseHeaders()):null,r={data:t.responseType&&"text"!==t.responseType?f.response:f.responseText,status:f.status,statusText:f.statusText,headers:n,config:t,request:f};o(e,u,r),f=null}},f.onabort=function(){f&&(u(c("Request aborted",t,"ECONNABORTED",f)),f=null)},f.onerror=function(){u(c("Network Error",t,null,f)),f=null},f.ontimeout=function(){u(c("timeout of "+t.timeout+"ms exceeded",t,"ECONNABORTED",f)),f=null},r.isStandardBrowserEnv()){var g=n(103),y=(t.withCredentials||s(t.url))&&t.xsrfCookieName?g.read(t.xsrfCookieName):void 0;y&&(p[t.xsrfHeaderName]=y)}if("setRequestHeader"in f&&r.forEach(p,(function(t,e){void 0===l&&"content-type"===e.toLowerCase()?delete p[e]:f.setRequestHeader(e,t)})),t.withCredentials&&(f.withCredentials=!0),t.responseType)try{f.responseType=t.responseType}catch(e){if("json"!==t.responseType)throw e}"function"==typeof t.onDownloadProgress&&f.addEventListener("progress",t.onDownloadProgress),"function"==typeof t.onUploadProgress&&f.upload&&f.upload.addEventListener("progress",t.onUploadProgress),t.cancelToken&&t.cancelToken.promise.then((function(t){f&&(f.abort(),u(t),f=null)})),void 0===l&&(l=null),f.send(l)}))}},function(t,e,n){"use strict";var r=n(100);t.exports=function(t,e,n,o,i){var a=new Error(t);return r(a,e,n,o,i)}},function(t,e,n){"use strict";var r=n(4);t.exports=function(t,e){e=e||{};var n={};return r.forEach(["url","method","params","data"],(function(t){void 0!==e[t]&&(n[t]=e[t])})),r.forEach(["headers","auth","proxy"],(function(o){r.isObject(e[o])?n[o]=r.deepMerge(t[o],e[o]):void 0!==e[o]?n[o]=e[o]:r.isObject(t[o])?n[o]=r.deepMerge(t[o]):void 0!==t[o]&&(n[o]=t[o])})),r.forEach(["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","maxContentLength","validateStatus","maxRedirects","httpAgent","httpsAgent","cancelToken","socketPath"],(function(r){void 0!==e[r]?n[r]=e[r]:void 0!==t[r]&&(n[r]=t[r])})),n}},function(t,e,n){"use strict";function r(t){this.message=t}r.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},r.prototype.__CANCEL__=!0,t.exports=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.scaleVideo=void 0,e.scaleVideo=function(t,e,n,r,o){var i={width:0,height:0,left:0,top:0,scaleToTargetWidth:!0};if(t<=0||e<=0||n<=0||r<=0)return i;var a=n,s=e*n/t,c=t*r/e,u=r,l=c>n;return(l=l?o:!o)?(i.width=Math.abs(a),i.height=Math.abs(s),i.scaleToTargetWidth=!0):(i.width=Math.abs(c),i.height=Math.abs(u),i.scaleToTargetWidth=!1),i.left=Math.abs((n-i.width)/2),i.top=Math.abs((r-i.height)/2),i}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OverlayItem=void 0;var r=n(2),o=function(){function t(t){this._destroyed=!1,this._options=t,this._logger=r.getContribLogger({module:"contrib-ui",class:"OverlayItem",context:t.data.label}),this._logger.debug("executed",{method:"constructor",data:{options:t}}),this._logger.info("created item "+t.data.label,{method:"constructor"})}return Object.defineProperty(t.prototype,"data",{get:function(){return this._options.data},enumerable:!1,configurable:!0}),t.prototype.destroy=function(){this._logger.info("destroy item",{method:"destroy"}),this._destroyed=!0},t.prototype.renderOverlayChild=function(t){return this._destroyed?null:this._options.data.renderContent(t)},t}();e.OverlayItem=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OverlayPositions=void 0,function(t){t.PlayerArea="PlayerArea"}(e.OverlayPositions||(e.OverlayPositions={}))},function(t,e){t.exports="data:image/svg+xml,%3Csvg width='32px' height='32px' viewBox='0 0 32 32' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E %3C!-- Generator: Sketch 57.1 (83088) - https://sketch.com --%3E %3Ctitle%3EIcons/32/Someone asks%3C/title%3E %3Cdesc%3ECreated with Sketch.%3C/desc%3E %3Cg id='Icons/32/Someone-asks' stroke='none' stroke-width='1' fill='none' fill-rule='evenodd'%3E %3Cg id='Group' transform='translate(4.000000, 5.000000)' fill='%23B2D238'%3E %3Cellipse id='Oval' cx='12' cy='5.5' rx='6' ry='5.5'%3E%3C/ellipse%3E %3Cpath d='M12,13 C7.995,13 0,15.01 0,19 L0,20.5 C0,21.325 0.675,22 1.5,22 L22.5,22 C23.325,22 24,21.325 24,20.5 L24,19 C24,15.01 16.005,13 12,13 Z' id='Path'%3E%3C/path%3E %3C/g%3E %3C/g%3E %3C/svg%3E"},function(t,e){t.exports="data:image/svg+xml,%3Csvg width='20px' height='20px' viewBox='0 0 20 20' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E %3C!-- Generator: Sketch 57.1 (83088) - https://sketch.com --%3E %3Ctitle%3EIcons/20/Someone asks%3C/title%3E %3Cdesc%3ECreated with Sketch.%3C/desc%3E %3Cg id='Icons/20/Someone-asks' stroke='none' stroke-width='1' fill='none' fill-rule='evenodd'%3E %3Cg id='Group' transform='translate(2.000000, 2.000000)' fill='%23B2D238'%3E %3Ccircle id='Oval' cx='8' cy='4' r='4'%3E%3C/circle%3E %3Cpath d='M8,9 C5.33,9 0,10.5633333 0,13.6666667 L0,14.8333333 C0,15.475 0.45,16 1,16 L15,16 C15.55,16 16,15.475 16,14.8333333 L16,13.6666667 C16,10.5633333 10.67,9 8,9 Z' id='Path'%3E%3C/path%3E %3C/g%3E %3C/g%3E %3C/svg%3E"},function(t,e){t.exports="data:image/svg+xml,%3Csvg width='32px' height='32px' viewBox='0 0 32 32' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E %3C!-- Generator: Sketch 57.1 (83088) - https://sketch.com --%3E %3Ctitle%3EIcons/32x32/Menu Player Close%3C/title%3E %3Cdesc%3ECreated with Sketch.%3C/desc%3E %3Cg id='Icons/32x32/Menu-Player-Close' stroke='none' stroke-width='1' fill='none' fill-rule='evenodd'%3E %3Cpath d='M17.4142136,16 L22.363961,20.9497475 C22.7544853,21.3402718 22.7544853,21.9734367 22.363961,22.363961 C21.9734367,22.7544853 21.3402718,22.7544853 20.9497475,22.363961 L16,17.4142136 L11.0502525,22.363961 C10.6597282,22.7544853 10.0265633,22.7544853 9.63603897,22.363961 C9.24551468,21.9734367 9.24551468,21.3402718 9.63603897,20.9497475 L14.5857864,16 L9.63603897,11.0502525 C9.24551468,10.6597282 9.24551468,10.0265633 9.63603897,9.63603897 C10.0265633,9.24551468 10.6597282,9.24551468 11.0502525,9.63603897 L16,14.5857864 L20.9497475,9.63603897 C21.3402718,9.24551468 21.9734367,9.24551468 22.363961,9.63603897 C22.7544853,10.0265633 22.7544853,10.6597282 22.363961,11.0502525 L17.4142136,16 Z' id='Path' fill='%23FFFFFF'%3E%3C/path%3E %3C/g%3E %3C/svg%3E"},function(t,e){t.exports="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E %3Cpath fill='%23FFF' fill-rule='evenodd' d='M5.956 5l3.348-3.348A.674.674 0 0 0 9.3.7a.672.672 0 0 0-.952-.004L5 4.044 1.652.696A.674.674 0 0 0 .7.7a.672.672 0 0 0-.004.952L4.044 5 .696 8.348A.674.674 0 0 0 .7 9.3c.265.266.69.266.952.004L5 5.956l3.348 3.348c.262.262.689.26.952-.004a.672.672 0 0 0 .004-.952L5.956 5z' opacity='.9'/%3E %3C/svg%3E"},function(t,e){t.exports="data:image/svg+xml,%3Csvg width='16px' height='16px' viewBox='0 0 16 16' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E %3C!-- Generator: Sketch 57.1 (83088) - https://sketch.com --%3E %3Ctitle%3EIcons/16/Close%3C/title%3E %3Cdesc%3ECreated with Sketch.%3C/desc%3E %3Cg id='Icons/16/Close' stroke='none' stroke-width='1' fill='none' fill-rule='evenodd'%3E %3Cpath d='M8.8497789,8 L11.824005,10.9742261 C12.058665,11.2088861 12.058665,11.5893451 11.824005,11.824005 C11.5893451,12.058665 11.2088861,12.058665 10.9742261,11.824005 L8,8.8497789 L5.02577387,11.824005 C4.7911139,12.058665 4.41065493,12.058665 4.17599497,11.824005 C3.94133501,11.5893451 3.94133501,11.2088861 4.17599497,10.9742261 L7.1502211,8 L4.17599497,5.02577387 C3.94133501,4.7911139 3.94133501,4.41065493 4.17599497,4.17599497 C4.41065493,3.94133501 4.7911139,3.94133501 5.02577387,4.17599497 L8,7.1502211 L10.9742261,4.17599497 C11.2088861,3.94133501 11.5893451,3.94133501 11.824005,4.17599497 C12.058665,4.41065493 12.058665,4.7911139 11.824005,5.02577387 L8.8497789,8 Z' id='Path' fill='%23cccccc'%3E%3C/path%3E %3C/g%3E %3C/svg%3E"},function(t,e){t.exports="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E %3Cg fill='none' fill-rule='evenodd'%3E %3Cpath d='M0 0h32v32H0z'/%3E %3Cpath fill='%23FFF' d='M16 22a3 3 0 1 1 0 6 3 3 0 0 1 0-6zm0 2a1 1 0 1 0 0 2 1 1 0 0 0 0-2zm0-11a3 3 0 1 1 0 6 3 3 0 0 1 0-6zm0 2a1 1 0 1 0 0 2 1 1 0 0 0 0-2zm0-11a3 3 0 1 1 0 6 3 3 0 0 1 0-6zm0 2a1 1 0 1 0 0 2 1 1 0 0 0 0-2z'/%3E %3C/g%3E %3C/svg%3E"},function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||e.hasOwnProperty(n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),o(n(38),e),o(n(12),e),o(n(13),e),o(n(9),e),o(n(57),e),o(n(16),e),o(n(64),e),o(n(65),e),o(n(18),e),o(n(10),e),o(n(19),e),o(n(14),e),o(n(89),e),o(n(15),e),o(n(8),e),o(n(28),e),o(n(108),e),o(n(109),e),o(n(7),e),o(n(110),e),o(n(111),e),o(n(29),e),o(n(30),e),o(n(17),e)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BannerManager=e.VisibilityMode=void 0;var r,o=n(9),i=n(0),a=n(39),s=n(43),c=n(11),u=n(6);!function(t){t.VISIBLE="VISIBLE",t.HIDDEN="HIDDEN"}(r=e.VisibilityMode||(e.VisibilityMode={}));var l={theme:{backgroundColor:"rgba(0, 0, 0, .7)",blur:"10px"}},p=function(){function t(t){this.options=t,this._floatingItem=null,this._timerSubscription=void 0,this._options=t,this._bannerConfig=u.getContribConfig(this._options.kalturaPlayer,"ui.banner",l)}return t.prototype.add=function(t){return this._floatingItem&&this.remove(),this._floatingItem=this._options.floatingManager.add({label:"Banner",mode:o.FloatingUIModes.Immediate,position:o.FloatingPositions.InteractiveArea,renderContent:this._createRenderBanner(t,{onClose:this._handleCloseEvent.bind(this),theme:this._bannerConfig.theme})}),t.autoClose&&this._startDurationTimer(t.duration),this._getState()},t.prototype.remove=function(){this._floatingItem&&(this._timerSubscription&&clearTimeout(this._timerSubscription),this._options.floatingManager.remove(this._floatingItem),this._floatingItem=null)},t.prototype.reset=function(){this.remove()},t.prototype._createRenderBanner=function(t,e){var n=t.content,r=t.renderContent,o=e.onClose,c=e.theme;return function(t){return i.h(s.BannerContainer,{onClose:o,theme:c},r?r(n,t):i.h(a.Banner,{content:n}))}},t.prototype._handleCloseEvent=function(){this.remove()},t.prototype._startDurationTimer=function(t){void 0===t&&(t=6e4),this._timerSubscription=setTimeout(this.remove.bind(this),Math.max(5e3,t))},t.prototype._getState=function(){var t=c.getPlayerSize(this._options.kalturaPlayer);return{visibilityMode:!t||t.width<480?r.HIDDEN:r.VISIBLE}},t}();e.BannerManager=p},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(40);Object.defineProperty(e,"Banner",{enumerable:!0,get:function(){return r.Banner}})},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.Banner=void 0;var i=n(0),a=n(2),s=n(41),c=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._logger=a.getContribLogger({module:"contrib-ui",class:"Banner"}),e}return o(e,t),e.prototype.componentDidMount=function(){this._logger.info("mount component",{method:"componentDidMount"})},e.prototype.componentWillUnmount=function(){this._logger.info("unmount component",{method:"componentWillUnmount"})},e.prototype.render=function(t){var e=t.content,n=e.text,r=e.title,o=void 0===r?"Audience asks:":r,a=e.icon,c=void 0===a?this._defaultIcon():a;return this._logger.trace("render component",{method:"render"}),i.h("div",{className:s.defaultBannerRoot+" "+s.bannerWrapper},i.h("div",{className:s.iconContainer},i.h("div",{className:s.iconWrapper},c)),i.h("div",{className:s.bannerBody},i.h("div",{className:s.title},o),i.h("div",{className:s.text},n)))},e.prototype._defaultIcon=function(){return i.h("div",{className:s.iconImage})},e}(i.Component);e.Banner=c},function(t,e,n){var r=n(3),o=n(42);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[t.i,o,""]]),r(o,{insert:"head",singleton:!1}),t.exports=o.locals||{}},function(t,e,n){"use strict";n.r(e);var r=n(1),o=n.n(r),i=n(5),a=n.n(i),s=n(31),c=n.n(s),u=n(32),l=n.n(u),p=o()(!0),f=a()(c.a),h=a()(l.a);p.push([t.i,".contrib_banner__defaultBannerRoot___3Mjsx{display:flex;max-width:100%;height:100%;transition:all .5s ease;text-align:left}.contrib_banner__bannerWrapper___10Aav{padding:18px 17px 17px 16px}.contrib_banner__iconContainer___11URF{height:100%;width:64px}.contrib_banner__iconWrapper___2GmiQ{position:relative;height:48px;width:48px;background-color:rgba(255,255,255,0.14);border-radius:50%;transition:all .5s ease}.contrib_banner__iconImage___34fSF{position:absolute;width:32px;height:32px;left:calc(50% - 16px);top:calc(50% - 16px);background-image:url("+f+");background-repeat:no-repeat;transition:all .5s ease}.contrib_banner__bannerBody___3co4C{height:100%;flex:1 1 auto;overflow:hidden}.contrib_banner__title___3cUox{opacity:0.9;font-size:14px;font-weight:normal;font-style:normal;font-stretch:normal;line-height:1;letter-spacing:normal;color:#ebebeb}.contrib_banner__text___1yzsx{opacity:0.9;font-size:24px;font-weight:normal;font-style:normal;font-stretch:normal;line-height:1.21;letter-spacing:normal;color:#ffffff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;transition:all .5s ease}.playkit-size-md .contrib_banner__bannerWrapper___10Aav{padding:14px 16px 14px}.playkit-size-md .contrib_banner__iconContainer___11URF{width:44px}.playkit-size-md .contrib_banner__iconWrapper___2GmiQ{height:32px;width:32px}.playkit-size-md .contrib_banner__iconImage___34fSF{width:20px;height:20px;left:calc(50% - 10px);top:calc(50% - 10px);background-image:url("+h+")}.playkit-size-md .contrib_banner__bannerBody___3co4C{flex:1 1 auto}.playkit-size-md .contrib_banner__title___3cUox{font-size:12px;font-weight:bold;line-height:1.17}.playkit-size-md .contrib_banner__text___1yzsx{font-size:15px;line-height:1.27}\n","",{version:3,sources:["/Users/semarche/dev/kaltura/playkit-js-contrib/packages/ui/src/components/banner/_banner.scss"],names:[],mappings:"AAAA,2CACE,YAAa,CACb,cAAe,CACf,WAAY,CACZ,uBAAwB,CACxB,eAAgB,CACjB,uCAGC,2BAA4B,CAC7B,uCAGC,WAAY,CACZ,UAAW,CACZ,qCAGC,iBAAkB,CAClB,WAAY,CACZ,UAAW,CACX,uCAAwC,CACxC,iBAAkB,CAClB,uBAAwB,CACzB,mCAGC,iBAAkB,CAClB,UAAW,CACX,WAAY,CACZ,qBAAsB,CACtB,oBAAqB,CACrB,wDAAwD,CACxD,2BAA4B,CAC5B,uBAAwB,CACzB,oCAGC,WAAY,CACZ,aAAc,CACd,eAAgB,CACjB,+BAGC,WAAY,CACZ,cAAe,CACf,kBAAmB,CACnB,iBAAkB,CAClB,mBAAoB,CACpB,aAAc,CACd,qBAAsB,CACtB,aAAc,CACf,8BAGC,WAAY,CACZ,cAAe,CACf,kBAAmB,CACnB,iBAAkB,CAClB,mBAAoB,CACpB,gBAAiB,CACjB,qBAAsB,CACtB,aAAc,CACd,kBAAmB,CACnB,eAAgB,CAChB,sBAAuB,CACvB,uBAAwB,CACzB,wDAMO,sBACF,CALN,wDAOQ,UAAW,CAPnB,sDAUQ,WAAY,CACZ,UAAW,CAXnB,oDAcQ,UAAW,CACX,WAAY,CACZ,qBAAsB,CACtB,oBAAqB,CACrB,wDAAwD,CAlBhE,qDAqBQ,aAAc,CArBtB,gDAwBQ,cAAe,CACf,gBAAiB,CACjB,gBAAiB,CA1BzB,+CA6BQ,cAAe,CACf,gBAAiB",file:"_banner.scss",sourcesContent:[".defaultBannerRoot {\n  display: flex;\n  max-width: 100%;\n  height: 100%;\n  transition: all .5s ease;\n  text-align: left;\n}\n\n.bannerWrapper {\n  padding: 18px 17px 17px 16px;\n}\n\n.iconContainer {\n  height: 100%;\n  width: 64px;\n}\n\n.iconWrapper {\n  position: relative;\n  height: 48px;\n  width: 48px;\n  background-color: rgba(255,255,255,0.14);\n  border-radius: 50%;\n  transition: all .5s ease;\n}\n\n.iconImage {\n  position: absolute;\n  width: 32px;\n  height: 32px;\n  left: calc(50% - 16px);\n  top: calc(50% - 16px);\n  background-image: url('./assets/someone_asks_large.svg');\n  background-repeat: no-repeat;\n  transition: all .5s ease;\n}\n\n.bannerBody {\n  height: 100%;\n  flex: 1 1 auto;\n  overflow: hidden;\n}\n\n.title {\n  opacity: 0.9;\n  font-size: 14px;\n  font-weight: normal;\n  font-style: normal;\n  font-stretch: normal;\n  line-height: 1;\n  letter-spacing: normal;\n  color: #ebebeb;\n}\n\n.text {\n  opacity: 0.9;\n  font-size: 24px;\n  font-weight: normal;\n  font-style: normal;\n  font-stretch: normal;\n  line-height: 1.21;\n  letter-spacing: normal;\n  color: #ffffff;\n  white-space: nowrap;\n  overflow: hidden;\n  text-overflow: ellipsis;\n  transition: all .5s ease;\n}\n\n:global {\n  .playkit-size-md {\n    :local {\n      .bannerWrapper {\n        padding: 14px 16px 14px\n      }\n      .iconContainer {\n        width: 44px;\n      }\n      .iconWrapper {\n        height: 32px;\n        width: 32px;\n      }\n      .iconImage {\n        width: 20px;\n        height: 20px;\n        left: calc(50% - 10px);\n        top: calc(50% - 10px);\n        background-image: url('./assets/someone_asks_small.svg');\n      }\n      .bannerBody {\n        flex: 1 1 auto;\n      }\n      .title {\n        font-size: 12px;\n        font-weight: bold;\n        line-height: 1.17;\n      }\n      .text {\n        font-size: 15px;\n        line-height: 1.27;\n      }\n    }\n  }\n}\n"]}]),p.locals={defaultBannerRoot:"contrib_banner__defaultBannerRoot___3Mjsx",bannerWrapper:"contrib_banner__bannerWrapper___10Aav",iconContainer:"contrib_banner__iconContainer___11URF",iconWrapper:"contrib_banner__iconWrapper___2GmiQ",iconImage:"contrib_banner__iconImage___34fSF",bannerBody:"contrib_banner__bannerBody___3co4C",title:"contrib_banner__title___3cUox",text:"contrib_banner__text___1yzsx"},e.default=p},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(44);Object.defineProperty(e,"BannerContainer",{enumerable:!0,get:function(){return r.BannerContainer}})},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.BannerContainer=void 0;var i=n(0),a=n(2),s=n(45),c=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._logger=a.getContribLogger({module:"contrib-ui",class:"BannerContainer"}),e}return o(e,t),e.prototype.componentDidMount=function(){this._logger.info("mount component",{method:"componentDidMount"})},e.prototype.componentWillUnmount=function(){this._logger.info("unmount component",{method:"componentWillUnmount"})},e.prototype.render=function(t){this._logger.trace("render component",{method:"render"});var e=this.props.theme,n=e.backgroundColor,r=e.blur;return i.h("div",{className:s.bannerContainerRoot},i.h("div",{style:"\n                background-color:"+n+"; \n                backdrop-filter: blur("+r+");\n             ",className:s.bannerContainer},i.h("button",{className:s.closeButton,onClick:t.onClose}),this.props.children))},e}(i.Component);e.BannerContainer=c},function(t,e,n){var r=n(3),o=n(46);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[t.i,o,""]]),r(o,{insert:"head",singleton:!1}),t.exports=o.locals||{}},function(t,e,n){"use strict";n.r(e);var r=n(1),o=n.n(r),i=n(5),a=n.n(i),s=n(33),c=n.n(s),u=n(34),l=n.n(u),p=o()(!0),f=a()(c.a),h=a()(l.a);p.push([t.i,".contrib_banner-container__bannerContainerRoot___3riMs{position:absolute;max-width:100%;min-width:270px;padding:0 16px 8px;height:88px;bottom:0;left:0;transition:all .5s ease}.contrib_banner-container__bannerContainer___gn6bT{position:relative;width:100%;height:100%;border-radius:4px;transition:all .5s ease}.contrib_banner-container__closeButton___2PBES{position:absolute;background-color:transparent;padding:0;border:none;top:0;right:0;width:32px;height:32px;background-image:url("+f+");background-repeat:no-repeat}.contrib_banner-container__closeButton___2PBES:hover,.contrib_banner-container__closeButton___2PBES:active{cursor:pointer}.playkit-size-md .contrib_banner-container__bannerContainerRoot___3riMs{height:68px;min-width:230px}.playkit-size-md .contrib_banner-container__closeButton___2PBES{top:8px;right:8px;width:10px;height:10px;background-image:url("+h+")}.playkit-size-sm .contrib_banner-container__bannerContainerRoot___3riMs,.playkit-size-xs .contrib_banner-container__bannerContainerRoot___3riMs,.playkit-size-ty .contrib_banner-container__bannerContainerRoot___3riMs{display:none;width:0;height:0}\n","",{version:3,sources:["/Users/semarche/dev/kaltura/playkit-js-contrib/packages/ui/src/components/banner-container/_banner-container.scss"],names:[],mappings:"AAAA,uDACE,iBAAkB,CAClB,cAAe,CACf,eAAgB,CAChB,kBAAmB,CACnB,WAAY,CACZ,QAAS,CACT,MAAO,CACP,uBAAwB,CACzB,mDAGC,iBAAkB,CAClB,UAAW,CACX,WAAY,CACZ,iBAAkB,CAClB,uBAAwB,CACzB,+CAGC,iBAAkB,CAClB,4BAA6B,CAC7B,SAAU,CACV,WAAY,CACZ,KAAM,CACN,OAAQ,CACR,UAAW,CACX,WAAY,CACZ,wDAAiD,CACjD,2BAA4B,CAC7B,2GAGC,cAAe,CAChB,wEAMO,WAAY,CACZ,eAAgB,CALxB,gEAQQ,OAAQ,CACR,SAAU,CACV,UAAW,CACX,WAAY,CACZ,wDAAiD,CAClD,wNAQD,YAAa,CACb,OAAQ,CACR,QAAS",file:"_banner-container.scss",sourcesContent:[".bannerContainerRoot {\n  position: absolute;\n  max-width: 100%;\n  min-width: 270px;\n  padding: 0 16px 8px;\n  height: 88px;\n  bottom: 0;\n  left: 0;\n  transition: all .5s ease;\n}\n\n.bannerContainer {\n  position: relative;\n  width: 100%;\n  height: 100%;\n  border-radius: 4px;\n  transition: all .5s ease;\n}\n\n.closeButton {\n  position: absolute;\n  background-color: transparent;\n  padding: 0;\n  border: none;\n  top: 0;\n  right: 0;\n  width: 32px;\n  height: 32px;\n  background-image: url('./assets/close_large.svg');\n  background-repeat: no-repeat;\n}\n\n.closeButton:hover, .closeButton:active {\n  cursor: pointer;\n}\n\n:global {\n  .playkit-size-md {\n    :local {\n      .bannerContainerRoot {\n        height: 68px;\n        min-width: 230px;\n      }\n      .closeButton {\n        top: 8px;\n        right: 8px;\n        width: 10px;\n        height: 10px;\n        background-image: url('./assets/close_small.svg');\n      }\n    }\n  }\n}\n\n:global {\n  .playkit-size-sm, .playkit-size-xs, .playkit-size-ty {\n    :local .bannerContainerRoot {\n      display: none;\n      width: 0;\n      height: 0;\n    }\n  }\n}\n"]}]),p.locals={bannerContainerRoot:"contrib_banner-container__bannerContainerRoot___3riMs",bannerContainer:"contrib_banner-container__bannerContainer___gn6bT",closeButton:"contrib_banner-container__closeButton___2PBES"},e.default=p},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(48);Object.defineProperty(e,"ToastsContainer",{enumerable:!0,get:function(){return r.ToastsContainer}})},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.ToastsContainer=void 0;var a=n(0),s=n(49),c=n(52),u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.render=function(){return a.h("div",{className:c.toastsContainer},this.props.toasts.map((function(t){return a.h("div",{className:c.toastRow,key:t.id},a.h(s.Toast,i({},t)))})))},e}(a.Component);e.ToastsContainer=u},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.Toast=void 0;var i=n(0),a=n(50),s=n(12),c=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.state={isShown:!0},e._onClick=function(t){e.props.onClick(),e._onClose(t)},e._onClose=function(t){t.stopPropagation(),e.setState({isShown:!1}),e.props.onClose(e.props.id)},e}return o(e,t),e.prototype._getToastSeverityClass=function(){switch(this.props.severity){case s.ToastSeverity.Success:return a.successToast;case s.ToastSeverity.Warn:return a.warnToast;case s.ToastSeverity.Error:return a.errorToast;default:return a.infoToast}},e.prototype.render=function(){var t=this.props,e=t.text,n=t.title,r=t.icon;return i.h("div",{className:a.toastWrapper+" "+this._getToastSeverityClass(),onClick:this._onClick},i.h("button",{className:a.closeButton,onClick:this._onClose}),i.h("div",{className:a.title},n),i.h("div",{className:a.toastBody},i.h("div",{className:a.iconContainer},i.h("div",{className:a.iconWrapper},r)),i.h("div",{className:a.text},e)))},e}(i.Component);e.Toast=c},function(t,e,n){var r=n(3),o=n(51);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[t.i,o,""]]),r(o,{insert:"head",singleton:!1}),t.exports=o.locals||{}},function(t,e,n){"use strict";n.r(e);var r=n(1),o=n.n(r),i=n(5),a=n.n(i),s=n(35),c=n.n(s),u=o()(!0),l=a()(c.a);u.push([t.i,".contrib_toast__toastWrapper___QXcJM{position:relative;min-width:120px;max-width:264px;height:100%;border-radius:4px;background-color:#222222;border-left-style:solid;border-left-width:4px;text-align:left}.contrib_toast__infoToast___1HmIt{border-left-color:#01ACCD}.contrib_toast__successToast___3ampp{border-left-color:#009E48}.contrib_toast__warnToast___23lkF{border-left-color:#F9A71B}.contrib_toast__errorToast___3bwna{border-left-color:#E7585D}.contrib_toast__closeButton___ATTAj{position:absolute;background-color:transparent;top:0;right:0;width:16px;height:16px;object-fit:contain;background-repeat:no-repeat;border:none;background-image:url("+l+")}.contrib_toast__closeButton___ATTAj:hover{cursor:pointer}.contrib_toast__title___RMhDh{font-size:12px;font-weight:normal;font-style:normal;font-stretch:normal;line-height:1.17;letter-spacing:normal;color:#cccccc;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding-top:4px;padding-right:16px;padding-left:12px}.contrib_toast__toastBody___2kkj8{position:relative;width:100%;padding:2px 16px 5px 12px}.contrib_toast__iconContainer___37C80{position:relative;height:16px;width:16px;float:left;margin-right:7px}.contrib_toast__iconWrapper___h5_1x{height:16px;width:16px}.contrib_toast__text___2d4Qb{font-size:14px;font-weight:bold;font-style:normal;font-stretch:normal;line-height:normal;letter-spacing:normal;color:#cccccc;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}\n","",{version:3,sources:["/Users/semarche/dev/kaltura/playkit-js-contrib/packages/ui/src/components/toast/_toast.scss"],names:[],mappings:"AAAA,qCACE,iBAAkB,CAClB,eAAgB,CAChB,eAAgB,CAChB,WAAY,CACZ,iBAAkB,CAClB,wBAAyB,CACzB,uBAAwB,CACxB,qBAAsB,CACtB,eAAgB,CACjB,kCAGC,yBAA0B,CAC3B,qCAGC,yBAA0B,CAC3B,kCAGC,yBAA0B,CAC3B,mCAGC,yBAA0B,CAC3B,oCAGC,iBAAkB,CAClB,4BAA6B,CAC7B,KAAM,CACN,OAAQ,CACR,UAAW,CACX,WAAY,CACZ,kBAAmB,CACnB,2BAA4B,CAC5B,WAAY,CACZ,wDAA2C,CAV7C,0CAaI,cAAe,CAChB,8BAID,cAAe,CACf,kBAAmB,CACnB,iBAAkB,CAClB,mBAAoB,CACpB,gBAAiB,CACjB,qBAAsB,CACtB,aAAc,CACd,kBAAmB,CACnB,eAAgB,CAChB,sBAAuB,CACvB,eAAgB,CAChB,kBAAmB,CACnB,iBAAkB,CACnB,kCAGC,iBAAkB,CAClB,UAAW,CACX,yBAA0B,CAC3B,sCAGC,iBAAkB,CAClB,WAAY,CACZ,UAAW,CACX,UAAW,CACX,gBAAiB,CAClB,oCAGC,WAAY,CACZ,UAAW,CACZ,6BAGC,cAAe,CACf,gBAAiB,CACjB,iBAAkB,CAClB,mBAAoB,CACpB,kBAAmB,CACnB,qBAAsB,CACtB,aAAc,CACd,kBAAmB,CACnB,eAAgB,CAChB,sBAAuB",file:"_toast.scss",sourcesContent:['.toastWrapper {\n  position: relative;\n  min-width: 120px;\n  max-width: 264px;\n  height: 100%;\n  border-radius: 4px;\n  background-color: #222222;\n  border-left-style: solid;\n  border-left-width: 4px;\n  text-align: left;\n}\n\n.infoToast {\n  border-left-color: #01ACCD;\n}\n\n.successToast {\n  border-left-color: #009E48;\n}\n\n.warnToast {\n  border-left-color: #F9A71B;\n}\n\n.errorToast {\n  border-left-color: #E7585D;\n}\n\n.closeButton {\n  position: absolute;\n  background-color: transparent;\n  top: 0;\n  right: 0;\n  width: 16px;\n  height: 16px;\n  object-fit: contain;\n  background-repeat: no-repeat;\n  border: none;\n  background-image: url("./assets/close.svg");\n\n  &:hover {\n    cursor: pointer;\n  }\n}\n\n.title {\n  font-size: 12px;\n  font-weight: normal;\n  font-style: normal;\n  font-stretch: normal;\n  line-height: 1.17;\n  letter-spacing: normal;\n  color: #cccccc;\n  white-space: nowrap;\n  overflow: hidden;\n  text-overflow: ellipsis;\n  padding-top: 4px;\n  padding-right: 16px;\n  padding-left: 12px;\n}\n\n.toastBody {\n  position: relative;\n  width: 100%;\n  padding: 2px 16px 5px 12px;\n}\n\n.iconContainer {\n  position: relative;\n  height: 16px;\n  width: 16px;\n  float: left;\n  margin-right: 7px;\n}\n\n.iconWrapper {\n  height: 16px;\n  width: 16px;\n}\n\n.text {\n  font-size: 14px;\n  font-weight: bold;\n  font-style: normal;\n  font-stretch: normal;\n  line-height: normal;\n  letter-spacing: normal;\n  color: #cccccc;\n  white-space: nowrap;\n  overflow: hidden;\n  text-overflow: ellipsis;\n}\n\n']}]),u.locals={toastWrapper:"contrib_toast__toastWrapper___QXcJM",infoToast:"contrib_toast__infoToast___1HmIt",successToast:"contrib_toast__successToast___3ampp",warnToast:"contrib_toast__warnToast___23lkF",errorToast:"contrib_toast__errorToast___3bwna",closeButton:"contrib_toast__closeButton___ATTAj",title:"contrib_toast__title___RMhDh",toastBody:"contrib_toast__toastBody___2kkj8",iconContainer:"contrib_toast__iconContainer___37C80",iconWrapper:"contrib_toast__iconWrapper___h5_1x",text:"contrib_toast__text___2d4Qb"},e.default=u},function(t,e,n){var r=n(3),o=n(53);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[t.i,o,""]]),r(o,{insert:"head",singleton:!1}),t.exports=o.locals||{}},function(t,e,n){"use strict";n.r(e);var r=n(1),o=n.n(r)()(!0);o.push([t.i,".contrib_toasts-container__toastsContainer___2MBa-{position:absolute;right:0;top:0;padding:8px 16px 0;min-width:120px;max-width:264px;display:flex;flex-direction:column}.contrib_toasts-container__toastRow___2oVhO{height:42px;min-width:120px;max-width:264px;margin-bottom:8px;overflow:hidden;overflow-wrap:break-word;text-overflow:ellipsis;align-self:flex-end}\n","",{version:3,sources:["/Users/semarche/dev/kaltura/playkit-js-contrib/packages/ui/src/components/toasts-container/_toasts-container.scss"],names:[],mappings:"AAAA,mDACE,iBAAkB,CAClB,OAAQ,CACR,KAAM,CACN,kBAAmB,CACnB,eAAgB,CAChB,eAAgB,CAChB,YAAa,CACb,qBAAsB,CACvB,4CAGC,WAAY,CACZ,eAAgB,CAChB,eAAgB,CAChB,iBAAkB,CAClB,eAAgB,CAChB,wBAAyB,CACzB,sBAAuB,CACvB,mBAAoB",file:"_toasts-container.scss",sourcesContent:[".toastsContainer {\n  position: absolute;\n  right: 0;\n  top: 0;\n  padding: 8px 16px 0;\n  min-width: 120px;\n  max-width: 264px;\n  display: flex;\n  flex-direction: column;\n}\n\n.toastRow {\n  height: 42px;\n  min-width: 120px;\n  max-width: 264px;\n  margin-bottom: 8px;\n  overflow: hidden;\n  overflow-wrap: break-word;\n  text-overflow: ellipsis;\n  align-self: flex-end;\n}\n"]}]),o.locals={toastsContainer:"contrib_toasts-container__toastsContainer___2MBa-",toastRow:"contrib_toasts-container__toastRow___2oVhO"},e.default=o},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__decorate||function(t,e,n,r){var o,i=arguments.length,a=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,n,a):o(e,n))||a);return i>3&&a&&Object.defineProperty(e,n,a),a};Object.defineProperty(e,"__esModule",{value:!0}),e.ManagedComponent=void 0;var a=n(0),s=n(2),c=n(55),u=KalturaPlayer.ui.redux.connect,l=function(t){return{playerSize:t.shell.playerSize}},p=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._logger=null,e}return o(e,t),e.prototype.update=function(){this.setState((function(t){return{toggler:!t.toggler}}))},e.prototype.shouldComponentUpdate=function(t){var e=this.props,n=e.updateOnPlayerSizeChanged,r=e.playerSize;return n&&t.playerSize!==r||t.playerSize===r},e.prototype.componentDidMount=function(){this._logger=s.getContribLogger({module:"contrib-ui",class:"ManagedComponent",context:this.props.label}),this._logger.info("mount component",{method:"componentDidMount"}),this.setState({toggler:!1})},e.prototype.render=function(){var t=this.props,e=t.fillContainer,n=t.isShown,r=t.playerSize;return n()?(this._logger&&this._logger.trace("render component",{method:"render"}),a.h("div",{"data-contrib-item":this.props.label,className:e?c.fillContainer:""},this.props.renderChildren(r))):null},e.defaultProps={fillContainer:!1},i([u(l,null,null,{forwardRef:!0})],e)}(a.Component);e.ManagedComponent=p},function(t,e,n){var r=n(3),o=n(56);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[t.i,o,""]]),r(o,{insert:"head",singleton:!1}),t.exports=o.locals||{}},function(t,e,n){"use strict";n.r(e);var r=n(1),o=n.n(r)()(!0);o.push([t.i,".contrib_managed-component__fill-container___27fdI{width:100%;height:100%}\n","",{version:3,sources:["/Users/semarche/dev/kaltura/playkit-js-contrib/packages/ui/src/components/managed-component/_managed-component.scss"],names:[],mappings:"AAAA,mDACE,UAAW,CACX,WAAY",file:"_managed-component.scss",sourcesContent:[".fill-container {\n  width: 100%;\n  height: 100%;\n}\n"]}]),o.locals={"fill-container":"contrib_managed-component__fill-container___27fdI",fillContainer:"contrib_managed-component__fill-container___27fdI"},e.default=o},function(t,e,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},o=this&&this.__spreadArrays||function(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var r=Array(t),o=0;for(e=0;e<n;e++)for(var i=arguments[e],a=0,s=i.length;a<s;a++,o++)r[o]=i[a];return r};Object.defineProperty(e,"__esModule",{value:!0}),e.FloatingManager=void 0;var i=n(13),a=n(9),s=n(14),c=n(0),u=n(11),l=n(7),p=n(8),f=n(6),h={presetAreasMapping:{Playback:{VideoArea:"VideoArea",PresetArea:"PresetArea",InteractiveArea:"InteractiveArea"},Live:{VideoArea:"VideoArea",PresetArea:"PresetArea",InteractiveArea:"InteractiveArea"}}},d=["VideoArea","PresetArea","InteractiveArea"],g=function(){function t(t){var e,n,r=this;this._options=t,this._items=((e={})[a.FloatingPositions.VideoArea]=[],e[a.FloatingPositions.InteractiveArea]=[],e[a.FloatingPositions.PresetArea]=[],e),this._componentRef=((n={})[a.FloatingPositions.InteractiveArea]=null,n[a.FloatingPositions.VideoArea]=null,n[a.FloatingPositions.PresetArea]=null,n),this._cache={canvas:{playerSize:{width:0,height:0},videoSize:{width:0,height:0}}},this._renderItems=function(t){var e=r._getRendererProps({});return r._items[t].map((function(t){return t.renderFloatingChild(e)}))},this._renderChild=function(t){return c.h(l.ManagedComponent,{label:"floating-manager",renderChildren:function(){return r._renderItems(t)},isShown:function(){return!0},ref:function(e){return r._componentRef[t]=e}})},this._floatingConfig=f.getContribConfig(this._options.kalturaPlayer,"ui.floating",h,{explicitMerge:["presetAreasMapping"]});var o=p.PresetsUtils.groupPresetAreasByType({presetAreasMapping:this._floatingConfig.presetAreasMapping,acceptableTypes:d});Object.keys(o).forEach((function(t){r._options.presetManager.add({label:"floating-manager",presetAreas:o[t],renderChild:function(){return r._renderChild(a.FloatingPositions[t])}})})),this._addPlayerBindings(),this._updateCachedCanvas()}return t.prototype.add=function(t){var e=this._options.presetManager,n=r(r({presetManager:e},this._options),{data:t}),o=new i.FloatingItem(n);return this._items[t.position].push(o),o},t.prototype.remove=function(t){var e=this._items[t.data.position],n=e.indexOf(t);n>-1?(e[n].destroy(),e.splice(n,1)):console.warn("couldn't remove "+t+" since it wasn't found")},t.prototype.reset=function(){o(this._items.VideoArea,this._items.InteractiveArea,this._items.PresetArea).forEach((function(t){try{t.destroy()}catch(t){console.warn(t)}})),this._items.VideoArea=[],this._items.PresetArea=[],this._items.InteractiveArea=[]},t.prototype._getRendererProps=function(t){var e=this._options.kalturaPlayer;return{currentTime:void 0!==t.currentTime?t.currentTime:1e3*e.currentTime,canvas:this._cache.canvas}},t.prototype._updateCachedCanvas=function(){this._cache.canvas={playerSize:u.getPlayerSize(this._options.kalturaPlayer),videoSize:u.getVideoSize(this._options.kalturaPlayer)}},t.prototype._updateComponents=function(){this._componentRef.InteractiveArea&&this._componentRef.InteractiveArea.update(),this._componentRef.PresetArea&&this._componentRef.PresetArea.update(),this._componentRef.VideoArea&&this._componentRef.VideoArea.update()},t.prototype._addPlayerBindings=function(){var t=this,e=this._options.kalturaPlayer;e.addEventListener(e.Event.TIME_UPDATE,(function(){t._updateComponents()})),e.addEventListener(e.Event.MEDIA_LOADED,(function(){t._updateCachedCanvas(),t._updateComponents()})),this._options.presetManager.on(s.PresetManagerEventTypes.VideoResizeEvent,(function(){t._updateCachedCanvas(),t._updateComponents()})),this._options.presetManager.on(s.PresetManagerEventTypes.PresetResizeEvent,(function(){t._updateCachedCanvas(),t._updateComponents()}))},t}();e.FloatingManager=g},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PresetItem=void 0;var r=n(0),o=n(2),i=n(15),a=n(59),s=function(){function t(t){var e=this;this._render=function(){if(e._options.data.isolateComponent){var t=e._options.data,n=t.label,o=t.fillContainer;return r.h(a.InjectedComponent,{label:n,fillContainer:o||!1,onCreate:e._onCreate,onDestroy:e._onDestroy})}return e._options.data.renderChild()},this._onDestroy=function(t){t.parent?(e._logger.info("remove injected contrib preset component",{method:"_onDestroy"}),r.render(null,t.parent)):e._logger.warn("missing parent argument, aborting element removal",{method:"_onDestroy"})},this._onCreate=function(t){try{if(!t.parent)return void e._logger.warn("missing parent argument, aborting element creation",{method:"_create"});var n=e._options.data.renderChild();if(!n)return void e._logger.warn("child renderer result is invalid, expected element got undefined|null",{method:"_create"});e._logger.info("inject contrib preset component",{method:"_create"}),r.render(n,t.parent)}catch(t){e._logger.error("failed to create injected component.",{method:"_onCreate"})}},this._options=t,this._logger=o.getContribLogger({module:"contrib-ui",class:"PresetItem",context:t.data.label}),this._logger.debug("executed",{method:"constructor",data:{options:t}}),this._logger.info("created item "+t.data.label,{method:"constructor"})}return Object.defineProperty(t.prototype,"playerConfig",{get:function(){var t=[];for(var e in this._options.data.presetAreas){var n=this._options.data.presetAreas[e],r=this._options.data.relativeTo;if(n){var o={label:this._options.data.label,presets:[e],container:n,get:this._render};if(r)switch(r.type){case i.RelativeToTypes.After:o.afterComponent=r.name;break;case i.RelativeToTypes.Before:o.beforeComponent=r.name;break;case i.RelativeToTypes.Replace:o.replaceComponent=r.name}t.push(o)}else this._logger.warn("Cannot register component to core player using the preset manager for preset "+e+". preset area name is missing. Ignoring this request.",{method:"playerConfig"})}return t},enumerable:!1,configurable:!0}),t}();e.PresetItem=s},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.InjectedComponent=void 0;var i=n(0),a=n(60),s=n(2).getContribLogger({module:"contrib-ui",class:"InjectedComponent"}),c=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._root=null,e}return o(e,t),e.prototype.shouldComponentUpdate=function(){return!1},e.prototype.componentDidMount=function(){var t=this.props,e=t.onCreate,n=t.label;if(e){var r=this._root;r?(s.debug("inject component",{data:{label:n}}),e({parent:r})):s.warn("Cannot inject item, ailed to create parent component",{data:{label:n}})}else s.warn("Cannot inject item, missing 'onCreate' method",{data:{label:n}})},e.prototype.componentWillUnmount=function(){var t=this.props,e=t.onDestroy,n=t.label,r=this._root;r&&e&&(e({parent:r}),s.debug("destroy injected component",{data:{label:n}}))},e.prototype.render=function(){var t=this,e=this.props,n=e.label,r=e.fillContainer?a.fillContainer:"";return i.h("div",{"data-contrib-injected":n,className:r,ref:function(e){return t._root=e}})},e}(i.Component);e.InjectedComponent=c},function(t,e,n){var r=n(3),o=n(61);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[t.i,o,""]]),r(o,{insert:"head",singleton:!1}),t.exports=o.locals||{}},function(t,e,n){"use strict";n.r(e);var r=n(1),o=n.n(r)()(!0);o.push([t.i,".contribinjected-component__fill-container___2LHoe{width:100%;height:100%;overflow:hidden}\n","",{version:3,sources:["/Users/semarche/dev/kaltura/playkit-js-contrib/packages/ui/src/components/injected-component/injected-component.scss"],names:[],mappings:"AAAA,mDACE,UAAW,CACX,WAAY,CACZ,eAAgB",file:"injected-component.scss",sourcesContent:[".fill-container {\n  width: 100%;\n  height: 100%;\n  overflow: hidden;\n}\n"]}]),o.locals={"fill-container":"contribinjected-component__fill-container___2LHoe",fillContainer:"contribinjected-component__fill-container___2LHoe"},e.default=o},function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||e.hasOwnProperty(n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),o(n(63),e)},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__decorate||function(t,e,n,r){var o,i=arguments.length,a=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,n,a):o(e,n))||a);return i>3&&a&&Object.defineProperty(e,n,a),a};Object.defineProperty(e,"__esModule",{value:!0}),e.UIPlayerAdapter=void 0;var a=n(0),s=n(2),c=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._logger=null,e}return o(e,t),e.prototype.componentDidMount=function(){this._logger=s.getContribLogger({module:"contrib-ui",class:"UIPlayerAdapter"}),this._logger.info("mount component",{method:"componentDidMount"}),this.props.onMount(this.props.player)},e.prototype.componentWillUnmount=function(){this.props.onUnmount(this.props.player),this._logger&&this._logger.info("unmount component",{method:"componentWillUnmount"})},e.prototype.render=function(t){return null},e.defaultProps={player:null},i([KalturaPlayer.ui.components.withPlayer],e)}(a.Component);e.UIPlayerAdapter=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0})},function(t,e,n){"use strict";var r=this&&this.__spreadArrays||function(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var r=Array(t),o=0;for(e=0;e<n;e++)for(var i=arguments[e],a=0,s=i.length;a<s;a++,o++)r[o]=i[a];return r};Object.defineProperty(e,"__esModule",{value:!0}),e.UpperBarManager=void 0;var o=n(0),i=n(16),a=n(66),s=n(2),c=n(7),u=n(8),l=n(6),p=n(70),f=KalturaPlayer.ui.components.PLAYER_SIZE,h={presetAreasMapping:{Playback:{TopBarRightControls:"TopBarRightControls"},Live:{TopBarRightControls:"TopBarRightControls"}}},d=["TopBarRightControls"],g=function(){function t(t){var e=this;this._items=[],this._renderChild=function(){return o.h(c.ManagedComponent,{label:"upper-bar-manager",renderChildren:function(t){return e._renderItems(t)},isShown:function(){return!0},updateOnPlayerSizeChanged:!0,ref:function(t){return e._rootElement=t}})},this._renderItems=function(t){var n=e._prepareUpperBarItems(t),r=n.upperBarItems,s=n.iconMenuItems;if(r.length&&s.length){var c={kalturaPlayer:e._options.kalturaPlayer,data:{label:"Icon-menu",onClick:function(){},renderItem:function(){return o.h(p.IconsMenu,{content:s})}}},u=new i.UpperBarItem(c);r.push(u)}var l=r.map((function(t){return t.renderChild({})}));return o.h(a.UpperBar,null,l)},this._options=t,this._upperBarConfig=l.getContribConfig(this._options.kalturaPlayer,"ui.upperBar",h,{explicitMerge:["presetAreasMapping"]}),this._iconsMenuConfig=l.getContribConfig(this._options.kalturaPlayer,"ui.iconsMenu",{iconsOrder:{}});var n=u.PresetsUtils.groupPresetAreasByType({presetAreasMapping:this._upperBarConfig.presetAreasMapping,acceptableTypes:d});this._options.presetManager.add({label:"upper-bar-manager",presetAreas:n.TopBarRightControls,renderChild:this._renderChild})}return t.prototype.add=function(t){var e={kalturaPlayer:this._options.kalturaPlayer,data:t,order:s.ObjectUtils.get(this._iconsMenuConfig,"iconsOrder."+t.label,0)},n=new i.UpperBarItem(e);return this._items.push(n),this._items=s.ArrayUtils.sortByKey(this._items,"_options.order").reverse(),this.update(),n},t.prototype.remove=function(t){var e=s.ArrayUtils.findIndex(this._items,(function(e){return e===t}));-1!==e&&(this._items.splice(e,1),this.update())},t.prototype.update=function(){this._rootElement&&this._rootElement.update()},t.prototype._prepareUpperBarItems=function(t){var e=r(this._items),n=[];switch(t){case f.TINY:n=[];break;case f.EXTRA_SMALL:case f.SMALL:n=e.splice(0,2);break;default:n=e.splice(0,4)}return{upperBarItems:n,iconMenuItems:e}},t.prototype.reset=function(){var t=this;this._items.forEach((function(e){t.remove(e)}))},t}();e.UpperBarManager=g},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(67);Object.defineProperty(e,"UpperBar",{enumerable:!0,get:function(){return r.UpperBar}})},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.UpperBar=void 0;var i=n(0),a=n(68),s=n(2),c=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._logger=null,e}return o(e,t),e.prototype.componentDidMount=function(){this._logger=s.getContribLogger({module:"contrib-ui",class:"UpperBar"}),this._logger.info("mount component",{method:"componentDidMount"})},e.prototype.componentWillUnmount=function(){this._logger&&this._logger.info("unmount component",{method:"componentWillUnmount"})},e.prototype.render=function(t){return this._logger&&this._logger.trace("render component",{method:"render"}),i.h("div",{className:a.root},this.props.children)},e}(i.Component);e.UpperBar=c},function(t,e,n){var r=n(3),o=n(69);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[t.i,o,""]]),r(o,{insert:"head",singleton:!1}),t.exports=o.locals||{}},function(t,e,n){"use strict";n.r(e);var r=n(1),o=n.n(r)()(!0);o.push([t.i,".contrib_upper-bar__root___1T--i{display:flex;flex-direction:row}.contrib_upper-bar__root___1T--i .upper-bar-icon{cursor:pointer}.contrib_upper-bar__root___1T--i>*{margin-left:10px}\n","",{version:3,sources:["/Users/semarche/dev/kaltura/playkit-js-contrib/packages/ui/src/components/upper-bar/_upper-bar.scss"],names:[],mappings:"AAAA,iCAKE,YAAa,CACb,kBAAmB,CANrB,iDAEI,cAAe,CAFnB,mCASI,gBAAiB",file:"_upper-bar.scss",sourcesContent:[".root {\n  :global(.upper-bar-icon) {\n    cursor: pointer;\n  }\n\n  display: flex;\n  flex-direction: row;\n\n  &>* {\n    margin-left: 10px; // TODO sakal improve\n  }\n}\n"]}]),o.locals={root:"contrib_upper-bar__root___1T--i"},e.default=o},function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||e.hasOwnProperty(n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),o(n(71),e)},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.IconsMenu=void 0;var i=n(0),a=n(72),s=n(2),c=n(17),u=n(77),l=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._logger=null,e._onKeyDown=function(t,e){switch(t.keyCode!==c.KeyboardKeys.Enter&&t.keyCode!==c.KeyboardKeys.Esc&&t.stopPropagation(),t.keyCode){case c.KeyboardKeys.Enter:e()}},e._getPopoverMenuOptions=function(){return e.props.content.map((function(t){var n=t.renderChild,r=t._options.data,o=r.label,s=r.onClick;return{customRenderer:function(){return i.h("div",{tabIndex:1,role:"button",onKeyDown:function(t){return e._onKeyDown(t,s)},onClick:s,className:a.iconMenuItem},i.h("div",{"aria-hidden":"true",onClick:function(t){t.stopPropagation()}},n({})),i.h("span",{className:a.itemLabel},o))}}}))},e._popoverContent=function(){return i.h(u.PopoverMenu,{options:e._getPopoverMenuOptions()})},e}return o(e,t),e.prototype.componentDidMount=function(){this._logger=s.getContribLogger({module:"contrib-ui",class:"IconMenu"}),this._logger.info("mount component",{method:"componentDidMount"})},e.prototype.componentWillUnmount=function(){this._logger&&this._logger.info("unmount component",{method:"componentWillUnmount"})},e.prototype.render=function(t){return this._logger&&this._logger.trace("render component",{method:"render"}),i.h(c.Popover,{className:"icons-menu",verticalPosition:c.PopoverVerticalPositions.Bottom,horizontalPosition:c.PopoverHorizontalPositions.Left,content:this._popoverContent()},i.h("button",{className:a.iconMenu,tabIndex:1}))},e}(i.Component);e.IconsMenu=l},function(t,e,n){var r=n(3),o=n(73);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[t.i,o,""]]),r(o,{insert:"head",singleton:!1}),t.exports=o.locals||{}},function(t,e,n){"use strict";n.r(e);var r=n(1),o=n.n(r),i=n(5),a=n.n(i),s=n(36),c=n.n(s),u=o()(!0),l=a()(c.a);u.push([t.i,".contrib_icons-menu__icon-menu___186vH{width:32px;height:32px;opacity:0.8;border:none;padding:0;cursor:pointer;background-color:inherit;background-repeat:no-repeat;background-position:center;background-size:contain;background-image:url("+l+")}.contrib_icons-menu__icon-menu___186vH:hover,.contrib_icons-menu__icon-menu___186vH:focus{opacity:1}.contrib_icons-menu__icon-menu-item___t1NfQ{opacity:0.8;display:flex;align-items:center;height:36px;margin-bottom:1px;padding:0 8px;min-width:228px;border-radius:4px;background-color:#222222}.contrib_icons-menu__icon-menu-item___t1NfQ:focus{opacity:1;background-color:#333333}.contrib_icons-menu__icon-menu-item___t1NfQ:hover{opacity:1;background-color:#666666}.contrib_icons-menu__icon-menu-item___t1NfQ .contrib_icons-menu__item-label___1VK4q{margin-left:2px;font-size:15px}\n","",{version:3,sources:["/Users/semarche/dev/kaltura/playkit-js-contrib/packages/ui/src/components/icons-menu/_icons-menu.scss"],names:[],mappings:"AAAA,uCACI,UAAW,CACX,WAAY,CACZ,WAAY,CACZ,WAAY,CACZ,SAAU,CACV,cAAe,CACf,wBAAyB,CACzB,2BAA4B,CAC5B,0BAA2B,CAC3B,uBAAwB,CACxB,wDAA0C,CAX9C,0FAcM,SAAU,CACX,4CAIH,WAAY,CASZ,YAAa,CACb,kBAAmB,CACnB,WAAY,CACZ,iBAAkB,CAClB,aAAc,CACd,eAAgB,CAChB,iBAAkB,CAClB,wBAAyB,CAjB3B,kDAGI,SAAU,CACV,wBAAyB,CAJ7B,kDAOI,SAAU,CACV,wBAAyB,CAR7B,oFAmBI,eAAgB,CAChB,cAAe",file:"_icons-menu.scss",sourcesContent:[".icon-menu {\n    width: 32px;\n    height: 32px;\n    opacity: 0.8;\n    border: none;\n    padding: 0;\n    cursor: pointer;\n    background-color: inherit;\n    background-repeat: no-repeat;\n    background-position: center;\n    background-size: contain;\n    background-image: url('./assets/more.svg');\n    &:hover,\n    &:focus {\n      opacity: 1;\n    }\n}\n\n.icon-menu-item {\n  opacity: 0.8;\n  &:focus {\n    opacity: 1;\n    background-color: #333333;\n  }\n  &:hover {\n    opacity: 1;\n    background-color: #666666;\n  }\n  display: flex;\n  align-items: center;\n  height: 36px;\n  margin-bottom: 1px;\n  padding: 0 8px;\n  min-width: 228px;\n  border-radius: 4px;\n  background-color: #222222;\n  .item-label {\n    margin-left: 2px;\n    font-size: 15px;\n  }\n}\n"]}]),u.locals={"icon-menu":"contrib_icons-menu__icon-menu___186vH",iconMenu:"contrib_icons-menu__icon-menu___186vH","icon-menu-item":"contrib_icons-menu__icon-menu-item___t1NfQ",iconMenuItem:"contrib_icons-menu__icon-menu-item___t1NfQ","item-label":"contrib_icons-menu__item-label___1VK4q",itemLabel:"contrib_icons-menu__item-label___1VK4q"},e.default=u},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.Popover=e.KeyboardKeys=e.PopoverTriggerMode=e.PopoverHorizontalPositions=e.PopoverVerticalPositions=void 0;var a,s,c,u,l=n(0),p=n(75);!function(t){t.Top="top",t.Bottom="bottom"}(a=e.PopoverVerticalPositions||(e.PopoverVerticalPositions={})),function(t){t.Left="left",t.Right="right"}(s=e.PopoverHorizontalPositions||(e.PopoverHorizontalPositions={})),function(t){t.Click="click",t.Hover="hover"}(c=e.PopoverTriggerMode||(e.PopoverTriggerMode={})),function(t){t[t.Esc=27]="Esc",t[t.Enter=13]="Enter",t[t.Tab=9]="Tab",t[t.Space=32]="Space",t[t.End=35]="End",t[t.Home=36]="Home"}(u=e.KeyboardKeys||(e.KeyboardKeys={}));var f={verticalPosition:a.Top,horizontalPosition:s.Left,triggerMode:c.Click,className:"popover",closeOnEsc:!0,closeOnClick:!0},h=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._closeTimeout=null,e._controlElement=null,e.state={open:!1},e._clearTimeout=function(){clearTimeout(e._closeTimeout),e._closeTimeout=null},e._handleMouseEvent=function(t){!e._controlElement.contains(t.target)&&e.props.closeOnClick&&e._closePopover()},e._handleKeyboardEvent=function(t){e._controlElement.contains(t.target)&&t.keyCode===u.Enter||(e.props.closeOnEsc&&t.keyCode===u.Esc||t.keyCode===u.Enter)&&e._closePopover()},e._openPopover=function(){var t=e.props.onOpen;e._clearTimeout(),e.setState({open:!0},(function(){e._addListeners(),t&&t()}))},e._closePopover=function(){var t=e.props.onClose;e._clearTimeout(),e.setState({open:!1},(function(){e._removeListeners(),t&&t()}))},e._togglePopover=function(t){e.state.open?e._closePopover():e._openPopover()},e._handleMouseEnter=function(){e.state.open||e._openPopover()},e._handleMouseLeave=function(){e._closeTimeout=setTimeout(e._closePopover,500)},e._handleHoverOnPopover=function(){e.state.open&&e._closeTimeout?e._clearTimeout():e._closePopover()},e._addListeners=function(){document.addEventListener("click",e._handleMouseEvent),document.addEventListener("keydown",e._handleKeyboardEvent)},e._removeListeners=function(){document.removeEventListener("click",e._handleMouseEvent),document.removeEventListener("keydown",e._handleKeyboardEvent)},e._getHoverEvents=function(){return e.props.triggerMode===c.Hover?{targetEvents:{onMouseEnter:e._handleMouseEnter,onMouseLeave:e._handleMouseLeave},popoverEvents:{onMouseEnter:e._handleHoverOnPopover,onMouseLeave:e._handleHoverOnPopover}}:{targetEvents:{onClick:e._togglePopover},popoverEvents:{}}},e}return o(e,t),e.prototype.componentWillUnmount=function(){this._removeListeners()},e.prototype.render=function(t){var e=this;if(!t.content||!t.children)return null;var n=this._getHoverEvents(),r=n.targetEvents,o=n.popoverEvents;return l.h("div",{className:p.popoverContainer},l.h("div",i({className:"popover-anchor-container",ref:function(t){e._controlElement=t}},r),t.children),this.state.open&&l.h("div",i({"aria-expanded":"true",className:[t.className,p.popoverComponent,p[t.verticalPosition],p[t.horizontalPosition]].join(" ")},o),t.content))},e.defaultProps=i({},f),e}(l.Component);e.Popover=h},function(t,e,n){var r=n(3),o=n(76);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[t.i,o,""]]),r(o,{insert:"head",singleton:!1}),t.exports=o.locals||{}},function(t,e,n){"use strict";n.r(e);var r=n(1),o=n.n(r)()(!0);o.push([t.i,".contribpopover__popover-container___35CJw{position:relative}.contribpopover__popover-container___35CJw .contribpopover__popover-component___BuiEX{background-color:#222222;border-radius:4px;position:absolute;right:0px;font-size:15px;display:block}.contribpopover__popover-container___35CJw .contribpopover__popover-component___BuiEX.contribpopover__visible___21aRy{visibility:visible;opacity:1;z-index:10}.contribpopover__popover-container___35CJw .contribpopover__popover-component___BuiEX.contribpopover__top___SCpk8{bottom:100%;margin-bottom:6px}.contribpopover__popover-container___35CJw .contribpopover__popover-component___BuiEX.contribpopover__bottom___1gFrU{top:100%;margin-top:6px}.contribpopover__popover-container___35CJw .contribpopover__popover-component___BuiEX.contribpopover__right___zCEB3{left:0px}.contribpopover__popover-container___35CJw .contribpopover__popover-component___BuiEX.contribpopover__left___2H-Oh{right:0px}\n","",{version:3,sources:["/Users/semarche/dev/kaltura/playkit-js-contrib/packages/ui/src/components/popover/popover.scss"],names:[],mappings:"AAAA,2CACI,iBAAkB,CADtB,sFAGQ,wBAAyB,CACzB,iBAAkB,CAClB,iBAAkB,CAClB,SAAU,CACV,cAAe,CACf,aAAc,CARtB,sHAUY,kBAAmB,CACnB,SAAU,CACV,UAAW,CAZvB,kHAeY,WAAY,CACZ,iBAAkB,CAhB9B,qHAmBY,QAAS,CACT,cAAe,CApB3B,oHAuBY,QAAS,CAvBrB,mHA0BY,SAAU",file:"popover.scss",sourcesContent:[".popover-container {\n    position: relative;\n    .popover-component {\n        background-color: #222222;\n        border-radius: 4px;\n        position: absolute;\n        right: 0px;\n        font-size: 15px;\n        display: block;\n        &.visible {\n            visibility: visible;\n            opacity: 1;\n            z-index: 10;\n        }\n        &.top {\n            bottom: 100%;\n            margin-bottom: 6px;\n        }\n        &.bottom {\n            top: 100%;\n            margin-top: 6px;\n        }\n        &.right {\n            left: 0px;\n        }\n        &.left {\n            right: 0px;\n        }\n    }\n}\n"]}]),o.locals={"popover-container":"contribpopover__popover-container___35CJw",popoverContainer:"contribpopover__popover-container___35CJw","popover-component":"contribpopover__popover-component___BuiEX",popoverComponent:"contribpopover__popover-component___BuiEX",visible:"contribpopover__visible___21aRy",top:"contribpopover__top___SCpk8",bottom:"contribpopover__bottom___1gFrU",right:"contribpopover__right___zCEB3",left:"contribpopover__left___2H-Oh"},e.default=o},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.PopoverMenu=void 0;var i=n(0),a=n(78),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.render=function(t){return i.h("div",{className:a.popoverMenu},t.options.map((function(e){return e.customRenderer?e.customRenderer(e):t.itemRenderer?t.itemRenderer(e):i.h("div",{className:"popover-menu-item",onClick:function(){return e.onMenuChosen(e)}},e.label)})))},e}(i.Component);e.PopoverMenu=s},function(t,e,n){var r=n(3),o=n(79);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[t.i,o,""]]),r(o,{insert:"head",singleton:!1}),t.exports=o.locals||{}},function(t,e,n){"use strict";n.r(e);var r=n(1),o=n.n(r)()(!0);o.push([t.i,".contribpopover-menu__popover-menu___3upQr{padding-top:6px;padding-bottom:6px}\n","",{version:3,sources:["/Users/semarche/dev/kaltura/playkit-js-contrib/packages/ui/src/components/popover/popover-menu.scss"],names:[],mappings:"AAAA,2CACI,eAAgB,CAChB,kBAAmB",file:"popover-menu.scss",sourcesContent:[".popover-menu {\n    padding-top: 6px;\n    padding-bottom: 6px;\n}\n"]}]),o.locals={"popover-menu":"contribpopover-menu__popover-menu___3upQr",popoverMenu:"contribpopover-menu__popover-menu___3upQr"},e.default=o},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.KitchenSinkContainer=void 0;var i=n(0),a=n(81),s=n(2),c=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._logger=null,e}return o(e,t),e.prototype.componentDidMount=function(){this._logger=s.getContribLogger({module:"contrib-ui",class:"KitchenSinkContainer"}),this._logger.info("mount component",{method:"componentDidMount"})},e.prototype.componentWillUnmount=function(){this._logger&&this._logger.info("unmount component",{method:"componentWillUnmount"})},e.prototype.render=function(t){return this._logger&&this._logger.trace("render component",{method:"render"}),i.h("div",{className:a.root},this.props.children)},e.defaultProps={updateSidePanelMode:function(){}},e}(i.Component);e.KitchenSinkContainer=c},function(t,e,n){var r=n(3),o=n(82);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[t.i,o,""]]),r(o,{insert:"head",singleton:!1}),t.exports=o.locals||{}},function(t,e,n){"use strict";n.r(e);var r=n(1),o=n.n(r)()(!0);o.push([t.i,".contrib_kitchen-sink-container__root___3bxzN{width:100%;height:100%}.playkit-side-panel-content>div{width:100%;height:100%}\n","",{version:3,sources:["/Users/semarche/dev/kaltura/playkit-js-contrib/packages/ui/src/components/kitchen-sink-container/_kitchen-sink-container.scss"],names:[],mappings:"AAAA,8CACE,UAAW,CACX,WAAY,CACb,gCAKG,UAAW,CACX,WAAY",file:"_kitchen-sink-container.scss",sourcesContent:[".root {\n  width: 100%;\n  height: 100%;\n}\n\n/* TODO should fix in player and remove */\n:global(.playkit-side-panel-content) {\n  & > div {\n    width: 100%;\n    height: 100%;\n  }\n}\n"]}]),o.locals={root:"contrib_kitchen-sink-container__root___3bxzN"},e.default=o},function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||e.hasOwnProperty(n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),o(n(84),e)},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__decorate||function(t,e,n,r){var o,i=arguments.length,a=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,n,a):o(e,n))||a);return i>3&&a&&Object.defineProperty(e,n,a),a};Object.defineProperty(e,"__esModule",{value:!0}),e.KitchenSinkAdapter=e.SidePanelModes=e.SidePanelPositions=void 0;var a,s,c=n(0),u=n(2),l=n(10);!function(t){t.Left="left",t.Top="top",t.Bottom="bottom",t.Right="right"}(a=e.SidePanelPositions||(e.SidePanelPositions={})),function(t){t.AlongSideTheVideo="alongside",t.Hidden="hidden",t.OverTheVideo="over"}(s=e.SidePanelModes||(e.SidePanelModes={}));var p=function(t){return{sidePanelsModes:t.shell.sidePanelsModes}},f=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._logger=null,e}return o(e,t),e.prototype.componentDidMount=function(){this._logger=u.getContribLogger({module:"contrib-ui",class:"KitchenSinkAdapter"}),this._logger.info("mount component",{method:"componentDidMount"})},e.prototype.componentWillUnmount=function(){this._logger&&this._logger.info("unmount component",{method:"componentWillUnmount"})},e.prototype.expand=function(t,e){this.props.updateSidePanelMode(this._convertToAdapterPositionEnum(t),this._convertToAdapterModeEnum(e))},e.prototype.getSidePanelMode=function(t){return this.props.sidePanelsModes?this._convertToKitchenSinkModeEnum(this.props.sidePanelsModes[this._convertToAdapterPositionEnum(t)]):l.KitchenSinkExpandModes.Hidden},e.prototype.collapse=function(t){this.props.updateSidePanelMode(this._convertToAdapterPositionEnum(t),s.Hidden)},e.prototype.render=function(t){return null},e.prototype._convertToAdapterPositionEnum=function(t){return t===l.KitchenSinkPositions.Top?a.Top:t===l.KitchenSinkPositions.Bottom?a.Bottom:t===l.KitchenSinkPositions.Right?a.Right:a.Left},e.prototype._convertToAdapterModeEnum=function(t){return t===l.KitchenSinkExpandModes.AlongSideTheVideo?s.AlongSideTheVideo:t===l.KitchenSinkExpandModes.OverTheVideo?s.OverTheVideo:s.Hidden},e.prototype._convertToKitchenSinkModeEnum=function(t){return t===s.AlongSideTheVideo?l.KitchenSinkExpandModes.AlongSideTheVideo:t===s.OverTheVideo?l.KitchenSinkExpandModes.OverTheVideo:l.KitchenSinkExpandModes.Hidden},e.defaultProps={updateSidePanelMode:function(){}},i([KalturaPlayer.ui.redux.connect(p,KalturaPlayer.ui.utils.bindActions(KalturaPlayer.ui.reducers.shell.actions),null,{forwardRef:!0})],e)}(c.Component);e.KitchenSinkAdapter=f},function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||e.hasOwnProperty(n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),o(n(86),e)},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.KitchenSink=void 0;var i=n(0),a=n(2),s=n(87),c=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._logger=null,e}return o(e,t),e.prototype.componentDidMount=function(){this._logger=a.getContribLogger({module:"contrib-ui",class:"KitchenSink"}),this._logger.info("mount component",{method:"componentDidMount"})},e.prototype.componentWillUnmount=function(){this._logger&&this._logger.info("unmount component",{method:"componentWillUnmount"})},e.prototype.render=function(t){this._logger&&this._logger.trace("render component",{method:"render"});var e=this.props.kitchenSinkConfig.theme,n=e.backgroundColor,r=e.blur;return i.h("div",{className:this._getClass()},i.h("div",{className:s.backgroundLayout,style:"\n                background-color:"+n+"; \n                backdrop-filter: blur("+r+");\n             "}),i.h("div",{className:s.children},this.props.children))},e.prototype._getClass=function(){return s.root+" "+(this.props.isActive?s.active:"")},e.defaultProps={isActive:!1},e}(i.Component);e.KitchenSink=c},function(t,e,n){var r=n(3),o=n(88);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[t.i,o,""]]),r(o,{insert:"head",singleton:!1}),t.exports=o.locals||{}},function(t,e,n){"use strict";n.r(e);var r=n(1),o=n.n(r)()(!0);o.push([t.i,".contrib_kitchen-sink__root___2dg28{position:absolute;top:0;left:0;overflow:hidden;width:100%;height:100%;transition:opacity 500ms ease-in-out;opacity:0;z-index:-1}.contrib_kitchen-sink__root___2dg28.contrib_kitchen-sink__active___2Xv8g{opacity:1;z-index:0}.contrib_kitchen-sink__children___UBMYE{position:absolute;top:0;left:0;overflow:hidden;width:100%;height:100%}.contrib_kitchen-sink__background-layout___2pJ-a{width:100%;height:100%}\n","",{version:3,sources:["/Users/semarche/dev/kaltura/playkit-js-contrib/packages/ui/src/components/kitchen-sink/_kitchen-sink.scss"],names:[],mappings:"AAAA,oCACE,iBAAkB,CAClB,KAAM,CACN,MAAO,CACP,eAAgB,CAChB,UAAW,CACX,WAAY,CACZ,oCAAqC,CACrC,SAAU,CACV,UAAW,CATb,yEAYI,SAAU,CACV,SAAU,CACX,wCAID,iBAAkB,CAClB,KAAM,CACN,MAAO,CACP,eAAgB,CAChB,UAAW,CACX,WAAY,CACb,iDAGC,UAAW,CACX,WAAY",file:"_kitchen-sink.scss",sourcesContent:[".root {\n  position: absolute;\n  top: 0;\n  left: 0;\n  overflow: hidden;\n  width: 100%;\n  height: 100%;\n  transition: opacity 500ms ease-in-out;\n  opacity: 0;\n  z-index: -1;\n\n  &.active {\n    opacity: 1;\n    z-index: 0;\n  }\n}\n\n.children {\n  position: absolute;\n  top: 0;\n  left: 0;\n  overflow: hidden;\n  width: 100%;\n  height: 100%;\n}\n\n.background-layout {\n  width: 100%;\n  height: 100%;\n}\n"]}]),o.locals={root:"contrib_kitchen-sink__root___2dg28",active:"contrib_kitchen-sink__active___2Xv8g",children:"contrib_kitchen-sink__children___UBMYE","background-layout":"contrib_kitchen-sink__background-layout___2pJ-a",backgroundLayout:"contrib_kitchen-sink__background-layout___2pJ-a"},e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FontManager=void 0;var r=n(90),o=n(2),i=n(6),a=o.getContribLogger({module:"ui",class:"FontManager"}),s={fontFamily:"Lato, sans-serif",testingFont:{text:"abcdefghiiiiiiiiijklmnopqrstuvwwwwwwwwwwxyz0123456789",size:72,fontName:"monospace"}},c="",u=function(){function t(t){this._fontConfig=i.getContribConfig(t.kalturaPlayer,"ui.fonts",s)}return t.prototype.loadFont=function(){if(!this._isFontLoaded()){var t=this._fontConfig.fontFamily;try{this._overrideCorePlayerFontStyles(),c=t,this._handleFontDownloadProcess()}catch(e){a.warn("Failed to load font and override core player style with "+t,{method:"loadFont",data:{error:e}})}}},t.prototype.reset=function(){},t.prototype._overrideCorePlayerFontStyles=function(){var t=this._fontConfig.fontFamily,e=".kaltura-player-container {\n                font-family: inherit;\n            }         \n            .playkit-player {\n                font-family: "+t+";\n            }\n            .playkit-player .playkit-player-gui  {\n                font-family: "+t+";\n            }\n            button, textarea {\n                font-family: inherit;\n            }",n=(document.head||document.getElementsByTagName("head")[0]).lastElementChild,r=document.createElement("style");n.parentNode.insertBefore(r,n.nextSibling),r.appendChild(document.createTextNode(e)),a.info("Overridden Core player font-family style with: "+t,{method:"_overrideCorePlayerFontStyles"})},t.prototype._handleFontDownloadProcess=function(){var t=this,e=this._fontConfig,n=e.downloadData,r=e.testingFont;n&&(n.name&&n.url?this._checkFontExistence(n.name,r)?a.info("Font "+n.name+" already exists, no need to reload it",{method:"loadFont"}):this._downloadAndCacheFont(n.name,n.url).then((function(e){e&&t._injectFontRawStyle(n.name,e)})):a.warn("Configuration provided for contrib.ui.fonts.downloadData is invalid (did you remember to provide both url and name?).",{method:"loadFont"}))},t.prototype._checkFontExistence=function(t,e){try{var n=document.createElement("canvas").getContext("2d"),r=e.text,o=e.size+"px";n.font=o+" "+e.fontName;var i=n.measureText(r).width;return n.font=o+" "+t+","+e.fontName,n.measureText(r).width!==i}catch(e){return a.warn("Failed to determine if font "+t+" exists in the system.",{method:"_checkFontExistence",data:{error:e}}),!1}},t.prototype._downloadAndCacheFont=function(t,e){var n=this,o=this._loadFontFromLocalStorage(t);return o&&""!==o?Promise.resolve(o):r.default.get(e).then((function(e){return e.data&&"string"==typeof e.data&&""!==e.data?(a.info("font "+t+" was downloaded successfully",{method:"_downloadAndCacheFont"}),n._saveFontToLocalStorage(""+t,e.data),e.data):(a.warn("failed to downloaded font "+t+" due to an unexpected font data",{method:"_downloadAndCacheFont",data:{error:e.data?e.data:"empty font data"}}),null)})).catch((function(e){return a.warn("Failed to download font "+t,{method:"_downloadFont",data:{error:e}}),null}))},t.prototype._injectFontRawStyle=function(t,e){try{var n=document.createElement("style");n.innerHTML=e,(document.head||document.getElementsByTagName("head")[0]).appendChild(n),a.info('font "'+t+'" raw data style was injected',{method:"_injectFontRawStyle"})}catch(e){a.warn("Failed to inject font "+t+" data to core player style.",{method:"_injectFontRawStyle",data:{error:e}})}},t.prototype._loadFontFromLocalStorage=function(t){try{return localStorage.getItem("contrib-plugins-font-"+t)}catch(e){return a.warn('Failed to load font "'+t+'" data, key: contrib-plugins-font-'+t+" from localStorage",{method:"_loadFontFromLocalStorage",data:{error:e}}),null}},t.prototype._saveFontToLocalStorage=function(t,e){try{localStorage.setItem("contrib-plugins-font-"+t,e),a.info('font "'+t+'" was cached into localStorage',{method:"_saveFontToLocalStorage"})}catch(e){a.warn('Failed to cache font "'+t+'" into localStorage',{method:"_saveFontToLocalStorage",data:{error:e}})}},t.prototype._isFontLoaded=function(){return""!==c&&(c!==this._fontConfig.fontFamily&&a.warn("This request for loading font will be ignored since\n                 an earlier call for loading "+this._fontConfig.fontFamily+" was made.",{method:"_isFontLoaded"}),!0)},t}();e.FontManager=u},function(t,e,n){t.exports=n(91)},function(t,e,n){"use strict";var r=n(4),o=n(20),i=n(93),a=n(26);function s(t){var e=new i(t),n=o(i.prototype.request,e);return r.extend(n,i.prototype,e),r.extend(n,e),n}var c=s(n(23));c.Axios=i,c.create=function(t){return s(a(c.defaults,t))},c.Cancel=n(27),c.CancelToken=n(106),c.isCancel=n(22),c.all=function(t){return Promise.all(t)},c.spread=n(107),t.exports=c,t.exports.default=c},function(t,e){
/*!
 * Determine if an object is a Buffer
 *
 * @author   Feross Aboukhadijeh <https://feross.org>
 * @license  MIT
 */
t.exports=function(t){return null!=t&&null!=t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}},function(t,e,n){"use strict";var r=n(4),o=n(21),i=n(94),a=n(95),s=n(26);function c(t){this.defaults=t,this.interceptors={request:new i,response:new i}}c.prototype.request=function(t){"string"==typeof t?(t=arguments[1]||{}).url=arguments[0]:t=t||{},(t=s(this.defaults,t)).method=t.method?t.method.toLowerCase():"get";var e=[a,void 0],n=Promise.resolve(t);for(this.interceptors.request.forEach((function(t){e.unshift(t.fulfilled,t.rejected)})),this.interceptors.response.forEach((function(t){e.push(t.fulfilled,t.rejected)}));e.length;)n=n.then(e.shift(),e.shift());return n},c.prototype.getUri=function(t){return t=s(this.defaults,t),o(t.url,t.params,t.paramsSerializer).replace(/^\?/,"")},r.forEach(["delete","get","head","options"],(function(t){c.prototype[t]=function(e,n){return this.request(r.merge(n||{},{method:t,url:e}))}})),r.forEach(["post","put","patch"],(function(t){c.prototype[t]=function(e,n,o){return this.request(r.merge(o||{},{method:t,url:e,data:n}))}})),t.exports=c},function(t,e,n){"use strict";var r=n(4);function o(){this.handlers=[]}o.prototype.use=function(t,e){return this.handlers.push({fulfilled:t,rejected:e}),this.handlers.length-1},o.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)},o.prototype.forEach=function(t){r.forEach(this.handlers,(function(e){null!==e&&t(e)}))},t.exports=o},function(t,e,n){"use strict";var r=n(4),o=n(96),i=n(22),a=n(23),s=n(104),c=n(105);function u(t){t.cancelToken&&t.cancelToken.throwIfRequested()}t.exports=function(t){return u(t),t.baseURL&&!s(t.url)&&(t.url=c(t.baseURL,t.url)),t.headers=t.headers||{},t.data=o(t.data,t.headers,t.transformRequest),t.headers=r.merge(t.headers.common||{},t.headers[t.method]||{},t.headers||{}),r.forEach(["delete","get","head","post","put","patch","common"],(function(e){delete t.headers[e]})),(t.adapter||a.adapter)(t).then((function(e){return u(t),e.data=o(e.data,e.headers,t.transformResponse),e}),(function(e){return i(e)||(u(t),e&&e.response&&(e.response.data=o(e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)}))}},function(t,e,n){"use strict";var r=n(4);t.exports=function(t,e,n){return r.forEach(n,(function(n){t=n(t,e)})),t}},function(t,e){var n,r,o=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(t){if(n===setTimeout)return setTimeout(t,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(t){n=i}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(t){r=a}}();var c,u=[],l=!1,p=-1;function f(){l&&c&&(l=!1,c.length?u=c.concat(u):p=-1,u.length&&h())}function h(){if(!l){var t=s(f);l=!0;for(var e=u.length;e;){for(c=u,u=[];++p<e;)c&&c[p].run();p=-1,e=u.length}c=null,l=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function d(t,e){this.fun=t,this.array=e}function g(){}o.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];u.push(new d(t,e)),1!==u.length||l||s(h)},d.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=g,o.addListener=g,o.once=g,o.off=g,o.removeListener=g,o.removeAllListeners=g,o.emit=g,o.prependListener=g,o.prependOnceListener=g,o.listeners=function(t){return[]},o.binding=function(t){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(t){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(t,e,n){"use strict";var r=n(4);t.exports=function(t,e){r.forEach(t,(function(n,r){r!==e&&r.toUpperCase()===e.toUpperCase()&&(t[e]=n,delete t[r])}))}},function(t,e,n){"use strict";var r=n(25);t.exports=function(t,e,n){var o=n.config.validateStatus;!o||o(n.status)?t(n):e(r("Request failed with status code "+n.status,n.config,null,n.request,n))}},function(t,e,n){"use strict";t.exports=function(t,e,n,r,o){return t.config=e,n&&(t.code=n),t.request=r,t.response=o,t.isAxiosError=!0,t.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},t}},function(t,e,n){"use strict";var r=n(4),o=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];t.exports=function(t){var e,n,i,a={};return t?(r.forEach(t.split("\n"),(function(t){if(i=t.indexOf(":"),e=r.trim(t.substr(0,i)).toLowerCase(),n=r.trim(t.substr(i+1)),e){if(a[e]&&o.indexOf(e)>=0)return;a[e]="set-cookie"===e?(a[e]?a[e]:[]).concat([n]):a[e]?a[e]+", "+n:n}})),a):a}},function(t,e,n){"use strict";var r=n(4);t.exports=r.isStandardBrowserEnv()?function(){var t,e=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function o(t){var r=t;return e&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return t=o(window.location.href),function(e){var n=r.isString(e)?o(e):e;return n.protocol===t.protocol&&n.host===t.host}}():function(){return!0}},function(t,e,n){"use strict";var r=n(4);t.exports=r.isStandardBrowserEnv()?{write:function(t,e,n,o,i,a){var s=[];s.push(t+"="+encodeURIComponent(e)),r.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),r.isString(o)&&s.push("path="+o),r.isString(i)&&s.push("domain="+i),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(t){var e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(t,e,n){"use strict";t.exports=function(t){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(t)}},function(t,e,n){"use strict";t.exports=function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}},function(t,e,n){"use strict";var r=n(27);function o(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");var e;this.promise=new Promise((function(t){e=t}));var n=this;t((function(t){n.reason||(n.reason=new r(t),e(n.reason))}))}o.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},o.source=function(){var t;return{token:new o((function(e){t=e})),cancel:t}},t.exports=o},function(t,e,n){"use strict";t.exports=function(t){return function(e){return t.apply(null,e)}}},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.CuepointFloatingEngine=void 0;var i,a=n(28),s=n(2),c=n(2);!function(t){t.Show="show",t.Hide="hide"}(i||(i={}));var u=c.getContribLogger({module:"contrib-ui",class:"CuepointFloatingEngine"}),l=function(t){function e(e){var n=t.call(this,e)||this;return n.playerSize=null,n.videoSize=null,n}return o(e,t),e.prototype.updateLayout=function(t,e){return this.videoSize=e,this.playerSize=t,this.recalculateCuepointLayout(),this.getCurrentCuepointSnapshot()},e.prototype._calculateLayout=function(t,e){var n=t.rawLayout;return{x:e.left+n.relativeX*e.width,y:e.top+n.relativeY*e.height,width:n.relativeWidth*e.width,height:n.relativeHeight*e.height}},e.prototype.recalculateCuepointLayout=function(){var t=this;if(u.debug("calculating cuepoint layout based on video/player sizes",{method:"recalculateCuepointLayout"}),!this.playerSize||!this.videoSize)return u.warn("missing video/player sizes, hide all cuepoint",{method:"recalculateCuepointLayout"}),void(this.enabled=!1);var e=this.playerSize,n=e.width,r=e.height,o=this.videoSize,i=o.width,s=o.height;if(!(n&&r&&i&&s))return u.warn("missing video/player sizes, hide all cuepoint",{method:"recalculateCuepointLayout"}),void(this.enabled=!1);var c=a.scaleVideo(i,s,n,r,!0);u.debug("recalculate cuepoint layout based on new sizes",{method:"recalculateCuepointLayout",data:{scaleCalculation:c}}),(this.cuepoints||[]).forEach((function(e){e.layout=t._calculateLayout(e,c)})),this.enabled=!0},e}(s.CuepointEngine);e.CuepointFloatingEngine=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.timeSince=e.printContent=e.downloadContent=void 0,e.downloadContent=function(t,e){var n=new Blob([t],{type:"text/plain;charset=utf-8;"}),r=document.createElement("a");window.navigator.msSaveBlob?window.navigator.msSaveOrOpenBlob(n,e):(-1!==navigator.userAgent.search("Firefox")?(r.style.display="none",r.setAttribute("href","data:text/plain;charset=utf-8,"+encodeURIComponent(t))):r.setAttribute("href",URL.createObjectURL(n)),r.setAttribute("target","_blank"),r.setAttribute("download",e),r.click(),r.remove())},e.printContent=function(t){var e=window.open("","","width=400,height=600");e&&(e.document.write(t),e.document.close(),e.focus(),e.print(),e.close())},e.timeSince=function(t){"object"!=typeof t&&(t=new Date(t));var e,n=new Date,r=Math.floor((n-t)/1e3),o=Math.floor(r/31536e3);return o>=1?e="year":(o=Math.floor(r/2592e3))>=1?e="month":(o=Math.floor(r/86400))>=1?e="day":(o=Math.floor(r/3600))>=1?e="hour":(o=Math.floor(r/60))>=1?e="minute":(o=-1,e="a moment"),(o>1||0===o)&&(e+="s"),(o>=0?o:"")+" "+e+" ago"}},function(t,e,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},o=this&&this.__spreadArrays||function(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var r=Array(t),o=0;for(e=0;e<n;e++)for(var i=arguments[e],a=0,s=i.length;a<s;a++,o++)r[o]=i[a];return r};Object.defineProperty(e,"__esModule",{value:!0}),e.OverlayManager=void 0;var i=n(0),a=n(29),s=n(30),c=n(7),u=n(112),l=n(8),p=n(6),f={presetAreasMapping:{Playback:{PlayerArea:"PlayerArea"},Live:{PlayerArea:"PlayerArea"}}},h=["PlayerArea"],d=function(){function t(t){var e,n,r=this;this.options=t,this._items=((e={})[s.OverlayPositions.PlayerArea]=[],e),this._componentRef=((n={})[s.OverlayPositions.PlayerArea]=null,n),this._renderItems=function(t){return 0===r._items[t].length?null:i.h(u.OverlayItemContainer,{renderContent:function(){return r._items[t][0].renderOverlayChild({})}})},this._renderChild=function(t){return i.h(c.ManagedComponent,{label:"overlay-manager",renderChildren:function(){return r._renderItems(t)},isShown:function(){return!0},ref:function(e){return r._componentRef[t]=e}})},this._options=t,this._overlayConfig=p.getContribConfig(this._options.kalturaPlayer,"ui.overlay",f,{explicitMerge:["presetAreasMapping"]});var o=l.PresetsUtils.groupPresetAreasByType({presetAreasMapping:this._overlayConfig.presetAreasMapping,acceptableTypes:h});this.options.presetManager.add({label:"overlay-manager",fillContainer:!0,presetAreas:o.PlayerArea,renderChild:function(){return r._renderChild(s.OverlayPositions.PlayerArea)}})}return t.prototype.add=function(t){var e=this._options.presetManager,n=r(r({presetManager:e},this.options),{data:t}),o=new a.OverlayItem(n);return this._items[t.position].unshift(o),this._updateComponents(t.position),o},t.prototype.remove=function(t){var e=this._items[t.data.position],n=e.indexOf(t);n>-1?(e[n].destroy(),e.splice(n,1),0===n&&this._updateComponents(t.data.position)):console.warn("couldn't remove "+t+" since it wasn't found")},t.prototype.reset=function(){o(this._items.PlayerArea).forEach((function(t){try{t.destroy()}catch(t){console.warn(t)}})),this._items.PlayerArea=[]},t.prototype._updateComponents=function(t){!this._componentRef.PlayerArea||t&&t!==s.OverlayPositions.PlayerArea||this._componentRef.PlayerArea.update()},t}();e.OverlayManager=d},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(113);Object.defineProperty(e,"OverlayItemContainer",{enumerable:!0,get:function(){return r.OverlayItemContainer}})},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.OverlayItemContainer=void 0;var i=n(0),a=n(2),s=n(114),c=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._logger=a.getContribLogger({module:"contrib-ui",class:"OverlayContainer"}),e}return o(e,t),e.prototype.componentDidMount=function(){this._logger.info("mount component",{method:"componentDidMount"})},e.prototype.componentWillUnmount=function(){this._logger.info("unmount component",{method:"componentWillUnmount"})},e.prototype.render=function(){this._logger.trace("render component",{method:"render"});var t=this.props.renderContent();return t?i.h("div",{className:s.overlayItemContainer},t):null},e}(i.Component);e.OverlayItemContainer=c},function(t,e,n){var r=n(3),o=n(115);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[t.i,o,""]]),r(o,{insert:"head",singleton:!1}),t.exports=o.locals||{}},function(t,e,n){"use strict";n.r(e);var r=n(1),o=n.n(r)()(!0);o.push([t.i,".contrib_overlay-item-container__overlayItemContainer___1YRFl{position:absolute;z-index:6;top:0;bottom:0;left:0;right:0;width:100%;height:100%}\n","",{version:3,sources:["/Users/semarche/dev/kaltura/playkit-js-contrib/packages/ui/src/components/overlay-item-container/_overlay-item-container.scss"],names:[],mappings:"AAAA,8DACE,iBAAkB,CAClB,SAAU,CACV,KAAM,CACN,QAAS,CACT,MAAO,CACP,OAAQ,CACR,UAAW,CACX,WAAY",file:"_overlay-item-container.scss",sourcesContent:[".overlayItemContainer {\n  position: absolute;\n  z-index: 6;\n  top: 0;\n  bottom: 0;\n  left: 0;\n  right: 0;\n  width: 100%;\n  height: 100%;\n}\n"]}]),o.locals={overlayItemContainer:"contrib_overlay-item-container__overlayItemContainer___1YRFl"},e.default=o}]))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),function(t){t[t.chapter=2]="chapter",t[t.slide=1]="slide"}(e.KalturaThumbCuePointSubType||(e.KalturaThumbCuePointSubType={}))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),o=n(1),i=n(26),a=n(37),s=n(14),c=function(t){function e(e){return t.call(this,e)||this}return r.__extends(e,t),e.prototype._getMetadata=function(){var e=t.prototype._getMetadata.call(this);return Object.assign(e.properties,{objectType:{type:"c",default:"KalturaCuePoint"},id:{type:"s",readOnly:!0},cuePointType:{type:"es",readOnly:!0,subTypeConstructor:i.KalturaCuePointType,subType:"KalturaCuePointType"},status:{type:"en",readOnly:!0,subTypeConstructor:a.KalturaCuePointStatus,subType:"KalturaCuePointStatus"},entryId:{type:"s"},partnerId:{type:"n",readOnly:!0},createdAt:{type:"d",readOnly:!0},updatedAt:{type:"d",readOnly:!0},triggeredAt:{type:"d"},tags:{type:"s"},startTime:{type:"n"},userId:{type:"s",readOnly:!0},partnerData:{type:"s"},partnerSortValue:{type:"n"},forceStop:{type:"en",subTypeConstructor:s.KalturaNullableBoolean,subType:"KalturaNullableBoolean"},thumbOffset:{type:"n"},systemName:{type:"s"},isMomentary:{type:"b",readOnly:!0},copiedFrom:{type:"s",readOnly:!0}}),e},e}(n(5).KalturaObjectBase);e.KalturaCuePoint=c,o.KalturaTypesFactory.registerType("KalturaCuePoint",c)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),function(t){t.ad="adCuePoint.Ad",t.annotation="annotation.Annotation",t.code="codeCuePoint.Code",t.event="eventCuePoint.Event",t.quizAnswer="quiz.QUIZ_ANSWER",t.quizQuestion="quiz.QUIZ_QUESTION",t.thumb="thumbCuePoint.Thumb"}(e.KalturaCuePointType||(e.KalturaCuePointType={}))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),o=n(1),i=n(14),a=function(t){function e(e){return t.call(this,e)||this}return r.__extends(e,t),e.prototype._getMetadata=function(){var e=t.prototype._getMetadata.call(this);return Object.assign(e.properties,{objectType:{type:"c",default:"KalturaCuePointFilter"},freeText:{type:"s"},userIdEqualCurrent:{type:"en",subTypeConstructor:i.KalturaNullableBoolean,subType:"KalturaNullableBoolean"},userIdCurrent:{type:"en",subTypeConstructor:i.KalturaNullableBoolean,subType:"KalturaNullableBoolean"}}),e},e}(n(66).KalturaCuePointBaseFilter);e.KalturaCuePointFilter=a,o.KalturaTypesFactory.registerType("KalturaCuePointFilter",a)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),o=function(t){function e(e){return t.call(this,e)||this}return r.__extends(e,t),e.prototype.setNetworkTag=function(t){return!t||t.length>10?console.warn("cannot set network tag longer than 10 characters. ignoring tag '"+t):this._networkTag=t,this},e.prototype.getNetworkTag=function(){return this._networkTag},e}(n(5).KalturaObjectBase);e.KalturaRequestBase=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),o=n(70),i=function(t){function e(e){var n=t.call(this,e)||this;return void 0===n.acceptedTypes&&(n.acceptedTypes=[]),n}return r.__extends(e,t),e.prototype._getMetadata=function(){var e=t.prototype._getMetadata.call(this);return Object.assign(e.properties,{partnerId:{type:"n"},ks:{type:"s"},responseProfile:{type:"o",subTypeConstructor:o.KalturaBaseResponseProfile,subType:"KalturaBaseResponseProfile"}}),e},e}(n(5).KalturaObjectBase);e.KalturaRequestOptions=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.environment={request:{apiVersion:"14.16.0",avoidQueryString:!1,fileFormatValue:1},response:{nestedResponse:!1}}},function(t,e,n){"use strict";var r,o="object"==typeof Reflect?Reflect:null,i=o&&"function"==typeof o.apply?o.apply:function(t,e,n){return Function.prototype.apply.call(t,e,n)};r=o&&"function"==typeof o.ownKeys?o.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var a=Number.isNaN||function(t){return t!=t};function s(){s.init.call(this)}t.exports=s,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var c=10;function u(t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function l(t){return void 0===t._maxListeners?s.defaultMaxListeners:t._maxListeners}function p(t,e,n,r){var o,i,a,s;if(u(n),void 0===(i=t._events)?(i=t._events=Object.create(null),t._eventsCount=0):(void 0!==i.newListener&&(t.emit("newListener",e,n.listener?n.listener:n),i=t._events),a=i[e]),void 0===a)a=i[e]=n,++t._eventsCount;else if("function"==typeof a?a=i[e]=r?[n,a]:[a,n]:r?a.unshift(n):a.push(n),(o=l(t))>0&&a.length>o&&!a.warned){a.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=t,c.type=e,c.count=a.length,s=c,console&&console.warn&&console.warn(s)}return t}function f(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function h(t,e,n){var r={fired:!1,wrapFn:void 0,target:t,type:e,listener:n},o=f.bind(r);return o.listener=n,r.wrapFn=o,o}function d(t,e,n){var r=t._events;if(void 0===r)return[];var o=r[e];return void 0===o?[]:"function"==typeof o?n?[o.listener||o]:[o]:n?function(t){for(var e=new Array(t.length),n=0;n<e.length;++n)e[n]=t[n].listener||t[n];return e}(o):y(o,o.length)}function g(t){var e=this._events;if(void 0!==e){var n=e[t];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function y(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t[r];return n}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return c},set:function(t){if("number"!=typeof t||t<0||a(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");c=t}}),s.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||a(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this},s.prototype.getMaxListeners=function(){return l(this)},s.prototype.emit=function(t){for(var e=[],n=1;n<arguments.length;n++)e.push(arguments[n]);var r="error"===t,o=this._events;if(void 0!==o)r=r&&void 0===o.error;else if(!r)return!1;if(r){var a;if(e.length>0&&(a=e[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var c=o[t];if(void 0===c)return!1;if("function"==typeof c)i(c,this,e);else{var u=c.length,l=y(c,u);for(n=0;n<u;++n)i(l[n],this,e)}return!0},s.prototype.addListener=function(t,e){return p(this,t,e,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(t,e){return p(this,t,e,!0)},s.prototype.once=function(t,e){return u(e),this.on(t,h(this,t,e)),this},s.prototype.prependOnceListener=function(t,e){return u(e),this.prependListener(t,h(this,t,e)),this},s.prototype.removeListener=function(t,e){var n,r,o,i,a;if(u(e),void 0===(r=this._events))return this;if(void 0===(n=r[t]))return this;if(n===e||n.listener===e)0==--this._eventsCount?this._events=Object.create(null):(delete r[t],r.removeListener&&this.emit("removeListener",t,n.listener||e));else if("function"!=typeof n){for(o=-1,i=n.length-1;i>=0;i--)if(n[i]===e||n[i].listener===e){a=n[i].listener,o=i;break}if(o<0)return this;0===o?n.shift():function(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}(n,o),1===n.length&&(r[t]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",t,a||e)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(t){var e,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[t]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[t]),this;if(0===arguments.length){var o,i=Object.keys(n);for(r=0;r<i.length;++r)"removeListener"!==(o=i[r])&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(e=n[t]))this.removeListener(t,e);else if(void 0!==e)for(r=e.length-1;r>=0;r--)this.removeListener(t,e[r]);return this},s.prototype.listeners=function(t){return d(this,t,!0)},s.prototype.rawListeners=function(t){return d(this,t,!1)},s.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):g.call(t,e)},s.prototype.listenerCount=g,s.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},function(t,e,n){(e=t.exports=n(51)).Stream=e,e.Readable=e,e.Writable=n(33),e.Duplex=n(10),e.Transform=n(54),e.PassThrough=n(97)},function(t,e,n){"use strict";(function(e,r,o){var i=n(21);function a(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,n){var r=t.entry;t.entry=null;for(;r;){var o=r.callback;e.pendingcb--,o(n),r=r.next}e.corkedRequestsFree?e.corkedRequestsFree.next=t:e.corkedRequestsFree=t}(e,t)}}t.exports=v;var s,c=!e.browser&&["v0.10","v0.9."].indexOf(e.version.slice(0,5))>-1?r:i.nextTick;v.WritableState=m;var u=Object.create(n(16));u.inherits=n(13);var l={deprecate:n(96)},p=n(52),f=n(22).Buffer,h=o.Uint8Array||function(){};var d,g=n(53);function y(){}function m(t,e){s=s||n(10),t=t||{};var r=e instanceof s;this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var o=t.highWaterMark,u=t.writableHighWaterMark,l=this.objectMode?16:16384;this.highWaterMark=o||0===o?o:r&&(u||0===u)?u:l,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var p=!1===t.decodeStrings;this.decodeStrings=!p,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var n=t._writableState,r=n.sync,o=n.writecb;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(n),e)!function(t,e,n,r,o){--e.pendingcb,n?(i.nextTick(o,r),i.nextTick(x,t,e),t._writableState.errorEmitted=!0,t.emit("error",r)):(o(r),t._writableState.errorEmitted=!0,t.emit("error",r),x(t,e))}(t,n,r,e,o);else{var a=w(n);a||n.corked||n.bufferProcessing||!n.bufferedRequest||C(t,n),r?c(b,t,n,a,o):b(t,n,a,o)}}(e,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new a(this)}function v(t){if(s=s||n(10),!(d.call(v,this)||this instanceof s))return new v(t);this._writableState=new m(t,this),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),p.call(this)}function _(t,e,n,r,o,i,a){e.writelen=r,e.writecb=a,e.writing=!0,e.sync=!0,n?t._writev(o,e.onwrite):t._write(o,i,e.onwrite),e.sync=!1}function b(t,e,n,r){n||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,r(),x(t,e)}function C(t,e){e.bufferProcessing=!0;var n=e.bufferedRequest;if(t._writev&&n&&n.next){var r=e.bufferedRequestCount,o=new Array(r),i=e.corkedRequestsFree;i.entry=n;for(var s=0,c=!0;n;)o[s]=n,n.isBuf||(c=!1),n=n.next,s+=1;o.allBuffers=c,_(t,e,!0,e.length,o,"",i.finish),e.pendingcb++,e.lastBufferedRequest=null,i.next?(e.corkedRequestsFree=i.next,i.next=null):e.corkedRequestsFree=new a(e),e.bufferedRequestCount=0}else{for(;n;){var u=n.chunk,l=n.encoding,p=n.callback;if(_(t,e,!1,e.objectMode?1:u.length,u,l,p),n=n.next,e.bufferedRequestCount--,e.writing)break}null===n&&(e.lastBufferedRequest=null)}e.bufferedRequest=n,e.bufferProcessing=!1}function w(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function A(t,e){t._final((function(n){e.pendingcb--,n&&t.emit("error",n),e.prefinished=!0,t.emit("prefinish"),x(t,e)}))}function x(t,e){var n=w(e);return n&&(!function(t,e){e.prefinished||e.finalCalled||("function"==typeof t._final?(e.pendingcb++,e.finalCalled=!0,i.nextTick(A,t,e)):(e.prefinished=!0,t.emit("prefinish")))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"))),n}u.inherits(v,p),m.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(m.prototype,"buffer",{get:l.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(d=Function.prototype[Symbol.hasInstance],Object.defineProperty(v,Symbol.hasInstance,{value:function(t){return!!d.call(this,t)||this===v&&(t&&t._writableState instanceof m)}})):d=function(t){return t instanceof this},v.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},v.prototype.write=function(t,e,n){var r,o=this._writableState,a=!1,s=!o.objectMode&&(r=t,f.isBuffer(r)||r instanceof h);return s&&!f.isBuffer(t)&&(t=function(t){return f.from(t)}(t)),"function"==typeof e&&(n=e,e=null),s?e="buffer":e||(e=o.defaultEncoding),"function"!=typeof n&&(n=y),o.ended?function(t,e){var n=new Error("write after end");t.emit("error",n),i.nextTick(e,n)}(this,n):(s||function(t,e,n,r){var o=!0,a=!1;return null===n?a=new TypeError("May not write null values to stream"):"string"==typeof n||void 0===n||e.objectMode||(a=new TypeError("Invalid non-string/buffer chunk")),a&&(t.emit("error",a),i.nextTick(r,a),o=!1),o}(this,o,t,n))&&(o.pendingcb++,a=function(t,e,n,r,o,i){if(!n){var a=function(t,e,n){t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=f.from(e,n));return e}(e,r,o);r!==a&&(n=!0,o="buffer",r=a)}var s=e.objectMode?1:r.length;e.length+=s;var c=e.length<e.highWaterMark;c||(e.needDrain=!0);if(e.writing||e.corked){var u=e.lastBufferedRequest;e.lastBufferedRequest={chunk:r,encoding:o,isBuf:n,callback:i,next:null},u?u.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else _(t,e,!1,s,r,o,i);return c}(this,o,s,t,e,n)),a},v.prototype.cork=function(){this._writableState.corked++},v.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.finished||t.bufferProcessing||!t.bufferedRequest||C(this,t))},v.prototype.setDefaultEncoding=function(t){if("string"==typeof t&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(v.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),v.prototype._write=function(t,e,n){n(new Error("_write() is not implemented"))},v.prototype._writev=null,v.prototype.end=function(t,e,n){var r=this._writableState;"function"==typeof t?(n=t,t=null,e=null):"function"==typeof e&&(n=e,e=null),null!=t&&this.write(t,e),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||function(t,e,n){e.ending=!0,x(t,e),n&&(e.finished?i.nextTick(n):t.once("finish",n));e.ended=!0,t.writable=!1}(this,r,n)},Object.defineProperty(v.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),v.prototype.destroy=g.destroy,v.prototype._undestroy=g.undestroy,v.prototype._destroy=function(t,e){this.end(),e(t)}}).call(this,n(20),n(94).setImmediate,n(12))},function(t,e,n){"use strict";var r=n(22).Buffer,o=r.isEncoding||function(t){switch((t=""+t)&&t.toLowerCase()){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":return!0;default:return!1}};function i(t){var e;switch(this.encoding=function(t){var e=function(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}(t);if("string"!=typeof e&&(r.isEncoding===o||!o(t)))throw new Error("Unknown encoding: "+t);return e||t}(t),this.encoding){case"utf16le":this.text=c,this.end=u,e=4;break;case"utf8":this.fillLast=s,e=4;break;case"base64":this.text=l,this.end=p,e=3;break;default:return this.write=f,void(this.end=h)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(e)}function a(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function s(t){var e=this.lastTotal-this.lastNeed,n=function(t,e,n){if(128!=(192&e[0]))return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"�"}}(this,t);return void 0!==n?n:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function c(t,e){if((t.length-e)%2==0){var n=t.toString("utf16le",e);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function u(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,n)}return e}function l(t,e){var n=(t.length-e)%3;return 0===n?t.toString("base64",e):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-n))}function p(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function f(t){return t.toString(this.encoding)}function h(t){return t&&t.length?this.write(t):""}e.StringDecoder=i,i.prototype.write=function(t){if(0===t.length)return"";var e,n;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n<t.length?e?e+this.text(t,n):this.text(t,n):e||""},i.prototype.end=function(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"�":e},i.prototype.text=function(t,e){var n=function(t,e,n){var r=e.length-1;if(r<n)return 0;var o=a(e[r]);if(o>=0)return o>0&&(t.lastNeed=o-1),o;if(--r<n||-2===o)return 0;if((o=a(e[r]))>=0)return o>0&&(t.lastNeed=o-2),o;if(--r<n||-2===o)return 0;if((o=a(e[r]))>=0)return o>0&&(2===o?o=0:t.lastNeed=o-3),o;return 0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=n;var r=t.length-(n-this.lastNeed);return t.copy(this.lastChar,0,r),t.toString("utf8",e,r)},i.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},function(t,e,n){var r=n(36).isArray;t.exports={copyOptions:function(t){var e,n={};for(e in t)t.hasOwnProperty(e)&&(n[e]=t[e]);return n},ensureFlagExists:function(t,e){t in e&&"boolean"==typeof e[t]||(e[t]=!1)},ensureSpacesExists:function(t){(!("spaces"in t)||"number"!=typeof t.spaces&&"string"!=typeof t.spaces)&&(t.spaces=0)},ensureAlwaysArrayExists:function(t){"alwaysArray"in t&&("boolean"==typeof t.alwaysArray||r(t.alwaysArray))||(t.alwaysArray=!1)},ensureKeyExists:function(t,e){t+"Key"in e&&"string"==typeof e[t+"Key"]||(e[t+"Key"]=e.compact?"_"+t:t)},checkFnExists:function(t,e){return t+"Fn"in e}}},function(t,e){t.exports={isArray:function(t){return Array.isArray?Array.isArray(t):"[object Array]"===Object.prototype.toString.call(t)}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),function(t){t[t.deleted=2]="deleted",t[t.handled=3]="handled",t[t.pending=4]="pending",t[t.ready=1]="ready"}(e.KalturaCuePointStatus||(e.KalturaCuePointStatus={}))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),o=n(1),i=n(25),a=function(t){function e(e){var n=t.call(this,e)||this;return void 0===n.objects&&(n.objects=[]),n}return r.__extends(e,t),e.prototype._getMetadata=function(){var e=t.prototype._getMetadata.call(this);return Object.assign(e.properties,{objectType:{type:"c",default:"KalturaCuePointListResponse"},objects:{type:"a",readOnly:!0,subTypeConstructor:i.KalturaCuePoint,subType:"KalturaCuePoint"}}),e},e}(n(39).KalturaListResponse);e.KalturaCuePointListResponse=a,o.KalturaTypesFactory.registerType("KalturaCuePointListResponse",a)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),o=n(1),i=function(t){function e(e){return t.call(this,e)||this}return r.__extends(e,t),e.prototype._getMetadata=function(){var e=t.prototype._getMetadata.call(this);return Object.assign(e.properties,{objectType:{type:"c",default:"KalturaListResponse"},totalCount:{type:"n",readOnly:!0}}),e},e}(n(5).KalturaObjectBase);e.KalturaListResponse=i,o.KalturaTypesFactory.registerType("KalturaListResponse",i)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),o=n(1),i=function(t){function e(e){return t.call(this,e)||this}return r.__extends(e,t),e.prototype._getMetadata=function(){var e=t.prototype._getMetadata.call(this);return Object.assign(e.properties,{objectType:{type:"c",default:"KalturaRelatedFilter"}}),e},e}(n(67).KalturaFilter);e.KalturaRelatedFilter=i,o.KalturaTypesFactory.registerType("KalturaRelatedFilter",i)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),o=n(1),i=function(t){function e(e){return t.call(this,e)||this}return r.__extends(e,t),e.prototype._getMetadata=function(){var e=t.prototype._getMetadata.call(this);return Object.assign(e.properties,{objectType:{type:"c",default:"KalturaFilterPager"}}),e},e}(n(69).KalturaPager);e.KalturaFilterPager=i,o.KalturaTypesFactory.registerType("KalturaFilterPager",i)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(t,e){this.result=t,this.error=e};e.KalturaResponse=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),o=n(1),i=n(73),a=function(t){function e(e){var n=t.call(this,e)||this;return void 0===n.objects&&(n.objects=[]),n}return r.__extends(e,t),e.prototype._getMetadata=function(){var e=t.prototype._getMetadata.call(this);return Object.assign(e.properties,{objectType:{type:"c",default:"KalturaCaptionAssetListResponse"},objects:{type:"a",readOnly:!0,subTypeConstructor:i.KalturaCaptionAsset,subType:"KalturaCaptionAsset"}}),e},e}(n(39).KalturaListResponse);e.KalturaCaptionAssetListResponse=a,o.KalturaTypesFactory.registerType("KalturaCaptionAssetListResponse",a)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),function(t){t.cap="4",t.dfxp="2",t.srt="1",t.webvtt="3"}(e.KalturaCaptionType||(e.KalturaCaptionType={}))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),function(t){t[t.deleted=3]="deleted",t[t.error=-1]="error",t[t.exporting=9]="exporting",t[t.importing=7]="importing",t[t.queued=0]="queued",t[t.ready=2]="ready"}(e.KalturaCaptionAssetStatus||(e.KalturaCaptionAssetStatus={}))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),o=n(28),i=n(47),a=n(8),s=n(30),c=function(t){function e(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=t.call(this,{})||this;return r.requests=[],r.requests=e,r}return r.__extends(e,t),e.prototype.buildRequest=function(e){for(var n=t.prototype.toRequestObject.call(this),r=0,o=this.requests.length;r<o;r++)n[r]=this.requests[r].buildRequest(e);return n},e.prototype._getMetadata=function(){var e=t.prototype._getMetadata.call(this);return Object.assign(e.properties,{service:{default:"multirequest",type:"c"}}),e},e.prototype._unwrapResponse=function(t){if(s.environment.response.nestedResponse){if(t&&t.hasOwnProperty("result"))return t.result;if(t&&t.hasOwnProperty("error"))return t.error}return t},e.prototype.setCompletion=function(t){return this.callback=t,this},e.prototype.handleResponse=function(t){var e=[],n=this._unwrapResponse(t);if(n&&n instanceof Array&&n.length===this.requests.length){for(s=0,c=this.requests.length;s<c;s++){var r=n[s];e.push(this.requests[s].handleResponse(r))}if(this.callback)try{this.callback(new i.KalturaMultiResponse(e))}catch(t){}}else for(var o=new a.KalturaAPIException("server response is invalid, expected array of "+this.requests.length,"client::response_type_error",null),s=0,c=this.requests.length;s<c;s++)e.push(this.requests[s].handleResponse(o));return new i.KalturaMultiResponse(e)},e}(o.KalturaRequestBase);e.KalturaMultiRequest=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),o=function(t){function e(e){var n=this.constructor;void 0===e&&(e=[]);var r=t.call(this)||this;return n&&Object.setPrototypeOf(r,n.prototype),e&&e.length>0&&r.push.apply(r,e),r}return r.__extends(e,t),e.prototype.hasErrors=function(){return this.filter((function(t){return t.error})).length>0},e.prototype.getFirstError=function(){for(var t=null,e=0;e<this.length&&!(t=this[e].error);e++);return t},e}(Array);e.KalturaMultiResponse=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),o=function(t){function e(e,n){var r=n.responseType,o=n.responseSubType,i=n.responseConstructor,a=t.call(this,e,{responseType:r,responseSubType:o,responseConstructor:i})||this;return a.uploadedFileSize=0,a.uploadedFileSize=e.uploadedFileSize,a}return r.__extends(e,t),e.prototype.setProgress=function(t){return this._progressCallback=t,this},e.prototype._getProgressCallback=function(){return this._progressCallback},e.prototype.supportChunkUpload=function(){var t=this._getMetadata().properties;return!!this._responseConstructor&&(new this._responseConstructor).hasMetadataProperty("uploadedFileSize")&&!!t.resume&&!!t.resumeAt&&!!t.finalChunk},e.prototype.getFileInfo=function(){var t=this._getMetadata().properties,e=Object.keys(t).find((function(e){return"f"===t[e].type}));return e?{propertyName:e,file:this[e]}:null},e.prototype.toRequestObject=function(){var e=t.prototype.toRequestObject.call(this),n=this.getFileInfo().propertyName;return n&&delete e[n],e},e}(n(7).KalturaRequest);e.KalturaUploadRequest=o},function(t,e,n){var r,o,i=n(87),a=n(35),s=n(36).isArray;function c(t){var e=Number(t);if(!isNaN(e))return e;var n=t.toLowerCase();return"true"===n||"false"!==n&&t}function u(t,e){var n;if(r.compact){if(!o[r[t+"Key"]]&&(s(r.alwaysArray)?-1!==r.alwaysArray.indexOf(r[t+"Key"]):r.alwaysArray)&&(o[r[t+"Key"]]=[]),o[r[t+"Key"]]&&!s(o[r[t+"Key"]])&&(o[r[t+"Key"]]=[o[r[t+"Key"]]]),t+"Fn"in r&&"string"==typeof e&&(e=r[t+"Fn"](e,o)),"instruction"===t&&("instructionFn"in r||"instructionNameFn"in r))for(n in e)if(e.hasOwnProperty(n))if("instructionFn"in r)e[n]=r.instructionFn(e[n],n,o);else{var i=e[n];delete e[n],e[r.instructionNameFn(n,i,o)]=i}s(o[r[t+"Key"]])?o[r[t+"Key"]].push(e):o[r[t+"Key"]]=e}else{o[r.elementsKey]||(o[r.elementsKey]=[]);var a={};if(a[r.typeKey]=t,"instruction"===t){for(n in e)if(e.hasOwnProperty(n))break;a[r.nameKey]="instructionNameFn"in r?r.instructionNameFn(n,e,o):n,r.instructionHasAttributes?(a[r.attributesKey]=e[n][r.attributesKey],"instructionFn"in r&&(a[r.attributesKey]=r.instructionFn(a[r.attributesKey],n,o))):("instructionFn"in r&&(e[n]=r.instructionFn(e[n],n,o)),a[r.instructionKey]=e[n])}else t+"Fn"in r&&(e=r[t+"Fn"](e,o)),a[r[t+"Key"]]=e;r.addParent&&(a[r.parentKey]=o),o[r.elementsKey].push(a)}}function l(t){var e;if("attributesFn"in r&&t&&(t=r.attributesFn(t,o)),(r.trim||"attributeValueFn"in r||"attributeNameFn"in r||r.nativeTypeAttributes)&&t)for(e in t)if(t.hasOwnProperty(e)&&(r.trim&&(t[e]=t[e].trim()),r.nativeTypeAttributes&&(t[e]=c(t[e])),"attributeValueFn"in r&&(t[e]=r.attributeValueFn(t[e],e,o)),"attributeNameFn"in r)){var n=t[e];delete t[e],t[r.attributeNameFn(e,t[e],o)]=n}return t}function p(t){var e={};if(t.body&&("xml"===t.name.toLowerCase()||r.instructionHasAttributes)){for(var n,i=/([\w:-]+)\s*=\s*(?:"([^"]*)"|'([^']*)'|(\w+))\s*/g;null!==(n=i.exec(t.body));)e[n[1]]=n[2]||n[3]||n[4];e=l(e)}if("xml"===t.name.toLowerCase()){if(r.ignoreDeclaration)return;o[r.declarationKey]={},Object.keys(e).length&&(o[r.declarationKey][r.attributesKey]=e),r.addParent&&(o[r.declarationKey][r.parentKey]=o)}else{if(r.ignoreInstruction)return;r.trim&&(t.body=t.body.trim());var a={};r.instructionHasAttributes&&Object.keys(e).length?(a[t.name]={},a[t.name][r.attributesKey]=e):a[t.name]=t.body,u("instruction",a)}}function f(t,e){var n;if("object"==typeof t&&(e=t.attributes,t=t.name),e=l(e),"elementNameFn"in r&&(t=r.elementNameFn(t,o)),r.compact){var i;if(n={},!r.ignoreAttributes&&e&&Object.keys(e).length)for(i in n[r.attributesKey]={},e)e.hasOwnProperty(i)&&(n[r.attributesKey][i]=e[i]);!(t in o)&&(s(r.alwaysArray)?-1!==r.alwaysArray.indexOf(t):r.alwaysArray)&&(o[t]=[]),o[t]&&!s(o[t])&&(o[t]=[o[t]]),s(o[t])?o[t].push(n):o[t]=n}else o[r.elementsKey]||(o[r.elementsKey]=[]),(n={})[r.typeKey]="element",n[r.nameKey]=t,!r.ignoreAttributes&&e&&Object.keys(e).length&&(n[r.attributesKey]=e),r.alwaysChildren&&(n[r.elementsKey]=[]),o[r.elementsKey].push(n);n[r.parentKey]=o,o=n}function h(t){r.ignoreText||(t.trim()||r.captureSpacesBetweenElements)&&(r.trim&&(t=t.trim()),r.nativeType&&(t=c(t)),r.sanitize&&(t=t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")),u("text",t))}function d(t){r.ignoreComment||(r.trim&&(t=t.trim()),u("comment",t))}function g(t){var e=o[r.parentKey];r.addParent||delete o[r.parentKey],o=e}function y(t){r.ignoreCdata||(r.trim&&(t=t.trim()),u("cdata",t))}function m(t){r.ignoreDoctype||(t=t.replace(/^ /,""),r.trim&&(t=t.trim()),u("doctype",t))}function v(t){t.note=t}t.exports=function(t,e){var n=i.parser(!0,{}),s={};if(o=s,r=function(t){return r=a.copyOptions(t),a.ensureFlagExists("ignoreDeclaration",r),a.ensureFlagExists("ignoreInstruction",r),a.ensureFlagExists("ignoreAttributes",r),a.ensureFlagExists("ignoreText",r),a.ensureFlagExists("ignoreComment",r),a.ensureFlagExists("ignoreCdata",r),a.ensureFlagExists("ignoreDoctype",r),a.ensureFlagExists("compact",r),a.ensureFlagExists("alwaysChildren",r),a.ensureFlagExists("addParent",r),a.ensureFlagExists("trim",r),a.ensureFlagExists("nativeType",r),a.ensureFlagExists("nativeTypeAttributes",r),a.ensureFlagExists("sanitize",r),a.ensureFlagExists("instructionHasAttributes",r),a.ensureFlagExists("captureSpacesBetweenElements",r),a.ensureAlwaysArrayExists(r),a.ensureKeyExists("declaration",r),a.ensureKeyExists("instruction",r),a.ensureKeyExists("attributes",r),a.ensureKeyExists("text",r),a.ensureKeyExists("comment",r),a.ensureKeyExists("cdata",r),a.ensureKeyExists("doctype",r),a.ensureKeyExists("type",r),a.ensureKeyExists("name",r),a.ensureKeyExists("elements",r),a.ensureKeyExists("parent",r),a.checkFnExists("doctype",r),a.checkFnExists("instruction",r),a.checkFnExists("cdata",r),a.checkFnExists("comment",r),a.checkFnExists("text",r),a.checkFnExists("instructionName",r),a.checkFnExists("elementName",r),a.checkFnExists("attributeName",r),a.checkFnExists("attributeValue",r),a.checkFnExists("attributes",r),r}(e),n.opt={strictEntities:!0},n.onopentag=f,n.ontext=h,n.oncomment=d,n.onclosetag=g,n.onerror=v,n.oncdata=y,n.ondoctype=m,n.onprocessinginstruction=p,n.write(t).close(),s[r.elementsKey]){var c=s[r.elementsKey];delete s[r.elementsKey],s[r.elementsKey]=c,delete s.text}return s}},function(t,e){var n={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==n.call(t)}},function(t,e,n){"use strict";(function(e,r){var o=n(21);t.exports=_;var i,a=n(50);_.ReadableState=v;n(31).EventEmitter;var s=function(t,e){return t.listeners(e).length},c=n(52),u=n(22).Buffer,l=e.Uint8Array||function(){};var p=Object.create(n(16));p.inherits=n(13);var f=n(91),h=void 0;h=f&&f.debuglog?f.debuglog("stream"):function(){};var d,g=n(92),y=n(53);p.inherits(_,c);var m=["error","close","destroy","pause","resume"];function v(t,e){t=t||{};var r=e instanceof(i=i||n(10));this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var o=t.highWaterMark,a=t.readableHighWaterMark,s=this.objectMode?16:16384;this.highWaterMark=o||0===o?o:r&&(a||0===a)?a:s,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new g,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(d||(d=n(34).StringDecoder),this.decoder=new d(t.encoding),this.encoding=t.encoding)}function _(t){if(i=i||n(10),!(this instanceof _))return new _(t);this._readableState=new v(t,this),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),c.call(this)}function b(t,e,n,r,o){var i,a=t._readableState;null===e?(a.reading=!1,function(t,e){if(e.ended)return;if(e.decoder){var n=e.decoder.end();n&&n.length&&(e.buffer.push(n),e.length+=e.objectMode?1:n.length)}e.ended=!0,A(t)}(t,a)):(o||(i=function(t,e){var n;r=e,u.isBuffer(r)||r instanceof l||"string"==typeof e||void 0===e||t.objectMode||(n=new TypeError("Invalid non-string/buffer chunk"));var r;return n}(a,e)),i?t.emit("error",i):a.objectMode||e&&e.length>0?("string"==typeof e||a.objectMode||Object.getPrototypeOf(e)===u.prototype||(e=function(t){return u.from(t)}(e)),r?a.endEmitted?t.emit("error",new Error("stream.unshift() after end event")):C(t,a,e,!0):a.ended?t.emit("error",new Error("stream.push() after EOF")):(a.reading=!1,a.decoder&&!n?(e=a.decoder.write(e),a.objectMode||0!==e.length?C(t,a,e,!1):T(t,a)):C(t,a,e,!1))):r||(a.reading=!1));return function(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||0===t.length)}(a)}function C(t,e,n,r){e.flowing&&0===e.length&&!e.sync?(t.emit("data",n),t.read(0)):(e.length+=e.objectMode?1:n.length,r?e.buffer.unshift(n):e.buffer.push(n),e.needReadable&&A(t)),T(t,e)}Object.defineProperty(_.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),_.prototype.destroy=y.destroy,_.prototype._undestroy=y.undestroy,_.prototype._destroy=function(t,e){this.push(null),e(t)},_.prototype.push=function(t,e){var n,r=this._readableState;return r.objectMode?n=!0:"string"==typeof t&&((e=e||r.defaultEncoding)!==r.encoding&&(t=u.from(t,e),e=""),n=!0),b(this,t,e,!1,n)},_.prototype.unshift=function(t){return b(this,t,null,!0,!1)},_.prototype.isPaused=function(){return!1===this._readableState.flowing},_.prototype.setEncoding=function(t){return d||(d=n(34).StringDecoder),this._readableState.decoder=new d(t),this._readableState.encoding=t,this};function w(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!=t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=function(t){return t>=8388608?t=8388608:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function A(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(h("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?o.nextTick(x,t):x(t))}function x(t){h("emit readable"),t.emit("readable"),S(t)}function T(t,e){e.readingMore||(e.readingMore=!0,o.nextTick(E,t,e))}function E(t,e){for(var n=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length<e.highWaterMark&&(h("maybeReadMore read 0"),t.read(0),n!==e.length);)n=e.length;e.readingMore=!1}function P(t){h("readable nexttick read 0"),t.read(0)}function k(t,e){e.reading||(h("resume read 0"),t.read(0)),e.resumeScheduled=!1,e.awaitDrain=0,t.emit("resume"),S(t),e.flowing&&!e.reading&&t.read(0)}function S(t){var e=t._readableState;for(h("flow",e.flowing);e.flowing&&null!==t.read(););}function O(t,e){return 0===e.length?null:(e.objectMode?n=e.buffer.shift():!t||t>=e.length?(n=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.head.data:e.buffer.concat(e.length),e.buffer.clear()):n=function(t,e,n){var r;t<e.head.data.length?(r=e.head.data.slice(0,t),e.head.data=e.head.data.slice(t)):r=t===e.head.data.length?e.shift():n?function(t,e){var n=e.head,r=1,o=n.data;t-=o.length;for(;n=n.next;){var i=n.data,a=t>i.length?i.length:t;if(a===i.length?o+=i:o+=i.slice(0,t),0===(t-=a)){a===i.length?(++r,n.next?e.head=n.next:e.head=e.tail=null):(e.head=n,n.data=i.slice(a));break}++r}return e.length-=r,o}(t,e):function(t,e){var n=u.allocUnsafe(t),r=e.head,o=1;r.data.copy(n),t-=r.data.length;for(;r=r.next;){var i=r.data,a=t>i.length?i.length:t;if(i.copy(n,n.length-t,0,a),0===(t-=a)){a===i.length?(++o,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r,r.data=i.slice(a));break}++o}return e.length-=o,n}(t,e);return r}(t,e.buffer,e.decoder),n);var n}function B(t){var e=t._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,o.nextTick(M,e,t))}function M(t,e){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function j(t,e){for(var n=0,r=t.length;n<r;n++)if(t[n]===e)return n;return-1}_.prototype.read=function(t){h("read",t),t=parseInt(t,10);var e=this._readableState,n=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return h("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?B(this):A(this),null;if(0===(t=w(t,e))&&e.ended)return 0===e.length&&B(this),null;var r,o=e.needReadable;return h("need readable",o),(0===e.length||e.length-t<e.highWaterMark)&&h("length less than watermark",o=!0),e.ended||e.reading?h("reading or ended",o=!1):o&&(h("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=w(n,e))),null===(r=t>0?O(t,e):null)?(e.needReadable=!0,t=0):e.length-=t,0===e.length&&(e.ended||(e.needReadable=!0),n!==t&&e.ended&&B(this)),null!==r&&this.emit("data",r),r},_.prototype._read=function(t){this.emit("error",new Error("_read() is not implemented"))},_.prototype.pipe=function(t,e){var n=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=t;break;case 1:i.pipes=[i.pipes,t];break;default:i.pipes.push(t)}i.pipesCount+=1,h("pipe count=%d opts=%j",i.pipesCount,e);var c=(!e||!1!==e.end)&&t!==r.stdout&&t!==r.stderr?l:_;function u(e,r){h("onunpipe"),e===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,h("cleanup"),t.removeListener("close",m),t.removeListener("finish",v),t.removeListener("drain",p),t.removeListener("error",y),t.removeListener("unpipe",u),n.removeListener("end",l),n.removeListener("end",_),n.removeListener("data",g),f=!0,!i.awaitDrain||t._writableState&&!t._writableState.needDrain||p())}function l(){h("onend"),t.end()}i.endEmitted?o.nextTick(c):n.once("end",c),t.on("unpipe",u);var p=function(t){return function(){var e=t._readableState;h("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&s(t,"data")&&(e.flowing=!0,S(t))}}(n);t.on("drain",p);var f=!1;var d=!1;function g(e){h("ondata"),d=!1,!1!==t.write(e)||d||((1===i.pipesCount&&i.pipes===t||i.pipesCount>1&&-1!==j(i.pipes,t))&&!f&&(h("false write response, pause",n._readableState.awaitDrain),n._readableState.awaitDrain++,d=!0),n.pause())}function y(e){h("onerror",e),_(),t.removeListener("error",y),0===s(t,"error")&&t.emit("error",e)}function m(){t.removeListener("finish",v),_()}function v(){h("onfinish"),t.removeListener("close",m),_()}function _(){h("unpipe"),n.unpipe(t)}return n.on("data",g),function(t,e,n){if("function"==typeof t.prependListener)return t.prependListener(e,n);t._events&&t._events[e]?a(t._events[e])?t._events[e].unshift(n):t._events[e]=[n,t._events[e]]:t.on(e,n)}(t,"error",y),t.once("close",m),t.once("finish",v),t.emit("pipe",n),i.flowing||(h("pipe resume"),n.resume()),t},_.prototype.unpipe=function(t){var e=this._readableState,n={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,n)),this;if(!t){var r=e.pipes,o=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var i=0;i<o;i++)r[i].emit("unpipe",this,n);return this}var a=j(e.pipes,t);return-1===a||(e.pipes.splice(a,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,n)),this},_.prototype.on=function(t,e){var n=c.prototype.on.call(this,t,e);if("data"===t)!1!==this._readableState.flowing&&this.resume();else if("readable"===t){var r=this._readableState;r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.emittedReadable=!1,r.reading?r.length&&A(this):o.nextTick(P,this))}return n},_.prototype.addListener=_.prototype.on,_.prototype.resume=function(){var t=this._readableState;return t.flowing||(h("resume"),t.flowing=!0,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,o.nextTick(k,t,e))}(this,t)),this},_.prototype.pause=function(){return h("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(h("pause"),this._readableState.flowing=!1,this.emit("pause")),this},_.prototype.wrap=function(t){var e=this,n=this._readableState,r=!1;for(var o in t.on("end",(function(){if(h("wrapped end"),n.decoder&&!n.ended){var t=n.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on("data",(function(o){(h("wrapped data"),n.decoder&&(o=n.decoder.write(o)),n.objectMode&&null==o)||(n.objectMode||o&&o.length)&&(e.push(o)||(r=!0,t.pause()))})),t)void 0===this[o]&&"function"==typeof t[o]&&(this[o]=function(e){return function(){return t[e].apply(t,arguments)}}(o));for(var i=0;i<m.length;i++)t.on(m[i],this.emit.bind(this,m[i]));return this._read=function(e){h("wrapped _read",e),r&&(r=!1,t.resume())},this},Object.defineProperty(_.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),_._fromList=O}).call(this,n(12),n(20))},function(t,e,n){t.exports=n(31).EventEmitter},function(t,e,n){"use strict";var r=n(21);function o(t,e){t.emit("error",e)}t.exports={destroy:function(t,e){var n=this,i=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return i||a?(e?e(t):!t||this._writableState&&this._writableState.errorEmitted||r.nextTick(o,this,t),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,(function(t){!e&&t?(r.nextTick(o,n,t),n._writableState&&(n._writableState.errorEmitted=!0)):e&&e(t)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},function(t,e,n){"use strict";t.exports=a;var r=n(10),o=Object.create(n(16));function i(t,e){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(!r)return this.emit("error",new Error("write callback called multiple times"));n.writechunk=null,n.writecb=null,null!=e&&this.push(e),r(t);var o=this._readableState;o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&this._read(o.highWaterMark)}function a(t){if(!(this instanceof a))return new a(t);r.call(this,t),this._transformState={afterTransform:i.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&("function"==typeof t.transform&&(this._transform=t.transform),"function"==typeof t.flush&&(this._flush=t.flush)),this.on("prefinish",s)}function s(){var t=this;"function"==typeof this._flush?this._flush((function(e,n){c(t,e,n)})):c(this,null,null)}function c(t,e,n){if(e)return t.emit("error",e);if(null!=n&&t.push(n),t._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(t._transformState.transforming)throw new Error("Calling transform done when still transforming");return t.push(null)}o.inherits=n(13),o.inherits(a,r),a.prototype.push=function(t,e){return this._transformState.needTransform=!1,r.prototype.push.call(this,t,e)},a.prototype._transform=function(t,e,n){throw new Error("_transform() is not implemented")},a.prototype._write=function(t,e,n){var r=this._transformState;if(r.writecb=n,r.writechunk=t,r.writeencoding=e,!r.transforming){var o=this._readableState;(r.needTransform||o.needReadable||o.length<o.highWaterMark)&&this._read(o.highWaterMark)}},a.prototype._read=function(t){var e=this._transformState;null!==e.writechunk&&e.writecb&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0},a.prototype._destroy=function(t,e){var n=this;r.prototype._destroy.call(this,t,(function(t){e(t),n.emit("close")}))}},function(t,e,n){var r,o,i=n(35),a=n(36).isArray;function s(t,e,n){return(!n&&t.spaces?"\n":"")+Array(e+1).join(t.spaces)}function c(t,e,n){if(e.ignoreAttributes)return"";"attributesFn"in e&&(t=e.attributesFn(t,o,r));var i,a,c,u,l=[];for(i in t)t.hasOwnProperty(i)&&null!==t[i]&&void 0!==t[i]&&(u=e.noQuotesForNativeAttributes&&"string"!=typeof t[i]?"":'"',a=(a=""+t[i]).replace(/"/g,"&quot;"),c="attributeNameFn"in e?e.attributeNameFn(i,a,o,r):i,l.push(e.spaces&&e.indentAttributes?s(e,n+1,!1):" "),l.push(c+"="+u+("attributeValueFn"in e?e.attributeValueFn(a,i,o,r):a)+u));return t&&Object.keys(t).length&&e.spaces&&e.indentAttributes&&l.push(s(e,n,!1)),l.join("")}function u(t,e,n){return r=t,o="xml",e.ignoreDeclaration?"":"<?xml"+c(t[e.attributesKey],e,n)+"?>"}function l(t,e,n){if(e.ignoreInstruction)return"";var i;for(i in t)if(t.hasOwnProperty(i))break;var a="instructionNameFn"in e?e.instructionNameFn(i,t[i],o,r):i;if("object"==typeof t[i])return r=t,o=a,"<?"+a+c(t[i][e.attributesKey],e,n)+"?>";var s=t[i]?t[i]:"";return"instructionFn"in e&&(s=e.instructionFn(s,i,o,r)),"<?"+a+(s?" "+s:"")+"?>"}function p(t,e){return e.ignoreComment?"":"\x3c!--"+("commentFn"in e?e.commentFn(t,o,r):t)+"--\x3e"}function f(t,e){return e.ignoreCdata?"":"<![CDATA["+("cdataFn"in e?e.cdataFn(t,o,r):t.replace("]]>","]]]]><![CDATA[>"))+"]]>"}function h(t,e){return e.ignoreDoctype?"":"<!DOCTYPE "+("doctypeFn"in e?e.doctypeFn(t,o,r):t)+">"}function d(t,e){return e.ignoreText?"":(t=(t=(t=""+t).replace(/&amp;/g,"&")).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),"textFn"in e?e.textFn(t,o,r):t)}function g(t,e,n,i){return t.reduce((function(t,a){var u=s(e,n,i&&!t);switch(a.type){case"element":return t+u+function(t,e,n){r=t,o=t.name;var i=[],a="elementNameFn"in e?e.elementNameFn(t.name,t):t.name;i.push("<"+a),t[e.attributesKey]&&i.push(c(t[e.attributesKey],e,n));var s=t[e.elementsKey]&&t[e.elementsKey].length||t[e.attributesKey]&&"preserve"===t[e.attributesKey]["xml:space"];return s||(s="fullTagEmptyElementFn"in e?e.fullTagEmptyElementFn(t.name,t):e.fullTagEmptyElement),s?(i.push(">"),t[e.elementsKey]&&t[e.elementsKey].length&&(i.push(g(t[e.elementsKey],e,n+1)),r=t,o=t.name),i.push(e.spaces&&function(t,e){var n;if(t.elements&&t.elements.length)for(n=0;n<t.elements.length;++n)switch(t.elements[n][e.typeKey]){case"text":if(e.indentText)return!0;break;case"cdata":if(e.indentCdata)return!0;break;case"instruction":if(e.indentInstruction)return!0;break;case"doctype":case"comment":case"element":default:return!0}return!1}(t,e)?"\n"+Array(n+1).join(e.spaces):""),i.push("</"+a+">")):i.push("/>"),i.join("")}(a,e,n);case"comment":return t+u+p(a[e.commentKey],e);case"doctype":return t+u+h(a[e.doctypeKey],e);case"cdata":return t+(e.indentCdata?u:"")+f(a[e.cdataKey],e);case"text":return t+(e.indentText?u:"")+d(a[e.textKey],e);case"instruction":var y={};return y[a[e.nameKey]]=a[e.attributesKey]?a:a[e.instructionKey],t+(e.indentInstruction?u:"")+l(y,e,n)}}),"")}function y(t,e,n){var r;for(r in t)if(t.hasOwnProperty(r))switch(r){case e.parentKey:case e.attributesKey:break;case e.textKey:if(e.indentText||n)return!0;break;case e.cdataKey:if(e.indentCdata||n)return!0;break;case e.instructionKey:if(e.indentInstruction||n)return!0;break;case e.doctypeKey:case e.commentKey:default:return!0}return!1}function m(t,e,n,i,a){r=t,o=e;var u="elementNameFn"in n?n.elementNameFn(e,t):e;if(null==t||""===t)return"fullTagEmptyElementFn"in n&&n.fullTagEmptyElementFn(e,t)||n.fullTagEmptyElement?"<"+u+"></"+u+">":"<"+u+"/>";var l=[];if(e){if(l.push("<"+u),"object"!=typeof t)return l.push(">"+d(t,n)+"</"+u+">"),l.join("");t[n.attributesKey]&&l.push(c(t[n.attributesKey],n,i));var p=y(t,n,!0)||t[n.attributesKey]&&"preserve"===t[n.attributesKey]["xml:space"];if(p||(p="fullTagEmptyElementFn"in n?n.fullTagEmptyElementFn(e,t):n.fullTagEmptyElement),!p)return l.push("/>"),l.join("");l.push(">")}return l.push(v(t,n,i+1,!1)),r=t,o=e,e&&l.push((a?s(n,i,!1):"")+"</"+u+">"),l.join("")}function v(t,e,n,r){var o,i,c,g=[];for(i in t)if(t.hasOwnProperty(i))for(c=a(t[i])?t[i]:[t[i]],o=0;o<c.length;++o){switch(i){case e.declarationKey:g.push(u(c[o],e,n));break;case e.instructionKey:g.push((e.indentInstruction?s(e,n,r):"")+l(c[o],e,n));break;case e.attributesKey:case e.parentKey:break;case e.textKey:g.push((e.indentText?s(e,n,r):"")+d(c[o],e));break;case e.cdataKey:g.push((e.indentCdata?s(e,n,r):"")+f(c[o],e));break;case e.doctypeKey:g.push(s(e,n,r)+h(c[o],e));break;case e.commentKey:g.push(s(e,n,r)+p(c[o],e));break;default:g.push(s(e,n,r)+m(c[o],i,e,n,y(c[o],e)))}r=r&&!g.length}return g.join("")}t.exports=function(t,e){e=function(t){var e=i.copyOptions(t);return i.ensureFlagExists("ignoreDeclaration",e),i.ensureFlagExists("ignoreInstruction",e),i.ensureFlagExists("ignoreAttributes",e),i.ensureFlagExists("ignoreText",e),i.ensureFlagExists("ignoreComment",e),i.ensureFlagExists("ignoreCdata",e),i.ensureFlagExists("ignoreDoctype",e),i.ensureFlagExists("compact",e),i.ensureFlagExists("indentText",e),i.ensureFlagExists("indentCdata",e),i.ensureFlagExists("indentAttributes",e),i.ensureFlagExists("indentInstruction",e),i.ensureFlagExists("fullTagEmptyElement",e),i.ensureFlagExists("noQuotesForNativeAttributes",e),i.ensureSpacesExists(e),"number"==typeof e.spaces&&(e.spaces=Array(e.spaces+1).join(" ")),i.ensureKeyExists("declaration",e),i.ensureKeyExists("instruction",e),i.ensureKeyExists("attributes",e),i.ensureKeyExists("text",e),i.ensureKeyExists("comment",e),i.ensureKeyExists("cdata",e),i.ensureKeyExists("doctype",e),i.ensureKeyExists("type",e),i.ensureKeyExists("name",e),i.ensureKeyExists("elements",e),i.checkFnExists("doctype",e),i.checkFnExists("instruction",e),i.checkFnExists("cdata",e),i.checkFnExists("comment",e),i.checkFnExists("text",e),i.checkFnExists("instructionName",e),i.checkFnExists("elementName",e),i.checkFnExists("attributeName",e),i.checkFnExists("attributeValue",e),i.checkFnExists("attributes",e),i.checkFnExists("fullTagEmptyElement",e),e}(e);var n=[];return r=t,o="_root_",e.compact?n.push(v(t,e,0,!0)):(t[e.declarationKey]&&n.push(u(t[e.declarationKey],e,0)),t[e.elementsKey]&&t[e.elementsKey].length&&n.push(g(t[e.elementsKey],e,0,!n.length))),n.join("")}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),o=n(1),i=function(t){function e(e){return t.call(this,e)||this}return r.__extends(e,t),e.prototype._getMetadata=function(){var e=t.prototype._getMetadata.call(this);return Object.assign(e.properties,{objectType:{type:"c",default:"KalturaAssetFilter"},typeIn:{type:"s"}}),e},e}(n(106).KalturaAssetBaseFilter);e.KalturaAssetFilter=i,o.KalturaTypesFactory.registerType("KalturaAssetFilter",i)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IconsFactory=e.BackgroundColors=e.IconColors=void 0;var r,o=n(2),i=n(9),a=n(122),s=n(123),c=n(124),u=n(125),l=n(126),p=n(127);!function(t){t.All="#01accd",t.Hotspot="#1687ff",t.AnswerOnAir="#b2d238",t.Chapter="#01accd",t.Slide="#7fd9e8",t.Caption="#fdd304"}(r=e.IconColors||(e.IconColors={})),function(t){t.All="#151414",t.Hotspot="#061527",t.AnswerOnAir="#21270c",t.Chapter="#082025",t.Slide="#162527",t.Caption="#322a08"}(e.BackgroundColors||(e.BackgroundColors={})),e.IconsFactory=function(t){return o.h("div",{className:p.icon},t.iconType===i.itemTypes.Hotspot&&o.h(a.HotspotIcon,{color:t.color?t.color:r.Hotspot}),t.iconType===i.itemTypes.AnswerOnAir&&o.h(s.AnswerOnAirIcon,{color:t.color?t.color:r.AnswerOnAir}),t.iconType===i.itemTypes.Chapter&&o.h(c.ChapterIcon,{color:t.color?t.color:r.Chapter}),t.iconType===i.itemTypes.Slide&&o.h(u.SlideIcon,{color:t.color?t.color:r.Slide}),t.iconType===i.itemTypes.Caption&&o.h(l.CaptionIcon,{color:t.color?t.color:r.Caption}))}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),n(59)},function(t,e,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},o=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{c(r.next(t))}catch(t){i(t)}}function s(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}c((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},a=this&&this.__spreadArrays||function(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var r=Array(t),o=0;for(e=0;e<n;e++)for(var i=arguments[e],a=0,s=i.length;a<s;a++,o++)r[o]=i[a];return r};Object.defineProperty(e,"__esModule",{value:!0}),e.NavigationPlugin=void 0;var s,c=n(2),u=n(60),l=n(6),p=n(23),f=n(61),h=n(64),d=n(65),g=n(27),y=n(26),m=n(24),v=n(71),_=n(43),b=n(38),C=n(77),w=n(9),A=n(85),x=n(108),T=n(110),E=n(156),P=KalturaPlayer.ui.components.Tooltip,k=l.ObjectUtils.get,S=l.getContribLogger({class:"NavigationPlugin",module:"navigation-plugin"});!function(t){t.anonymousRole="anonymousRole",t.unmoderatedAdminRole="unmoderatedAdminRole"}(s||(s={}));var O=function(){function t(t,e,n){var s=this;this._corePlugin=t,this._contribServices=e,this._configs=n,this._kitchenSinkItem=null,this._kalturaClient=new C.KalturaClient,this._initialData=[],this._listData=[],this._pendingData=[],this._captionAssetList=[],this._triggeredByKeyboard=!1,this._isLoading=!1,this._hasError=!1,this._itemsOrder=w.itemTypesOrder,this._itemsFilter=w.itemTypesOrder,this._id3Timestamp=0,this._currentTime=0,this._currentTimeLive=0,this._seekDifference=0,this._updateKitchenSink=function(){s._kitchenSinkItem&&s._kitchenSinkItem.update()},this._debouncedUpdateKitchenSink=l.debounce(this._updateKitchenSink,1e3),this._handleSeeking=function(){s._seekDifference=Math.ceil(s._currentTime-s._corePlugin.player.currentTime)},this._onTimedMetadataLoaded=function(t){var e=t.payload.cues.filter((function(t){return t.value&&"TEXT"===t.value.key}));if(e.length)try{var n=Math.ceil(JSON.parse(e[e.length-1].value.data).timestamp/1e3);S.debug("Calling cuepoint engine updateTime with id3 timestamp: "+n,{method:"_onTimedMetadataLoaded"}),n&&(s._id3Timestamp=n)}catch(t){S.debug("failed retrieving id3 tag metadata",{method:"_onTimedMetadataLoaded",data:t})}},this._registerToPushServer=function(){var t=s._configs.playerConfig.sources;s._initNotification(),s._constructPushNotificationListener();var e=s.getUserId();s._pushNotification.registerToPushServer(t.id,e,s._updateKitchenSink,s._handlePushNotificationRegistrationError)},this._handlePushNotificationRegistrationError=function(){s._hasError=!0,s._updateKitchenSink()},this._retryFetchData=function(){s._hasError=!1,s._corePlugin.player.isLive()?s._registerToPushServer():s._fetchVodData()},this._seekTo=function(t){if(s._corePlugin.player.isLive()){if(s._corePlugin.player.isDvr()){var e=s._corePlugin.player.currentTime-(s._currentTimeLive-t);Math.abs(s._corePlugin.player.currentTime-e)>=1&&(s._corePlugin.player.currentTime=e)}}else s._corePlugin.player.currentTime=t},this._updateData=function(t){var e,n=w.prepareLiveData(s._listData,s._pendingData,t,null===(e=s._configs.playerConfig.session)||void 0===e?void 0:e.ks,s._configs.playerConfig.provider.env.serviceUrl,s._corePlugin.config.forceChaptersThumb,s._itemsOrder,s._currentTimeLive),r=n.listData,o=n.pendingData;s._listData=r,s._pendingData=o,s._debouncedUpdateKitchenSink()},this._handleAoaMessages=function(t){var e=t.messages;S.debug("handle push notification event",{method:"_handleAoaMessages",data:e});var n=e.filter((function(t){return t.tags===w.cuePointTags.AnswerOnAir})).filter((function(t){var e=t.relatedObjects.QandA_ResponseProfile;if(0!==e.objects.length)return e.objects[0].xml.includes("<Type>AnswerOnAir</Type>")}));s._updateData(n)},this._handleThumbMessages=function(t){var e=t.thumbs;S.debug("handle push notification event",{method:"_handleThumbMessages",data:e}),s._updateData(e)},this._renderKitchenSinkContent=function(t){var e,n=s._corePlugin.player.isLive();return c.h(T.Navigation,r({},t,{data:s._listData,onItemClicked:s._seekTo,isLoading:s._isLoading,hasError:s._hasError,retry:s._retryFetchData,currentTime:n?s._currentTimeLive:s._currentTime,kitchenSinkActive:!!(null===(e=s._kitchenSinkItem)||void 0===e?void 0:e.isActive()),toggledWithEnter:s._triggeredByKeyboard,itemsOrder:s._itemsOrder,isLive:n}))},this._onTimeUpdate=function(){if(s._corePlugin.player.isLive()){var t=Math.floor(s._corePlugin.player.currentTime);if(t===s._currentTime)return;if(s._currentTime=t,null!==s._seekDifference&&s._currentTimeLive)s._currentTimeLive=s._currentTimeLive-s._seekDifference;else if(s._id3Timestamp){if(s._id3Timestamp===s._currentTimeLive)return void(s._id3Timestamp=null);s._currentTimeLive=s._id3Timestamp}else s._currentTimeLive++;if(s._id3Timestamp=null,s._seekDifference=null,s._pendingData.length){var e=w.preparePendingCuepoints(s._pendingData,s._currentTimeLive),n=e.listData,r=e.pendingData;s._pendingData=r,n.length&&(s._listData=w.sortItems(s._listData.concat(n),s._itemsOrder))}s._corePlugin.player.isDvr()&&(s._listData=w.filterCuepointsByStartTime(s._listData,s._currentTimeLive-s._currentTime))}else s._currentTime=s._corePlugin.player.currentTime;s._updateKitchenSink()},this._handleIconClick=function(t){s._triggeredByKeyboard=0===t.x&&0===t.y},this._handleLanguageChange=function(t){void 0===t&&(t=k(s._configs,"playerConfig.playback.textLanguage","")),"off"===("string"==typeof t?t:k(t,"payload.selectedTextTrack._language",null))&&s._captionAssetList.length||!s._captionAssetList.length||(s._isLoading=!0,s._updateKitchenSink(),s._loadCaptions(t).then((function(t){s._listData=a(s._initialData,t),s._isLoading=!1,s._updateKitchenSink()})).catch((function(t){s._hasError=!0,s._isLoading=!1,S.error("failed retrieving caption asset",{method:"_handleLanguageChange",data:t}),s._updateKitchenSink()})))},this._loadCaptions=function(t){return o(s,void 0,void 0,(function(){var e,n,r;return i(this,(function(o){switch(o.label){case 0:return this._captionAssetList.length?(e=A.findCaptionAsset(t||k(this._configs,"playerConfig.playback.textLanguage",""),this._captionAssetList),[4,A.getCaptions(this._kalturaClient,e,this._captionAssetList)]):[2,[]];case 1:return n=o.sent(),[2,Array.isArray(n)?w.prepareVodData(n,null===(r=this._configs.playerConfig.session)||void 0===r?void 0:r.ks,this._configs.playerConfig.provider.env.serviceUrl,this._corePlugin.config.forceChaptersThumb,this._itemsOrder):[]]}}))}))},this._fetchVodData=function(){return o(s,void 0,void 0,(function(){var t,e,n,r,o,s,c,u,l=this;return i(this,(function(i){switch(i.label){case 0:if(t=[],e="",this._itemsFilter[w.itemTypes.Slide]&&(e=""+e+m.KalturaThumbCuePointSubType.slide+","),this._itemsFilter[w.itemTypes.Chapter]&&(e=""+e+m.KalturaThumbCuePointSubType.chapter+","),e&&((n=new d.CuePointListAction({filter:new v.KalturaThumbCuePointFilter({entryIdEqual:this._corePlugin.player.config.sources.id,cuePointTypeEqual:y.KalturaCuePointType.thumb,subTypeIn:e})})).setRequestOptions({acceptedTypes:[f.KalturaThumbCuePoint]}),t.push(n)),this._itemsFilter[w.itemTypes.Hotspot]&&((n=new d.CuePointListAction({filter:new g.KalturaCuePointFilter({entryIdEqual:this._corePlugin.player.config.sources.id,cuePointTypeEqual:y.KalturaCuePointType.annotation})})).setRequestOptions({acceptedTypes:[h.KalturaAnnotation]}),t.push(n)),this._itemsFilter[w.itemTypes.Caption]&&(n=A.makeCaptionAssetListRequest(this._corePlugin.player.config.sources.id),t.push(n)),this._itemsFilter[w.itemTypes.AnswerOnAir],!t.length)return[3,7];this._isLoading=!0,this._updateKitchenSink(),i.label=1;case 1:return i.trys.push([1,6,,7]),[4,this._kalturaClient.multiRequest(t)];case 2:if(!(r=i.sent())||0===r.length)throw new Error("ERROR! Wrong or empty data");return o=[],r.forEach((function(t){w.checkResponce(t,b.KalturaCuePointListResponse)?o=o.concat(t.result.objects):w.checkResponce(t,_.KalturaCaptionAssetListResponse)&&(l._captionAssetList=t.result.objects)})),o.length&&this._addKitchenSinkItem(),this._initialData=w.prepareVodData(o,null===(u=this._configs.playerConfig.session)||void 0===u?void 0:u.ks,this._configs.playerConfig.provider.env.serviceUrl,this._corePlugin.config.forceChaptersThumb,this._itemsOrder),this._captionAssetList.length?[4,this._loadCaptions()]:[3,4];case 3:return s=i.sent(),this._listData=a(this._initialData,s),[3,5];case 4:this._listData=a(this._initialData),i.label=5;case 5:return this._isLoading=!1,this._updateKitchenSink(),[3,7];case 6:return c=i.sent(),this._hasError=!0,this._isLoading=!1,S.error("failed retrieving navigation data",{method:"_fetchVodData",data:c}),this._updateKitchenSink(),[3,7];case 7:return[2]}}))}))};var u=this._configs,p=u.playerConfig,E=u.pluginConfig;this._kalturaClient.setOptions({clientTag:"playkit-js-navigation",endpointUrl:p.provider.env.serviceUrl}),this._pushNotification=new x.PushNotification(this._corePlugin.player),this._itemsOrder=w.prepareItemTypesOrder(E.itemsOrder),this._itemsFilter=w.isEmptyObject(E.itemsOrder)?w.itemTypesOrder:E.itemsOrder}return t.prototype._addPlayerListeners=function(){this._removePlayerListeners(),this._corePlugin.player.addEventListener(this._corePlugin.player.Event.RESIZE,this._updateKitchenSink),this._corePlugin.player.addEventListener(this._corePlugin.player.Event.TIME_UPDATE,this._onTimeUpdate),this._corePlugin.player.isLive()?(this._corePlugin.player.addEventListener(this._corePlugin.player.Event.TIMED_METADATA,this._onTimedMetadataLoaded),this._corePlugin.player.addEventListener(this._corePlugin.player.Event.SEEKING,this._handleSeeking)):this._itemsFilter[w.itemTypes.Caption]&&this._corePlugin.player.addEventListener(this._corePlugin.player.Event.TEXT_TRACK_CHANGED,this._handleLanguageChange)},t.prototype._removePlayerListeners=function(){this._corePlugin.player.removeEventListener(this._corePlugin.player.Event.RESIZE,this._updateKitchenSink),this._corePlugin.player.removeEventListener(this._corePlugin.player.Event.TIME_UPDATE,this._onTimeUpdate),this._corePlugin.player.isLive()?(this._corePlugin.player.removeEventListener(this._corePlugin.player.Event.TIMED_METADATA,this._onTimedMetadataLoaded),this._corePlugin.player.removeEventListener(this._corePlugin.player.Event.SEEKING,this._handleSeeking)):this._itemsFilter[w.itemTypes.Caption]&&this._corePlugin.player.removeEventListener(this._corePlugin.player.Event.TEXT_TRACK_CHANGED,this._handleLanguageChange)},t.prototype.onMediaLoad=function(){var t;this._addPlayerListeners(),this._corePlugin.player.isLive()?(this._addKitchenSinkItem(),this._registerToPushServer()):(this._kalturaClient.setDefaultRequestOptions({ks:null===(t=this._corePlugin.player.config.session)||void 0===t?void 0:t.ks}),this._fetchVodData())},t.prototype.onMediaUnload=function(){this._removePlayerListeners(),this._corePlugin.player.isLive()&&this._pushNotification.reset()},t.prototype.onPluginDestroy=function(){this._corePlugin.player.isLive()&&this._removePushNotificationListener()},t.prototype.getUserId=function(){var t=this._configs.playerConfig.session;return this._corePlugin.config.userRole!==s.anonymousRole&&t.userId?t.userId:l.KalturaLiveServices.getAnonymousUserId(t.userId||"Guest")},t.prototype._initNotification=function(){var t,e;if(null===(t=this._configs.playerConfig.session)||void 0===t?void 0:t.ks){var n=this._configs.playerConfig.provider;this._pushNotification.init({ks:null===(e=this._configs.playerConfig.session)||void 0===e?void 0:e.ks,serviceUrl:n.env.serviceUrl,clientTag:"playkit-js-navigation",kalturaPlayer:this._corePlugin.player})}else S.warn("Warn: Failed to initialize.Failed to retrieve ks from configuration (both providers and session objects returned with an undefined KS), please check your configuration file.",{method:"_initPluginManagers"})},t.prototype._constructPushNotificationListener=function(){this._itemsFilter[w.itemTypes.AnswerOnAir]&&this._pushNotification.on(x.PushNotificationEventTypes.PublicNotifications,this._handleAoaMessages),this._itemsFilter[w.itemTypes.Slide]&&this._pushNotification.on(x.PushNotificationEventTypes.ThumbNotification,this._handleThumbMessages)},t.prototype._removePushNotificationListener=function(){this._pushNotification.off(x.PushNotificationEventTypes.PublicNotifications,this._handleAoaMessages),this._pushNotification.off(x.PushNotificationEventTypes.ThumbNotification,this._handleThumbMessages)},t.prototype._addKitchenSinkItem=function(){var t=this,e=this._configs.pluginConfig,n=e.expandMode,r=e.position,o=e.expandOnFirstPlay;this._kitchenSinkItem=this._contribServices.kitchenSinkManager.add({label:"Navigation",expandMode:n===p.KitchenSinkExpandModes.OverTheVideo?p.KitchenSinkExpandModes.OverTheVideo:p.KitchenSinkExpandModes.AlongSideTheVideo,renderIcon:function(e){return c.h(P,{label:"Search in Video",type:"bottom"},c.h(E.PluginButton,{onClick:t._handleIconClick,selected:e}))},position:w.getConfigValue(r,(function(t){return"string"==typeof t&&(t===p.KitchenSinkPositions.Bottom||t===p.KitchenSinkPositions.Right)}),p.KitchenSinkPositions.Right),renderContent:this._renderKitchenSinkContent}),o&&this._kitchenSinkItem.activate()},t}();e.NavigationPlugin=O,u.ContribPluginManager.registerPlugin("navigation",(function(t){return new O(t.corePlugin,t.contribServices,t.configs)}),{defaultConfig:{expandOnFirstPlay:!0,position:p.KitchenSinkPositions.Left,forceChaptersThumb:!1,expandMode:p.KitchenSinkExpandModes.AlongSideTheVideo,userRole:s.anonymousRole,itemsOrder:{}}})},function(t,e,n){var r,o;window,t.exports=(r=n(6),o=n(23),function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=6)}([function(t,e){t.exports=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.hasOnMediaUnload=e.hasOnMediaLoad=e.hasOnPluginDestroy=e.hasOnPluginSetup=e.hasOnRegisterPresetsComponents=void 0,e.hasOnRegisterPresetsComponents=function(t){return"onRegisterPresetsComponents"in t},e.hasOnPluginSetup=function(t){return"onPluginSetup"in t},e.hasOnPluginDestroy=function(t){return"OnPluginDestroy"in t},e.hasOnMediaLoad=function(t){return"onMediaLoad"in t},e.hasOnMediaUnload=function(t){return"onMediaUnload"in t}},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.CorePlugin=void 0;var i=n(1),a=function(t){function e(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=t.apply(this,e)||this;return r._wasSetupExecuted=!1,r._wasSetupFailed=!1,r.handleMediaLoaded=function(){if(!r._wasSetupExecuted){if(i.hasOnPluginSetup(r._contribPlugin))try{r._contribPlugin.onPluginSetup()}catch(t){r._wasSetupFailed=!0,console.error("failed to execute plugin setup, suspend plugin",{error:t.message})}r._wasSetupExecuted=!0}if(!r._wasSetupFailed&&i.hasOnMediaLoad(r._contribPlugin))try{r._contribPlugin.onMediaLoad()}catch(t){console.error("failure during media load ",{error:t.message})}},r.player.addEventListener(r.player.Event.MEDIA_LOADED,r.handleMediaLoaded),r}return o(e,t),e.isValid=function(t){return!0},e.prototype.setContribContext=function(t){this._contribPlugin=t.contribPlugin,this._contribServices=t.contribServices},e.prototype.getUIComponents=function(){if(i.hasOnRegisterPresetsComponents(this._contribPlugin))try{this._contribPlugin.onRegisterPresetsComponents(this._contribServices.presetManager)}catch(t){console.error("failed to register contrib presets components",{error:t.message})}return this._contribServices.presetManager.registerComponents()},e.prototype.destroy=function(){if(this.reset(),this.player.removeEventListener(this.player.Event.MEDIA_LOADED,this.handleMediaLoaded),i.hasOnPluginDestroy(this._contribPlugin))try{this._contribPlugin.onPluginDestroy()}catch(t){console.error("failure during plugin destroy",{error:t.message})}},e.prototype.reset=function(){if(i.hasOnMediaUnload(this._contribPlugin))try{this._contribPlugin.onMediaUnload()}catch(t){console.error("failure during media unload",{error:t.message})}},e.defaultConfig={},e}(KalturaPlayer.core.BasePlugin);e.CorePlugin=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContribPluginFactories=void 0;var r=function(){function t(){}return t.factories={},t}();e.ContribPluginFactories=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContribServices=void 0;var r=n(0),o=n(9);n(0).enableLogIfNeeded();var i=function(){function t(t,e){var n=this;this._playerContribRegistry=t,this._options=e,this._addListeners=function(){var t=n._options.kalturaPlayer;t.addEventListener(t.Event.PLAYER_RESET,n.reset),t.addEventListener(t.Event.PLAYER_DESTROY,n._removeListeners)},this._removeListeners=function(){var t=n._options.kalturaPlayer;t.removeEventListener(t.Event.PLAYER_RESET,n.reset),t.removeEventListener(t.Event.PLAYER_DESTROY,n._removeListeners)},this.reset=function(){n._toastManager.reset(),n._overlayManager.reset(),n._bannerManager.reset(),n._floatingManager.reset(),n._kitchenSinkManager.reset(),n._upperBarManager.reset()},this._initialize(),this._addListeners()}return t.get=function(e){var n,o=(n=e.kalturaPlayer,r.PlayerContribRegistry.get(n));return o.register("ContribServices",(function(){return new t(o,e)}))},t.prototype._initialize=function(){var t=this._options.kalturaPlayer,e=new o.PresetManager({kalturaPlayer:t}),n=new o.FontManager({kalturaPlayer:t}),r=new o.UpperBarManager({kalturaPlayer:t,presetManager:e}),i=new o.FloatingManager({kalturaPlayer:t,presetManager:e}),a=new o.OverlayManager({presetManager:e,kalturaPlayer:t}),s=new o.BannerManager({kalturaPlayer:t,floatingManager:i}),c=new o.ToastManager({floatingManager:i}),u=new o.KitchenSinkManager({kalturaPlayer:t,presetManager:e,upperBarManager:r});n.loadFont(),this._toastManager=c,this._overlayManager=a,this._bannerManager=s,this._floatingManager=i,this._kitchenSinkManager=u,this._upperBarManager=r,this._presetManager=e,this._fontManager=n},Object.defineProperty(t.prototype,"presetManager",{get:function(){return this._presetManager},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"upperBarManager",{get:function(){return this._upperBarManager},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"kitchenSinkManager",{get:function(){return this._kitchenSinkManager},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"floatingManager",{get:function(){return this._floatingManager},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"overlayManager",{get:function(){return this._overlayManager},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"bannerManager",{get:function(){return this._bannerManager},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"toastManager",{get:function(){return this._toastManager},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fontManager",{get:function(){return this._fontManager},enumerable:!1,configurable:!0}),t.prototype.getPlayerKS=function(){var t=this._options.kalturaPlayer.config.session;return t&&t.ks?t.ks:null},t}();e.ContribServices=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContribPluginConfigs=void 0;var r=function(){function t(t,e){this._player=t,this._corePlugin=e}return Object.defineProperty(t.prototype,"playerConfig",{get:function(){return this._player.config},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pluginConfig",{get:function(){return this._corePlugin.config},enumerable:!1,configurable:!0}),t}();e.ContribPluginConfigs=r},function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||e.hasOwnProperty(n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),o(n(1),e),o(n(2),e),o(n(7),e),o(n(4),e),o(n(5),e)},function(t,e,n){"use strict";var r=this&&this.__spreadArrays||function(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var r=Array(t),o=0;for(e=0;e<n;e++)for(var i=arguments[e],a=0,s=i.length;a<s;a++,o++)r[o]=i[a];return r};Object.defineProperty(e,"__esModule",{value:!0}),e.ContribPluginManager=void 0;var o=n(3),i=n(8),a=n(2);function s(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return new(a.CorePlugin.bind.apply(a.CorePlugin,r([void 0],t)))}var c=function(){function t(){}return t.registerPlugin=function(t,e,n){o.ContribPluginFactories.factories[t]={contribPluginFactory:e,corePluginFactory:(n?n.corePluginFactory:null)||s,defaultConfig:(n?n.defaultConfig:null)||{}},KalturaPlayer.core.registerPlugin(t,i.CorePluginProxy)},t}();e.ContribPluginManager=c},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.CorePluginProxy=void 0;var i=n(3),a=n(4),s=n(0),c=n(5),u=s.getContribLogger({module:"contrib-plugin",class:"core-plugin-proxy"}),l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.isValid=function(t){return!0},e.createPlugin=function(t,e,n){var r=i.ContribPluginFactories.factories[t];if(!r)throw u.error("cannot find requested contrib plugin",{data:{pluginName:t}}),new Error("cannot find contrib plugin factory named '"+t);try{var o=KalturaPlayer.core.utils.Object.mergeDeep({},r.defaultConfig||{},n),s=a.ContribServices.get({kalturaPlayer:e}),l=r.corePluginFactory(t,e,o),p=r.contribPluginFactory({corePlugin:l,contribServices:s,configs:new c.ContribPluginConfigs(e,l),player:e});return l.setContribContext({contribPlugin:p,contribServices:s}),u.info("created contrib plugin",{data:{pluginName:t}}),l}catch(e){throw u.error("failed to create contrib plugin",{data:{pluginName:t,error:e}}),e}},e.prototype.setPluginContext=function(t){this._contribPlugin=t},e}(KalturaPlayer.core.BasePlugin);e.CorePluginProxy=l},function(t,e){t.exports=o}]))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),o=n(1),i=n(24),a=function(t){function e(e){return t.call(this,e)||this}return r.__extends(e,t),e.prototype._getMetadata=function(){var e=t.prototype._getMetadata.call(this);return Object.assign(e.properties,{objectType:{type:"c",default:"KalturaThumbCuePoint"},assetId:{type:"s"},description:{type:"s"},title:{type:"s"},subType:{type:"en",subTypeConstructor:i.KalturaThumbCuePointSubType,subType:"KalturaThumbCuePointSubType"}}),e},e}(n(25).KalturaCuePoint);e.KalturaThumbCuePoint=a,o.KalturaTypesFactory.registerType("KalturaThumbCuePoint",a)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(){}return t.fromServerDate=function(t){return t?new Date(1e3*t):null},t.toServerDate=function(t){return t?Math.round(t.getTime()/1e3):null},t.getStartDateValue=function(t){return t?(t.setHours(0),t.setMinutes(0),t.setSeconds(0),t):null},t.getEndDateValue=function(t){return t?(t.setHours(23),t.setMinutes(59),t.setSeconds(59),t):null},t}();e.KalturaClientUtils=r},function(t,e,n){"use strict";var r;Object.defineProperty(e,"__esModule",{value:!0}),function(t){t[t.info=0]="info",t[t.warn=1]="warn",t[t.error=2]="error",t[t.none=100]="none"}(r=e.LogLevels||(e.LogLevels={})),e.LoggerSettings={logLevel:r.warn};var o=function(){function t(t){this._name=t}return t.prototype.warn=function(t){e.LoggerSettings.logLevel<=r.warn&&console.warn("[kaltura-client/"+this._name+"]: "+t)},t.prototype.info=function(t){e.LoggerSettings.logLevel<=r.info&&console.info("[kaltura-client/"+this._name+"]: "+t)},t.prototype.error=function(t){e.LoggerSettings.logLevel<=r.error&&console.error("[kaltura-client/"+this._name+"]: "+t)},t}();e.KalturaLogger=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),o=n(1),i=n(14),a=function(t){function e(e){return t.call(this,e)||this}return r.__extends(e,t),e.prototype._getMetadata=function(){var e=t.prototype._getMetadata.call(this);return Object.assign(e.properties,{objectType:{type:"c",default:"KalturaAnnotation"},parentId:{type:"s"},text:{type:"s"},endTime:{type:"n"},duration:{type:"n",readOnly:!0},depth:{type:"n",readOnly:!0},childrenCount:{type:"n",readOnly:!0},directChildrenCount:{type:"n",readOnly:!0},isPublic:{type:"en",subTypeConstructor:i.KalturaNullableBoolean,subType:"KalturaNullableBoolean"},searchableOnEntry:{type:"en",subTypeConstructor:i.KalturaNullableBoolean,subType:"KalturaNullableBoolean"}}),e},e}(n(25).KalturaCuePoint);e.KalturaAnnotation=a,o.KalturaTypesFactory.registerType("KalturaAnnotation",a)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),o=n(38),i=n(27),a=n(41),s=function(t){function e(e){return t.call(this,e,{responseType:"o",responseSubType:"KalturaCuePointListResponse",responseConstructor:o.KalturaCuePointListResponse})||this}return r.__extends(e,t),e.prototype._getMetadata=function(){var e=t.prototype._getMetadata.call(this);return Object.assign(e.properties,{service:{type:"c",default:"cuepoint_cuepoint"},action:{type:"c",default:"list"},filter:{type:"o",subTypeConstructor:i.KalturaCuePointFilter,subType:"KalturaCuePointFilter"},pager:{type:"o",subTypeConstructor:a.KalturaFilterPager,subType:"KalturaFilterPager"}}),e},e}(n(7).KalturaRequest);e.CuePointListAction=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),o=n(1),i=n(26),a=n(37),s=n(14),c=function(t){function e(e){return t.call(this,e)||this}return r.__extends(e,t),e.prototype._getMetadata=function(){var e=t.prototype._getMetadata.call(this);return Object.assign(e.properties,{objectType:{type:"c",default:"KalturaCuePointBaseFilter"},idEqual:{type:"s"},idIn:{type:"s"},cuePointTypeEqual:{type:"es",subTypeConstructor:i.KalturaCuePointType,subType:"KalturaCuePointType"},cuePointTypeIn:{type:"s"},statusEqual:{type:"en",subTypeConstructor:a.KalturaCuePointStatus,subType:"KalturaCuePointStatus"},statusIn:{type:"s"},entryIdEqual:{type:"s"},entryIdIn:{type:"s"},createdAtGreaterThanOrEqual:{type:"d"},createdAtLessThanOrEqual:{type:"d"},updatedAtGreaterThanOrEqual:{type:"d"},updatedAtLessThanOrEqual:{type:"d"},triggeredAtGreaterThanOrEqual:{type:"d"},triggeredAtLessThanOrEqual:{type:"d"},tagsLike:{type:"s"},tagsMultiLikeOr:{type:"s"},tagsMultiLikeAnd:{type:"s"},startTimeGreaterThanOrEqual:{type:"n"},startTimeLessThanOrEqual:{type:"n"},userIdEqual:{type:"s"},userIdIn:{type:"s"},partnerSortValueEqual:{type:"n"},partnerSortValueIn:{type:"s"},partnerSortValueGreaterThanOrEqual:{type:"n"},partnerSortValueLessThanOrEqual:{type:"n"},forceStopEqual:{type:"en",subTypeConstructor:s.KalturaNullableBoolean,subType:"KalturaNullableBoolean"},systemNameEqual:{type:"s"},systemNameIn:{type:"s"}}),e},e}(n(40).KalturaRelatedFilter);e.KalturaCuePointBaseFilter=c,o.KalturaTypesFactory.registerType("KalturaCuePointBaseFilter",c)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),o=n(1),i=n(68),a=function(t){function e(e){return t.call(this,e)||this}return r.__extends(e,t),e.prototype._getMetadata=function(){var e=t.prototype._getMetadata.call(this);return Object.assign(e.properties,{objectType:{type:"c",default:"KalturaFilter"},orderBy:{type:"s"},advancedSearch:{type:"o",subTypeConstructor:i.KalturaSearchItem,subType:"KalturaSearchItem"}}),e},e}(n(5).KalturaObjectBase);e.KalturaFilter=a,o.KalturaTypesFactory.registerType("KalturaFilter",a)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),o=n(1),i=function(t){function e(e){return t.call(this,e)||this}return r.__extends(e,t),e.prototype._getMetadata=function(){var e=t.prototype._getMetadata.call(this);return Object.assign(e.properties,{objectType:{type:"c",default:"KalturaSearchItem"}}),e},e}(n(5).KalturaObjectBase);e.KalturaSearchItem=i,o.KalturaTypesFactory.registerType("KalturaSearchItem",i)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),o=n(1),i=function(t){function e(e){return t.call(this,e)||this}return r.__extends(e,t),e.prototype._getMetadata=function(){var e=t.prototype._getMetadata.call(this);return Object.assign(e.properties,{objectType:{type:"c",default:"KalturaPager"},pageSize:{type:"n"},pageIndex:{type:"n"}}),e},e}(n(5).KalturaObjectBase);e.KalturaPager=i,o.KalturaTypesFactory.registerType("KalturaPager",i)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),o=n(1),i=function(t){function e(e){return t.call(this,e)||this}return r.__extends(e,t),e.prototype._getMetadata=function(){var e=t.prototype._getMetadata.call(this);return Object.assign(e.properties,{objectType:{type:"c",default:"KalturaBaseResponseProfile"}}),e},e}(n(5).KalturaObjectBase);e.KalturaBaseResponseProfile=i,o.KalturaTypesFactory.registerType("KalturaBaseResponseProfile",i)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),o=n(1),i=function(t){function e(e){return t.call(this,e)||this}return r.__extends(e,t),e.prototype._getMetadata=function(){var e=t.prototype._getMetadata.call(this);return Object.assign(e.properties,{objectType:{type:"c",default:"KalturaThumbCuePointFilter"}}),e},e}(n(72).KalturaThumbCuePointBaseFilter);e.KalturaThumbCuePointFilter=i,o.KalturaTypesFactory.registerType("KalturaThumbCuePointFilter",i)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),o=n(1),i=n(24),a=function(t){function e(e){return t.call(this,e)||this}return r.__extends(e,t),e.prototype._getMetadata=function(){var e=t.prototype._getMetadata.call(this);return Object.assign(e.properties,{objectType:{type:"c",default:"KalturaThumbCuePointBaseFilter"},descriptionLike:{type:"s"},descriptionMultiLikeOr:{type:"s"},descriptionMultiLikeAnd:{type:"s"},titleLike:{type:"s"},titleMultiLikeOr:{type:"s"},titleMultiLikeAnd:{type:"s"},subTypeEqual:{type:"en",subTypeConstructor:i.KalturaThumbCuePointSubType,subType:"KalturaThumbCuePointSubType"},subTypeIn:{type:"s"}}),e},e}(n(27).KalturaCuePointFilter);e.KalturaThumbCuePointBaseFilter=a,o.KalturaTypesFactory.registerType("KalturaThumbCuePointBaseFilter",a)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),o=n(1),i=n(74),a=n(75),s=n(14),c=n(44),u=n(45),l=function(t){function e(e){return t.call(this,e)||this}return r.__extends(e,t),e.prototype._getMetadata=function(){var e=t.prototype._getMetadata.call(this);return Object.assign(e.properties,{objectType:{type:"c",default:"KalturaCaptionAsset"},captionParamsId:{type:"n"},language:{type:"es",subTypeConstructor:i.KalturaLanguage,subType:"KalturaLanguage"},languageCode:{type:"es",readOnly:!0,subTypeConstructor:a.KalturaLanguageCode,subType:"KalturaLanguageCode"},isDefault:{type:"en",subTypeConstructor:s.KalturaNullableBoolean,subType:"KalturaNullableBoolean"},label:{type:"s"},format:{type:"es",subTypeConstructor:c.KalturaCaptionType,subType:"KalturaCaptionType"},status:{type:"en",readOnly:!0,subTypeConstructor:u.KalturaCaptionAssetStatus,subType:"KalturaCaptionAssetStatus"},parentId:{type:"s"},accuracy:{type:"n"},displayOnPlayer:{type:"b"}}),e},e}(n(76).KalturaAsset);e.KalturaCaptionAsset=l,o.KalturaTypesFactory.registerType("KalturaCaptionAsset",l)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),function(t){t.aa="Afar",t.aal="Afade",t.ab="Abkhazian",t.abe="Abnaki Western",t.abq="Abaza",t.abu="Abure",t.ace="Achinese",t.acf="Saint Lucian Creole French",t.acn="Achang",t.act="Achterhooks",t.acv="Achumawi",t.adj="Adioukrou",t.adt="Adynyamathanha",t.ady="Adyghe; Adygei",t.af="Afrikaans",t.agq="Aghem",t.agr="Aguaruna",t.agu="Aguacateco",t.agx="Aghul",t.aii="Assyrian Neo-Aramaic",t.ain="Ainu (Japan)",t.akk="Akkadian",t.akl="Aklanon",t.aku="Akum",t.akz="Alabama",t.alc="Qawasqar",t.ale="Aleut",t.aln="Albanian (Gheg)",t.alq="Algonquin",t.als="Albanian (Tosk)",t.alt="Altai (Southern)",t.am="Amharic",t.ame="Yanesha",t.amw="Western Neo-Aramaic",t.ang="Old English",t.apj="Apache (Jicarilla)",t.apw="Apache (Western)",t.ar="Arabic",t.arb="Arabic (standard)",t.arc="Aramaic",t.ari="Arikara",t.arn="Araucanian",t.arp="Arapaho",t.asb="Assiniboine",t.ast="Asturian",t.as="Assamese",t.atj="Atikamekw",t.auc="Waorani",t.avk="Kotava",t.awa="Awadhi",t.ay="Aymara",t.az="Azerbaijani",t.ba="Bashkir",t.bal="Baluchi",t.ban="Balinese",t.bar="Bavarian",t.bas="Basa (Cameroon)",t.bcc="Balochi Southern",t.bcr="Babine",t.bdj="Bai",t.be="Byelorussian (Belarusian)",t.bea="Beaver",t.bej="Beja",t.bem="Bemba (Zambia)",t.bew="Betawi",t.bfq="Badaga",t.bft="Balti",t.bg="Bulgarian",t.bh="Bihari",t.bhb="Bhili",t.bho="Bhojpuri",t.bi="Bislama",t.bik="Bikol",t.bin="Bini",t.bn="Bengali (Bangla)",t.bo="Tibetan",t.bpy="Bishnupriya Manipuri",t.br="Breton",t.bua="Buriat",t.bug="Buginese",t.bT="Arabic Tunisian Spoken",t.ca="Catalan",t.caa="Chor",t.cad="Caddo",t.caf="Carrier Southern",t.cay="Cayuga",t.cdo="Min Dong Chinese",t.ceb="Cebuano",t.chc="Catawba",t.chg="Chagatai",t.chm="Mari (Russia)",t.chn="Chinook jargon",t.cho="Choctaw",t.chp="Chipewyan",t.chr="Cherokee",t.chy="Cheyenne",t.cic="Chickasaw",t.cim="Cimbrian",t.ciw="Chippewa",t.cjs="Shor",t.cjy="Jinyu Chinese",t.ckt="Chukot",t.clc="Chilcotin",t.cld="Chaldean Neo-Aramaic",t.clm="Clallam Klallam",t.cmn="Mandarin Chinese",t.co="Corsican",t.coc="Cocopa",t.coj="Cochimi",t.com="Comanche",t.coo="Comox",t.cop="Coptic",t.crh="Crimean Tatar",t.crx="Carrier",t.cs="Czech",t.csb="Kashubian",t.cup="Cupeo",t.cy="Welsh",t.czh="Huizhou Chinese",t.da="Danish",t.dak="Dakota",t.dar="Dargwa",t.ddo="Tsez",t.de="German",t.del="Delaware",t.dgr="Dogrib",t.dhv="Dehu",t.dih="Kumiai",t.din="Dinka",t.dje="Zarma",t.dlg="Dolgan",t.dng="Dungan",t.doh="Dong",t.doi="Dogri (generic)",t.dsb="Sorbian Lower",t.dua="Duala",t.dyu="Dyula",t.dz="Bhutani",t.eee="E",t.egl="Emilian",t.el="Greek",t.en="English",t.enm="English Middle (1100-1500)",t.enGb="English (British)",t.enUs="English (American)",t.eo="Esperanto",t.es="Spanish",t.et="Estonian",t.eu="Basque",t.eve="Even",t.evn="Evenki",t.fa="Farsi",t.fan="Fang (Equatorial Guinea)",t.fax="Fala",t.fi="Finnish",t.fil="Filipino",t.fit="Finnish (Tornedalen)",t.fj="Fiji",t.fo="Faeroese",t.fon="Fon",t.fr="French",t.frk="Frankish",t.frp="Franco-Prove",t.frr="Frisian Northern",t.fuc="Pulaar",t.fur="Friulian",t.fvr="Fur",t.fy="Frisian",t.ga="Irish",t.gaa="Ga",t.gag="Gagauz",t.gan="Gan",t.gbz="Dari Zoroastrian",t.gd="Gaelic (Scottish)",t.gdm="Laal",t.geh="German Hutterite",t.gez="Geez",t.gil="Gilbertese",t.git="Gitxsan",t.gl="Galician",t.gld="Nanai",t.gn="Guarani",t.gom="Konkani Goan",t.grc="Greek Ancient (to 1453)",t.gsw="Swiss German Alemannic Alsatian",t.gu="Gujarati",t.gv="Gaelic (Manx)",t.gwi="Gwichin",t.ha="Hausa",t.haa="Han",t.hai="Haida",t.hak="Hakka",t.has="Haisla",t.haw="Hawaiian",t.he="Hebrew",t.hei="Heiltsuk",t.hi="Hindi",t.hid="Hidatsa",t.hil="Hiligaynon",t.hkk="Hokkien",t.hmn="Hmong",t.hni="Hani",t.hnn="Hainanese",t.hop="Hopi",t.hr="Croatian",t.hsb="Sorbian Upper",t.hu="Hungarian",t.hur="Halkomelem",t.hy="Armenian",t.ia="Interlingua",t.id="Indonesian",t.ie="Interlingue",t.ik="Inupiak",t.ilo="Iloko",t.in="Indonesian",t.inh="Ingush",t.is="Icelandic",t.it="Italian",t.itl="Itelmen",t.iu="Inuktitut",t.iw="Hebrew",t.izh="Ingrian",t.ja="Japanese",t.jbo="Lojban",t.jct="Judeo-Crimean Tatar",t.jge="Judeo-Georgian",t.ji="Yiddish",t.jut="Jutish",t.jv="Javanese",t.ka="Georgian",t.kaa="Karakalpak",t.kab="Kabyle",t.kaj="Jju",t.kap="Bezhta",t.kaw="Kawi",t.kbd="Kabardian",t.kca="Khanty",t.kdr="Karaim",t.kea="Kabuverdianu",t.kfa="Kodava",t.kfr="Kachchi",t.kha="Khasi",t.kic="Kickapoo",t.kim="Karagas",t.kio="Kiowa",t.kjh="Khakas",t.kjv="Kaikavian literary language (Kajkavian)",t.kk="Kazakh",t.kkz="Kaska",t.kl="Greenlandic",t.klj="Khalaj Turkic",t.km="Cambodian",t.kn="Kannada",t.knn="Konkani (specific)",t.ko="Korean",t.koi="Komi-Permyak",t.kok="Konkani (generic)",t.kos="Kosraean",t.kpe="Kpelle",t.kpo="Ikposo",t.kpy="Koryak",t.krc="Karachay-Balkar",t.krl="Karelian",t.ks="Kashmiri",t.ksh="Colognian",t.ksk="Kansa",t.ku="Kurdish",t.kum="Kumyk",t.kut="Kutenai",t.kwk="Kwakiutl",t.kxm="Khmer Northern",t.ky="Kirghiz",t.la="Latin",t.lad="Ladino",t.lah="Lahnda",t.lbe="Lak",t.lez="Lezghian",t.lhu="Lahu",t.li="Limburgish ( Limburger)",t.lif="Limbu",t.lij="Ligurian",t.lil="Lillooet",t.lki="Laki",t.lkt="Lakota",t.lld="Ladin",t.lmo="Lombard",t.ln="Lingala",t.lo="Laothian",t.lom="Loma (Liberia)",t.loz="Lozi",t.lt="Lithuanian",t.lua="Luba-Lulua",t.lud="Ludian",t.lun="Lunda",t.luo="Luo (Kenya and Tanzania)",t.luq="Lucumi",t.lut="Lushootseed",t.lv="Latvian (Lettish)",t.lzz="Laz",t.mad="Madurese",t.mag="Magahi",t.mai="Maithili",t.mas="Masai",t.mdf="Moksha",t.men="Mende (Sierra Leone)",t.mez="Menominee",t.mfe="Morisyen",t.mfy="Mayo",t.mg="Malagasy",t.mhq="Mandan",t.mi="Maori",t.mic="Micmac",t.mid="Mandaic",t.min="Minangkabau",t.mk="Macedonian",t.ml="Malayalam",t.mn="Mongolian",t.mnc="Manchu",t.mni="Meitei",t.mnp="Min Bei Chinese",t.mns="Mansi",t.mnw="Mon",t.mo="Moldavian",t.moh="Mohawk",t.mos="Mossi",t.mr="Marathi",t.mrw="Maranao",t.ms="Malay",t.mt="Maltese",t.mtq="Muong",t.mu="Multilingual",t.mus="Creek",t.mwl="Mirandese",t.mwr="Marwari",t.mxi="Mozarabic",t.my="Burmese",t.myp="Pirah",t.myv="Erzya",t.mzb="Tumzabt",t.na="Nauru",t.nap="Neapolitan",t.naq="Nama (Namibia)",t.ncg="Nisgaa",t.nds="Low German Low Saxon",t.ne="Nepali",t.new="Newari Nepal Bhasa",t.nio="Nganasan",t.niu="Niuean",t.niv="Gilyak Nivkh",t.nl="Dutch",t.no="Norwegian",t.nod="Thai (Northern)",t.nog="Nogai",t.non="Norse Old",t.nov="Novial",t.nsk="Naskapi",t.nso="Northern Sotho Pedi Sepedi",t.nym="Nyamwezi",t.nyo="Nyoro",t.nys="Nyungah",t.oc="Occitan",t.ojb="Ojibwa Northwestern",t.ojc="Ojibwa Central",t.ojg="Ojibwa Eastern",t.ojs="Ojibwa Severn",t.ojw="Ojibwa Western",t.om="Oromo (Afan, Galla)",t.one="Oneida",t.ono="Onondaga",t.ood="Tohono Oodham",t.or="Oriya",t.ota="Turkish Ottoman",t.otw="Ottawa",t.pa="Punjabi",t.pag="Pangasinan",t.pam="Pampanga",t.pap="Papiamento",t.pau="Palauan",t.pcd="Picard",t.pdc="German Pennsylvania",t.pdt="Plautdietsch",t.pes="Western Farsi",t.pfl="Pfaelzisch",t.pih="Pitcairn-Norfolk",t.pl="Polish",t.pms="Piedmontese",t.pnt="Pontic",t.pot="Potawatomi",t.ppi="Paipai",t.pqm="Malecite-Passamaquoddy",t.prd="Dari (Persian)",t.prg="Prussian",t.prp="Persian",t.prs="Persian (Dari)",t.ps="Pashto (Pushto)",t.pt="Portuguese",t.qtz="Reserved for local use.",t.qu="Quechua",t.quc="Quich Central",t.qxq="Qashqai",t.rap="Rapanui",t.rar="Rarotongan",t.rcf="Runion Creole French",t.rgn="Romagnol",t.rm="Rhaeto-Romance",t.rme="Angloromani",t.rmf="Romani Kalo Finnish",t.rmo="Romani Sinte",t.rn="Kirundi (Rundi)",t.ro="Romanian",t.rom="Romany",t.ru="Russian",t.rue="Rusyn",t.ruo="Romanian Istro",t.rup="Aromanian",t.ruq="Romanian Megleno",t.rw="Kinyarwanda (Ruanda)",t.ryu="Okinawan Central",t.sa="Sanskrit",t.sah="Sakha",t.sam="Aramaic Samaritan",t.sat="Santali",t.scn="Sicilian",t.sco="Scots",t.scs="Slavey North",t.sd="Sindhi",t.sdc="Sardinian Sassarese",t.sec="Sechelt",t.see="Seneca",t.sei="Seri",t.sek="Sekani",t.sel="Selkup",t.sg="Sangro",t.sh="Serbo-Croatian",t.shh="Shoshoni",t.shi="Tachelhit",t.shs="Shuswap",t.shy="Tachawit",t.si="Sinhalese",t.sid="Sidamo",t.sjd="Sami Kildin",t.sjw="Shawnee",t.sk="Slovak",t.sl="Slovenian",t.slr="Salar",t.sm="Samoan",t.sma="Southern Sami",t.smj="Lule Sami",t.smn="Inari Sami",t.sms="Skolt Sami",t.sn="Shona",t.snk="Soninke",t.so="Somali",t.sq="Albanian",t.sr="Serbian",t.srm="Saramaccan",t.srn="Sranan",t.ss="Siswati",t.st="Sesotho",t.sto="Stoney",t.stq="Saterland Frisian",t.str="Salish Straits",t.su="Sundanese",t.sux="Sumerian",t.sv="Swedish",t.sva="Svan",t.sw="Swahili (Kiswahili)",t.swb="Comorian",t.swg="Swabian",t.swl="Swedish Sign Language",t.sxu="Saxon Upper",t.syr="Syriac",t.szl="Silesian",t.ta="Tamil",t.tab="Tabassaran",t.taq="Tamasheq",t.tar="Tarahumara Central",t.tbw="Tagbanwa",t.tcx="Toda",t.tcy="Tulu",t.tdd="Tai Na",t.te="Telugu",t.teo="Teo Chew",t.tet="Tetum",t.tg="Tajik",t.tgx="Tagish",t.th="Thai",t.thp="Thompson",t.tht="Tahltan",t.ti="Tigrinya",t.tig="Tigre",t.tk="Turkmen",t.tl="Tagalog",t.tlh="Klingon tlhIngan-Hol",t.tli="Tlingit",t.tly="Talysh",t.tn="Setswana",t.to="Tonga",t.tog="Tonga (Nyasa)",t.tpi="Tok Pisin",t.tpn="Tupinamb",t.tr="Turkish",t.trv="Seediq",t.ts="Tsonga",t.tsi="Tsimshian",t.tt="Tatar",t.ttq="Tamajaq Tawallammat",t.tts="Thai Northeastern",t.ttt="Tat Muslim",t.tum="Tumbuka",t.tus="Tuscarora",t.tuv="Turkana",t.tvl="Tuvalu",t.tw="Twi",t.tyv="Tuvinian",t.tzm="Tamazight Central Atlas",t.uby="Ubykh",t.udi="Udi",t.udm="Udmurt",t.ug="Uighur",t.uk="Ukrainian",t.un="Undefined",t.ur="Urdu",t.uum="Urum",t.uz="Uzbek",t.vec="Venetian",t.vep="Veps",t.vi="Vietnamese",t.vo="Volapuk",t.vor="Voro",t.vot="Votic",t.vro="Vro",t.war="Waray (Philippines)",t.wiy="Wiyot",t.wo="Wolof",t.wuu="Wu Chinese",t.wym="Wymysorys",t.xal="Kalmyk Oirat",t.xh="Xhosa",t.xmf="Mingrelian",t.xsl="Slavey South",t.xsv="Sudovian",t.yi="Yiddish",t.yo="Yoruba",t.yue="Cantonese",t.zai="Zapotec Isthmus",t.zh="Chinese",t.zu="Zulu"}(e.KalturaLanguage||(e.KalturaLanguage={}))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),function(t){t.aa="aa",t.ab="ab",t.af="af",t.am="am",t.ar="ar",t.as="as",t.ay="ay",t.az="az",t.ba="ba",t.be="be",t.bg="bg",t.bh="bh",t.bi="bi",t.bn="bn",t.bo="bo",t.br="br",t.ca="ca",t.co="co",t.cs="cs",t.cy="cy",t.da="da",t.de="de",t.dz="dz",t.el="el",t.en="en",t.enGb="en_gb",t.enUs="en_us",t.eo="eo",t.es="es",t.et="et",t.eu="eu",t.fa="fa",t.fi="fi",t.fj="fj",t.fo="fo",t.fr="fr",t.fy="fy",t.ga="ga",t.gd="gd",t.gl="gl",t.gn="gn",t.gu="gu",t.gv="gv",t.ha="ha",t.he="he",t.hi="hi",t.hr="hr",t.hu="hu",t.hy="hy",t.ia="ia",t.id="id",t.ie="ie",t.ik="ik",t.in="in",t.is="is",t.it="it",t.iu="iu",t.iw="iw",t.ja="ja",t.ji="ji",t.jv="jv",t.ka="ka",t.kk="kk",t.kl="kl",t.km="km",t.kn="kn",t.ko="ko",t.ks="ks",t.ku="ku",t.ky="ky",t.la="la",t.li="li",t.ln="ln",t.lo="lo",t.lt="lt",t.lv="lv",t.mg="mg",t.mi="mi",t.mk="mk",t.ml="ml",t.mn="mn",t.mo="mo",t.mr="mr",t.ms="ms",t.mt="mt",t.mu="multilingual",t.my="my",t.na="na",t.ne="ne",t.nl="nl",t.no="no",t.oc="oc",t.om="om",t.or="or",t.pa="pa",t.pl="pl",t.ps="ps",t.pt="pt",t.qu="qu",t.rm="rm",t.rn="rn",t.ro="ro",t.ru="ru",t.rw="rw",t.sa="sa",t.sd="sd",t.sg="sg",t.sh="sh",t.si="si",t.sk="sk",t.sl="sl",t.sm="sm",t.sn="sn",t.so="so",t.sq="sq",t.sr="sr",t.ss="ss",t.st="st",t.su="su",t.sv="sv",t.sw="sw",t.ta="ta",t.te="te",t.tg="tg",t.th="th",t.ti="ti",t.tk="tk",t.tl="tl",t.tn="tn",t.to="to",t.tr="tr",t.ts="ts",t.tt="tt",t.tw="tw",t.ug="ug",t.uk="uk",t.ur="ur",t.uz="uz",t.vi="vi",t.vo="vo",t.wo="wo",t.xh="xh",t.yi="yi",t.yo="yo",t.zh="zh",t.zu="zu"}(e.KalturaLanguageCode||(e.KalturaLanguageCode={}))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),o=n(1),i=function(t){function e(e){return t.call(this,e)||this}return r.__extends(e,t),e.prototype._getMetadata=function(){var e=t.prototype._getMetadata.call(this);return Object.assign(e.properties,{objectType:{type:"c",default:"KalturaAsset"},id:{type:"s",readOnly:!0},entryId:{type:"s",readOnly:!0},partnerId:{type:"n",readOnly:!0},version:{type:"n",readOnly:!0},size:{type:"n",readOnly:!0},tags:{type:"s"},fileExt:{type:"s"},createdAt:{type:"d",readOnly:!0},updatedAt:{type:"d",readOnly:!0},deletedAt:{type:"d",readOnly:!0},description:{type:"s",readOnly:!0},partnerData:{type:"s"},partnerDescription:{type:"s"},actualSourceAssetParamsIds:{type:"s"}}),e},e}(n(5).KalturaObjectBase);e.KalturaAsset=i,o.KalturaTypesFactory.registerType("KalturaAsset",i)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0);r.__exportStar(n(78),e),r.__exportStar(n(15),e),r.__exportStar(n(79),e)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),o=n(11);e.KalturaClientException=o.KalturaClientException;var i=n(8);e.KalturaAPIException=i.KalturaAPIException;var a=n(46);e.KalturaMultiRequest=a.KalturaMultiRequest;var s=n(47);e.KalturaMultiResponse=s.KalturaMultiResponse;var c=n(7);e.KalturaRequest=c.KalturaRequest;var u=n(28);e.KalturaRequestBase=u.KalturaRequestBase;var l=n(48);e.KalturaUploadRequest=l.KalturaUploadRequest;var p=n(42);e.KalturaResponse=p.KalturaResponse;var f=n(1);e.KalturaTypesFactory=f.KalturaTypesFactory,r.__exportStar(n(29),e)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(7),o=n(46),i=n(80),a=n(48),s=n(81),c=n(82),u=n(83),l=n(11),p=n(84),f=n(29),h=n(15),d=function(){function t(t,e){this._options=t,this._defaultRequestOptions=new f.KalturaRequestOptions(e||{})}return t.prototype.appendOptions=function(t){if(!t)throw new l.KalturaClientException("client::append_options","missing required argument 'options'");this._options=Object.assign(this._options||{},t)},t.prototype.setOptions=function(t){if(!t)throw new l.KalturaClientException("client::set_options","missing required argument 'options'");this._options=t},t.prototype.appendDefaultRequestOptions=function(t){if(!t)throw new l.KalturaClientException("client::append_default_request_options","missing required argument 'args'");this._defaultRequestOptions=Object.assign(this._defaultRequestOptions||new f.KalturaRequestOptions,new f.KalturaRequestOptions(t))},t.prototype.setDefaultRequestOptions=function(t){if(!t)throw new l.KalturaClientException("client::set_default_request_options","missing required argument 'args'");this._defaultRequestOptions=new f.KalturaRequestOptions(t)},t.prototype._validateOptions=function(){return this._options?this._options.endpointUrl?this._options.clientTag?null:new l.KalturaClientException("client::missing_options","cannot transmit request, missing 'clientTag' in client options"):new l.KalturaClientException("client::missing_options","cannot transmit request, missing 'endpointUrl' in client options"):new l.KalturaClientException("client::missing_options","cannot transmit request, missing client options (did you forgot to provide options manually?)")},t.prototype.request=function(t){var e=this._validateOptions();return e?h.CancelableAction.reject(e):t instanceof i.KalturaFileRequest?(new c.KalturaFileRequestAdapter).transmit(t,this._options,this._defaultRequestOptions):t instanceof a.KalturaUploadRequest?new p.KalturaUploadRequestAdapter(this._options,this._defaultRequestOptions).transmit(t):t instanceof r.KalturaRequest?(new s.KalturaRequestAdapter).transmit(t,this._options,this._defaultRequestOptions):h.CancelableAction.reject(new l.KalturaClientException("client::request_type_error","unsupported request type requested"))},t.prototype.multiRequest=function(t){var e=this._validateOptions();if(e)return h.CancelableAction.reject(e);var n=t instanceof o.KalturaMultiRequest?t:t instanceof Array?new(o.KalturaMultiRequest.bind.apply(o.KalturaMultiRequest,[void 0].concat(t))):null;return n?n.requests.some((function(t){return t instanceof i.KalturaFileRequest}))?h.CancelableAction.reject(new l.KalturaClientException("client::invalid_request","multi-request not support requests of type 'KalturaFileRequest', use regular request instead")):(new u.KalturaMultiRequestAdapter).transmit(n,this._options,this._defaultRequestOptions):h.CancelableAction.reject(new l.KalturaClientException("client::invalid_request","Expected argument of type Array or KalturaMultiRequest"))},t}();e.KalturaClient=d},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),o=function(t){function e(e){return t.call(this,e,{responseType:"v",responseSubType:"",responseConstructor:null})||this}return r.__extends(e,t),e}(n(7).KalturaRequest);e.KalturaFileRequest=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(8),o=n(11),i=n(18),a=function(){function t(){}return t.prototype.transmit=function(t,e,n){var a=i.prepareParameters(t,e,n),s=i.createEndpoint(t,e,a.service,a.action);return delete a.service,delete a.action,i.createCancelableAction({endpoint:s,headers:i.getHeaders(),body:a}).then((function(e){try{var n=t.handleResponse(e);if(n.error)throw n.error;return n.result}catch(t){if(t instanceof o.KalturaClientException||t instanceof r.KalturaAPIException)throw t;var i=t instanceof Error?t.message:"string"==typeof t?t:null;throw new o.KalturaClientException("client::response-unknown-error",i||"Failed to parse response")}}),(function(t){var e=t instanceof Error?t.message:"string"==typeof t?t:null;throw new o.KalturaClientException("client::request-network-error",e||"Error connecting to server")}))},t}();e.KalturaRequestAdapter=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(18),o=n(15),i=function(){function t(){}return t.prototype.transmit=function(t,e,n){var i=r.prepareParameters(t,e,n),a=r.createEndpoint(t,e,i.service,i.action);return delete i.service,delete i.action,o.CancelableAction.resolve({url:a+"?"+r.buildQuerystring(i)})},t}();e.KalturaFileRequestAdapter=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(18),o=n(8),i=n(11),a=function(){function t(){}return t.prototype.transmit=function(t,e,n){var a=r.prepareParameters(t,e,n),s=r.createEndpoint(t,e,a.service,a.action);return delete a.service,delete a.action,r.createCancelableAction({endpoint:s,headers:r.getHeaders(),body:a}).then((function(e){try{return t.handleResponse(e)}catch(t){if(t instanceof i.KalturaClientException||t instanceof o.KalturaAPIException)throw t;var n=t instanceof Error?t.message:"string"==typeof t?t:null;throw new i.KalturaClientException("client::multi-response-unknown-error",n||"Failed to parse response")}}),(function(t){var e=t instanceof Error?t.message:"string"==typeof t?t:null;throw new i.KalturaClientException("client::multi-request-network-error",e||"Error connecting to server")}))},t}();e.KalturaMultiRequestAdapter=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(18),o=n(11),i=n(8),a=n(15),s=function(){function t(t,e){this.clientOptions=t,this.defaultRequestOptions=e}return t.prototype._chunkUploadSupported=function(t){var e=!("undefined"==typeof File||"undefined"==typeof Blob||"undefined"==typeof FileList||!Blob.prototype.webkitSlice&&!Blob.prototype.mozSlice&&!Blob.prototype.slice),n=t.supportChunkUpload();return!this.clientOptions.chunkFileDisabled&&e&&n},t.prototype.transmit=function(t){var e=this;return new a.CancelableAction((function(n,r,a){var s,c=!isNaN(t.uploadedFileSize)&&isFinite(t.uploadedFileSize)&&t.uploadedFileSize>0?t.uploadedFileSize:0,u={enabled:e._chunkUploadSupported(t),resume:!!c,finalChunk:!1,resumeAt:c},l=function(t){s=null,r(t)},p=function(a){if(!u.enabled||u.finalChunk){s=null;try{var c=t.handleResponse(a);c.error?r(c.error):n(c.result)}catch(t){if(t instanceof o.KalturaClientException||t instanceof i.KalturaAPIException)r(t);else{var f=t instanceof Error?t.message:"string"==typeof t?t:null;r(new o.KalturaClientException("client::response-unknown-error",f||"Failed to parse response"))}}}else s=e._chunkUpload(t,u).then(p,l)};return s=e._chunkUpload(t,u).then(p,l),function(){s&&(s.cancel(),s=null)}}))},t.prototype._getFormData=function(t,e,n){var r=new FormData;return r.append("fileName",e),r.append(t,n),r},t.prototype._chunkUpload=function(t,e){var n=this;return new a.CancelableAction((function(i,a){var s=r.prepareParameters(t,n.clientOptions,n.defaultRequestOptions),c=!1,u=t.getFileInfo(),l=u.propertyName,p=u.file,f=n._getFormData(l,p.name,p),h=0;if(e.enabled){var d=null,g=n.clientOptions?n.clientOptions.chunkFileSize:null;g&&Number.isFinite(g)&&!Number.isNaN(g)?g<1e5?(console.warn("user requested for invalid upload chunk size '"+g+"'. minimal value 100Kb. using minimal value 100Kb instead"),d=1e5):(console.log("using user requetsed chunk size '"+g+"'"),d=g):(console.log("using default chunk size 5Mb"),d=5e6),e.finalChunk=p.size-e.resumeAt<=d,h=e.resumeAt;var y=e.finalChunk?p.size:h+d;f=n._getFormData(l,p.name,p.slice(h,y,p.type)),s.resume=e.resume,s.resumeAt=e.resumeAt,s.finalChunk=e.finalChunk}else console.log("chunk upload not supported by browser or by request. Uploading the file as-is");var m=r.createEndpoint(t,n.clientOptions,s.service,s.action);delete s.service,delete s.action,m=m+"?"+r.buildQuerystring(s);var v=new XMLHttpRequest;v.onreadystatechange=function(){if(4===v.readyState){if(c)return;c=!0;var t=void 0;try{t=200===v.status?JSON.parse(v.response):new o.KalturaClientException("client::upload-failure",v.responseText||"failed to upload file")}catch(e){t=new o.KalturaClientException("client::upload-failure",e.message||"failed to upload file")}if(t instanceof Error)a(t);else{if(e.enabled){if(void 0===t.uploadedFileSize||null===t.uploadedFileSize)return void a(new o.KalturaClientException("client::upload-failure","uploaded chunk of file failed, expected response with property 'uploadedFileSize'"));e.finalChunk||(e.resumeAt=Number(t.uploadedFileSize),e.resume=!0)}i(t)}}};var _=t._getProgressCallback();return _&&v.upload.addEventListener("progress",(function(e){e.lengthComputable&&_.apply(t,[e.loaded+h,p.size])}),!1),v.open("POST",m),v.send(f),function(){c||(c=!0,v.abort())}}))},t}();e.KalturaUploadRequestAdapter=s},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},a=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{c(r.next(t))}catch(t){i(t)}}function s(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}c((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},c=this&&this.__rest||function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};Object.defineProperty(e,"__esModule",{value:!0}),e.findCaptionAsset=e.filterCaptionAssetsByProperty=e.getCaptions=e.fetchCaptionAsset=e.makeCaptionAssetServeRequest=e.makeCaptionAssetListRequest=e.CaptionAssetServeAction=e.getCaptionsByFormat=e.TTML2Obj=e.toSeconds=e.HOUR=void 0;var u=n(86),l=n(7),p=n(104),f=n(107),h=n(6),d=n(9),g=h.ObjectUtils.get,y=h.getContribLogger({class:"NavigationPlugin",module:"captions"});e.HOUR=3600,e.toSeconds=function(t,n){void 0===n&&(n=!1);var r=(n?/(\d+):(\d{2}):(\d{2}).(\d{2,3}|\d{2})/:/(\d+):(\d{2}):(\d{2}),((\d{2,3}|\d{2}|\d{1}))?/).exec(t);if(null===r)return 0;for(var o=1;o<5;o++)r[o]=parseInt(r[o],10),isNaN(r[o])&&(r[o]=0);return r[1]*e.HOUR+60*r[2]+r[3]+r[4]/1e3};e.TTML2Obj=function(t){return y.debug("parsing TTML type of captions",{method:"TTML2Obj",data:{ttml:t}}),u.xml2js(t,{compact:!0}).tt.body.div.p.map((function(t,n){var r=t._attributes,o=r.begin,i=r.end,a=(c(r,["begin","end"]),i.replace(/\./g,",")),s=o.replace(/\./g,",");return{id:n+1,endTime:e.toSeconds(a),startTime:e.toSeconds(s),text:(Array.isArray(t._text)?t._text.join(" "):t._text)||""}}))},e.getCaptionsByFormat=function(t,n){switch(n.toLowerCase()){case"1":return function(t){y.debug("parsing SRT type of captions",{method:"fromSrt",data:{data:t}});var n=t.replace(/\r/g,"");(n=n.split(/(\d+)?\n?(\d{2}:\d{2}:\d{2}[,.]\d{3}) --> (\d{2}:\d{2}:\d{2}[,.]\d{3}).*\n/g)).shift();for(var r=[],o=0;o<n.length;o+=4)r.push({id:r.length+1,startTime:e.toSeconds(n[o+1].trim()),endTime:e.toSeconds(n[o+2].trim()),text:n[o+3].trim()});return r}(t);case"2":return t=t.replace(/<span[^>]+\?>/i,"").replace(/<\/span>/i,"").replace(/<br><\/br>/g," ").replace(/<[//]{0,1}(SPAN|span)[^><]*>/g,""),e.TTML2Obj(t);case"3":return function(t){y.debug("parsing VTT type of captions",{method:"fromVtt",data:{data:t}});var n=t.replace(/\r/g,"");(n=(n=n.replace(/[\s\S]*.*(?=00:00:00.000)/,"")).split(/(\d+)?\n?(\d{2}:\d{2}:\d{2}[,.]\d{3}) --> (\d{2}:\d{2}:\d{2}[,.]\d{3}).*\n/g)).shift();for(var r=[],o=0;o<n.length;o+=4)r.push({id:r.length+1,startTime:e.toSeconds(n[o+1].trim(),!0),endTime:e.toSeconds(n[o+2].trim(),!0),text:n[o+3].trim()});return r}(t);default:return[]}};var m=function(t){function e(e){return t.call(this,e,{responseType:"v",responseSubType:"",responseConstructor:null})||this}return o(e,t),e.prototype._getMetadata=function(){var e=t.prototype._getMetadata.call(this);return Object.assign(e.properties,{service:{type:"c",default:"caption_captionasset"},action:{type:"c",default:"serve"},captionAssetId:{type:"s"}}),e},e}(l.KalturaRequest);e.CaptionAssetServeAction=m;var v=function(t,n,r){try{var o=function(t,e){var n=e.find((function(e){return e.id===t.id}))||{};return g(n,"format","")}(n,r);return 0===t.toString().indexOf("Error: ")&&(t=t.toString().replace("Error: ","")),e.getCaptionsByFormat(t,o)}catch(t){throw y.error("Failed to parse the caption file",{method:"parseCaptions",data:t}),new Error("Failed to parse the caption file")}return[]};e.makeCaptionAssetListRequest=function(t){return new f.CaptionAssetListAction({filter:new p.KalturaCaptionAssetFilter({entryIdEqual:t})})},e.makeCaptionAssetServeRequest=function(t){return new m({captionAssetId:t})},e.fetchCaptionAsset=function(t,n){return a(void 0,void 0,void 0,(function(){var r,o,i;return s(this,(function(a){switch(a.label){case 0:r=null,o=e.makeCaptionAssetServeRequest(n),a.label=1;case 1:return a.trys.push([1,3,,4]),[4,t.request(o)];case 2:return r=a.sent(),[3,4];case 3:return i=a.sent(),r=i,[3,4];case 4:return[2,r]}}))}))},e.getCaptions=function(t,n,r){return a(void 0,void 0,void 0,(function(){var o,a;return s(this,(function(s){switch(s.label){case 0:return y.debug("trying to fetch caption asset",{method:"getCaptions",data:n}),[4,e.fetchCaptionAsset(t,n.id)];case 1:return o=s.sent(),a=function(t,e,n){if(!t||!e||!n.length)return[];var r=g(t,"error.message",t);return r?v(r,e,n):[]}(o,n,r),y.debug("caption data parsed",{method:"getCaptions",data:a}),[2,a.map((function(t){return i(i({},t),{startTime:1e3*t.startTime,cuePointType:d.itemTypes.Caption})}))]}}))}))},e.filterCaptionAssetsByProperty=function(t,e,n){return t.filter((function(t){return g(t,n,null)===e}))},e.findCaptionAsset=function(t,n){if("string"==typeof t){var r=e.filterCaptionAssetsByProperty(n,t,"languageCode");return r[0]?r[0]:n[0]}var o=e.filterCaptionAssetsByProperty(n,g(t,"payload.selectedTextTrack._language",null),"languageCode");if(1===o.length)return o[0];var i=e.filterCaptionAssetsByProperty(o,g(t,"payload.selectedTextTrack._label",null),"label");if(1===o.length)return i[0];var a=n[g(t,"payload.selectedTextTrack._id",-1)];return a||n[0]}},function(t,e,n){var r=n(49),o=n(102),i=n(55),a=n(103);t.exports={xml2js:r,xml2json:o,js2xml:i,json2xml:a}},function(t,e,n){(function(t){!function(e){e.parser=function(t,e){return new i(t,e)},e.SAXParser=i,e.SAXStream=s,e.createStream=function(t,e){return new s(t,e)},e.MAX_BUFFER_LENGTH=65536;var r,o=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];function i(t,n){if(!(this instanceof i))return new i(t,n);!function(t){for(var e=0,n=o.length;e<n;e++)t[o[e]]=""}(this),this.q=this.c="",this.bufferCheckPosition=e.MAX_BUFFER_LENGTH,this.opt=n||{},this.opt.lowercase=this.opt.lowercase||this.opt.lowercasetags,this.looseCase=this.opt.lowercase?"toLowerCase":"toUpperCase",this.tags=[],this.closed=this.closedRoot=this.sawRoot=!1,this.tag=this.error=null,this.strict=!!t,this.noscript=!(!t&&!this.opt.noscript),this.state=w.BEGIN,this.strictEntities=this.opt.strictEntities,this.ENTITIES=this.strictEntities?Object.create(e.XML_ENTITIES):Object.create(e.ENTITIES),this.attribList=[],this.opt.xmlns&&(this.ns=Object.create(u)),this.trackPosition=!1!==this.opt.position,this.trackPosition&&(this.position=this.line=this.column=0),x(this,"onready")}e.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"],Object.create||(Object.create=function(t){function e(){}return e.prototype=t,new e}),Object.keys||(Object.keys=function(t){var e=[];for(var n in t)t.hasOwnProperty(n)&&e.push(n);return e}),i.prototype={end:function(){S(this)},write:function(t){if(this.error)throw this.error;if(this.closed)return k(this,"Cannot write after close. Assign an onready handler.");if(null===t)return S(this);"object"==typeof t&&(t=t.toString());var n=0,r="";for(;r=F(t,n++),this.c=r,r;)switch(this.trackPosition&&(this.position++,"\n"===r?(this.line++,this.column=0):this.column++),this.state){case w.BEGIN:if(this.state=w.BEGIN_WHITESPACE,"\ufeff"===r)continue;N(this,r);continue;case w.BEGIN_WHITESPACE:N(this,r);continue;case w.TEXT:if(this.sawRoot&&!this.closedRoot){for(var i=n-1;r&&"<"!==r&&"&"!==r;)(r=F(t,n++))&&this.trackPosition&&(this.position++,"\n"===r?(this.line++,this.column=0):this.column++);this.textNode+=t.substring(i,n-1)}"<"!==r||this.sawRoot&&this.closedRoot&&!this.strict?(d(r)||this.sawRoot&&!this.closedRoot||O(this,"Text data outside of root node."),"&"===r?this.state=w.TEXT_ENTITY:this.textNode+=r):(this.state=w.OPEN_WAKA,this.startTagPosition=this.position);continue;case w.SCRIPT:"<"===r?this.state=w.SCRIPT_ENDING:this.script+=r;continue;case w.SCRIPT_ENDING:"/"===r?this.state=w.CLOSE_TAG:(this.script+="<"+r,this.state=w.SCRIPT);continue;case w.OPEN_WAKA:if("!"===r)this.state=w.SGML_DECL,this.sgmlDecl="";else if(d(r));else if(m(l,r))this.state=w.OPEN_TAG,this.tagName=r;else if("/"===r)this.state=w.CLOSE_TAG,this.tagName="";else if("?"===r)this.state=w.PROC_INST,this.procInstName=this.procInstBody="";else{if(O(this,"Unencoded <"),this.startTagPosition+1<this.position){var a=this.position-this.startTagPosition;r=new Array(a).join(" ")+r}this.textNode+="<"+r,this.state=w.TEXT}continue;case w.SGML_DECL:"[CDATA["===(this.sgmlDecl+r).toUpperCase()?(T(this,"onopencdata"),this.state=w.CDATA,this.sgmlDecl="",this.cdata=""):this.sgmlDecl+r==="--"?(this.state=w.COMMENT,this.comment="",this.sgmlDecl=""):"DOCTYPE"===(this.sgmlDecl+r).toUpperCase()?(this.state=w.DOCTYPE,(this.doctype||this.sawRoot)&&O(this,"Inappropriately located doctype declaration"),this.doctype="",this.sgmlDecl=""):">"===r?(T(this,"onsgmldeclaration",this.sgmlDecl),this.sgmlDecl="",this.state=w.TEXT):g(r)?(this.state=w.SGML_DECL_QUOTED,this.sgmlDecl+=r):this.sgmlDecl+=r;continue;case w.SGML_DECL_QUOTED:r===this.q&&(this.state=w.SGML_DECL,this.q=""),this.sgmlDecl+=r;continue;case w.DOCTYPE:">"===r?(this.state=w.TEXT,T(this,"ondoctype",this.doctype),this.doctype=!0):(this.doctype+=r,"["===r?this.state=w.DOCTYPE_DTD:g(r)&&(this.state=w.DOCTYPE_QUOTED,this.q=r));continue;case w.DOCTYPE_QUOTED:this.doctype+=r,r===this.q&&(this.q="",this.state=w.DOCTYPE);continue;case w.DOCTYPE_DTD:this.doctype+=r,"]"===r?this.state=w.DOCTYPE:g(r)&&(this.state=w.DOCTYPE_DTD_QUOTED,this.q=r);continue;case w.DOCTYPE_DTD_QUOTED:this.doctype+=r,r===this.q&&(this.state=w.DOCTYPE_DTD,this.q="");continue;case w.COMMENT:"-"===r?this.state=w.COMMENT_ENDING:this.comment+=r;continue;case w.COMMENT_ENDING:"-"===r?(this.state=w.COMMENT_ENDED,this.comment=P(this.opt,this.comment),this.comment&&T(this,"oncomment",this.comment),this.comment=""):(this.comment+="-"+r,this.state=w.COMMENT);continue;case w.COMMENT_ENDED:">"!==r?(O(this,"Malformed comment"),this.comment+="--"+r,this.state=w.COMMENT):this.state=w.TEXT;continue;case w.CDATA:"]"===r?this.state=w.CDATA_ENDING:this.cdata+=r;continue;case w.CDATA_ENDING:"]"===r?this.state=w.CDATA_ENDING_2:(this.cdata+="]"+r,this.state=w.CDATA);continue;case w.CDATA_ENDING_2:">"===r?(this.cdata&&T(this,"oncdata",this.cdata),T(this,"onclosecdata"),this.cdata="",this.state=w.TEXT):"]"===r?this.cdata+="]":(this.cdata+="]]"+r,this.state=w.CDATA);continue;case w.PROC_INST:"?"===r?this.state=w.PROC_INST_ENDING:d(r)?this.state=w.PROC_INST_BODY:this.procInstName+=r;continue;case w.PROC_INST_BODY:if(!this.procInstBody&&d(r))continue;"?"===r?this.state=w.PROC_INST_ENDING:this.procInstBody+=r;continue;case w.PROC_INST_ENDING:">"===r?(T(this,"onprocessinginstruction",{name:this.procInstName,body:this.procInstBody}),this.procInstName=this.procInstBody="",this.state=w.TEXT):(this.procInstBody+="?"+r,this.state=w.PROC_INST_BODY);continue;case w.OPEN_TAG:m(p,r)?this.tagName+=r:(B(this),">"===r?R(this):"/"===r?this.state=w.OPEN_TAG_SLASH:(d(r)||O(this,"Invalid character in tag name"),this.state=w.ATTRIB));continue;case w.OPEN_TAG_SLASH:">"===r?(R(this,!0),I(this)):(O(this,"Forward-slash in opening tag not followed by >"),this.state=w.ATTRIB);continue;case w.ATTRIB:if(d(r))continue;">"===r?R(this):"/"===r?this.state=w.OPEN_TAG_SLASH:m(l,r)?(this.attribName=r,this.attribValue="",this.state=w.ATTRIB_NAME):O(this,"Invalid attribute name");continue;case w.ATTRIB_NAME:"="===r?this.state=w.ATTRIB_VALUE:">"===r?(O(this,"Attribute without value"),this.attribValue=this.attribName,j(this),R(this)):d(r)?this.state=w.ATTRIB_NAME_SAW_WHITE:m(p,r)?this.attribName+=r:O(this,"Invalid attribute name");continue;case w.ATTRIB_NAME_SAW_WHITE:if("="===r)this.state=w.ATTRIB_VALUE;else{if(d(r))continue;O(this,"Attribute without value"),this.tag.attributes[this.attribName]="",this.attribValue="",T(this,"onattribute",{name:this.attribName,value:""}),this.attribName="",">"===r?R(this):m(l,r)?(this.attribName=r,this.state=w.ATTRIB_NAME):(O(this,"Invalid attribute name"),this.state=w.ATTRIB)}continue;case w.ATTRIB_VALUE:if(d(r))continue;g(r)?(this.q=r,this.state=w.ATTRIB_VALUE_QUOTED):(O(this,"Unquoted attribute value"),this.state=w.ATTRIB_VALUE_UNQUOTED,this.attribValue=r);continue;case w.ATTRIB_VALUE_QUOTED:if(r!==this.q){"&"===r?this.state=w.ATTRIB_VALUE_ENTITY_Q:this.attribValue+=r;continue}j(this),this.q="",this.state=w.ATTRIB_VALUE_CLOSED;continue;case w.ATTRIB_VALUE_CLOSED:d(r)?this.state=w.ATTRIB:">"===r?R(this):"/"===r?this.state=w.OPEN_TAG_SLASH:m(l,r)?(O(this,"No whitespace between attributes"),this.attribName=r,this.attribValue="",this.state=w.ATTRIB_NAME):O(this,"Invalid attribute name");continue;case w.ATTRIB_VALUE_UNQUOTED:if(!y(r)){"&"===r?this.state=w.ATTRIB_VALUE_ENTITY_U:this.attribValue+=r;continue}j(this),">"===r?R(this):this.state=w.ATTRIB;continue;case w.CLOSE_TAG:if(this.tagName)">"===r?I(this):m(p,r)?this.tagName+=r:this.script?(this.script+="</"+this.tagName,this.tagName="",this.state=w.SCRIPT):(d(r)||O(this,"Invalid tagname in closing tag"),this.state=w.CLOSE_TAG_SAW_WHITE);else{if(d(r))continue;v(l,r)?this.script?(this.script+="</"+r,this.state=w.SCRIPT):O(this,"Invalid tagname in closing tag."):this.tagName=r}continue;case w.CLOSE_TAG_SAW_WHITE:if(d(r))continue;">"===r?I(this):O(this,"Invalid characters in closing tag");continue;case w.TEXT_ENTITY:case w.ATTRIB_VALUE_ENTITY_Q:case w.ATTRIB_VALUE_ENTITY_U:var s,c;switch(this.state){case w.TEXT_ENTITY:s=w.TEXT,c="textNode";break;case w.ATTRIB_VALUE_ENTITY_Q:s=w.ATTRIB_VALUE_QUOTED,c="attribValue";break;case w.ATTRIB_VALUE_ENTITY_U:s=w.ATTRIB_VALUE_UNQUOTED,c="attribValue"}";"===r?(this[c]+=L(this),this.entity="",this.state=s):m(this.entity.length?h:f,r)?this.entity+=r:(O(this,"Invalid character in entity name"),this[c]+="&"+this.entity+r,this.entity="",this.state=s);continue;default:throw new Error(this,"Unknown state: "+this.state)}this.position>=this.bufferCheckPosition&&function(t){for(var n=Math.max(e.MAX_BUFFER_LENGTH,10),r=0,i=0,a=o.length;i<a;i++){var s=t[o[i]].length;if(s>n)switch(o[i]){case"textNode":E(t);break;case"cdata":T(t,"oncdata",t.cdata),t.cdata="";break;case"script":T(t,"onscript",t.script),t.script="";break;default:k(t,"Max buffer length exceeded: "+o[i])}r=Math.max(r,s)}var c=e.MAX_BUFFER_LENGTH-r;t.bufferCheckPosition=c+t.position}(this);return this}
/*! http://mths.be/fromcodepoint v0.1.0 by @mathias */,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){var t;E(t=this),""!==t.cdata&&(T(t,"oncdata",t.cdata),t.cdata=""),""!==t.script&&(T(t,"onscript",t.script),t.script="")}};try{r=n(90).Stream}catch(t){r=function(){}}var a=e.EVENTS.filter((function(t){return"error"!==t&&"end"!==t}));function s(t,e){if(!(this instanceof s))return new s(t,e);r.apply(this),this._parser=new i(t,e),this.writable=!0,this.readable=!0;var n=this;this._parser.onend=function(){n.emit("end")},this._parser.onerror=function(t){n.emit("error",t),n._parser.error=null},this._decoder=null,a.forEach((function(t){Object.defineProperty(n,"on"+t,{get:function(){return n._parser["on"+t]},set:function(e){if(!e)return n.removeAllListeners(t),n._parser["on"+t]=e,e;n.on(t,e)},enumerable:!0,configurable:!1})}))}s.prototype=Object.create(r.prototype,{constructor:{value:s}}),s.prototype.write=function(e){if("function"==typeof t&&"function"==typeof t.isBuffer&&t.isBuffer(e)){if(!this._decoder){var r=n(34).StringDecoder;this._decoder=new r("utf8")}e=this._decoder.write(e)}return this._parser.write(e.toString()),this.emit("data",e),!0},s.prototype.end=function(t){return t&&t.length&&this.write(t),this._parser.end(),!0},s.prototype.on=function(t,e){var n=this;return n._parser["on"+t]||-1===a.indexOf(t)||(n._parser["on"+t]=function(){var e=1===arguments.length?[arguments[0]]:Array.apply(null,arguments);e.splice(0,0,t),n.emit.apply(n,e)}),r.prototype.on.call(n,t,e)};var c="http://www.w3.org/XML/1998/namespace",u={xml:c,xmlns:"http://www.w3.org/2000/xmlns/"},l=/[:_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]/,p=/[:_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-]/,f=/[#:_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]/,h=/[#:_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-]/;function d(t){return" "===t||"\n"===t||"\r"===t||"\t"===t}function g(t){return'"'===t||"'"===t}function y(t){return">"===t||d(t)}function m(t,e){return t.test(e)}function v(t,e){return!m(t,e)}var _,b,C,w=0;for(var A in e.STATE={BEGIN:w++,BEGIN_WHITESPACE:w++,TEXT:w++,TEXT_ENTITY:w++,OPEN_WAKA:w++,SGML_DECL:w++,SGML_DECL_QUOTED:w++,DOCTYPE:w++,DOCTYPE_QUOTED:w++,DOCTYPE_DTD:w++,DOCTYPE_DTD_QUOTED:w++,COMMENT_STARTING:w++,COMMENT:w++,COMMENT_ENDING:w++,COMMENT_ENDED:w++,CDATA:w++,CDATA_ENDING:w++,CDATA_ENDING_2:w++,PROC_INST:w++,PROC_INST_BODY:w++,PROC_INST_ENDING:w++,OPEN_TAG:w++,OPEN_TAG_SLASH:w++,ATTRIB:w++,ATTRIB_NAME:w++,ATTRIB_NAME_SAW_WHITE:w++,ATTRIB_VALUE:w++,ATTRIB_VALUE_QUOTED:w++,ATTRIB_VALUE_CLOSED:w++,ATTRIB_VALUE_UNQUOTED:w++,ATTRIB_VALUE_ENTITY_Q:w++,ATTRIB_VALUE_ENTITY_U:w++,CLOSE_TAG:w++,CLOSE_TAG_SAW_WHITE:w++,SCRIPT:w++,SCRIPT_ENDING:w++},e.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},e.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},Object.keys(e.ENTITIES).forEach((function(t){var n=e.ENTITIES[t],r="number"==typeof n?String.fromCharCode(n):n;e.ENTITIES[t]=r})),e.STATE)e.STATE[e.STATE[A]]=A;function x(t,e,n){t[e]&&t[e](n)}function T(t,e,n){t.textNode&&E(t),x(t,e,n)}function E(t){t.textNode=P(t.opt,t.textNode),t.textNode&&x(t,"ontext",t.textNode),t.textNode=""}function P(t,e){return t.trim&&(e=e.trim()),t.normalize&&(e=e.replace(/\s+/g," ")),e}function k(t,e){return E(t),t.trackPosition&&(e+="\nLine: "+t.line+"\nColumn: "+t.column+"\nChar: "+t.c),e=new Error(e),t.error=e,x(t,"onerror",e),t}function S(t){return t.sawRoot&&!t.closedRoot&&O(t,"Unclosed root tag"),t.state!==w.BEGIN&&t.state!==w.BEGIN_WHITESPACE&&t.state!==w.TEXT&&k(t,"Unexpected end"),E(t),t.c="",t.closed=!0,x(t,"onend"),i.call(t,t.strict,t.opt),t}function O(t,e){if("object"!=typeof t||!(t instanceof i))throw new Error("bad call to strictFail");t.strict&&k(t,e)}function B(t){t.strict||(t.tagName=t.tagName[t.looseCase]());var e=t.tags[t.tags.length-1]||t,n=t.tag={name:t.tagName,attributes:{}};t.opt.xmlns&&(n.ns=e.ns),t.attribList.length=0,T(t,"onopentagstart",n)}function M(t,e){var n=t.indexOf(":")<0?["",t]:t.split(":"),r=n[0],o=n[1];return e&&"xmlns"===t&&(r="xmlns",o=""),{prefix:r,local:o}}function j(t){if(t.strict||(t.attribName=t.attribName[t.looseCase]()),-1!==t.attribList.indexOf(t.attribName)||t.tag.attributes.hasOwnProperty(t.attribName))t.attribName=t.attribValue="";else{if(t.opt.xmlns){var e=M(t.attribName,!0),n=e.prefix,r=e.local;if("xmlns"===n)if("xml"===r&&t.attribValue!==c)O(t,"xml: prefix must be bound to "+c+"\nActual: "+t.attribValue);else if("xmlns"===r&&"http://www.w3.org/2000/xmlns/"!==t.attribValue)O(t,"xmlns: prefix must be bound to http://www.w3.org/2000/xmlns/\nActual: "+t.attribValue);else{var o=t.tag,i=t.tags[t.tags.length-1]||t;o.ns===i.ns&&(o.ns=Object.create(i.ns)),o.ns[r]=t.attribValue}t.attribList.push([t.attribName,t.attribValue])}else t.tag.attributes[t.attribName]=t.attribValue,T(t,"onattribute",{name:t.attribName,value:t.attribValue});t.attribName=t.attribValue=""}}function R(t,e){if(t.opt.xmlns){var n=t.tag,r=M(t.tagName);n.prefix=r.prefix,n.local=r.local,n.uri=n.ns[r.prefix]||"",n.prefix&&!n.uri&&(O(t,"Unbound namespace prefix: "+JSON.stringify(t.tagName)),n.uri=r.prefix);var o=t.tags[t.tags.length-1]||t;n.ns&&o.ns!==n.ns&&Object.keys(n.ns).forEach((function(e){T(t,"onopennamespace",{prefix:e,uri:n.ns[e]})}));for(var i=0,a=t.attribList.length;i<a;i++){var s=t.attribList[i],c=s[0],u=s[1],l=M(c,!0),p=l.prefix,f=l.local,h=""===p?"":n.ns[p]||"",d={name:c,value:u,prefix:p,local:f,uri:h};p&&"xmlns"!==p&&!h&&(O(t,"Unbound namespace prefix: "+JSON.stringify(p)),d.uri=p),t.tag.attributes[c]=d,T(t,"onattribute",d)}t.attribList.length=0}t.tag.isSelfClosing=!!e,t.sawRoot=!0,t.tags.push(t.tag),T(t,"onopentag",t.tag),e||(t.noscript||"script"!==t.tagName.toLowerCase()?t.state=w.TEXT:t.state=w.SCRIPT,t.tag=null,t.tagName=""),t.attribName=t.attribValue="",t.attribList.length=0}function I(t){if(!t.tagName)return O(t,"Weird empty close tag."),t.textNode+="</>",void(t.state=w.TEXT);if(t.script){if("script"!==t.tagName)return t.script+="</"+t.tagName+">",t.tagName="",void(t.state=w.SCRIPT);T(t,"onscript",t.script),t.script=""}var e=t.tags.length,n=t.tagName;t.strict||(n=n[t.looseCase]());for(var r=n;e--;){if(t.tags[e].name===r)break;O(t,"Unexpected close tag")}if(e<0)return O(t,"Unmatched closing tag: "+t.tagName),t.textNode+="</"+t.tagName+">",void(t.state=w.TEXT);t.tagName=n;for(var o=t.tags.length;o-- >e;){var i=t.tag=t.tags.pop();t.tagName=t.tag.name,T(t,"onclosetag",t.tagName);var a={};for(var s in i.ns)a[s]=i.ns[s];var c=t.tags[t.tags.length-1]||t;t.opt.xmlns&&i.ns!==c.ns&&Object.keys(i.ns).forEach((function(e){var n=i.ns[e];T(t,"onclosenamespace",{prefix:e,uri:n})}))}0===e&&(t.closedRoot=!0),t.tagName=t.attribValue=t.attribName="",t.attribList.length=0,t.state=w.TEXT}function L(t){var e,n=t.entity,r=n.toLowerCase(),o="";return t.ENTITIES[n]?t.ENTITIES[n]:t.ENTITIES[r]?t.ENTITIES[r]:("#"===(n=r).charAt(0)&&("x"===n.charAt(1)?(n=n.slice(2),o=(e=parseInt(n,16)).toString(16)):(n=n.slice(1),o=(e=parseInt(n,10)).toString(10))),n=n.replace(/^0+/,""),isNaN(e)||o.toLowerCase()!==n?(O(t,"Invalid character entity"),"&"+t.entity+";"):String.fromCodePoint(e))}function N(t,e){"<"===e?(t.state=w.OPEN_WAKA,t.startTagPosition=t.position):d(e)||(O(t,"Non-whitespace before first tag."),t.textNode=e,t.state=w.TEXT)}function F(t,e){var n="";return e<t.length&&(n=t.charAt(e)),n}w=e.STATE,String.fromCodePoint||(_=String.fromCharCode,b=Math.floor,C=function(){var t,e,n=16384,r=[],o=-1,i=arguments.length;if(!i)return"";for(var a="";++o<i;){var s=Number(arguments[o]);if(!isFinite(s)||s<0||s>1114111||b(s)!==s)throw RangeError("Invalid code point: "+s);s<=65535?r.push(s):(t=55296+((s-=65536)>>10),e=s%1024+56320,r.push(t,e)),(o+1===i||r.length>n)&&(a+=_.apply(null,r),r.length=0)}return a},Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:C,configurable:!0,writable:!0}):String.fromCodePoint=C)}(e)}).call(this,n(19).Buffer)},function(t,e,n){"use strict";e.byteLength=function(t){var e=u(t),n=e[0],r=e[1];return 3*(n+r)/4-r},e.toByteArray=function(t){var e,n,r=u(t),a=r[0],s=r[1],c=new i(function(t,e,n){return 3*(e+n)/4-n}(0,a,s)),l=0,p=s>0?a-4:a;for(n=0;n<p;n+=4)e=o[t.charCodeAt(n)]<<18|o[t.charCodeAt(n+1)]<<12|o[t.charCodeAt(n+2)]<<6|o[t.charCodeAt(n+3)],c[l++]=e>>16&255,c[l++]=e>>8&255,c[l++]=255&e;2===s&&(e=o[t.charCodeAt(n)]<<2|o[t.charCodeAt(n+1)]>>4,c[l++]=255&e);1===s&&(e=o[t.charCodeAt(n)]<<10|o[t.charCodeAt(n+1)]<<4|o[t.charCodeAt(n+2)]>>2,c[l++]=e>>8&255,c[l++]=255&e);return c},e.fromByteArray=function(t){for(var e,n=t.length,o=n%3,i=[],a=0,s=n-o;a<s;a+=16383)i.push(l(t,a,a+16383>s?s:a+16383));1===o?(e=t[n-1],i.push(r[e>>2]+r[e<<4&63]+"==")):2===o&&(e=(t[n-2]<<8)+t[n-1],i.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"="));return i.join("")};for(var r=[],o=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,c=a.length;s<c;++s)r[s]=a[s],o[a.charCodeAt(s)]=s;function u(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");return-1===n&&(n=e),[n,n===e?0:4-n%4]}function l(t,e,n){for(var o,i,a=[],s=e;s<n;s+=3)o=(t[s]<<16&16711680)+(t[s+1]<<8&65280)+(255&t[s+2]),a.push(r[(i=o)>>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return a.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},function(t,e){e.read=function(t,e,n,r,o){var i,a,s=8*o-r-1,c=(1<<s)-1,u=c>>1,l=-7,p=n?o-1:0,f=n?-1:1,h=t[e+p];for(p+=f,i=h&(1<<-l)-1,h>>=-l,l+=s;l>0;i=256*i+t[e+p],p+=f,l-=8);for(a=i&(1<<-l)-1,i>>=-l,l+=r;l>0;a=256*a+t[e+p],p+=f,l-=8);if(0===i)i=1-u;else{if(i===c)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,r),i-=u}return(h?-1:1)*a*Math.pow(2,i-r)},e.write=function(t,e,n,r,o,i){var a,s,c,u=8*i-o-1,l=(1<<u)-1,p=l>>1,f=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:i-1,d=r?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=l):(a=Math.floor(Math.log(e)/Math.LN2),e*(c=Math.pow(2,-a))<1&&(a--,c*=2),(e+=a+p>=1?f/c:f*Math.pow(2,1-p))*c>=2&&(a++,c/=2),a+p>=l?(s=0,a=l):a+p>=1?(s=(e*c-1)*Math.pow(2,o),a+=p):(s=e*Math.pow(2,p-1)*Math.pow(2,o),a=0));o>=8;t[n+h]=255&s,h+=d,s/=256,o-=8);for(a=a<<o|s,u+=o;u>0;t[n+h]=255&a,h+=d,a/=256,u-=8);t[n+h-d]|=128*g}},function(t,e,n){t.exports=o;var r=n(31).EventEmitter;function o(){r.call(this)}n(13)(o,r),o.Readable=n(32),o.Writable=n(98),o.Duplex=n(99),o.Transform=n(100),o.PassThrough=n(101),o.Stream=o,o.prototype.pipe=function(t,e){var n=this;function o(e){t.writable&&!1===t.write(e)&&n.pause&&n.pause()}function i(){n.readable&&n.resume&&n.resume()}n.on("data",o),t.on("drain",i),t._isStdio||e&&!1===e.end||(n.on("end",s),n.on("close",c));var a=!1;function s(){a||(a=!0,t.end())}function c(){a||(a=!0,"function"==typeof t.destroy&&t.destroy())}function u(t){if(l(),0===r.listenerCount(this,"error"))throw t}function l(){n.removeListener("data",o),t.removeListener("drain",i),n.removeListener("end",s),n.removeListener("close",c),n.removeListener("error",u),t.removeListener("error",u),n.removeListener("end",l),n.removeListener("close",l),t.removeListener("close",l)}return n.on("error",u),t.on("error",u),n.on("end",l),n.on("close",l),t.on("close",l),t.emit("pipe",n),t}},function(t,e){},function(t,e,n){"use strict";var r=n(22).Buffer,o=n(93);t.exports=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.head=null,this.tail=null,this.length=0}return t.prototype.push=function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length},t.prototype.unshift=function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length},t.prototype.shift=function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}},t.prototype.clear=function(){this.head=this.tail=null,this.length=0},t.prototype.join=function(t){if(0===this.length)return"";for(var e=this.head,n=""+e.data;e=e.next;)n+=t+e.data;return n},t.prototype.concat=function(t){if(0===this.length)return r.alloc(0);if(1===this.length)return this.head.data;for(var e,n,o,i=r.allocUnsafe(t>>>0),a=this.head,s=0;a;)e=a.data,n=i,o=s,e.copy(n,o),s+=a.data.length,a=a.next;return i},t}(),o&&o.inspect&&o.inspect.custom&&(t.exports.prototype[o.inspect.custom]=function(){var t=o.inspect({length:this.length});return this.constructor.name+" "+t})},function(t,e){},function(t,e,n){(function(t){var r=void 0!==t&&t||"undefined"!=typeof self&&self||window,o=Function.prototype.apply;function i(t,e){this._id=t,this._clearFn=e}e.setTimeout=function(){return new i(o.call(setTimeout,r,arguments),clearTimeout)},e.setInterval=function(){return new i(o.call(setInterval,r,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},i.prototype.unref=i.prototype.ref=function(){},i.prototype.close=function(){this._clearFn.call(r,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout((function(){t._onTimeout&&t._onTimeout()}),e))},n(95),e.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==t&&t.clearImmediate||this&&this.clearImmediate}).call(this,n(12))},function(t,e,n){(function(t,e){!function(t,n){"use strict";if(!t.setImmediate){var r,o,i,a,s,c=1,u={},l=!1,p=t.document,f=Object.getPrototypeOf&&Object.getPrototypeOf(t);f=f&&f.setTimeout?f:t,"[object process]"==={}.toString.call(t.process)?r=function(t){e.nextTick((function(){d(t)}))}:!function(){if(t.postMessage&&!t.importScripts){var e=!0,n=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=n,e}}()?t.MessageChannel?((i=new MessageChannel).port1.onmessage=function(t){d(t.data)},r=function(t){i.port2.postMessage(t)}):p&&"onreadystatechange"in p.createElement("script")?(o=p.documentElement,r=function(t){var e=p.createElement("script");e.onreadystatechange=function(){d(t),e.onreadystatechange=null,o.removeChild(e),e=null},o.appendChild(e)}):r=function(t){setTimeout(d,0,t)}:(a="setImmediate$"+Math.random()+"$",s=function(e){e.source===t&&"string"==typeof e.data&&0===e.data.indexOf(a)&&d(+e.data.slice(a.length))},t.addEventListener?t.addEventListener("message",s,!1):t.attachEvent("onmessage",s),r=function(e){t.postMessage(a+e,"*")}),f.setImmediate=function(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),n=0;n<e.length;n++)e[n]=arguments[n+1];var o={callback:t,args:e};return u[c]=o,r(c),c++},f.clearImmediate=h}function h(t){delete u[t]}function d(t){if(l)setTimeout(d,0,t);else{var e=u[t];if(e){l=!0;try{!function(t){var e=t.callback,n=t.args;switch(n.length){case 0:e();break;case 1:e(n[0]);break;case 2:e(n[0],n[1]);break;case 3:e(n[0],n[1],n[2]);break;default:e.apply(void 0,n)}}(e)}finally{h(t),l=!1}}}}}("undefined"==typeof self?void 0===t?this:t:self)}).call(this,n(12),n(20))},function(t,e,n){(function(e){function n(t){try{if(!e.localStorage)return!1}catch(t){return!1}var n=e.localStorage[t];return null!=n&&"true"===String(n).toLowerCase()}t.exports=function(t,e){if(n("noDeprecation"))return t;var r=!1;return function(){if(!r){if(n("throwDeprecation"))throw new Error(e);n("traceDeprecation")?console.trace(e):console.warn(e),r=!0}return t.apply(this,arguments)}}}).call(this,n(12))},function(t,e,n){"use strict";t.exports=i;var r=n(54),o=Object.create(n(16));function i(t){if(!(this instanceof i))return new i(t);r.call(this,t)}o.inherits=n(13),o.inherits(i,r),i.prototype._transform=function(t,e,n){n(null,t)}},function(t,e,n){t.exports=n(33)},function(t,e,n){t.exports=n(10)},function(t,e,n){t.exports=n(32).Transform},function(t,e,n){t.exports=n(32).PassThrough},function(t,e,n){var r=n(35),o=n(49);t.exports=function(t,e){var n,i,a;return n=function(t){var e=r.copyOptions(t);return r.ensureSpacesExists(e),e}(e),i=o(t,n),a="compact"in n&&n.compact?"_parent":"parent",("addParent"in n&&n.addParent?JSON.stringify(i,(function(t,e){return t===a?"_":e}),n.spaces):JSON.stringify(i,null,n.spaces)).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}},function(t,e,n){(function(e){var r=n(55);t.exports=function(t,n){t instanceof e&&(t=t.toString());var o=null;if("string"==typeof t)try{o=JSON.parse(t)}catch(t){throw new Error("The JSON structure is invalid")}else o=t;return r(o,n)}}).call(this,n(19).Buffer)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),o=n(1),i=function(t){function e(e){return t.call(this,e)||this}return r.__extends(e,t),e.prototype._getMetadata=function(){var e=t.prototype._getMetadata.call(this);return Object.assign(e.properties,{objectType:{type:"c",default:"KalturaCaptionAssetFilter"}}),e},e}(n(105).KalturaCaptionAssetBaseFilter);e.KalturaCaptionAssetFilter=i,o.KalturaTypesFactory.registerType("KalturaCaptionAssetFilter",i)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),o=n(1),i=n(44),a=n(45),s=function(t){function e(e){return t.call(this,e)||this}return r.__extends(e,t),e.prototype._getMetadata=function(){var e=t.prototype._getMetadata.call(this);return Object.assign(e.properties,{objectType:{type:"c",default:"KalturaCaptionAssetBaseFilter"},captionParamsIdEqual:{type:"n"},captionParamsIdIn:{type:"s"},formatEqual:{type:"es",subTypeConstructor:i.KalturaCaptionType,subType:"KalturaCaptionType"},formatIn:{type:"s"},statusEqual:{type:"en",subTypeConstructor:a.KalturaCaptionAssetStatus,subType:"KalturaCaptionAssetStatus"},statusIn:{type:"s"},statusNotIn:{type:"s"}}),e},e}(n(56).KalturaAssetFilter);e.KalturaCaptionAssetBaseFilter=s,o.KalturaTypesFactory.registerType("KalturaCaptionAssetBaseFilter",s)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),o=n(1),i=function(t){function e(e){return t.call(this,e)||this}return r.__extends(e,t),e.prototype._getMetadata=function(){var e=t.prototype._getMetadata.call(this);return Object.assign(e.properties,{objectType:{type:"c",default:"KalturaAssetBaseFilter"},idEqual:{type:"s"},idIn:{type:"s"},entryIdEqual:{type:"s"},entryIdIn:{type:"s"},partnerIdEqual:{type:"n"},partnerIdIn:{type:"s"},sizeGreaterThanOrEqual:{type:"n"},sizeLessThanOrEqual:{type:"n"},tagsLike:{type:"s"},tagsMultiLikeOr:{type:"s"},tagsMultiLikeAnd:{type:"s"},createdAtGreaterThanOrEqual:{type:"d"},createdAtLessThanOrEqual:{type:"d"},updatedAtGreaterThanOrEqual:{type:"d"},updatedAtLessThanOrEqual:{type:"d"},deletedAtGreaterThanOrEqual:{type:"d"},deletedAtLessThanOrEqual:{type:"d"}}),e},e}(n(40).KalturaRelatedFilter);e.KalturaAssetBaseFilter=i,o.KalturaTypesFactory.registerType("KalturaAssetBaseFilter",i)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),o=n(43),i=n(56),a=n(41),s=function(t){function e(e){return t.call(this,e,{responseType:"o",responseSubType:"KalturaCaptionAssetListResponse",responseConstructor:o.KalturaCaptionAssetListResponse})||this}return r.__extends(e,t),e.prototype._getMetadata=function(){var e=t.prototype._getMetadata.call(this);return Object.assign(e.properties,{service:{type:"c",default:"caption_captionasset"},action:{type:"c",default:"list"},filter:{type:"o",subTypeConstructor:i.KalturaAssetFilter,subType:"KalturaAssetFilter"},pager:{type:"o",subTypeConstructor:a.KalturaFilterPager,subType:"KalturaFilterPager"}}),e},e}(n(7).KalturaRequest);e.CaptionAssetListAction=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PushNotification=e.PushNotificationEventTypes=void 0;var r,o=n(6),i=n(109);!function(t){t.PublicNotifications="PUBLIC_QNA_NOTIFICATIONS",t.PushNotificationsError="PUSH_NOTIFICATIONS_ERROR",t.ThumbNotification="THUMB_CUE_POINT_READY_NOTIFICATION",t.SlideNotification="SLIDE_VIEW_CHANGE_CODE_CUE_POINT"}(r=e.PushNotificationEventTypes||(e.PushNotificationEventTypes={}));var a=o.getContribLogger({class:"navigationPushNotification",module:"navigation-plugin"}),s=function(){function t(t){this._player=t,this._pushServerInstance=null,this._registeredToMessages=!1,this._events=new o.EventsManager,this._initialized=!1,this.on=this._events.on.bind(this._events),this.off=this._events.off.bind(this._events)}return t.prototype.init=function(t){this._initialized||(this._initialized=!0,this._pushServerInstance=i.PushNotificationsProvider.get(this._player,t))},t.prototype.reset=function(){this._registeredToMessages=!1},t.prototype.registerToPushServer=function(t,e,n,o){var i=this;if(this._registeredToMessages)throw a.error("Multiple registration error",{method:"registerToPushServer"}),new Error("Already register to push server");if(a.info("Registering for push notifications server",{method:"registerToPushServer",data:{entryId:t,userId:e}}),!this._pushServerInstance)return a.error("Can't register to notifications as _pushServerInstance doesn't exists",{method:"registerToPushServer"}),void this._events.emit({type:r.PushNotificationsError,error:"Can't register to notifications as _pushServerInstance doesn't exists"});var s=[this._createPublicRegistration(t),this._createThumbRegistration(t),this._createSlideRegistration(t)];this._pushServerInstance.registerNotifications({prepareRegisterRequestConfigs:s,onSocketReconnect:function(){}}).then((function(){a.info("Registered push notification service",{method:"registerToPushServer"}),i._registeredToMessages=!0,n()}),(function(t){a.error("Registration for push notification error",{method:"registerToPushServer",data:t}),o(),i._events.emit({type:r.PushNotificationsError,error:t})}))},t.prototype._createThumbRegistration=function(t){var e=this;return a.info("Register thumb notification",{method:"_createThumbRegistration",data:{entryId:t}}),{eventName:r.ThumbNotification,eventParams:{entryId:t},onMessage:function(t){e._events.emit({type:r.ThumbNotification,thumbs:t})}}},t.prototype._createSlideRegistration=function(t){var e=this;return a.info("Register slide notification",{method:"_createSlideRegistration",data:{entryId:t}}),{eventName:r.SlideNotification,eventParams:{entryId:t},onMessage:function(t){e._events.emit({type:r.SlideNotification,slides:t})}}},t.prototype._createPublicRegistration=function(t){var e=this;return a.info("Register public notification",{method:"_createPublicRegistration",data:{entryId:t}}),{eventName:r.PublicNotifications,eventParams:{entryId:t},onMessage:function(t){e._events.emit({type:r.PublicNotifications,messages:t})}}},t}();e.PushNotification=s},function(t,e,n){var r;window,t.exports=(r=n(6),function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=35)}([function(t,e,n){"use strict";var r=n(14),o=n(39),i=Object.prototype.toString;function a(t){return"[object Array]"===i.call(t)}function s(t){return null!==t&&"object"==typeof t}function c(t){return"[object Function]"===i.call(t)}function u(t,e){if(null!=t)if("object"!=typeof t&&(t=[t]),a(t))for(var n=0,r=t.length;n<r;n++)e.call(null,t[n],n,t);else for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.call(null,t[o],o,t)}t.exports={isArray:a,isArrayBuffer:function(t){return"[object ArrayBuffer]"===i.call(t)},isBuffer:o,isFormData:function(t){return"undefined"!=typeof FormData&&t instanceof FormData},isArrayBufferView:function(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&t.buffer instanceof ArrayBuffer},isString:function(t){return"string"==typeof t},isNumber:function(t){return"number"==typeof t},isObject:s,isUndefined:function(t){return void 0===t},isDate:function(t){return"[object Date]"===i.call(t)},isFile:function(t){return"[object File]"===i.call(t)},isBlob:function(t){return"[object Blob]"===i.call(t)},isFunction:c,isStream:function(t){return s(t)&&c(t.pipe)},isURLSearchParams:function(t){return"undefined"!=typeof URLSearchParams&&t instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:u,merge:function t(){var e={};function n(n,r){"object"==typeof e[r]&&"object"==typeof n?e[r]=t(e[r],n):e[r]=n}for(var r=0,o=arguments.length;r<o;r++)u(arguments[r],n);return e},deepMerge:function t(){var e={};function n(n,r){"object"==typeof e[r]&&"object"==typeof n?e[r]=t(e[r],n):e[r]="object"==typeof n?t({},n):n}for(var r=0,o=arguments.length;r<o;r++)u(arguments[r],n);return e},extend:function(t,e,n){return u(e,(function(e,o){t[o]=n&&"function"==typeof e?r(e,n):e})),t},trim:function(t){return t.replace(/^\s*/,"").replace(/\s*$/,"")}}},function(t,e,n){(function(r){function o(){var t;try{t=e.storage.debug}catch(t){}return!t&&void 0!==r&&"env"in r&&(t=r.env.DEBUG),t}(e=t.exports=n(57)).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},e.formatArgs=function(t){var n=this.useColors;if(t[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+t[0]+(n?"%c ":" ")+"+"+e.humanize(this.diff),n){var r="color: "+this.color;t.splice(1,0,r,"color: inherit");var o=0,i=0;t[0].replace(/%[a-zA-Z%]/g,(function(t){"%%"!==t&&(o++,"%c"===t&&(i=o))})),t.splice(i,0,r)}},e.save=function(t){try{null==t?e.storage.removeItem("debug"):e.storage.debug=t}catch(t){}},e.load=o,e.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},e.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(t){}}(),e.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],e.formatters.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}},e.enable(o())}).call(this,n(18))},function(t,e,n){function r(t){if(t)return function(t){for(var e in r.prototype)t[e]=r.prototype[e];return t}(t)}t.exports=r,r.prototype.on=r.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},r.prototype.once=function(t,e){function n(){this.off(t,n),e.apply(this,arguments)}return n.fn=e,this.on(t,n),this},r.prototype.off=r.prototype.removeListener=r.prototype.removeAllListeners=r.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,r=this._callbacks["$"+t];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(var o=0;o<r.length;o++)if((n=r[o])===e||n.fn===e){r.splice(o,1);break}return this},r.prototype.emit=function(t){this._callbacks=this._callbacks||{};var e=[].slice.call(arguments,1),n=this._callbacks["$"+t];if(n)for(var r=0,o=(n=n.slice(0)).length;r<o;++r)n[r].apply(this,e);return this},r.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},r.prototype.hasListeners=function(t){return!!this.listeners(t).length}},function(t,e,n){var r,o=n(66),i=n(29),a=n(67),s=n(68),c=n(69);"undefined"!=typeof ArrayBuffer&&(r=n(70));var u="undefined"!=typeof navigator&&/Android/i.test(navigator.userAgent),l="undefined"!=typeof navigator&&/PhantomJS/i.test(navigator.userAgent),p=u||l;e.protocol=3;var f=e.packets={open:0,close:1,ping:2,pong:3,message:4,upgrade:5,noop:6},h=o(f),d={type:"error",data:"parser error"},g=n(71);function y(t,e,n){for(var r=new Array(t.length),o=s(t.length,n),i=function(t,n,o){e(n,(function(e,n){r[t]=n,o(e,r)}))},a=0;a<t.length;a++)i(a,t[a],o)}e.encodePacket=function(t,n,r,o){"function"==typeof n&&(o=n,n=!1),"function"==typeof r&&(o=r,r=null);var i=void 0===t.data?void 0:t.data.buffer||t.data;if("undefined"!=typeof ArrayBuffer&&i instanceof ArrayBuffer)return function(t,n,r){if(!n)return e.encodeBase64Packet(t,r);var o=t.data,i=new Uint8Array(o),a=new Uint8Array(1+o.byteLength);a[0]=f[t.type];for(var s=0;s<i.length;s++)a[s+1]=i[s];return r(a.buffer)}(t,n,o);if(void 0!==g&&i instanceof g)return function(t,n,r){if(!n)return e.encodeBase64Packet(t,r);if(p)return function(t,n,r){if(!n)return e.encodeBase64Packet(t,r);var o=new FileReader;return o.onload=function(){e.encodePacket({type:t.type,data:o.result},n,!0,r)},o.readAsArrayBuffer(t.data)}(t,n,r);var o=new Uint8Array(1);return o[0]=f[t.type],r(new g([o.buffer,t.data]))}(t,n,o);if(i&&i.base64)return function(t,n){return n("b"+e.packets[t.type]+t.data.data)}(t,o);var a=f[t.type];return void 0!==t.data&&(a+=r?c.encode(String(t.data),{strict:!1}):String(t.data)),o(""+a)},e.encodeBase64Packet=function(t,n){var r,o="b"+e.packets[t.type];if(void 0!==g&&t.data instanceof g){var i=new FileReader;return i.onload=function(){var t=i.result.split(",")[1];n(o+t)},i.readAsDataURL(t.data)}try{r=String.fromCharCode.apply(null,new Uint8Array(t.data))}catch(e){for(var a=new Uint8Array(t.data),s=new Array(a.length),c=0;c<a.length;c++)s[c]=a[c];r=String.fromCharCode.apply(null,s)}return o+=btoa(r),n(o)},e.decodePacket=function(t,n,r){if(void 0===t)return d;if("string"==typeof t){if("b"===t.charAt(0))return e.decodeBase64Packet(t.substr(1),n);if(r&&!1===(t=function(t){try{t=c.decode(t,{strict:!1})}catch(t){return!1}return t}(t)))return d;var o=t.charAt(0);return Number(o)==o&&h[o]?t.length>1?{type:h[o],data:t.substring(1)}:{type:h[o]}:d}o=new Uint8Array(t)[0];var i=a(t,1);return g&&"blob"===n&&(i=new g([i])),{type:h[o],data:i}},e.decodeBase64Packet=function(t,e){var n=h[t.charAt(0)];if(!r)return{type:n,data:{base64:!0,data:t.substr(1)}};var o=r.decode(t.substr(1));return"blob"===e&&g&&(o=new g([o])),{type:n,data:o}},e.encodePayload=function(t,n,r){"function"==typeof n&&(r=n,n=null);var o=i(t);return n&&o?g&&!p?e.encodePayloadAsBlob(t,r):e.encodePayloadAsArrayBuffer(t,r):t.length?void y(t,(function(t,r){e.encodePacket(t,!!o&&n,!1,(function(t){r(null,function(t){return t.length+":"+t}(t))}))}),(function(t,e){return r(e.join(""))})):r("0:")},e.decodePayload=function(t,n,r){if("string"!=typeof t)return e.decodePayloadAsBinary(t,n,r);var o;if("function"==typeof n&&(r=n,n=null),""===t)return r(d,0,1);for(var i,a,s="",c=0,u=t.length;c<u;c++){var l=t.charAt(c);if(":"===l){if(""===s||s!=(i=Number(s)))return r(d,0,1);if(s!=(a=t.substr(c+1,i)).length)return r(d,0,1);if(a.length){if(o=e.decodePacket(a,n,!1),d.type===o.type&&d.data===o.data)return r(d,0,1);if(!1===r(o,c+i,u))return}c+=i,s=""}else s+=l}return""!==s?r(d,0,1):void 0},e.encodePayloadAsArrayBuffer=function(t,n){if(!t.length)return n(new ArrayBuffer(0));y(t,(function(t,n){e.encodePacket(t,!0,!0,(function(t){return n(null,t)}))}),(function(t,e){var r=e.reduce((function(t,e){var n;return t+(n="string"==typeof e?e.length:e.byteLength).toString().length+n+2}),0),o=new Uint8Array(r),i=0;return e.forEach((function(t){var e="string"==typeof t,n=t;if(e){for(var r=new Uint8Array(t.length),a=0;a<t.length;a++)r[a]=t.charCodeAt(a);n=r.buffer}o[i++]=e?0:1;var s=n.byteLength.toString();for(a=0;a<s.length;a++)o[i++]=parseInt(s[a]);for(o[i++]=255,r=new Uint8Array(n),a=0;a<r.length;a++)o[i++]=r[a]})),n(o.buffer)}))},e.encodePayloadAsBlob=function(t,n){y(t,(function(t,n){e.encodePacket(t,!0,!0,(function(t){var e=new Uint8Array(1);if(e[0]=1,"string"==typeof t){for(var r=new Uint8Array(t.length),o=0;o<t.length;o++)r[o]=t.charCodeAt(o);t=r.buffer,e[0]=0}var i=(t instanceof ArrayBuffer?t.byteLength:t.size).toString(),a=new Uint8Array(i.length+1);for(o=0;o<i.length;o++)a[o]=parseInt(i[o]);if(a[i.length]=255,g){var s=new g([e.buffer,a.buffer,t]);n(null,s)}}))}),(function(t,e){return n(new g(e))}))},e.decodePayloadAsBinary=function(t,n,r){"function"==typeof n&&(r=n,n=null);for(var o=t,i=[];o.byteLength>0;){for(var s=new Uint8Array(o),c=0===s[0],u="",l=1;255!==s[l];l++){if(u.length>310)return r(d,0,1);u+=s[l]}o=a(o,2+u.length),u=parseInt(u);var p=a(o,0,u);if(c)try{p=String.fromCharCode.apply(null,new Uint8Array(p))}catch(t){var f=new Uint8Array(p);for(p="",l=0;l<f.length;l++)p+=String.fromCharCode(f[l])}i.push(p),o=a(o,u)}var h=i.length;i.forEach((function(t,o){r(e.decodePacket(t,n,!0),o,h)}))}},function(t,e){t.exports=r},function(t,e){var n={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==n.call(t)}},function(t,e){e.encode=function(t){var e="";for(var n in t)t.hasOwnProperty(n)&&(e.length&&(e+="&"),e+=encodeURIComponent(n)+"="+encodeURIComponent(t[n]));return e},e.decode=function(t){for(var e={},n=t.split("&"),r=0,o=n.length;r<o;r++){var i=n[r].split("=");e[decodeURIComponent(i[0])]=decodeURIComponent(i[1])}return e}},function(t,e){t.exports=function(t,e){var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}},function(t,e,n){var r=n(1)("socket.io-parser"),o=n(2),i=n(59),a=n(5),s=n(24);function c(){}e.protocol=4,e.types=["CONNECT","DISCONNECT","EVENT","ACK","ERROR","BINARY_EVENT","BINARY_ACK"],e.CONNECT=0,e.DISCONNECT=1,e.EVENT=2,e.ACK=3,e.ERROR=4,e.BINARY_EVENT=5,e.BINARY_ACK=6,e.Encoder=c,e.Decoder=p;var u=e.ERROR+'"encode error"';function l(t){var n=""+t.type;if(e.BINARY_EVENT!==t.type&&e.BINARY_ACK!==t.type||(n+=t.attachments+"-"),t.nsp&&"/"!==t.nsp&&(n+=t.nsp+","),null!=t.id&&(n+=t.id),null!=t.data){var o=function(t){try{return JSON.stringify(t)}catch(t){return!1}}(t.data);if(!1===o)return u;n+=o}return r("encoded %j as %s",t,n),n}function p(){this.reconstructor=null}function f(t){this.reconPack=t,this.buffers=[]}function h(t){return{type:e.ERROR,data:"parser error: "+t}}c.prototype.encode=function(t,n){r("encoding packet %j",t),e.BINARY_EVENT===t.type||e.BINARY_ACK===t.type?function(t,e){i.removeBlobs(t,(function(t){var n=i.deconstructPacket(t),r=l(n.packet),o=n.buffers;o.unshift(r),e(o)}))}(t,n):n([l(t)])},o(p.prototype),p.prototype.add=function(t){var n;if("string"==typeof t)n=function(t){var n=0,o={type:Number(t.charAt(0))};if(null==e.types[o.type])return h("unknown packet type "+o.type);if(e.BINARY_EVENT===o.type||e.BINARY_ACK===o.type){for(var i="";"-"!==t.charAt(++n)&&(i+=t.charAt(n),n!=t.length););if(i!=Number(i)||"-"!==t.charAt(n))throw new Error("Illegal attachments");o.attachments=Number(i)}if("/"===t.charAt(n+1))for(o.nsp="";++n&&","!==(c=t.charAt(n))&&(o.nsp+=c,n!==t.length););else o.nsp="/";var s=t.charAt(n+1);if(""!==s&&Number(s)==s){for(o.id="";++n;){var c;if(null==(c=t.charAt(n))||Number(c)!=c){--n;break}if(o.id+=t.charAt(n),n===t.length)break}o.id=Number(o.id)}if(t.charAt(++n)){var u=function(t){try{return JSON.parse(t)}catch(t){return!1}}(t.substr(n));if(!1===u||o.type!==e.ERROR&&!a(u))return h("invalid payload");o.data=u}return r("decoded %s as %j",t,o),o}(t),e.BINARY_EVENT===n.type||e.BINARY_ACK===n.type?(this.reconstructor=new f(n),0===this.reconstructor.reconPack.attachments&&this.emit("decoded",n)):this.emit("decoded",n);else{if(!s(t)&&!t.base64)throw new Error("Unknown type: "+t);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");(n=this.reconstructor.takeBinaryData(t))&&(this.reconstructor=null,this.emit("decoded",n))}},p.prototype.destroy=function(){this.reconstructor&&this.reconstructor.finishedReconstruction()},f.prototype.takeBinaryData=function(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){var e=i.reconstructPacket(this.reconPack,this.buffers);return this.finishedReconstruction(),e}return null},f.prototype.finishedReconstruction=function(){this.reconPack=null,this.buffers=[]}},function(t,e,n){"use strict";(function(t){
/*!
 * The buffer module from node.js, for the browser.
 *
 * @author   Feross Aboukhadijeh <http://feross.org>
 * @license  MIT
 */
var r=n(60),o=n(61),i=n(5);function a(){return c.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(t,e){if(a()<e)throw new RangeError("Invalid typed array length");return c.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=c.prototype:(null===t&&(t=new c(e)),t.length=e),t}function c(t,e,n){if(!(c.TYPED_ARRAY_SUPPORT||this instanceof c))return new c(t,e,n);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return p(this,t)}return u(this,t,e,n)}function u(t,e,n,r){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,n,r){if(e.byteLength,n<0||e.byteLength<n)throw new RangeError("'offset' is out of bounds");if(e.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");return e=void 0===n&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,n):new Uint8Array(e,n,r),c.TYPED_ARRAY_SUPPORT?(t=e).__proto__=c.prototype:t=f(t,e),t}(t,e,n,r):"string"==typeof e?function(t,e,n){if("string"==typeof n&&""!==n||(n="utf8"),!c.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|d(e,n),o=(t=s(t,r)).write(e,n);return o!==r&&(t=t.slice(0,o)),t}(t,e,n):function(t,e){if(c.isBuffer(e)){var n=0|h(e.length);return 0===(t=s(t,n)).length||e.copy(t,0,0,n),t}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||(r=e.length)!=r?s(t,0):f(t,e);if("Buffer"===e.type&&i(e.data))return f(t,e.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function l(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function p(t,e){if(l(e),t=s(t,e<0?0:0|h(e)),!c.TYPED_ARRAY_SUPPORT)for(var n=0;n<e;++n)t[n]=0;return t}function f(t,e){var n=e.length<0?0:0|h(e.length);t=s(t,n);for(var r=0;r<n;r+=1)t[r]=255&e[r];return t}function h(t){if(t>=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|t}function d(t,e){if(c.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var n=t.length;if(0===n)return 0;for(var r=!1;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return K(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return U(t).length;default:if(r)return K(t).length;e=(""+e).toLowerCase(),r=!0}}function g(t,e,n){var r=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return S(this,e,n);case"utf8":case"utf-8":return E(this,e,n);case"ascii":return P(this,e,n);case"latin1":case"binary":return k(this,e,n);case"base64":return T(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function y(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function m(t,e,n,r,o){if(0===t.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=o?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(o)return-1;n=t.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof e&&(e=c.from(e,r)),c.isBuffer(e))return 0===e.length?-1:v(t,e,n,r,o);if("number"==typeof e)return e&=255,c.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):v(t,[e],n,r,o);throw new TypeError("val must be string, number or Buffer")}function v(t,e,n,r,o){var i,a=1,s=t.length,c=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;a=2,s/=2,c/=2,n/=2}function u(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(o){var l=-1;for(i=n;i<s;i++)if(u(t,i)===u(e,-1===l?0:i-l)){if(-1===l&&(l=i),i-l+1===c)return l*a}else-1!==l&&(i-=i-l),l=-1}else for(n+c>s&&(n=s-c),i=n;i>=0;i--){for(var p=!0,f=0;f<c;f++)if(u(t,i+f)!==u(e,f)){p=!1;break}if(p)return i}return-1}function _(t,e,n,r){n=Number(n)||0;var o=t.length-n;r?(r=Number(r))>o&&(r=o):r=o;var i=e.length;if(i%2!=0)throw new TypeError("Invalid hex string");r>i/2&&(r=i/2);for(var a=0;a<r;++a){var s=parseInt(e.substr(2*a,2),16);if(isNaN(s))return a;t[n+a]=s}return a}function b(t,e,n,r){return q(K(e,t.length-n),t,n,r)}function C(t,e,n,r){return q(function(t){for(var e=[],n=0;n<t.length;++n)e.push(255&t.charCodeAt(n));return e}(e),t,n,r)}function w(t,e,n,r){return C(t,e,n,r)}function A(t,e,n,r){return q(U(e),t,n,r)}function x(t,e,n,r){return q(function(t,e){for(var n,r,o,i=[],a=0;a<t.length&&!((e-=2)<0);++a)r=(n=t.charCodeAt(a))>>8,o=n%256,i.push(o),i.push(r);return i}(e,t.length-n),t,n,r)}function T(t,e,n){return 0===e&&n===t.length?r.fromByteArray(t):r.fromByteArray(t.slice(e,n))}function E(t,e,n){n=Math.min(t.length,n);for(var r=[],o=e;o<n;){var i,a,s,c,u=t[o],l=null,p=u>239?4:u>223?3:u>191?2:1;if(o+p<=n)switch(p){case 1:u<128&&(l=u);break;case 2:128==(192&(i=t[o+1]))&&(c=(31&u)<<6|63&i)>127&&(l=c);break;case 3:i=t[o+1],a=t[o+2],128==(192&i)&&128==(192&a)&&(c=(15&u)<<12|(63&i)<<6|63&a)>2047&&(c<55296||c>57343)&&(l=c);break;case 4:i=t[o+1],a=t[o+2],s=t[o+3],128==(192&i)&&128==(192&a)&&128==(192&s)&&(c=(15&u)<<18|(63&i)<<12|(63&a)<<6|63&s)>65535&&c<1114112&&(l=c)}null===l?(l=65533,p=1):l>65535&&(l-=65536,r.push(l>>>10&1023|55296),l=56320|1023&l),r.push(l),o+=p}return function(t){var e=t.length;if(e<=4096)return String.fromCharCode.apply(String,t);for(var n="",r=0;r<e;)n+=String.fromCharCode.apply(String,t.slice(r,r+=4096));return n}(r)}function P(t,e,n){var r="";n=Math.min(t.length,n);for(var o=e;o<n;++o)r+=String.fromCharCode(127&t[o]);return r}function k(t,e,n){var r="";n=Math.min(t.length,n);for(var o=e;o<n;++o)r+=String.fromCharCode(t[o]);return r}function S(t,e,n){var r=t.length;(!e||e<0)&&(e=0),(!n||n<0||n>r)&&(n=r);for(var o="",i=e;i<n;++i)o+=D(t[i]);return o}function O(t,e,n){for(var r=t.slice(e,n),o="",i=0;i<r.length;i+=2)o+=String.fromCharCode(r[i]+256*r[i+1]);return o}function B(t,e,n){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>n)throw new RangeError("Trying to access beyond buffer length")}function M(t,e,n,r,o,i){if(!c.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>o||e<i)throw new RangeError('"value" argument is out of bounds');if(n+r>t.length)throw new RangeError("Index out of range")}function j(t,e,n,r){e<0&&(e=65535+e+1);for(var o=0,i=Math.min(t.length-n,2);o<i;++o)t[n+o]=(e&255<<8*(r?o:1-o))>>>8*(r?o:1-o)}function R(t,e,n,r){e<0&&(e=4294967295+e+1);for(var o=0,i=Math.min(t.length-n,4);o<i;++o)t[n+o]=e>>>8*(r?o:3-o)&255}function I(t,e,n,r,o,i){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function L(t,e,n,r,i){return i||I(t,0,n,4),o.write(t,e,n,r,23,4),n+4}function N(t,e,n,r,i){return i||I(t,0,n,8),o.write(t,e,n,r,52,8),n+8}e.Buffer=c,e.SlowBuffer=function(t){return+t!=t&&(t=0),c.alloc(+t)},e.INSPECT_MAX_BYTES=50,c.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),e.kMaxLength=a(),c.poolSize=8192,c._augment=function(t){return t.__proto__=c.prototype,t},c.from=function(t,e,n){return u(null,t,e,n)},c.TYPED_ARRAY_SUPPORT&&(c.prototype.__proto__=Uint8Array.prototype,c.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&c[Symbol.species]===c&&Object.defineProperty(c,Symbol.species,{value:null,configurable:!0})),c.alloc=function(t,e,n){return function(t,e,n,r){return l(e),e<=0?s(t,e):void 0!==n?"string"==typeof r?s(t,e).fill(n,r):s(t,e).fill(n):s(t,e)}(null,t,e,n)},c.allocUnsafe=function(t){return p(null,t)},c.allocUnsafeSlow=function(t){return p(null,t)},c.isBuffer=function(t){return!(null==t||!t._isBuffer)},c.compare=function(t,e){if(!c.isBuffer(t)||!c.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var n=t.length,r=e.length,o=0,i=Math.min(n,r);o<i;++o)if(t[o]!==e[o]){n=t[o],r=e[o];break}return n<r?-1:r<n?1:0},c.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(t,e){if(!i(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return c.alloc(0);var n;if(void 0===e)for(e=0,n=0;n<t.length;++n)e+=t[n].length;var r=c.allocUnsafe(e),o=0;for(n=0;n<t.length;++n){var a=t[n];if(!c.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(r,o),o+=a.length}return r},c.byteLength=d,c.prototype._isBuffer=!0,c.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)y(this,e,e+1);return this},c.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)y(this,e,e+3),y(this,e+1,e+2);return this},c.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)y(this,e,e+7),y(this,e+1,e+6),y(this,e+2,e+5),y(this,e+3,e+4);return this},c.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?E(this,0,t):g.apply(this,arguments)},c.prototype.equals=function(t){if(!c.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===c.compare(this,t)},c.prototype.inspect=function(){var t="",n=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(t+=" ... ")),"<Buffer "+t+">"},c.prototype.compare=function(t,e,n,r,o){if(!c.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),e<0||n>t.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&e>=n)return 0;if(r>=o)return-1;if(e>=n)return 1;if(this===t)return 0;for(var i=(o>>>=0)-(r>>>=0),a=(n>>>=0)-(e>>>=0),s=Math.min(i,a),u=this.slice(r,o),l=t.slice(e,n),p=0;p<s;++p)if(u[p]!==l[p]){i=u[p],a=l[p];break}return i<a?-1:a<i?1:0},c.prototype.includes=function(t,e,n){return-1!==this.indexOf(t,e,n)},c.prototype.indexOf=function(t,e,n){return m(this,t,e,n,!0)},c.prototype.lastIndexOf=function(t,e,n){return m(this,t,e,n,!1)},c.prototype.write=function(t,e,n,r){if(void 0===e)r="utf8",n=this.length,e=0;else if(void 0===n&&"string"==typeof e)r=e,n=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var o=this.length-e;if((void 0===n||n>o)&&(n=o),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var i=!1;;)switch(r){case"hex":return _(this,t,e,n);case"utf8":case"utf-8":return b(this,t,e,n);case"ascii":return C(this,t,e,n);case"latin1":case"binary":return w(this,t,e,n);case"base64":return A(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,t,e,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},c.prototype.slice=function(t,e){var n,r=this.length;if((t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t),c.TYPED_ARRAY_SUPPORT)(n=this.subarray(t,e)).__proto__=c.prototype;else{var o=e-t;n=new c(o,void 0);for(var i=0;i<o;++i)n[i]=this[i+t]}return n},c.prototype.readUIntLE=function(t,e,n){t|=0,e|=0,n||B(t,e,this.length);for(var r=this[t],o=1,i=0;++i<e&&(o*=256);)r+=this[t+i]*o;return r},c.prototype.readUIntBE=function(t,e,n){t|=0,e|=0,n||B(t,e,this.length);for(var r=this[t+--e],o=1;e>0&&(o*=256);)r+=this[t+--e]*o;return r},c.prototype.readUInt8=function(t,e){return e||B(t,1,this.length),this[t]},c.prototype.readUInt16LE=function(t,e){return e||B(t,2,this.length),this[t]|this[t+1]<<8},c.prototype.readUInt16BE=function(t,e){return e||B(t,2,this.length),this[t]<<8|this[t+1]},c.prototype.readUInt32LE=function(t,e){return e||B(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},c.prototype.readUInt32BE=function(t,e){return e||B(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},c.prototype.readIntLE=function(t,e,n){t|=0,e|=0,n||B(t,e,this.length);for(var r=this[t],o=1,i=0;++i<e&&(o*=256);)r+=this[t+i]*o;return r>=(o*=128)&&(r-=Math.pow(2,8*e)),r},c.prototype.readIntBE=function(t,e,n){t|=0,e|=0,n||B(t,e,this.length);for(var r=e,o=1,i=this[t+--r];r>0&&(o*=256);)i+=this[t+--r]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*e)),i},c.prototype.readInt8=function(t,e){return e||B(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},c.prototype.readInt16LE=function(t,e){e||B(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt16BE=function(t,e){e||B(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt32LE=function(t,e){return e||B(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},c.prototype.readInt32BE=function(t,e){return e||B(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},c.prototype.readFloatLE=function(t,e){return e||B(t,4,this.length),o.read(this,t,!0,23,4)},c.prototype.readFloatBE=function(t,e){return e||B(t,4,this.length),o.read(this,t,!1,23,4)},c.prototype.readDoubleLE=function(t,e){return e||B(t,8,this.length),o.read(this,t,!0,52,8)},c.prototype.readDoubleBE=function(t,e){return e||B(t,8,this.length),o.read(this,t,!1,52,8)},c.prototype.writeUIntLE=function(t,e,n,r){t=+t,e|=0,n|=0,r||M(this,t,e,n,Math.pow(2,8*n)-1,0);var o=1,i=0;for(this[e]=255&t;++i<n&&(o*=256);)this[e+i]=t/o&255;return e+n},c.prototype.writeUIntBE=function(t,e,n,r){t=+t,e|=0,n|=0,r||M(this,t,e,n,Math.pow(2,8*n)-1,0);var o=n-1,i=1;for(this[e+o]=255&t;--o>=0&&(i*=256);)this[e+o]=t/i&255;return e+n},c.prototype.writeUInt8=function(t,e,n){return t=+t,e|=0,n||M(this,t,e,1,255,0),c.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},c.prototype.writeUInt16LE=function(t,e,n){return t=+t,e|=0,n||M(this,t,e,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):j(this,t,e,!0),e+2},c.prototype.writeUInt16BE=function(t,e,n){return t=+t,e|=0,n||M(this,t,e,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):j(this,t,e,!1),e+2},c.prototype.writeUInt32LE=function(t,e,n){return t=+t,e|=0,n||M(this,t,e,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):R(this,t,e,!0),e+4},c.prototype.writeUInt32BE=function(t,e,n){return t=+t,e|=0,n||M(this,t,e,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):R(this,t,e,!1),e+4},c.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e|=0,!r){var o=Math.pow(2,8*n-1);M(this,t,e,n,o-1,-o)}var i=0,a=1,s=0;for(this[e]=255&t;++i<n&&(a*=256);)t<0&&0===s&&0!==this[e+i-1]&&(s=1),this[e+i]=(t/a>>0)-s&255;return e+n},c.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e|=0,!r){var o=Math.pow(2,8*n-1);M(this,t,e,n,o-1,-o)}var i=n-1,a=1,s=0;for(this[e+i]=255&t;--i>=0&&(a*=256);)t<0&&0===s&&0!==this[e+i+1]&&(s=1),this[e+i]=(t/a>>0)-s&255;return e+n},c.prototype.writeInt8=function(t,e,n){return t=+t,e|=0,n||M(this,t,e,1,127,-128),c.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},c.prototype.writeInt16LE=function(t,e,n){return t=+t,e|=0,n||M(this,t,e,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):j(this,t,e,!0),e+2},c.prototype.writeInt16BE=function(t,e,n){return t=+t,e|=0,n||M(this,t,e,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):j(this,t,e,!1),e+2},c.prototype.writeInt32LE=function(t,e,n){return t=+t,e|=0,n||M(this,t,e,4,2147483647,-2147483648),c.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):R(this,t,e,!0),e+4},c.prototype.writeInt32BE=function(t,e,n){return t=+t,e|=0,n||M(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),c.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):R(this,t,e,!1),e+4},c.prototype.writeFloatLE=function(t,e,n){return L(this,t,e,!0,n)},c.prototype.writeFloatBE=function(t,e,n){return L(this,t,e,!1,n)},c.prototype.writeDoubleLE=function(t,e,n){return N(this,t,e,!0,n)},c.prototype.writeDoubleBE=function(t,e,n){return N(this,t,e,!1,n)},c.prototype.copy=function(t,e,n,r){if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e<r-n&&(r=t.length-e+n);var o,i=r-n;if(this===t&&n<e&&e<r)for(o=i-1;o>=0;--o)t[o+e]=this[o+n];else if(i<1e3||!c.TYPED_ARRAY_SUPPORT)for(o=0;o<i;++o)t[o+e]=this[o+n];else Uint8Array.prototype.set.call(t,this.subarray(n,n+i),e);return i},c.prototype.fill=function(t,e,n,r){if("string"==typeof t){if("string"==typeof e?(r=e,e=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===t.length){var o=t.charCodeAt(0);o<256&&(t=o)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!c.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;var i;if(e>>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(i=e;i<n;++i)this[i]=t;else{var a=c.isBuffer(t)?t:K(new c(t,r).toString()),s=a.length;for(i=0;i<n-e;++i)this[i+e]=a[i%s]}return this};var F=/[^+\/0-9A-Za-z-_]/g;function D(t){return t<16?"0"+t.toString(16):t.toString(16)}function K(t,e){var n;e=e||1/0;for(var r=t.length,o=null,i=[],a=0;a<r;++a){if((n=t.charCodeAt(a))>55295&&n<57344){if(!o){if(n>56319){(e-=3)>-1&&i.push(239,191,189);continue}if(a+1===r){(e-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(e-=3)>-1&&i.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(e-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((e-=1)<0)break;i.push(n)}else if(n<2048){if((e-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function U(t){return r.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(F,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function q(t,e,n,r){for(var o=0;o<r&&!(o+n>=e.length||o>=t.length);++o)e[o+n]=t[o];return o}}).call(this,n(25))},function(t,e,n){var r=n(64);t.exports=function(t){var e=t.xdomain,n=t.xscheme,o=t.enablesXDR;try{if("undefined"!=typeof XMLHttpRequest&&(!e||r))return new XMLHttpRequest}catch(t){}try{if("undefined"!=typeof XDomainRequest&&!n&&o)return new XDomainRequest}catch(t){}if(!e)try{return new(self[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(t){}}},function(t,e,n){var r=n(3),o=n(2);function i(t){this.path=t.path,this.hostname=t.hostname,this.port=t.port,this.secure=t.secure,this.query=t.query,this.timestampParam=t.timestampParam,this.timestampRequests=t.timestampRequests,this.readyState="",this.agent=t.agent||!1,this.socket=t.socket,this.enablesXDR=t.enablesXDR,this.withCredentials=t.withCredentials,this.pfx=t.pfx,this.key=t.key,this.passphrase=t.passphrase,this.cert=t.cert,this.ca=t.ca,this.ciphers=t.ciphers,this.rejectUnauthorized=t.rejectUnauthorized,this.forceNode=t.forceNode,this.isReactNative=t.isReactNative,this.extraHeaders=t.extraHeaders,this.localAddress=t.localAddress}t.exports=i,o(i.prototype),i.prototype.onError=function(t,e){var n=new Error(t);return n.type="TransportError",n.description=e,this.emit("error",n),this},i.prototype.open=function(){return"closed"!==this.readyState&&""!==this.readyState||(this.readyState="opening",this.doOpen()),this},i.prototype.close=function(){return"opening"!==this.readyState&&"open"!==this.readyState||(this.doClose(),this.onClose()),this},i.prototype.send=function(t){if("open"!==this.readyState)throw new Error("Transport not open");this.write(t)},i.prototype.onOpen=function(){this.readyState="open",this.writable=!0,this.emit("open")},i.prototype.onData=function(t){var e=r.decodePacket(t,this.socket.binaryType);this.onPacket(e)},i.prototype.onPacket=function(t){this.emit("packet",t)},i.prototype.onClose=function(){this.readyState="closed",this.emit("close")}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getDomainFromUrl=e.Utils=void 0;var r=function(){function t(){}return t.isEmptyObject=function(t){return 0===Object.keys(t).length&&t.constructor===Object},t}();e.Utils=r,e.getDomainFromUrl=function(t){return t.replace(/^(.*\/\/[^\/?#]*).*$/,"$1")}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PushNotifications=e.isAPINotificationResponse=void 0;var r=n(36),o=n(54),i=n(4),a=n(12);function s(t){return"KalturaPushNotificationData"===t.objectType}e.isAPINotificationResponse=s;var c=i.getContribLogger({module:"contrib-push-notifications",class:"PushNotifications"}),u=function(){function t(t){this._socketPool={},this._clientApi=new r.ClientApi(t),this._onPlayerReset(t)}return t.prototype._onPlayerReset=function(t){var e=this;t.kalturaPlayer.addEventListener(t.kalturaPlayer.Event.PLAYER_RESET,(function(){e.reset()}))},t.prototype.reset=function(){for(var t in this._socketPool)this._socketPool[t].destroy();this._socketPool={}},t.prototype.registerNotifications=function(t){var e=this,n=t.prepareRegisterRequestConfigs.map((function(t){return e._prepareRegisterRequest(t)}));return this._clientApi.doMultiRegisterRequest(n).then((function(n){var r=n.map((function(n,r){return e._processResult(t.prepareRegisterRequestConfigs[r],n,t.onSocketDisconnect,t.onSocketReconnect)}));return Promise.all(r).then((function(){}))}))},t.prototype._prepareRegisterRequest=function(t){var e={service:"eventnotification_eventnotificationtemplate",action:"register",notificationTemplateSystemName:t.eventName,pushNotificationParams:{objectType:"KalturaPushNotificationParams",userParams:{}}},n=0;for(var r in t.eventParams)e.pushNotificationParams.userParams["item"+n]={objectType:"KalturaPushNotificationParams",key:r,value:{objectType:"KalturaStringValue",value:t.eventParams[r]},sQueueKeyParam:1},n++;return e},t.prototype._processResult=function(t,e,n,i){if(r.isAPIErrorResponse(e))return c.error("Error fetching registration info from service "+t.eventName,{method:"_processResult",data:{errorMessage:e.message,errorCode:e.code}}),Promise.reject(new Error(e.message));if(!s(e))return Promise.reject(new Error("invalid response structure"));var u=a.getDomainFromUrl(e.url),l=this._socketPool[u];return l||(l=new o.SocketWrapper({key:u,url:e.url,onSocketDisconnect:n,onSocketReconnect:i}),this._socketPool[u]=l),l.prepareForListening(t.eventName,e.queueName,e.queueKey,t.onMessage),Promise.resolve()},t}();e.PushNotifications=u},function(t,e,n){"use strict";t.exports=function(t,e){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return t.apply(e,n)}}},function(t,e,n){"use strict";var r=n(0);function o(t){return encodeURIComponent(t).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}t.exports=function(t,e,n){if(!e)return t;var i;if(n)i=n(e);else if(r.isURLSearchParams(e))i=e.toString();else{var a=[];r.forEach(e,(function(t,e){null!=t&&(r.isArray(t)?e+="[]":t=[t],r.forEach(t,(function(t){r.isDate(t)?t=t.toISOString():r.isObject(t)&&(t=JSON.stringify(t)),a.push(o(e)+"="+o(t))})))})),i=a.join("&")}if(i){var s=t.indexOf("#");-1!==s&&(t=t.slice(0,s)),t+=(-1===t.indexOf("?")?"?":"&")+i}return t}},function(t,e,n){"use strict";t.exports=function(t){return!(!t||!t.__CANCEL__)}},function(t,e,n){"use strict";(function(e){var r=n(0),o=n(44),i={"Content-Type":"application/x-www-form-urlencoded"};function a(t,e){!r.isUndefined(t)&&r.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}var s,c={adapter:((void 0!==e&&"[object process]"===Object.prototype.toString.call(e)||"undefined"!=typeof XMLHttpRequest)&&(s=n(19)),s),transformRequest:[function(t,e){return o(e,"Accept"),o(e,"Content-Type"),r.isFormData(t)||r.isArrayBuffer(t)||r.isBuffer(t)||r.isStream(t)||r.isFile(t)||r.isBlob(t)?t:r.isArrayBufferView(t)?t.buffer:r.isURLSearchParams(t)?(a(e,"application/x-www-form-urlencoded;charset=utf-8"),t.toString()):r.isObject(t)?(a(e,"application/json;charset=utf-8"),JSON.stringify(t)):t}],transformResponse:[function(t){if("string"==typeof t)try{t=JSON.parse(t)}catch(t){}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};r.forEach(["delete","get","head"],(function(t){c.headers[t]={}})),r.forEach(["post","put","patch"],(function(t){c.headers[t]=r.merge(i)})),t.exports=c}).call(this,n(18))},function(t,e){var n,r,o=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(t){if(n===setTimeout)return setTimeout(t,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(t){n=i}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(t){r=a}}();var c,u=[],l=!1,p=-1;function f(){l&&c&&(l=!1,c.length?u=c.concat(u):p=-1,u.length&&h())}function h(){if(!l){var t=s(f);l=!0;for(var e=u.length;e;){for(c=u,u=[];++p<e;)c&&c[p].run();p=-1,e=u.length}c=null,l=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function d(t,e){this.fun=t,this.array=e}function g(){}o.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];u.push(new d(t,e)),1!==u.length||l||s(h)},d.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=g,o.addListener=g,o.once=g,o.off=g,o.removeListener=g,o.removeAllListeners=g,o.emit=g,o.prependListener=g,o.prependOnceListener=g,o.listeners=function(t){return[]},o.binding=function(t){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(t){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(t,e,n){"use strict";var r=n(0),o=n(45),i=n(15),a=n(47),s=n(48),c=n(20);t.exports=function(t){return new Promise((function(e,u){var l=t.data,p=t.headers;r.isFormData(l)&&delete p["Content-Type"];var f=new XMLHttpRequest;if(t.auth){var h=t.auth.username||"",d=t.auth.password||"";p.Authorization="Basic "+btoa(h+":"+d)}if(f.open(t.method.toUpperCase(),i(t.url,t.params,t.paramsSerializer),!0),f.timeout=t.timeout,f.onreadystatechange=function(){if(f&&4===f.readyState&&(0!==f.status||f.responseURL&&0===f.responseURL.indexOf("file:"))){var n="getAllResponseHeaders"in f?a(f.getAllResponseHeaders()):null,r={data:t.responseType&&"text"!==t.responseType?f.response:f.responseText,status:f.status,statusText:f.statusText,headers:n,config:t,request:f};o(e,u,r),f=null}},f.onabort=function(){f&&(u(c("Request aborted",t,"ECONNABORTED",f)),f=null)},f.onerror=function(){u(c("Network Error",t,null,f)),f=null},f.ontimeout=function(){u(c("timeout of "+t.timeout+"ms exceeded",t,"ECONNABORTED",f)),f=null},r.isStandardBrowserEnv()){var g=n(49),y=(t.withCredentials||s(t.url))&&t.xsrfCookieName?g.read(t.xsrfCookieName):void 0;y&&(p[t.xsrfHeaderName]=y)}if("setRequestHeader"in f&&r.forEach(p,(function(t,e){void 0===l&&"content-type"===e.toLowerCase()?delete p[e]:f.setRequestHeader(e,t)})),t.withCredentials&&(f.withCredentials=!0),t.responseType)try{f.responseType=t.responseType}catch(e){if("json"!==t.responseType)throw e}"function"==typeof t.onDownloadProgress&&f.addEventListener("progress",t.onDownloadProgress),"function"==typeof t.onUploadProgress&&f.upload&&f.upload.addEventListener("progress",t.onUploadProgress),t.cancelToken&&t.cancelToken.promise.then((function(t){f&&(f.abort(),u(t),f=null)})),void 0===l&&(l=null),f.send(l)}))}},function(t,e,n){"use strict";var r=n(46);t.exports=function(t,e,n,o,i){var a=new Error(t);return r(a,e,n,o,i)}},function(t,e,n){"use strict";var r=n(0);t.exports=function(t,e){e=e||{};var n={};return r.forEach(["url","method","params","data"],(function(t){void 0!==e[t]&&(n[t]=e[t])})),r.forEach(["headers","auth","proxy"],(function(o){r.isObject(e[o])?n[o]=r.deepMerge(t[o],e[o]):void 0!==e[o]?n[o]=e[o]:r.isObject(t[o])?n[o]=r.deepMerge(t[o]):void 0!==t[o]&&(n[o]=t[o])})),r.forEach(["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","maxContentLength","validateStatus","maxRedirects","httpAgent","httpsAgent","cancelToken","socketPath"],(function(r){void 0!==e[r]?n[r]=e[r]:void 0!==t[r]&&(n[r]=t[r])})),n}},function(t,e,n){"use strict";function r(t){this.message=t}r.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},r.prototype.__CANCEL__=!0,t.exports=r},function(t,e){var n=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,r=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];t.exports=function(t){var e=t,o=t.indexOf("["),i=t.indexOf("]");-1!=o&&-1!=i&&(t=t.substring(0,o)+t.substring(o,i).replace(/:/g,";")+t.substring(i,t.length));for(var a=n.exec(t||""),s={},c=14;c--;)s[r[c]]=a[c]||"";return-1!=o&&-1!=i&&(s.source=e,s.host=s.host.substring(1,s.host.length-1).replace(/;/g,":"),s.authority=s.authority.replace("[","").replace("]","").replace(/;/g,":"),s.ipv6uri=!0),s}},function(t,e,n){(function(e){t.exports=function(t){return n&&e.isBuffer(t)||r&&(t instanceof ArrayBuffer||function(t){return"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer}(t))};var n="function"==typeof e&&"function"==typeof e.isBuffer,r="function"==typeof ArrayBuffer}).call(this,n(9).Buffer)},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){var r=n(62),o=n(32),i=n(2),a=n(8),s=n(33),c=n(34),u=n(1)("socket.io-client:manager"),l=n(31),p=n(76),f=Object.prototype.hasOwnProperty;function h(t,e){if(!(this instanceof h))return new h(t,e);t&&"object"==typeof t&&(e=t,t=void 0),(e=e||{}).path=e.path||"/socket.io",this.nsps={},this.subs=[],this.opts=e,this.reconnection(!1!==e.reconnection),this.reconnectionAttempts(e.reconnectionAttempts||1/0),this.reconnectionDelay(e.reconnectionDelay||1e3),this.reconnectionDelayMax(e.reconnectionDelayMax||5e3),this.randomizationFactor(e.randomizationFactor||.5),this.backoff=new p({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==e.timeout?2e4:e.timeout),this.readyState="closed",this.uri=t,this.connecting=[],this.lastPing=null,this.encoding=!1,this.packetBuffer=[];var n=e.parser||a;this.encoder=new n.Encoder,this.decoder=new n.Decoder,this.autoConnect=!1!==e.autoConnect,this.autoConnect&&this.open()}t.exports=h,h.prototype.emitAll=function(){for(var t in this.emit.apply(this,arguments),this.nsps)f.call(this.nsps,t)&&this.nsps[t].emit.apply(this.nsps[t],arguments)},h.prototype.updateSocketIds=function(){for(var t in this.nsps)f.call(this.nsps,t)&&(this.nsps[t].id=this.generateId(t))},h.prototype.generateId=function(t){return("/"===t?"":t+"#")+this.engine.id},i(h.prototype),h.prototype.reconnection=function(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection},h.prototype.reconnectionAttempts=function(t){return arguments.length?(this._reconnectionAttempts=t,this):this._reconnectionAttempts},h.prototype.reconnectionDelay=function(t){return arguments.length?(this._reconnectionDelay=t,this.backoff&&this.backoff.setMin(t),this):this._reconnectionDelay},h.prototype.randomizationFactor=function(t){return arguments.length?(this._randomizationFactor=t,this.backoff&&this.backoff.setJitter(t),this):this._randomizationFactor},h.prototype.reconnectionDelayMax=function(t){return arguments.length?(this._reconnectionDelayMax=t,this.backoff&&this.backoff.setMax(t),this):this._reconnectionDelayMax},h.prototype.timeout=function(t){return arguments.length?(this._timeout=t,this):this._timeout},h.prototype.maybeReconnectOnOpen=function(){!this.reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()},h.prototype.open=h.prototype.connect=function(t,e){if(u("readyState %s",this.readyState),~this.readyState.indexOf("open"))return this;u("opening %s",this.uri),this.engine=r(this.uri,this.opts);var n=this.engine,o=this;this.readyState="opening",this.skipReconnect=!1;var i=s(n,"open",(function(){o.onopen(),t&&t()})),a=s(n,"error",(function(e){if(u("connect_error"),o.cleanup(),o.readyState="closed",o.emitAll("connect_error",e),t){var n=new Error("Connection error");n.data=e,t(n)}else o.maybeReconnectOnOpen()}));if(!1!==this._timeout){var c=this._timeout;u("connect attempt will timeout after %d",c);var l=setTimeout((function(){u("connect attempt timed out after %d",c),i.destroy(),n.close(),n.emit("error","timeout"),o.emitAll("connect_timeout",c)}),c);this.subs.push({destroy:function(){clearTimeout(l)}})}return this.subs.push(i),this.subs.push(a),this},h.prototype.onopen=function(){u("open"),this.cleanup(),this.readyState="open",this.emit("open");var t=this.engine;this.subs.push(s(t,"data",c(this,"ondata"))),this.subs.push(s(t,"ping",c(this,"onping"))),this.subs.push(s(t,"pong",c(this,"onpong"))),this.subs.push(s(t,"error",c(this,"onerror"))),this.subs.push(s(t,"close",c(this,"onclose"))),this.subs.push(s(this.decoder,"decoded",c(this,"ondecoded")))},h.prototype.onping=function(){this.lastPing=new Date,this.emitAll("ping")},h.prototype.onpong=function(){this.emitAll("pong",new Date-this.lastPing)},h.prototype.ondata=function(t){this.decoder.add(t)},h.prototype.ondecoded=function(t){this.emit("packet",t)},h.prototype.onerror=function(t){u("error",t),this.emitAll("error",t)},h.prototype.socket=function(t,e){var n=this.nsps[t];if(!n){n=new o(this,t,e),this.nsps[t]=n;var r=this;n.on("connecting",i),n.on("connect",(function(){n.id=r.generateId(t)})),this.autoConnect&&i()}function i(){~l(r.connecting,n)||r.connecting.push(n)}return n},h.prototype.destroy=function(t){var e=l(this.connecting,t);~e&&this.connecting.splice(e,1),this.connecting.length||this.close()},h.prototype.packet=function(t){u("writing packet %j",t);var e=this;t.query&&0===t.type&&(t.nsp+="?"+t.query),e.encoding?e.packetBuffer.push(t):(e.encoding=!0,this.encoder.encode(t,(function(n){for(var r=0;r<n.length;r++)e.engine.write(n[r],t.options);e.encoding=!1,e.processPacketQueue()})))},h.prototype.processPacketQueue=function(){if(this.packetBuffer.length>0&&!this.encoding){var t=this.packetBuffer.shift();this.packet(t)}},h.prototype.cleanup=function(){u("cleanup");for(var t=this.subs.length,e=0;e<t;e++)this.subs.shift().destroy();this.packetBuffer=[],this.encoding=!1,this.lastPing=null,this.decoder.destroy()},h.prototype.close=h.prototype.disconnect=function(){u("disconnect"),this.skipReconnect=!0,this.reconnecting=!1,"opening"===this.readyState&&this.cleanup(),this.backoff.reset(),this.readyState="closed",this.engine&&this.engine.close()},h.prototype.onclose=function(t){u("onclose"),this.cleanup(),this.backoff.reset(),this.readyState="closed",this.emit("close",t),this._reconnection&&!this.skipReconnect&&this.reconnect()},h.prototype.reconnect=function(){if(this.reconnecting||this.skipReconnect)return this;var t=this;if(this.backoff.attempts>=this._reconnectionAttempts)u("reconnect failed"),this.backoff.reset(),this.emitAll("reconnect_failed"),this.reconnecting=!1;else{var e=this.backoff.duration();u("will wait %dms before reconnect attempt",e),this.reconnecting=!0;var n=setTimeout((function(){t.skipReconnect||(u("attempting reconnect"),t.emitAll("reconnect_attempt",t.backoff.attempts),t.emitAll("reconnecting",t.backoff.attempts),t.skipReconnect||t.open((function(e){e?(u("reconnect attempt error"),t.reconnecting=!1,t.reconnect(),t.emitAll("reconnect_error",e.data)):(u("reconnect success"),t.onreconnect())})))}),e);this.subs.push({destroy:function(){clearTimeout(n)}})}},h.prototype.onreconnect=function(){var t=this.backoff.attempts;this.reconnecting=!1,this.backoff.reset(),this.updateSocketIds(),this.emitAll("reconnect",t)}},function(t,e,n){var r=n(10),o=n(65),i=n(72),a=n(73);e.polling=function(t){var e=!1,n=!1,a=!1!==t.jsonp;if("undefined"!=typeof location){var s="https:"===location.protocol,c=location.port;c||(c=s?443:80),e=t.hostname!==location.hostname||c!==t.port,n=t.secure!==s}if(t.xdomain=e,t.xscheme=n,"open"in new r(t)&&!t.forceJSONP)return new o(t);if(!a)throw new Error("JSONP disabled");return new i(t)},e.websocket=a},function(t,e,n){var r=n(11),o=n(6),i=n(3),a=n(7),s=n(30),c=n(1)("engine.io-client:polling");t.exports=l;var u=null!=new(n(10))({xdomain:!1}).responseType;function l(t){var e=t&&t.forceBase64;u&&!e||(this.supportsBinary=!1),r.call(this,t)}a(l,r),l.prototype.name="polling",l.prototype.doOpen=function(){this.poll()},l.prototype.pause=function(t){var e=this;function n(){c("paused"),e.readyState="paused",t()}if(this.readyState="pausing",this.polling||!this.writable){var r=0;this.polling&&(c("we are currently polling - waiting to pause"),r++,this.once("pollComplete",(function(){c("pre-pause polling complete"),--r||n()}))),this.writable||(c("we are currently writing - waiting to pause"),r++,this.once("drain",(function(){c("pre-pause writing complete"),--r||n()})))}else n()},l.prototype.poll=function(){c("polling"),this.polling=!0,this.doPoll(),this.emit("poll")},l.prototype.onData=function(t){var e=this;c("polling got data %s",t),i.decodePayload(t,this.socket.binaryType,(function(t,n,r){if("opening"===e.readyState&&e.onOpen(),"close"===t.type)return e.onClose(),!1;e.onPacket(t)})),"closed"!==this.readyState&&(this.polling=!1,this.emit("pollComplete"),"open"===this.readyState?this.poll():c('ignoring poll - transport state "%s"',this.readyState))},l.prototype.doClose=function(){var t=this;function e(){c("writing close packet"),t.write([{type:"close"}])}"open"===this.readyState?(c("transport open - closing"),e()):(c("transport not open - deferring close"),this.once("open",e))},l.prototype.write=function(t){var e=this;this.writable=!1;var n=function(){e.writable=!0,e.emit("drain")};i.encodePayload(t,this.supportsBinary,(function(t){e.doWrite(t,n)}))},l.prototype.uri=function(){var t=this.query||{},e=this.secure?"https":"http",n="";return!1!==this.timestampRequests&&(t[this.timestampParam]=s()),this.supportsBinary||t.sid||(t.b64=1),t=o.encode(t),this.port&&("https"===e&&443!==Number(this.port)||"http"===e&&80!==Number(this.port))&&(n=":"+this.port),t.length&&(t="?"+t),e+"://"+(-1!==this.hostname.indexOf(":")?"["+this.hostname+"]":this.hostname)+n+this.path+t}},function(t,e,n){(function(e){var r=n(5),o=Object.prototype.toString,i="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===o.call(Blob),a="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===o.call(File);t.exports=function t(n){if(!n||"object"!=typeof n)return!1;if(r(n)){for(var o=0,s=n.length;o<s;o++)if(t(n[o]))return!0;return!1}if("function"==typeof e&&e.isBuffer&&e.isBuffer(n)||"function"==typeof ArrayBuffer&&n instanceof ArrayBuffer||i&&n instanceof Blob||a&&n instanceof File)return!0;if(n.toJSON&&"function"==typeof n.toJSON&&1===arguments.length)return t(n.toJSON(),!0);for(var c in n)if(Object.prototype.hasOwnProperty.call(n,c)&&t(n[c]))return!0;return!1}}).call(this,n(9).Buffer)},function(t,e,n){"use strict";var r,o="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),i={},a=0,s=0;function c(t){var e="";do{e=o[t%64]+e,t=Math.floor(t/64)}while(t>0);return e}function u(){var t=c(+new Date);return t!==r?(a=0,r=t):t+"."+c(a++)}for(;s<64;s++)i[o[s]]=s;u.encode=c,u.decode=function(t){var e=0;for(s=0;s<t.length;s++)e=64*e+i[t.charAt(s)];return e},t.exports=u},function(t,e){var n=[].indexOf;t.exports=function(t,e){if(n)return t.indexOf(e);for(var r=0;r<t.length;++r)if(t[r]===e)return r;return-1}},function(t,e,n){var r=n(8),o=n(2),i=n(75),a=n(33),s=n(34),c=n(1)("socket.io-client:socket"),u=n(6),l=n(29);t.exports=h;var p={connect:1,connect_error:1,connect_timeout:1,connecting:1,disconnect:1,error:1,reconnect:1,reconnect_attempt:1,reconnect_failed:1,reconnect_error:1,reconnecting:1,ping:1,pong:1},f=o.prototype.emit;function h(t,e,n){this.io=t,this.nsp=e,this.json=this,this.ids=0,this.acks={},this.receiveBuffer=[],this.sendBuffer=[],this.connected=!1,this.disconnected=!0,this.flags={},n&&n.query&&(this.query=n.query),this.io.autoConnect&&this.open()}o(h.prototype),h.prototype.subEvents=function(){if(!this.subs){var t=this.io;this.subs=[a(t,"open",s(this,"onopen")),a(t,"packet",s(this,"onpacket")),a(t,"close",s(this,"onclose"))]}},h.prototype.open=h.prototype.connect=function(){return this.connected||(this.subEvents(),this.io.open(),"open"===this.io.readyState&&this.onopen(),this.emit("connecting")),this},h.prototype.send=function(){var t=i(arguments);return t.unshift("message"),this.emit.apply(this,t),this},h.prototype.emit=function(t){if(p.hasOwnProperty(t))return f.apply(this,arguments),this;var e=i(arguments),n={type:(void 0!==this.flags.binary?this.flags.binary:l(e))?r.BINARY_EVENT:r.EVENT,data:e,options:{}};return n.options.compress=!this.flags||!1!==this.flags.compress,"function"==typeof e[e.length-1]&&(c("emitting packet with ack id %d",this.ids),this.acks[this.ids]=e.pop(),n.id=this.ids++),this.connected?this.packet(n):this.sendBuffer.push(n),this.flags={},this},h.prototype.packet=function(t){t.nsp=this.nsp,this.io.packet(t)},h.prototype.onopen=function(){if(c("transport is open - connecting"),"/"!==this.nsp)if(this.query){var t="object"==typeof this.query?u.encode(this.query):this.query;c("sending connect packet with query %s",t),this.packet({type:r.CONNECT,query:t})}else this.packet({type:r.CONNECT})},h.prototype.onclose=function(t){c("close (%s)",t),this.connected=!1,this.disconnected=!0,delete this.id,this.emit("disconnect",t)},h.prototype.onpacket=function(t){var e=t.nsp===this.nsp,n=t.type===r.ERROR&&"/"===t.nsp;if(e||n)switch(t.type){case r.CONNECT:this.onconnect();break;case r.EVENT:case r.BINARY_EVENT:this.onevent(t);break;case r.ACK:case r.BINARY_ACK:this.onack(t);break;case r.DISCONNECT:this.ondisconnect();break;case r.ERROR:this.emit("error",t.data)}},h.prototype.onevent=function(t){var e=t.data||[];c("emitting event %j",e),null!=t.id&&(c("attaching ack callback to event"),e.push(this.ack(t.id))),this.connected?f.apply(this,e):this.receiveBuffer.push(e)},h.prototype.ack=function(t){var e=this,n=!1;return function(){if(!n){n=!0;var o=i(arguments);c("sending ack %j",o),e.packet({type:l(o)?r.BINARY_ACK:r.ACK,id:t,data:o})}}},h.prototype.onack=function(t){var e=this.acks[t.id];"function"==typeof e?(c("calling ack %s with %j",t.id,t.data),e.apply(this,t.data),delete this.acks[t.id]):c("bad ack %s",t.id)},h.prototype.onconnect=function(){this.connected=!0,this.disconnected=!1,this.emit("connect"),this.emitBuffered()},h.prototype.emitBuffered=function(){var t;for(t=0;t<this.receiveBuffer.length;t++)f.apply(this,this.receiveBuffer[t]);for(this.receiveBuffer=[],t=0;t<this.sendBuffer.length;t++)this.packet(this.sendBuffer[t]);this.sendBuffer=[]},h.prototype.ondisconnect=function(){c("server disconnect (%s)",this.nsp),this.destroy(),this.onclose("io server disconnect")},h.prototype.destroy=function(){if(this.subs){for(var t=0;t<this.subs.length;t++)this.subs[t].destroy();this.subs=null}this.io.destroy(this)},h.prototype.close=h.prototype.disconnect=function(){return this.connected&&(c("performing disconnect (%s)",this.nsp),this.packet({type:r.DISCONNECT})),this.destroy(),this.connected&&this.onclose("io client disconnect"),this},h.prototype.compress=function(t){return this.flags.compress=t,this},h.prototype.binary=function(t){return this.flags.binary=t,this}},function(t,e){t.exports=function(t,e,n){return t.on(e,n),{destroy:function(){t.removeListener(e,n)}}}},function(t,e){var n=[].slice;t.exports=function(t,e){if("string"==typeof e&&(e=t[e]),"function"!=typeof e)throw new Error("bind() requires a function");var r=n.call(arguments,2);return function(){return e.apply(t,r.concat(n.call(arguments)))}}},function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||e.hasOwnProperty(n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),o(n(13),e),o(n(77),e)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ClientApi=e.isAPIResponse=e.isAPIErrorResponse=void 0;var r=n(37),o=n(4);e.isAPIErrorResponse=function(t){return"KalturaAPIException"===t.objectType},e.isAPIResponse=function(t){return"objectType"in t};var i=o.getContribLogger({module:"contrib-push-notifications",class:"ClientApi"}),a=function(){function t(t){this._serviceUrl=t.serviceUrl+"/index.php",this._baseParams={apiVersion:"3.1",expiry:"86400",ignoreNull:1,clientTag:t.clientTag,ks:t.ks,kalsig:""}}return t.prototype.doMultiRegisterRequest=function(t){var e=this._preparePostMultiData(t);return r.default.post(this._serviceUrl+"?service=multirequest",e,{headers:{"Content-Type":"application/json"}}).then((function(t){if(!t||!t.data||"KalturaAPIException"===t.data.objectType)throw new Error("Error: multirequest request failed");return t.data})).catch((function(t){throw i.error("failed to multirequest the queueNameHash and queueKeyHash",{method:"doMultiRegisterRequest",data:{error:t}}),new Error("Error: failed to multirequest of register requests"+JSON.stringify(t))}))},t.prototype._preparePostMultiData=function(t){var e={};for(var n in this._baseParams)void 0===e[n]&&(e[n]=this._baseParams[n]);e.format=1,e.action="null";for(var r=0;r<t.length;r++){var o=1+r;for(var n in t[r])if("object"==typeof t[r][n])for(var i in t[r][n])e[o+":"+n+":"+i]=t[r][n][i];else e[o+":"+n]=t[r][n]}return e},t}();e.ClientApi=a},function(t,e,n){t.exports=n(38)},function(t,e,n){"use strict";var r=n(0),o=n(14),i=n(40),a=n(21);function s(t){var e=new i(t),n=o(i.prototype.request,e);return r.extend(n,i.prototype,e),r.extend(n,e),n}var c=s(n(17));c.Axios=i,c.create=function(t){return s(a(c.defaults,t))},c.Cancel=n(22),c.CancelToken=n(52),c.isCancel=n(16),c.all=function(t){return Promise.all(t)},c.spread=n(53),t.exports=c,t.exports.default=c},function(t,e){
/*!
 * Determine if an object is a Buffer
 *
 * @author   Feross Aboukhadijeh <https://feross.org>
 * @license  MIT
 */
t.exports=function(t){return null!=t&&null!=t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}},function(t,e,n){"use strict";var r=n(0),o=n(15),i=n(41),a=n(42),s=n(21);function c(t){this.defaults=t,this.interceptors={request:new i,response:new i}}c.prototype.request=function(t){"string"==typeof t?(t=arguments[1]||{}).url=arguments[0]:t=t||{},(t=s(this.defaults,t)).method=t.method?t.method.toLowerCase():"get";var e=[a,void 0],n=Promise.resolve(t);for(this.interceptors.request.forEach((function(t){e.unshift(t.fulfilled,t.rejected)})),this.interceptors.response.forEach((function(t){e.push(t.fulfilled,t.rejected)}));e.length;)n=n.then(e.shift(),e.shift());return n},c.prototype.getUri=function(t){return t=s(this.defaults,t),o(t.url,t.params,t.paramsSerializer).replace(/^\?/,"")},r.forEach(["delete","get","head","options"],(function(t){c.prototype[t]=function(e,n){return this.request(r.merge(n||{},{method:t,url:e}))}})),r.forEach(["post","put","patch"],(function(t){c.prototype[t]=function(e,n,o){return this.request(r.merge(o||{},{method:t,url:e,data:n}))}})),t.exports=c},function(t,e,n){"use strict";var r=n(0);function o(){this.handlers=[]}o.prototype.use=function(t,e){return this.handlers.push({fulfilled:t,rejected:e}),this.handlers.length-1},o.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)},o.prototype.forEach=function(t){r.forEach(this.handlers,(function(e){null!==e&&t(e)}))},t.exports=o},function(t,e,n){"use strict";var r=n(0),o=n(43),i=n(16),a=n(17),s=n(50),c=n(51);function u(t){t.cancelToken&&t.cancelToken.throwIfRequested()}t.exports=function(t){return u(t),t.baseURL&&!s(t.url)&&(t.url=c(t.baseURL,t.url)),t.headers=t.headers||{},t.data=o(t.data,t.headers,t.transformRequest),t.headers=r.merge(t.headers.common||{},t.headers[t.method]||{},t.headers||{}),r.forEach(["delete","get","head","post","put","patch","common"],(function(e){delete t.headers[e]})),(t.adapter||a.adapter)(t).then((function(e){return u(t),e.data=o(e.data,e.headers,t.transformResponse),e}),(function(e){return i(e)||(u(t),e&&e.response&&(e.response.data=o(e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)}))}},function(t,e,n){"use strict";var r=n(0);t.exports=function(t,e,n){return r.forEach(n,(function(n){t=n(t,e)})),t}},function(t,e,n){"use strict";var r=n(0);t.exports=function(t,e){r.forEach(t,(function(n,r){r!==e&&r.toUpperCase()===e.toUpperCase()&&(t[e]=n,delete t[r])}))}},function(t,e,n){"use strict";var r=n(20);t.exports=function(t,e,n){var o=n.config.validateStatus;!o||o(n.status)?t(n):e(r("Request failed with status code "+n.status,n.config,null,n.request,n))}},function(t,e,n){"use strict";t.exports=function(t,e,n,r,o){return t.config=e,n&&(t.code=n),t.request=r,t.response=o,t.isAxiosError=!0,t.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},t}},function(t,e,n){"use strict";var r=n(0),o=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];t.exports=function(t){var e,n,i,a={};return t?(r.forEach(t.split("\n"),(function(t){if(i=t.indexOf(":"),e=r.trim(t.substr(0,i)).toLowerCase(),n=r.trim(t.substr(i+1)),e){if(a[e]&&o.indexOf(e)>=0)return;a[e]="set-cookie"===e?(a[e]?a[e]:[]).concat([n]):a[e]?a[e]+", "+n:n}})),a):a}},function(t,e,n){"use strict";var r=n(0);t.exports=r.isStandardBrowserEnv()?function(){var t,e=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function o(t){var r=t;return e&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return t=o(window.location.href),function(e){var n=r.isString(e)?o(e):e;return n.protocol===t.protocol&&n.host===t.host}}():function(){return!0}},function(t,e,n){"use strict";var r=n(0);t.exports=r.isStandardBrowserEnv()?{write:function(t,e,n,o,i,a){var s=[];s.push(t+"="+encodeURIComponent(e)),r.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),r.isString(o)&&s.push("path="+o),r.isString(i)&&s.push("domain="+i),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(t){var e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(t,e,n){"use strict";t.exports=function(t){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(t)}},function(t,e,n){"use strict";t.exports=function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}},function(t,e,n){"use strict";var r=n(22);function o(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");var e;this.promise=new Promise((function(t){e=t}));var n=this;t((function(t){n.reason||(n.reason=new r(t),e(n.reason))}))}o.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},o.source=function(){var t;return{token:new o((function(e){t=e})),cancel:t}},t.exports=o},function(t,e,n){"use strict";t.exports=function(t){return function(e){return t.apply(null,e)}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SocketWrapper=void 0;var r=n(55),o=n(4),i=n(12),a=o.getContribLogger({module:"contrib-push-notifications",class:"SocketWrapper"}),s=function(){function t(t){this._listenKeys={},this._messageKeyToQueueKeyMap={},this._connected=!1,this._key=t.key,a.info("Connecting to socket",{method:"constructor",data:{url:t.url}}),this._connectAndListenToSocket(t)}return t.prototype.destroy=function(){this._socket&&(this._socket.disconnect(),this._socket=null),this._listenKeys={},this._messageKeyToQueueKeyMap={},this._connected=!1,this._key=null},t.prototype._connectAndListenToSocket=function(e){var n=this;a.info("connect to socket",{method:"_connectAndListenToSocket",data:{url:e.url}}),this._socket=r.connect(e.url,{forceNew:!0,timeout:t.CONNECTION_TIMEOUT}),this._socket.on("validated",(function(){for(var t in n._connected=!0,n._listenKeys)a.info("Emit listen to url",{method:"_registerSocket('validated')",data:{url:e.url,keyObject:n._listenKeys[t]}}),n._socket.emit("listen",n._listenKeys[t].queueNameHash,n._listenKeys[t].queueKeyHash)})),this._socket.on("connected",(function(t,e){n._listenKeys[e]?(n._messageKeyToQueueKeyMap[t]=e,a.info("Listening to queue",{method:"_registerSocket('connected')",data:{messageKey:t,queueKey:e}})):a.error("Cannot listen to queue, queueKeyHash not recognized",{method:"_registerSocket('connected')",data:{messageKey:t,queueKey:e}})})),this._socket.on("message",(function(t,e){a.debug("Cannot listen to queue, queueKeyHash not recognized",{method:"_registerSocket('message')",data:{messageKey:t,msg:e}}),n._messageKeyToQueueKeyMap[t]&&n._listenKeys[n._messageKeyToQueueKeyMap[t]]?n._listenKeys[n._messageKeyToQueueKeyMap[t]].onMessage.forEach((function(t){t(e)})):a.error("couldn't find queueKey in map",{method:"_registerSocket('message')",data:{messageKey:t}})})),this._socket.on("disconnect",(function(t){if(a.info("push server was disconnected",{method:"_registerSocket('disconnect')"}),!i.Utils.isEmptyObject(n._listenKeys)){var r=e.onSocketDisconnect;r&&r(t)}})),this._socket.on("reconnect",(function(t){if(a.info("push server was reconnected",{method:"_registerSocket('reconnect')"}),!i.Utils.isEmptyObject(n._listenKeys)){var r=e.onSocketReconnect;r&&r(t)}})),this._socket.on("reconnect_error",(function(t){a.error("reconnection error",{method:"_registerSocket('reconnect_error')",data:{error:t}})})),this._socket.on("errorMsg",(function(t){a.error("error message recieved",{method:"_registerSocket('errorMsg')",data:{msg:t}}),a.error("on ErrorMsg",t)}))},t.prototype.prepareForListening=function(t,e,n,r){this._listenKeys[n]?this._listenKeys[n].onMessage.push(r):this._listenKeys[n]={eventName:t,queueNameHash:e,queueKeyHash:n,onMessage:[r]},this._connected&&(a.info("Listening to ${eventName}",{method:"prepareForListening",data:{queueNameHash:e,queueKeyHash:n}}),this._socket.emit("listen",e,n))},t.CONNECTION_TIMEOUT=6e5,t}();e.SocketWrapper=s},function(t,e,n){var r=n(56),o=n(8),i=n(26),a=n(1)("socket.io-client");t.exports=e=c;var s=e.managers={};function c(t,e){"object"==typeof t&&(e=t,t=void 0),e=e||{};var n,o=r(t),c=o.source,u=o.id,l=o.path,p=s[u]&&l in s[u].nsps;return e.forceNew||e["force new connection"]||!1===e.multiplex||p?(a("ignoring socket cache for %s",c),n=i(c,e)):(s[u]||(a("new io instance for %s",c),s[u]=i(c,e)),n=s[u]),o.query&&!e.query&&(e.query=o.query),n.socket(o.path,e)}e.protocol=o.protocol,e.connect=c,e.Manager=n(26),e.Socket=n(32)},function(t,e,n){var r=n(23),o=n(1)("socket.io-client:url");t.exports=function(t,e){var n=t;e=e||"undefined"!=typeof location&&location,null==t&&(t=e.protocol+"//"+e.host),"string"==typeof t&&("/"===t.charAt(0)&&(t="/"===t.charAt(1)?e.protocol+t:e.host+t),/^(https?|wss?):\/\//.test(t)||(o("protocol-less url %s",t),t=void 0!==e?e.protocol+"//"+t:"https://"+t),o("parse %s",t),n=r(t)),n.port||(/^(http|ws)$/.test(n.protocol)?n.port="80":/^(http|ws)s$/.test(n.protocol)&&(n.port="443")),n.path=n.path||"/";var i=-1!==n.host.indexOf(":")?"["+n.host+"]":n.host;return n.id=n.protocol+"://"+i+":"+n.port,n.href=n.protocol+"://"+i+(e&&e.port===n.port?"":":"+n.port),n}},function(t,e,n){function r(t){var n;function r(){if(r.enabled){var t=r,o=+new Date,i=o-(n||o);t.diff=i,t.prev=n,t.curr=o,n=o;for(var a=new Array(arguments.length),s=0;s<a.length;s++)a[s]=arguments[s];a[0]=e.coerce(a[0]),"string"!=typeof a[0]&&a.unshift("%O");var c=0;a[0]=a[0].replace(/%([a-zA-Z%])/g,(function(n,r){if("%%"===n)return n;c++;var o=e.formatters[r];if("function"==typeof o){var i=a[c];n=o.call(t,i),a.splice(c,1),c--}return n})),e.formatArgs.call(t,a);var u=r.log||e.log||console.log.bind(console);u.apply(t,a)}}return r.namespace=t,r.enabled=e.enabled(t),r.useColors=e.useColors(),r.color=function(t){var n,r=0;for(n in t)r=(r<<5)-r+t.charCodeAt(n),r|=0;return e.colors[Math.abs(r)%e.colors.length]}(t),r.destroy=o,"function"==typeof e.init&&e.init(r),e.instances.push(r),r}function o(){var t=e.instances.indexOf(this);return-1!==t&&(e.instances.splice(t,1),!0)}(e=t.exports=r.debug=r.default=r).coerce=function(t){return t instanceof Error?t.stack||t.message:t},e.disable=function(){e.enable("")},e.enable=function(t){var n;e.save(t),e.names=[],e.skips=[];var r=("string"==typeof t?t:"").split(/[\s,]+/),o=r.length;for(n=0;n<o;n++)r[n]&&("-"===(t=r[n].replace(/\*/g,".*?"))[0]?e.skips.push(new RegExp("^"+t.substr(1)+"$")):e.names.push(new RegExp("^"+t+"$")));for(n=0;n<e.instances.length;n++){var i=e.instances[n];i.enabled=e.enabled(i.namespace)}},e.enabled=function(t){if("*"===t[t.length-1])return!0;var n,r;for(n=0,r=e.skips.length;n<r;n++)if(e.skips[n].test(t))return!1;for(n=0,r=e.names.length;n<r;n++)if(e.names[n].test(t))return!0;return!1},e.humanize=n(58),e.instances=[],e.names=[],e.skips=[],e.formatters={}},function(t,e){var n=1e3,r=6e4,o=60*r,i=24*o;function a(t,e,n){if(!(t<e))return t<1.5*e?Math.floor(t/e)+" "+n:Math.ceil(t/e)+" "+n+"s"}t.exports=function(t,e){e=e||{};var s,c=typeof t;if("string"===c&&t.length>0)return function(t){if(!((t=String(t)).length>100)){var e=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(t);if(e){var a=parseFloat(e[1]);switch((e[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*a;case"days":case"day":case"d":return a*i;case"hours":case"hour":case"hrs":case"hr":case"h":return a*o;case"minutes":case"minute":case"mins":case"min":case"m":return a*r;case"seconds":case"second":case"secs":case"sec":case"s":return a*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return a;default:return}}}}(t);if("number"===c&&!1===isNaN(t))return e.long?a(s=t,i,"day")||a(s,o,"hour")||a(s,r,"minute")||a(s,n,"second")||s+" ms":function(t){return t>=i?Math.round(t/i)+"d":t>=o?Math.round(t/o)+"h":t>=r?Math.round(t/r)+"m":t>=n?Math.round(t/n)+"s":t+"ms"}(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}},function(t,e,n){var r=n(5),o=n(24),i=Object.prototype.toString,a="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===i.call(Blob),s="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===i.call(File);e.deconstructPacket=function(t){var e=[],n=t.data,i=t;return i.data=function t(e,n){if(!e)return e;if(o(e)){var i={_placeholder:!0,num:n.length};return n.push(e),i}if(r(e)){for(var a=new Array(e.length),s=0;s<e.length;s++)a[s]=t(e[s],n);return a}if("object"==typeof e&&!(e instanceof Date)){for(var c in a={},e)a[c]=t(e[c],n);return a}return e}(n,e),i.attachments=e.length,{packet:i,buffers:e}},e.reconstructPacket=function(t,e){return t.data=function t(e,n){if(!e)return e;if(e&&e._placeholder)return n[e.num];if(r(e))for(var o=0;o<e.length;o++)e[o]=t(e[o],n);else if("object"==typeof e)for(var i in e)e[i]=t(e[i],n);return e}(t.data,e),t.attachments=void 0,t},e.removeBlobs=function(t,e){var n=0,i=t;!function t(c,u,l){if(!c)return c;if(a&&c instanceof Blob||s&&c instanceof File){n++;var p=new FileReader;p.onload=function(){l?l[u]=this.result:i=this.result,--n||e(i)},p.readAsArrayBuffer(c)}else if(r(c))for(var f=0;f<c.length;f++)t(c[f],f,c);else if("object"==typeof c&&!o(c))for(var h in c)t(c[h],h,c)}(i),n||e(i)}},function(t,e,n){"use strict";e.byteLength=function(t){var e=u(t),n=e[0],r=e[1];return 3*(n+r)/4-r},e.toByteArray=function(t){var e,n,r=u(t),a=r[0],s=r[1],c=new i(function(t,e,n){return 3*(e+n)/4-n}(0,a,s)),l=0,p=s>0?a-4:a;for(n=0;n<p;n+=4)e=o[t.charCodeAt(n)]<<18|o[t.charCodeAt(n+1)]<<12|o[t.charCodeAt(n+2)]<<6|o[t.charCodeAt(n+3)],c[l++]=e>>16&255,c[l++]=e>>8&255,c[l++]=255&e;return 2===s&&(e=o[t.charCodeAt(n)]<<2|o[t.charCodeAt(n+1)]>>4,c[l++]=255&e),1===s&&(e=o[t.charCodeAt(n)]<<10|o[t.charCodeAt(n+1)]<<4|o[t.charCodeAt(n+2)]>>2,c[l++]=e>>8&255,c[l++]=255&e),c},e.fromByteArray=function(t){for(var e,n=t.length,o=n%3,i=[],a=0,s=n-o;a<s;a+=16383)i.push(l(t,a,a+16383>s?s:a+16383));return 1===o?(e=t[n-1],i.push(r[e>>2]+r[e<<4&63]+"==")):2===o&&(e=(t[n-2]<<8)+t[n-1],i.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"=")),i.join("")};for(var r=[],o=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,c=a.length;s<c;++s)r[s]=a[s],o[a.charCodeAt(s)]=s;function u(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");return-1===n&&(n=e),[n,n===e?0:4-n%4]}function l(t,e,n){for(var o,i,a=[],s=e;s<n;s+=3)o=(t[s]<<16&16711680)+(t[s+1]<<8&65280)+(255&t[s+2]),a.push(r[(i=o)>>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return a.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},function(t,e){e.read=function(t,e,n,r,o){var i,a,s=8*o-r-1,c=(1<<s)-1,u=c>>1,l=-7,p=n?o-1:0,f=n?-1:1,h=t[e+p];for(p+=f,i=h&(1<<-l)-1,h>>=-l,l+=s;l>0;i=256*i+t[e+p],p+=f,l-=8);for(a=i&(1<<-l)-1,i>>=-l,l+=r;l>0;a=256*a+t[e+p],p+=f,l-=8);if(0===i)i=1-u;else{if(i===c)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,r),i-=u}return(h?-1:1)*a*Math.pow(2,i-r)},e.write=function(t,e,n,r,o,i){var a,s,c,u=8*i-o-1,l=(1<<u)-1,p=l>>1,f=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:i-1,d=r?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=l):(a=Math.floor(Math.log(e)/Math.LN2),e*(c=Math.pow(2,-a))<1&&(a--,c*=2),(e+=a+p>=1?f/c:f*Math.pow(2,1-p))*c>=2&&(a++,c/=2),a+p>=l?(s=0,a=l):a+p>=1?(s=(e*c-1)*Math.pow(2,o),a+=p):(s=e*Math.pow(2,p-1)*Math.pow(2,o),a=0));o>=8;t[n+h]=255&s,h+=d,s/=256,o-=8);for(a=a<<o|s,u+=o;u>0;t[n+h]=255&a,h+=d,a/=256,u-=8);t[n+h-d]|=128*g}},function(t,e,n){t.exports=n(63),t.exports.parser=n(3)},function(t,e,n){var r=n(27),o=n(2),i=n(1)("engine.io-client:socket"),a=n(31),s=n(3),c=n(23),u=n(6);function l(t,e){if(!(this instanceof l))return new l(t,e);e=e||{},t&&"object"==typeof t&&(e=t,t=null),t?(t=c(t),e.hostname=t.host,e.secure="https"===t.protocol||"wss"===t.protocol,e.port=t.port,t.query&&(e.query=t.query)):e.host&&(e.hostname=c(e.host).host),this.secure=null!=e.secure?e.secure:"undefined"!=typeof location&&"https:"===location.protocol,e.hostname&&!e.port&&(e.port=this.secure?"443":"80"),this.agent=e.agent||!1,this.hostname=e.hostname||("undefined"!=typeof location?location.hostname:"localhost"),this.port=e.port||("undefined"!=typeof location&&location.port?location.port:this.secure?443:80),this.query=e.query||{},"string"==typeof this.query&&(this.query=u.decode(this.query)),this.upgrade=!1!==e.upgrade,this.path=(e.path||"/engine.io").replace(/\/$/,"")+"/",this.forceJSONP=!!e.forceJSONP,this.jsonp=!1!==e.jsonp,this.forceBase64=!!e.forceBase64,this.enablesXDR=!!e.enablesXDR,this.withCredentials=!1!==e.withCredentials,this.timestampParam=e.timestampParam||"t",this.timestampRequests=e.timestampRequests,this.transports=e.transports||["polling","websocket"],this.transportOptions=e.transportOptions||{},this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.policyPort=e.policyPort||843,this.rememberUpgrade=e.rememberUpgrade||!1,this.binaryType=null,this.onlyBinaryUpgrades=e.onlyBinaryUpgrades,this.perMessageDeflate=!1!==e.perMessageDeflate&&(e.perMessageDeflate||{}),!0===this.perMessageDeflate&&(this.perMessageDeflate={}),this.perMessageDeflate&&null==this.perMessageDeflate.threshold&&(this.perMessageDeflate.threshold=1024),this.pfx=e.pfx||null,this.key=e.key||null,this.passphrase=e.passphrase||null,this.cert=e.cert||null,this.ca=e.ca||null,this.ciphers=e.ciphers||null,this.rejectUnauthorized=void 0===e.rejectUnauthorized||e.rejectUnauthorized,this.forceNode=!!e.forceNode,this.isReactNative="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase(),("undefined"==typeof self||this.isReactNative)&&(e.extraHeaders&&Object.keys(e.extraHeaders).length>0&&(this.extraHeaders=e.extraHeaders),e.localAddress&&(this.localAddress=e.localAddress)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingIntervalTimer=null,this.pingTimeoutTimer=null,this.open()}t.exports=l,l.priorWebsocketSuccess=!1,o(l.prototype),l.protocol=s.protocol,l.Socket=l,l.Transport=n(11),l.transports=n(27),l.parser=n(3),l.prototype.createTransport=function(t){i('creating transport "%s"',t);var e=function(t){var e={};for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}(this.query);e.EIO=s.protocol,e.transport=t;var n=this.transportOptions[t]||{};return this.id&&(e.sid=this.id),new r[t]({query:e,socket:this,agent:n.agent||this.agent,hostname:n.hostname||this.hostname,port:n.port||this.port,secure:n.secure||this.secure,path:n.path||this.path,forceJSONP:n.forceJSONP||this.forceJSONP,jsonp:n.jsonp||this.jsonp,forceBase64:n.forceBase64||this.forceBase64,enablesXDR:n.enablesXDR||this.enablesXDR,withCredentials:n.withCredentials||this.withCredentials,timestampRequests:n.timestampRequests||this.timestampRequests,timestampParam:n.timestampParam||this.timestampParam,policyPort:n.policyPort||this.policyPort,pfx:n.pfx||this.pfx,key:n.key||this.key,passphrase:n.passphrase||this.passphrase,cert:n.cert||this.cert,ca:n.ca||this.ca,ciphers:n.ciphers||this.ciphers,rejectUnauthorized:n.rejectUnauthorized||this.rejectUnauthorized,perMessageDeflate:n.perMessageDeflate||this.perMessageDeflate,extraHeaders:n.extraHeaders||this.extraHeaders,forceNode:n.forceNode||this.forceNode,localAddress:n.localAddress||this.localAddress,requestTimeout:n.requestTimeout||this.requestTimeout,protocols:n.protocols||void 0,isReactNative:this.isReactNative})},l.prototype.open=function(){var t;if(this.rememberUpgrade&&l.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket"))t="websocket";else{if(0===this.transports.length){var e=this;return void setTimeout((function(){e.emit("error","No transports available")}),0)}t=this.transports[0]}this.readyState="opening";try{t=this.createTransport(t)}catch(t){return this.transports.shift(),void this.open()}t.open(),this.setTransport(t)},l.prototype.setTransport=function(t){i("setting transport %s",t.name);var e=this;this.transport&&(i("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=t,t.on("drain",(function(){e.onDrain()})).on("packet",(function(t){e.onPacket(t)})).on("error",(function(t){e.onError(t)})).on("close",(function(){e.onClose("transport close")}))},l.prototype.probe=function(t){i('probing transport "%s"',t);var e=this.createTransport(t,{probe:1}),n=!1,r=this;function o(){if(r.onlyBinaryUpgrades){var o=!this.supportsBinary&&r.transport.supportsBinary;n=n||o}n||(i('probe transport "%s" opened',t),e.send([{type:"ping",data:"probe"}]),e.once("packet",(function(o){if(!n)if("pong"===o.type&&"probe"===o.data){if(i('probe transport "%s" pong',t),r.upgrading=!0,r.emit("upgrading",e),!e)return;l.priorWebsocketSuccess="websocket"===e.name,i('pausing current transport "%s"',r.transport.name),r.transport.pause((function(){n||"closed"!==r.readyState&&(i("changing transport and sending upgrade packet"),f(),r.setTransport(e),e.send([{type:"upgrade"}]),r.emit("upgrade",e),e=null,r.upgrading=!1,r.flush())}))}else{i('probe transport "%s" failed',t);var a=new Error("probe error");a.transport=e.name,r.emit("upgradeError",a)}})))}function a(){n||(n=!0,f(),e.close(),e=null)}function s(n){var o=new Error("probe error: "+n);o.transport=e.name,a(),i('probe transport "%s" failed because of error: %s',t,n),r.emit("upgradeError",o)}function c(){s("transport closed")}function u(){s("socket closed")}function p(t){e&&t.name!==e.name&&(i('"%s" works - aborting "%s"',t.name,e.name),a())}function f(){e.removeListener("open",o),e.removeListener("error",s),e.removeListener("close",c),r.removeListener("close",u),r.removeListener("upgrading",p)}l.priorWebsocketSuccess=!1,e.once("open",o),e.once("error",s),e.once("close",c),this.once("close",u),this.once("upgrading",p),e.open()},l.prototype.onOpen=function(){if(i("socket open"),this.readyState="open",l.priorWebsocketSuccess="websocket"===this.transport.name,this.emit("open"),this.flush(),"open"===this.readyState&&this.upgrade&&this.transport.pause){i("starting upgrade probes");for(var t=0,e=this.upgrades.length;t<e;t++)this.probe(this.upgrades[t])}},l.prototype.onPacket=function(t){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(i('socket receive: type "%s", data "%s"',t.type,t.data),this.emit("packet",t),this.emit("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"pong":this.setPing(),this.emit("pong");break;case"error":var e=new Error("server error");e.code=t.data,this.onError(e);break;case"message":this.emit("data",t.data),this.emit("message",t.data)}else i('packet received with socket readyState "%s"',this.readyState)},l.prototype.onHandshake=function(t){this.emit("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this.upgrades=this.filterUpgrades(t.upgrades),this.pingInterval=t.pingInterval,this.pingTimeout=t.pingTimeout,this.onOpen(),"closed"!==this.readyState&&(this.setPing(),this.removeListener("heartbeat",this.onHeartbeat),this.on("heartbeat",this.onHeartbeat))},l.prototype.onHeartbeat=function(t){clearTimeout(this.pingTimeoutTimer);var e=this;e.pingTimeoutTimer=setTimeout((function(){"closed"!==e.readyState&&e.onClose("ping timeout")}),t||e.pingInterval+e.pingTimeout)},l.prototype.setPing=function(){var t=this;clearTimeout(t.pingIntervalTimer),t.pingIntervalTimer=setTimeout((function(){i("writing ping packet - expecting pong within %sms",t.pingTimeout),t.ping(),t.onHeartbeat(t.pingTimeout)}),t.pingInterval)},l.prototype.ping=function(){var t=this;this.sendPacket("ping",(function(){t.emit("ping")}))},l.prototype.onDrain=function(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,0===this.writeBuffer.length?this.emit("drain"):this.flush()},l.prototype.flush=function(){"closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length&&(i("flushing %d packets in socket",this.writeBuffer.length),this.transport.send(this.writeBuffer),this.prevBufferLen=this.writeBuffer.length,this.emit("flush"))},l.prototype.write=l.prototype.send=function(t,e,n){return this.sendPacket("message",t,e,n),this},l.prototype.sendPacket=function(t,e,n,r){if("function"==typeof e&&(r=e,e=void 0),"function"==typeof n&&(r=n,n=null),"closing"!==this.readyState&&"closed"!==this.readyState){(n=n||{}).compress=!1!==n.compress;var o={type:t,data:e,options:n};this.emit("packetCreate",o),this.writeBuffer.push(o),r&&this.once("flush",r),this.flush()}},l.prototype.close=function(){if("opening"===this.readyState||"open"===this.readyState){this.readyState="closing";var t=this;this.writeBuffer.length?this.once("drain",(function(){this.upgrading?r():e()})):this.upgrading?r():e()}function e(){t.onClose("forced close"),i("socket closing - telling transport to close"),t.transport.close()}function n(){t.removeListener("upgrade",n),t.removeListener("upgradeError",n),e()}function r(){t.once("upgrade",n),t.once("upgradeError",n)}return this},l.prototype.onError=function(t){i("socket error %j",t),l.priorWebsocketSuccess=!1,this.emit("error",t),this.onClose("transport error",t)},l.prototype.onClose=function(t,e){"opening"!==this.readyState&&"open"!==this.readyState&&"closing"!==this.readyState||(i('socket close with reason: "%s"',t),clearTimeout(this.pingIntervalTimer),clearTimeout(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),this.readyState="closed",this.id=null,this.emit("close",t,e),this.writeBuffer=[],this.prevBufferLen=0)},l.prototype.filterUpgrades=function(t){for(var e=[],n=0,r=t.length;n<r;n++)~a(this.transports,t[n])&&e.push(t[n]);return e}},function(t,e){try{t.exports="undefined"!=typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(e){t.exports=!1}},function(t,e,n){var r=n(10),o=n(28),i=n(2),a=n(7),s=n(1)("engine.io-client:polling-xhr");function c(){}function u(t){if(o.call(this,t),this.requestTimeout=t.requestTimeout,this.extraHeaders=t.extraHeaders,"undefined"!=typeof location){var e="https:"===location.protocol,n=location.port;n||(n=e?443:80),this.xd="undefined"!=typeof location&&t.hostname!==location.hostname||n!==t.port,this.xs=t.secure!==e}}function l(t){this.method=t.method||"GET",this.uri=t.uri,this.xd=!!t.xd,this.xs=!!t.xs,this.async=!1!==t.async,this.data=void 0!==t.data?t.data:null,this.agent=t.agent,this.isBinary=t.isBinary,this.supportsBinary=t.supportsBinary,this.enablesXDR=t.enablesXDR,this.withCredentials=t.withCredentials,this.requestTimeout=t.requestTimeout,this.pfx=t.pfx,this.key=t.key,this.passphrase=t.passphrase,this.cert=t.cert,this.ca=t.ca,this.ciphers=t.ciphers,this.rejectUnauthorized=t.rejectUnauthorized,this.extraHeaders=t.extraHeaders,this.create()}if(t.exports=u,t.exports.Request=l,a(u,o),u.prototype.supportsBinary=!0,u.prototype.request=function(t){return(t=t||{}).uri=this.uri(),t.xd=this.xd,t.xs=this.xs,t.agent=this.agent||!1,t.supportsBinary=this.supportsBinary,t.enablesXDR=this.enablesXDR,t.withCredentials=this.withCredentials,t.pfx=this.pfx,t.key=this.key,t.passphrase=this.passphrase,t.cert=this.cert,t.ca=this.ca,t.ciphers=this.ciphers,t.rejectUnauthorized=this.rejectUnauthorized,t.requestTimeout=this.requestTimeout,t.extraHeaders=this.extraHeaders,new l(t)},u.prototype.doWrite=function(t,e){var n="string"!=typeof t&&void 0!==t,r=this.request({method:"POST",data:t,isBinary:n}),o=this;r.on("success",e),r.on("error",(function(t){o.onError("xhr post error",t)})),this.sendXhr=r},u.prototype.doPoll=function(){s("xhr poll");var t=this.request(),e=this;t.on("data",(function(t){e.onData(t)})),t.on("error",(function(t){e.onError("xhr poll error",t)})),this.pollXhr=t},i(l.prototype),l.prototype.create=function(){var t={agent:this.agent,xdomain:this.xd,xscheme:this.xs,enablesXDR:this.enablesXDR};t.pfx=this.pfx,t.key=this.key,t.passphrase=this.passphrase,t.cert=this.cert,t.ca=this.ca,t.ciphers=this.ciphers,t.rejectUnauthorized=this.rejectUnauthorized;var e=this.xhr=new r(t),n=this;try{s("xhr open %s: %s",this.method,this.uri),e.open(this.method,this.uri,this.async);try{if(this.extraHeaders)for(var o in e.setDisableHeaderCheck&&e.setDisableHeaderCheck(!0),this.extraHeaders)this.extraHeaders.hasOwnProperty(o)&&e.setRequestHeader(o,this.extraHeaders[o])}catch(t){}if("POST"===this.method)try{this.isBinary?e.setRequestHeader("Content-type","application/octet-stream"):e.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(t){}try{e.setRequestHeader("Accept","*/*")}catch(t){}"withCredentials"in e&&(e.withCredentials=this.withCredentials),this.requestTimeout&&(e.timeout=this.requestTimeout),this.hasXDR()?(e.onload=function(){n.onLoad()},e.onerror=function(){n.onError(e.responseText)}):e.onreadystatechange=function(){if(2===e.readyState)try{var t=e.getResponseHeader("Content-Type");(n.supportsBinary&&"application/octet-stream"===t||"application/octet-stream; charset=UTF-8"===t)&&(e.responseType="arraybuffer")}catch(t){}4===e.readyState&&(200===e.status||1223===e.status?n.onLoad():setTimeout((function(){n.onError("number"==typeof e.status?e.status:0)}),0))},s("xhr data %s",this.data),e.send(this.data)}catch(t){return void setTimeout((function(){n.onError(t)}),0)}"undefined"!=typeof document&&(this.index=l.requestsCount++,l.requests[this.index]=this)},l.prototype.onSuccess=function(){this.emit("success"),this.cleanup()},l.prototype.onData=function(t){this.emit("data",t),this.onSuccess()},l.prototype.onError=function(t){this.emit("error",t),this.cleanup(!0)},l.prototype.cleanup=function(t){if(void 0!==this.xhr&&null!==this.xhr){if(this.hasXDR()?this.xhr.onload=this.xhr.onerror=c:this.xhr.onreadystatechange=c,t)try{this.xhr.abort()}catch(t){}"undefined"!=typeof document&&delete l.requests[this.index],this.xhr=null}},l.prototype.onLoad=function(){var t;try{var e;try{e=this.xhr.getResponseHeader("Content-Type")}catch(t){}t=("application/octet-stream"===e||"application/octet-stream; charset=UTF-8"===e)&&this.xhr.response||this.xhr.responseText}catch(t){this.onError(t)}null!=t&&this.onData(t)},l.prototype.hasXDR=function(){return"undefined"!=typeof XDomainRequest&&!this.xs&&this.enablesXDR},l.prototype.abort=function(){this.cleanup()},l.requestsCount=0,l.requests={},"undefined"!=typeof document)if("function"==typeof attachEvent)attachEvent("onunload",f);else if("function"==typeof addEventListener){var p="onpagehide"in self?"pagehide":"unload";addEventListener(p,f,!1)}function f(){for(var t in l.requests)l.requests.hasOwnProperty(t)&&l.requests[t].abort()}},function(t,e){t.exports=Object.keys||function(t){var e=[],n=Object.prototype.hasOwnProperty;for(var r in t)n.call(t,r)&&e.push(r);return e}},function(t,e){t.exports=function(t,e,n){var r=t.byteLength;if(e=e||0,n=n||r,t.slice)return t.slice(e,n);if(e<0&&(e+=r),n<0&&(n+=r),n>r&&(n=r),e>=r||e>=n||0===r)return new ArrayBuffer(0);for(var o=new Uint8Array(t),i=new Uint8Array(n-e),a=e,s=0;a<n;a++,s++)i[s]=o[a];return i.buffer}},function(t,e){function n(){}t.exports=function(t,e,r){var o=!1;return r=r||n,i.count=t,0===t?e():i;function i(t,n){if(i.count<=0)throw new Error("after called too many times");--i.count,t?(o=!0,e(t),e=r):0!==i.count||o||e(null,n)}}},function(t,e){
/*! https://mths.be/utf8js v2.1.2 by @mathias */
var n,r,o,i=String.fromCharCode;function a(t){for(var e,n,r=[],o=0,i=t.length;o<i;)(e=t.charCodeAt(o++))>=55296&&e<=56319&&o<i?56320==(64512&(n=t.charCodeAt(o++)))?r.push(((1023&e)<<10)+(1023&n)+65536):(r.push(e),o--):r.push(e);return r}function s(t,e){if(t>=55296&&t<=57343){if(e)throw Error("Lone surrogate U+"+t.toString(16).toUpperCase()+" is not a scalar value");return!1}return!0}function c(t,e){return i(t>>e&63|128)}function u(t,e){if(0==(4294967168&t))return i(t);var n="";return 0==(4294965248&t)?n=i(t>>6&31|192):0==(4294901760&t)?(s(t,e)||(t=65533),n=i(t>>12&15|224),n+=c(t,6)):0==(4292870144&t)&&(n=i(t>>18&7|240),n+=c(t,12),n+=c(t,6)),n+i(63&t|128)}function l(){if(o>=r)throw Error("Invalid byte index");var t=255&n[o];if(o++,128==(192&t))return 63&t;throw Error("Invalid continuation byte")}function p(t){var e,i;if(o>r)throw Error("Invalid byte index");if(o==r)return!1;if(e=255&n[o],o++,0==(128&e))return e;if(192==(224&e)){if((i=(31&e)<<6|l())>=128)return i;throw Error("Invalid continuation byte")}if(224==(240&e)){if((i=(15&e)<<12|l()<<6|l())>=2048)return s(i,t)?i:65533;throw Error("Invalid continuation byte")}if(240==(248&e)&&(i=(7&e)<<18|l()<<12|l()<<6|l())>=65536&&i<=1114111)return i;throw Error("Invalid UTF-8 detected")}t.exports={version:"2.1.2",encode:function(t,e){for(var n=!1!==(e=e||{}).strict,r=a(t),o=r.length,i=-1,s="";++i<o;)s+=u(r[i],n);return s},decode:function(t,e){var s=!1!==(e=e||{}).strict;n=a(t),r=n.length,o=0;for(var c,u=[];!1!==(c=p(s));)u.push(c);return function(t){for(var e,n=t.length,r=-1,o="";++r<n;)(e=t[r])>65535&&(o+=i((e-=65536)>>>10&1023|55296),e=56320|1023&e),o+=i(e);return o}(u)}}},function(t,e){!function(){"use strict";for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n=new Uint8Array(256),r=0;r<t.length;r++)n[t.charCodeAt(r)]=r;e.encode=function(e){var n,r=new Uint8Array(e),o=r.length,i="";for(n=0;n<o;n+=3)i+=t[r[n]>>2],i+=t[(3&r[n])<<4|r[n+1]>>4],i+=t[(15&r[n+1])<<2|r[n+2]>>6],i+=t[63&r[n+2]];return o%3==2?i=i.substring(0,i.length-1)+"=":o%3==1&&(i=i.substring(0,i.length-2)+"=="),i},e.decode=function(t){var e,r,o,i,a,s=.75*t.length,c=t.length,u=0;"="===t[t.length-1]&&(s--,"="===t[t.length-2]&&s--);var l=new ArrayBuffer(s),p=new Uint8Array(l);for(e=0;e<c;e+=4)r=n[t.charCodeAt(e)],o=n[t.charCodeAt(e+1)],i=n[t.charCodeAt(e+2)],a=n[t.charCodeAt(e+3)],p[u++]=r<<2|o>>4,p[u++]=(15&o)<<4|i>>2,p[u++]=(3&i)<<6|63&a;return l}}()},function(t,e){var n=void 0!==n?n:"undefined"!=typeof WebKitBlobBuilder?WebKitBlobBuilder:"undefined"!=typeof MSBlobBuilder?MSBlobBuilder:"undefined"!=typeof MozBlobBuilder&&MozBlobBuilder,r=function(){try{return 2===new Blob(["hi"]).size}catch(t){return!1}}(),o=r&&function(){try{return 2===new Blob([new Uint8Array([1,2])]).size}catch(t){return!1}}(),i=n&&n.prototype.append&&n.prototype.getBlob;function a(t){return t.map((function(t){if(t.buffer instanceof ArrayBuffer){var e=t.buffer;if(t.byteLength!==e.byteLength){var n=new Uint8Array(t.byteLength);n.set(new Uint8Array(e,t.byteOffset,t.byteLength)),e=n.buffer}return e}return t}))}function s(t,e){e=e||{};var r=new n;return a(t).forEach((function(t){r.append(t)})),e.type?r.getBlob(e.type):r.getBlob()}function c(t,e){return new Blob(a(t),e||{})}"undefined"!=typeof Blob&&(s.prototype=Blob.prototype,c.prototype=Blob.prototype),t.exports=r?o?Blob:c:i?s:void 0},function(t,e,n){(function(e){var r=n(28),o=n(7);t.exports=l;var i,a=/\n/g,s=/\\n/g;function c(){}function u(){return"undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==e?e:{}}function l(t){if(r.call(this,t),this.query=this.query||{},!i){var e=u();i=e.___eio=e.___eio||[]}this.index=i.length;var n=this;i.push((function(t){n.onData(t)})),this.query.j=this.index,"function"==typeof addEventListener&&addEventListener("beforeunload",(function(){n.script&&(n.script.onerror=c)}),!1)}o(l,r),l.prototype.supportsBinary=!1,l.prototype.doClose=function(){this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),this.form&&(this.form.parentNode.removeChild(this.form),this.form=null,this.iframe=null),r.prototype.doClose.call(this)},l.prototype.doPoll=function(){var t=this,e=document.createElement("script");this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),e.async=!0,e.src=this.uri(),e.onerror=function(e){t.onError("jsonp poll error",e)};var n=document.getElementsByTagName("script")[0];n?n.parentNode.insertBefore(e,n):(document.head||document.body).appendChild(e),this.script=e,"undefined"!=typeof navigator&&/gecko/i.test(navigator.userAgent)&&setTimeout((function(){var t=document.createElement("iframe");document.body.appendChild(t),document.body.removeChild(t)}),100)},l.prototype.doWrite=function(t,e){var n=this;if(!this.form){var r,o=document.createElement("form"),i=document.createElement("textarea"),c=this.iframeId="eio_iframe_"+this.index;o.className="socketio",o.style.position="absolute",o.style.top="-1000px",o.style.left="-1000px",o.target=c,o.method="POST",o.setAttribute("accept-charset","utf-8"),i.name="d",o.appendChild(i),document.body.appendChild(o),this.form=o,this.area=i}function u(){l(),e()}function l(){if(n.iframe)try{n.form.removeChild(n.iframe)}catch(t){n.onError("jsonp polling iframe removal error",t)}try{var t='<iframe src="javascript:0" name="'+n.iframeId+'">';r=document.createElement(t)}catch(t){(r=document.createElement("iframe")).name=n.iframeId,r.src="javascript:0"}r.id=n.iframeId,n.form.appendChild(r),n.iframe=r}this.form.action=this.uri(),l(),t=t.replace(s,"\\\n"),this.area.value=t.replace(a,"\\n");try{this.form.submit()}catch(t){}this.iframe.attachEvent?this.iframe.onreadystatechange=function(){"complete"===n.iframe.readyState&&u()}:this.iframe.onload=u}}).call(this,n(25))},function(t,e,n){(function(e){var r,o,i=n(11),a=n(3),s=n(6),c=n(7),u=n(30),l=n(1)("engine.io-client:websocket");if("undefined"!=typeof WebSocket?r=WebSocket:"undefined"!=typeof self&&(r=self.WebSocket||self.MozWebSocket),"undefined"==typeof window)try{o=n(74)}catch(t){}var p=r||o;function f(t){t&&t.forceBase64&&(this.supportsBinary=!1),this.perMessageDeflate=t.perMessageDeflate,this.usingBrowserWebSocket=r&&!t.forceNode,this.protocols=t.protocols,this.usingBrowserWebSocket||(p=o),i.call(this,t)}t.exports=f,c(f,i),f.prototype.name="websocket",f.prototype.supportsBinary=!0,f.prototype.doOpen=function(){if(this.check()){var t=this.uri(),e=this.protocols,n={agent:this.agent,perMessageDeflate:this.perMessageDeflate};n.pfx=this.pfx,n.key=this.key,n.passphrase=this.passphrase,n.cert=this.cert,n.ca=this.ca,n.ciphers=this.ciphers,n.rejectUnauthorized=this.rejectUnauthorized,this.extraHeaders&&(n.headers=this.extraHeaders),this.localAddress&&(n.localAddress=this.localAddress);try{this.ws=this.usingBrowserWebSocket&&!this.isReactNative?e?new p(t,e):new p(t):new p(t,e,n)}catch(t){return this.emit("error",t)}void 0===this.ws.binaryType&&(this.supportsBinary=!1),this.ws.supports&&this.ws.supports.binary?(this.supportsBinary=!0,this.ws.binaryType="nodebuffer"):this.ws.binaryType="arraybuffer",this.addEventListeners()}},f.prototype.addEventListeners=function(){var t=this;this.ws.onopen=function(){t.onOpen()},this.ws.onclose=function(){t.onClose()},this.ws.onmessage=function(e){t.onData(e.data)},this.ws.onerror=function(e){t.onError("websocket error",e)}},f.prototype.write=function(t){var n=this;this.writable=!1;for(var r=t.length,o=0,i=r;o<i;o++)!function(t){a.encodePacket(t,n.supportsBinary,(function(o){if(!n.usingBrowserWebSocket){var i={};t.options&&(i.compress=t.options.compress),n.perMessageDeflate&&("string"==typeof o?e.byteLength(o):o.length)<n.perMessageDeflate.threshold&&(i.compress=!1)}try{n.usingBrowserWebSocket?n.ws.send(o):n.ws.send(o,i)}catch(t){l("websocket closed before onclose event")}--r||(n.emit("flush"),setTimeout((function(){n.writable=!0,n.emit("drain")}),0))}))}(t[o])},f.prototype.onClose=function(){i.prototype.onClose.call(this)},f.prototype.doClose=function(){void 0!==this.ws&&this.ws.close()},f.prototype.uri=function(){var t=this.query||{},e=this.secure?"wss":"ws",n="";return this.port&&("wss"===e&&443!==Number(this.port)||"ws"===e&&80!==Number(this.port))&&(n=":"+this.port),this.timestampRequests&&(t[this.timestampParam]=u()),this.supportsBinary||(t.b64=1),(t=s.encode(t)).length&&(t="?"+t),e+"://"+(-1!==this.hostname.indexOf(":")?"["+this.hostname+"]":this.hostname)+n+this.path+t},f.prototype.check=function(){return!(!p||"__initialize"in p&&this.name===f.prototype.name)}}).call(this,n(9).Buffer)},function(t,e){},function(t,e){t.exports=function(t,e){for(var n=[],r=(e=e||0)||0;r<t.length;r++)n[r-e]=t[r];return n}},function(t,e){function n(t){t=t||{},this.ms=t.min||100,this.max=t.max||1e4,this.factor=t.factor||2,this.jitter=t.jitter>0&&t.jitter<=1?t.jitter:0,this.attempts=0}t.exports=n,n.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),n=Math.floor(e*this.jitter*t);t=0==(1&Math.floor(10*e))?t-n:t+n}return 0|Math.min(t,this.max)},n.prototype.reset=function(){this.attempts=0},n.prototype.setMin=function(t){this.ms=t},n.prototype.setMax=function(t){this.max=t},n.prototype.setJitter=function(t){this.jitter=t}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PushNotificationsProvider=void 0;var r=n(4),o=n(13),i=n(12),a=function(){function t(){this.instancePool={}}return t.get=function(e,n){return r.PlayerContribRegistry.get(e).register("PushNotifications",(function(){return new t})).getInstance(n)},t.prototype.getInstance=function(t){var e=i.getDomainFromUrl(t.serviceUrl);if(!this.instancePool[e]){var n=new o.PushNotifications(t);this.instancePool[e]=n}return this.instancePool[e]},t}();e.PushNotificationsProvider=a}]))},function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||e.hasOwnProperty(n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),o(n(111),e)},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.Navigation=void 0;var a=n(2),s=n(23),c=n(6),u=n(112),l=n(116),p=n(133),f=n(137),h=n(141),d=n(146),g=n(9),y=n(151),m=KalturaPlayer.ui.components.Tooltip,v=c.getContribLogger({class:"Navigation",module:"navigation-plugin"}),_={searchQuery:"",activeTab:g.itemTypes.All,availableTabs:[g.itemTypes.All,g.itemTypes.Chapter,g.itemTypes.Slide,g.itemTypes.Hotspot,g.itemTypes.AnswerOnAir],totalResults:0},b=function(t){function e(e){var n=t.call(this,e)||this;return n._widgetRootRef=null,n._engine=null,n._preventScrollEvent=!1,n._listElementRef=null,n._log=function(t,e){v.trace(t,{method:e||"Method not defined"})},n._prepareNavigationData=function(t){var e=t.searchQuery,r=t.activeTab,o=g.filterDataBySearchQuery(n.props.data,e),a=e?g.findCuepointType(o,g.itemTypes.Caption):g.findCuepointType(n.props.data,g.itemTypes.Caption),s=i(i({},n.state),{listDataContainCaptions:a,convertedData:g.addGroupData(g.filterDataByActiveTab(o,r)),searchFilter:n._prepareSearchFilter(o,t)});n.state.searchFilter.searchQuery!==e&&(s.autoscroll=!1),e||(s.autoscroll=!0),n._updateEngine(s)},n._prepareSearchFilter=function(t,e){var r=g.getAvailableTabs(t,n.props.itemsOrder);return i(i({},e),{availableTabs:r})},n._updateEngine=function(t){var e=t.convertedData;if(!e||0===e.length)return n._engine=null,void n.setState(t);n._engine=new c.CuepointEngine(e,{reasonableSeekThreshold:n.props.isLive?7e3:2e3}),n._syncVisibleData(t)},n._makeHighlightedMap=function(t){var e,n=null===(e=t[t.length-1])||void 0===e?void 0:e.startTime,r=void 0!==n?n:-1;return t.filter((function(t){return t.startTime===r})).reduce((function(t,e){var n;return i(i({},t),((n={})[e.id]=!0,n))}),{})},n._syncVisibleData=function(t){void 0===t&&(t=n.state);var e=n.props.currentTime;n.setState((function(r){var o=i(i({},r),t);if(!n._engine)return i(i({},o),{highlightedMap:{}});var a=n._engine.updateTime(e);if(a.snapshot)return i(i({},o),{highlightedMap:n._makeHighlightedMap(a.snapshot)});if(!a.delta)return o;var s=a.delta.show;return s.length>0?{highlightedMap:n._makeHighlightedMap(s)}:o}))},n._setWidgetSize=function(){if(n._widgetRootRef){var t=n._widgetRootRef.getBoundingClientRect().width;n.state.widgetWidth!==t&&n.setState({widgetWidth:t})}},n._getHeaderStyles=function(){var t=n.state.widgetWidth;return t>=692?"":t>=649?u.mediumWidth:u.smallWidth},n._handleSearchFilterChange=function(t){return function(e){var r,o=i(i({},n.state.searchFilter),((r={})[t]=e,r));n._prepareNavigationData(o)}},n._renderHeader=function(){var t=n.props,e=t.toggledWithEnter,r=t.kitchenSinkActive,o=t.hasError,i=n.state,s=i.searchFilter,c=i.convertedData,l=i.listDataContainCaptions;return a.h("div",{className:u.header},!o&&a.h("div",{class:[u.searchWrapper,n._getHeaderStyles()].join(" ")},a.h(p.NavigationSearch,{onChange:n._handleSearchFilterChange("searchQuery"),searchQuery:s.searchQuery,toggledWithEnter:e,kitchenSinkActive:r})),o&&a.h("p",{className:u.pluginName},"Navigation"),a.h("button",{className:u.closeButton,tabIndex:1,onClick:n.props.onClose}),!o&&a.h(f.NavigationFilter,{onChange:n._handleSearchFilterChange("activeTab"),activeTab:s.activeTab,availableTabs:s.availableTabs,totalResults:s.searchQuery.length>0?c.length:null,listDataContainCaptions:l}))},n._handleSeek=function(t){n._preventScrollEvent=!0,n.setState({autoscroll:!0},(function(){n.props.onItemClicked(t)}))},n._handleScroll=function(){n._preventScrollEvent?n._preventScrollEvent=!1:n.state.autoscroll&&n.setState({autoscroll:!1})},n._renderNavigation=function(){var t=n.state,e=t.searchFilter,r=t.widgetWidth,o=t.highlightedMap,i=t.listDataContainCaptions,s=t.convertedData,c=n.props,u=c.hasError,p=c.retry;return u?a.h(h.Error,{onRetryLoad:p}):a.h(l.NavigationList,{searchActive:e.searchQuery.length>0,widgetWidth:r,autoScroll:n.state.autoscroll,onSeek:n._handleSeek,onScroll:n._scrollTo,data:s,highlightedMap:o,showItemsIcons:e.activeTab===g.itemTypes.All,listDataContainCaptions:i})},n._renderLoading=function(){return a.h(d.Loading,null)},n._handleClose=function(t){t.keyCode===s.KeyboardKeys.Esc&&n.props.onClose()},n._enableAutoScroll=function(t){t.preventDefault(),n.state.autoscroll||(n._preventScrollEvent=!0,n.setState({autoscroll:!0}))},n._scrollTo=function(t){n._preventScrollEvent=!0,n._listElementRef&&(n._listElementRef.scrollTop=t-(n.state.searchFilter.searchQuery?120:94))},n._renderAutoscrollButton=function(){var t=n.props.hasError,e=n.state,r=e.autoscroll,o=e.searchFilter,i=e.convertedData;return r||o.searchQuery||!i.length||t?null:a.h("div",{className:u.autoscrollWrapper},a.h(m,{label:"Resume AutoScroll",type:"left"},a.h(y.AutoscrollButton,{onClick:n._enableAutoScroll})))},n.state={autoscroll:!0,widgetWidth:0,highlightedMap:{},searchFilter:i({},_),convertedData:[],listDataContainCaptions:!1},n}return o(e,t),e.prototype.componentDidMount=function(){this._log("Create navigation data","componentDidMount"),this._prepareNavigationData(this.state.searchFilter)},e.prototype.componentDidUpdate=function(t,e){if(this._setWidgetSize(),t.data!==this.props.data)return this._log("Prepare navigation data","componentDidUpdate"),void this._prepareNavigationData(this.state.searchFilter);t.currentTime!==this.props.currentTime&&this._syncVisibleData()},e.prototype.componentWillUnmount=function(){this._log("Removing engine","componentWillUnmount"),this._engine=null},e.prototype.render=function(t){var e=this,n=t.isLoading,r=t.kitchenSinkActive;return a.h("div",{className:u.root+" "+(r?"":u.hidden),ref:function(t){e._widgetRootRef=t},onKeyUp:this._handleClose},n?this._renderLoading():a.h("div",{className:u.globalContainer},this._renderHeader(),a.h("div",{className:u.body,onScroll:this._handleScroll,ref:function(t){e._listElementRef=t}},this._renderNavigation(),this._renderAutoscrollButton())))},e}(a.Component);e.Navigation=b},function(t,e,n){var r=n(113);"string"==typeof r&&(r=[[t.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n(4)(r,o);r.locals&&(t.exports=r.locals)},function(t,e,n){e=t.exports=n(3)(!1);var r=n(17)(n(114));e.push([t.i,".src-components-navigation-navigaton__body--1tkJH::-webkit-scrollbar{width:4px}.src-components-navigation-navigaton__body--1tkJH::-webkit-scrollbar-track{background:rgba(33,33,33,0.9)}.src-components-navigation-navigaton__body--1tkJH::-webkit-scrollbar-thumb{border-radius:3px;background-color:rgba(255,255,255,0.3)}.src-components-navigation-navigaton__hidden--1I0Ax{visibility:hidden}.src-components-navigation-navigaton__body--1tkJH{overflow:auto;height:100%}.src-components-navigation-navigaton__root--3EwMX{display:flex;justify-content:center;padding:16px 4px 16px 0px;color:#fff;height:100%;width:100%;position:absolute}.src-components-navigation-navigaton__root--3EwMX .src-components-navigation-navigaton__global-container--34VLW{height:100%;display:flex;flex-direction:column;max-width:599px;width:100%}.src-components-navigation-navigaton__root--3EwMX .src-components-navigation-navigaton__global-container--34VLW .src-components-navigation-navigaton__header--1a60r{display:flex;flex-direction:column;align-items:center;justify-content:space-between;width:100%;margin-bottom:6px;padding-left:16px;font-size:16px}.src-components-navigation-navigaton__root--3EwMX .src-components-navigation-navigaton__global-container--34VLW .src-components-navigation-navigaton__header--1a60r .src-components-navigation-navigaton__plugin-name--3L-Dg{width:100%;margin:6px 0 0 0;font-size:15px;line-height:1.4;color:#cccccc;text-align:left}.src-components-navigation-navigaton__root--3EwMX .src-components-navigation-navigaton__global-container--34VLW .src-components-navigation-navigaton__header--1a60r .src-components-navigation-navigaton__search-wrapper--37_4e{width:100%}.src-components-navigation-navigaton__root--3EwMX .src-components-navigation-navigaton__global-container--34VLW .src-components-navigation-navigaton__header--1a60r .src-components-navigation-navigaton__search-wrapper--37_4e.src-components-navigation-navigaton__small-width--3nHh7{padding-right:44px}.src-components-navigation-navigaton__root--3EwMX .src-components-navigation-navigaton__global-container--34VLW .src-components-navigation-navigaton__header--1a60r .src-components-navigation-navigaton__search-wrapper--37_4e.src-components-navigation-navigaton__medium-width--3MrsH{padding-right:22px}.src-components-navigation-navigaton__root--3EwMX .src-components-navigation-navigaton__global-container--34VLW .src-components-navigation-navigaton__header--1a60r .src-components-navigation-navigaton__close-button--3a6qv{position:absolute;top:16px;right:0;width:32px;height:32px;min-width:32px;margin:0 8px;cursor:pointer;background-image:url("+r+");background-color:transparent;border:none;padding:0}.src-components-navigation-navigaton__root--3EwMX .src-components-navigation-navigaton__global-container--34VLW .src-components-navigation-navigaton__autoscrollWrapper--16a3R{position:absolute;bottom:14px;right:16px}\n",""]),e.locals={body:"src-components-navigation-navigaton__body--1tkJH",hidden:"src-components-navigation-navigaton__hidden--1I0Ax",root:"src-components-navigation-navigaton__root--3EwMX","global-container":"src-components-navigation-navigaton__global-container--34VLW",globalContainer:"src-components-navigation-navigaton__global-container--34VLW",header:"src-components-navigation-navigaton__header--1a60r","plugin-name":"src-components-navigation-navigaton__plugin-name--3L-Dg",pluginName:"src-components-navigation-navigaton__plugin-name--3L-Dg","search-wrapper":"src-components-navigation-navigaton__search-wrapper--37_4e",searchWrapper:"src-components-navigation-navigaton__search-wrapper--37_4e","small-width":"src-components-navigation-navigaton__small-width--3nHh7",smallWidth:"src-components-navigation-navigaton__small-width--3nHh7","medium-width":"src-components-navigation-navigaton__medium-width--3MrsH",mediumWidth:"src-components-navigation-navigaton__medium-width--3MrsH","close-button":"src-components-navigation-navigaton__close-button--3a6qv",closeButton:"src-components-navigation-navigaton__close-button--3a6qv",autoscrollWrapper:"src-components-navigation-navigaton__autoscrollWrapper--16a3R"}},function(t,e){t.exports="data:image/svg+xml,%3C?xml version='1.0' encoding='UTF-8'?%3E %3Csvg width='32px' height='32px' viewBox='0 0 32 32' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E %3C!-- Generator: Sketch 57.1 (83088) - https://sketch.com --%3E %3Ctitle%3EIcons/32/Close%3C/title%3E %3Cdesc%3ECreated with Sketch.%3C/desc%3E %3Cg id='Icons/32/Close' stroke='none' stroke-width='1' fill='none' fill-rule='evenodd'%3E %3Crect id='Bounds' x='0' y='0' width='32' height='32'%3E%3C/rect%3E %3Cpath d='M17.9113162,16 L24.6072325,9.30408374 C25.1313645,8.77995172 25.1287183,7.92687249 24.6009229,7.3990771 C24.0694478,6.86760201 23.220227,6.86845682 22.6959163,7.39276754 L16,14.0886838 L9.30408374,7.39276754 C8.77995172,6.86863552 7.92687249,6.8712817 7.3990771,7.3990771 C6.86760201,7.93055219 6.86845682,8.77977302 7.39276754,9.30408374 L14.0886838,16 L7.39276754,22.6959163 C6.86863552,23.2200483 6.8712817,24.0731275 7.3990771,24.6009229 C7.93055219,25.132398 8.77977302,25.1315432 9.30408374,24.6072325 L16,17.9113162 L22.6959163,24.6072325 C23.2200483,25.1313645 24.0731275,25.1287183 24.6009229,24.6009229 C25.132398,24.0694478 25.1315432,23.220227 24.6072325,22.6959163 L17.9113162,16 Z' id='Close' fill='rgba(255,255,255,0.8)'%3E%3C/path%3E %3C/g%3E %3C/svg%3E"},function(t,e){t.exports=function(t){var e="undefined"!=typeof window&&window.location;if(!e)throw new Error("fixUrls requires window.location");if(!t||"string"!=typeof t)return t;var n=e.protocol+"//"+e.host,r=n+e.pathname.replace(/\/[^\/]*$/,"/");return t.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,(function(t,e){var o,i=e.trim().replace(/^"(.*)"$/,(function(t,e){return e})).replace(/^'(.*)'$/,(function(t,e){return e}));return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(i)?t:(o=0===i.indexOf("//")?i:0===i.indexOf("/")?n+i:r+i.replace(/^\.\//,""),"url("+JSON.stringify(o)+")")}))}},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.NavigationList=void 0;var i=n(2),a=n(117),s=n(119),c=n(129),u=n(132),l=n(9),p=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._selectedElementY=0,e.updateSelected=function(t){var n=t.itemY;e._selectedElementY=n,e.props.autoScroll&&e.props.onScroll(e._selectedElementY)},e}return o(e,t),e.prototype.shouldComponentUpdate=function(t){return!(l.isMapEqual(this.props.highlightedMap,t.highlightedMap)&&l.isDataEqual(this.props.data,t.data)&&t.autoScroll===this.props.autoScroll&&t.listDataContainCaptions===this.props.listDataContainCaptions&&(!t.widgetWidth||t.widgetWidth===this.props.widgetWidth))},e.prototype.componentDidUpdate=function(t){!t.autoScroll&&this.props.autoScroll&&this.props.onScroll(this._selectedElementY)},e.prototype.render=function(t){var e=this,n=t.data,r=t.widgetWidth,o=t.showItemsIcons,l=t.onSeek,p=t.highlightedMap,f=t.listDataContainCaptions,h=t.searchActive;return n.length?i.h("div",{className:a.navigationList},n.map((function(t){return i.h(s.NavigationItem,{widgetWidth:r,onClick:l,selectedItem:p[t.id],key:t.id,data:t,onSelected:e.updateSelected,showIcon:o})}))):f?i.h(u.EmptyState,null):i.h(c.EmptyList,{showNoResultsText:h})},e}(i.Component);e.NavigationList=p},function(t,e,n){var r=n(118);"string"==typeof r&&(r=[[t.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n(4)(r,o);r.locals&&(t.exports=r.locals)},function(t,e,n){(e=t.exports=n(3)(!1)).push([t.i,".src-components-navigation-navigation-list-NavigationList__navigationList--3-Ncy{padding:0 16px;color:white;overflow:hidden}\n",""]),e.locals={navigationList:"src-components-navigation-navigation-list-NavigationList__navigationList--3-Ncy"}},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.NavigationItem=void 0;var a=n(2),s=n(120),c=n(9),u=n(57),l=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._itemElementRef=null,e._textContainerRef=null,e.state={expandText:!1,imageLoaded:!1,imageFailed:!1},e._getSelected=function(){var t=e.props,n=t.selectedItem,r=t.data,o=r.groupData,i=r.startTime,a=r.previewImage;!e._itemElementRef||!n||o&&o!==c.groupTypes.first||(a&&e.state.imageLoaded?e.props.onSelected({time:i,itemY:e._itemElementRef.offsetTop}):a||e.props.onSelected({time:i,itemY:e._itemElementRef.offsetTop}))},e._handleClickHandler=function(){e.props.onClick(e.props.data.startTime)},e._handleExpandChange=function(t){t.stopImmediatePropagation(),e.setState({expandText:!e.state.expandText})},e._renderThumbnail=function(){if(e.state.imageFailed)return null;var t=e.props,n=t.data,r=(t.selectedItem,{src:n.previewImage,alt:"Slide Preview",className:s.thumbnail,onLoad:function(){e.setState({imageLoaded:!0})},onError:function(){e.setState({imageFailed:!0})}});return a.h(a.Fragment,null,a.h("img",i({},r)),a.h("div",{className:s.thumbGradient}))},e}return o(e,t),e.prototype.matchHeight=function(){this._textContainerRef&&this._itemElementRef&&(this._itemElementRef.style.minHeight=this._textContainerRef.offsetHeight+4+"px")},e.prototype.shouldComponentUpdate=function(t,e){var n=this.props,r=n.selectedItem,o=n.data,i=n.widgetWidth;return!!(r!==t.selectedItem||o!==t.data||e.expandText!==this.state.expandText||r&&e.imageLoaded&&!this.state.imageLoaded||t.widgetWidth!==i)},e.prototype.componentDidUpdate=function(t){this._getSelected(),this.matchHeight()},e.prototype.componentDidMount=function(){this._getSelected(),this.matchHeight()},e.prototype.render=function(t){var e=this,n=t.selectedItem,r=t.showIcon,o=t.data,i=o.id,c=o.previewImage,l=o.itemType,p=o.displayTime,f=o.groupData,h=o.displayTitle,d=o.shorthandTitle,g=o.hasShowMore,y=o.displayDescription;return a.h("div",{ref:function(t){e._itemElementRef=t},className:[s[f||"single"],s.navigationItem,n?s.selected:null].join(" "),"data-entry-id":i,onClick:this._handleClickHandler},a.h("div",{className:[s.metadata,p?s.withTime:null].join(" ")},p&&a.h("span",null,p),r&&a.h("div",{className:s.iconWrapper},a.h(u.IconsFactory,{iconType:l}))),a.h("div",{className:[s.content,c?s.hasImage:null].join(" ")},c&&this._renderThumbnail(),a.h("div",{className:s.contentText,ref:function(t){e._textContainerRef=t}},d&&!this.state.expandText&&a.h("span",{className:s.title},d),h&&(!d||this.state.expandText)&&a.h("span",{className:s.title},h),y&&this.state.expandText&&a.h("div",{className:s.description},y),g&&a.h("button",{className:s.showMoreButton,onClick:this._handleExpandChange},this.state.expandText?"Read Less":"Read More"))))},e}(a.Component);e.NavigationItem=l},function(t,e,n){var r=n(121);"string"==typeof r&&(r=[[t.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n(4)(r,o);r.locals&&(t.exports=r.locals)},function(t,e,n){(e=t.exports=n(3)(!1)).push([t.i,'.src-components-navigation-navigation-item-NavigationItem__navigation-item--3RgpV{position:relative;padding:0 2px 0 0;display:flex;align-items:flex-start;min-height:28px;border-left:2px hidden;background-color:transparent;border-radius:2px;border-left:2px solid transparent;-webkit-transition:background-color 0.3s;transition:background-color 0.3s}.src-components-navigation-navigation-item-NavigationItem__navigation-item--3RgpV:hover{background:rgba(255,255,255,0.2)}.src-components-navigation-navigation-item-NavigationItem__navigation-item--3RgpV.src-components-navigation-navigation-item-NavigationItem__selected--2mnLw{background-color:rgba(255,255,255,0.15);border-left:2px solid #01accd}.src-components-navigation-navigation-item-NavigationItem__navigation-item--3RgpV.src-components-navigation-navigation-item-NavigationItem__selected--2mnLw.src-components-navigation-navigation-item-NavigationItem__first--oaib8{border-bottom-left-radius:0;border-bottom-right-radius:0}.src-components-navigation-navigation-item-NavigationItem__navigation-item--3RgpV.src-components-navigation-navigation-item-NavigationItem__selected--2mnLw.src-components-navigation-navigation-item-NavigationItem__mid--2F9Mc{border-radius:0}.src-components-navigation-navigation-item-NavigationItem__navigation-item--3RgpV.src-components-navigation-navigation-item-NavigationItem__selected--2mnLw.src-components-navigation-navigation-item-NavigationItem__last--2woMb{border-top-left-radius:0;border-top-right-radius:0}.src-components-navigation-navigation-item-NavigationItem__navigation-item--3RgpV.src-components-navigation-navigation-item-NavigationItem__first--oaib8,.src-components-navigation-navigation-item-NavigationItem__navigation-item--3RgpV.src-components-navigation-navigation-item-NavigationItem__single--21-Od{margin-top:8px}.src-components-navigation-navigation-item-NavigationItem__navigation-item--3RgpV.src-components-navigation-navigation-item-NavigationItem__mid--2F9Mc .src-components-navigation-navigation-item-NavigationItem__metadata--3qMAh span,.src-components-navigation-navigation-item-NavigationItem__navigation-item--3RgpV.src-components-navigation-navigation-item-NavigationItem__last--2woMb .src-components-navigation-navigation-item-NavigationItem__metadata--3qMAh span{visibility:hidden}.src-components-navigation-navigation-item-NavigationItem__navigation-item--3RgpV.src-components-navigation-navigation-item-NavigationItem__mid--2F9Mc:after,.src-components-navigation-navigation-item-NavigationItem__navigation-item--3RgpV.src-components-navigation-navigation-item-NavigationItem__first--oaib8:after{content:"";position:absolute;display:block;bottom:0;width:100%;height:1px;background-color:black}.src-components-navigation-navigation-item-NavigationItem__navigation-item--3RgpV .src-components-navigation-navigation-item-NavigationItem__icon-wrapper--287Bx{display:inline-block;margin-left:4px}.src-components-navigation-navigation-item-NavigationItem__navigation-item--3RgpV .src-components-navigation-navigation-item-NavigationItem__content--2ki6j,.src-components-navigation-navigation-item-NavigationItem__navigation-item--3RgpV .src-components-navigation-navigation-item-NavigationItem__metadata--3qMAh{background:transparent}.src-components-navigation-navigation-item-NavigationItem__navigation-item--3RgpV .src-components-navigation-navigation-item-NavigationItem__content--2ki6j{position:relative;text-align:left;flex-grow:1;font-size:14px;margin-bottom:2px}.src-components-navigation-navigation-item-NavigationItem__navigation-item--3RgpV .src-components-navigation-navigation-item-NavigationItem__metadata--3qMAh{line-height:18px;color:#cccccc;text-align:right;font-size:12px;padding-right:8px;padding-top:6px}.src-components-navigation-navigation-item-NavigationItem__navigation-item--3RgpV .src-components-navigation-navigation-item-NavigationItem__metadata--3qMAh.src-components-navigation-navigation-item-NavigationItem__with-time--3IwuO{min-width:64px}.src-components-navigation-navigation-item-NavigationItem__navigation-item--3RgpV .src-components-navigation-navigation-item-NavigationItem__show-more-button--2JHJU{cursor:pointer;font-size:14px;display:block;background:none;border:none;color:#01accd;margin:0;padding:0}.src-components-navigation-navigation-item-NavigationItem__navigation-item--3RgpV .src-components-navigation-navigation-item-NavigationItem__description--nC0h3{font-size:12px;line-height:18px;margin-top:4px;margin-bottom:4px}.src-components-navigation-navigation-item-NavigationItem__navigation-item--3RgpV .src-components-navigation-navigation-item-NavigationItem__thumbnail--3kP0F{display:block;max-width:400px;width:100%;border-radius:4px;margin:2px 2px 2px 0}.src-components-navigation-navigation-item-NavigationItem__navigation-item--3RgpV .src-components-navigation-navigation-item-NavigationItem__has-image--Wc2MZ .src-components-navigation-navigation-item-NavigationItem__content-text--SrZ7n{text-shadow:0 2px 3px rgba(0,0,0,0.2),0 1px 0.5px rgba(0,0,0,0.18),0 0 0.8px rgba(0,0,0,0.42)}.src-components-navigation-navigation-item-NavigationItem__navigation-item--3RgpV .src-components-navigation-navigation-item-NavigationItem__thumb-gradient--suGEr{width:100%;min-height:200px;position:absolute;top:2px;left:0;background-image:linear-gradient(to bottom, rgba(0,0,0,0.65) 8%, rgba(0,0,0,0) 72%)}.src-components-navigation-navigation-item-NavigationItem__navigation-item--3RgpV .src-components-navigation-navigation-item-NavigationItem__content-text--SrZ7n{border-radius:3px;padding:4px 4px 4px 4px;position:absolute;top:2px;right:0;left:0}\n',""]),e.locals={"navigation-item":"src-components-navigation-navigation-item-NavigationItem__navigation-item--3RgpV",navigationItem:"src-components-navigation-navigation-item-NavigationItem__navigation-item--3RgpV",selected:"src-components-navigation-navigation-item-NavigationItem__selected--2mnLw",first:"src-components-navigation-navigation-item-NavigationItem__first--oaib8",mid:"src-components-navigation-navigation-item-NavigationItem__mid--2F9Mc",last:"src-components-navigation-navigation-item-NavigationItem__last--2woMb",single:"src-components-navigation-navigation-item-NavigationItem__single--21-Od",metadata:"src-components-navigation-navigation-item-NavigationItem__metadata--3qMAh","icon-wrapper":"src-components-navigation-navigation-item-NavigationItem__icon-wrapper--287Bx",iconWrapper:"src-components-navigation-navigation-item-NavigationItem__icon-wrapper--287Bx",content:"src-components-navigation-navigation-item-NavigationItem__content--2ki6j","with-time":"src-components-navigation-navigation-item-NavigationItem__with-time--3IwuO",withTime:"src-components-navigation-navigation-item-NavigationItem__with-time--3IwuO","show-more-button":"src-components-navigation-navigation-item-NavigationItem__show-more-button--2JHJU",showMoreButton:"src-components-navigation-navigation-item-NavigationItem__show-more-button--2JHJU",description:"src-components-navigation-navigation-item-NavigationItem__description--nC0h3",thumbnail:"src-components-navigation-navigation-item-NavigationItem__thumbnail--3kP0F","has-image":"src-components-navigation-navigation-item-NavigationItem__has-image--Wc2MZ",hasImage:"src-components-navigation-navigation-item-NavigationItem__has-image--Wc2MZ","content-text":"src-components-navigation-navigation-item-NavigationItem__content-text--SrZ7n",contentText:"src-components-navigation-navigation-item-NavigationItem__content-text--SrZ7n","thumb-gradient":"src-components-navigation-navigation-item-NavigationItem__thumb-gradient--suGEr",thumbGradient:"src-components-navigation-navigation-item-NavigationItem__thumb-gradient--suGEr"}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HotspotIcon=void 0;var r=n(2);e.HotspotIcon=function(t){return r.h("svg",{width:"12px",height:"12px",viewBox:"0 0 12 12",version:"1.1"},r.h("g",{id:"Icons/12/hotspot",stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},r.h("path",{d:"M1.71356562,8.71826909 C1.32304133,9.10879339 1.32304133,9.74195836 1.71356562,10.1324827 C2.10408991,10.5230069 2.73725489,10.5230069 3.12777918,10.1324827 L3.83488597,9.42537588 C4.22541026,9.03485158 4.22541026,8.4016866 3.83488597,8.01116231 C3.44436167,7.62063802 2.8111967,7.62063802 2.4206724,8.01116231 L1.71356562,8.71826909 Z M8.07752665,2.35430806 C7.68700236,2.74483235 7.68700236,3.37799733 8.07752665,3.76852163 C8.46805094,4.15904592 9.10121592,4.15904592 9.49174022,3.76852163 L10.198847,3.06141484 C10.5893713,2.67089055 10.5893713,2.03772557 10.198847,1.64720128 C9.8083227,1.25667699 9.17515773,1.25667699 8.78463343,1.64720128 L8.07752665,2.35430806 Z M5,0 C4.48716416,0 4.06449284,0.38604019 4.00672773,0.883378875 L4,1 L4,2 C4,2.55228475 4.44771525,3 5,3 C5.51283584,3 5.93550716,2.61395981 5.99327227,2.11662113 L6,2 L6,1 C6,0.44771525 5.55228475,0 5,0 Z M5.03353,5.45134032 C5.14743877,5.10937025 5.51627947,4.92138528 5.85735876,5.03146414 L5.85735876,5.03146414 L11.5551412,6.87034864 C11.6520317,6.90161878 11.7399495,6.95530689 11.8117885,7.02707252 C12.0646771,7.279709 12.0624384,7.69156431 11.8067877,7.94697779 L11.8067877,7.94697779 L10.9731056,8.77988616 C10.8601518,8.89273517 10.8532121,9.07321331 10.9572561,9.19207926 L10.9572561,9.19207926 L11.6344936,9.96391024 C12.0165361,10.4471237 11.9806364,11.154337 11.5294068,11.6051503 L11.5294068,11.6051503 L11.501519,11.6331064 C11.0155297,12.1185479 10.231919,12.1228281 9.75122702,11.642618 L9.75122702,11.642618 L9.18153853,10.9926766 C9.06505218,10.8755013 8.87482944,10.876215 8.75666414,10.9942706 L8.75666414,10.9942706 L7.94987827,11.8003077 C7.87725549,11.8728631 7.78874887,11.9275149 7.69151269,11.9598454 C7.34921645,12.0736569 6.98239748,11.8896902 6.87219958,11.5489442 L6.87219958,11.5489442 L5.03132653,5.85672976 C4.98881738,5.72528603 4.98958938,5.58325624 5.03353,5.45134032 Z M2,4 C2.55228475,4 3,4.44771525 3,5 C3,5.55228475 2.55228475,6 2,6 L2,6 L1,6 C0.44771525,6 0,5.55228475 0,5 C0,4.44771525 0.44771525,4 1,4 L1,4 Z",id:"Shape",fill:t.color})))},e.HotspotIcon.defaultProps={color:"#FFFFFF"}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AnswerOnAirIcon=void 0;var r=n(2);e.AnswerOnAirIcon=function(t){return r.h("svg",{width:"12px",height:"12px",viewBox:"0 0 12 12",version:"1.1"},r.h("g",{id:"Icons/12/Someone-asks",stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},r.h("path",{d:"M4.36437995,7.74827874 C5.77243804,7.74827874 8.5365211,8.42688888 8.71922879,9.77431827 L8.72875991,9.91609291 L8.72875991,10.4580465 C8.72875991,10.7263135 8.52990785,10.9506822 8.27140017,10.9928733 L8.18321241,11 L0.545547494,11 C0.275501485,11 0.049644822,10.8024579 0.00717394955,10.5456532 L2.7000624e-13,10.4580465 L2.7000624e-13,9.91609291 C2.7000624e-13,8.47449649 2.90776814,7.74827874 4.36437995,7.74827874 Z M10.8727616,1.23941668 C12.3784726,3.21754712 12.3730172,5.83518273 10.8727616,7.75369828 C10.6644616,8.02467505 10.2713067,8.06722512 10.0007053,7.87320494 L9.92350892,7.80789363 L9.9071425,7.79163502 C9.69437897,7.58027314 9.65619065,7.24426194 9.83076585,7.00038285 C10.9164054,5.46123479 10.9218608,3.47226528 9.84713227,1.98731257 C9.6671016,1.73801394 9.69983445,1.40200275 9.91805345,1.18522133 C10.1853717,0.919664094 10.6436316,0.941342236 10.8727616,1.23941668 Z M4.36437995,2.32874331 C5.5695702,2.32874331 6.54656993,3.29930677 6.54656993,4.49655748 C6.54656993,5.69380819 5.5695702,6.66437165 4.36437995,6.66437165 C3.15918971,6.66437165 2.18218998,5.69380819 2.18218998,4.49655748 C2.18218998,3.29930677 3.15918971,2.32874331 4.36437995,2.32874331 Z M9.09973221,3.24464479 C9.52525925,4.06299465 9.52525925,4.98431567 9.11064316,5.77014831 C8.91928188,6.13534162 8.44436503,6.21884736 8.12356225,5.98230203 L8.04682554,5.91647576 L8.03045912,5.90021716 C7.83406202,5.70511388 7.79041822,5.4178785 7.89407224,5.16316034 C8.06864744,4.73501704 8.06864744,4.25809792 7.89407224,3.82995462 C7.80337497,3.60707623 7.8254526,3.35515251 7.95665038,3.16858077 L8.01954817,3.0928978 L8.02500364,3.08747827 C8.34687666,2.76772568 8.89242416,2.84359917 9.09973221,3.24464479 Z",id:"Combined-Shape",fill:t.color})))},e.AnswerOnAirIcon.defaultProps={color:"#FFFFFF"}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ChapterIcon=void 0;var r=n(2);e.ChapterIcon=function(t){return r.h("svg",{width:"12px",height:"12px",viewBox:"0 0 12 12",version:"1.1"},r.h("g",{id:"Icons/12/chapter",stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},r.h("path",{d:"M10.4444444,0 C10.7512693,0 11,0.200670434 11,0.448209958 L11,11.5517852 C11,11.7993248 10.7512693,12 10.4444444,12 C10.308381,12 10.1770485,11.9597107 10.0753534,11.8867815 L6.36909102,9.2288876 C6.15859879,9.07793605 5.84140121,9.07793605 5.63090898,9.2288876 L1.92464658,11.8867815 C1.69532282,12.0512378 1.3441715,12.0345731 1.14032816,11.8495597 C1.04993254,11.7675144 1,11.6615582 1,11.5517852 L1,0.448209958 C1,0.200670434 1.24873069,0 1.55555556,0 L10.4444444,0 Z",id:"Path",fill:t.color})))},e.ChapterIcon.defaultProps={color:"#FFFFFF"}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SlideIcon=void 0;var r=n(2);e.SlideIcon=function(t){return r.h("svg",{width:"12px",height:"12px",viewBox:"0 0 12 12",version:"1.1"},r.h("g",{id:"Icons/12/Slide",stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},r.h("path",{d:"M10,4 C10.5522847,4 11,4.44771525 11,5 L11,11 C11,11.5522847 10.5522847,12 10,12 L2,12 C1.44771525,12 1,11.5522847 1,11 L1,5 C1,4.44771525 1.44771525,4 2,4 L10,4 Z M9,2 C9.51283584,2 9.93550716,2.38604019 9.99327227,2.88337887 L10,3 L2,3 C2,2.44771525 2.44771525,2 3,2 L9,2 Z M8,0 C8.51283584,-9.42064153e-17 8.93550716,0.38604019 8.99327227,0.883378875 L9,1 L3,1 C3,0.44771525 3.44771525,1.01453063e-16 4,0 L8,0 Z",id:"Combined-Shape",fill:t.color})))},e.SlideIcon.defaultProps={color:"#FFFFFF"}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CaptionIcon=void 0;var r=n(2);e.CaptionIcon=function(t){return r.h("svg",{width:"12px",height:"12px",viewBox:"0 0 12 12",version:"1.1"},r.h("g",{id:"Icons/12/Slide",stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},r.h("path",{d:"M11 1c.552 0 1 .448 1 1v8c0 .552-.448 1-1 1H1c-.552 0-1-.448-1-1V2c0-.552.448-1 1-1h10zM3.946 4c-.406 0-.754.085-1.046.254-.292.17-.515.41-.669.719-.154.31-.231.667-.231 1.07 0 .596.168 1.071.505 1.425.337.355.805.532 1.405.532.282 0 .536-.038.761-.115.226-.077.412-.179.56-.305.149-.126.26-.259.331-.398.073-.14.109-.27.109-.393 0-.103-.04-.2-.117-.292-.079-.091-.177-.137-.296-.137-.1 0-.183.032-.252.094-.069.063-.133.149-.192.26-.107.187-.23.326-.368.418-.14.09-.306.136-.5.136-.145 0-.278-.028-.399-.084-.12-.057-.224-.14-.31-.249-.084-.11-.15-.241-.195-.396-.045-.155-.067-.325-.067-.51 0-.394.087-.705.263-.932.175-.227.407-.34.694-.34.199 0 .363.045.492.137.13.091.253.228.372.41.066.094.126.162.18.204.053.042.12.063.2.063.124 0 .229-.04.315-.122.087-.082.13-.182.13-.3 0-.115-.038-.24-.115-.372-.078-.134-.189-.26-.335-.377-.146-.118-.324-.214-.533-.288-.21-.075-.44-.112-.692-.112zm4.329 0c-.406 0-.754.085-1.046.254-.292.17-.515.41-.669.719-.154.31-.231.667-.231 1.07 0 .596.168 1.071.505 1.425.337.355.805.532 1.405.532.282 0 .536-.038.761-.115.226-.077.412-.179.56-.305.149-.126.26-.259.332-.398.072-.14.108-.27.108-.393 0-.103-.04-.2-.117-.292-.079-.091-.177-.137-.296-.137-.1 0-.183.032-.252.094-.069.063-.133.149-.192.26-.107.187-.23.326-.368.418-.14.09-.306.136-.5.136-.145 0-.278-.028-.399-.084-.12-.057-.224-.14-.31-.249-.084-.11-.15-.241-.195-.396-.045-.155-.067-.325-.067-.51 0-.394.087-.705.263-.932.175-.227.407-.34.694-.34.199 0 .363.045.492.137.13.091.253.228.372.41.066.094.126.162.18.204.053.042.12.063.2.063.124 0 .229-.04.315-.122.087-.082.13-.182.13-.3 0-.115-.038-.24-.115-.372-.077-.134-.189-.26-.335-.377-.146-.118-.323-.214-.533-.288-.21-.075-.44-.112-.692-.112z",id:"Combined-Shape",fill:t.color})))},e.CaptionIcon.defaultProps={color:"#FFFFFF"}},function(t,e,n){var r=n(128);"string"==typeof r&&(r=[[t.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n(4)(r,o);r.locals&&(t.exports=r.locals)},function(t,e,n){(e=t.exports=n(3)(!1)).push([t.i,".src-components-navigation-icons-IconsFactory__icon--3Wd2B{display:inline-block}\n",""]),e.locals={icon:"src-components-navigation-icons-IconsFactory__icon--3Wd2B"}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EmptyList=void 0;var r=n(2),o=n(130);e.EmptyList=function(t){var e=t.showNoResultsText;return r.h("div",{className:o.emptyStateWrapper},r.h("svg",{xmlns:"http://www.w3.org/2000/svg",width:"184",height:"184",viewBox:"0 0 184 184"},r.h("g",{fill:"none","fill-rule":"evenodd"},r.h("circle",{cx:"92",cy:"92",r:"92",fill:"#333"}),r.h("g",{transform:"translate(99 5)"},r.h("path",{fill:"#4DA2B3",d:"M41.184 12.743c5.133 11.52 3.33 25.725-5.742 36.162-9.073 10.438-22.89 14.2-35.012 10.72z"}),r.h("path",{fill:"#01ACCD",d:"M18 59c3.095 1.394 6.5 2.165 10.074 2.165.536 0 1.068-.017 1.595-.052l2.325 7.161c.25.768-.153 1.595-.912 1.872l-2.227.814c-.778.284-1.639-.116-1.923-.895l-.018-.051-.26-.803c-.14.42-.463.773-.91.935l-2.226.814c-.778.284-1.64-.116-1.924-.895l-.018-.051z",opacity:".2"}),r.h("path",{fill:"#1F6370",d:"M42.596 0c6.446 0 11.67 5.36 11.67 11.972 0 3.382-1.367 6.437-3.565 8.614C53.418 24.803 55 29.86 55 35.293 55 50.043 43.344 62 28.966 62c-3.935 0-7.665-.895-11.01-2.498 5.91-1.85 11.43-5.336 15.829-10.395 6.322-7.273 9.101-16.39 8.458-25.169-6.282-.191-11.317-5.475-11.317-11.966C30.926 5.36 36.15 0 42.596 0z"}),r.h("circle",{cx:"43",cy:"9",r:"2",fill:"#222"}),r.h("g",{"fill-rule":"nonzero"},r.h("path",{fill:"#01ACCD",d:"M4.72 1.697c-4.454 3.85-4.915 7.539-.258 8.59 2.24.507 5.83.12 8.738-.689 1.776-.494 2.212-2.567.759-3.606L7.777 1.569c-.91-.651-2.218-.596-3.056.128z",transform:"translate(47 9)"}),r.h("path",{fill:"#222",d:"M4.72 1.697c-4.454 3.85-4.915 7.539-.258 8.59 2.24.507 5.83.12 8.738-.689 1.776-.494 2.212-2.567.759-3.606L7.777 1.569c-.91-.651-2.218-.596-3.056.128z",opacity:".7",transform:"translate(47 9)"}))),r.h("path",{fill:"#01ACCD",d:"M92 184c-32.8 0-61.59-17.164-77.879-43h155.758c-16.29 25.836-45.08 43-77.879 43z",opacity:".5"}),r.h("path",{fill:"#01ACCD",d:"M29.302 109.649c1.823 0 3.301-1.489 3.301-3.325S31.125 103 29.302 103c-1.824 0-3.302 1.488-3.302 3.324 0 1.836 1.478 3.325 3.302 3.325zm0-2c-.716 0-1.302-.59-1.302-1.325 0-.734.586-1.324 1.302-1.324.715 0 1.301.59 1.301 1.324 0 .735-.586 1.325-1.301 1.325z",opacity:".3"}),r.h("path",{fill:"#01ACCD",d:"M5.5 2.5L8 2.5 8 5.5 5.5 5.5 5.5 8 2.5 8 2.5 5.5 0 5.5 0 2.5 2.5 2.5 2.5 0 5.5 0z",opacity:".9",transform:"translate(161 95)"}),r.h("path",{fill:"#01ACCD",d:"M5.5 2.5L8 2.5 8 5.5 5.5 5.5 5.5 8 2.5 8 2.5 5.5 0 5.5 0 2.5 2.5 2.5 2.5 0 5.5 0z",opacity:".9",transform:"translate(58 13)"}),r.h("path",{fill:"#01ACCD",d:"M69.302 39.649c1.823 0 3.301-1.489 3.301-3.325S71.125 33 69.302 33C67.478 33 66 34.488 66 36.324c0 1.836 1.478 3.325 3.302 3.325zm0-2c-.716 0-1.302-.59-1.302-1.325 0-.734.586-1.324 1.302-1.324.715 0 1.301.59 1.301 1.324 0 .735-.586 1.325-1.301 1.325z",opacity:".5"}),r.h("path",{fill:"#01ACCD",d:"M41.302 88.649c1.823 0 3.301-1.489 3.301-3.325S43.125 82 41.302 82C39.478 82 38 83.488 38 85.324c0 1.836 1.478 3.325 3.302 3.325zm0-2c-.716 0-1.302-.59-1.302-1.325 0-.734.586-1.324 1.302-1.324.715 0 1.301.59 1.301 1.324 0 .735-.586 1.325-1.301 1.325zM132.302 128.649c1.823 0 3.301-1.489 3.301-3.325S134.125 122 132.302 122c-1.824 0-3.302 1.488-3.302 3.324 0 1.836 1.478 3.325 3.302 3.325zm0-2c-.716 0-1.302-.59-1.302-1.325 0-.734.586-1.324 1.302-1.324.715 0 1.301.59 1.301 1.324 0 .735-.586 1.325-1.301 1.325z",opacity:".8"}),r.h("path",{fill:"#01ACCD",d:"M5.5 2.5L8 2.5 8 5.5 5.5 5.5 5.5 8 2.5 8 2.5 5.5 0 5.5 0 2.5 2.5 2.5 2.5 0 5.5 0z",opacity:".3",transform:"translate(18 74)"}),r.h("path",{fill:"#01ACCD",d:"M147.302 114.649c1.823 0 3.301-1.489 3.301-3.325S149.125 108 147.302 108c-1.824 0-3.302 1.488-3.302 3.324 0 1.836 1.478 3.325 3.302 3.325zm0-2c-.716 0-1.302-.59-1.302-1.325 0-.734.586-1.324 1.302-1.324.715 0 1.301.59 1.301 1.324 0 .735-.586 1.325-1.301 1.325z",opacity:".6"}),r.h("path",{fill:"#01ACCD",d:"M5.5 2.5L8 2.5 8 5.5 5.5 5.5 5.5 8 2.5 8 2.5 5.5 0 5.5 0 2.5 2.5 2.5 2.5 0 5.5 0z",opacity:".4",transform:"translate(80 17)"}),r.h("path",{fill:"#01ACCD",d:"M5.5 2.5L8 2.5 8 5.5 5.5 5.5 5.5 8 2.5 8 2.5 5.5 0 5.5 0 2.5 2.5 2.5 2.5 0 5.5 0z",opacity:".4",transform:"translate(157 122)"}),r.h("ellipse",{cx:"90",cy:"161",fill:"#222",opacity:".5",rx:"19",ry:"7"}),r.h("ellipse",{cx:"90",cy:"161",fill:"#222",opacity:".5",rx:"31",ry:"11"}),r.h("g",{transform:"translate(83 73)"},r.h("path",{fill:"#4DA2B3",d:"M44.024 4C49.41 7.095 53 12.652 53 18.993c0 6.35-3.601 11.915-9 15.007l.022-.238.007-.241V4.218L44.024 4z"}),r.h("path",{fill:"#01ACCD",d:"M41.001 7l-.945 24.56-19.585-3.2c-.144-.021-.29-.036-.436-.043l-.22-.006c-2.304 0-4.187 1.783-4.319 4.032l-.007.252v56.17C13.587 90.255 10.869 91 7.337 91c-3.364 0-5.742-.676-7.134-2.027L0 88.765V21.24c0-5.77 4.34-10.612 10.082-11.332l.368-.04L41.001 7z",opacity:".296"}),r.h("path",{fill:"#3F7B86",d:"M0 65.071c1.985.947 4.818 1.464 7.934 1.464 2.924 0 5.598-.455 7.556-1.293v23.523C13.588 90.255 10.87 91 7.339 91c-3.364 0-5.743-.676-7.135-2.027l-.201-.208zm0-27.12c1.985.946 4.818 1.463 7.934 1.463 2.924 0 5.598-.455 7.556-1.293v23.933c-1.015.76-3.98 1.625-7.556 1.625-4.435 0-7.931-1.331-7.931-2.142zM27.205 8.294c-.799 2.777-1.215 6.412-1.215 10.414 0 4.176.453 7.95 1.32 10.77l-6.837-1.118c-.145-.022-.29-.037-.436-.044l-.22-.006c-2.304 0-4.187 1.783-4.319 4.032l-.007.252v2.338c-1.015.76-3.98 1.625-7.556 1.625-4.435 0-7.931-1.331-7.931-2.142V21.24c0-5.77 4.339-10.612 10.08-11.332l.37-.04zM41 7l-.945 24.56-9.153-1.496c-.786-2.004-1.65-6.368-1.65-11.355 0-4.527.712-8.54 1.431-10.741L41.001 7z"}),r.h("path",{fill:"#222",d:"M16.103 27.277l.22.005c.146.007.292.022.437.044l23.31 3.86-.014.374-19.585-3.2c-.144-.021-.29-.036-.436-.043l-.22-.006c-2.304 0-4.187 1.783-4.319 4.032l-.007.252v56.17c-1.056.827-2.363 1.425-3.92 1.793l.208-58.998.007-.251c.132-2.249 2.015-4.032 4.32-4.032zM41.001 7l-.005.114-2.603.131L41.001 7z",opacity:".7"}),r.h("rect",{width:"6",height:"37",x:"39.001",fill:"#1F6370",rx:"3"})))),e&&r.h("div",{className:o.primaryText},"No Results Found"),e&&r.h("div",{className:o.secondaryText},"Try a more general keyword"))}},function(t,e,n){var r=n(131);"string"==typeof r&&(r=[[t.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n(4)(r,o);r.locals&&(t.exports=r.locals)},function(t,e,n){(e=t.exports=n(3)(!1)).push([t.i,".src-components-navigation-icons-EmptyList__empty-state-wrapper--E4JG6{text-align:center;margin-top:40%;margin-bottom:auto}.src-components-navigation-icons-EmptyList__empty-state-wrapper--E4JG6 .src-components-navigation-icons-EmptyList__primary-text--3aDkj,.src-components-navigation-icons-EmptyList__empty-state-wrapper--E4JG6 .src-components-navigation-icons-EmptyList__secondary-text--1W1TT{color:#999999}.src-components-navigation-icons-EmptyList__empty-state-wrapper--E4JG6 .src-components-navigation-icons-EmptyList__primary-text--3aDkj{margin-top:12px;font-size:18px;font-weight:bold}.src-components-navigation-icons-EmptyList__empty-state-wrapper--E4JG6 .src-components-navigation-icons-EmptyList__secondary-text--1W1TT{margin-top:4px;font-size:14px}\n",""]),e.locals={"empty-state-wrapper":"src-components-navigation-icons-EmptyList__empty-state-wrapper--E4JG6",emptyStateWrapper:"src-components-navigation-icons-EmptyList__empty-state-wrapper--E4JG6","primary-text":"src-components-navigation-icons-EmptyList__primary-text--3aDkj",primaryText:"src-components-navigation-icons-EmptyList__primary-text--3aDkj","secondary-text":"src-components-navigation-icons-EmptyList__secondary-text--1W1TT",secondaryText:"src-components-navigation-icons-EmptyList__secondary-text--1W1TT"}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EmptyState=void 0;var r=n(2);e.EmptyState=function(){return r.h("div",{style:{"text-align":"center","margin-top":"50%","margin-bottom":"auto"}},r.h("svg",{xmlns:"http://www.w3.org/2000/svg",width:"240",height:"257",viewBox:"0 0 240 257"},r.h("g",{fill:"none","fill-rule":"evenodd"},r.h("text",{fill:"#999","font-family":"Lato-Bold, Lato","font-size":"18","font-weight":"bold",transform:"translate(-1)"},r.h("tspan",{x:"2.276",y:"218"},"Search in the video for results")),r.h("g",{transform:"translate(-1) translate(29)"},r.h("circle",{cx:"92",cy:"92",r:"92",fill:"#333"}),r.h("g",{opacity:".5"},r.h("g",{transform:"translate(31 18) rotate(-10 88.005 3.565)"},r.h("rect",{width:"87",height:"103",fill:"#01ACCD",rx:"5"}),r.h("g",{fill:"#222",opacity:".7",transform:"translate(16 16)"},r.h("rect",{width:"55",height:"8",rx:"2"}),r.h("rect",{width:"55",height:"8",y:"47",rx:"2"}),r.h("rect",{width:"55",height:"8",y:"63",rx:"2"}),r.h("rect",{width:"16",height:"23",y:"16",rx:"2"}),r.h("rect",{width:"37",height:"23",x:"18",y:"16",rx:"2"}))),r.h("path",{fill:"#222",d:"M89.525 74c3.494 0 6.882.453 10.108 1.304l3.78 21.436c.48 2.72-1.336 5.313-4.055 5.792l-49.292 8.691C51.258 90.465 68.469 74 89.525 74z",opacity:".5",transform:"translate(31 18)"})),r.h("g",null,r.h("path",{fill:"#CCC",d:"M33.15 0C51.458 0 66.3 14.461 66.3 32.3c0 7.55-2.659 14.496-7.114 19.996l17.672 17.217c1.523 1.484 1.523 3.89 0 5.374-1.523 1.484-3.993 1.484-5.516 0l-17.67-17.219C48.028 62.01 40.9 64.6 33.15 64.6 14.842 64.6 0 50.139 0 32.3S14.842 0 33.15 0zm.357 5.507c-14.865 0-26.915 11.836-26.915 26.435 0 14.6 12.05 26.435 26.915 26.435 14.865 0 26.916-11.835 26.916-26.435 0-14.6-12.05-26.435-26.916-26.435z",transform:"translate(90 93)"}),r.h("path",{fill:"#01ACCD",d:"M33.15 0C51.458 0 66.3 14.461 66.3 32.3c0 7.55-2.659 14.496-7.114 19.996l17.672 17.217c1.523 1.484 1.523 3.89 0 5.374-1.523 1.484-3.993 1.484-5.516 0l-17.67-17.219C48.028 62.01 40.9 64.6 33.15 64.6 14.842 64.6 0 50.139 0 32.3S14.842 0 33.15 0zm.357 5.507c-14.865 0-26.915 11.836-26.915 26.435 0 14.6 12.05 26.435 26.915 26.435 14.865 0 26.916-11.835 26.916-26.435 0-14.6-12.05-26.435-26.916-26.435z",opacity:".5",transform:"translate(90 93)"}),r.h("path",{fill:"#222",d:"M33.507 5.507c-14.865 0-26.915 11.836-26.915 26.435 0 14.6 12.05 26.435 26.915 26.435 14.865 0 26.916-11.835 26.916-26.435 0-14.6-12.05-26.435-26.916-26.435z",opacity:".316",transform:"translate(90 93)"})),r.h("path",{fill:"#01ACCD",d:"M136.302 30.649c1.823 0 3.301-1.489 3.301-3.325S138.125 24 136.302 24c-1.824 0-3.302 1.488-3.302 3.324 0 1.836 1.478 3.325 3.302 3.325zm0-2c-.716 0-1.302-.59-1.302-1.325 0-.734.586-1.324 1.302-1.324.715 0 1.301.59 1.301 1.324 0 .735-.586 1.325-1.301 1.325z",opacity:".3"}),r.h("path",{fill:"#01ACCD",d:"M5.5 2.5L8 2.5 8 5.5 5.5 5.5 5.5 8 2.5 8 2.5 5.5 0 5.5 0 2.5 2.5 2.5 2.5 0 5.5 0z",opacity:".9",transform:"translate(132 44)"}),r.h("path",{fill:"#01ACCD",d:"M171.302 98.649c1.823 0 3.301-1.489 3.301-3.325S173.125 92 171.302 92c-1.824 0-3.302 1.488-3.302 3.324 0 1.836 1.478 3.325 3.302 3.325zm0-2c-.716 0-1.302-.59-1.302-1.325 0-.734.586-1.324 1.302-1.324.715 0 1.301.59 1.301 1.324 0 .735-.586 1.325-1.301 1.325z",opacity:".8"}),r.h("path",{fill:"#01ACCD",d:"M5.5 2.5L8 2.5 8 5.5 5.5 5.5 5.5 8 2.5 8 2.5 5.5 0 5.5 0 2.5 2.5 2.5 2.5 0 5.5 0z",opacity:".3",transform:"translate(164 109)"}),r.h("path",{fill:"#01ACCD",d:"M66.302 157.649c1.823 0 3.301-1.489 3.301-3.325S68.125 151 66.302 151c-1.824 0-3.302 1.488-3.302 3.324 0 1.836 1.478 3.325 3.302 3.325zm0-2c-.716 0-1.302-.59-1.302-1.325 0-.734.586-1.324 1.302-1.324.715 0 1.301.59 1.301 1.324 0 .735-.586 1.325-1.301 1.325z",opacity:".3"}),r.h("path",{fill:"#01ACCD",d:"M5.5 2.5L8 2.5 8 5.5 5.5 5.5 5.5 8 2.5 8 2.5 5.5 0 5.5 0 2.5 2.5 2.5 2.5 0 5.5 0z",opacity:".3",transform:"translate(12 76)"}),r.h("g",{fill:"#01ACCD",opacity:".9"},r.h("path",{d:"M5.5 2.5L8 2.5 8 5.5 5.5 5.5 5.5 8 2.5 8 2.5 5.5 0 5.5 0 2.5 2.5 2.5 2.5 0 5.5 0z",transform:"translate(71 164)"})),r.h("g",{fill:"#01ACCD",opacity:".8"},r.h("path",{d:"M3.302 6.649c1.823 0 3.301-1.489 3.301-3.325S5.125 0 3.302 0C1.478 0 0 1.488 0 3.324 0 5.16 1.478 6.65 3.302 6.65zm0-2C2.586 4.649 2 4.059 2 3.324 2 2.59 2.586 2 3.302 2c.715 0 1.301.59 1.301 1.324 0 .735-.586 1.325-1.301 1.325z",transform:"translate(13 102)"}))))))}},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.NavigationSearch=void 0;var i=n(2),a=n(134),s=n(6),c=function(t){function e(e){var n=t.call(this,e)||this;return n._inputRef=null,n._focusedByMouse=!1,n._handleOnChange=function(t){n._debouncedOnChange(t.target.value)},n._onClear=function(t){var e;0!==t.x&&0!==t.y&&(n._focusedByMouse=!0),null===(e=n._inputRef)||void 0===e||e.focus(),n.props.onChange("")},n._onFocus=function(){n.setState({active:!0,focused:!n._focusedByMouse}),n._focusedByMouse=!1},n._onBlur=function(){n.setState({active:!1,focused:!1})},n._handleMouseDown=function(){n._focusedByMouse=!0},n._debouncedOnChange=s.debounce(e.onChange,300),n.state={active:!1,focused:!1},n}return o(e,t),e.prototype.shouldComponentUpdate=function(t,e){var n=this.props,r=n.searchQuery,o=n.kitchenSinkActive;return r!==t.searchQuery||o!==t.kitchenSinkActive||this.state.active!==e.active},e.prototype.componentDidUpdate=function(t){var e,n=this.props,r=n.kitchenSinkActive,o=n.toggledWithEnter;!t.kitchenSinkActive&&r&&(this._focusedByMouse=!o,null===(e=this._inputRef)||void 0===e||e.focus())},e.prototype.render=function(){var t=this,e=this.props.searchQuery;return i.h("div",{className:[a.searchRoot,e||this.state.active?a.active:"",this.state.focused?a.focused:""].join(" ")},i.h("input",{className:a.searchInput,placeholder:"Search in video",value:e,onInput:this._handleOnChange,onFocus:this._onFocus,onBlur:this._onBlur,onMouseDown:this._handleMouseDown,tabIndex:1,ref:function(e){t._inputRef=e}}),e&&i.h("button",{className:a.clearIcon,onClick:this._onClear,tabIndex:1}))},e}(i.Component);e.NavigationSearch=c},function(t,e,n){var r=n(135);"string"==typeof r&&(r=[[t.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n(4)(r,o);r.locals&&(t.exports=r.locals)},function(t,e,n){e=t.exports=n(3)(!1);var r=n(17)(n(136));e.push([t.i,".src-components-navigation-search-navigation-search__search-root--vkDDB{display:flex;align-items:center;flex-grow:1;width:100%;max-width:599px;height:32px;background-color:rgba(255,255,255,0.24);border:solid 1px rgba(255,255,255,0.4);border-radius:4px}.src-components-navigation-search-navigation-search__search-root--vkDDB ::-moz-placeholder{opacity:1}.src-components-navigation-search-navigation-search__search-root--vkDDB .src-components-navigation-search-navigation-search__search-input--27i15{width:100%;flex-grow:1;flex-shrink:1;font-size:15px;padding:0 8px;color:#cccccc;background:transparent;border:none;overflow:hidden;text-overflow:ellipsis}.src-components-navigation-search-navigation-search__search-root--vkDDB .src-components-navigation-search-navigation-search__search-input--27i15:focus{outline:none !important}.src-components-navigation-search-navigation-search__search-root--vkDDB .src-components-navigation-search-navigation-search__search-input--27i15::placeholder{color:#cccccc}.src-components-navigation-search-navigation-search__search-root--vkDDB .src-components-navigation-search-navigation-search__search-input--27i15::selection{background-color:#5b80a7}.src-components-navigation-search-navigation-search__search-root--vkDDB .src-components-navigation-search-navigation-search__clear-icon--14WbK{flex:0 0 32px;max-width:32px;max-height:32px;background-color:transparent;background-position:center;background-image:url("+r+");width:32px;height:32px;border:none;cursor:pointer}.src-components-navigation-search-navigation-search__search-root--vkDDB.src-components-navigation-search-navigation-search__active--Ui9Hx{color:#cccccc;background:#000000}.src-components-navigation-search-navigation-search__search-root--vkDDB.src-components-navigation-search-navigation-search__focused--ac28p{box-shadow:0 0 0 1px #00cbff;border-radius:4px}\n",""]),e.locals={"search-root":"src-components-navigation-search-navigation-search__search-root--vkDDB",searchRoot:"src-components-navigation-search-navigation-search__search-root--vkDDB","search-input":"src-components-navigation-search-navigation-search__search-input--27i15",searchInput:"src-components-navigation-search-navigation-search__search-input--27i15","clear-icon":"src-components-navigation-search-navigation-search__clear-icon--14WbK",clearIcon:"src-components-navigation-search-navigation-search__clear-icon--14WbK",active:"src-components-navigation-search-navigation-search__active--Ui9Hx",focused:"src-components-navigation-search-navigation-search__focused--ac28p"}},function(t,e){t.exports="data:image/svg+xml,%3C?xml version='1.0' encoding='UTF-8'?%3E %3Csvg width='32px' height='32px' viewBox='0 0 32 32' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E %3C!-- Generator: Sketch 57.1 (83088) - https://sketch.com --%3E %3Ctitle%3EIcons/32/Clere%3C/title%3E %3Cdesc%3ECreated with Sketch.%3C/desc%3E %3Cg id='Icons/32/Clere' stroke='none' stroke-width='1' fill='none' fill-rule='evenodd'%3E %3Cpath d='M16,8 C20.418278,8 24,11.581722 24,16 C24,20.418278 20.418278,24 16,24 C11.581722,24 8,20.418278 8,16 C8,11.581722 11.581722,8 16,8 Z M19.8665357,12.1334643 C19.6885833,11.9555119 19.4000655,11.9555119 19.2221131,12.1334643 L16,15.356 L12.7778869,12.1334643 L12.7064039,12.0750737 C12.5295326,11.9582924 12.2891726,11.977756 12.1334643,12.1334643 L12.0750737,12.2049473 C11.9582924,12.3818186 11.977756,12.6221786 12.1334643,12.7778869 L15.356,16 L12.1334643,19.2221131 C11.9555119,19.4000655 11.9555119,19.6885833 12.1334643,19.8665357 C12.3114167,20.0444881 12.5999345,20.0444881 12.7778869,19.8665357 L16,16.644 L19.2221131,19.8665357 L19.2935961,19.9249263 C19.4704674,20.0417076 19.7108274,20.022244 19.8665357,19.8665357 L19.9249263,19.7950527 C20.0417076,19.6181814 20.022244,19.3778214 19.8665357,19.2221131 L16.644,16 L19.8665357,12.7778869 C20.0444881,12.5999345 20.0444881,12.3114167 19.8665357,12.1334643 Z' id='Shape' fill='%23cccccc'%3E%3C/path%3E %3C/g%3E %3C/svg%3E"},function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||e.hasOwnProperty(n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),o(n(138),e)},function(t,e,n){"use strict";var r,o,i=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.NavigationFilter=void 0;var a=n(2),s=n(139),c=n(9),u=n(57),l=KalturaPlayer.ui.components.Tooltip.Tooltip,p=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._handleChange=function(t){e.props.onChange(t)},e._renderTab=function(t){var n={borderColor:u.IconColors[t.type],backgroundColor:u.BackgroundColors[t.type]};return a.h("button",{key:t.type,tabIndex:1,className:[s.tab,t.isActive?s.active:""].join(" "),style:n,onClick:function(){return e._handleChange(t.type)}},t.type===c.itemTypes.All?a.h("span",null,e.props.translates[c.itemTypes.All]):a.h(a.Fragment,null,a.h(l,{label:t.label},a.h(u.IconsFactory,{iconType:t.type,color:t.isActive?null:"#cccccc"})),e.props.availableTabs.length<4&&a.h("span",{className:s.label},t.label)))},e._getTabsData=function(){var t=e.props,n=t.availableTabs,r=t.activeTab,o=t.translates;return n.map((function(t){return{type:t,isActive:r===t,label:o[t]}}))},e._getResultLabel=function(){var t=e.props,n=t.activeTab,r=t.translates,o=t.totalResults,i=t.listDataContainCaptions;return o+" result"+(o&&o>1?"s":"")+" in "+(n===c.itemTypes.All?"all content"+(i?" including captions":""):r[n].toLowerCase())},e}return i(e,t),e.prototype.shouldComponentUpdate=function(t){var e=this.props,n=e.activeTab,r=e.availableTabs,o=e.totalResults;return n!==t.activeTab||r!==t.availableTabs||o!==t.totalResults},e.prototype.render=function(){var t=this,e=this.props.totalResults,n=this._getTabsData();return n.length<2?null:a.h("div",{className:s.filterRoot},0!==e&&a.h("div",{className:s.tabsWrapper},n.map((function(e){return t._renderTab(e)}))),!!e&&a.h("div",{className:s.totalResults},this._getResultLabel()))},e.defaultProps={translates:(o={},o[c.itemTypes.All]="All",o[c.itemTypes.AnswerOnAir]="Answer On Air",o[c.itemTypes.Chapter]="Chapters",o[c.itemTypes.Slide]="Slides",o[c.itemTypes.Hotspot]="Hotspots",o[c.itemTypes.Caption]="Captions",o)},e}(a.Component);e.NavigationFilter=p},function(t,e,n){var r=n(140);"string"==typeof r&&(r=[[t.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n(4)(r,o);r.locals&&(t.exports=r.locals)},function(t,e,n){(e=t.exports=n(3)(!1)).push([t.i,".src-components-navigation-filter-navigation-filter__filter-root--32xSE{display:flex;flex-direction:column;width:100%;margin-top:8px;padding-right:10px}.src-components-navigation-filter-navigation-filter__filter-root--32xSE .src-components-navigation-filter-navigation-filter__tabs-wrapper--3AO4z{display:flex;height:32px;width:100%}.src-components-navigation-filter-navigation-filter__filter-root--32xSE .src-components-navigation-filter-navigation-filter__tabs-wrapper--3AO4z .src-components-navigation-filter-navigation-filter__tab--3CAjz{display:flex;flex:1 1 0px;justify-content:center;align-items:center;padding-bottom:2px;background-color:transparent;background-position:center;background-repeat:no-repeat;color:white;border:none;cursor:pointer}.src-components-navigation-filter-navigation-filter__filter-root--32xSE .src-components-navigation-filter-navigation-filter__tabs-wrapper--3AO4z .src-components-navigation-filter-navigation-filter__tab--3CAjz:hover{border-radius:4px}.src-components-navigation-filter-navigation-filter__filter-root--32xSE .src-components-navigation-filter-navigation-filter__tabs-wrapper--3AO4z .src-components-navigation-filter-navigation-filter__tab--3CAjz:not(:hover){background-color:transparent !important}.src-components-navigation-filter-navigation-filter__filter-root--32xSE .src-components-navigation-filter-navigation-filter__tabs-wrapper--3AO4z .src-components-navigation-filter-navigation-filter__tab--3CAjz.src-components-navigation-filter-navigation-filter__active--1UnQ3{padding-bottom:0;border-bottom:2px solid;border-bottom-left-radius:1px;border-bottom-right-radius:1px}.src-components-navigation-filter-navigation-filter__filter-root--32xSE .src-components-navigation-filter-navigation-filter__tabs-wrapper--3AO4z .src-components-navigation-filter-navigation-filter__tab--3CAjz .src-components-navigation-filter-navigation-filter__label--3fHZu{margin-left:5px;font-size:13px;line-height:1.15;color:#cccccc;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.src-components-navigation-filter-navigation-filter__filter-root--32xSE .src-components-navigation-filter-navigation-filter__total-results--23bcJ{margin-top:8px;padding:8px;text-align:left;font-size:14px;line-height:1.29;font-weight:bold;border-radius:4px;background-color:rgba(255,255,255,0.16)}\n",""]),e.locals={"filter-root":"src-components-navigation-filter-navigation-filter__filter-root--32xSE",filterRoot:"src-components-navigation-filter-navigation-filter__filter-root--32xSE","tabs-wrapper":"src-components-navigation-filter-navigation-filter__tabs-wrapper--3AO4z",tabsWrapper:"src-components-navigation-filter-navigation-filter__tabs-wrapper--3AO4z",tab:"src-components-navigation-filter-navigation-filter__tab--3CAjz",active:"src-components-navigation-filter-navigation-filter__active--1UnQ3",label:"src-components-navigation-filter-navigation-filter__label--3fHZu","total-results":"src-components-navigation-filter-navigation-filter__total-results--23bcJ",totalResults:"src-components-navigation-filter-navigation-filter__total-results--23bcJ"}},function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||e.hasOwnProperty(n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),o(n(142),e)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Error=void 0;var r=n(2),o=n(143);e.Error=function(t){return r.h("div",{className:o.errorWrapper},r.h("div",{className:o.devider}),r.h("div",{className:o.iconWrapper},r.h("div",{className:o.errorIcon}),r.h("p",{className:o.errorMainText},t.translates.whoops),r.h("p",{className:o.errorDescriptionText},t.translates.errorMessage),r.h("button",{className:o.retryButton,onClick:t.onRetryLoad},t.translates.retry)))},e.Error.defaultProps={translates:{whoops:"Whoops!",errorMessage:"We couldn’t retrieve your Data.",retry:"Retry"}}},function(t,e,n){var r=n(144);"string"==typeof r&&(r=[[t.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n(4)(r,o);r.locals&&(t.exports=r.locals)},function(t,e,n){e=t.exports=n(3)(!1);var r=n(17)(n(145));e.push([t.i,".src-components-error-error__error-wrapper--1KMVr{height:100%;width:100%;display:flex;flex-direction:column;color:#999999}.src-components-error-error__error-wrapper--1KMVr .src-components-error-error__devider--2exsE{align-self:flex-start;margin-left:16px;margin-right:8px;height:1px;width:calc(100% - 24px);opacity:0.4;background-color:#ffffff}.src-components-error-error__error-wrapper--1KMVr .src-components-error-error__icon-wrapper--39DIS{display:flex;flex-direction:column;justify-content:center;align-items:center;height:100%}.src-components-error-error__error-wrapper--1KMVr .src-components-error-error__icon-wrapper--39DIS .src-components-error-error__error-icon--8nn3r{width:100%;height:100%;max-width:184px;max-height:184px;background-size:contain;background-repeat:no-repeat;background-position:center;background-image:url("+r+")}.src-components-error-error__error-wrapper--1KMVr .src-components-error-error__icon-wrapper--39DIS .src-components-error-error__error-main-text--2OEdS{font-size:1.3em;margin-top:8px;margin-bottom:2px}.src-components-error-error__error-wrapper--1KMVr .src-components-error-error__icon-wrapper--39DIS .src-components-error-error__error-description-text--4t3u0{margin:0}.src-components-error-error__error-wrapper--1KMVr .src-components-error-error__icon-wrapper--39DIS .src-components-error-error__retry-button--1knXT{width:88px;height:32px;padding:0;margin-top:12px;background:inherit;color:white;border-radius:18px;text-align:center;border:solid 2px rgba(255,255,255,0.2);cursor:pointer}\n",""]),e.locals={"error-wrapper":"src-components-error-error__error-wrapper--1KMVr",errorWrapper:"src-components-error-error__error-wrapper--1KMVr",devider:"src-components-error-error__devider--2exsE","icon-wrapper":"src-components-error-error__icon-wrapper--39DIS",iconWrapper:"src-components-error-error__icon-wrapper--39DIS","error-icon":"src-components-error-error__error-icon--8nn3r",errorIcon:"src-components-error-error__error-icon--8nn3r","error-main-text":"src-components-error-error__error-main-text--2OEdS",errorMainText:"src-components-error-error__error-main-text--2OEdS","error-description-text":"src-components-error-error__error-description-text--4t3u0",errorDescriptionText:"src-components-error-error__error-description-text--4t3u0","retry-button":"src-components-error-error__retry-button--1knXT",retryButton:"src-components-error-error__retry-button--1knXT"}},function(t,e){t.exports="data:image/svg+xml,%3C?xml version='1.0' encoding='UTF-8'?%3E %3Csvg width='184px' height='184px' viewBox='0 0 184 184' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E %3C!-- Generator: Sketch 57.1 (83088) - https://sketch.com --%3E %3Ctitle%3EIL/ Error%3C/title%3E %3Cdesc%3ECreated with Sketch.%3C/desc%3E %3Cg id='IL/-Error' stroke='none' stroke-width='1' fill='none' fill-rule='evenodd'%3E %3Ccircle id='Oval' fill='%23333333' cx='92' cy='92' r='92'%3E%3C/circle%3E %3Cpath d='M86.8445942,41 C98.1281098,41 107.894768,46.3707345 112.610486,54.1896075 L112.772795,54.4651697 C121.905986,54.9935965 129.089492,60.510023 129.089492,67.2372881 C129.089492,67.4828605 129.07992,67.7268193 129.06103,67.9689809 C143.527428,69.1244669 154.803778,78.4637688 154.803778,89.8135593 C154.803778,101.945102 141.920543,111.779661 126.028268,111.779661 C122.218304,111.779661 118.581281,111.214432 115.253251,110.187831 C110.482744,111.936312 104.172429,113 97.2527575,113 C90.6076765,113 84.5245506,112.019057 79.8270144,110.392971 C76.2815407,111.290993 72.4601472,111.779661 68.4772473,111.779661 C49.8799037,111.779661 34.8037779,101.125556 34.8037779,87.9830508 C34.8037779,77.4055553 44.569383,68.439928 58.0766538,65.3432099 C58.0715743,65.1615713 58.069084,64.9793312 58.069084,64.7966102 C58.069084,51.6541053 70.9523188,41 86.8445942,41 Z' id='Combined-Shape' fill='%231A7080'%3E%3C/path%3E %3Cpath d='M83.1492849,135.070223 C82.1325765,138.189187 86.1421275,140.443183 88.278329,137.95355 L112.039401,110.261242 C113.708897,108.315531 112.326427,105.307692 109.76264,105.307692 L102.55417,105.307692 L108.530391,92.2483573 C109.439682,90.2613598 107.987631,88 105.802461,88 L90.6745782,88 C89.4360625,88 88.3248534,88.7610908 87.8773011,89.9159147 L79.0065008,112.805338 C78.2445332,114.771451 79.6951774,116.889423 81.8037779,116.889423 L89.0757959,116.889423 L83.1492849,135.070223 Z' id='Path-8' fill='%23333333' fill-rule='nonzero'%3E%3C/path%3E %3Cpolygon id='Path-8' fill='%23999999' points='90.6745782 91 81.8037779 113.889423 93.2090926 113.889423 86.0015674 136 109.76264 108.307692 97.8821035 108.307692 105.802461 91'%3E%3C/polygon%3E %3Cpolygon id='Path-8' fill='%2301ACCD' opacity='0.5' points='90.6745782 91 81.8037779 113.889423 93.2090926 113.889423 86.0015674 136 109.76264 108.307692 97.8821035 108.307692 105.802461 91'%3E%3C/polygon%3E %3Cpath d='M86.9135883,41 C90.3885178,41 93.7197752,41.5049061 96.8044095,42.4302153 C80.0521708,44.2102049 67.0736479,56.714855 67.0736479,71.8761372 C67.0736479,72.1038764 67.0765763,72.331016 67.0824019,72.557529 C51.5088979,76.3414085 40.1641521,87.1546035 39.7216459,99.9991784 C36.6015945,96.4151247 34.8037779,92.202078 34.8037779,87.6945045 C34.8037779,77.1820037 44.5822685,68.2714617 58.1073807,65.1937351 C58.1024214,65.013137 58.0999284,64.8320391 58.0999284,64.6504633 C58.0999284,51.5886731 71.0002433,41 86.9135883,41 Z' id='Combined-Shape' fill='%23222222' opacity='0.3'%3E%3C/path%3E %3Cpath d='M90.8028945,22 L90.8028945,29.0476864 C90.8028945,29.5999712 91.2506097,30.0476864 91.8028945,30.0476864 C92.3551792,30.0476864 92.8028945,29.5999712 92.8028945,29.0476864 L92.8028945,22 C92.8028945,21.4477153 92.3551792,21 91.8028945,21 C91.2506097,21 90.8028945,21.4477153 90.8028945,22 Z M126.112197,30.8515352 L121.582032,36.2503762 C121.22703,36.6734508 121.282214,37.3042064 121.705288,37.6592082 C122.128363,38.01421 122.759119,37.9590261 123.114121,37.5359514 L127.644286,32.1371104 C127.999288,31.7140357 127.944104,31.0832801 127.521029,30.7282783 C127.097955,30.3732765 126.467199,30.4284605 126.112197,30.8515352 Z M152.431974,58.6783398 L145.491357,59.9021577 C144.947463,59.9980609 144.584295,60.5167193 144.680198,61.0606136 C144.776101,61.6045079 145.294759,61.9676764 145.838654,61.8717732 L152.77927,60.6479553 C153.323164,60.552052 153.686333,60.0333936 153.59043,59.4894993 C153.494526,58.945605 152.975868,58.5824365 152.431974,58.6783398 Z M30.826519,60.6479553 L37.7671352,61.8717732 C38.3110295,61.9676764 38.8296879,61.6045079 38.9255912,61.0606136 C39.0214944,60.5167193 38.6583259,59.9980609 38.1144316,59.9021577 L31.1738154,58.6783398 C30.6299211,58.5824365 30.1112627,58.945605 30.0153594,59.4894993 C29.9194562,60.0333936 30.2826247,60.552052 30.826519,60.6479553 Z M55.9615029,32.1371104 L60.4916684,37.5359514 C60.8466702,37.9590261 61.4774258,38.01421 61.9005005,37.6592082 C62.3235751,37.3042064 62.3787591,36.6734508 62.0237573,36.2503762 L57.4935918,30.8515352 C57.13859,30.4284605 56.5078344,30.3732765 56.0847597,30.7282783 C55.6616851,31.0832801 55.6065011,31.7140357 55.9615029,32.1371104 Z' id='Path-9' fill='%2301ACCD' fill-rule='nonzero' opacity='0.5'%3E%3C/path%3E %3Cg id='Oval-Copy-5' opacity='0.3' transform='translate(80.000000, 166.000000)' fill='%2301ACCD'%3E %3Cpath d='M3.3015873,6.64864865 C5.12500362,6.64864865 6.6031746,5.16029795 6.6031746,3.32432432 C6.6031746,1.4883507 5.12500362,-5.32907052e-15 3.3015873,-5.32907052e-15 C1.47817098,-5.32907052e-15 1.07647224e-12,1.4883507 1.07647224e-12,3.32432432 C1.07647224e-12,5.16029795 1.47817098,6.64864865 3.3015873,6.64864865 Z M3.3015873,4.64864865 C2.5858248,4.64864865 2,4.05878945 2,3.32432432 C2,2.5898592 2.5858248,2 3.3015873,2 C4.0173498,2 4.6031746,2.5898592 4.6031746,3.32432432 C4.6031746,4.05878945 4.0173498,4.64864865 3.3015873,4.64864865 Z' id='Oval-Copy-3'%3E%3C/path%3E %3C/g%3E %3Cg id='Path-Copy-4' opacity='0.9' transform='translate(100.000000, 146.000000)' fill='%2301ACCD'%3E %3Cpolygon id='Path-Copy-2' points='5.5 2.5 8 2.5 8 5.5 5.5 5.5 5.5 8 2.5 8 2.5 5.5 0 5.5 0 2.5 2.5 2.5 2.5 0 5.5 0'%3E%3C/polygon%3E %3C/g%3E %3Cg id='Oval-2' opacity='0.5' transform='translate(39.000000, 115.000000)' fill='%2301ACCD'%3E %3Cpath d='M3.3015873,6.64864865 C5.12500362,6.64864865 6.6031746,5.16029795 6.6031746,3.32432432 C6.6031746,1.4883507 5.12500362,0 3.3015873,0 C1.47817098,0 1.08002496e-12,1.4883507 1.08002496e-12,3.32432432 C1.08002496e-12,5.16029795 1.47817098,6.64864865 3.3015873,6.64864865 Z M3.3015873,4.64864865 C2.5858248,4.64864865 2,4.05878945 2,3.32432432 C2,2.5898592 2.5858248,2 3.3015873,2 C4.0173498,2 4.6031746,2.5898592 4.6031746,3.32432432 C4.6031746,4.05878945 4.0173498,4.64864865 3.3015873,4.64864865 Z' id='Oval'%3E%3C/path%3E %3C/g%3E %3Cg id='Oval-Copy-4' opacity='0.8' transform='translate(60.000000, 139.000000)' fill='%2301ACCD'%3E %3Cpath d='M3.3015873,6.64864865 C5.12500362,6.64864865 6.6031746,5.16029795 6.6031746,3.32432432 C6.6031746,1.4883507 5.12500362,1.42108547e-14 3.3015873,1.42108547e-14 C1.47817098,1.42108547e-14 1.08002496e-12,1.4883507 1.08002496e-12,3.32432432 C1.08002496e-12,5.16029795 1.47817098,6.64864865 3.3015873,6.64864865 Z M3.3015873,4.64864865 C2.5858248,4.64864865 2,4.05878945 2,3.32432432 C2,2.5898592 2.5858248,2 3.3015873,2 C4.0173498,2 4.6031746,2.5898592 4.6031746,3.32432432 C4.6031746,4.05878945 4.0173498,4.64864865 3.3015873,4.64864865 Z' id='Oval-Copy'%3E%3C/path%3E %3C/g%3E %3Cg id='Path-Copy-3' opacity='0.3' transform='translate(31.000000, 142.000000)' fill='%2301ACCD'%3E %3Cpolygon id='Path-Copy' points='5.5 2.5 8 2.5 8 5.5 5.5 5.5 5.5 8 2.5 8 2.5 5.5 0 5.5 0 2.5 2.5 2.5 2.5 0 5.5 0'%3E%3C/polygon%3E %3C/g%3E %3Cg id='Oval-Copy-6' opacity='0.6' transform='translate(139.000000, 139.000000)' fill='%2301ACCD'%3E %3Cpath d='M3.3015873,6.64864865 C5.12500362,6.64864865 6.6031746,5.16029795 6.6031746,3.32432432 C6.6031746,1.4883507 5.12500362,0 3.3015873,0 C1.47817098,0 1.08713039e-12,1.4883507 1.08713039e-12,3.32432432 C1.08713039e-12,5.16029795 1.47817098,6.64864865 3.3015873,6.64864865 Z M3.3015873,4.64864865 C2.5858248,4.64864865 2,4.05878945 2,3.32432432 C2,2.5898592 2.5858248,2 3.3015873,2 C4.0173498,2 4.6031746,2.5898592 4.6031746,3.32432432 C4.6031746,4.05878945 4.0173498,4.64864865 3.3015873,4.64864865 Z' id='Oval-Copy-2'%3E%3C/path%3E %3C/g%3E %3Cg id='Path-2' opacity='0.4' transform='translate(122.000000, 122.000000)' fill='%2301ACCD'%3E %3Cpolygon id='Path' points='5.5 2.5 8 2.5 8 5.5 5.5 5.5 5.5 8 2.5 8 2.5 5.5 0 5.5 0 2.5 2.5 2.5 2.5 0 5.5 0'%3E%3C/polygon%3E %3C/g%3E %3C/g%3E %3C/svg%3E"},function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||e.hasOwnProperty(n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),o(n(147),e)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Loading=void 0;var r=n(2),o=n(148);e.Loading=function(){return r.h("div",{className:o.loadingWrapper},r.h("div",{className:o.spinnerBall},r.h("div",{className:o.bounceFrame})))}},function(t,e,n){var r=n(149);"string"==typeof r&&(r=[[t.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n(4)(r,o);r.locals&&(t.exports=r.locals)},function(t,e,n){e=t.exports=n(3)(!1);var r=n(17)(n(150));e.push([t.i,".src-components-loading-loading__loading-wrapper--33l51{height:100%;width:100%;display:flex;align-items:center;justify-content:center;flex-direction:column;color:#999999}.src-components-loading-loading__loading-wrapper--33l51 .src-components-loading-loading__spinner-ball--1LXaN{position:relative;display:flex;align-items:center;width:100%;height:100%;max-width:184px;max-height:184px;margin:4px 0 8px 0;background-size:contain;background-repeat:no-repeat;background-position:center;background-image:url("+r+");animation:src-components-loading-loading__icon-bounce--2Deul 2s infinite ease-in-out}.src-components-loading-loading__loading-wrapper--33l51 .src-components-loading-loading__bounce-frame--3LnSs{width:100%;height:100%;min-width:184px;min-height:184px;border-radius:50%;background-color:#cccccc;opacity:0.2;-webkit-animation:src-components-loading-loading__frame-bounce--3EGgc 2s infinite ease-in-out;animation:src-components-loading-loading__frame-bounce--3EGgc 2s infinite ease-in-out}@keyframes src-components-loading-loading__icon-bounce--2Deul{0%,100%{opacity:0.3}50%{opacity:1}}@-webkit-keyframes src-components-loading-loading__frame-bounce--3EGgc{0%,100%{-webkit-transform:scale(1);opacity:0.1}50%{-webkit-transform:scale(1.3);opacity:0.1}}@keyframes src-components-loading-loading__frame-bounce--3EGgc{0%,100%{opacity:0.1;transform:scale(1);-webkit-transform:scale(1)}50%{opacity:0.25;transform:scale(1.3);-webkit-transform:scale(1.3)}}\n",""]),e.locals={"loading-wrapper":"src-components-loading-loading__loading-wrapper--33l51",loadingWrapper:"src-components-loading-loading__loading-wrapper--33l51","spinner-ball":"src-components-loading-loading__spinner-ball--1LXaN",spinnerBall:"src-components-loading-loading__spinner-ball--1LXaN","icon-bounce":"src-components-loading-loading__icon-bounce--2Deul",iconBounce:"src-components-loading-loading__icon-bounce--2Deul","bounce-frame":"src-components-loading-loading__bounce-frame--3LnSs",bounceFrame:"src-components-loading-loading__bounce-frame--3LnSs","frame-bounce":"src-components-loading-loading__frame-bounce--3EGgc",frameBounce:"src-components-loading-loading__frame-bounce--3EGgc"}},function(t,e){t.exports="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='184' height='184' viewBox='0 0 184 184'%3E %3Cg fill='none' fill-rule='evenodd'%3E %3Cg%3E %3Cg transform='translate(31 18) rotate(-10 88.005 3.565)'%3E %3Crect width='87' height='103' fill='%23999' rx='5'/%3E %3Crect width='55' height='8' x='16' y='16' fill='%23545454' rx='2'/%3E %3Crect width='55' height='8' x='16' y='63' fill='%23545454' rx='2'/%3E %3Crect width='55' height='8' x='16' y='79' fill='%23545454' rx='2'/%3E %3Crect width='16' height='23' x='16' y='32' fill='%23545454' rx='2'/%3E %3Crect width='37' height='23' x='34' y='32' fill='%23545454' rx='2'/%3E %3C/g%3E %3Cpath fill='%23222' d='M89.525 74c3.494 0 6.882.453 10.108 1.304l3.78 21.436c.48 2.72-1.336 5.313-4.055 5.792l-49.292 8.691C51.258 90.465 68.469 74 89.525 74z' opacity='.5' transform='translate(31 18)'/%3E %3C/g%3E %3Cpath fill='%23999' d='M66.302 157.649c1.823 0 3.301-1.489 3.301-3.325S68.125 151 66.302 151c-1.824 0-3.302 1.488-3.302 3.324 0 1.836 1.478 3.325 3.302 3.325zm0-2c-.716 0-1.302-.59-1.302-1.325 0-.734.586-1.324 1.302-1.324.715 0 1.301.59 1.301 1.324 0 .735-.586 1.325-1.301 1.325z' opacity='.5'/%3E %3Cpath fill='%23999' d='M171.302 98.649c1.823 0 3.301-1.489 3.301-3.325S173.125 92 171.302 92c-1.824 0-3.302 1.488-3.302 3.324 0 1.836 1.478 3.325 3.302 3.325zm0-2c-.716 0-1.302-.59-1.302-1.325 0-.734.586-1.324 1.302-1.324.715 0 1.301.59 1.301 1.324 0 .735-.586 1.325-1.301 1.325z' opacity='.8'/%3E %3Cpath fill='%23999' d='M16.302 108.649c1.823 0 3.301-1.489 3.301-3.325S18.125 102 16.302 102c-1.824 0-3.302 1.488-3.302 3.324 0 1.836 1.478 3.325 3.302 3.325zm0-2c-.716 0-1.302-.59-1.302-1.325 0-.734.586-1.324 1.302-1.324.715 0 1.301.59 1.301 1.324 0 .735-.586 1.325-1.301 1.325z' opacity='.6'/%3E %3Cpath fill='%23999' d='M136.302 30.649c1.823 0 3.301-1.489 3.301-3.325S138.125 24 136.302 24c-1.824 0-3.302 1.488-3.302 3.324 0 1.836 1.478 3.325 3.302 3.325zm0-2c-.716 0-1.302-.59-1.302-1.325 0-.734.586-1.324 1.302-1.324.715 0 1.301.59 1.301 1.324 0 .735-.586 1.325-1.301 1.325z' opacity='.3'/%3E %3Cpath fill='%23999' d='M5.5 2.5L8 2.5 8 5.5 5.5 5.5 5.5 8 2.5 8 2.5 5.5 0 5.5 0 2.5 2.5 2.5 2.5 0 5.5 0z' opacity='.4' transform='translate(12 76)'/%3E %3Cpath fill='%23999' d='M5.5 2.5L8 2.5 8 5.5 5.5 5.5 5.5 8 2.5 8 2.5 5.5 0 5.5 0 2.5 2.5 2.5 2.5 0 5.5 0z' opacity='.3' transform='translate(71 164)'/%3E %3Cpath fill='%23999' d='M5.5 2.5L8 2.5 8 5.5 5.5 5.5 5.5 8 2.5 8 2.5 5.5 0 5.5 0 2.5 2.5 2.5 2.5 0 5.5 0z' opacity='.9' transform='translate(132 44)'/%3E %3Cpath fill='%23999' d='M5.5 2.5L8 2.5 8 5.5 5.5 5.5 5.5 8 2.5 8 2.5 5.5 0 5.5 0 2.5 2.5 2.5 2.5 0 5.5 0z' opacity='.9' transform='translate(164 109)'/%3E %3Cg%3E %3Cpath fill='%23CCC' d='M33.15 0C51.458 0 66.3 14.461 66.3 32.3c0 7.55-2.659 14.496-7.114 19.996l17.672 17.217c1.523 1.484 1.523 3.89 0 5.374-1.523 1.484-3.993 1.484-5.516 0l-17.67-17.219C48.028 62.01 40.9 64.6 33.15 64.6 14.842 64.6 0 50.139 0 32.3S14.842 0 33.15 0zm.357 5.507c-14.865 0-26.915 11.836-26.915 26.435 0 14.6 12.05 26.435 26.915 26.435 14.865 0 26.916-11.835 26.916-26.435 0-14.6-12.05-26.435-26.916-26.435z' transform='translate(90 93)'/%3E %3Cpath fill='%23FFF' d='M33.507 5.507c-14.865 0-26.915 11.836-26.915 26.435 0 14.6 12.05 26.435 26.915 26.435 14.865 0 26.916-11.835 26.916-26.435 0-14.6-12.05-26.435-26.916-26.435z' opacity='.632' transform='translate(90 93)'/%3E %3C/g%3E %3C/g%3E %3C/svg%3E"},function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||e.hasOwnProperty(n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),o(n(152),e)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AutoscrollButton=void 0;var r=n(2),o=n(153),i=n(155);e.AutoscrollButton=function(t){var e=t.onClick;return r.h("button",{className:o.autoscrollButton,onClick:e},r.h(i.AutoscrollIcon,null))}},function(t,e,n){var r=n(154);"string"==typeof r&&(r=[[t.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n(4)(r,o);r.locals&&(t.exports=r.locals)},function(t,e,n){(e=t.exports=n(3)(!1)).push([t.i,".src-components-navigation-autoscroll-button-autoscroll-button__autoscrollButton--3igjC{width:24px;height:24px;box-shadow:0 2px 4px 0 rgba(0,0,0,0.5);background-color:#01819a;border-radius:60px;border:none;padding-top:4px;padding-left:4px;cursor:pointer}\n",""]),e.locals={autoscrollButton:"src-components-navigation-autoscroll-button-autoscroll-button__autoscrollButton--3igjC"}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AutoscrollIcon=void 0;var r=n(2);e.AutoscrollIcon=function(t){return r.h("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16"},r.h("path",{fill:t.color,"fill-rule":"evenodd",d:"M5.61 10.208l.095.083 2.303 2.29 2.29-2.288c.361-.36.929-.388 1.32-.083l.095.083c.36.36.388.928.083 1.32l-.083.094-2.996 2.995c-.36.36-.925.388-1.318.084l-.094-.083-3.01-2.994c-.392-.39-.393-1.023-.004-1.414.36-.362.927-.39 1.32-.087zM8 7c.552 0 1 .448 1 1s-.448 1-1 1-1-.448-1-1 .448-1 1-1zm-.611-5.773c.392-.304.958-.275 1.318.084l2.995 2.995.084.094c.305.392.277.96-.083 1.32l-.094.083c-.393.305-.96.278-1.32-.083L7.998 3.432l-2.303 2.29-.095.083c-.393.304-.96.275-1.32-.087-.389-.391-.387-1.024.004-1.414l3.01-2.994z"}))},e.AutoscrollIcon.defaultProps={color:"#FFFFFF"}},function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||e.hasOwnProperty(n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),o(n(157),e)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PluginButton=void 0;var r=n(2),o=n(158);e.PluginButton=function(t){var e=t.onClick,n=t.selected,i=t.disabled,a=[o.navigationPluginButton,n?o.selected:"",i?o.disabled:""].join(" ");return r.h("button",{className:a,tabIndex:1,onClick:e},r.h("div",{className:o.navigationPluginIcon}))}},function(t,e,n){var r=n(159);"string"==typeof r&&(r=[[t.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n(4)(r,o);r.locals&&(t.exports=r.locals)},function(t,e,n){e=t.exports=n(3)(!1);var r=n(17),o=r(n(160)),i=r(n(161));e.push([t.i,".src-components-navigation-plugin-button-plugin-button__navigationPluginButton--3-aVU,.src-components-navigation-plugin-button-plugin-button__navigationPluginIcon--vFNnw{min-height:36px;min-width:36px}.src-components-navigation-plugin-button-plugin-button__navigationPluginButton--3-aVU{padding:0;border:none;background:none;border-radius:4px}.src-components-navigation-plugin-button-plugin-button__navigationPluginButton--3-aVU.src-components-navigation-plugin-button-plugin-button__selected--2YTXs{background-color:rgba(0,0,0,0.8)}.src-components-navigation-plugin-button-plugin-button__navigationPluginButton--3-aVU.src-components-navigation-plugin-button-plugin-button__selected--2YTXs .src-components-navigation-plugin-button-plugin-button__navigationPluginIcon--vFNnw{background-image:url("+o+")}.src-components-navigation-plugin-button-plugin-button__navigationPluginButton--3-aVU.src-components-navigation-plugin-button-plugin-button__disabled--3wmhX{opacity:0.4}.src-components-navigation-plugin-button-plugin-button__navigationPluginButton--3-aVU:hover:not(.src-components-navigation-plugin-button-plugin-button__disabled--3wmhX){background-color:#11323c}.src-components-navigation-plugin-button-plugin-button__navigationPluginButton--3-aVU .src-components-navigation-plugin-button-plugin-button__navigationPluginIcon--vFNnw{top:2px;left:2px;position:relative;background-image:url("+i+");opacity:0.8}\n",""]),e.locals={navigationPluginButton:"src-components-navigation-plugin-button-plugin-button__navigationPluginButton--3-aVU",navigationPluginIcon:"src-components-navigation-plugin-button-plugin-button__navigationPluginIcon--vFNnw",selected:"src-components-navigation-plugin-button-plugin-button__selected--2YTXs",disabled:"src-components-navigation-plugin-button-plugin-button__disabled--3wmhX"}},function(t,e){t.exports="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E %3Cg fill='none' fill-rule='evenodd'%3E %3Crect width='32' height='32' rx='4'/%3E %3Cpath fill='%2301ACCD' d='M14.8 6c4.86 0 8.8 3.94 8.8 8.8 0 2.1-.736 4.03-1.964 5.542l4.096 4.097c.357.357.357.936 0 1.293-.357.357-.936.357-1.293 0l-4.096-4.097C18.83 22.864 16.901 23.6 14.8 23.6c-4.86 0-8.8-3.94-8.8-8.8C6 9.94 9.94 6 14.8 6zm0 2.07c-3.717 0-6.73 3.013-6.73 6.73 0 3.717 3.013 6.73 6.73 6.73 3.717 0 6.73-3.013 6.73-6.73 0-3.717-3.013-6.73-6.73-6.73z'/%3E %3C/g%3E %3C/svg%3E"},function(t,e){t.exports="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E %3Cg fill='none' fill-rule='evenodd'%3E %3Crect width='32' height='32' rx='4'/%3E %3Cpath fill='%23FFFFFF' d='M14.8 6c4.86 0 8.8 3.94 8.8 8.8 0 2.1-.736 4.03-1.964 5.542l4.096 4.097c.357.357.357.936 0 1.293-.357.357-.936.357-1.293 0l-4.096-4.097C18.83 22.864 16.901 23.6 14.8 23.6c-4.86 0-8.8-3.94-8.8-8.8C6 9.94 9.94 6 14.8 6zm0 2.07c-3.717 0-6.73 3.013-6.73 6.73 0 3.717 3.013 6.73 6.73 6.73 3.717 0 6.73-3.013 6.73-6.73 0-3.717-3.013-6.73-6.73-6.73z'/%3E %3C/g%3E %3C/svg%3E"}])}));

/*! For license information please see playkit-transcript.js.LICENSE.txt */
var KalturaPlayer;(()=>{var e={1972:function(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.Button=t.ButtonType=t.ButtonSize=void 0;var a,s,l=r(4522),c=r(42),u=r(2052),p=r(979),d=r(4820),h=r(7538),f=u.ui.Components.Tooltip;!function(e){e.small="small",e.medium="medium",e.large="large"}(a=t.ButtonSize||(t.ButtonSize={})),function(e){e.primary="primary",e.danger="danger",e.translucent="translucent",e.borderless="borderless",e.borderlessTranslucent="borderlessTranslucent",e.secondary="secondary"}(s=t.ButtonType||(t.ButtonType={}));var g=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.buttonRef=(0,l.createRef)(),t.renderChildren=function(){var e=t.props;return e.loading?(0,l.h)("span",null,(0,l.h)(d.Icon,{name:"spinner",size:d.IconSize[e.size]})):e.children?(0,l.h)("span",null,e.children):null},t.renderButton=function(){var e,r=t.props,n=c(h.button,h[r.size],h[r.type],r.className,((e={})[h.disabled]=r.disabled,e[h.loading]=r.loading,e[h.withIcon]=r.children&&r.icon,e[h.iconOnly]=!r.children&&r.icon,e)),o=i(i(i(i({ref:t.buttonRef,disabled:r.disabled,"aria-disabled":r.disabled,"aria-busy":r.loading,tabIndex:r.tabIndex,className:n},r.ariaLabel?{"aria-label":r.ariaLabel}:{}),r.testId?{"data-testid":r.testId}:{}),r.onFocus?{onFocus:r.onFocus}:{}),r.onBlur?{onBlur:r.onBlur}:{}),a=(0,l.h)("button",i({},o),(0,l.h)(l.Fragment,null,r.icon&&(0,l.h)(d.Icon,{name:r.icon,size:d.IconSize[r.size]}),t.renderChildren()));return r.onClick?(0,l.h)(p.A11yWrapper,{onClick:r.onClick},a):a},t}return o(t,e),t.prototype.componentDidMount=function(){var e;this.props.setRef&&this.props.setRef(this.buttonRef.current),this.props.focusOnMount&&(null===(e=this.buttonRef.current)||void 0===e||e.focus())},t.prototype.render=function(e){if(e.tooltip){var t=i(i(i({label:e.tooltip.label},e.tooltip.type?{type:e.tooltip.type}:{}),e.tooltip.className?{classNames:e.tooltip.className}:{}),e.tooltip.strictPosition?{strictPosition:!0}:{});return(0,l.h)(f,i({},t),this.renderButton())}return this.renderButton()},t}(l.Component);t.Button=g,g.defaultProps={disabled:!1,focusOnMount:!1,tabIndex:0,children:null,size:a.medium,icon:null,type:s.primary}},178:function(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.InputField=void 0;var a=r(4522),s=r(979),l=r(7998),c=function(e){function t(t){var r=e.call(this,t)||this;return r.state={active:!1},r._inputRef=null,r.setFocus=function(e){var t;null===(t=r._inputRef)||void 0===t||t.focus(e)},r._handleOnChange=function(e){r.props.onChange(e.target.value)},r._onClear=function(){var e;null===(e=r._inputRef)||void 0===e||e.focus(),r.props.onChange("")},r._onFocus=function(){r.setState({active:!0})},r._onBlur=function(){r.setState({active:!1})},r._goToNextSearchResult=function(){var e=r.props.searchResults,t=e.activeSearchIndex,n=e.totalSearchResults,o=e.onSearchIndexChange;0!==n&&o(t!==n?t+1:1)},r._goToPrevSearchResult=function(){var e=r.props.searchResults,t=e.activeSearchIndex,n=e.totalSearchResults;(0,e.onSearchIndexChange)(1!==t?t-1:n)},r._renderSearchResults=function(){return(0,a.h)(a.Fragment,null,(0,a.h)("div",{className:l.searchResults,"aria-live":"polite","aria-label":r.props.searchResults.searchResultsLabel},"".concat(r.props.searchResults.totalSearchResults>0?"".concat(r.props.searchResults.activeSearchIndex,"/").concat(r.props.searchResults.totalSearchResults):"0/0")),(0,a.h)("div",{className:l.prevNextWrapper},r.props.value&&(0,a.h)(s.A11yWrapper,{onClick:r._goToPrevSearchResult},(0,a.h)("button",{tabIndex:0,className:"".concat(l.prevNextButton," ").concat(0===r.props.searchResults.totalSearchResults?l.disabled:""),"aria-label":r.props.searchResults.prevMatchLabel},(0,a.h)("svg",{width:"8",height:"5",viewBox:"0 0 8 5",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},(0,a.h)("path",{d:"M0.292893 4.70711C0.653377 5.06759 1.22061 5.09532 1.6129 4.7903L1.70711 4.70711L4 2.415L6.29289 4.70711C6.65338 5.06759 7.22061 5.09532 7.6129 4.7903L7.70711 4.70711C8.06759 4.34662 8.09532 3.77939 7.7903 3.3871L7.70711 3.29289L4.70711 0.292893C4.34662 -0.0675907 3.77939 -0.0953203 3.3871 0.209705L3.29289 0.292893L0.292893 3.29289C-0.0976311 3.68342 -0.0976311 4.31658 0.292893 4.70711Z",fill:"white","fill-opacity":"0.7"})))),r.props.value&&(0,a.h)(s.A11yWrapper,{onClick:r._goToNextSearchResult},(0,a.h)("button",{tabIndex:0,className:"".concat(l.prevNextButton," ").concat(0===r.props.searchResults.totalSearchResults?l.disabled:""),"aria-label":r.props.searchResults.nextMatchLabel},(0,a.h)("svg",{width:"8",height:"5",viewBox:"0 0 8 5",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},(0,a.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M0.292893 0.292893C0.683417 -0.0976311 1.31658 -0.0976311 1.70711 0.292893L4 2.58579L6.29289 0.292893C6.68342 -0.0976311 7.31658 -0.0976311 7.70711 0.292893C8.09763 0.683417 8.09763 1.31658 7.70711 1.70711L4.70711 4.70711C4.31658 5.09763 3.68342 5.09763 3.29289 4.70711L0.292893 1.70711C-0.0976311 1.31658 -0.0976311 0.683417 0.292893 0.292893Z",fill:"white","fill-opacity":"0.7"}))))))},r._renderClearSearch=function(){return(0,a.h)(s.A11yWrapper,{onClick:r._onClear},(0,a.h)("button",{className:l.clearIcon,tabIndex:0,"aria-label":r.props.clearSearchLabel},(0,a.h)("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},(0,a.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6 12C9.31371 12 12 9.31371 12 6C12 2.68629 9.31371 0 6 0C2.68629 0 0 2.68629 0 6C0 9.31371 2.68629 12 6 12ZM3.38951 2.3502L3.46013 2.41264L5.99548 4.9504L8.53067 2.41264L8.60129 2.3502C8.89537 2.12125 9.32081 2.1418 9.59133 2.41199C9.8844 2.70471 9.88469 3.17958 9.59197 3.47265L7.05523 6.01165L9.59197 8.55189C9.88469 8.84496 9.8844 9.31983 9.59133 9.61255C9.32081 9.88275 8.89537 9.90329 8.60129 9.67434L8.53067 9.61191L5.99548 7.0729L3.46013 9.61191L3.38951 9.67434C3.09543 9.90329 2.66999 9.88275 2.39947 9.61255C2.1064 9.31983 2.10611 8.84496 2.39883 8.55189L4.93498 6.01165L2.39883 3.47265C2.10611 3.17958 2.1064 2.70471 2.39947 2.41199C2.66999 2.1418 3.09543 2.12125 3.38951 2.3502Z",fill:"white","fill-opacity":"0.7"}))))},r.state={active:!1},r}return o(t,e),t.prototype.render=function(){var e=this,t={className:l.inputElement,value:this.props.value,onInput:this._handleOnChange,onFocus:this._onFocus,onBlur:this._onBlur,tabIndex:0,ref:function(t){e._inputRef=t}};return this.props.placeholder&&(t["aria-label"]=this.props.placeholder,t.placeholder=this.props.placeholder),(0,a.h)("div",{className:[l.inputFieldWrapper,this.props.value||this.state.active?l.active:""].join(" ")},(0,a.h)("input",i({},t)),this.props.value&&this.props.clearSearchLabel&&this._renderClearSearch(),this.props.value&&this.props.searchResults&&this._renderSearchResults())},t}(a.Component);t.InputField=c},979:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.A11yWrapper=t.isKeyboardEvent=void 0;var n=r(4522),o=r(2052).ui.utils.KeyMap,i=o.ENTER,a=o.SPACE,s=o.UP,l=o.DOWN,c=o.LEFT,u=o.RIGHT,p=function(e){e.preventDefault(),e.stopPropagation()};t.isKeyboardEvent=function(e){return e instanceof KeyboardEvent||[e.offsetX,e.offsetY].every((function(e){return 0===e}))},t.A11yWrapper=function(e){var r=e.children,o=e.onClick,d=e.onUpKeyPressed,h=e.onDownKeyPressed,f=e.onLeftKeyPressed,g=e.onRightKeyPressed,_=e.role,m=e.type,v={onKeyDown:function(e){e.keyCode===a||e.keyCode===i?(p(e),o(e,!0)):e.keyCode===s&&d?(p(e),d(e)):e.keyCode===l&&h?(p(e),h(e)):e.keyCode===c&&f?(p(e),f(e)):e.keyCode===u&&g&&(p(e),g(e))},onClick:function(e){o(e,(0,t.isKeyboardEvent)(e))},role:_};return"button"===(null==r?void 0:r.type)&&(v.type=m||"button"),(0,n.cloneElement)(r,v)},t.A11yWrapper.defaultProps={role:"button"}},3425:function(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.ScreenReaderProvider=t.ScreenReaderContext=void 0;var i=r(4522),a=r(73);t.ScreenReaderContext=(0,i.createContext)((function(e,t){}));var s=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={textToRead:""},t._setTextToRead=function(e,r){void 0===r&&(r=500),setTimeout((function(){t.setState({textToRead:e})}),r)},t}return o(r,e),r.prototype.render=function(){return(0,i.h)(t.ScreenReaderContext.Provider,{value:this._setTextToRead},this.props.children,(0,i.h)("div",{style:a.srWrapper,"aria-live":"polite","data-testid":"screenReaderWrapper"},(0,i.h)("span",{id:"sr-only","aria-label":this.state.textToRead},this.state.textToRead)))},r}(i.Component);t.ScreenReaderProvider=s},9695:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Add=void 0;var n=r(4522);t.Add=function(){return(0,n.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,n.h)("path",{d:"M21.8083 4C22.4665 4 23 4.55964 23 5.25V18.75C23 19.4404 22.4665 20 21.8083 20H2.19167C1.53353 20 1 19.4404 1 18.75V5.25C1 4.55964 1.53353 4 2.19167 4H21.8083ZM15 6H3V18H15V6ZM12.999 8.967L13 9L12.998 8.94L12.999 8.967L13 9V15C13 15.5523 12.5523 16 12 16C11.4872 16 11.0645 15.614 11.0067 15.1166L11 15V11.414L6.70711 15.7071C6.34662 16.0676 5.77939 16.0953 5.3871 15.7903L5.29289 15.7071C4.93241 15.3466 4.90468 14.7794 5.2097 14.3871L5.29289 14.2929L9.584 10H6C5.48716 10 5.06449 9.61396 5.00673 9.11662L5 9C5 8.44772 5.44772 8 6 8L12.0193 8.00018C12.0427 8.00063 12.066 8.00189 12.0893 8.00397C12.1097 8.00575 12.1294 8.0081 12.149 8.01102C12.1659 8.01363 12.1834 8.0167 12.2007 8.02024C12.2227 8.02464 12.2444 8.02983 12.2658 8.03572C12.2815 8.0401 12.2969 8.04473 12.3121 8.04974C12.3318 8.05612 12.3516 8.06332 12.3711 8.0711L12.4232 8.09367C12.4439 8.10338 12.4643 8.11379 12.4843 8.12488C12.4964 8.1315 12.5086 8.13861 12.5207 8.146C12.5463 8.16172 12.5711 8.17849 12.5952 8.19631L12.6525 8.24221L12.6167 8.21279C12.6802 8.26255 12.7374 8.31982 12.7872 8.38325C12.7927 8.39016 12.7982 8.3974 12.8037 8.40469C12.8215 8.42887 12.8383 8.45372 12.8539 8.47934L12.8753 8.51594C12.8862 8.53571 12.8966 8.55611 12.9063 8.5769L12.9288 8.62866C12.9367 8.64842 12.9439 8.6682 12.9505 8.68826C12.9553 8.70315 12.9599 8.71854 12.9642 8.73401C12.9702 8.75556 12.9754 8.77725 12.9798 8.79921C12.9833 8.81662 12.9864 8.83405 12.989 8.85153L12.9972 8.92482L12.998 8.94L12.999 8.967Z",fill:"white"}))}},3697:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AnswerOnAir=void 0;var n=r(4522);t.AnswerOnAir=function(){return(0,n.h)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},(0,n.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M5.99999 10C7.72605 10 11.1196 10.84 11.3237 12.5079L11.3333 12.6667V13.3333C11.3333 13.6667 11.0854 13.9449 10.7648 13.9927L10.6667 14H1.33332C0.99999 14 0.721753 13.7521 0.673919 13.4315L0.666656 13.3333V12.6667C0.666656 10.8933 4.21999 10 5.99999 10ZM13.9533 1.99333C15.7933 4.42667 15.7867 7.64667 13.9533 10.0067C13.6967 10.3428 13.2103 10.3932 12.8794 10.1476L12.7933 10.0733L12.7733 10.0533C12.5133 9.79333 12.4667 9.38 12.68 9.08C14.0067 7.18667 14.0133 4.74 12.7 2.91333C12.48 2.60667 12.52 2.19333 12.7867 1.92667C13.1133 1.6 13.6733 1.62667 13.9533 1.99333ZM5.99999 3.33333C7.47275 3.33333 8.66666 4.52724 8.66666 6C8.66666 7.47276 7.47275 8.66667 5.99999 8.66667C4.52723 8.66667 3.33332 7.47276 3.33332 6C3.33332 4.52724 4.52723 3.33333 5.99999 3.33333ZM11.7867 4.46C12.3067 5.46667 12.3067 6.6 11.8 7.56667C11.5635 8.02089 10.9728 8.12086 10.5808 7.8178L10.5 7.74667L10.48 7.72667C10.24 7.48667 10.1867 7.13333 10.3133 6.82C10.5267 6.29333 10.5267 5.70667 10.3133 5.18C10.2025 4.90583 10.2295 4.59594 10.3898 4.36643L10.4667 4.27333L10.4733 4.26667C10.8667 3.87333 11.5333 3.96667 11.7867 4.46Z",fill:"white"}))}},6389:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ArrowClose=void 0;var n=r(4522);t.ArrowClose=function(){return(0,n.h)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},(0,n.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M7.5 21C5.01472 21 3 18.9853 3 16.5L3 7.5C3 5.01472 5.01472 3 7.5 3L16.5 3C18.9853 3 21 5.01472 21 7.5V16.5C21 18.9853 18.9853 21 16.5 21H7.5ZM8.625 17.625L14.25 17.625L14.3812 17.6174C14.9407 17.5524 15.375 17.0769 15.375 16.5C15.375 15.8787 14.8713 15.375 14.25 15.375L10.218 15.375L17.2955 8.2955L17.3891 8.18951C17.7322 7.74819 17.701 7.11005 17.2955 6.70451C16.8562 6.26517 16.1438 6.26517 15.7045 6.70451L8.625 13.7843L8.625 9.75L8.61743 9.6188C8.55245 9.0593 8.07694 8.625 7.5 8.625C6.87868 8.625 6.375 9.12868 6.375 9.75L6.375 15.375L6.38117 15.5429C6.46706 16.7071 7.43884 17.625 8.625 17.625Z",fill:"white"}))}},3029:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ArrowOpen=void 0;var n=r(4522);t.ArrowOpen=function(){return(0,n.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,n.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M16.5 3C18.9853 3 21 5.01472 21 7.5V16.5C21 18.9853 18.9853 21 16.5 21H7.5C5.01472 21 3 18.9853 3 16.5V7.5C3 5.01472 5.01472 3 7.5 3H16.5ZM15.375 6.375H9.75L9.6188 6.38257C9.0593 6.44755 8.625 6.92306 8.625 7.5C8.625 8.12132 9.12868 8.625 9.75 8.625H13.782L6.7045 15.7045L6.61092 15.8105C6.26776 16.2518 6.29896 16.89 6.7045 17.2955C7.14384 17.7348 7.85616 17.7348 8.2955 17.2955L15.375 10.2158V14.25L15.3826 14.3812C15.4476 14.9407 15.9231 15.375 16.5 15.375C17.1213 15.375 17.625 14.8713 17.625 14.25V8.625L17.6188 8.45708C17.5329 7.29286 16.5612 6.375 15.375 6.375Z",fill:"white"}))}},7817:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Attach=void 0;var n=r(4522);t.Attach=function(){return(0,n.h)("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,n.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M12.657 9.34254L21.657 9.34254C22.2093 9.34254 22.657 9.79026 22.657 10.3425L22.657 19.3425C22.657 19.8948 22.2093 20.3425 21.657 20.3425C21.1047 20.3425 20.657 19.8948 20.657 19.3425L20.657 12.7568L11.0504 22.3634C10.6599 22.7539 10.0267 22.7539 9.63618 22.3634C9.24566 21.9728 9.24566 21.3397 9.63618 20.9491L19.2428 11.3425L12.657 11.3425C12.1047 11.3425 11.657 10.8948 11.657 10.3425C11.657 9.79026 12.1047 9.34254 12.657 9.34254Z",fill:"white"}))}},8806:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Audio=void 0;var n=r(4522);t.Audio=function(){return(0,n.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,n.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.5 4.5C10.5 3.67157 11.1716 3 12 3C12.8284 3 13.5 3.67157 13.5 4.5V19.5C13.5 20.3284 12.8284 21 12 21C11.1716 21 10.5 20.3284 10.5 19.5V4.5ZM4.5 9C4.5 8.17157 5.17157 7.5 6 7.5C6.82843 7.5 7.5 8.17157 7.5 9V15C7.5 15.8284 6.82843 16.5 6 16.5C5.17157 16.5 4.5 15.8284 4.5 15V9ZM18 7.5C17.1716 7.5 16.5 8.17157 16.5 9V15C16.5 15.8284 17.1716 16.5 18 16.5C18.8284 16.5 19.5 15.8284 19.5 15V9C19.5 8.17157 18.8284 7.5 18 7.5Z",fill:"white"}))}},960:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AutoScroll=void 0;var n=r(4522);t.AutoScroll=function(){return(0,n.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},(0,n.h)("path",{d:"M6.29289 15.2929C6.65338 14.9324 7.22061 14.9047 7.6129 15.2097L7.70711 15.2929L12 19.585L16.2929 15.2929C16.6534 14.9324 17.2206 14.9047 17.6129 15.2097L17.7071 15.2929C18.0676 15.6534 18.0953 16.2206 17.7903 16.6129L17.7071 16.7071L12.7071 21.7071C12.3466 22.0676 11.7794 22.0953 11.3871 21.7903L11.2929 21.7071L6.29289 16.7071C5.90237 16.3166 5.90237 15.6834 6.29289 15.2929Z",fill:"white"}),(0,n.h)("path",{d:"M17.7071 8.70711C17.3466 9.06759 16.7794 9.09532 16.3871 8.7903L16.2929 8.70711L12 4.415L7.70711 8.70711C7.34662 9.06759 6.77939 9.09532 6.3871 8.79029L6.29289 8.70711C5.93241 8.34662 5.90468 7.77939 6.2097 7.3871L6.29289 7.29289L11.2929 2.29289C11.6534 1.93241 12.2206 1.90468 12.6129 2.2097L12.7071 2.29289L17.7071 7.29289C18.0976 7.68342 18.0976 8.31658 17.7071 8.70711Z",fill:"white"}),(0,n.h)("rect",{x:"10",y:"10",width:"4",height:"4",rx:"2",fill:"white"}))}},4953:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Chapter=void 0;var n=r(4522);t.Chapter=function(){return(0,n.h)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},(0,n.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M4 4C4 3.44772 4.44772 3 5 3H11C11.5523 3 12 3.44772 12 4V13C12 13.824 11.0592 14.2944 10.4 13.8L8.6 12.45C8.24444 12.1833 7.75556 12.1833 7.4 12.45L5.6 13.8C4.94076 14.2944 4 13.824 4 13V4Z",fill:"white"}))}},5254:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Close=void 0;var n=r(4522);t.Close=function(){return(0,n.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,n.h)("path",{d:"M11.6592 10.245L6.70483 5.29061C6.31701 4.9028 5.68581 4.90476 5.29528 5.29528C4.90204 5.68853 4.90267 6.31688 5.29061 6.70483L10.245 11.6592L5.29061 16.6137C4.9028 17.0015 4.90476 17.6327 5.29528 18.0232C5.68853 18.4165 6.31688 18.4158 6.70483 18.0279L11.6592 13.0735L16.6137 18.0279C17.0015 18.4157 17.6327 18.4137 18.0232 18.0232C18.4165 17.63 18.4158 17.0016 18.0279 16.6137L13.0735 11.6592L18.0279 6.70483C18.4157 6.31701 18.4137 5.68581 18.0232 5.29528C17.63 4.90204 17.0016 4.90267 16.6137 5.29061L11.6592 10.245Z",fill:"white"}))}},6432:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ClosedCaptions=void 0;var n=r(4522);t.ClosedCaptions=function(){return(0,n.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,n.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M3.53616 4C2.68845 4 2 4.68038 2 5.51967V18.4803C2 19.3125 2.68776 20 3.53616 20H20.4638C21.3116 20 22 19.3196 22 18.4803V5.51967C22 4.6875 21.3122 4 20.4638 4H3.53616ZM11.4852 13.4164C11.4852 13.6096 11.4297 13.8161 11.3186 14.0358C11.2074 14.2555 11.0381 14.4648 10.8104 14.6637C10.5827 14.8626 10.2958 15.0227 9.94978 15.1439C9.60371 15.2652 9.21394 15.3258 8.78045 15.3258C7.85882 15.3258 7.13938 15.0464 6.6221 14.4876C6.10483 13.9288 5.84619 13.1796 5.84619 12.2401C5.84619 11.6036 5.96458 11.041 6.20136 10.5523C6.43814 10.0636 6.78056 9.68567 7.22863 9.41858C7.67669 9.15149 8.21217 9.01794 8.83509 9.01794C9.22123 9.01794 9.57548 9.07667 9.89787 9.19411C10.2203 9.31155 10.4935 9.46309 10.7175 9.64873C10.9415 9.83436 11.1127 10.0323 11.2311 10.2426C11.3495 10.4528 11.4087 10.6489 11.4087 10.8307C11.4087 11.0164 11.3422 11.1736 11.2093 11.3024C11.0763 11.4312 10.9151 11.4956 10.7257 11.4956C10.6018 11.4956 10.4989 11.4625 10.417 11.3962C10.335 11.3299 10.243 11.2228 10.141 11.0751C9.95889 10.7872 9.76855 10.5712 9.57002 10.4273C9.37149 10.2833 9.11923 10.2113 8.81323 10.2113C8.37246 10.2113 8.01729 10.3903 7.74772 10.7483C7.47815 11.1064 7.34337 11.596 7.34337 12.2173C7.34337 12.509 7.37798 12.7771 7.44719 13.0214C7.51641 13.2658 7.61658 13.4742 7.74772 13.6465C7.87886 13.8189 8.03732 13.9496 8.2231 14.0386C8.40889 14.1277 8.61288 14.1722 8.83509 14.1722C9.1338 14.1722 9.3897 14.1002 9.60281 13.9562C9.81591 13.8123 10.0044 13.5925 10.1683 13.297C10.2594 13.1228 10.3578 12.9864 10.4634 12.8879C10.5691 12.7894 10.6984 12.7401 10.8514 12.7401C11.0335 12.7401 11.1847 12.8121 11.3049 12.9561C11.4251 13.1 11.4852 13.2535 11.4852 13.4164ZM18.1351 13.4164C18.1351 13.6096 18.0796 13.8161 17.9684 14.0358C17.8573 14.2555 17.688 14.4648 17.4603 14.6637C17.2326 14.8626 16.9457 15.0227 16.5997 15.1439C16.2536 15.2652 15.8638 15.3258 15.4303 15.3258C14.5087 15.3258 13.7893 15.0464 13.272 14.4876C12.7547 13.9288 12.4961 13.1796 12.4961 12.2401C12.4961 11.6036 12.6145 11.041 12.8513 10.5523C13.088 10.0636 13.4305 9.68567 13.8785 9.41858C14.3266 9.15149 14.8621 9.01794 15.485 9.01794C15.8711 9.01794 16.2254 9.07667 16.5478 9.19411C16.8702 9.31155 17.1434 9.46309 17.3674 9.64873C17.5914 9.83436 17.7626 10.0323 17.881 10.2426C17.9994 10.4528 18.0586 10.6489 18.0586 10.8307C18.0586 11.0164 17.9921 11.1736 17.8592 11.3024C17.7262 11.4312 17.565 11.4956 17.3756 11.4956C17.2517 11.4956 17.1488 11.4625 17.0669 11.3962C16.9849 11.3299 16.8929 11.2228 16.7909 11.0751C16.6088 10.7872 16.4184 10.5712 16.2199 10.4273C16.0214 10.2833 15.7691 10.2113 15.4631 10.2113C15.0223 10.2113 14.6672 10.3903 14.3976 10.7483C14.128 11.1064 13.9933 11.596 13.9933 12.2173C13.9933 12.509 14.0279 12.7771 14.0971 13.0214C14.1663 13.2658 14.2665 13.4742 14.3976 13.6465C14.5288 13.8189 14.6872 13.9496 14.873 14.0386C15.0588 14.1277 15.2628 14.1722 15.485 14.1722C15.7837 14.1722 16.0396 14.1002 16.2527 13.9562C16.4658 13.8123 16.6543 13.5925 16.8182 13.297C16.9093 13.1228 17.0077 12.9864 17.1133 12.8879C17.2189 12.7894 17.3483 12.7401 17.5013 12.7401C17.6834 12.7401 17.8346 12.8121 17.9548 12.9561C18.075 13.1 18.1351 13.2535 18.1351 13.4164Z",fill:"white"}))}},742:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Detach=void 0;var n=r(4522);t.Detach=function(){return(0,n.h)("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,n.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8 6C6.89543 6 6 6.89543 6 8V14C6 15.1046 6.89543 16 8 16L8 23C8 24.6569 9.34315 26 11 26H23C24.6569 26 26 24.6569 26 23V11C26 9.34315 24.6569 8 23 8H16C16 6.89543 15.1046 6 14 6H8ZM10 16H14C15.1046 16 16 15.1046 16 14V10H23C23.5523 10 24 10.4477 24 11V23C24 23.5523 23.5523 24 23 24H11C10.4477 24 10 23.5523 10 23V16Z",fill:"white"}))}},9398:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Document=void 0;var n=r(4522);t.Document=function(){return(0,n.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,n.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6 2H9.82843H14.1716H18C19.1046 2 20 2.89543 20 4V7.82843V20C20 21.1046 19.1046 22 18 22H6C4.89543 22 4 21.1046 4 20V7.82843V4C4 2.89543 4.89543 2 6 2ZM13 16C13 15.4477 12.5523 15 12 15H8C7.44772 15 7 15.4477 7 16C7 16.5523 7.44772 17 8 17H12C12.5523 17 13 16.5523 13 16ZM17 12C17 11.4477 16.5523 11 16 11H8C7.44772 11 7 11.4477 7 12C7 12.5523 7.44772 13 8 13H16C16.5523 13 17 12.5523 17 12ZM17 8C17 7.44772 16.5523 7 16 7H8C7.44772 7 7 7.44772 7 8C7 8.55228 7.44772 9 8 9H16C16.5523 9 17 8.55228 17 8Z",fill:"white"}))}},1577:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Download=void 0;var n=r(4522);t.Download=function(){return(0,n.h)("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,n.h)("path",{d:"M17.5 6C17.5 5.44772 17.0523 5 16.5 5L16.3834 5.00673C15.886 5.06449 15.5 5.48716 15.5 6L15.4997 17.693L9.71029 12.2702C9.30721 11.8926 8.67439 11.9133 8.29683 12.3164C7.91928 12.7195 7.93998 13.3523 8.34306 13.7298L15.8164 20.7298C15.8212 20.7343 15.826 20.7387 15.8308 20.7431L15.8164 20.7298L15.9035 20.8027C15.9034 20.8026 15.9037 20.8028 15.9035 20.8027C15.9135 20.8101 15.9231 20.817 15.9333 20.824C15.956 20.8397 15.9793 20.8544 16.0038 20.8684C16.0148 20.8747 16.0259 20.8808 16.0366 20.8864C16.0596 20.8984 16.0832 20.9096 16.1077 20.9201C16.1223 20.9263 16.1371 20.9322 16.1515 20.9376C16.1769 20.947 16.2028 20.9555 16.2299 20.963C16.2399 20.9658 16.25 20.9684 16.2595 20.9709C16.3365 20.9899 16.4171 21 16.5 21C16.5804 21 16.6585 20.9905 16.7336 20.9725C16.7521 20.968 16.7706 20.963 16.7889 20.9576C16.8097 20.9514 16.8303 20.9444 16.8507 20.9367C16.8632 20.932 16.8756 20.9271 16.8878 20.922C16.9121 20.9118 16.936 20.9006 16.9596 20.8883C16.9735 20.8812 16.9872 20.8736 17.0007 20.8658C17.0223 20.8533 17.0434 20.84 17.0636 20.8262C17.0764 20.8174 17.0891 20.8083 17.1021 20.7985C17.1224 20.7831 17.1422 20.767 17.161 20.7504C17.1685 20.7437 17.176 20.737 17.1834 20.7301L24.6619 13.7301C25.0651 13.3527 25.086 12.7198 24.7086 12.3166L24.6172 12.2304C24.2352 11.9126 23.6674 11.9215 23.2952 12.2699L17.4997 17.694L17.5 6Z",fill:"white"}),(0,n.h)("path",{d:"M27 26C27 26.5523 26.5523 27 26 27H7C6.44772 27 6 26.5523 6 26C6 25.4477 6.44772 25 7 25H26C26.5523 25 27 25.4477 27 26Z",fill:"white"}))}},4263:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Excel=void 0;var n=r(4522);t.Excel=function(){return(0,n.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,n.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M22 6C22 4.89543 21.1046 4 20 4H4C2.89543 4 2 4.89543 2 6V18C2 19.1046 2.89543 20 4 20H20C21.1046 20 22 19.1046 22 18V6ZM8 16C8 15.4477 7.55228 15 7 15H5C4.44772 15 4 15.4477 4 16C4 16.5523 4.44772 17 5 17H7C7.55228 17 8 16.5523 8 16ZM14 16C14 15.4477 13.5523 15 13 15H11C10.4477 15 10 15.4477 10 16C10 16.5523 10.4477 17 11 17H13C13.5523 17 14 16.5523 14 16ZM8 12C8 11.4477 7.55228 11 7 11H5C4.44772 11 4 11.4477 4 12C4 12.5523 4.44772 13 5 13H7C7.55228 13 8 12.5523 8 12ZM14 12C14 11.4477 13.5523 11 13 11H11C10.4477 11 10 11.4477 10 12C10 12.5523 10.4477 13 11 13H13C13.5523 13 14 12.5523 14 12ZM8 8C8 7.44772 7.55228 7 7 7H5C4.44772 7 4 7.44772 4 8C4 8.55228 4.44772 9 5 9H7C7.55228 9 8 8.55228 8 8ZM14 8C14 7.44772 13.5523 7 13 7H11C10.4477 7 10 7.44772 10 8C10 8.55228 10.4477 9 11 9H13C13.5523 9 14 8.55228 14 8ZM19 17H17C16.4477 17 16 16.5523 16 16C16 15.4477 16.4477 15 17 15H19C19.5523 15 20 15.4477 20 16C20 16.5523 19.5523 17 19 17ZM17 13H19C19.5523 13 20 12.5523 20 12C20 11.4477 19.5523 11 19 11H17C16.4477 11 16 11.4477 16 12C16 12.5523 16.4477 13 17 13ZM19 9H17C16.4477 9 16 8.55228 16 8C16 7.44772 16.4477 7 17 7H19C19.5523 7 20 7.44772 20 8C20 8.55228 19.5523 9 19 9Z",fill:"white"}))}},2942:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Expand=void 0;var n=r(4522);t.Expand=function(){return(0,n.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,n.h)("path",{d:"M20.997 3.924L20.998 3.945L20.999 3.98L21 4V10C21 10.5523 20.5523 11 20 11C19.4872 11 19.0645 10.614 19.0067 10.1166L19 10V6.416L14.7071 10.7071C14.3466 11.0676 13.7794 11.0953 13.3871 10.7903L13.2929 10.7071C12.9324 10.3466 12.9047 9.77939 13.2097 9.3871L13.2929 9.29289L17.586 5H14C13.4872 5 13.0645 4.61396 13.0067 4.11662L13 4C13 3.48716 13.386 3.06449 13.8834 3.00673L14 3L20.0332 3.00054C20.0503 3.00109 20.0683 3.00216 20.0862 3.0037C20.1079 3.00553 20.1285 3.00797 20.149 3.01102C20.166 3.01363 20.1834 3.0167 20.2007 3.02024C20.2227 3.02464 20.2444 3.02983 20.2658 3.03572C20.2815 3.0401 20.2969 3.04473 20.3121 3.04974C20.3318 3.05612 20.3516 3.06332 20.3711 3.0711L20.4232 3.09367C20.4439 3.10338 20.4643 3.11379 20.4843 3.12488C20.4964 3.1315 20.5086 3.13861 20.5207 3.146C20.5463 3.16172 20.5711 3.17849 20.5952 3.19631L20.6525 3.24221L20.6168 3.21279C20.6802 3.26255 20.7374 3.31982 20.7872 3.38325C20.7927 3.39016 20.7982 3.3974 20.8037 3.40469C20.8215 3.42887 20.8383 3.45373 20.8539 3.47934L20.8753 3.51594C20.8862 3.53571 20.8966 3.55611 20.9063 3.5769L20.9288 3.62866C20.9367 3.64842 20.9439 3.6682 20.9505 3.68826C20.9553 3.70315 20.9599 3.71854 20.9642 3.73401C20.9702 3.75556 20.9754 3.77725 20.9798 3.79921C20.9833 3.81662 20.9864 3.83405 20.989 3.85153L20.996 3.91075L20.996 3.919L20.997 3.921V3.924ZM3.002 20.059V20.071L3.00175 20.0593C3.00122 20.0503 3.00081 20.0413 3.00052 20.0323L3 14C3 13.4477 3.44772 13 4 13C4.51284 13 4.93551 13.386 4.99327 13.8834L5 14V17.586L9.29289 13.2929C9.65338 12.9324 10.2206 12.9047 10.6129 13.2097L10.7071 13.2929C11.0676 13.6534 11.0953 14.2206 10.7903 14.6129L10.7071 14.7071L6.416 19H10C10.5128 19 10.9355 19.386 10.9933 19.8834L11 20C11 20.5128 10.614 20.9355 10.1166 20.9933L10 21H4C3.99354 21 3.98709 20.9999 3.98066 20.9998C3.95732 20.9994 3.93401 20.9981 3.91075 20.996C3.89031 20.9943 3.87058 20.9919 3.85104 20.989C3.83405 20.9864 3.81662 20.9833 3.79927 20.9798C3.77725 20.9754 3.75556 20.9702 3.73416 20.9643C3.71854 20.9599 3.70315 20.9553 3.68786 20.9503C3.6682 20.9439 3.64842 20.9367 3.62894 20.9289L3.57678 20.9063C3.55611 20.8966 3.53571 20.8862 3.51572 20.8751C3.50361 20.8685 3.49139 20.8614 3.47929 20.854C3.45373 20.8383 3.42887 20.8215 3.40484 20.8037L3.34745 20.7578L3.38325 20.7872C3.31982 20.7374 3.26255 20.6802 3.21279 20.6168C3.20728 20.6098 3.20175 20.6026 3.19633 20.5953C3.17849 20.5711 3.16172 20.5463 3.14607 20.5207L3.12467 20.4841C3.11379 20.4643 3.10338 20.4439 3.09365 20.4231L3.07123 20.3713C3.06332 20.3516 3.05612 20.3318 3.04955 20.3117C3.04473 20.2969 3.0401 20.2815 3.03585 20.266C3.02983 20.2444 3.02464 20.2227 3.02017 20.2008C3.0167 20.1834 3.01363 20.1659 3.01102 20.1485L3.0037 20.0862L3.002 20.059Z",fill:"white"}))}},8358:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GenericFile=void 0;var n=r(4522);t.GenericFile=function(){return(0,n.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,n.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6 2C4.89543 2 4 2.89543 4 4V20C4 21.1046 4.89543 22 6 22H18C19.1046 22 20 21.1046 20 20V7.82843C20 7.29799 19.7893 6.78929 19.4142 6.41421L15.5858 2.58579C15.2107 2.21071 14.702 2 14.1716 2H6ZM14.3657 4.36569C13.8617 3.86171 13 4.21865 13 4.93137V8.2C13 8.64183 13.3582 9 13.8 9H17.0686C17.7814 9 18.1383 8.13829 17.6343 7.63431L14.3657 4.36569Z",fill:"white"}))}},3057:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Hotspot=void 0;var n=r(4522);t.Hotspot=function(){return(0,n.h)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},(0,n.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6.5 2C6.11537 2 5.79837 2.28953 5.75505 2.66253L5.75 2.75V3.5C5.75 3.91421 6.08579 4.25 6.5 4.25C6.88463 4.25 7.20163 3.96047 7.24495 3.58747L7.25 3.5V2.75C7.25 2.33579 6.91421 2 6.5 2ZM11.7955 3.8295C11.5235 3.55753 11.0946 3.53811 10.8003 3.77123L10.7348 3.8295L10.2045 4.35984C9.91161 4.65273 9.91161 5.1276 10.2045 5.4205C10.4765 5.69247 10.9054 5.71189 11.1997 5.47878L11.2652 5.4205L11.7955 4.89016C12.0884 4.59727 12.0884 4.1224 11.7955 3.8295ZM3.4545 12.1705C3.72648 12.4425 4.15536 12.4619 4.44975 12.2288L4.51516 12.1705L5.0455 11.6402C5.33839 11.3473 5.33839 10.8724 5.0455 10.5795C4.77352 10.3075 4.34464 10.2881 4.05025 10.5212L3.98484 10.5795L3.4545 11.1098C3.16161 11.4027 3.16161 11.8776 3.4545 12.1705ZM6.53592 6.98358C6.65797 6.61718 7.05316 6.41577 7.4186 6.53371L13.5234 8.50394C13.6272 8.53745 13.7214 8.59497 13.7983 8.67186C14.0693 8.94255 14.0669 9.38382 13.793 9.65748L12.8998 10.5499C12.7787 10.6708 12.7713 10.8642 12.8828 10.9915L13.6084 11.8185C14.0177 12.3362 13.9793 13.0939 13.4958 13.5769L13.4659 13.6069C12.9452 14.127 12.1056 14.1316 11.5906 13.6171L10.9802 12.9207C10.8554 12.7952 10.6516 12.7959 10.525 12.9224L9.66058 13.786C9.58277 13.8638 9.48795 13.9223 9.38376 13.957C9.01702 14.0789 8.624 13.8818 8.50593 13.5167L6.53356 7.41792C6.48802 7.27709 6.48885 7.12492 6.53592 6.98358ZM3.5 5.75C3.91421 5.75 4.25 6.08579 4.25 6.5C4.25 6.91421 3.91421 7.25 3.5 7.25H2.75C2.33579 7.25 2 6.91421 2 6.5C2 6.08579 2.33579 5.75 2.75 5.75H3.5Z",fill:"white"}))}},8934:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Image=void 0;var n=r(4522);t.Image=function(){return(0,n.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,n.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M20 4C21.1046 4 22 4.89543 22 6V18C22 19.1046 21.1046 20 20 20H4C2.89543 20 2 19.1046 2 18V6C2 4.89543 2.89543 4 4 4H20ZM13.4658 9.8483C13.739 9.41452 14.1763 9.3854 14.4736 9.76788L14.5351 9.85614L18.2077 15.7324C18.6176 16.3882 18.3599 16.9391 17.6281 16.9953L17.5018 17H6.49825C5.71856 17 5.40843 16.498 5.77171 15.8584L5.83853 15.7506L8.44382 11.8687C8.72793 11.4454 9.26701 11.3331 9.6897 11.5934L9.785 11.6602L10.696 12.3798C11.1046 12.7026 11.6375 12.6332 11.9477 12.2465L12.0152 12.1517L13.4658 9.8483ZM9 8.5C9 7.672 8.328 7 7.5 7C6.672 7 6 7.672 6 8.5C6 9.329 6.672 10 7.5 10C8.328 10 9 9.329 9 8.5Z",fill:"white"}))}},1861:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Icons=void 0;var n=r(5254),o=r(9919),i=r(1577),a=r(7024),s=r(8835),l=r(1223),c=r(7858),u=r(6563),p=r(2489),d=r(9695),h=r(756),f=r(4726),g=r(2942),_=r(3029),m=r(6389),v=r(4953),A=r(3057),y=r(3697),C=r(9209),b=r(960),w=r(8255),x=r(6432),k=r(8358),S=r(6150),T=r(8934),E=r(9398),M=r(4263),O=r(6044),P=r(3319),L=r(7016),B=r(2084),I=r(8177),D=r(742),N=r(7817),R=r(8806);t.Icons={close:n.Close,print:o.Print,download:i.Download,related:a.Related,message:s.Message,share:l.Share,more:c.More,quiz:u.QuizIcon,switch:p.Switch,add:d.Add,minimizedVideo:h.MinimizedVideo,pictureInPicture:f.PictureInPicture,expand:g.Expand,arrowOpen:_.ArrowOpen,arrowClose:m.ArrowClose,chapter:v.Chapter,hotspot:A.Hotspot,answerOnAir:y.AnswerOnAir,screenRotation:C.ScreenRotation,autoScroll:b.AutoScroll,replay:w.ReplayIcon,closedCaptions:x.ClosedCaptions,genericFile:k.GenericFile,presentation:S.Presentation,image:T.Image,document:E.Document,excel:M.Excel,pdf:O.PDF,zip:P.Zip,volumeOn:L.VolumeOn,volumeMute:B.VolumeMute,spinner:I.Spinner,detach:D.Detach,attach:N.Attach,audio:R.Audio}},8835:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Message=void 0;var n=r(4522);t.Message=function(){return(0,n.h)("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,n.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M25 5C27.2091 5 29 6.75035 29 8.90952V18.6833C29 20.8425 27.2091 22.5928 25 22.5928H14.985L10.7019 26.7188C10.546 26.8689 10.3449 26.9641 10.1302 26.9917L10 27C9.44772 27 9 26.5624 9 26.0226V22.5928H7C4.79086 22.5928 3 20.8425 3 18.6833V8.90952C3 6.75035 4.79086 5 7 5H25ZM25 6.95476H7C5.89543 6.95476 5 7.82994 5 8.90952V18.6833C5 19.7629 5.89543 20.6381 7 20.6381H11V23.687L14.1651 20.6381H25C26.1046 20.6381 27 19.7629 27 18.6833V8.90952C27 7.82994 26.1046 6.95476 25 6.95476ZM19 14.7738C19.5523 14.7738 20 15.2114 20 15.7512C20 16.291 19.5523 16.7286 19 16.7286H10C9.44772 16.7286 9 16.291 9 15.7512C9 15.2114 9.44772 14.7738 10 14.7738H19ZM23 10.8643C23.5523 10.8643 24 11.3019 24 11.8417C24 12.3815 23.5523 12.819 23 12.819H10C9.44772 12.819 9 12.3815 9 11.8417C9 11.3019 9.44772 10.8643 10 10.8643H23Z",fill:"white"}))}},756:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MinimizedVideo=void 0;var n=r(4522);t.MinimizedVideo=function(){return(0,n.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,n.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M5.25 4.5H18.75C19.9926 4.5 21 5.50736 21 6.75V17.25C21 18.4926 19.9926 19.5 18.75 19.5H5.25C4.00736 19.5 3 18.4926 3 17.25V6.75C3 5.50736 4.00736 4.5 5.25 4.5ZM5.25 6C4.83579 6 4.5 6.33579 4.5 6.75V17.25C4.5 17.6642 4.83579 18 5.25 18H18.75C19.1642 18 19.5 17.6642 19.5 17.25V6.75C19.5 6.33579 19.1642 6 18.75 6H5.25ZM13 12C12.4477 12 12 12.4477 12 13V15.5C12 16.0523 12.4477 16.5 13 16.5H17C17.5523 16.5 18 16.0523 18 15.5V13C18 12.4477 17.5523 12 17 12H13Z",fill:"white"}))}},7858:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.More=void 0;var n=r(4522);t.More=function(){return(0,n.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},(0,n.h)("path",{d:"M8 12C8 13.1046 7.10457 14 6 14C4.89543 14 4 13.1046 4 12C4 10.8954 4.89543 10 6 10C7.10457 10 8 10.8954 8 12ZM14 12C14 13.1046 13.1046 14 12 14C10.8954 14 10 13.1046 10 12C10 10.8954 10.8954 10 12 10C13.1046 10 14 10.8954 14 12ZM20 12C20 13.1046 19.1046 14 18 14C16.8954 14 16 13.1046 16 12C16 10.8954 16.8954 10 18 10C19.1046 10 20 10.8954 20 12Z",fill:"white"}))}},6044:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PDF=void 0;var n=r(4522);t.PDF=function(){return(0,n.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,n.h)("path",{d:"M16.2428 13.7325C17.4357 13.7542 18.6185 13.8543 19.7692 14.1927C20.2755 14.3415 20.7634 14.5301 21.1919 14.8459C22.0863 15.5045 22.2575 16.5466 21.6176 17.4515C20.9502 18.3952 19.8553 18.72 18.699 18.3321C17.8678 18.0533 17.1473 17.5995 16.5083 17.0166C15.915 16.4753 15.3392 15.9159 14.7469 15.3728C14.6746 15.3069 14.5482 15.2591 14.4503 15.2645C13.1247 15.3448 11.8091 15.509 10.5119 15.7995C10.0065 15.9123 9.50577 16.0458 9.00867 16.1884C8.9162 16.2146 8.82374 16.3138 8.77522 16.4031C8.07579 17.6978 7.33425 18.9672 6.42427 20.1329C5.98118 20.7004 5.49231 21.2273 4.87985 21.6261C3.70346 22.3912 2.4932 21.9482 2.10595 20.6075C1.88074 19.828 2.01715 19.1098 2.49045 18.4458C3.25945 17.3658 4.29212 16.5917 5.46301 15.998C6.15878 15.6453 6.89849 15.3755 7.61256 15.0561C7.72516 15.0056 7.84509 14.9081 7.89911 14.8017C8.68916 13.2489 9.37486 11.6511 9.98182 10.0199C10.0386 9.86741 10.023 9.75825 9.93879 9.62562C9.17254 8.42205 8.68001 7.12375 8.59212 5.69644C8.52987 4.68865 8.64431 3.71155 9.23845 2.84631C9.8207 1.99822 10.8058 1.74831 11.6059 2.27611C12.2705 2.71459 12.6788 3.33712 12.7594 4.13649C12.8656 5.19209 12.6788 6.22063 12.4216 7.23743C12.2357 7.97275 12.0087 8.69813 11.7899 9.42532C11.7487 9.56246 11.7643 9.659 11.8494 9.77629C12.8399 11.1441 13.9632 12.4018 15.147 13.608C15.2156 13.6784 15.341 13.7217 15.4427 13.7289C15.7081 13.7434 15.9755 13.7325 16.2428 13.7325ZM9.79415 14.3894C10.9486 14.1981 12.0792 14.0104 13.2171 13.8219C12.5168 13.0017 11.8155 12.1798 11.1069 11.3507C10.6648 12.3738 10.2327 13.3735 9.79415 14.3894ZM10.7133 7.76704C10.7591 7.60103 10.8058 7.43592 10.8497 7.26901C11.0777 6.4101 11.3029 5.54937 11.2855 4.65347C11.2809 4.40716 11.2141 4.14551 11.1079 3.92176C11.0319 3.76207 10.8424 3.65471 10.7041 3.52388C10.5833 3.67095 10.4267 3.80267 10.3471 3.96868C10.1137 4.45588 10.0834 4.98458 10.1127 5.51329C10.1576 6.29912 10.3379 7.05428 10.7133 7.76704ZM6.60279 17.0942C5.92899 17.4163 5.3083 17.7592 4.77915 18.2283C4.40197 18.563 4.06233 18.942 3.73642 19.3272C3.48832 19.6204 3.46452 19.9696 3.62931 20.3242C3.70438 20.4866 3.80233 20.5461 3.96071 20.427C4.11817 20.3088 4.28662 20.2015 4.42852 20.068C5.31471 19.2334 5.95097 18.2148 6.58356 17.1944C6.59546 17.1763 6.59272 17.152 6.60279 17.0942ZM16.8937 15.2762C17.54 15.9394 18.2166 16.5529 19.1055 16.8678C19.3087 16.9399 19.5358 16.9715 19.7518 16.9724C20.0594 16.9742 20.4055 16.6792 20.4503 16.3842C20.497 16.0792 20.2233 15.9998 20.0237 15.9033C19.0396 15.426 17.9685 15.3484 16.8937 15.2762Z",fill:"white"}))}},4726:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PictureInPicture=void 0;var n=r(4522);t.PictureInPicture=function(){return(0,n.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,n.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M18.75 4.5H5.25C4.00736 4.5 3 5.50736 3 6.75V17.25C3 18.4926 4.00736 19.5 5.25 19.5H18.75C19.9926 19.5 21 18.4926 21 17.25V6.75C21 5.50736 19.9926 4.5 18.75 4.5ZM13 12C12.4477 12 12 12.4477 12 13V15.5C12 16.0523 12.4477 16.5 13 16.5H17C17.5523 16.5 18 16.0523 18 15.5V13C18 12.4477 17.5523 12 17 12H13Z",fill:"white"}))}},6150:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Presentation=void 0;var n=r(4522);t.Presentation=function(){return(0,n.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,n.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6 4C4.34315 4 3 5.34315 3 7V17C3 18.6569 4.34315 20 6 20H18C19.6569 20 21 18.6569 21 17V7C21 5.34315 19.6569 4 18 4H6ZM18 8H6V16H18V8Z",fill:"white"}))}},9919:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Print=void 0;var n=r(4522);t.Print=function(){return(0,n.h)("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,n.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M23 23H26C27.1046 23 28 22.1046 28 21V11C28 9.89543 27.1046 9 26 9H23V5C23 3.89543 22.1046 3 21 3H11C9.89543 3 9 3.89543 9 5V9H6C4.89543 9 4 9.89543 4 11V21C4 22.1046 4.89543 23 6 23H9V28C9 29.1046 9.89543 30 11 30H21C22.1046 30 23 29.1046 23 28V23ZM6 11V21H9V19C8.44772 19 8 18.5523 8 18C8 17.4477 8.44772 17 9 17H23C23.5523 17 24 17.4477 24 18C24 18.5523 23.5523 19 23 19V21H26V11H6ZM21 9V5H11V9H21ZM11 19V28H21V19H11Z",fill:"white"}))}},6563:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QuizIcon=void 0;var n=r(4522);t.QuizIcon=function(){return(0,n.h)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,n.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.49857 2.11499L12.7442 4.2052C12.9162 4.28987 12.9812 4.48721 12.8895 4.64597C12.8594 4.69807 12.8145 4.74163 12.7597 4.77201L8.54484 7.10634C8.20953 7.29205 7.79063 7.29205 7.45532 7.10634L3.2405 4.77202C3.07335 4.67945 3.01915 4.47933 3.11944 4.32505C3.15235 4.27441 3.19956 4.23299 3.256 4.2052L7.50203 2.11498C7.81345 1.96167 8.18715 1.96168 8.49857 2.11499ZM14 6.02878V10.7642C14 11.1075 13.8049 11.4256 13.486 11.6022L9.24043 13.9536C9.07328 14.0461 8.85649 13.9961 8.7562 13.8418C8.72329 13.7912 8.7059 13.7333 8.7059 13.6742V8.93882C8.7059 8.59551 8.90104 8.27738 9.21997 8.10075L13.4655 5.74942C13.6326 5.65685 13.8494 5.70688 13.9497 5.86116C13.9826 5.91179 14 5.96973 14 6.02878ZM6.5145 8.31192L2.50483 6.04476C2.45303 6.01547 2.39375 6 2.33333 6C2.14924 6 2 6.14064 2 6.31412V10.88C2 11.211 2.1843 11.5178 2.4855 11.6881L6.49517 13.9552C6.54697 13.9845 6.60625 14 6.66667 14C6.85076 14 7 13.8594 7 13.6859V9.12C7 8.78898 6.8157 8.48223 6.5145 8.31192Z",fill:"white"}))}},7024:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Related=void 0;var n=r(4522);t.Related=function(){return(0,n.h)("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,n.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8 7H12C13.1046 7 14 7.89543 14 9V13C14 14.1046 13.1046 15 12 15H8C6.89543 15 6 14.1046 6 13V9C6 7.89543 6.89543 7 8 7ZM8 13H12V9H8V13Z",fill:"white"}),(0,n.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8 18H12C13.1046 18 14 18.8954 14 20V24C14 25.1046 13.1046 26 12 26H8C6.89543 26 6 25.1046 6 24V20C6 18.8954 6.89543 18 8 18ZM8 24H12V20H8V24Z",fill:"white"}),(0,n.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M24 7H20C18.8954 7 18 7.89543 18 9V13C18 14.1046 18.8954 15 20 15H24C25.1046 15 26 14.1046 26 13V9C26 7.89543 25.1046 7 24 7ZM24 13H20V9H24V13Z",fill:"white"}),(0,n.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M20 18H24C25.1046 18 26 18.8954 26 20V24C26 25.1046 25.1046 26 24 26H20C18.8954 26 18 25.1046 18 24V20C18 18.8954 18.8954 18 20 18ZM20 24H24V20H20V24Z",fill:"white"}))}},8255:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ReplayIcon=void 0;var n=r(4522);t.ReplayIcon=function(){return(0,n.h)("svg",{width:"33",height:"32",viewBox:"0 0 33 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,n.h)("g",{opacity:"0.8"},(0,n.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M11.5 7.50049C8.73858 7.50049 6.5 9.73906 6.5 12.5005V16.5005C6.5 19.2619 8.73858 21.5005 11.5 21.5005H13.0858L11.7929 22.7934C11.4024 23.1839 11.4024 23.8171 11.7929 24.2076C12.1834 24.5981 12.8166 24.5981 13.2071 24.2076L16.2071 21.2076C16.5976 20.8171 16.5976 20.1839 16.2071 19.7934L13.2071 16.7934C12.8166 16.4029 12.1834 16.4029 11.7929 16.7934C11.4024 17.1839 11.4024 17.8171 11.7929 18.2076L13.0858 19.5005H11.5C9.84315 19.5005 8.5 18.1573 8.5 16.5005V12.5005C8.5 10.8436 9.84315 9.50049 11.5 9.50049H21.5C23.1569 9.50049 24.5 10.8436 24.5 12.5005V16.5005C24.5 18.1573 23.1569 19.5005 21.5 19.5005H20C19.4477 19.5005 19 19.9482 19 20.5005C19 21.0528 19.4477 21.5005 20 21.5005H21.5C24.2614 21.5005 26.5 19.2619 26.5 16.5005V12.5005C26.5 9.73906 24.2614 7.50049 21.5 7.50049H11.5Z",fill:"white"})))}},9209:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ScreenRotation=void 0;var n=r(4522);t.ScreenRotation=function(){return(0,n.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,n.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M12 3C12 2.44772 12.4477 2 13 2C17.9706 2 22 6.02944 22 11C22 11.5523 21.5523 12 21 12C20.4477 12 20 11.5523 20 11C20 7.13401 16.866 4 13 4C12.4477 4 12 3.55228 12 3ZM10.6569 7.82843L7.82843 10.6569L13.4853 16.3137L16.3137 13.4853L10.6569 7.82843ZM12.0711 6.41421C11.29 5.63317 10.0237 5.63317 9.24265 6.41421L6.41422 9.24264C5.63317 10.0237 5.63317 11.29 6.41422 12.0711L12.0711 17.7279C12.8521 18.509 14.1185 18.509 14.8995 17.7279L17.7279 14.8995C18.509 14.1184 18.509 12.8521 17.7279 12.0711L12.0711 6.41421ZM11 22C11.5523 22 12 21.5523 12 21C12 20.4477 11.5523 20 11 20C7.13401 20 4 16.866 4 13C4 12.4477 3.55228 12 3 12C2.44771 12 2 12.4477 2 13C2 17.9706 6.02944 22 11 22Z",fill:"white"}))}},1223:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Share=void 0;var n=r(4522);t.Share=function(){return(0,n.h)("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,n.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M22.6667 12.6667C24.5076 12.6667 26 11.1743 26 9.33333C26 7.49238 24.5076 6 22.6667 6C20.8257 6 19.3333 7.49238 19.3333 9.33333C19.3333 9.38882 19.3347 9.44399 19.3374 9.49881L11.9575 13.9443C11.3473 13.1665 10.3987 12.6667 9.33333 12.6667C7.49238 12.6667 6 14.1591 6 16C6 17.8409 7.49238 19.3333 9.33333 19.3333C10.3981 19.3333 11.3462 18.8341 11.9564 18.057L19.3374 22.5013C19.3347 22.5561 19.3333 22.6112 19.3333 22.6667C19.3333 24.5076 20.8257 26 22.6667 26C24.5076 26 26 24.5076 26 22.6667C26 20.8257 24.5076 19.3333 22.6667 19.3333C21.6074 19.3333 20.6636 19.8274 20.053 20.5976L12.864 16.2689L12.8651 15.7324L20.0531 11.4025C20.6637 12.1727 21.6075 12.6667 22.6667 12.6667ZM22.6667 10.6667C21.9303 10.6667 21.3333 10.0697 21.3333 9.33333C21.3333 8.59695 21.9303 8 22.6667 8C23.403 8 24 8.59695 24 9.33333C24 10.0697 23.403 10.6667 22.6667 10.6667ZM9.33333 17.3333C8.59695 17.3333 8 16.7364 8 16C8 15.2636 8.59695 14.6667 9.33333 14.6667C10.0697 14.6667 10.6667 15.2636 10.6667 16C10.6667 16.7364 10.0697 17.3333 9.33333 17.3333ZM21.3333 22.6667C21.3333 23.403 21.9303 24 22.6667 24C23.403 24 24 23.403 24 22.6667C24 21.9303 23.403 21.3333 22.6667 21.3333C21.9303 21.3333 21.3333 21.9303 21.3333 22.6667Z",fill:"white"}))}},8177:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Spinner=void 0;var n=r(4522),o=r(9779);t.Spinner=function(){return(0,n.h)("svg",{width:"25",height:"24",viewBox:"0 0 25 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:o.spinner},(0,n.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M12.5 18C15.8137 18 18.5 15.3137 18.5 12C18.5 8.68629 15.8137 6 12.5 6C9.18629 6 6.5 8.68629 6.5 12C6.5 15.3137 9.18629 18 12.5 18ZM12.5 22C18.0228 22 22.5 17.5228 22.5 12C22.5 6.47715 18.0228 2 12.5 2C6.97715 2 2.5 6.47715 2.5 12C2.5 17.5228 6.97715 22 12.5 22Z",fill:"white","fill-opacity":"0.2"}),(0,n.h)("path",{d:"M18.5 12H22.5C22.5 6.47715 18.0228 2 12.5 2V6C15.8137 6 18.5 8.68629 18.5 12Z",fill:"white"}))}},2489:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Switch=void 0;var n=r(4522);t.Switch=function(){return(0,n.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,n.h)("path",{d:"M17.6744 9.27934L21.7563 13.3632L21.8282 13.4537L21.887 13.5492L21.9333 13.6489L21.9684 13.7556L21.9824 13.8172L21.9974 13.929L22 14L21.9897 14.1405L21.9824 14.1828L21.9535 14.2949L21.9231 14.3759L21.887 14.4508L21.8281 14.5463L21.7763 14.6137L21.7207 14.6744L17.6744 18.7207C17.3019 19.0931 16.6981 19.0931 16.3256 18.7207C15.9818 18.3769 15.9554 17.8359 16.2463 17.4617L16.3256 17.3719L18.7439 14.9536L12.9537 14.9537C12.4675 14.9537 12.0663 14.5899 12.0074 14.1196L12 14C12 13.5109 12.3682 13.1078 12.8425 13.0527L12.9537 13.0463L18.7426 13.0451L16.3256 10.6281C15.9798 10.2823 15.9551 9.73687 16.2515 9.36252L16.3256 9.27934C16.6981 8.90689 17.3019 8.90689 17.6744 9.27934ZM6.32562 5.27934C6.69807 4.90689 7.30193 4.90689 7.67438 5.27934L7.74849 5.36252C8.04493 5.73687 8.02023 6.28225 7.67438 6.6281L5.2574 9.04508L11.0463 9.04628L11.1575 9.0527C11.6318 9.10779 12 9.5109 12 10L11.9926 10.1196C11.9337 10.5899 11.5325 10.9537 11.0463 10.9537L5.25605 10.9536L7.67438 13.3719L7.75372 13.4617C8.04463 13.8359 8.01818 14.3769 7.67438 14.7207C7.30193 15.0931 6.69807 15.0931 6.32562 14.7207L2.25793 10.6523L2.18664 10.5668L2.12413 10.4708L2.07695 10.3759L2.03697 10.2639L2.01028 10.1405L2 10C2 9.95226 2.00351 9.90534 2.01036 9.85937L2.01758 9.81716L2.04651 9.70514L2.08932 9.59642L2.12415 9.52899L2.18631 9.43351L2.24369 9.36325L6.32562 5.27934Z",fill:"white"}))}},2084:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VolumeMute=void 0;var n=r(4522);t.VolumeMute=function(){return(0,n.h)("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,n.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M7 11L14.2433 6.97588C15.2135 6.43689 16 6.89817 16 7.99076V24.0092C16 25.1087 15.2171 25.565 14.2433 25.024L7 21H3.00293C2.44903 21 2 20.5443 2 20.0046V11.9954C2 11.4456 2.43788 11 3.00293 11H7ZM9 12.1768V19.8232L14 22.6009V9.39899L9 12.1768ZM7 13H4V19H7V13Z",fill:"white"}),(0,n.h)("path",{d:"M20.4645 12.4644C20.0739 12.855 20.0739 13.4881 20.4645 13.8786L22.5858 16L20.4645 18.1213C20.0739 18.5118 20.0739 19.145 20.4645 19.5355C20.855 19.926 21.4882 19.926 21.8787 19.5355L24 17.4142L26.1213 19.5355C26.5118 19.926 27.145 19.926 27.5355 19.5355C27.9261 19.145 27.9261 18.5118 27.5355 18.1213L25.4142 16L27.5355 13.8786C27.9261 13.4881 27.9261 12.855 27.5355 12.4644C27.145 12.0739 26.5118 12.0739 26.1213 12.4644L24 14.5857L21.8787 12.4644C21.4882 12.0739 20.855 12.0739 20.4645 12.4644Z",fill:"white"}))}},7016:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VolumeOn=void 0;var n=r(4522);t.VolumeOn=function(){return(0,n.h)("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,n.h)("path",{d:"M25.063 26.1618C27.6367 23.4547 29.1 19.8564 29.1 16.0287C29.1 12.1544 27.6007 8.51592 24.971 5.79967C24.5869 5.40288 23.9538 5.39263 23.557 5.77678C23.1602 6.16093 23.15 6.79402 23.5341 7.19081C25.8057 9.53719 27.1 12.6782 27.1 16.0287C27.1 19.339 25.8368 22.4453 23.6136 24.7838C23.233 25.184 23.249 25.817 23.6493 26.1975C24.0495 26.5781 24.6825 26.5621 25.063 26.1618Z",fill:"white"}),(0,n.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M7 11L14.2433 6.97595C15.2135 6.43696 16 6.89824 16 7.99082V24.0092C16 25.1087 15.2171 25.5651 14.2433 25.0241L7 21H3.00293C2.44903 21 2 20.5444 2 20.0046V11.9954C2 11.4457 2.43788 11 3.00293 11H7ZM9 12.1768V19.8232L14 22.601V9.39906L9 12.1768ZM7 13H4V19H7V13Z",fill:"white"}),(0,n.h)("path",{d:"M24.2097 15.6872C24.2097 18.6042 22.9749 21.3231 20.8574 23.2257C20.4466 23.5948 19.8143 23.561 19.4452 23.1502C19.076 22.7394 19.1098 22.1071 19.5207 21.738C21.2197 20.2114 22.2097 18.0316 22.2097 15.6872C22.2097 13.4938 21.344 11.4424 19.8323 9.93166C19.4417 9.54127 19.4414 8.9081 19.8318 8.51745C20.2222 8.12679 20.8554 8.12657 21.246 8.51697C23.1299 10.3996 24.2097 12.9585 24.2097 15.6872Z",fill:"white"}))}},3319:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Zip=void 0;var n=r(4522);t.Zip=function(){return(0,n.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,n.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6 2C4.89543 2 4 2.89543 4 4V20C4 21.1046 4.89543 22 6 22H18C19.1046 22 20 21.1046 20 20V7.82843C20 7.29799 19.7893 6.78929 19.4142 6.41421L15.5858 2.58579C15.2107 2.21071 14.702 2 14.1716 2H6ZM14.3657 4.36569C13.8617 3.86171 13 4.21865 13 4.93137V8.2C13 8.64183 13.3582 9 13.8 9H17.0686C17.7814 9 18.1383 8.13829 17.6343 7.63431L14.3657 4.36569ZM7 5H9V7H7V5ZM9 9H7V11H9V9ZM7 13H9V15H7V13ZM10 17H6V19H10V17Z",fill:"white"}))}},4820:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Icon=t.IconSize=void 0;var n,o=r(4522),i=r(42),a=r(1861),s=r(3278);!function(e){e.small="small",e.medium="medium",e.large="large"}(n=t.IconSize||(t.IconSize={})),t.Icon=function(e){var t=a.Icons[e.name];return t?(0,o.h)("div",{className:i(s.iconWrapper,s[e.size])},(0,o.h)(t,null)):null},t.Icon.defaultProps={size:n.medium}},42:(e,t)=>{var r;!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var i=typeof r;if("string"===i||"number"===i)e.push(r);else if(Array.isArray(r)){if(r.length){var a=o.apply(null,r);a&&e.push(a)}}else if("object"===i){if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]")){e.push(r.toString());continue}for(var s in r)n.call(r,s)&&r[s]&&e.push(s)}}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r)}()},6298:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>s});var n=r(559),o=r.n(n),i=r(3476),a=r.n(i)()(o());a.push([e.id,".Button__button___NM3Vl{display:flex;justify-content:center;align-items:center;flex-wrap:nowrap;font-weight:700;border:1px solid rgba(0,0,0,0);border-radius:4px;cursor:pointer}.Button__button___NM3Vl.Button__primary___vkWyL{background-color:var(--playkit-primary-color);color:var(--playkit-primary-text-contrast-color)}.Button__button___NM3Vl.Button__primary___vkWyL:not(.Button__disabled___j4KjS):hover{background-color:var(--playkit-primary-darker-color)}.Button__button___NM3Vl.Button__primary___vkWyL:not(.Button__disabled___j4KjS):focus{background-color:var(--playkit-primary-darker-color)}.Button__button___NM3Vl.Button__danger___lCKPq{background-color:var(--playkit-danger-color);color:var(--playkit-danger-text-contrast-color)}.Button__button___NM3Vl.Button__danger___lCKPq:not(.Button__disabled___j4KjS):hover{background-color:var(--playkit-danger-darker-color)}.Button__button___NM3Vl.Button__danger___lCKPq:not(.Button__disabled___j4KjS):focus{background-color:var(--playkit-danger-brighter-color)}.Button__button___NM3Vl.Button__translucent___nSc5h{background-color:rgba(0,0,0,.6);color:#fff}.Button__button___NM3Vl.Button__borderless___sov7o{background-color:rgba(0,0,0,0);color:var(--playkit-tone-1-color)}.Button__button___NM3Vl.Button__borderless___sov7o:not(.Button__disabled___j4KjS):hover{background-color:var(--playkit-tone-4-color)}.Button__button___NM3Vl.Button__borderless___sov7o:not(.Button__disabled___j4KjS):focus{background-color:var(--playkit-tone-6-color)}.Button__button___NM3Vl.Button__borderlessTranslucent___L8tFt{background-color:rgba(0,0,0,0);color:var(--playkit-tone-1-color)}.Button__button___NM3Vl.Button__borderlessTranslucent___L8tFt:not(.Button__disabled___j4KjS):hover{background-color:rgba(0,0,0,.7)}.Button__button___NM3Vl.Button__borderlessTranslucent___L8tFt:not(.Button__disabled___j4KjS):focus{background-color:rgba(0,0,0,.4)}.Button__button___NM3Vl.Button__secondary___ChhYF{background-color:var(--playkit-tone-6-color);color:var(--playkit-primary-text-contrast-color)}.Button__button___NM3Vl.Button__secondary___ChhYF:not(.Button__disabled___j4KjS):hover{background-color:var(--playkit-tone-5-color)}.Button__button___NM3Vl.Button__secondary___ChhYF:not(.Button__disabled___j4KjS):focus{background-color:var(--playkit-tone-5-color)}.Button__button___NM3Vl.Button__small____SSTu{height:24px;font-size:13px;line-height:16px;padding:0 4px}.Button__button___NM3Vl.Button__small____SSTu.Button__withIcon___c3vxV{padding-right:8px}.Button__button___NM3Vl.Button__small____SSTu.Button__withIcon___c3vxV>span{margin-left:2px}.Button__button___NM3Vl.Button__small____SSTu.Button__iconOnly___dISNi{padding:0 3px}.Button__button___NM3Vl.Button__medium___psqY1{height:32px;font-size:14px;line-height:17px;padding:0 8px}.Button__button___NM3Vl.Button__medium___psqY1.Button__withIcon___c3vxV{padding-right:12px}.Button__button___NM3Vl.Button__medium___psqY1.Button__withIcon___c3vxV>span{margin-left:4px}.Button__button___NM3Vl.Button__medium___psqY1.Button__iconOnly___dISNi{padding:0 3px}.Button__button___NM3Vl.Button__large___ftsNW{height:40px;font-size:16px;line-height:19px;padding:0 16px}.Button__button___NM3Vl.Button__large___ftsNW.Button__withIcon___c3vxV{padding-left:12px}.Button__button___NM3Vl.Button__large___ftsNW.Button__withIcon___c3vxV>span{margin-left:4px}.Button__button___NM3Vl.Button__large___ftsNW.Button__iconOnly___dISNi{padding:0 3px}.Button__button___NM3Vl.Button__disabled___j4KjS{background-color:rgba(0,0,0,0);color:var(--playkit-tone-4-color);border-color:var(--playkit-tone-4-color);cursor:default}.Button__button___NM3Vl.Button__loading___Q2l_S{cursor:default;pointer-events:none}","",{version:3,sources:["webpack://./../node_modules/@playkit-js/common/dist/components/button/Button.scss","webpack://./../node_modules/@playkit-js/common/dist/components/variables.scss"],names:[],mappings:"AAGA,wBACE,YAAA,CACA,sBAAA,CACA,kBAAA,CACA,gBAAA,CACA,eAAA,CACA,8BAAA,CACA,iBCTY,CDUZ,cAAA,CACA,gDACE,6CAAA,CACA,gDAAA,CAEE,qFACE,oDAAA,CAEF,qFACE,oDAAA,CAIN,+CACE,4CAAA,CACA,+CAAA,CAEE,oFACE,mDAAA,CAEF,oFACE,qDAAA,CAIN,oDACE,+BAAA,CACA,UCjCI,CDmCN,mDACE,8BAAA,CACA,iCAAA,CAEE,wFACE,4CAAA,CAEF,wFACE,4CAAA,CAIN,8DACE,8BAAA,CACA,iCAAA,CAEE,mGACE,+BAAA,CAEF,mGACE,+BAAA,CAIN,kDACE,4CAAA,CACA,gDAAA,CAEE,uFACE,4CAAA,CAEF,uFACE,4CAAA,CAIN,8CACE,WAAA,CACA,cAAA,CACA,gBAAA,CACA,aAAA,CACA,uEACE,iBAAA,CACA,4EACE,eAAA,CAGJ,uEACE,aAAA,CAGJ,+CACE,WAAA,CACA,cAAA,CACA,gBAAA,CACA,aAAA,CACA,wEACE,kBAAA,CACA,6EACE,eAAA,CAGJ,wEACE,aAAA,CAGJ,8CACE,WAAA,CACA,cAAA,CACA,gBAAA,CACA,cAAA,CACA,uEACE,iBAAA,CACA,4EACE,eAAA,CAGJ,uEACE,aAAA,CAGJ,iDACE,8BAAA,CACA,iCAAA,CACA,wCAAA,CACA,cAAA,CAEF,gDACE,cAAA,CACA,mBAAA",sourcesContent:["@import '../variables.scss';\n\n// https://www.figma.com/file/GYMv1jsthckOnKmCrdQJY3/%E2%8F%AF-Player-v7-(Guidelines)?node-id=21%3A1943&t=ywdMo875C6kzd7pN-0\n.button {\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  flex-wrap: nowrap;\n  font-weight: 700;\n  border: 1px solid transparent;\n  border-radius: $roundness-1;\n  cursor: pointer;\n  &.primary {\n    background-color: var(--playkit-primary-color);\n    color: var(--playkit-primary-text-contrast-color);\n    &:not(.disabled) {\n      &:hover {\n        background-color: var(--playkit-primary-darker-color);\n      }\n      &:focus {\n        background-color: var(--playkit-primary-darker-color);\n      }\n    }\n  }\n  &.danger {\n    background-color: var(--playkit-danger-color);\n    color: var(--playkit-danger-text-contrast-color);\n    &:not(.disabled) {\n      &:hover {\n        background-color: var(--playkit-danger-darker-color);\n      }\n      &:focus {\n        background-color: var(--playkit-danger-brighter-color);\n      }\n    }\n  }\n  &.translucent {\n    background-color: rgba(0, 0, 0, 0.6);\n    color: $white;\n  }\n  &.borderless {\n    background-color: transparent;\n    color: var(--playkit-tone-1-color);\n    &:not(.disabled) {\n      &:hover {\n        background-color: var(--playkit-tone-4-color);\n      }\n      &:focus {\n        background-color: var(--playkit-tone-6-color);\n      }\n    }\n  }\n  &.borderlessTranslucent {\n    background-color: transparent;\n    color: var(--playkit-tone-1-color);\n    &:not(.disabled) {\n      &:hover {\n        background-color: rgba(0, 0, 0, 0.7);\n      }\n      &:focus {\n        background-color: rgba(0, 0, 0, 0.4);\n      }\n    }\n  }\n  &.secondary {\n    background-color: var(--playkit-tone-6-color);\n    color: var(--playkit-primary-text-contrast-color);\n    &:not(.disabled) {\n      &:hover {\n        background-color: var(--playkit-tone-5-color);\n      }\n      &:focus {\n        background-color: var(--playkit-tone-5-color);\n      }\n    }\n  }\n  &.small {\n    height: 24px;\n    font-size: 13px;\n    line-height: 16px;\n    padding: 0 4px;\n    &.withIcon {\n      padding-right: 8px;\n      > span {\n        margin-left: 2px;\n      }\n    }\n    &.iconOnly {\n      padding: 0 3px;\n    }\n  }\n  &.medium {\n    height: 32px;\n    font-size: 14px;\n    line-height: 17px;\n    padding: 0 8px;\n    &.withIcon {\n      padding-right: 12px;\n      > span {\n        margin-left: 4px;\n      }\n    }\n    &.iconOnly {\n      padding: 0 3px;\n    }\n  }\n  &.large {\n    height: 40px;\n    font-size: 16px;\n    line-height: 19px;\n    padding: 0 16px;\n    &.withIcon {\n      padding-left: 12px;\n      > span {\n        margin-left: 4px;\n      }\n    }\n    &.iconOnly {\n      padding: 0 3px;\n    }\n  }\n  &.disabled {\n    background-color: transparent;\n    color: var(--playkit-tone-4-color);\n    border-color: var(--playkit-tone-4-color);\n    cursor: default;\n  }\n  &.loading {\n    cursor: default;\n    pointer-events: none;\n  }\n}\n","// border radius\n$roundness-1: 4px;\n$roundness-2: 8px;\n\n// colors\n$white: #ffffff;\n"],sourceRoot:""}]),a.locals={button:"Button__button___NM3Vl",primary:"Button__primary___vkWyL",disabled:"Button__disabled___j4KjS",danger:"Button__danger___lCKPq",translucent:"Button__translucent___nSc5h",borderless:"Button__borderless___sov7o",borderlessTranslucent:"Button__borderlessTranslucent___L8tFt",secondary:"Button__secondary___ChhYF",small:"Button__small____SSTu",withIcon:"Button__withIcon___c3vxV",iconOnly:"Button__iconOnly___dISNi",medium:"Button__medium___psqY1",large:"Button__large___ftsNW",loading:"Button__loading___Q2l_S"};const s=a},2707:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>s});var n=r(559),o=r.n(n),i=r(3476),a=r.n(i)()(o());a.push([e.id,".InputField__input-field-wrapper___K1QeS{display:flex;align-items:center;flex-grow:1;width:100%;max-width:599px;padding-right:8px;height:32px;border:solid 1px rgba(255,255,255,.4);border-radius:4px}.InputField__input-field-wrapper___K1QeS ::-moz-placeholder{opacity:1}.InputField__input-field-wrapper___K1QeS .InputField__search-results___PBRGr{display:flex;justify-content:flex-end;align-items:center;flex-shrink:0;margin:0 8px 0 6px;font-size:12px;text-overflow:ellipsis}.InputField__input-field-wrapper___K1QeS .InputField__prev-next-wrapper___zAxBA{display:flex;flex-direction:column;justify-content:space-around;max-height:100%;height:100%;width:8px;flex:0 0 8px}.InputField__input-field-wrapper___K1QeS .InputField__prev-next-wrapper___zAxBA .InputField__prev-next-button___HP7Me{display:flex;align-items:center;height:50%;padding:0;background-color:rgba(0,0,0,0);border:none;cursor:pointer}.InputField__input-field-wrapper___K1QeS .InputField__prev-next-wrapper___zAxBA .InputField__prev-next-button___HP7Me.InputField__disabled___GVLcH{opacity:.4;cursor:default}.InputField__input-field-wrapper___K1QeS .InputField__input-element___BAphE{width:100%;flex-grow:1;flex-shrink:1;font-size:15px;padding:0 6px 1px 6px;color:var(--playkit-tone-1-color);background:rgba(0,0,0,0);border:none;overflow:hidden;text-overflow:ellipsis}.InputField__input-field-wrapper___K1QeS .InputField__input-element___BAphE::placeholder{color:var(--playkit-tone-2-color)}.InputField__input-field-wrapper___K1QeS .InputField__input-element___BAphE::selection{background-color:var(--playkit-primary-brighter-color)}.InputField__input-field-wrapper___K1QeS .InputField__clear-icon___eTi3X{padding:0;flex:0 0 12px;max-width:12px;max-height:12px;background-color:rgba(0,0,0,0);width:12px;height:12px;outline-offset:4px;border:none;cursor:pointer}.InputField__input-field-wrapper___K1QeS:hover{border-color:#fff}.InputField__input-field-wrapper___K1QeS.InputField__active____D1qS{color:var(--playkit-tone-2-color);background:var(--playkit-tone-8-color);border-color:#fff}","",{version:3,sources:["webpack://./../node_modules/@playkit-js/common/dist/components/input-field/InputField.scss","webpack://./../node_modules/@playkit-js/common/dist/components/variables.scss"],names:[],mappings:"AAEA,yCAKE,YAAA,CACA,kBAAA,CACA,WAAA,CACA,UAAA,CACA,eAAA,CACA,iBAAA,CACA,WAAA,CACA,qCAAA,CACA,iBCdY,CDEZ,4DACE,SAAA,CAYF,6EACE,YAAA,CACA,wBAAA,CACA,kBAAA,CACA,aAAA,CACA,kBAAA,CACA,cAAA,CACA,sBAAA,CAEF,gFACE,YAAA,CACA,qBAAA,CACA,4BAAA,CACA,eAAA,CACA,WAAA,CACA,SAAA,CACA,YAAA,CACA,sHACE,YAAA,CACA,kBAAA,CACA,UAAA,CACA,SAAA,CACA,8BAAA,CACA,WAAA,CACA,cAAA,CACA,mJACE,UAAA,CACA,cAAA,CAIN,4EACE,UAAA,CACA,WAAA,CACA,aAAA,CACA,cAAA,CACA,qBAAA,CACA,iCAAA,CACA,wBAAA,CACA,WAAA,CACA,eAAA,CACA,sBAAA,CACA,yFACE,iCAAA,CAEF,uFACE,sDAAA,CAGJ,yEACE,SAAA,CACA,aAAA,CACA,cAAA,CACA,eAAA,CACA,8BAAA,CACA,UAAA,CACA,WAAA,CACA,kBAAA,CACA,WAAA,CACA,cAAA,CAEF,+CACE,iBCzEI,CD2EN,oEACE,iCAAA,CACA,sCAAA,CACA,iBC9EI",sourcesContent:["@import '../variables.scss';\n\n.input-field-wrapper {\n  ::-moz-placeholder {\n    opacity: 1;\n  }\n\n  display: flex;\n  align-items: center;\n  flex-grow: 1;\n  width: 100%;\n  max-width: 599px;\n  padding-right: 8px;\n  height: 32px;\n  border: solid 1px rgba(255, 255, 255, 0.4);\n  border-radius: $roundness-1;\n  .search-results {\n    display: flex;\n    justify-content: flex-end;\n    align-items: center;\n    flex-shrink: 0;\n    margin: 0 8px 0 6px;\n    font-size: 12px;\n    text-overflow: ellipsis;\n  }\n  .prev-next-wrapper {\n    display: flex;\n    flex-direction: column;\n    justify-content: space-around;\n    max-height: 100%;\n    height: 100%;\n    width: 8px;\n    flex: 0 0 8px;\n    .prev-next-button {\n      display: flex;\n      align-items: center;\n      height: 50%;\n      padding: 0;\n      background-color: transparent;\n      border: none;\n      cursor: pointer;\n      &.disabled {\n        opacity: 0.4;\n        cursor: default;\n      }\n    }\n  }\n  .input-element {\n    width: 100%;\n    flex-grow: 1;\n    flex-shrink: 1;\n    font-size: 15px;\n    padding: 0 6px 1px 6px;\n    color: var(--playkit-tone-1-color);\n    background: transparent;\n    border: none;\n    overflow: hidden;\n    text-overflow: ellipsis;\n    &::placeholder {\n      color: var(--playkit-tone-2-color);\n    }\n    &::selection {\n      background-color: var(--playkit-primary-brighter-color);\n    }\n  }\n  .clear-icon {\n    padding: 0;\n    flex: 0 0 12px;\n    max-width: 12px;\n    max-height: 12px;\n    background-color: transparent;\n    width: 12px;\n    height: 12px;\n    outline-offset: 4px;\n    border: none;\n    cursor: pointer;\n  }\n  &:hover {\n    border-color: $white;\n  }\n  &.active {\n    color: var(--playkit-tone-2-color);\n    background: var(--playkit-tone-8-color);\n    border-color: $white;\n  }\n}\n","// border radius\n$roundness-1: 4px;\n$roundness-2: 8px;\n\n// colors\n$white: #ffffff;\n"],sourceRoot:""}]),a.locals={"input-field-wrapper":"InputField__input-field-wrapper___K1QeS",inputFieldWrapper:"InputField__input-field-wrapper___K1QeS","search-results":"InputField__search-results___PBRGr",searchResults:"InputField__search-results___PBRGr","prev-next-wrapper":"InputField__prev-next-wrapper___zAxBA",prevNextWrapper:"InputField__prev-next-wrapper___zAxBA","prev-next-button":"InputField__prev-next-button___HP7Me",prevNextButton:"InputField__prev-next-button___HP7Me",disabled:"InputField__disabled___GVLcH","input-element":"InputField__input-element___BAphE",inputElement:"InputField__input-element___BAphE","clear-icon":"InputField__clear-icon___eTi3X",clearIcon:"InputField__clear-icon___eTi3X",active:"InputField__active____D1qS"};const s=a},3861:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>s});var n=r(559),o=r.n(n),i=r(3476),a=r.n(i)()(o());a.push([e.id,".sr-wrapper__sr-wrapper___GwVLr{position:absolute;height:1px;width:1px;overflow:hidden;padding:0;margin:-1px;border:0}","",{version:3,sources:["webpack://./../node_modules/@playkit-js/common/dist/hoc/sr-wrapper/sr-wrapper.scss"],names:[],mappings:"AAAA,gCACE,iBAAA,CACA,UAAA,CACA,SAAA,CACA,eAAA,CACA,SAAA,CACA,WAAA,CACA,QAAA",sourcesContent:[".sr-wrapper {\n  position: absolute;\n  height: 1px;\n  width: 1px;\n  overflow: hidden;\n  padding: 0;\n  margin: -1px;\n  border: 0;\n}"],sourceRoot:""}]),a.locals={"sr-wrapper":"sr-wrapper__sr-wrapper___GwVLr",srWrapper:"sr-wrapper__sr-wrapper___GwVLr"};const s=a},6469:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>s});var n=r(559),o=r.n(n),i=r(3476),a=r.n(i)()(o());a.push([e.id,".icon__iconWrapper___O5uqn.icon__small___IddLg{width:16px;height:16px}.icon__iconWrapper___O5uqn.icon__medium___llFxB{width:24px;height:24px}.icon__iconWrapper___O5uqn.icon__large___Q96VN{width:32px;height:32px}.icon__iconWrapper___O5uqn>svg{width:100%;height:100%}","",{version:3,sources:["webpack://./../node_modules/@playkit-js/common/dist/icon/icon.scss"],names:[],mappings:"AACE,+CACE,UAAA,CACA,WAAA,CAEF,gDACE,UAAA,CACA,WAAA,CAEF,+CACE,UAAA,CACA,WAAA,CAEF,+BACE,UAAA,CACA,WAAA",sourcesContent:[".iconWrapper {\n  &.small {\n    width: 16px;\n    height: 16px;\n  }\n  &.medium {\n    width: 24px;\n    height: 24px;\n  }\n  &.large {\n    width: 32px;\n    height: 32px;\n  }\n  > svg {\n    width: 100%;\n    height: 100%;\n  }\n}\n"],sourceRoot:""}]),a.locals={iconWrapper:"icon__iconWrapper___O5uqn",small:"icon__small___IddLg",medium:"icon__medium___llFxB",large:"icon__large___Q96VN"};const s=a},5726:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>s});var n=r(559),o=r.n(n),i=r(3476),a=r.n(i)()(o());a.push([e.id,".spinner__spinner___NHbzR{animation:spinner__spinner-animation___FVrgH 1s linear infinite}@keyframes spinner__spinner-animation___FVrgH{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}","",{version:3,sources:["webpack://./../node_modules/@playkit-js/common/dist/icon/icons/spinner.scss"],names:[],mappings:"AAAA,0BACE,+DAAA,CAEF,8CACE,GACE,sBAAA,CAEF,KACE,wBAAA,CAAA",sourcesContent:[".spinner {\n  animation: spinner-animation 1s linear infinite;\n}\n@keyframes spinner-animation {\n  0% {\n    transform: rotate(0deg);\n  }\n  100% {\n    transform: rotate(360deg);\n  }\n}\n"],sourceRoot:""}]),a.locals={spinner:"spinner__spinner___NHbzR","spinner-animation":"spinner__spinner-animation___FVrgH",spinnerAnimation:"spinner__spinner-animation___FVrgH"};const s=a},7813:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>s});var n=r(559),o=r.n(n),i=r(3476),a=r.n(i)()(o());a.push([e.id,".attach-placeholder__attach-placeholder-container___xtP_6{position:absolute;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,.6)}.attach-placeholder__attach-placeholder-container___xtP_6 .attach-placeholder__attach-header___GzyyE{position:absolute;top:16px;left:0;width:100%;height:32px;display:flex;align-items:center;justify-content:space-between;padding:0 16px}.attach-placeholder__attach-placeholder-container___xtP_6 .attach-placeholder__attach-header___GzyyE .attach-placeholder__attach-header-title___ghJ1L{font-weight:700;font-size:16px;color:var(--playkit-tone-1-color)}.attach-placeholder__attach-placeholder-container___xtP_6 .attach-placeholder__attach-content___WB0hj{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);display:flex;justify-content:center;align-items:center;flex-direction:column}.attach-placeholder__attach-placeholder-container___xtP_6 .attach-placeholder__attach-content___WB0hj .attach-placeholder__attach-text___SLDaC{line-height:20px;font-weight:700;letter-spacing:normal;color:var(--playkit-tone-1-color);text-align:center}.attach-placeholder__attach-placeholder-container___xtP_6 .attach-placeholder__attach-content___WB0hj .attach-placeholder__attach-button___d7ZDz{margin-top:20px}","",{version:3,sources:["webpack://./components/attach-placeholder/attach-placeholder.scss","webpack://./variables.scss","webpack://./../node_modules/@playkit-js/playkit-js-ui/src/styles/exported.scss"],names:[],mappings:"AAGA,0DACE,iBAAA,CACA,KAAA,CACA,MAAA,CACA,UAAA,CACA,WAAA,CACA,yBCHkB,CDIlB,qGACE,iBAAA,CACA,QAAA,CACA,MAAA,CACA,UAAA,CACA,WAAA,CACA,YAAA,CACA,kBAAA,CACA,6BAAA,CACA,cAAA,CACA,sJACE,eAAA,CACA,cAAA,CACA,iCEOS,CFJb,sGACE,iBAAA,CACA,OAAA,CACA,QAAA,CACA,+BAAA,CACA,YAAA,CACA,sBAAA,CACA,kBAAA,CACA,qBAAA,CACA,+IACE,gBAAA,CACA,eAAA,CACA,qBAAA,CACA,iCETS,CFUT,iBAAA,CAEF,iJACE,eAAA",sourcesContent:["@import '~@playkit-js/playkit-js-ui';\n@import '../../variables.scss';\n\n.attach-placeholder-container {\n  position: absolute;\n  top: 0;\n  left: 0;\n  width: 100%;\n  height: 100%;\n  background: $plugin-background;\n  .attach-header {\n    position: absolute;\n    top: 16px;\n    left: 0;\n    width: 100%;\n    height: 32px;\n    display: flex;\n    align-items: center;\n    justify-content: space-between;\n    padding: 0 16px;\n    .attach-header-title {\n      font-weight: 700;\n      font-size: 16px;\n      color: $tone-1-color;\n    }  \n  }\n  .attach-content {\n    position: absolute;\n    top: 50%;\n    left: 50%;\n    transform: translate(-50%, -50%);\n    display: flex;\n    justify-content: center;\n    align-items: center;\n    flex-direction: column;\n    .attach-text {\n      line-height: 20px;\n      font-weight: 700;\n      letter-spacing: normal;\n      color: $tone-1-color;\n      text-align: center;\n    }\n    .attach-button {\n      margin-top: 20px;\n    }\n  }\n}\n","@import '~@playkit-js/playkit-js-ui';\n\n// border radius\n$roundness-1: 4px;\n$roundness-3: 16px;\n\n$plugin-background: rgba(0, 0, 0, 0.6);\n\n@mixin plugin-scrollbar {\n  &::-webkit-scrollbar {\n    width: 4px;\n  }\n  &::-webkit-scrollbar-track {\n    background: rgba(33, 33, 33, 0.9);\n  }\n  &::-webkit-scrollbar-thumb {\n    border-radius: 3px;\n    background-color: rgba(255, 255, 255, 0.3);\n  }\n}\n","// Sass variables exported using the npm package for plugins usage\n\n// Accent Colors\n$primary-color: var(--playkit-primary-color);\n$primary-darker-color: var(--playkit-primary-darker-color);\n$primary-brighter-color: var(--playkit-primary-brighter-color);\n$primary-text-contrast-color: var(--playkit-primary-text-contrast-color);\n\n$secondary-color: var(--playkit-secondary-color);\n$secondary-darker-color: var(--playkit-secondary-darker-color);\n$secondary-brighter-color: var(--playkit-secondary-brighter-color);\n$secondary-text-contrast-color: var(--playkit-secondary-text-contrast-color);\n\n// Acknowledgement Colors\n$success-color: var(--playkit-success-color);\n$success-darker-color: var(--playkit-success-darker-color);\n$success-brighter-color: var(--playkit-success-brighter-color);\n$success-text-contrast-color: var(--playkit-success-text-contrast-color);\n\n$danger-color: var(--playkit-danger-color);\n$danger-darker-color: var(--playkit-danger-darker-color);\n$danger-brighter-color: var(--playkit-danger-brighter-color);\n$danger-text-contrast-color: var(--playkit-danger-text-contrast-color);\n\n$warning-color: var(--playkit-warning-color);\n$warning-darker-color: var(--playkit-warning-darker-color);\n$warning-brighter-color: var(--playkit-warning-brighter-color);\n$warning-text-contrast-color: var(--playkit-warning-text-contrast-color);\n\n// Tone Ramp\n$tone-1-color: var(--playkit-tone-1-color);\n$tone-2-color: var(--playkit-tone-2-color);\n$tone-3-color: var(--playkit-tone-3-color);\n$tone-4-color: var(--playkit-tone-4-color);\n$tone-5-color: var(--playkit-tone-5-color);\n$tone-6-color: var(--playkit-tone-6-color);\n$tone-7-color: var(--playkit-tone-7-color);\n$tone-8-color: var(--playkit-tone-8-color);\n\n$live-color: var(--playkit-live-color);\n$player-background-color: var(--playkit-player-background-color);\n$tab-focus-color: var(--playkit-tab-focus-color);\n$tooltip-background-color: var(--playkit-tooltip-background-color);\n$tooltip-color: var(--playkit-tooltip-color);\n$ads-color: var(--playkit-ads-color);\n"],sourceRoot:""}]),a.locals={"attach-placeholder-container":"attach-placeholder__attach-placeholder-container___xtP_6",attachPlaceholderContainer:"attach-placeholder__attach-placeholder-container___xtP_6","attach-header":"attach-placeholder__attach-header___GzyyE",attachHeader:"attach-placeholder__attach-header___GzyyE","attach-header-title":"attach-placeholder__attach-header-title___ghJ1L",attachHeaderTitle:"attach-placeholder__attach-header-title___ghJ1L","attach-content":"attach-placeholder__attach-content___WB0hj",attachContent:"attach-placeholder__attach-content___WB0hj","attach-text":"attach-placeholder__attach-text___SLDaC",attachText:"attach-placeholder__attach-text___SLDaC","attach-button":"attach-placeholder__attach-button___d7ZDz",attachButton:"attach-placeholder__attach-button___d7ZDz"};const s=a},9042:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>s});var n=r(559),o=r.n(n),i=r(3476),a=r.n(i)()(o());a.push([e.id,".autoscroll-button__autoscroll-root___DVqxM{position:absolute;right:12px;bottom:25px;width:auto;height:32px;padding:4px}.autoscroll-button__autoscroll-button___WBkBE{opacity:0;z-index:1}.autoscroll-button__autoscroll-button___WBkBE.autoscroll-button__autoscroll-button-visible___ZHUf1{opacity:1}","",{version:3,sources:["webpack://./components/autoscroll-button/autoscroll-button.scss"],names:[],mappings:"AAEA,4CACE,iBAAA,CACA,UAAA,CACA,WAAA,CACA,UAAA,CACA,WAAA,CACA,WAAA,CAGF,8CACE,SAAA,CACA,SAAA,CACA,mGACE,SAAA",sourcesContent:["@import '../../variables.scss';\n\n.autoscroll-root {\n  position: absolute;\n  right: 12px;\n  bottom: 25px;\n  width: auto;\n  height: 32px;\n  padding: 4px;\n}\n\n.autoscroll-button {\n  opacity: 0;\n  z-index: 1;\n  &.autoscroll-button-visible {\n    opacity: 1;\n  }\n}\n"],sourceRoot:""}]),a.locals={"autoscroll-root":"autoscroll-button__autoscroll-root___DVqxM",autoscrollRoot:"autoscroll-button__autoscroll-root___DVqxM","autoscroll-button":"autoscroll-button__autoscroll-button___WBkBE",autoscrollButton:"autoscroll-button__autoscroll-button___WBkBE","autoscroll-button-visible":"autoscroll-button__autoscroll-button-visible___ZHUf1",autoscrollButtonVisible:"autoscroll-button__autoscroll-button-visible___ZHUf1"};const s=a},828:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>s});var n=r(559),o=r.n(n),i=r(3476),a=r.n(i)()(o());a.push([e.id,".captionList__transcript-wrapper___Omf8T{position:absolute;width:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;padding-right:9px}","",{version:3,sources:["webpack://./components/caption-list/captionList.scss"],names:[],mappings:"AAAA,yCACE,iBAAA,CACA,UAAA,CACA,YAAA,CACA,qBAAA,CACA,kBAAA,CACA,sBAAA,CACA,iBAAA",sourcesContent:[".transcript-wrapper {\n  position: absolute;\n  width: 100%;\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  justify-content: center;\n  padding-right: 9px;\n}\n"],sourceRoot:""}]),a.locals={"transcript-wrapper":"captionList__transcript-wrapper___Omf8T",transcriptWrapper:"captionList__transcript-wrapper___Omf8T"};const s=a},9116:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>s});var n=r(559),o=r.n(n),i=r(3476),a=r.n(i)()(o());a.push([e.id,".caption__caption___v5MZY{display:flex;justify-content:space-between;width:100%;margin-bottom:9px;margin-left:8px;color:var(--playkit-tone-1-color);cursor:pointer}.caption__caption___v5MZY .caption__caption-time___N5cw5{flex-shrink:1;min-width:48px;align-items:flex-start;margin-right:8px;padding-top:2px;text-align:right;font-size:12px;color:var(--playkit-tone-2-color)}.caption__caption___v5MZY .caption__caption-content___F1WTh{flex-grow:1;font-size:14px;line-height:18px;text-align:left;user-select:text}.caption__caption___v5MZY .caption__caption-content___F1WTh:hover .caption__caption-span___cTewu{background-color:var(--playkit-tone-6-color)}.caption__caption___v5MZY .caption__caption-content___F1WTh:hover.caption__highlighted___ikaKW .caption__caption-span___cTewu{background-color:var(--playkit-primary-darker-color);padding:0 2px}.caption__caption___v5MZY .caption__caption-content___F1WTh.caption__highlighted___ikaKW .caption__caption-span___cTewu{color:var(--playkit-primary-text-contrast-color);background-color:var(--playkit-primary-color);padding:0 2px}.caption__caption___v5MZY .caption__caption-content___F1WTh.caption__without-time___v7BWT{margin-left:16px}.caption__caption___v5MZY .caption__caption-content___F1WTh .caption__caption-span___cTewu{user-select:text;-ms-user-select:text;border-radius:2px}.caption__caption___v5MZY .caption__caption-content___F1WTh .caption__caption-span___cTewu::selection{background-color:var(--playkit-primary-brighter-color);padding:0 2px}.caption__caption___v5MZY .caption__caption-content___F1WTh .caption__caption-span___cTewu>span::selection{background-color:var(--playkit-primary-brighter-color)}.caption__caption___v5MZY .caption__caption-content___F1WTh .caption__highlight-search___Rc4qg{color:var(--playkit-tone-8-color);background-color:var(--playkit-secondary-color);border-radius:2px}.caption__caption___v5MZY .caption__caption-content___F1WTh .caption__highlight-search___Rc4qg::selection{background-color:var(--playkit-primary-brighter-color)}.caption__caption___v5MZY .caption__caption-content___F1WTh .caption__active-search___yoZOD{color:var(--playkit-secondary-text-contrast-color);background-color:var(--playkit-primary-darker-color);border-radius:2px}.caption__caption___v5MZY .caption__caption-content___F1WTh .caption__active-search___yoZOD::selection{background-color:var(--playkit-primary-brighter-color)}","",{version:3,sources:["webpack://./components/caption/caption.scss","webpack://./../node_modules/@playkit-js/playkit-js-ui/src/styles/exported.scss"],names:[],mappings:"AAEA,0BACE,YAAA,CACA,6BAAA,CACA,UAAA,CACA,iBAAA,CACA,eAAA,CACA,iCCsBa,CDrBb,cAAA,CACA,yDACE,aAAA,CACA,cAAA,CACA,sBAAA,CACA,gBAAA,CACA,eAAA,CACA,gBAAA,CACA,cAAA,CACA,iCCaW,CDXb,4DACE,WAAA,CACA,cAAA,CACA,gBAAA,CACA,eAAA,CACA,gBAAA,CAEE,iGACE,4CCOO,CDJP,8HACE,oDC5Ba,CD6Bb,aAAA,CAKJ,wHACE,gDCjCsB,CDkCtB,6CCrCQ,CDsCR,aAAA,CAGJ,0FACE,gBAAA,CAEF,2FACE,gBAAA,CACA,oBAAA,CACA,iBAAA,CACA,sGACE,sDC/CiB,CDgDjB,aAAA,CAEF,2GACE,sDCnDiB,CDsDrB,+FACE,iCCvBS,CDwBT,+CCrDY,CDsDZ,iBAAA,CACA,0GACE,sDC3DiB,CD8DrB,4FACE,kDCzD0B,CD0D1B,oDCjEiB,CDkEjB,iBAAA,CACA,uGACE,sDCnEiB",sourcesContent:["@import '../../variables.scss';\n\n.caption {\n  display: flex;\n  justify-content: space-between;\n  width: 100%;\n  margin-bottom: 9px;\n  margin-left: 8px;\n  color: $tone-1-color;\n  cursor: pointer;\n  .caption-time {\n    flex-shrink: 1;\n    min-width: 48px;\n    align-items: flex-start;\n    margin-right: 8px;\n    padding-top: 2px;\n    text-align: right;\n    font-size: 12px;\n    color: $tone-2-color;\n  }\n  .caption-content {\n    flex-grow: 1;\n    font-size: 14px;\n    line-height: 18px;\n    text-align: left;\n    user-select: text;\n    &:hover {\n      .caption-span {\n        background-color: $tone-6-color;\n      }\n      &.highlighted {\n        .caption-span {\n          background-color: $primary-darker-color;\n          padding: 0 2px;\n        }\n      }\n    }\n    &.highlighted {\n      .caption-span {\n        color: $primary-text-contrast-color;\n        background-color: $primary-color;\n        padding: 0 2px;\n      }\n    }\n    &.without-time {\n      margin-left: 16px;\n    }\n    .caption-span {\n      user-select: text;\n      -ms-user-select: text;\n      border-radius: 2px;\n      &::selection {\n        background-color: $primary-brighter-color;\n        padding: 0 2px;\n      }\n      & > span::selection {\n        background-color: $primary-brighter-color;\n      }\n    }\n    .highlight-search {\n      color: $tone-8-color;\n      background-color: $secondary-color;\n      border-radius: 2px;\n      &::selection {\n        background-color: $primary-brighter-color;\n      }\n    }\n    .active-search {\n      color: $secondary-text-contrast-color;\n      background-color: $primary-darker-color;\n      border-radius: 2px;\n      &::selection {\n        background-color: $primary-brighter-color;\n      }\n    }\n  }\n}\n","// Sass variables exported using the npm package for plugins usage\n\n// Accent Colors\n$primary-color: var(--playkit-primary-color);\n$primary-darker-color: var(--playkit-primary-darker-color);\n$primary-brighter-color: var(--playkit-primary-brighter-color);\n$primary-text-contrast-color: var(--playkit-primary-text-contrast-color);\n\n$secondary-color: var(--playkit-secondary-color);\n$secondary-darker-color: var(--playkit-secondary-darker-color);\n$secondary-brighter-color: var(--playkit-secondary-brighter-color);\n$secondary-text-contrast-color: var(--playkit-secondary-text-contrast-color);\n\n// Acknowledgement Colors\n$success-color: var(--playkit-success-color);\n$success-darker-color: var(--playkit-success-darker-color);\n$success-brighter-color: var(--playkit-success-brighter-color);\n$success-text-contrast-color: var(--playkit-success-text-contrast-color);\n\n$danger-color: var(--playkit-danger-color);\n$danger-darker-color: var(--playkit-danger-darker-color);\n$danger-brighter-color: var(--playkit-danger-brighter-color);\n$danger-text-contrast-color: var(--playkit-danger-text-contrast-color);\n\n$warning-color: var(--playkit-warning-color);\n$warning-darker-color: var(--playkit-warning-darker-color);\n$warning-brighter-color: var(--playkit-warning-brighter-color);\n$warning-text-contrast-color: var(--playkit-warning-text-contrast-color);\n\n// Tone Ramp\n$tone-1-color: var(--playkit-tone-1-color);\n$tone-2-color: var(--playkit-tone-2-color);\n$tone-3-color: var(--playkit-tone-3-color);\n$tone-4-color: var(--playkit-tone-4-color);\n$tone-5-color: var(--playkit-tone-5-color);\n$tone-6-color: var(--playkit-tone-6-color);\n$tone-7-color: var(--playkit-tone-7-color);\n$tone-8-color: var(--playkit-tone-8-color);\n\n$live-color: var(--playkit-live-color);\n$player-background-color: var(--playkit-player-background-color);\n$tab-focus-color: var(--playkit-tab-focus-color);\n$tooltip-background-color: var(--playkit-tooltip-background-color);\n$tooltip-color: var(--playkit-tooltip-color);\n$ads-color: var(--playkit-ads-color);\n"],sourceRoot:""}]),a.locals={caption:"caption__caption___v5MZY","caption-time":"caption__caption-time___N5cw5",captionTime:"caption__caption-time___N5cw5","caption-content":"caption__caption-content___F1WTh",captionContent:"caption__caption-content___F1WTh","caption-span":"caption__caption-span___cTewu",captionSpan:"caption__caption-span___cTewu",highlighted:"caption__highlighted___ikaKW","without-time":"caption__without-time___v7BWT",withoutTime:"caption__without-time___v7BWT","highlight-search":"caption__highlight-search___Rc4qg",highlightSearch:"caption__highlight-search___Rc4qg","active-search":"caption__active-search___yoZOD",activeSearch:"caption__active-search___yoZOD"};const s=a},6958:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>s});var n=r(559),o=r.n(n),i=r(3476),a=r.n(i)()(o());a.push([e.id,".plugin-button__pluginButton___hbzoA.plugin-button__active___pVKh2{background-color:var(--playkit-tone-6-color)}","",{version:3,sources:["webpack://./components/plugin-button/plugin-button.scss","webpack://./../node_modules/@playkit-js/playkit-js-ui/src/styles/exported.scss"],names:[],mappings:"AAGE,mEACE,4CC+BW",sourcesContent:["@import '../../variables.scss';\n\n.pluginButton {\n  &.active {\n    background-color: $tone-6-color;\n  }\n}\n","// Sass variables exported using the npm package for plugins usage\n\n// Accent Colors\n$primary-color: var(--playkit-primary-color);\n$primary-darker-color: var(--playkit-primary-darker-color);\n$primary-brighter-color: var(--playkit-primary-brighter-color);\n$primary-text-contrast-color: var(--playkit-primary-text-contrast-color);\n\n$secondary-color: var(--playkit-secondary-color);\n$secondary-darker-color: var(--playkit-secondary-darker-color);\n$secondary-brighter-color: var(--playkit-secondary-brighter-color);\n$secondary-text-contrast-color: var(--playkit-secondary-text-contrast-color);\n\n// Acknowledgement Colors\n$success-color: var(--playkit-success-color);\n$success-darker-color: var(--playkit-success-darker-color);\n$success-brighter-color: var(--playkit-success-brighter-color);\n$success-text-contrast-color: var(--playkit-success-text-contrast-color);\n\n$danger-color: var(--playkit-danger-color);\n$danger-darker-color: var(--playkit-danger-darker-color);\n$danger-brighter-color: var(--playkit-danger-brighter-color);\n$danger-text-contrast-color: var(--playkit-danger-text-contrast-color);\n\n$warning-color: var(--playkit-warning-color);\n$warning-darker-color: var(--playkit-warning-darker-color);\n$warning-brighter-color: var(--playkit-warning-brighter-color);\n$warning-text-contrast-color: var(--playkit-warning-text-contrast-color);\n\n// Tone Ramp\n$tone-1-color: var(--playkit-tone-1-color);\n$tone-2-color: var(--playkit-tone-2-color);\n$tone-3-color: var(--playkit-tone-3-color);\n$tone-4-color: var(--playkit-tone-4-color);\n$tone-5-color: var(--playkit-tone-5-color);\n$tone-6-color: var(--playkit-tone-6-color);\n$tone-7-color: var(--playkit-tone-7-color);\n$tone-8-color: var(--playkit-tone-8-color);\n\n$live-color: var(--playkit-live-color);\n$player-background-color: var(--playkit-player-background-color);\n$tab-focus-color: var(--playkit-tab-focus-color);\n$tooltip-background-color: var(--playkit-tooltip-background-color);\n$tooltip-color: var(--playkit-tooltip-color);\n$ads-color: var(--playkit-ads-color);\n"],sourceRoot:""}]),a.locals={pluginButton:"plugin-button__pluginButton___hbzoA",active:"plugin-button__active___pVKh2"};const s=a},3558:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>s});var n=r(559),o=r.n(n),i=r(3476),a=r.n(i)()(o());a.push([e.id,".popover-menu__popover-anchor-container___WFlS9{cursor:pointer;border-radius:4px}.popover-menu__popover-anchor-container___WFlS9:hover{background-color:var(--playkit-tone-4-color)}.popover-menu__popover-anchor-container___WFlS9.popover-menu__active___MtUlv{background-color:var(--playkit-tone-6-color)}.popover-menu__popover-anchor-container___WFlS9 .popover-menu__popover-anchor___sJyqi{pointer-events:none}.popover-menu__popover-container___jooX_{position:relative}.popover-menu__popover-container___jooX_ .popover-menu__popover-component___lcTrW{background-color:var(--playkit-tone-7-color);border-radius:4px;display:block;font-size:15px;margin-top:6px;position:absolute;right:0px;z-index:1}.popover-menu__popover-menu-item___I24pM{align-items:center;display:flex;font-size:15px;line-height:18px;min-height:30px;padding:9px 24px 9px 16px;white-space:nowrap;margin:4px}.popover-menu__popover-menu-item___I24pM.popover-menu__popover-menu-item-disabled___IpAvq{color:var(--playkit-tone-4-color)}.popover-menu__popover-menu-item___I24pM:hover:not(.popover-menu__popover-menu-item-disabled___IpAvq){background-color:var(--playkit-tone-6-color);border-radius:4px;cursor:pointer}.popover-menu__popover-menu-item___I24pM:focus{outline:1px solid #222}.popover-menu__popover-menu___GirVB{padding-top:6px;padding-bottom:6px}","",{version:3,sources:["webpack://./components/popover-menu/popover-menu.scss","webpack://./variables.scss","webpack://./../node_modules/@playkit-js/playkit-js-ui/src/styles/exported.scss"],names:[],mappings:"AAEA,gDACE,cAAA,CACA,iBCDY,CDGZ,sDACE,4CE0BW,CFvBb,6EACE,4CEwBW,CFrBb,sFACE,mBAAA,CAIJ,yCACE,iBAAA,CAEA,kFACE,4CEaW,CFZX,iBCrBU,CDsBV,aAAA,CACA,cAAA,CACA,cAAA,CACA,iBAAA,CACA,SAAA,CACA,SAAA,CAGJ,yCACE,kBAAA,CACA,YAAA,CACA,cAAA,CACA,gBAAA,CACA,eAAA,CACA,yBAAA,CACA,kBAAA,CACA,UAAA,CAEA,0FACE,iCEXW,CFcb,sGACE,4CEbW,CFcX,iBC9CU,CD+CV,cAAA,CAGF,+CACE,sBAAA,CAIJ,oCACE,eAAA,CACA,kBAAA",sourcesContent:["@import './variables.scss';\n\n.popover-anchor-container {\n  cursor: pointer;\n  border-radius: $roundness-1;\n  \n  &:hover {\n    background-color: $tone-4-color;\n  }\n  \n  &.active {\n    background-color: $tone-6-color;\n  }\n  \n  .popover-anchor {\n    pointer-events: none;\n  }\n}\n\n.popover-container {\n  position: relative;\n  \n  .popover-component {\n    background-color: $tone-7-color;\n    border-radius: $roundness-1;\n    display: block;\n    font-size: 15px;\n    margin-top: 6px;\n    position: absolute;\n    right: 0px;\n    z-index: 1;\n  }\n}\n.popover-menu-item {\n  align-items: center;\n  display: flex;\n  font-size: 15px;\n  line-height: 18px;\n  min-height: 30px;\n  padding: 9px 24px 9px 16px;\n  white-space: nowrap;\n  margin: 4px;\n\n  &.popover-menu-item-disabled {\n    color: $tone-4-color;\n  }\n  \n  &:hover:not(.popover-menu-item-disabled) {\n    background-color: $tone-6-color;\n    border-radius: $roundness-1;\n    cursor: pointer;\n  }\n  \n  &:focus {\n    outline: 1px solid #222;\n  }\n}\n\n.popover-menu {\n  padding-top: 6px;\n  padding-bottom: 6px;\n}\n\n","@import '~@playkit-js/playkit-js-ui';\n\n// border radius\n$roundness-1: 4px;\n$roundness-3: 16px;\n\n$plugin-background: rgba(0, 0, 0, 0.6);\n\n@mixin plugin-scrollbar {\n  &::-webkit-scrollbar {\n    width: 4px;\n  }\n  &::-webkit-scrollbar-track {\n    background: rgba(33, 33, 33, 0.9);\n  }\n  &::-webkit-scrollbar-thumb {\n    border-radius: 3px;\n    background-color: rgba(255, 255, 255, 0.3);\n  }\n}\n","// Sass variables exported using the npm package for plugins usage\n\n// Accent Colors\n$primary-color: var(--playkit-primary-color);\n$primary-darker-color: var(--playkit-primary-darker-color);\n$primary-brighter-color: var(--playkit-primary-brighter-color);\n$primary-text-contrast-color: var(--playkit-primary-text-contrast-color);\n\n$secondary-color: var(--playkit-secondary-color);\n$secondary-darker-color: var(--playkit-secondary-darker-color);\n$secondary-brighter-color: var(--playkit-secondary-brighter-color);\n$secondary-text-contrast-color: var(--playkit-secondary-text-contrast-color);\n\n// Acknowledgement Colors\n$success-color: var(--playkit-success-color);\n$success-darker-color: var(--playkit-success-darker-color);\n$success-brighter-color: var(--playkit-success-brighter-color);\n$success-text-contrast-color: var(--playkit-success-text-contrast-color);\n\n$danger-color: var(--playkit-danger-color);\n$danger-darker-color: var(--playkit-danger-darker-color);\n$danger-brighter-color: var(--playkit-danger-brighter-color);\n$danger-text-contrast-color: var(--playkit-danger-text-contrast-color);\n\n$warning-color: var(--playkit-warning-color);\n$warning-darker-color: var(--playkit-warning-darker-color);\n$warning-brighter-color: var(--playkit-warning-brighter-color);\n$warning-text-contrast-color: var(--playkit-warning-text-contrast-color);\n\n// Tone Ramp\n$tone-1-color: var(--playkit-tone-1-color);\n$tone-2-color: var(--playkit-tone-2-color);\n$tone-3-color: var(--playkit-tone-3-color);\n$tone-4-color: var(--playkit-tone-4-color);\n$tone-5-color: var(--playkit-tone-5-color);\n$tone-6-color: var(--playkit-tone-6-color);\n$tone-7-color: var(--playkit-tone-7-color);\n$tone-8-color: var(--playkit-tone-8-color);\n\n$live-color: var(--playkit-live-color);\n$player-background-color: var(--playkit-player-background-color);\n$tab-focus-color: var(--playkit-tab-focus-color);\n$tooltip-background-color: var(--playkit-tooltip-background-color);\n$tooltip-color: var(--playkit-tooltip-color);\n$ads-color: var(--playkit-ads-color);\n"],sourceRoot:""}]),a.locals={"popover-anchor-container":"popover-menu__popover-anchor-container___WFlS9",popoverAnchorContainer:"popover-menu__popover-anchor-container___WFlS9",active:"popover-menu__active___MtUlv","popover-anchor":"popover-menu__popover-anchor___sJyqi",popoverAnchor:"popover-menu__popover-anchor___sJyqi","popover-container":"popover-menu__popover-container___jooX_",popoverContainer:"popover-menu__popover-container___jooX_","popover-component":"popover-menu__popover-component___lcTrW",popoverComponent:"popover-menu__popover-component___lcTrW","popover-menu-item":"popover-menu__popover-menu-item___I24pM",popoverMenuItem:"popover-menu__popover-menu-item___I24pM","popover-menu-item-disabled":"popover-menu__popover-menu-item-disabled___IpAvq",popoverMenuItemDisabled:"popover-menu__popover-menu-item-disabled___IpAvq","popover-menu":"popover-menu__popover-menu___GirVB",popoverMenu:"popover-menu__popover-menu___GirVB"};const s=a},5235:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>s});var n=r(559),o=r.n(n),i=r(3476),a=r.n(i)()(o());a.push([e.id,".small-screen-slate__smallScreenWrapper___kIoD5{position:relative;width:100%;height:100%;margin-top:-8px;margin-right:-2px;display:flex;align-items:center}.small-screen-slate__smallScreenWrapper___kIoD5 .small-screen-slate__closeButton___trEe_{position:absolute;right:6px;top:0px}.small-screen-slate__smallScreenWrapper___kIoD5 .small-screen-slate__contentWrapper___m1K1A{display:flex;width:100%;flex-direction:column;justify-content:center;align-items:center}.small-screen-slate__smallScreenWrapper___kIoD5 .small-screen-slate__contentWrapper___m1K1A .small-screen-slate__textContent___IjRTd{margin-top:8px;font-size:18px;font-style:normal;font-weight:700;line-height:20px;text-align:center}","",{version:3,sources:["webpack://./components/small-screen-slate/small-screen-slate.scss"],names:[],mappings:"AAAA,gDACE,iBAAA,CACA,UAAA,CACA,WAAA,CACA,eAAA,CACA,iBAAA,CACA,YAAA,CACA,kBAAA,CACA,yFACE,iBAAA,CACA,SAAA,CACA,OAAA,CAEF,4FACE,YAAA,CACA,UAAA,CACA,qBAAA,CACA,sBAAA,CACA,kBAAA,CACA,qIACE,cAAA,CACA,cAAA,CACA,iBAAA,CACA,eAAA,CACA,gBAAA,CACA,iBAAA",sourcesContent:[".smallScreenWrapper {\n  position: relative;\n  width: 100%;\n  height: 100%;\n  margin-top: -8px;\n  margin-right: -2px;\n  display: flex;\n  align-items: center;\n  .closeButton {\n    position: absolute;\n    right: 6px;\n    top: 0px;\n  }\n  .contentWrapper {\n    display: flex;\n    width: 100%;\n    flex-direction: column;\n    justify-content: center;\n    align-items: center;\n    .textContent {\n      margin-top: 8px;\n      font-size: 18px;\n      font-style: normal;\n      font-weight: 700;\n      line-height: 20px;\n      text-align: center;\n    }\n  }\n}\n"],sourceRoot:""}]),a.locals={smallScreenWrapper:"small-screen-slate__smallScreenWrapper___kIoD5",closeButton:"small-screen-slate__closeButton___trEe_",contentWrapper:"small-screen-slate__contentWrapper___m1K1A",textContent:"small-screen-slate__textContent___IjRTd"};const s=a},7586:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>s});var n=r(559),o=r.n(n),i=r(3476),a=r.n(i)()(o());a.push([e.id,".spinner__transcript-loader___SzsWJ{display:flex;flex-direction:column;height:100%;width:100%;color:var(--playkit-tone-3-color);margin:0;animation:spinner__frame-bounce___nmvI_ 2s infinite ease-in-out;overflow:hidden}.spinner__transcript-loader___SzsWJ svg{flex-shrink:0}@keyframes spinner__frame-bounce___nmvI_{0%,100%{opacity:.1}50%{opacity:.25}}","",{version:3,sources:["webpack://./components/spinner/spinner.scss","webpack://./../node_modules/@playkit-js/playkit-js-ui/src/styles/exported.scss"],names:[],mappings:"AAEA,oCACE,YAAA,CACA,qBAAA,CACA,WAAA,CACA,UAAA,CACA,iCCyBa,CDxBb,QAAA,CACA,+DAAA,CACA,eAAA,CACA,wCACE,aAAA,CAIJ,yCACE,QAEE,UAAA,CAEF,IACE,WAAA,CAAA",sourcesContent:["@import '../../variables.scss';\n\n.transcript-loader {\n  display: flex;\n  flex-direction: column;\n  height: 100%;\n  width: 100%;\n  color: $tone-3-color;\n  margin: 0;\n  animation: frame-bounce 2s infinite ease-in-out;\n  overflow: hidden;\n  svg {\n    flex-shrink: 0;\n  }\n}\n\n@keyframes frame-bounce {\n  0%,\n  100% {\n    opacity: 0.1;\n  }\n  50% {\n    opacity: 0.25;\n  }\n}\n","// Sass variables exported using the npm package for plugins usage\n\n// Accent Colors\n$primary-color: var(--playkit-primary-color);\n$primary-darker-color: var(--playkit-primary-darker-color);\n$primary-brighter-color: var(--playkit-primary-brighter-color);\n$primary-text-contrast-color: var(--playkit-primary-text-contrast-color);\n\n$secondary-color: var(--playkit-secondary-color);\n$secondary-darker-color: var(--playkit-secondary-darker-color);\n$secondary-brighter-color: var(--playkit-secondary-brighter-color);\n$secondary-text-contrast-color: var(--playkit-secondary-text-contrast-color);\n\n// Acknowledgement Colors\n$success-color: var(--playkit-success-color);\n$success-darker-color: var(--playkit-success-darker-color);\n$success-brighter-color: var(--playkit-success-brighter-color);\n$success-text-contrast-color: var(--playkit-success-text-contrast-color);\n\n$danger-color: var(--playkit-danger-color);\n$danger-darker-color: var(--playkit-danger-darker-color);\n$danger-brighter-color: var(--playkit-danger-brighter-color);\n$danger-text-contrast-color: var(--playkit-danger-text-contrast-color);\n\n$warning-color: var(--playkit-warning-color);\n$warning-darker-color: var(--playkit-warning-darker-color);\n$warning-brighter-color: var(--playkit-warning-brighter-color);\n$warning-text-contrast-color: var(--playkit-warning-text-contrast-color);\n\n// Tone Ramp\n$tone-1-color: var(--playkit-tone-1-color);\n$tone-2-color: var(--playkit-tone-2-color);\n$tone-3-color: var(--playkit-tone-3-color);\n$tone-4-color: var(--playkit-tone-4-color);\n$tone-5-color: var(--playkit-tone-5-color);\n$tone-6-color: var(--playkit-tone-6-color);\n$tone-7-color: var(--playkit-tone-7-color);\n$tone-8-color: var(--playkit-tone-8-color);\n\n$live-color: var(--playkit-live-color);\n$player-background-color: var(--playkit-player-background-color);\n$tab-focus-color: var(--playkit-tab-focus-color);\n$tooltip-background-color: var(--playkit-tooltip-background-color);\n$tooltip-color: var(--playkit-tooltip-color);\n$ads-color: var(--playkit-ads-color);\n"],sourceRoot:""}]),a.locals={"transcript-loader":"spinner__transcript-loader___SzsWJ",transcriptLoader:"spinner__transcript-loader___SzsWJ","frame-bounce":"spinner__frame-bounce___nmvI_",frameBounce:"spinner__frame-bounce___nmvI_"};const s=a},7017:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>s});var n=r(559),o=r.n(n),i=r(3476),a=r.n(i)()(o());a.push([e.id,".transcript__hidden___uGO_Y{visibility:hidden}.transcript__root___SEZlz{display:flex;justify-content:center;padding:16px 4px 0px 0px;color:var(--playkit-tone-1-color);height:100%;width:100%;position:absolute;background:rgba(0,0,0,.6);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);z-index:1;cursor:default}.transcript__root___SEZlz .transcript__skip-transcript-button___fQwQC{position:absolute;top:-1000px;z-index:1;display:flex;align-items:center;justify-content:center;width:120px;height:32px;border-radius:16px;box-shadow:0 2px 8px 0 rgba(0,0,0,.3);border:solid 1px var(--playkit-primary-color);background-color:var(--playkit-tone-7-color);font-size:15px;line-height:1.27;color:var(--playkit-tone-1-color)}.transcript__root___SEZlz .transcript__skip-transcript-button___fQwQC:focus{top:56px;right:12px;outline:none !important}.transcript__root___SEZlz *{font-family:sans-serif;font-style:normal}.transcript__root___SEZlz *:focus-visible:not(input){outline:1px solid var(--playkit-tab-focus-color)}.transcript__global-container___Sn7v8{position:relative;height:100%;display:flex;flex-direction:column;max-width:599px;width:100%}.transcript__header___AgZkl{position:relative;display:flex;align-items:center;justify-content:space-between;width:100%;margin-bottom:8px;padding-left:16px;font-size:16px;padding-right:16px;gap:8px;z-index:2}.transcript__header___AgZkl .transcript__to-search-button____rcK0{position:absolute;right:16px;bottom:calc((40px)*-1);opacity:0}.transcript__header___AgZkl .transcript__to-search-button____rcK0:focus{opacity:1}.transcript__body___jTlBG{position:relative;padding-top:1px;flex:1;width:100%;overflow-y:auto;text-align:center;overflow-x:hidden}.transcript__body___jTlBG::-webkit-scrollbar{width:4px}.transcript__body___jTlBG::-webkit-scrollbar-track{background:rgba(33,33,33,.9)}.transcript__body___jTlBG::-webkit-scrollbar-thumb{border-radius:3px;background-color:rgba(255,255,255,.3)}.transcript__error-wrapper___Qe39U{height:100%;width:100%;display:flex;align-items:center;justify-content:center;flex-direction:column;color:var(--playkit-tone-3-color)}.transcript__error-wrapper___Qe39U .transcript__error-icon___no0DO{width:100%;height:100%;max-width:184px;max-height:184px;background-size:contain;background-repeat:no-repeat;background-position:center}.transcript__error-wrapper___Qe39U .transcript__error-main-text___VIVvd{font-size:1.3em;margin-top:8px;margin-bottom:2px}.transcript__error-wrapper___Qe39U .transcript__error-description-text___gg6yo{margin:0}.transcript__error-wrapper___Qe39U .transcript__retry-button___wCycN{width:36px;display:block;padding:0;margin:4px auto 0 auto;border:none;background:inherit;color:#fff;cursor:pointer}","",{version:3,sources:["webpack://./components/transcript/transcript.scss","webpack://./../node_modules/@playkit-js/playkit-js-ui/src/styles/exported.scss","webpack://./variables.scss"],names:[],mappings:"AAIA,4BACE,iBAAA,CAGF,0BACE,YAAA,CACA,sBAAA,CACA,wBAAA,CACA,iCCkBa,CDjBb,WAAA,CACA,UAAA,CACA,iBAAA,CACA,yBEVkB,CFWlB,yBAAA,CACA,iCAAA,CACA,SAAA,CACA,cAAA,CACA,sEACE,iBAAA,CACA,WAAA,CACA,SAAA,CACA,YAAA,CACA,kBAAA,CACA,sBAAA,CACA,WAAA,CACA,WA3BY,CA4BZ,kBE1BU,CF2BV,qCAAA,CACA,6CAAA,CACA,4CCGW,CDFX,cAAA,CACA,gBAAA,CACA,iCCNW,CDOX,4EACE,QAAA,CACA,UAAA,CACA,uBAAA,CAIJ,4BACE,sBAAA,CACA,iBAAA,CAGF,qDACE,gDAAA,CAIJ,sCACE,iBAAA,CACA,WAAA,CACA,YAAA,CACA,qBAAA,CACA,eAAA,CACA,UAAA,CAGF,4BAGE,iBAAA,CACA,YAAA,CACA,kBAAA,CACA,6BAAA,CACA,UAAA,CACA,iBAPuB,CAQvB,iBAAA,CACA,cAAA,CACA,kBAAA,CACA,OAAA,CACA,SAAA,CACA,kEACE,iBAAA,CACA,UAAA,CACA,sBAAA,CACA,SAAA,CACA,wEACE,SAAA,CAKN,0BACE,iBAAA,CACA,eAAA,CACA,MAAA,CACA,UAAA,CACA,eAAA,CACA,iBAAA,CACA,iBAAA,CEtFA,6CACE,SAAA,CAEF,mDACE,4BAAA,CAEF,mDACE,iBAAA,CACA,qCAAA,CFkFJ,mCACE,WAAA,CACA,UAAA,CACA,YAAA,CACA,kBAAA,CACA,sBAAA,CACA,qBAAA,CACA,iCC1Ea,CD2Eb,mEACE,UAAA,CACA,WAAA,CACA,eAAA,CACA,gBAAA,CACA,uBAAA,CACA,2BAAA,CACA,0BAAA,CAEF,wEACE,eAAA,CACA,cAAA,CACA,iBAAA,CAEF,+EACE,QAAA,CAEF,qEACE,UAAA,CACA,aAAA,CACA,SAAA,CACA,sBAAA,CACA,WAAA,CACA,kBAAA,CACA,UAAA,CACA,cAAA",sourcesContent:["@import '../../variables.scss';\n\n$button-height: 32px;\n\n.hidden {\n  visibility: hidden;\n}\n\n.root {\n  display: flex;\n  justify-content: center;\n  padding: 16px 4px 0px 0px;\n  color: $tone-1-color;\n  height: 100%;\n  width: 100%;\n  position: absolute;\n  background: $plugin-background;\n  backdrop-filter: blur(8px);\n  -webkit-backdrop-filter: blur(8px);\n  z-index: 1;\n  cursor: default;\n  .skip-transcript-button {\n    position: absolute;\n    top: -1000px;\n    z-index: 1;\n    display: flex;\n    align-items: center;\n    justify-content: center;\n    width: 120px;\n    height: $button-height;\n    border-radius: $roundness-3;\n    box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.3);\n    border: solid 1px $primary-color;\n    background-color: $tone-7-color;\n    font-size: 15px;\n    line-height: 1.27;\n    color: $tone-1-color;\n    &:focus {\n      top: 56px;\n      right: 12px;\n      outline: none !important; // prevent focus styles inherited from playkit-player.playkit-nav\n    }\n  }\n\n  * {\n    font-family: sans-serif;\n    font-style: normal;\n  }\n\n  *:focus-visible:not(input) {\n    outline: 1px solid $tab-focus-color;\n  }\n}\n\n.global-container {\n  position: relative;\n  height: 100%;\n  display: flex;\n  flex-direction: column;\n  max-width: 599px;\n  width: 100%;\n}\n\n.header {\n  $header-margin-bottom: 8px;\n\n  position: relative;\n  display: flex;\n  align-items: center;\n  justify-content: space-between;\n  width: 100%;\n  margin-bottom: $header-margin-bottom;\n  padding-left: 16px;\n  font-size: 16px;\n  padding-right: 16px;\n  gap: 8px;\n  z-index: 2;\n  .to-search-button {\n    position: absolute;\n    right: 16px;\n    bottom: calc((#{$button-height + $header-margin-bottom}) * -1); // button height + margin\n    opacity: 0;\n    &:focus {\n      opacity: 1;\n    }\n  }\n}\n\n.body {\n  position: relative;\n  padding-top: 1px;\n  flex: 1;\n  width: 100%;\n  overflow-y: auto;\n  text-align: center;\n  overflow-x: hidden;\n  @include plugin-scrollbar();\n}\n\n.error-wrapper {\n  height: 100%;\n  width: 100%;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  flex-direction: column;\n  color: $tone-3-color;\n  .error-icon {\n    width: 100%;\n    height: 100%;\n    max-width: 184px;\n    max-height: 184px;\n    background-size: contain;\n    background-repeat: no-repeat;\n    background-position: center;\n  }\n  .error-main-text {\n    font-size: 1.3em;\n    margin-top: 8px;\n    margin-bottom: 2px;\n  }\n  .error-description-text {\n    margin: 0;\n  }\n  .retry-button {\n    width: 36px;\n    display: block;\n    padding: 0;\n    margin: 4px auto 0 auto;\n    border: none;\n    background: inherit;\n    color: white;\n    cursor: pointer;\n  }\n}\n","// Sass variables exported using the npm package for plugins usage\n\n// Accent Colors\n$primary-color: var(--playkit-primary-color);\n$primary-darker-color: var(--playkit-primary-darker-color);\n$primary-brighter-color: var(--playkit-primary-brighter-color);\n$primary-text-contrast-color: var(--playkit-primary-text-contrast-color);\n\n$secondary-color: var(--playkit-secondary-color);\n$secondary-darker-color: var(--playkit-secondary-darker-color);\n$secondary-brighter-color: var(--playkit-secondary-brighter-color);\n$secondary-text-contrast-color: var(--playkit-secondary-text-contrast-color);\n\n// Acknowledgement Colors\n$success-color: var(--playkit-success-color);\n$success-darker-color: var(--playkit-success-darker-color);\n$success-brighter-color: var(--playkit-success-brighter-color);\n$success-text-contrast-color: var(--playkit-success-text-contrast-color);\n\n$danger-color: var(--playkit-danger-color);\n$danger-darker-color: var(--playkit-danger-darker-color);\n$danger-brighter-color: var(--playkit-danger-brighter-color);\n$danger-text-contrast-color: var(--playkit-danger-text-contrast-color);\n\n$warning-color: var(--playkit-warning-color);\n$warning-darker-color: var(--playkit-warning-darker-color);\n$warning-brighter-color: var(--playkit-warning-brighter-color);\n$warning-text-contrast-color: var(--playkit-warning-text-contrast-color);\n\n// Tone Ramp\n$tone-1-color: var(--playkit-tone-1-color);\n$tone-2-color: var(--playkit-tone-2-color);\n$tone-3-color: var(--playkit-tone-3-color);\n$tone-4-color: var(--playkit-tone-4-color);\n$tone-5-color: var(--playkit-tone-5-color);\n$tone-6-color: var(--playkit-tone-6-color);\n$tone-7-color: var(--playkit-tone-7-color);\n$tone-8-color: var(--playkit-tone-8-color);\n\n$live-color: var(--playkit-live-color);\n$player-background-color: var(--playkit-player-background-color);\n$tab-focus-color: var(--playkit-tab-focus-color);\n$tooltip-background-color: var(--playkit-tooltip-background-color);\n$tooltip-color: var(--playkit-tooltip-color);\n$ads-color: var(--playkit-ads-color);\n","@import '~@playkit-js/playkit-js-ui';\n\n// border radius\n$roundness-1: 4px;\n$roundness-3: 16px;\n\n$plugin-background: rgba(0, 0, 0, 0.6);\n\n@mixin plugin-scrollbar {\n  &::-webkit-scrollbar {\n    width: 4px;\n  }\n  &::-webkit-scrollbar-track {\n    background: rgba(33, 33, 33, 0.9);\n  }\n  &::-webkit-scrollbar-thumb {\n    border-radius: 3px;\n    background-color: rgba(255, 255, 255, 0.3);\n  }\n}\n"],sourceRoot:""}]),a.locals={hidden:"transcript__hidden___uGO_Y",root:"transcript__root___SEZlz","skip-transcript-button":"transcript__skip-transcript-button___fQwQC",skipTranscriptButton:"transcript__skip-transcript-button___fQwQC","global-container":"transcript__global-container___Sn7v8",globalContainer:"transcript__global-container___Sn7v8",header:"transcript__header___AgZkl","to-search-button":"transcript__to-search-button____rcK0",toSearchButton:"transcript__to-search-button____rcK0",body:"transcript__body___jTlBG","error-wrapper":"transcript__error-wrapper___Qe39U",errorWrapper:"transcript__error-wrapper___Qe39U","error-icon":"transcript__error-icon___no0DO",errorIcon:"transcript__error-icon___no0DO","error-main-text":"transcript__error-main-text___VIVvd",errorMainText:"transcript__error-main-text___VIVvd","error-description-text":"transcript__error-description-text___gg6yo",errorDescriptionText:"transcript__error-description-text___gg6yo","retry-button":"transcript__retry-button___wCycN",retryButton:"transcript__retry-button___wCycN"};const s=a},3476:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var r="",n=void 0!==t[5];return t[4]&&(r+="@supports (".concat(t[4],") {")),t[2]&&(r+="@media ".concat(t[2]," {")),n&&(r+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),r+=e(t),n&&(r+="}"),t[2]&&(r+="}"),t[4]&&(r+="}"),r})).join("")},t.i=function(e,r,n,o,i){"string"==typeof e&&(e=[[null,e,void 0]]);var a={};if(n)for(var s=0;s<this.length;s++){var l=this[s][0];null!=l&&(a[l]=!0)}for(var c=0;c<e.length;c++){var u=[].concat(e[c]);n&&a[u[0]]||(void 0!==i&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=i),r&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=r):u[2]=r),o&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=o):u[4]="".concat(o)),t.push(u))}},t}},559:e=>{"use strict";e.exports=function(e){var t=e[1],r=e[3];if(!r)return t;if("function"==typeof btoa){var n=btoa(unescape(encodeURIComponent(JSON.stringify(r)))),o="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(n),i="/*# ".concat(o," */"),a=r.sources.map((function(e){return"/*# sourceURL=".concat(r.sourceRoot||"").concat(e," */")}));return[t].concat(a).concat([i]).join("\n")}return[t].join("\n")}},1857:e=>{"use strict";var t=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===r}(e)}(e)},r="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function n(e,t){return!1!==t.clone&&t.isMergeableObject(e)?s((r=e,Array.isArray(r)?[]:{}),e,t):e;var r}function o(e,t,r){return e.concat(t).map((function(e){return n(e,r)}))}function i(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter((function(t){return Object.propertyIsEnumerable.call(e,t)})):[]}(e))}function a(e,t){try{return t in e}catch(e){return!1}}function s(e,r,l){(l=l||{}).arrayMerge=l.arrayMerge||o,l.isMergeableObject=l.isMergeableObject||t,l.cloneUnlessOtherwiseSpecified=n;var c=Array.isArray(r);return c===Array.isArray(e)?c?l.arrayMerge(e,r,l):function(e,t,r){var o={};return r.isMergeableObject(e)&&i(e).forEach((function(t){o[t]=n(e[t],r)})),i(t).forEach((function(i){(function(e,t){return a(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,i)||(a(e,i)&&r.isMergeableObject(t[i])?o[i]=function(e,t){if(!t.customMerge)return s;var r=t.customMerge(e);return"function"==typeof r?r:s}(i,r)(e[i],t[i],r):o[i]=n(t[i],r))})),o}(e,r,l):n(r,l)}s.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(e,r){return s(e,r,t)}),{})};var l=s;e.exports=l},1069:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.attributeNames=t.elementNames=void 0,t.elementNames=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map((function(e){return[e.toLowerCase(),e]}))),t.attributeNames=new Map(["definitionURL","attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map((function(e){return[e.toLowerCase(),e]})))},6398:function(e,t,r){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)},o=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&o(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.render=void 0;var s=a(r(289)),l=r(9625),c=r(1069),u=new Set(["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"]);function p(e){return e.replace(/"/g,"&quot;")}var d=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]);function h(e,t){void 0===t&&(t={});for(var r=("length"in e?e:[e]),n="",o=0;o<r.length;o++)n+=f(r[o],t);return n}function f(e,t){switch(e.type){case s.Root:return h(e.children,t);case s.Doctype:case s.Directive:return"<".concat(e.data,">");case s.Comment:return"\x3c!--".concat(e.data,"--\x3e");case s.CDATA:return function(e){return"<![CDATA[".concat(e.children[0].data,"]]>")}(e);case s.Script:case s.Style:case s.Tag:return function(e,t){var r;"foreign"===t.xmlMode&&(e.name=null!==(r=c.elementNames.get(e.name))&&void 0!==r?r:e.name,e.parent&&g.has(e.parent.name)&&(t=n(n({},t),{xmlMode:!1}))),!t.xmlMode&&_.has(e.name)&&(t=n(n({},t),{xmlMode:"foreign"}));var o="<".concat(e.name),i=function(e,t){var r;if(e){var n=!1===(null!==(r=t.encodeEntities)&&void 0!==r?r:t.decodeEntities)?p:t.xmlMode||"utf8"!==t.encodeEntities?l.encodeXML:l.escapeAttribute;return Object.keys(e).map((function(r){var o,i,a=null!==(o=e[r])&&void 0!==o?o:"";return"foreign"===t.xmlMode&&(r=null!==(i=c.attributeNames.get(r))&&void 0!==i?i:r),t.emptyAttrs||t.xmlMode||""!==a?"".concat(r,'="').concat(n(a),'"'):r})).join(" ")}}(e.attribs,t);return i&&(o+=" ".concat(i)),0===e.children.length&&(t.xmlMode?!1!==t.selfClosingTags:t.selfClosingTags&&d.has(e.name))?(t.xmlMode||(o+=" "),o+="/>"):(o+=">",e.children.length>0&&(o+=h(e.children,t)),!t.xmlMode&&d.has(e.name)||(o+="</".concat(e.name,">"))),o}(e,t);case s.Text:return function(e,t){var r,n=e.data||"";return!1===(null!==(r=t.encodeEntities)&&void 0!==r?r:t.decodeEntities)||!t.xmlMode&&e.parent&&u.has(e.parent.name)||(n=t.xmlMode||"utf8"!==t.encodeEntities?(0,l.encodeXML)(n):(0,l.escapeText)(n)),n}(e,t)}}t.render=h,t.default=h;var g=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignObject","desc","title"]),_=new Set(["svg","math"])},289:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.Doctype=t.CDATA=t.Tag=t.Style=t.Script=t.Comment=t.Directive=t.Text=t.Root=t.isTag=t.ElementType=void 0,function(e){e.Root="root",e.Text="text",e.Directive="directive",e.Comment="comment",e.Script="script",e.Style="style",e.Tag="tag",e.CDATA="cdata",e.Doctype="doctype"}(r=t.ElementType||(t.ElementType={})),t.isTag=function(e){return e.type===r.Tag||e.type===r.Script||e.type===r.Style},t.Root=r.Root,t.Text=r.Text,t.Directive=r.Directive,t.Comment=r.Comment,t.Script=r.Script,t.Style=r.Style,t.Tag=r.Tag,t.CDATA=r.CDATA,t.Doctype=r.Doctype},6722:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.DomHandler=void 0;var i=r(289),a=r(1901);o(r(1901),t);var s={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},l=function(){function e(e,t,r){this.dom=[],this.root=new a.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,"function"==typeof t&&(r=t,t=s),"object"==typeof e&&(t=e,e=void 0),this.callback=null!=e?e:null,this.options=null!=t?t:s,this.elementCB=null!=r?r:null}return e.prototype.onparserinit=function(e){this.parser=e},e.prototype.onreset=function(){this.dom=[],this.root=new a.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},e.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},e.prototype.onerror=function(e){this.handleCallback(e)},e.prototype.onclosetag=function(){this.lastNode=null;var e=this.tagStack.pop();this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(e)},e.prototype.onopentag=function(e,t){var r=this.options.xmlMode?i.ElementType.Tag:void 0,n=new a.Element(e,t,void 0,r);this.addNode(n),this.tagStack.push(n)},e.prototype.ontext=function(e){var t=this.lastNode;if(t&&t.type===i.ElementType.Text)t.data+=e,this.options.withEndIndices&&(t.endIndex=this.parser.endIndex);else{var r=new a.Text(e);this.addNode(r),this.lastNode=r}},e.prototype.oncomment=function(e){if(this.lastNode&&this.lastNode.type===i.ElementType.Comment)this.lastNode.data+=e;else{var t=new a.Comment(e);this.addNode(t),this.lastNode=t}},e.prototype.oncommentend=function(){this.lastNode=null},e.prototype.oncdatastart=function(){var e=new a.Text(""),t=new a.CDATA([e]);this.addNode(t),e.parent=t,this.lastNode=e},e.prototype.oncdataend=function(){this.lastNode=null},e.prototype.onprocessinginstruction=function(e,t){var r=new a.ProcessingInstruction(e,t);this.addNode(r)},e.prototype.handleCallback=function(e){if("function"==typeof this.callback)this.callback(e,this.dom);else if(e)throw e},e.prototype.addNode=function(e){var t=this.tagStack[this.tagStack.length-1],r=t.children[t.children.length-1];this.options.withStartIndices&&(e.startIndex=this.parser.startIndex),this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),t.children.push(e),r&&(e.prev=r,r.next=e),e.parent=t,this.lastNode=null},e}();t.DomHandler=l,t.default=l},1901:function(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.cloneNode=t.hasChildren=t.isDocument=t.isDirective=t.isComment=t.isText=t.isCDATA=t.isTag=t.Element=t.Document=t.CDATA=t.NodeWithChildren=t.ProcessingInstruction=t.Comment=t.Text=t.DataNode=t.Node=void 0;var a=r(289),s=function(){function e(){this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}return Object.defineProperty(e.prototype,"parentNode",{get:function(){return this.parent},set:function(e){this.parent=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"previousSibling",{get:function(){return this.prev},set:function(e){this.prev=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nextSibling",{get:function(){return this.next},set:function(e){this.next=e},enumerable:!1,configurable:!0}),e.prototype.cloneNode=function(e){return void 0===e&&(e=!1),b(this,e)},e}();t.Node=s;var l=function(e){function t(t){var r=e.call(this)||this;return r.data=t,r}return o(t,e),Object.defineProperty(t.prototype,"nodeValue",{get:function(){return this.data},set:function(e){this.data=e},enumerable:!1,configurable:!0}),t}(s);t.DataNode=l;var c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=a.ElementType.Text,t}return o(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 3},enumerable:!1,configurable:!0}),t}(l);t.Text=c;var u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=a.ElementType.Comment,t}return o(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 8},enumerable:!1,configurable:!0}),t}(l);t.Comment=u;var p=function(e){function t(t,r){var n=e.call(this,r)||this;return n.name=t,n.type=a.ElementType.Directive,n}return o(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),t}(l);t.ProcessingInstruction=p;var d=function(e){function t(t){var r=e.call(this)||this;return r.children=t,r}return o(t,e),Object.defineProperty(t.prototype,"firstChild",{get:function(){var e;return null!==(e=this.children[0])&&void 0!==e?e:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lastChild",{get:function(){return this.children.length>0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(e){this.children=e},enumerable:!1,configurable:!0}),t}(s);t.NodeWithChildren=d;var h=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=a.ElementType.CDATA,t}return o(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),t}(d);t.CDATA=h;var f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=a.ElementType.Root,t}return o(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),t}(d);t.Document=f;var g=function(e){function t(t,r,n,o){void 0===n&&(n=[]),void 0===o&&(o="script"===t?a.ElementType.Script:"style"===t?a.ElementType.Style:a.ElementType.Tag);var i=e.call(this,n)||this;return i.name=t,i.attribs=r,i.type=o,i}return o(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(e){this.name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var e=this;return Object.keys(this.attribs).map((function(t){var r,n;return{name:t,value:e.attribs[t],namespace:null===(r=e["x-attribsNamespace"])||void 0===r?void 0:r[t],prefix:null===(n=e["x-attribsPrefix"])||void 0===n?void 0:n[t]}}))},enumerable:!1,configurable:!0}),t}(d);function _(e){return(0,a.isTag)(e)}function m(e){return e.type===a.ElementType.CDATA}function v(e){return e.type===a.ElementType.Text}function A(e){return e.type===a.ElementType.Comment}function y(e){return e.type===a.ElementType.Directive}function C(e){return e.type===a.ElementType.Root}function b(e,t){var r;if(void 0===t&&(t=!1),v(e))r=new c(e.data);else if(A(e))r=new u(e.data);else if(_(e)){var n=t?w(e.children):[],o=new g(e.name,i({},e.attribs),n);n.forEach((function(e){return e.parent=o})),null!=e.namespace&&(o.namespace=e.namespace),e["x-attribsNamespace"]&&(o["x-attribsNamespace"]=i({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(o["x-attribsPrefix"]=i({},e["x-attribsPrefix"])),r=o}else if(m(e)){n=t?w(e.children):[];var a=new h(n);n.forEach((function(e){return e.parent=a})),r=a}else if(C(e)){n=t?w(e.children):[];var s=new f(n);n.forEach((function(e){return e.parent=s})),e["x-mode"]&&(s["x-mode"]=e["x-mode"]),r=s}else{if(!y(e))throw new Error("Not implemented yet: ".concat(e.type));var l=new p(e.name,e.data);null!=e["x-name"]&&(l["x-name"]=e["x-name"],l["x-publicId"]=e["x-publicId"],l["x-systemId"]=e["x-systemId"]),r=l}return r.startIndex=e.startIndex,r.endIndex=e.endIndex,null!=e.sourceCodeLocation&&(r.sourceCodeLocation=e.sourceCodeLocation),r}function w(e){for(var t=e.map((function(e){return b(e,!0)})),r=1;r<t.length;r++)t[r].prev=t[r-1],t[r-1].next=t[r];return t}t.Element=g,t.isTag=_,t.isCDATA=m,t.isText=v,t.isComment=A,t.isDirective=y,t.isDocument=C,t.hasChildren=function(e){return Object.prototype.hasOwnProperty.call(e,"children")},t.cloneNode=b},7652:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getFeed=void 0;var n=r(1454),o=r(5198);t.getFeed=function(e){var t=l(p,e);return t?"feed"===t.name?function(e){var t,r=e.children,n={type:"atom",items:(0,o.getElementsByTagName)("entry",r).map((function(e){var t,r=e.children,n={media:s(r)};u(n,"id","id",r),u(n,"title","title",r);var o=null===(t=l("link",r))||void 0===t?void 0:t.attribs.href;o&&(n.link=o);var i=c("summary",r)||c("content",r);i&&(n.description=i);var a=c("updated",r);return a&&(n.pubDate=new Date(a)),n}))};u(n,"id","id",r),u(n,"title","title",r);var i=null===(t=l("link",r))||void 0===t?void 0:t.attribs.href;i&&(n.link=i),u(n,"description","subtitle",r);var a=c("updated",r);return a&&(n.updated=new Date(a)),u(n,"author","email",r,!0),n}(t):function(e){var t,r,n=null!==(r=null===(t=l("channel",e.children))||void 0===t?void 0:t.children)&&void 0!==r?r:[],i={type:e.name.substr(0,3),id:"",items:(0,o.getElementsByTagName)("item",e.children).map((function(e){var t=e.children,r={media:s(t)};u(r,"id","guid",t),u(r,"title","title",t),u(r,"link","link",t),u(r,"description","description",t);var n=c("pubDate",t)||c("dc:date",t);return n&&(r.pubDate=new Date(n)),r}))};u(i,"title","title",n),u(i,"link","link",n),u(i,"description","description",n);var a=c("lastBuildDate",n);return a&&(i.updated=new Date(a)),u(i,"author","managingEditor",n,!0),i}(t):null};var i=["url","type","lang"],a=["fileSize","bitrate","framerate","samplingrate","channels","duration","height","width"];function s(e){return(0,o.getElementsByTagName)("media:content",e).map((function(e){for(var t=e.attribs,r={medium:t.medium,isDefault:!!t.isDefault},n=0,o=i;n<o.length;n++)t[c=o[n]]&&(r[c]=t[c]);for(var s=0,l=a;s<l.length;s++){var c;t[c=l[s]]&&(r[c]=parseInt(t[c],10))}return t.expression&&(r.expression=t.expression),r}))}function l(e,t){return(0,o.getElementsByTagName)(e,t,!0,1)[0]}function c(e,t,r){return void 0===r&&(r=!1),(0,n.textContent)((0,o.getElementsByTagName)(e,t,r,1)).trim()}function u(e,t,r,n,o){void 0===o&&(o=!1);var i=c(r,n,o);i&&(e[t]=i)}function p(e){return"rss"===e||"feed"===e||"rdf:RDF"===e}},6367:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uniqueSort=t.compareDocumentPosition=t.DocumentPosition=t.removeSubsets=void 0;var n,o=r(6722);function i(e,t){var r=[],i=[];if(e===t)return 0;for(var a=(0,o.hasChildren)(e)?e:e.parent;a;)r.unshift(a),a=a.parent;for(a=(0,o.hasChildren)(t)?t:t.parent;a;)i.unshift(a),a=a.parent;for(var s=Math.min(r.length,i.length),l=0;l<s&&r[l]===i[l];)l++;if(0===l)return n.DISCONNECTED;var c=r[l-1],u=c.children,p=r[l],d=i[l];return u.indexOf(p)>u.indexOf(d)?c===t?n.FOLLOWING|n.CONTAINED_BY:n.FOLLOWING:c===e?n.PRECEDING|n.CONTAINS:n.PRECEDING}t.removeSubsets=function(e){for(var t=e.length;--t>=0;){var r=e[t];if(t>0&&e.lastIndexOf(r,t-1)>=0)e.splice(t,1);else for(var n=r.parent;n;n=n.parent)if(e.includes(n)){e.splice(t,1);break}}return e},function(e){e[e.DISCONNECTED=1]="DISCONNECTED",e[e.PRECEDING=2]="PRECEDING",e[e.FOLLOWING=4]="FOLLOWING",e[e.CONTAINS=8]="CONTAINS",e[e.CONTAINED_BY=16]="CONTAINED_BY"}(n=t.DocumentPosition||(t.DocumentPosition={})),t.compareDocumentPosition=i,t.uniqueSort=function(e){return(e=e.filter((function(e,t,r){return!r.includes(e,t+1)}))).sort((function(e,t){var r=i(e,t);return r&n.PRECEDING?-1:r&n.FOLLOWING?1:0})),e}},557:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.hasChildren=t.isDocument=t.isComment=t.isText=t.isCDATA=t.isTag=void 0,o(r(1454),t),o(r(3033),t),o(r(8452),t),o(r(6361),t),o(r(5198),t),o(r(6367),t),o(r(7652),t);var i=r(6722);Object.defineProperty(t,"isTag",{enumerable:!0,get:function(){return i.isTag}}),Object.defineProperty(t,"isCDATA",{enumerable:!0,get:function(){return i.isCDATA}}),Object.defineProperty(t,"isText",{enumerable:!0,get:function(){return i.isText}}),Object.defineProperty(t,"isComment",{enumerable:!0,get:function(){return i.isComment}}),Object.defineProperty(t,"isDocument",{enumerable:!0,get:function(){return i.isDocument}}),Object.defineProperty(t,"hasChildren",{enumerable:!0,get:function(){return i.hasChildren}})},5198:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getElementsByTagType=t.getElementsByTagName=t.getElementById=t.getElements=t.testElement=void 0;var n=r(6722),o=r(6361),i={tag_name:function(e){return"function"==typeof e?function(t){return(0,n.isTag)(t)&&e(t.name)}:"*"===e?n.isTag:function(t){return(0,n.isTag)(t)&&t.name===e}},tag_type:function(e){return"function"==typeof e?function(t){return e(t.type)}:function(t){return t.type===e}},tag_contains:function(e){return"function"==typeof e?function(t){return(0,n.isText)(t)&&e(t.data)}:function(t){return(0,n.isText)(t)&&t.data===e}}};function a(e,t){return"function"==typeof t?function(r){return(0,n.isTag)(r)&&t(r.attribs[e])}:function(r){return(0,n.isTag)(r)&&r.attribs[e]===t}}function s(e,t){return function(r){return e(r)||t(r)}}function l(e){var t=Object.keys(e).map((function(t){var r=e[t];return Object.prototype.hasOwnProperty.call(i,t)?i[t](r):a(t,r)}));return 0===t.length?null:t.reduce(s)}t.testElement=function(e,t){var r=l(e);return!r||r(t)},t.getElements=function(e,t,r,n){void 0===n&&(n=1/0);var i=l(e);return i?(0,o.filter)(i,t,r,n):[]},t.getElementById=function(e,t,r){return void 0===r&&(r=!0),Array.isArray(t)||(t=[t]),(0,o.findOne)(a("id",e),t,r)},t.getElementsByTagName=function(e,t,r,n){return void 0===r&&(r=!0),void 0===n&&(n=1/0),(0,o.filter)(i.tag_name(e),t,r,n)},t.getElementsByTagType=function(e,t,r,n){return void 0===r&&(r=!0),void 0===n&&(n=1/0),(0,o.filter)(i.tag_type(e),t,r,n)}},8452:(e,t)=>{"use strict";function r(e){if(e.prev&&(e.prev.next=e.next),e.next&&(e.next.prev=e.prev),e.parent){var t=e.parent.children,r=t.lastIndexOf(e);r>=0&&t.splice(r,1)}e.next=null,e.prev=null,e.parent=null}Object.defineProperty(t,"__esModule",{value:!0}),t.prepend=t.prependChild=t.append=t.appendChild=t.replaceElement=t.removeElement=void 0,t.removeElement=r,t.replaceElement=function(e,t){var r=t.prev=e.prev;r&&(r.next=t);var n=t.next=e.next;n&&(n.prev=t);var o=t.parent=e.parent;if(o){var i=o.children;i[i.lastIndexOf(e)]=t,e.parent=null}},t.appendChild=function(e,t){if(r(t),t.next=null,t.parent=e,e.children.push(t)>1){var n=e.children[e.children.length-2];n.next=t,t.prev=n}else t.prev=null},t.append=function(e,t){r(t);var n=e.parent,o=e.next;if(t.next=o,t.prev=e,e.next=t,t.parent=n,o){if(o.prev=t,n){var i=n.children;i.splice(i.lastIndexOf(o),0,t)}}else n&&n.children.push(t)},t.prependChild=function(e,t){if(r(t),t.parent=e,t.prev=null,1!==e.children.unshift(t)){var n=e.children[1];n.prev=t,t.next=n}else t.next=null},t.prepend=function(e,t){r(t);var n=e.parent;if(n){var o=n.children;o.splice(o.indexOf(e),0,t)}e.prev&&(e.prev.next=t),t.parent=n,t.prev=e.prev,t.next=e,e.prev=t}},6361:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.findAll=t.existsOne=t.findOne=t.findOneChild=t.find=t.filter=void 0;var n=r(6722);function o(e,t,r,o){for(var i=[],a=[t],s=[0];;)if(s[0]>=a[0].length){if(1===s.length)return i;a.shift(),s.shift()}else{var l=a[0][s[0]++];if(e(l)&&(i.push(l),--o<=0))return i;r&&(0,n.hasChildren)(l)&&l.children.length>0&&(s.unshift(0),a.unshift(l.children))}}t.filter=function(e,t,r,n){return void 0===r&&(r=!0),void 0===n&&(n=1/0),o(e,Array.isArray(t)?t:[t],r,n)},t.find=o,t.findOneChild=function(e,t){return t.find(e)},t.findOne=function e(t,r,o){void 0===o&&(o=!0);for(var i=null,a=0;a<r.length&&!i;a++){var s=r[a];(0,n.isTag)(s)&&(t(s)?i=s:o&&s.children.length>0&&(i=e(t,s.children,!0)))}return i},t.existsOne=function e(t,r){return r.some((function(r){return(0,n.isTag)(r)&&(t(r)||e(t,r.children))}))},t.findAll=function(e,t){for(var r=[],o=[t],i=[0];;)if(i[0]>=o[0].length){if(1===o.length)return r;o.shift(),i.shift()}else{var a=o[0][i[0]++];(0,n.isTag)(a)&&(e(a)&&r.push(a),a.children.length>0&&(i.unshift(0),o.unshift(a.children)))}}},1454:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.innerText=t.textContent=t.getText=t.getInnerHTML=t.getOuterHTML=void 0;var o=r(6722),i=n(r(6398)),a=r(289);function s(e,t){return(0,i.default)(e,t)}t.getOuterHTML=s,t.getInnerHTML=function(e,t){return(0,o.hasChildren)(e)?e.children.map((function(e){return s(e,t)})).join(""):""},t.getText=function e(t){return Array.isArray(t)?t.map(e).join(""):(0,o.isTag)(t)?"br"===t.name?"\n":e(t.children):(0,o.isCDATA)(t)?e(t.children):(0,o.isText)(t)?t.data:""},t.textContent=function e(t){return Array.isArray(t)?t.map(e).join(""):(0,o.hasChildren)(t)&&!(0,o.isComment)(t)?e(t.children):(0,o.isText)(t)?t.data:""},t.innerText=function e(t){return Array.isArray(t)?t.map(e).join(""):(0,o.hasChildren)(t)&&(t.type===a.ElementType.Tag||(0,o.isCDATA)(t))?e(t.children):(0,o.isText)(t)?t.data:""}},3033:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.prevElementSibling=t.nextElementSibling=t.getName=t.hasAttrib=t.getAttributeValue=t.getSiblings=t.getParent=t.getChildren=void 0;var n=r(6722);function o(e){return(0,n.hasChildren)(e)?e.children:[]}function i(e){return e.parent||null}t.getChildren=o,t.getParent=i,t.getSiblings=function(e){var t=i(e);if(null!=t)return o(t);for(var r=[e],n=e.prev,a=e.next;null!=n;)r.unshift(n),n=n.prev;for(;null!=a;)r.push(a),a=a.next;return r},t.getAttributeValue=function(e,t){var r;return null===(r=e.attribs)||void 0===r?void 0:r[t]},t.hasAttrib=function(e,t){return null!=e.attribs&&Object.prototype.hasOwnProperty.call(e.attribs,t)&&null!=e.attribs[t]},t.getName=function(e){return e.name},t.nextElementSibling=function(e){for(var t=e.next;null!==t&&!(0,n.isTag)(t);)t=t.next;return t},t.prevElementSibling=function(e){for(var t=e.prev;null!==t&&!(0,n.isTag)(t);)t=t.prev;return t}},9529:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.decodeXML=t.decodeHTMLStrict=t.decodeHTMLAttribute=t.decodeHTML=t.determineBranch=t.EntityDecoder=t.DecodingMode=t.BinTrieFlags=t.fromCodePoint=t.replaceCodePoint=t.decodeCodePoint=t.xmlDecodeTree=t.htmlDecodeTree=void 0;var s=a(r(6416));t.htmlDecodeTree=s.default;var l=a(r(9318));t.xmlDecodeTree=l.default;var c=i(r(8787));t.decodeCodePoint=c.default;var u,p,d,h,f=r(8787);function g(e){return e>=u.ZERO&&e<=u.NINE}Object.defineProperty(t,"replaceCodePoint",{enumerable:!0,get:function(){return f.replaceCodePoint}}),Object.defineProperty(t,"fromCodePoint",{enumerable:!0,get:function(){return f.fromCodePoint}}),function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"}(u||(u={})),function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"}(p=t.BinTrieFlags||(t.BinTrieFlags={})),function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"}(d||(d={})),function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"}(h=t.DecodingMode||(t.DecodingMode={}));var _=function(){function e(e,t,r){this.decodeTree=e,this.emitCodePoint=t,this.errors=r,this.state=d.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=h.Strict}return e.prototype.startEntity=function(e){this.decodeMode=e,this.state=d.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1},e.prototype.write=function(e,t){switch(this.state){case d.EntityStart:return e.charCodeAt(t)===u.NUM?(this.state=d.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=d.NamedEntity,this.stateNamedEntity(e,t));case d.NumericStart:return this.stateNumericStart(e,t);case d.NumericDecimal:return this.stateNumericDecimal(e,t);case d.NumericHex:return this.stateNumericHex(e,t);case d.NamedEntity:return this.stateNamedEntity(e,t)}},e.prototype.stateNumericStart=function(e,t){return t>=e.length?-1:(32|e.charCodeAt(t))===u.LOWER_X?(this.state=d.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=d.NumericDecimal,this.stateNumericDecimal(e,t))},e.prototype.addToNumericResult=function(e,t,r,n){if(t!==r){var o=r-t;this.result=this.result*Math.pow(n,o)+parseInt(e.substr(t,o),n),this.consumed+=o}},e.prototype.stateNumericHex=function(e,t){for(var r,n=t;t<e.length;){var o=e.charCodeAt(t);if(!(g(o)||(r=o,r>=u.UPPER_A&&r<=u.UPPER_F||r>=u.LOWER_A&&r<=u.LOWER_F)))return this.addToNumericResult(e,n,t,16),this.emitNumericEntity(o,3);t+=1}return this.addToNumericResult(e,n,t,16),-1},e.prototype.stateNumericDecimal=function(e,t){for(var r=t;t<e.length;){var n=e.charCodeAt(t);if(!g(n))return this.addToNumericResult(e,r,t,10),this.emitNumericEntity(n,2);t+=1}return this.addToNumericResult(e,r,t,10),-1},e.prototype.emitNumericEntity=function(e,t){var r;if(this.consumed<=t)return null===(r=this.errors)||void 0===r||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(e===u.SEMI)this.consumed+=1;else if(this.decodeMode===h.Strict)return 0;return this.emitCodePoint((0,c.replaceCodePoint)(this.result),this.consumed),this.errors&&(e!==u.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed},e.prototype.stateNamedEntity=function(e,t){for(var r=this.decodeTree,n=r[this.treeIndex],o=(n&p.VALUE_LENGTH)>>14;t<e.length;t++,this.excess++){var i=e.charCodeAt(t);if(this.treeIndex=v(r,n,this.treeIndex+Math.max(1,o),i),this.treeIndex<0)return 0===this.result||this.decodeMode===h.Attribute&&(0===o||((a=i)===u.EQUALS||function(e){return e>=u.UPPER_A&&e<=u.UPPER_Z||e>=u.LOWER_A&&e<=u.LOWER_Z||g(e)}(a)))?0:this.emitNotTerminatedNamedEntity();if(0!=(o=((n=r[this.treeIndex])&p.VALUE_LENGTH)>>14)){if(i===u.SEMI)return this.emitNamedEntityData(this.treeIndex,o,this.consumed+this.excess);this.decodeMode!==h.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}var a;return-1},e.prototype.emitNotTerminatedNamedEntity=function(){var e,t=this.result,r=(this.decodeTree[t]&p.VALUE_LENGTH)>>14;return this.emitNamedEntityData(t,r,this.consumed),null===(e=this.errors)||void 0===e||e.missingSemicolonAfterCharacterReference(),this.consumed},e.prototype.emitNamedEntityData=function(e,t,r){var n=this.decodeTree;return this.emitCodePoint(1===t?n[e]&~p.VALUE_LENGTH:n[e+1],r),3===t&&this.emitCodePoint(n[e+2],r),r},e.prototype.end=function(){var e;switch(this.state){case d.NamedEntity:return 0===this.result||this.decodeMode===h.Attribute&&this.result!==this.treeIndex?0:this.emitNotTerminatedNamedEntity();case d.NumericDecimal:return this.emitNumericEntity(0,2);case d.NumericHex:return this.emitNumericEntity(0,3);case d.NumericStart:return null===(e=this.errors)||void 0===e||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case d.EntityStart:return 0}},e}();function m(e){var t="",r=new _(e,(function(e){return t+=(0,c.fromCodePoint)(e)}));return function(e,n){for(var o=0,i=0;(i=e.indexOf("&",i))>=0;){t+=e.slice(o,i),r.startEntity(n);var a=r.write(e,i+1);if(a<0){o=i+r.end();break}o=i+a,i=0===a?o+1:o}var s=t+e.slice(o);return t="",s}}function v(e,t,r,n){var o=(t&p.BRANCH_LENGTH)>>7,i=t&p.JUMP_TABLE;if(0===o)return 0!==i&&n===i?r:-1;if(i){var a=n-i;return a<0||a>=o?-1:e[r+a]-1}for(var s=r,l=s+o-1;s<=l;){var c=s+l>>>1,u=e[c];if(u<n)s=c+1;else{if(!(u>n))return e[c+o];l=c-1}}return-1}t.EntityDecoder=_,t.determineBranch=v;var A=m(s.default),y=m(l.default);t.decodeHTML=function(e,t){return void 0===t&&(t=h.Legacy),A(e,t)},t.decodeHTMLAttribute=function(e){return A(e,h.Attribute)},t.decodeHTMLStrict=function(e){return A(e,h.Strict)},t.decodeXML=function(e){return y(e,h.Strict)}},8787:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.replaceCodePoint=t.fromCodePoint=void 0;var n=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);function o(e){var t;return e>=55296&&e<=57343||e>1114111?65533:null!==(t=n.get(e))&&void 0!==t?t:e}t.fromCodePoint=null!==(r=String.fromCodePoint)&&void 0!==r?r:function(e){var t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|1023&e),t+String.fromCharCode(e)},t.replaceCodePoint=o,t.default=function(e){return(0,t.fromCodePoint)(o(e))}},6336:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.encodeNonAsciiHTML=t.encodeHTML=void 0;var o=n(r(9491)),i=r(2476),a=/[\t\n!-,./:-@[-`\f{-}$\x80-\uFFFF]/g;function s(e,t){for(var r,n="",a=0;null!==(r=e.exec(t));){var s=r.index;n+=t.substring(a,s);var l=t.charCodeAt(s),c=o.default.get(l);if("object"==typeof c){if(s+1<t.length){var u=t.charCodeAt(s+1),p="number"==typeof c.n?c.n===u?c.o:void 0:c.n.get(u);if(void 0!==p){n+=p,a=e.lastIndex+=1;continue}}c=c.v}if(void 0!==c)n+=c,a=s+1;else{var d=(0,i.getCodePoint)(t,s);n+="&#x".concat(d.toString(16),";"),a=e.lastIndex+=Number(d!==l)}}return n+t.substr(a)}t.encodeHTML=function(e){return s(a,e)},t.encodeNonAsciiHTML=function(e){return s(i.xmlReplacer,e)}},2476:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.escapeText=t.escapeAttribute=t.escapeUTF8=t.escape=t.encodeXML=t.getCodePoint=t.xmlReplacer=void 0,t.xmlReplacer=/["&'<>$\x80-\uFFFF]/g;var r=new Map([[34,"&quot;"],[38,"&amp;"],[39,"&apos;"],[60,"&lt;"],[62,"&gt;"]]);function n(e){for(var n,o="",i=0;null!==(n=t.xmlReplacer.exec(e));){var a=n.index,s=e.charCodeAt(a),l=r.get(s);void 0!==l?(o+=e.substring(i,a)+l,i=a+1):(o+="".concat(e.substring(i,a),"&#x").concat((0,t.getCodePoint)(e,a).toString(16),";"),i=t.xmlReplacer.lastIndex+=Number(55296==(64512&s)))}return o+e.substr(i)}function o(e,t){return function(r){for(var n,o=0,i="";n=e.exec(r);)o!==n.index&&(i+=r.substring(o,n.index)),i+=t.get(n[0].charCodeAt(0)),o=n.index+1;return i+r.substring(o)}}t.getCodePoint=null!=String.prototype.codePointAt?function(e,t){return e.codePointAt(t)}:function(e,t){return 55296==(64512&e.charCodeAt(t))?1024*(e.charCodeAt(t)-55296)+e.charCodeAt(t+1)-56320+65536:e.charCodeAt(t)},t.encodeXML=n,t.escape=n,t.escapeUTF8=o(/[&<>'"]/g,r),t.escapeAttribute=o(/["&\u00A0]/g,new Map([[34,"&quot;"],[38,"&amp;"],[160,"&nbsp;"]])),t.escapeText=o(/[&<>\u00A0]/g,new Map([[38,"&amp;"],[60,"&lt;"],[62,"&gt;"],[160,"&nbsp;"]]))},6416:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTǇǋǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉ǲኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻ǲᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤĳạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ﬃɩᾹ\0\0᾽g;耀ﬀig;耀ﬄ;쀀𝔣lig;耀ﬁlig;쀀fjƀaltῙ῜ῡt;晭ig;耀ﬂns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒α‚‰‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସǳ⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗǈⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼ǲ㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map((function(e){return e.charCodeAt(0)})))},9318:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=new Uint16Array("Ȁaglq\tɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map((function(e){return e.charCodeAt(0)})))},9491:(e,t)=>{"use strict";function r(e){for(var t=1;t<e.length;t++)e[t][0]+=e[t-1][0]+1;return e}Object.defineProperty(t,"__esModule",{value:!0}),t.default=new Map(r([[9,"&Tab;"],[0,"&NewLine;"],[22,"&excl;"],[0,"&quot;"],[0,"&num;"],[0,"&dollar;"],[0,"&percnt;"],[0,"&amp;"],[0,"&apos;"],[0,"&lpar;"],[0,"&rpar;"],[0,"&ast;"],[0,"&plus;"],[0,"&comma;"],[1,"&period;"],[0,"&sol;"],[10,"&colon;"],[0,"&semi;"],[0,{v:"&lt;",n:8402,o:"&nvlt;"}],[0,{v:"&equals;",n:8421,o:"&bne;"}],[0,{v:"&gt;",n:8402,o:"&nvgt;"}],[0,"&quest;"],[0,"&commat;"],[26,"&lbrack;"],[0,"&bsol;"],[0,"&rbrack;"],[0,"&Hat;"],[0,"&lowbar;"],[0,"&DiacriticalGrave;"],[5,{n:106,o:"&fjlig;"}],[20,"&lbrace;"],[0,"&verbar;"],[0,"&rbrace;"],[34,"&nbsp;"],[0,"&iexcl;"],[0,"&cent;"],[0,"&pound;"],[0,"&curren;"],[0,"&yen;"],[0,"&brvbar;"],[0,"&sect;"],[0,"&die;"],[0,"&copy;"],[0,"&ordf;"],[0,"&laquo;"],[0,"&not;"],[0,"&shy;"],[0,"&circledR;"],[0,"&macr;"],[0,"&deg;"],[0,"&PlusMinus;"],[0,"&sup2;"],[0,"&sup3;"],[0,"&acute;"],[0,"&micro;"],[0,"&para;"],[0,"&centerdot;"],[0,"&cedil;"],[0,"&sup1;"],[0,"&ordm;"],[0,"&raquo;"],[0,"&frac14;"],[0,"&frac12;"],[0,"&frac34;"],[0,"&iquest;"],[0,"&Agrave;"],[0,"&Aacute;"],[0,"&Acirc;"],[0,"&Atilde;"],[0,"&Auml;"],[0,"&angst;"],[0,"&AElig;"],[0,"&Ccedil;"],[0,"&Egrave;"],[0,"&Eacute;"],[0,"&Ecirc;"],[0,"&Euml;"],[0,"&Igrave;"],[0,"&Iacute;"],[0,"&Icirc;"],[0,"&Iuml;"],[0,"&ETH;"],[0,"&Ntilde;"],[0,"&Ograve;"],[0,"&Oacute;"],[0,"&Ocirc;"],[0,"&Otilde;"],[0,"&Ouml;"],[0,"&times;"],[0,"&Oslash;"],[0,"&Ugrave;"],[0,"&Uacute;"],[0,"&Ucirc;"],[0,"&Uuml;"],[0,"&Yacute;"],[0,"&THORN;"],[0,"&szlig;"],[0,"&agrave;"],[0,"&aacute;"],[0,"&acirc;"],[0,"&atilde;"],[0,"&auml;"],[0,"&aring;"],[0,"&aelig;"],[0,"&ccedil;"],[0,"&egrave;"],[0,"&eacute;"],[0,"&ecirc;"],[0,"&euml;"],[0,"&igrave;"],[0,"&iacute;"],[0,"&icirc;"],[0,"&iuml;"],[0,"&eth;"],[0,"&ntilde;"],[0,"&ograve;"],[0,"&oacute;"],[0,"&ocirc;"],[0,"&otilde;"],[0,"&ouml;"],[0,"&div;"],[0,"&oslash;"],[0,"&ugrave;"],[0,"&uacute;"],[0,"&ucirc;"],[0,"&uuml;"],[0,"&yacute;"],[0,"&thorn;"],[0,"&yuml;"],[0,"&Amacr;"],[0,"&amacr;"],[0,"&Abreve;"],[0,"&abreve;"],[0,"&Aogon;"],[0,"&aogon;"],[0,"&Cacute;"],[0,"&cacute;"],[0,"&Ccirc;"],[0,"&ccirc;"],[0,"&Cdot;"],[0,"&cdot;"],[0,"&Ccaron;"],[0,"&ccaron;"],[0,"&Dcaron;"],[0,"&dcaron;"],[0,"&Dstrok;"],[0,"&dstrok;"],[0,"&Emacr;"],[0,"&emacr;"],[2,"&Edot;"],[0,"&edot;"],[0,"&Eogon;"],[0,"&eogon;"],[0,"&Ecaron;"],[0,"&ecaron;"],[0,"&Gcirc;"],[0,"&gcirc;"],[0,"&Gbreve;"],[0,"&gbreve;"],[0,"&Gdot;"],[0,"&gdot;"],[0,"&Gcedil;"],[1,"&Hcirc;"],[0,"&hcirc;"],[0,"&Hstrok;"],[0,"&hstrok;"],[0,"&Itilde;"],[0,"&itilde;"],[0,"&Imacr;"],[0,"&imacr;"],[2,"&Iogon;"],[0,"&iogon;"],[0,"&Idot;"],[0,"&imath;"],[0,"&IJlig;"],[0,"&ijlig;"],[0,"&Jcirc;"],[0,"&jcirc;"],[0,"&Kcedil;"],[0,"&kcedil;"],[0,"&kgreen;"],[0,"&Lacute;"],[0,"&lacute;"],[0,"&Lcedil;"],[0,"&lcedil;"],[0,"&Lcaron;"],[0,"&lcaron;"],[0,"&Lmidot;"],[0,"&lmidot;"],[0,"&Lstrok;"],[0,"&lstrok;"],[0,"&Nacute;"],[0,"&nacute;"],[0,"&Ncedil;"],[0,"&ncedil;"],[0,"&Ncaron;"],[0,"&ncaron;"],[0,"&napos;"],[0,"&ENG;"],[0,"&eng;"],[0,"&Omacr;"],[0,"&omacr;"],[2,"&Odblac;"],[0,"&odblac;"],[0,"&OElig;"],[0,"&oelig;"],[0,"&Racute;"],[0,"&racute;"],[0,"&Rcedil;"],[0,"&rcedil;"],[0,"&Rcaron;"],[0,"&rcaron;"],[0,"&Sacute;"],[0,"&sacute;"],[0,"&Scirc;"],[0,"&scirc;"],[0,"&Scedil;"],[0,"&scedil;"],[0,"&Scaron;"],[0,"&scaron;"],[0,"&Tcedil;"],[0,"&tcedil;"],[0,"&Tcaron;"],[0,"&tcaron;"],[0,"&Tstrok;"],[0,"&tstrok;"],[0,"&Utilde;"],[0,"&utilde;"],[0,"&Umacr;"],[0,"&umacr;"],[0,"&Ubreve;"],[0,"&ubreve;"],[0,"&Uring;"],[0,"&uring;"],[0,"&Udblac;"],[0,"&udblac;"],[0,"&Uogon;"],[0,"&uogon;"],[0,"&Wcirc;"],[0,"&wcirc;"],[0,"&Ycirc;"],[0,"&ycirc;"],[0,"&Yuml;"],[0,"&Zacute;"],[0,"&zacute;"],[0,"&Zdot;"],[0,"&zdot;"],[0,"&Zcaron;"],[0,"&zcaron;"],[19,"&fnof;"],[34,"&imped;"],[63,"&gacute;"],[65,"&jmath;"],[142,"&circ;"],[0,"&caron;"],[16,"&breve;"],[0,"&DiacriticalDot;"],[0,"&ring;"],[0,"&ogon;"],[0,"&DiacriticalTilde;"],[0,"&dblac;"],[51,"&DownBreve;"],[127,"&Alpha;"],[0,"&Beta;"],[0,"&Gamma;"],[0,"&Delta;"],[0,"&Epsilon;"],[0,"&Zeta;"],[0,"&Eta;"],[0,"&Theta;"],[0,"&Iota;"],[0,"&Kappa;"],[0,"&Lambda;"],[0,"&Mu;"],[0,"&Nu;"],[0,"&Xi;"],[0,"&Omicron;"],[0,"&Pi;"],[0,"&Rho;"],[1,"&Sigma;"],[0,"&Tau;"],[0,"&Upsilon;"],[0,"&Phi;"],[0,"&Chi;"],[0,"&Psi;"],[0,"&ohm;"],[7,"&alpha;"],[0,"&beta;"],[0,"&gamma;"],[0,"&delta;"],[0,"&epsi;"],[0,"&zeta;"],[0,"&eta;"],[0,"&theta;"],[0,"&iota;"],[0,"&kappa;"],[0,"&lambda;"],[0,"&mu;"],[0,"&nu;"],[0,"&xi;"],[0,"&omicron;"],[0,"&pi;"],[0,"&rho;"],[0,"&sigmaf;"],[0,"&sigma;"],[0,"&tau;"],[0,"&upsi;"],[0,"&phi;"],[0,"&chi;"],[0,"&psi;"],[0,"&omega;"],[7,"&thetasym;"],[0,"&Upsi;"],[2,"&phiv;"],[0,"&piv;"],[5,"&Gammad;"],[0,"&digamma;"],[18,"&kappav;"],[0,"&rhov;"],[3,"&epsiv;"],[0,"&backepsilon;"],[10,"&IOcy;"],[0,"&DJcy;"],[0,"&GJcy;"],[0,"&Jukcy;"],[0,"&DScy;"],[0,"&Iukcy;"],[0,"&YIcy;"],[0,"&Jsercy;"],[0,"&LJcy;"],[0,"&NJcy;"],[0,"&TSHcy;"],[0,"&KJcy;"],[1,"&Ubrcy;"],[0,"&DZcy;"],[0,"&Acy;"],[0,"&Bcy;"],[0,"&Vcy;"],[0,"&Gcy;"],[0,"&Dcy;"],[0,"&IEcy;"],[0,"&ZHcy;"],[0,"&Zcy;"],[0,"&Icy;"],[0,"&Jcy;"],[0,"&Kcy;"],[0,"&Lcy;"],[0,"&Mcy;"],[0,"&Ncy;"],[0,"&Ocy;"],[0,"&Pcy;"],[0,"&Rcy;"],[0,"&Scy;"],[0,"&Tcy;"],[0,"&Ucy;"],[0,"&Fcy;"],[0,"&KHcy;"],[0,"&TScy;"],[0,"&CHcy;"],[0,"&SHcy;"],[0,"&SHCHcy;"],[0,"&HARDcy;"],[0,"&Ycy;"],[0,"&SOFTcy;"],[0,"&Ecy;"],[0,"&YUcy;"],[0,"&YAcy;"],[0,"&acy;"],[0,"&bcy;"],[0,"&vcy;"],[0,"&gcy;"],[0,"&dcy;"],[0,"&iecy;"],[0,"&zhcy;"],[0,"&zcy;"],[0,"&icy;"],[0,"&jcy;"],[0,"&kcy;"],[0,"&lcy;"],[0,"&mcy;"],[0,"&ncy;"],[0,"&ocy;"],[0,"&pcy;"],[0,"&rcy;"],[0,"&scy;"],[0,"&tcy;"],[0,"&ucy;"],[0,"&fcy;"],[0,"&khcy;"],[0,"&tscy;"],[0,"&chcy;"],[0,"&shcy;"],[0,"&shchcy;"],[0,"&hardcy;"],[0,"&ycy;"],[0,"&softcy;"],[0,"&ecy;"],[0,"&yucy;"],[0,"&yacy;"],[1,"&iocy;"],[0,"&djcy;"],[0,"&gjcy;"],[0,"&jukcy;"],[0,"&dscy;"],[0,"&iukcy;"],[0,"&yicy;"],[0,"&jsercy;"],[0,"&ljcy;"],[0,"&njcy;"],[0,"&tshcy;"],[0,"&kjcy;"],[1,"&ubrcy;"],[0,"&dzcy;"],[7074,"&ensp;"],[0,"&emsp;"],[0,"&emsp13;"],[0,"&emsp14;"],[1,"&numsp;"],[0,"&puncsp;"],[0,"&ThinSpace;"],[0,"&hairsp;"],[0,"&NegativeMediumSpace;"],[0,"&zwnj;"],[0,"&zwj;"],[0,"&lrm;"],[0,"&rlm;"],[0,"&dash;"],[2,"&ndash;"],[0,"&mdash;"],[0,"&horbar;"],[0,"&Verbar;"],[1,"&lsquo;"],[0,"&CloseCurlyQuote;"],[0,"&lsquor;"],[1,"&ldquo;"],[0,"&CloseCurlyDoubleQuote;"],[0,"&bdquo;"],[1,"&dagger;"],[0,"&Dagger;"],[0,"&bull;"],[2,"&nldr;"],[0,"&hellip;"],[9,"&permil;"],[0,"&pertenk;"],[0,"&prime;"],[0,"&Prime;"],[0,"&tprime;"],[0,"&backprime;"],[3,"&lsaquo;"],[0,"&rsaquo;"],[3,"&oline;"],[2,"&caret;"],[1,"&hybull;"],[0,"&frasl;"],[10,"&bsemi;"],[7,"&qprime;"],[7,{v:"&MediumSpace;",n:8202,o:"&ThickSpace;"}],[0,"&NoBreak;"],[0,"&af;"],[0,"&InvisibleTimes;"],[0,"&ic;"],[72,"&euro;"],[46,"&tdot;"],[0,"&DotDot;"],[37,"&complexes;"],[2,"&incare;"],[4,"&gscr;"],[0,"&hamilt;"],[0,"&Hfr;"],[0,"&Hopf;"],[0,"&planckh;"],[0,"&hbar;"],[0,"&imagline;"],[0,"&Ifr;"],[0,"&lagran;"],[0,"&ell;"],[1,"&naturals;"],[0,"&numero;"],[0,"&copysr;"],[0,"&weierp;"],[0,"&Popf;"],[0,"&Qopf;"],[0,"&realine;"],[0,"&real;"],[0,"&reals;"],[0,"&rx;"],[3,"&trade;"],[1,"&integers;"],[2,"&mho;"],[0,"&zeetrf;"],[0,"&iiota;"],[2,"&bernou;"],[0,"&Cayleys;"],[1,"&escr;"],[0,"&Escr;"],[0,"&Fouriertrf;"],[1,"&Mellintrf;"],[0,"&order;"],[0,"&alefsym;"],[0,"&beth;"],[0,"&gimel;"],[0,"&daleth;"],[12,"&CapitalDifferentialD;"],[0,"&dd;"],[0,"&ee;"],[0,"&ii;"],[10,"&frac13;"],[0,"&frac23;"],[0,"&frac15;"],[0,"&frac25;"],[0,"&frac35;"],[0,"&frac45;"],[0,"&frac16;"],[0,"&frac56;"],[0,"&frac18;"],[0,"&frac38;"],[0,"&frac58;"],[0,"&frac78;"],[49,"&larr;"],[0,"&ShortUpArrow;"],[0,"&rarr;"],[0,"&darr;"],[0,"&harr;"],[0,"&updownarrow;"],[0,"&nwarr;"],[0,"&nearr;"],[0,"&LowerRightArrow;"],[0,"&LowerLeftArrow;"],[0,"&nlarr;"],[0,"&nrarr;"],[1,{v:"&rarrw;",n:824,o:"&nrarrw;"}],[0,"&Larr;"],[0,"&Uarr;"],[0,"&Rarr;"],[0,"&Darr;"],[0,"&larrtl;"],[0,"&rarrtl;"],[0,"&LeftTeeArrow;"],[0,"&mapstoup;"],[0,"&map;"],[0,"&DownTeeArrow;"],[1,"&hookleftarrow;"],[0,"&hookrightarrow;"],[0,"&larrlp;"],[0,"&looparrowright;"],[0,"&harrw;"],[0,"&nharr;"],[1,"&lsh;"],[0,"&rsh;"],[0,"&ldsh;"],[0,"&rdsh;"],[1,"&crarr;"],[0,"&cularr;"],[0,"&curarr;"],[2,"&circlearrowleft;"],[0,"&circlearrowright;"],[0,"&leftharpoonup;"],[0,"&DownLeftVector;"],[0,"&RightUpVector;"],[0,"&LeftUpVector;"],[0,"&rharu;"],[0,"&DownRightVector;"],[0,"&dharr;"],[0,"&dharl;"],[0,"&RightArrowLeftArrow;"],[0,"&udarr;"],[0,"&LeftArrowRightArrow;"],[0,"&leftleftarrows;"],[0,"&upuparrows;"],[0,"&rightrightarrows;"],[0,"&ddarr;"],[0,"&leftrightharpoons;"],[0,"&Equilibrium;"],[0,"&nlArr;"],[0,"&nhArr;"],[0,"&nrArr;"],[0,"&DoubleLeftArrow;"],[0,"&DoubleUpArrow;"],[0,"&DoubleRightArrow;"],[0,"&dArr;"],[0,"&DoubleLeftRightArrow;"],[0,"&DoubleUpDownArrow;"],[0,"&nwArr;"],[0,"&neArr;"],[0,"&seArr;"],[0,"&swArr;"],[0,"&lAarr;"],[0,"&rAarr;"],[1,"&zigrarr;"],[6,"&larrb;"],[0,"&rarrb;"],[15,"&DownArrowUpArrow;"],[7,"&loarr;"],[0,"&roarr;"],[0,"&hoarr;"],[0,"&forall;"],[0,"&comp;"],[0,{v:"&part;",n:824,o:"&npart;"}],[0,"&exist;"],[0,"&nexist;"],[0,"&empty;"],[1,"&Del;"],[0,"&Element;"],[0,"&NotElement;"],[1,"&ni;"],[0,"&notni;"],[2,"&prod;"],[0,"&coprod;"],[0,"&sum;"],[0,"&minus;"],[0,"&MinusPlus;"],[0,"&dotplus;"],[1,"&Backslash;"],[0,"&lowast;"],[0,"&compfn;"],[1,"&radic;"],[2,"&prop;"],[0,"&infin;"],[0,"&angrt;"],[0,{v:"&ang;",n:8402,o:"&nang;"}],[0,"&angmsd;"],[0,"&angsph;"],[0,"&mid;"],[0,"&nmid;"],[0,"&DoubleVerticalBar;"],[0,"&NotDoubleVerticalBar;"],[0,"&and;"],[0,"&or;"],[0,{v:"&cap;",n:65024,o:"&caps;"}],[0,{v:"&cup;",n:65024,o:"&cups;"}],[0,"&int;"],[0,"&Int;"],[0,"&iiint;"],[0,"&conint;"],[0,"&Conint;"],[0,"&Cconint;"],[0,"&cwint;"],[0,"&ClockwiseContourIntegral;"],[0,"&awconint;"],[0,"&there4;"],[0,"&becaus;"],[0,"&ratio;"],[0,"&Colon;"],[0,"&dotminus;"],[1,"&mDDot;"],[0,"&homtht;"],[0,{v:"&sim;",n:8402,o:"&nvsim;"}],[0,{v:"&backsim;",n:817,o:"&race;"}],[0,{v:"&ac;",n:819,o:"&acE;"}],[0,"&acd;"],[0,"&VerticalTilde;"],[0,"&NotTilde;"],[0,{v:"&eqsim;",n:824,o:"&nesim;"}],[0,"&sime;"],[0,"&NotTildeEqual;"],[0,"&cong;"],[0,"&simne;"],[0,"&ncong;"],[0,"&ap;"],[0,"&nap;"],[0,"&ape;"],[0,{v:"&apid;",n:824,o:"&napid;"}],[0,"&backcong;"],[0,{v:"&asympeq;",n:8402,o:"&nvap;"}],[0,{v:"&bump;",n:824,o:"&nbump;"}],[0,{v:"&bumpe;",n:824,o:"&nbumpe;"}],[0,{v:"&doteq;",n:824,o:"&nedot;"}],[0,"&doteqdot;"],[0,"&efDot;"],[0,"&erDot;"],[0,"&Assign;"],[0,"&ecolon;"],[0,"&ecir;"],[0,"&circeq;"],[1,"&wedgeq;"],[0,"&veeeq;"],[1,"&triangleq;"],[2,"&equest;"],[0,"&ne;"],[0,{v:"&Congruent;",n:8421,o:"&bnequiv;"}],[0,"&nequiv;"],[1,{v:"&le;",n:8402,o:"&nvle;"}],[0,{v:"&ge;",n:8402,o:"&nvge;"}],[0,{v:"&lE;",n:824,o:"&nlE;"}],[0,{v:"&gE;",n:824,o:"&ngE;"}],[0,{v:"&lnE;",n:65024,o:"&lvertneqq;"}],[0,{v:"&gnE;",n:65024,o:"&gvertneqq;"}],[0,{v:"&ll;",n:new Map(r([[824,"&nLtv;"],[7577,"&nLt;"]]))}],[0,{v:"&gg;",n:new Map(r([[824,"&nGtv;"],[7577,"&nGt;"]]))}],[0,"&between;"],[0,"&NotCupCap;"],[0,"&nless;"],[0,"&ngt;"],[0,"&nle;"],[0,"&nge;"],[0,"&lesssim;"],[0,"&GreaterTilde;"],[0,"&nlsim;"],[0,"&ngsim;"],[0,"&LessGreater;"],[0,"&gl;"],[0,"&NotLessGreater;"],[0,"&NotGreaterLess;"],[0,"&pr;"],[0,"&sc;"],[0,"&prcue;"],[0,"&sccue;"],[0,"&PrecedesTilde;"],[0,{v:"&scsim;",n:824,o:"&NotSucceedsTilde;"}],[0,"&NotPrecedes;"],[0,"&NotSucceeds;"],[0,{v:"&sub;",n:8402,o:"&NotSubset;"}],[0,{v:"&sup;",n:8402,o:"&NotSuperset;"}],[0,"&nsub;"],[0,"&nsup;"],[0,"&sube;"],[0,"&supe;"],[0,"&NotSubsetEqual;"],[0,"&NotSupersetEqual;"],[0,{v:"&subne;",n:65024,o:"&varsubsetneq;"}],[0,{v:"&supne;",n:65024,o:"&varsupsetneq;"}],[1,"&cupdot;"],[0,"&UnionPlus;"],[0,{v:"&sqsub;",n:824,o:"&NotSquareSubset;"}],[0,{v:"&sqsup;",n:824,o:"&NotSquareSuperset;"}],[0,"&sqsube;"],[0,"&sqsupe;"],[0,{v:"&sqcap;",n:65024,o:"&sqcaps;"}],[0,{v:"&sqcup;",n:65024,o:"&sqcups;"}],[0,"&CirclePlus;"],[0,"&CircleMinus;"],[0,"&CircleTimes;"],[0,"&osol;"],[0,"&CircleDot;"],[0,"&circledcirc;"],[0,"&circledast;"],[1,"&circleddash;"],[0,"&boxplus;"],[0,"&boxminus;"],[0,"&boxtimes;"],[0,"&dotsquare;"],[0,"&RightTee;"],[0,"&dashv;"],[0,"&DownTee;"],[0,"&bot;"],[1,"&models;"],[0,"&DoubleRightTee;"],[0,"&Vdash;"],[0,"&Vvdash;"],[0,"&VDash;"],[0,"&nvdash;"],[0,"&nvDash;"],[0,"&nVdash;"],[0,"&nVDash;"],[0,"&prurel;"],[1,"&LeftTriangle;"],[0,"&RightTriangle;"],[0,{v:"&LeftTriangleEqual;",n:8402,o:"&nvltrie;"}],[0,{v:"&RightTriangleEqual;",n:8402,o:"&nvrtrie;"}],[0,"&origof;"],[0,"&imof;"],[0,"&multimap;"],[0,"&hercon;"],[0,"&intcal;"],[0,"&veebar;"],[1,"&barvee;"],[0,"&angrtvb;"],[0,"&lrtri;"],[0,"&bigwedge;"],[0,"&bigvee;"],[0,"&bigcap;"],[0,"&bigcup;"],[0,"&diam;"],[0,"&sdot;"],[0,"&sstarf;"],[0,"&divideontimes;"],[0,"&bowtie;"],[0,"&ltimes;"],[0,"&rtimes;"],[0,"&leftthreetimes;"],[0,"&rightthreetimes;"],[0,"&backsimeq;"],[0,"&curlyvee;"],[0,"&curlywedge;"],[0,"&Sub;"],[0,"&Sup;"],[0,"&Cap;"],[0,"&Cup;"],[0,"&fork;"],[0,"&epar;"],[0,"&lessdot;"],[0,"&gtdot;"],[0,{v:"&Ll;",n:824,o:"&nLl;"}],[0,{v:"&Gg;",n:824,o:"&nGg;"}],[0,{v:"&leg;",n:65024,o:"&lesg;"}],[0,{v:"&gel;",n:65024,o:"&gesl;"}],[2,"&cuepr;"],[0,"&cuesc;"],[0,"&NotPrecedesSlantEqual;"],[0,"&NotSucceedsSlantEqual;"],[0,"&NotSquareSubsetEqual;"],[0,"&NotSquareSupersetEqual;"],[2,"&lnsim;"],[0,"&gnsim;"],[0,"&precnsim;"],[0,"&scnsim;"],[0,"&nltri;"],[0,"&NotRightTriangle;"],[0,"&nltrie;"],[0,"&NotRightTriangleEqual;"],[0,"&vellip;"],[0,"&ctdot;"],[0,"&utdot;"],[0,"&dtdot;"],[0,"&disin;"],[0,"&isinsv;"],[0,"&isins;"],[0,{v:"&isindot;",n:824,o:"&notindot;"}],[0,"&notinvc;"],[0,"&notinvb;"],[1,{v:"&isinE;",n:824,o:"&notinE;"}],[0,"&nisd;"],[0,"&xnis;"],[0,"&nis;"],[0,"&notnivc;"],[0,"&notnivb;"],[6,"&barwed;"],[0,"&Barwed;"],[1,"&lceil;"],[0,"&rceil;"],[0,"&LeftFloor;"],[0,"&rfloor;"],[0,"&drcrop;"],[0,"&dlcrop;"],[0,"&urcrop;"],[0,"&ulcrop;"],[0,"&bnot;"],[1,"&profline;"],[0,"&profsurf;"],[1,"&telrec;"],[0,"&target;"],[5,"&ulcorn;"],[0,"&urcorn;"],[0,"&dlcorn;"],[0,"&drcorn;"],[2,"&frown;"],[0,"&smile;"],[9,"&cylcty;"],[0,"&profalar;"],[7,"&topbot;"],[6,"&ovbar;"],[1,"&solbar;"],[60,"&angzarr;"],[51,"&lmoustache;"],[0,"&rmoustache;"],[2,"&OverBracket;"],[0,"&bbrk;"],[0,"&bbrktbrk;"],[37,"&OverParenthesis;"],[0,"&UnderParenthesis;"],[0,"&OverBrace;"],[0,"&UnderBrace;"],[2,"&trpezium;"],[4,"&elinters;"],[59,"&blank;"],[164,"&circledS;"],[55,"&boxh;"],[1,"&boxv;"],[9,"&boxdr;"],[3,"&boxdl;"],[3,"&boxur;"],[3,"&boxul;"],[3,"&boxvr;"],[7,"&boxvl;"],[7,"&boxhd;"],[7,"&boxhu;"],[7,"&boxvh;"],[19,"&boxH;"],[0,"&boxV;"],[0,"&boxdR;"],[0,"&boxDr;"],[0,"&boxDR;"],[0,"&boxdL;"],[0,"&boxDl;"],[0,"&boxDL;"],[0,"&boxuR;"],[0,"&boxUr;"],[0,"&boxUR;"],[0,"&boxuL;"],[0,"&boxUl;"],[0,"&boxUL;"],[0,"&boxvR;"],[0,"&boxVr;"],[0,"&boxVR;"],[0,"&boxvL;"],[0,"&boxVl;"],[0,"&boxVL;"],[0,"&boxHd;"],[0,"&boxhD;"],[0,"&boxHD;"],[0,"&boxHu;"],[0,"&boxhU;"],[0,"&boxHU;"],[0,"&boxvH;"],[0,"&boxVh;"],[0,"&boxVH;"],[19,"&uhblk;"],[3,"&lhblk;"],[3,"&block;"],[8,"&blk14;"],[0,"&blk12;"],[0,"&blk34;"],[13,"&square;"],[8,"&blacksquare;"],[0,"&EmptyVerySmallSquare;"],[1,"&rect;"],[0,"&marker;"],[2,"&fltns;"],[1,"&bigtriangleup;"],[0,"&blacktriangle;"],[0,"&triangle;"],[2,"&blacktriangleright;"],[0,"&rtri;"],[3,"&bigtriangledown;"],[0,"&blacktriangledown;"],[0,"&dtri;"],[2,"&blacktriangleleft;"],[0,"&ltri;"],[6,"&loz;"],[0,"&cir;"],[32,"&tridot;"],[2,"&bigcirc;"],[8,"&ultri;"],[0,"&urtri;"],[0,"&lltri;"],[0,"&EmptySmallSquare;"],[0,"&FilledSmallSquare;"],[8,"&bigstar;"],[0,"&star;"],[7,"&phone;"],[49,"&female;"],[1,"&male;"],[29,"&spades;"],[2,"&clubs;"],[1,"&hearts;"],[0,"&diamondsuit;"],[3,"&sung;"],[2,"&flat;"],[0,"&natural;"],[0,"&sharp;"],[163,"&check;"],[3,"&cross;"],[8,"&malt;"],[21,"&sext;"],[33,"&VerticalSeparator;"],[25,"&lbbrk;"],[0,"&rbbrk;"],[84,"&bsolhsub;"],[0,"&suphsol;"],[28,"&LeftDoubleBracket;"],[0,"&RightDoubleBracket;"],[0,"&lang;"],[0,"&rang;"],[0,"&Lang;"],[0,"&Rang;"],[0,"&loang;"],[0,"&roang;"],[7,"&longleftarrow;"],[0,"&longrightarrow;"],[0,"&longleftrightarrow;"],[0,"&DoubleLongLeftArrow;"],[0,"&DoubleLongRightArrow;"],[0,"&DoubleLongLeftRightArrow;"],[1,"&longmapsto;"],[2,"&dzigrarr;"],[258,"&nvlArr;"],[0,"&nvrArr;"],[0,"&nvHarr;"],[0,"&Map;"],[6,"&lbarr;"],[0,"&bkarow;"],[0,"&lBarr;"],[0,"&dbkarow;"],[0,"&drbkarow;"],[0,"&DDotrahd;"],[0,"&UpArrowBar;"],[0,"&DownArrowBar;"],[2,"&Rarrtl;"],[2,"&latail;"],[0,"&ratail;"],[0,"&lAtail;"],[0,"&rAtail;"],[0,"&larrfs;"],[0,"&rarrfs;"],[0,"&larrbfs;"],[0,"&rarrbfs;"],[2,"&nwarhk;"],[0,"&nearhk;"],[0,"&hksearow;"],[0,"&hkswarow;"],[0,"&nwnear;"],[0,"&nesear;"],[0,"&seswar;"],[0,"&swnwar;"],[8,{v:"&rarrc;",n:824,o:"&nrarrc;"}],[1,"&cudarrr;"],[0,"&ldca;"],[0,"&rdca;"],[0,"&cudarrl;"],[0,"&larrpl;"],[2,"&curarrm;"],[0,"&cularrp;"],[7,"&rarrpl;"],[2,"&harrcir;"],[0,"&Uarrocir;"],[0,"&lurdshar;"],[0,"&ldrushar;"],[2,"&LeftRightVector;"],[0,"&RightUpDownVector;"],[0,"&DownLeftRightVector;"],[0,"&LeftUpDownVector;"],[0,"&LeftVectorBar;"],[0,"&RightVectorBar;"],[0,"&RightUpVectorBar;"],[0,"&RightDownVectorBar;"],[0,"&DownLeftVectorBar;"],[0,"&DownRightVectorBar;"],[0,"&LeftUpVectorBar;"],[0,"&LeftDownVectorBar;"],[0,"&LeftTeeVector;"],[0,"&RightTeeVector;"],[0,"&RightUpTeeVector;"],[0,"&RightDownTeeVector;"],[0,"&DownLeftTeeVector;"],[0,"&DownRightTeeVector;"],[0,"&LeftUpTeeVector;"],[0,"&LeftDownTeeVector;"],[0,"&lHar;"],[0,"&uHar;"],[0,"&rHar;"],[0,"&dHar;"],[0,"&luruhar;"],[0,"&ldrdhar;"],[0,"&ruluhar;"],[0,"&rdldhar;"],[0,"&lharul;"],[0,"&llhard;"],[0,"&rharul;"],[0,"&lrhard;"],[0,"&udhar;"],[0,"&duhar;"],[0,"&RoundImplies;"],[0,"&erarr;"],[0,"&simrarr;"],[0,"&larrsim;"],[0,"&rarrsim;"],[0,"&rarrap;"],[0,"&ltlarr;"],[1,"&gtrarr;"],[0,"&subrarr;"],[1,"&suplarr;"],[0,"&lfisht;"],[0,"&rfisht;"],[0,"&ufisht;"],[0,"&dfisht;"],[5,"&lopar;"],[0,"&ropar;"],[4,"&lbrke;"],[0,"&rbrke;"],[0,"&lbrkslu;"],[0,"&rbrksld;"],[0,"&lbrksld;"],[0,"&rbrkslu;"],[0,"&langd;"],[0,"&rangd;"],[0,"&lparlt;"],[0,"&rpargt;"],[0,"&gtlPar;"],[0,"&ltrPar;"],[3,"&vzigzag;"],[1,"&vangrt;"],[0,"&angrtvbd;"],[6,"&ange;"],[0,"&range;"],[0,"&dwangle;"],[0,"&uwangle;"],[0,"&angmsdaa;"],[0,"&angmsdab;"],[0,"&angmsdac;"],[0,"&angmsdad;"],[0,"&angmsdae;"],[0,"&angmsdaf;"],[0,"&angmsdag;"],[0,"&angmsdah;"],[0,"&bemptyv;"],[0,"&demptyv;"],[0,"&cemptyv;"],[0,"&raemptyv;"],[0,"&laemptyv;"],[0,"&ohbar;"],[0,"&omid;"],[0,"&opar;"],[1,"&operp;"],[1,"&olcross;"],[0,"&odsold;"],[1,"&olcir;"],[0,"&ofcir;"],[0,"&olt;"],[0,"&ogt;"],[0,"&cirscir;"],[0,"&cirE;"],[0,"&solb;"],[0,"&bsolb;"],[3,"&boxbox;"],[3,"&trisb;"],[0,"&rtriltri;"],[0,{v:"&LeftTriangleBar;",n:824,o:"&NotLeftTriangleBar;"}],[0,{v:"&RightTriangleBar;",n:824,o:"&NotRightTriangleBar;"}],[11,"&iinfin;"],[0,"&infintie;"],[0,"&nvinfin;"],[4,"&eparsl;"],[0,"&smeparsl;"],[0,"&eqvparsl;"],[5,"&blacklozenge;"],[8,"&RuleDelayed;"],[1,"&dsol;"],[9,"&bigodot;"],[0,"&bigoplus;"],[0,"&bigotimes;"],[1,"&biguplus;"],[1,"&bigsqcup;"],[5,"&iiiint;"],[0,"&fpartint;"],[2,"&cirfnint;"],[0,"&awint;"],[0,"&rppolint;"],[0,"&scpolint;"],[0,"&npolint;"],[0,"&pointint;"],[0,"&quatint;"],[0,"&intlarhk;"],[10,"&pluscir;"],[0,"&plusacir;"],[0,"&simplus;"],[0,"&plusdu;"],[0,"&plussim;"],[0,"&plustwo;"],[1,"&mcomma;"],[0,"&minusdu;"],[2,"&loplus;"],[0,"&roplus;"],[0,"&Cross;"],[0,"&timesd;"],[0,"&timesbar;"],[1,"&smashp;"],[0,"&lotimes;"],[0,"&rotimes;"],[0,"&otimesas;"],[0,"&Otimes;"],[0,"&odiv;"],[0,"&triplus;"],[0,"&triminus;"],[0,"&tritime;"],[0,"&intprod;"],[2,"&amalg;"],[0,"&capdot;"],[1,"&ncup;"],[0,"&ncap;"],[0,"&capand;"],[0,"&cupor;"],[0,"&cupcap;"],[0,"&capcup;"],[0,"&cupbrcap;"],[0,"&capbrcup;"],[0,"&cupcup;"],[0,"&capcap;"],[0,"&ccups;"],[0,"&ccaps;"],[2,"&ccupssm;"],[2,"&And;"],[0,"&Or;"],[0,"&andand;"],[0,"&oror;"],[0,"&orslope;"],[0,"&andslope;"],[1,"&andv;"],[0,"&orv;"],[0,"&andd;"],[0,"&ord;"],[1,"&wedbar;"],[6,"&sdote;"],[3,"&simdot;"],[2,{v:"&congdot;",n:824,o:"&ncongdot;"}],[0,"&easter;"],[0,"&apacir;"],[0,{v:"&apE;",n:824,o:"&napE;"}],[0,"&eplus;"],[0,"&pluse;"],[0,"&Esim;"],[0,"&Colone;"],[0,"&Equal;"],[1,"&ddotseq;"],[0,"&equivDD;"],[0,"&ltcir;"],[0,"&gtcir;"],[0,"&ltquest;"],[0,"&gtquest;"],[0,{v:"&leqslant;",n:824,o:"&nleqslant;"}],[0,{v:"&geqslant;",n:824,o:"&ngeqslant;"}],[0,"&lesdot;"],[0,"&gesdot;"],[0,"&lesdoto;"],[0,"&gesdoto;"],[0,"&lesdotor;"],[0,"&gesdotol;"],[0,"&lap;"],[0,"&gap;"],[0,"&lne;"],[0,"&gne;"],[0,"&lnap;"],[0,"&gnap;"],[0,"&lEg;"],[0,"&gEl;"],[0,"&lsime;"],[0,"&gsime;"],[0,"&lsimg;"],[0,"&gsiml;"],[0,"&lgE;"],[0,"&glE;"],[0,"&lesges;"],[0,"&gesles;"],[0,"&els;"],[0,"&egs;"],[0,"&elsdot;"],[0,"&egsdot;"],[0,"&el;"],[0,"&eg;"],[2,"&siml;"],[0,"&simg;"],[0,"&simlE;"],[0,"&simgE;"],[0,{v:"&LessLess;",n:824,o:"&NotNestedLessLess;"}],[0,{v:"&GreaterGreater;",n:824,o:"&NotNestedGreaterGreater;"}],[1,"&glj;"],[0,"&gla;"],[0,"&ltcc;"],[0,"&gtcc;"],[0,"&lescc;"],[0,"&gescc;"],[0,"&smt;"],[0,"&lat;"],[0,{v:"&smte;",n:65024,o:"&smtes;"}],[0,{v:"&late;",n:65024,o:"&lates;"}],[0,"&bumpE;"],[0,{v:"&PrecedesEqual;",n:824,o:"&NotPrecedesEqual;"}],[0,{v:"&sce;",n:824,o:"&NotSucceedsEqual;"}],[2,"&prE;"],[0,"&scE;"],[0,"&precneqq;"],[0,"&scnE;"],[0,"&prap;"],[0,"&scap;"],[0,"&precnapprox;"],[0,"&scnap;"],[0,"&Pr;"],[0,"&Sc;"],[0,"&subdot;"],[0,"&supdot;"],[0,"&subplus;"],[0,"&supplus;"],[0,"&submult;"],[0,"&supmult;"],[0,"&subedot;"],[0,"&supedot;"],[0,{v:"&subE;",n:824,o:"&nsubE;"}],[0,{v:"&supE;",n:824,o:"&nsupE;"}],[0,"&subsim;"],[0,"&supsim;"],[2,{v:"&subnE;",n:65024,o:"&varsubsetneqq;"}],[0,{v:"&supnE;",n:65024,o:"&varsupsetneqq;"}],[2,"&csub;"],[0,"&csup;"],[0,"&csube;"],[0,"&csupe;"],[0,"&subsup;"],[0,"&supsub;"],[0,"&subsub;"],[0,"&supsup;"],[0,"&suphsub;"],[0,"&supdsub;"],[0,"&forkv;"],[0,"&topfork;"],[0,"&mlcp;"],[8,"&Dashv;"],[1,"&Vdashl;"],[0,"&Barv;"],[0,"&vBar;"],[0,"&vBarv;"],[1,"&Vbar;"],[0,"&Not;"],[0,"&bNot;"],[0,"&rnmid;"],[0,"&cirmid;"],[0,"&midcir;"],[0,"&topcir;"],[0,"&nhpar;"],[0,"&parsim;"],[9,{v:"&parsl;",n:8421,o:"&nparsl;"}],[44343,{n:new Map(r([[56476,"&Ascr;"],[1,"&Cscr;"],[0,"&Dscr;"],[2,"&Gscr;"],[2,"&Jscr;"],[0,"&Kscr;"],[2,"&Nscr;"],[0,"&Oscr;"],[0,"&Pscr;"],[0,"&Qscr;"],[1,"&Sscr;"],[0,"&Tscr;"],[0,"&Uscr;"],[0,"&Vscr;"],[0,"&Wscr;"],[0,"&Xscr;"],[0,"&Yscr;"],[0,"&Zscr;"],[0,"&ascr;"],[0,"&bscr;"],[0,"&cscr;"],[0,"&dscr;"],[1,"&fscr;"],[1,"&hscr;"],[0,"&iscr;"],[0,"&jscr;"],[0,"&kscr;"],[0,"&lscr;"],[0,"&mscr;"],[0,"&nscr;"],[1,"&pscr;"],[0,"&qscr;"],[0,"&rscr;"],[0,"&sscr;"],[0,"&tscr;"],[0,"&uscr;"],[0,"&vscr;"],[0,"&wscr;"],[0,"&xscr;"],[0,"&yscr;"],[0,"&zscr;"],[52,"&Afr;"],[0,"&Bfr;"],[1,"&Dfr;"],[0,"&Efr;"],[0,"&Ffr;"],[0,"&Gfr;"],[2,"&Jfr;"],[0,"&Kfr;"],[0,"&Lfr;"],[0,"&Mfr;"],[0,"&Nfr;"],[0,"&Ofr;"],[0,"&Pfr;"],[0,"&Qfr;"],[1,"&Sfr;"],[0,"&Tfr;"],[0,"&Ufr;"],[0,"&Vfr;"],[0,"&Wfr;"],[0,"&Xfr;"],[0,"&Yfr;"],[1,"&afr;"],[0,"&bfr;"],[0,"&cfr;"],[0,"&dfr;"],[0,"&efr;"],[0,"&ffr;"],[0,"&gfr;"],[0,"&hfr;"],[0,"&ifr;"],[0,"&jfr;"],[0,"&kfr;"],[0,"&lfr;"],[0,"&mfr;"],[0,"&nfr;"],[0,"&ofr;"],[0,"&pfr;"],[0,"&qfr;"],[0,"&rfr;"],[0,"&sfr;"],[0,"&tfr;"],[0,"&ufr;"],[0,"&vfr;"],[0,"&wfr;"],[0,"&xfr;"],[0,"&yfr;"],[0,"&zfr;"],[0,"&Aopf;"],[0,"&Bopf;"],[1,"&Dopf;"],[0,"&Eopf;"],[0,"&Fopf;"],[0,"&Gopf;"],[1,"&Iopf;"],[0,"&Jopf;"],[0,"&Kopf;"],[0,"&Lopf;"],[0,"&Mopf;"],[1,"&Oopf;"],[3,"&Sopf;"],[0,"&Topf;"],[0,"&Uopf;"],[0,"&Vopf;"],[0,"&Wopf;"],[0,"&Xopf;"],[0,"&Yopf;"],[1,"&aopf;"],[0,"&bopf;"],[0,"&copf;"],[0,"&dopf;"],[0,"&eopf;"],[0,"&fopf;"],[0,"&gopf;"],[0,"&hopf;"],[0,"&iopf;"],[0,"&jopf;"],[0,"&kopf;"],[0,"&lopf;"],[0,"&mopf;"],[0,"&nopf;"],[0,"&oopf;"],[0,"&popf;"],[0,"&qopf;"],[0,"&ropf;"],[0,"&sopf;"],[0,"&topf;"],[0,"&uopf;"],[0,"&vopf;"],[0,"&wopf;"],[0,"&xopf;"],[0,"&yopf;"],[0,"&zopf;"]]))}],[8906,"&fflig;"],[0,"&filig;"],[0,"&fllig;"],[0,"&ffilig;"],[0,"&ffllig;"]]))},9625:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeXMLStrict=t.decodeHTML5Strict=t.decodeHTML4Strict=t.decodeHTML5=t.decodeHTML4=t.decodeHTMLAttribute=t.decodeHTMLStrict=t.decodeHTML=t.decodeXML=t.DecodingMode=t.EntityDecoder=t.encodeHTML5=t.encodeHTML4=t.encodeNonAsciiHTML=t.encodeHTML=t.escapeText=t.escapeAttribute=t.escapeUTF8=t.escape=t.encodeXML=t.encode=t.decodeStrict=t.decode=t.EncodingMode=t.EntityLevel=void 0;var n,o,i=r(9529),a=r(6336),s=r(2476);function l(e,t){if(void 0===t&&(t=n.XML),("number"==typeof t?t:t.level)===n.HTML){var r="object"==typeof t?t.mode:void 0;return(0,i.decodeHTML)(e,r)}return(0,i.decodeXML)(e)}!function(e){e[e.XML=0]="XML",e[e.HTML=1]="HTML"}(n=t.EntityLevel||(t.EntityLevel={})),function(e){e[e.UTF8=0]="UTF8",e[e.ASCII=1]="ASCII",e[e.Extensive=2]="Extensive",e[e.Attribute=3]="Attribute",e[e.Text=4]="Text"}(o=t.EncodingMode||(t.EncodingMode={})),t.decode=l,t.decodeStrict=function(e,t){var r;void 0===t&&(t=n.XML);var o="number"==typeof t?{level:t}:t;return null!==(r=o.mode)&&void 0!==r||(o.mode=i.DecodingMode.Strict),l(e,o)},t.encode=function(e,t){void 0===t&&(t=n.XML);var r="number"==typeof t?{level:t}:t;return r.mode===o.UTF8?(0,s.escapeUTF8)(e):r.mode===o.Attribute?(0,s.escapeAttribute)(e):r.mode===o.Text?(0,s.escapeText)(e):r.level===n.HTML?r.mode===o.ASCII?(0,a.encodeNonAsciiHTML)(e):(0,a.encodeHTML)(e):(0,s.encodeXML)(e)};var c=r(2476);Object.defineProperty(t,"encodeXML",{enumerable:!0,get:function(){return c.encodeXML}}),Object.defineProperty(t,"escape",{enumerable:!0,get:function(){return c.escape}}),Object.defineProperty(t,"escapeUTF8",{enumerable:!0,get:function(){return c.escapeUTF8}}),Object.defineProperty(t,"escapeAttribute",{enumerable:!0,get:function(){return c.escapeAttribute}}),Object.defineProperty(t,"escapeText",{enumerable:!0,get:function(){return c.escapeText}});var u=r(6336);Object.defineProperty(t,"encodeHTML",{enumerable:!0,get:function(){return u.encodeHTML}}),Object.defineProperty(t,"encodeNonAsciiHTML",{enumerable:!0,get:function(){return u.encodeNonAsciiHTML}}),Object.defineProperty(t,"encodeHTML4",{enumerable:!0,get:function(){return u.encodeHTML}}),Object.defineProperty(t,"encodeHTML5",{enumerable:!0,get:function(){return u.encodeHTML}});var p=r(9529);Object.defineProperty(t,"EntityDecoder",{enumerable:!0,get:function(){return p.EntityDecoder}}),Object.defineProperty(t,"DecodingMode",{enumerable:!0,get:function(){return p.DecodingMode}}),Object.defineProperty(t,"decodeXML",{enumerable:!0,get:function(){return p.decodeXML}}),Object.defineProperty(t,"decodeHTML",{enumerable:!0,get:function(){return p.decodeHTML}}),Object.defineProperty(t,"decodeHTMLStrict",{enumerable:!0,get:function(){return p.decodeHTMLStrict}}),Object.defineProperty(t,"decodeHTMLAttribute",{enumerable:!0,get:function(){return p.decodeHTMLAttribute}}),Object.defineProperty(t,"decodeHTML4",{enumerable:!0,get:function(){return p.decodeHTML}}),Object.defineProperty(t,"decodeHTML5",{enumerable:!0,get:function(){return p.decodeHTML}}),Object.defineProperty(t,"decodeHTML4Strict",{enumerable:!0,get:function(){return p.decodeHTMLStrict}}),Object.defineProperty(t,"decodeHTML5Strict",{enumerable:!0,get:function(){return p.decodeHTMLStrict}}),Object.defineProperty(t,"decodeXMLStrict",{enumerable:!0,get:function(){return p.decodeXML}})},4418:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Parser=void 0;var a=i(r(4614)),s=r(9529),l=new Set(["input","option","optgroup","select","button","datalist","textarea"]),c=new Set(["p"]),u=new Set(["thead","tbody"]),p=new Set(["dd","dt"]),d=new Set(["rt","rp"]),h=new Map([["tr",new Set(["tr","th","td"])],["th",new Set(["th"])],["td",new Set(["thead","th","td"])],["body",new Set(["head","link","script"])],["li",new Set(["li"])],["p",c],["h1",c],["h2",c],["h3",c],["h4",c],["h5",c],["h6",c],["select",l],["input",l],["output",l],["button",l],["datalist",l],["textarea",l],["option",new Set(["option"])],["optgroup",new Set(["optgroup","option"])],["dd",p],["dt",p],["address",c],["article",c],["aside",c],["blockquote",c],["details",c],["div",c],["dl",c],["fieldset",c],["figcaption",c],["figure",c],["footer",c],["form",c],["header",c],["hr",c],["main",c],["nav",c],["ol",c],["pre",c],["section",c],["table",c],["ul",c],["rt",d],["rp",d],["tbody",u],["tfoot",u]]),f=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]),g=new Set(["math","svg"]),_=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignobject","desc","title"]),m=/\s|\//,v=function(){function e(e,t){var r,n,o,i,s;void 0===t&&(t={}),this.options=t,this.startIndex=0,this.endIndex=0,this.openTagStart=0,this.tagname="",this.attribname="",this.attribvalue="",this.attribs=null,this.stack=[],this.foreignContext=[],this.buffers=[],this.bufferOffset=0,this.writeIndex=0,this.ended=!1,this.cbs=null!=e?e:{},this.lowerCaseTagNames=null!==(r=t.lowerCaseTags)&&void 0!==r?r:!t.xmlMode,this.lowerCaseAttributeNames=null!==(n=t.lowerCaseAttributeNames)&&void 0!==n?n:!t.xmlMode,this.tokenizer=new(null!==(o=t.Tokenizer)&&void 0!==o?o:a.default)(this.options,this),null===(s=(i=this.cbs).onparserinit)||void 0===s||s.call(i,this)}return e.prototype.ontext=function(e,t){var r,n,o=this.getSlice(e,t);this.endIndex=t-1,null===(n=(r=this.cbs).ontext)||void 0===n||n.call(r,o),this.startIndex=t},e.prototype.ontextentity=function(e){var t,r,n=this.tokenizer.getSectionStart();this.endIndex=n-1,null===(r=(t=this.cbs).ontext)||void 0===r||r.call(t,(0,s.fromCodePoint)(e)),this.startIndex=n},e.prototype.isVoidElement=function(e){return!this.options.xmlMode&&f.has(e)},e.prototype.onopentagname=function(e,t){this.endIndex=t;var r=this.getSlice(e,t);this.lowerCaseTagNames&&(r=r.toLowerCase()),this.emitOpenTag(r)},e.prototype.emitOpenTag=function(e){var t,r,n,o;this.openTagStart=this.startIndex,this.tagname=e;var i=!this.options.xmlMode&&h.get(e);if(i)for(;this.stack.length>0&&i.has(this.stack[this.stack.length-1]);){var a=this.stack.pop();null===(r=(t=this.cbs).onclosetag)||void 0===r||r.call(t,a,!0)}this.isVoidElement(e)||(this.stack.push(e),g.has(e)?this.foreignContext.push(!0):_.has(e)&&this.foreignContext.push(!1)),null===(o=(n=this.cbs).onopentagname)||void 0===o||o.call(n,e),this.cbs.onopentag&&(this.attribs={})},e.prototype.endOpenTag=function(e){var t,r;this.startIndex=this.openTagStart,this.attribs&&(null===(r=(t=this.cbs).onopentag)||void 0===r||r.call(t,this.tagname,this.attribs,e),this.attribs=null),this.cbs.onclosetag&&this.isVoidElement(this.tagname)&&this.cbs.onclosetag(this.tagname,!0),this.tagname=""},e.prototype.onopentagend=function(e){this.endIndex=e,this.endOpenTag(!1),this.startIndex=e+1},e.prototype.onclosetag=function(e,t){var r,n,o,i,a,s;this.endIndex=t;var l=this.getSlice(e,t);if(this.lowerCaseTagNames&&(l=l.toLowerCase()),(g.has(l)||_.has(l))&&this.foreignContext.pop(),this.isVoidElement(l))this.options.xmlMode||"br"!==l||(null===(n=(r=this.cbs).onopentagname)||void 0===n||n.call(r,"br"),null===(i=(o=this.cbs).onopentag)||void 0===i||i.call(o,"br",{},!0),null===(s=(a=this.cbs).onclosetag)||void 0===s||s.call(a,"br",!1));else{var c=this.stack.lastIndexOf(l);if(-1!==c)if(this.cbs.onclosetag)for(var u=this.stack.length-c;u--;)this.cbs.onclosetag(this.stack.pop(),0!==u);else this.stack.length=c;else this.options.xmlMode||"p"!==l||(this.emitOpenTag("p"),this.closeCurrentTag(!0))}this.startIndex=t+1},e.prototype.onselfclosingtag=function(e){this.endIndex=e,this.options.xmlMode||this.options.recognizeSelfClosing||this.foreignContext[this.foreignContext.length-1]?(this.closeCurrentTag(!1),this.startIndex=e+1):this.onopentagend(e)},e.prototype.closeCurrentTag=function(e){var t,r,n=this.tagname;this.endOpenTag(e),this.stack[this.stack.length-1]===n&&(null===(r=(t=this.cbs).onclosetag)||void 0===r||r.call(t,n,!e),this.stack.pop())},e.prototype.onattribname=function(e,t){this.startIndex=e;var r=this.getSlice(e,t);this.attribname=this.lowerCaseAttributeNames?r.toLowerCase():r},e.prototype.onattribdata=function(e,t){this.attribvalue+=this.getSlice(e,t)},e.prototype.onattribentity=function(e){this.attribvalue+=(0,s.fromCodePoint)(e)},e.prototype.onattribend=function(e,t){var r,n;this.endIndex=t,null===(n=(r=this.cbs).onattribute)||void 0===n||n.call(r,this.attribname,this.attribvalue,e===a.QuoteType.Double?'"':e===a.QuoteType.Single?"'":e===a.QuoteType.NoValue?void 0:null),this.attribs&&!Object.prototype.hasOwnProperty.call(this.attribs,this.attribname)&&(this.attribs[this.attribname]=this.attribvalue),this.attribvalue=""},e.prototype.getInstructionName=function(e){var t=e.search(m),r=t<0?e:e.substr(0,t);return this.lowerCaseTagNames&&(r=r.toLowerCase()),r},e.prototype.ondeclaration=function(e,t){this.endIndex=t;var r=this.getSlice(e,t);if(this.cbs.onprocessinginstruction){var n=this.getInstructionName(r);this.cbs.onprocessinginstruction("!".concat(n),"!".concat(r))}this.startIndex=t+1},e.prototype.onprocessinginstruction=function(e,t){this.endIndex=t;var r=this.getSlice(e,t);if(this.cbs.onprocessinginstruction){var n=this.getInstructionName(r);this.cbs.onprocessinginstruction("?".concat(n),"?".concat(r))}this.startIndex=t+1},e.prototype.oncomment=function(e,t,r){var n,o,i,a;this.endIndex=t,null===(o=(n=this.cbs).oncomment)||void 0===o||o.call(n,this.getSlice(e,t-r)),null===(a=(i=this.cbs).oncommentend)||void 0===a||a.call(i),this.startIndex=t+1},e.prototype.oncdata=function(e,t,r){var n,o,i,a,s,l,c,u,p,d;this.endIndex=t;var h=this.getSlice(e,t-r);this.options.xmlMode||this.options.recognizeCDATA?(null===(o=(n=this.cbs).oncdatastart)||void 0===o||o.call(n),null===(a=(i=this.cbs).ontext)||void 0===a||a.call(i,h),null===(l=(s=this.cbs).oncdataend)||void 0===l||l.call(s)):(null===(u=(c=this.cbs).oncomment)||void 0===u||u.call(c,"[CDATA[".concat(h,"]]")),null===(d=(p=this.cbs).oncommentend)||void 0===d||d.call(p)),this.startIndex=t+1},e.prototype.onend=function(){var e,t;if(this.cbs.onclosetag){this.endIndex=this.startIndex;for(var r=this.stack.length;r>0;this.cbs.onclosetag(this.stack[--r],!0));}null===(t=(e=this.cbs).onend)||void 0===t||t.call(e)},e.prototype.reset=function(){var e,t,r,n;null===(t=(e=this.cbs).onreset)||void 0===t||t.call(e),this.tokenizer.reset(),this.tagname="",this.attribname="",this.attribs=null,this.stack.length=0,this.startIndex=0,this.endIndex=0,null===(n=(r=this.cbs).onparserinit)||void 0===n||n.call(r,this),this.buffers.length=0,this.bufferOffset=0,this.writeIndex=0,this.ended=!1},e.prototype.parseComplete=function(e){this.reset(),this.end(e)},e.prototype.getSlice=function(e,t){for(;e-this.bufferOffset>=this.buffers[0].length;)this.shiftBuffer();for(var r=this.buffers[0].slice(e-this.bufferOffset,t-this.bufferOffset);t-this.bufferOffset>this.buffers[0].length;)this.shiftBuffer(),r+=this.buffers[0].slice(0,t-this.bufferOffset);return r},e.prototype.shiftBuffer=function(){this.bufferOffset+=this.buffers[0].length,this.writeIndex--,this.buffers.shift()},e.prototype.write=function(e){var t,r;this.ended?null===(r=(t=this.cbs).onerror)||void 0===r||r.call(t,new Error(".write() after done!")):(this.buffers.push(e),this.tokenizer.running&&(this.tokenizer.write(e),this.writeIndex++))},e.prototype.end=function(e){var t,r;this.ended?null===(r=(t=this.cbs).onerror)||void 0===r||r.call(t,new Error(".end() after done!")):(e&&this.write(e),this.ended=!0,this.tokenizer.end())},e.prototype.pause=function(){this.tokenizer.pause()},e.prototype.resume=function(){for(this.tokenizer.resume();this.tokenizer.running&&this.writeIndex<this.buffers.length;)this.tokenizer.write(this.buffers[this.writeIndex++]);this.ended&&this.tokenizer.end()},e.prototype.parseChunk=function(e){this.write(e)},e.prototype.done=function(e){this.end(e)},e}();t.Parser=v},4614:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QuoteType=void 0;var n,o,i,a=r(9529);function s(e){return e===n.Space||e===n.NewLine||e===n.Tab||e===n.FormFeed||e===n.CarriageReturn}function l(e){return e===n.Slash||e===n.Gt||s(e)}function c(e){return e>=n.Zero&&e<=n.Nine}!function(e){e[e.Tab=9]="Tab",e[e.NewLine=10]="NewLine",e[e.FormFeed=12]="FormFeed",e[e.CarriageReturn=13]="CarriageReturn",e[e.Space=32]="Space",e[e.ExclamationMark=33]="ExclamationMark",e[e.Number=35]="Number",e[e.Amp=38]="Amp",e[e.SingleQuote=39]="SingleQuote",e[e.DoubleQuote=34]="DoubleQuote",e[e.Dash=45]="Dash",e[e.Slash=47]="Slash",e[e.Zero=48]="Zero",e[e.Nine=57]="Nine",e[e.Semi=59]="Semi",e[e.Lt=60]="Lt",e[e.Eq=61]="Eq",e[e.Gt=62]="Gt",e[e.Questionmark=63]="Questionmark",e[e.UpperA=65]="UpperA",e[e.LowerA=97]="LowerA",e[e.UpperF=70]="UpperF",e[e.LowerF=102]="LowerF",e[e.UpperZ=90]="UpperZ",e[e.LowerZ=122]="LowerZ",e[e.LowerX=120]="LowerX",e[e.OpeningSquareBracket=91]="OpeningSquareBracket"}(n||(n={})),function(e){e[e.Text=1]="Text",e[e.BeforeTagName=2]="BeforeTagName",e[e.InTagName=3]="InTagName",e[e.InSelfClosingTag=4]="InSelfClosingTag",e[e.BeforeClosingTagName=5]="BeforeClosingTagName",e[e.InClosingTagName=6]="InClosingTagName",e[e.AfterClosingTagName=7]="AfterClosingTagName",e[e.BeforeAttributeName=8]="BeforeAttributeName",e[e.InAttributeName=9]="InAttributeName",e[e.AfterAttributeName=10]="AfterAttributeName",e[e.BeforeAttributeValue=11]="BeforeAttributeValue",e[e.InAttributeValueDq=12]="InAttributeValueDq",e[e.InAttributeValueSq=13]="InAttributeValueSq",e[e.InAttributeValueNq=14]="InAttributeValueNq",e[e.BeforeDeclaration=15]="BeforeDeclaration",e[e.InDeclaration=16]="InDeclaration",e[e.InProcessingInstruction=17]="InProcessingInstruction",e[e.BeforeComment=18]="BeforeComment",e[e.CDATASequence=19]="CDATASequence",e[e.InSpecialComment=20]="InSpecialComment",e[e.InCommentLike=21]="InCommentLike",e[e.BeforeSpecialS=22]="BeforeSpecialS",e[e.SpecialStartSequence=23]="SpecialStartSequence",e[e.InSpecialTag=24]="InSpecialTag",e[e.BeforeEntity=25]="BeforeEntity",e[e.BeforeNumericEntity=26]="BeforeNumericEntity",e[e.InNamedEntity=27]="InNamedEntity",e[e.InNumericEntity=28]="InNumericEntity",e[e.InHexEntity=29]="InHexEntity"}(o||(o={})),function(e){e[e.NoValue=0]="NoValue",e[e.Unquoted=1]="Unquoted",e[e.Single=2]="Single",e[e.Double=3]="Double"}(i=t.QuoteType||(t.QuoteType={}));var u={Cdata:new Uint8Array([67,68,65,84,65,91]),CdataEnd:new Uint8Array([93,93,62]),CommentEnd:new Uint8Array([45,45,62]),ScriptEnd:new Uint8Array([60,47,115,99,114,105,112,116]),StyleEnd:new Uint8Array([60,47,115,116,121,108,101]),TitleEnd:new Uint8Array([60,47,116,105,116,108,101])},p=function(){function e(e,t){var r=e.xmlMode,n=void 0!==r&&r,i=e.decodeEntities,s=void 0===i||i;this.cbs=t,this.state=o.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=o.Text,this.isSpecial=!1,this.running=!0,this.offset=0,this.currentSequence=void 0,this.sequenceIndex=0,this.trieIndex=0,this.trieCurrent=0,this.entityResult=0,this.entityExcess=0,this.xmlMode=n,this.decodeEntities=s,this.entityTrie=n?a.xmlDecodeTree:a.htmlDecodeTree}return e.prototype.reset=function(){this.state=o.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=o.Text,this.currentSequence=void 0,this.running=!0,this.offset=0},e.prototype.write=function(e){this.offset+=this.buffer.length,this.buffer=e,this.parse()},e.prototype.end=function(){this.running&&this.finish()},e.prototype.pause=function(){this.running=!1},e.prototype.resume=function(){this.running=!0,this.index<this.buffer.length+this.offset&&this.parse()},e.prototype.getIndex=function(){return this.index},e.prototype.getSectionStart=function(){return this.sectionStart},e.prototype.stateText=function(e){e===n.Lt||!this.decodeEntities&&this.fastForwardTo(n.Lt)?(this.index>this.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=o.BeforeTagName,this.sectionStart=this.index):this.decodeEntities&&e===n.Amp&&(this.state=o.BeforeEntity)},e.prototype.stateSpecialStartSequence=function(e){var t=this.sequenceIndex===this.currentSequence.length;if(t?l(e):(32|e)===this.currentSequence[this.sequenceIndex]){if(!t)return void this.sequenceIndex++}else this.isSpecial=!1;this.sequenceIndex=0,this.state=o.InTagName,this.stateInTagName(e)},e.prototype.stateInSpecialTag=function(e){if(this.sequenceIndex===this.currentSequence.length){if(e===n.Gt||s(e)){var t=this.index-this.currentSequence.length;if(this.sectionStart<t){var r=this.index;this.index=t,this.cbs.ontext(this.sectionStart,t),this.index=r}return this.isSpecial=!1,this.sectionStart=t+2,void this.stateInClosingTagName(e)}this.sequenceIndex=0}(32|e)===this.currentSequence[this.sequenceIndex]?this.sequenceIndex+=1:0===this.sequenceIndex?this.currentSequence===u.TitleEnd?this.decodeEntities&&e===n.Amp&&(this.state=o.BeforeEntity):this.fastForwardTo(n.Lt)&&(this.sequenceIndex=1):this.sequenceIndex=Number(e===n.Lt)},e.prototype.stateCDATASequence=function(e){e===u.Cdata[this.sequenceIndex]?++this.sequenceIndex===u.Cdata.length&&(this.state=o.InCommentLike,this.currentSequence=u.CdataEnd,this.sequenceIndex=0,this.sectionStart=this.index+1):(this.sequenceIndex=0,this.state=o.InDeclaration,this.stateInDeclaration(e))},e.prototype.fastForwardTo=function(e){for(;++this.index<this.buffer.length+this.offset;)if(this.buffer.charCodeAt(this.index-this.offset)===e)return!0;return this.index=this.buffer.length+this.offset-1,!1},e.prototype.stateInCommentLike=function(e){e===this.currentSequence[this.sequenceIndex]?++this.sequenceIndex===this.currentSequence.length&&(this.currentSequence===u.CdataEnd?this.cbs.oncdata(this.sectionStart,this.index,2):this.cbs.oncomment(this.sectionStart,this.index,2),this.sequenceIndex=0,this.sectionStart=this.index+1,this.state=o.Text):0===this.sequenceIndex?this.fastForwardTo(this.currentSequence[0])&&(this.sequenceIndex=1):e!==this.currentSequence[this.sequenceIndex-1]&&(this.sequenceIndex=0)},e.prototype.isTagStartChar=function(e){return this.xmlMode?!l(e):function(e){return e>=n.LowerA&&e<=n.LowerZ||e>=n.UpperA&&e<=n.UpperZ}(e)},e.prototype.startSpecial=function(e,t){this.isSpecial=!0,this.currentSequence=e,this.sequenceIndex=t,this.state=o.SpecialStartSequence},e.prototype.stateBeforeTagName=function(e){if(e===n.ExclamationMark)this.state=o.BeforeDeclaration,this.sectionStart=this.index+1;else if(e===n.Questionmark)this.state=o.InProcessingInstruction,this.sectionStart=this.index+1;else if(this.isTagStartChar(e)){var t=32|e;this.sectionStart=this.index,this.xmlMode||t!==u.TitleEnd[2]?this.state=this.xmlMode||t!==u.ScriptEnd[2]?o.InTagName:o.BeforeSpecialS:this.startSpecial(u.TitleEnd,3)}else e===n.Slash?this.state=o.BeforeClosingTagName:(this.state=o.Text,this.stateText(e))},e.prototype.stateInTagName=function(e){l(e)&&(this.cbs.onopentagname(this.sectionStart,this.index),this.sectionStart=-1,this.state=o.BeforeAttributeName,this.stateBeforeAttributeName(e))},e.prototype.stateBeforeClosingTagName=function(e){s(e)||(e===n.Gt?this.state=o.Text:(this.state=this.isTagStartChar(e)?o.InClosingTagName:o.InSpecialComment,this.sectionStart=this.index))},e.prototype.stateInClosingTagName=function(e){(e===n.Gt||s(e))&&(this.cbs.onclosetag(this.sectionStart,this.index),this.sectionStart=-1,this.state=o.AfterClosingTagName,this.stateAfterClosingTagName(e))},e.prototype.stateAfterClosingTagName=function(e){(e===n.Gt||this.fastForwardTo(n.Gt))&&(this.state=o.Text,this.baseState=o.Text,this.sectionStart=this.index+1)},e.prototype.stateBeforeAttributeName=function(e){e===n.Gt?(this.cbs.onopentagend(this.index),this.isSpecial?(this.state=o.InSpecialTag,this.sequenceIndex=0):this.state=o.Text,this.baseState=this.state,this.sectionStart=this.index+1):e===n.Slash?this.state=o.InSelfClosingTag:s(e)||(this.state=o.InAttributeName,this.sectionStart=this.index)},e.prototype.stateInSelfClosingTag=function(e){e===n.Gt?(this.cbs.onselfclosingtag(this.index),this.state=o.Text,this.baseState=o.Text,this.sectionStart=this.index+1,this.isSpecial=!1):s(e)||(this.state=o.BeforeAttributeName,this.stateBeforeAttributeName(e))},e.prototype.stateInAttributeName=function(e){(e===n.Eq||l(e))&&(this.cbs.onattribname(this.sectionStart,this.index),this.sectionStart=-1,this.state=o.AfterAttributeName,this.stateAfterAttributeName(e))},e.prototype.stateAfterAttributeName=function(e){e===n.Eq?this.state=o.BeforeAttributeValue:e===n.Slash||e===n.Gt?(this.cbs.onattribend(i.NoValue,this.index),this.state=o.BeforeAttributeName,this.stateBeforeAttributeName(e)):s(e)||(this.cbs.onattribend(i.NoValue,this.index),this.state=o.InAttributeName,this.sectionStart=this.index)},e.prototype.stateBeforeAttributeValue=function(e){e===n.DoubleQuote?(this.state=o.InAttributeValueDq,this.sectionStart=this.index+1):e===n.SingleQuote?(this.state=o.InAttributeValueSq,this.sectionStart=this.index+1):s(e)||(this.sectionStart=this.index,this.state=o.InAttributeValueNq,this.stateInAttributeValueNoQuotes(e))},e.prototype.handleInAttributeValue=function(e,t){e===t||!this.decodeEntities&&this.fastForwardTo(t)?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(t===n.DoubleQuote?i.Double:i.Single,this.index),this.state=o.BeforeAttributeName):this.decodeEntities&&e===n.Amp&&(this.baseState=this.state,this.state=o.BeforeEntity)},e.prototype.stateInAttributeValueDoubleQuotes=function(e){this.handleInAttributeValue(e,n.DoubleQuote)},e.prototype.stateInAttributeValueSingleQuotes=function(e){this.handleInAttributeValue(e,n.SingleQuote)},e.prototype.stateInAttributeValueNoQuotes=function(e){s(e)||e===n.Gt?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(i.Unquoted,this.index),this.state=o.BeforeAttributeName,this.stateBeforeAttributeName(e)):this.decodeEntities&&e===n.Amp&&(this.baseState=this.state,this.state=o.BeforeEntity)},e.prototype.stateBeforeDeclaration=function(e){e===n.OpeningSquareBracket?(this.state=o.CDATASequence,this.sequenceIndex=0):this.state=e===n.Dash?o.BeforeComment:o.InDeclaration},e.prototype.stateInDeclaration=function(e){(e===n.Gt||this.fastForwardTo(n.Gt))&&(this.cbs.ondeclaration(this.sectionStart,this.index),this.state=o.Text,this.sectionStart=this.index+1)},e.prototype.stateInProcessingInstruction=function(e){(e===n.Gt||this.fastForwardTo(n.Gt))&&(this.cbs.onprocessinginstruction(this.sectionStart,this.index),this.state=o.Text,this.sectionStart=this.index+1)},e.prototype.stateBeforeComment=function(e){e===n.Dash?(this.state=o.InCommentLike,this.currentSequence=u.CommentEnd,this.sequenceIndex=2,this.sectionStart=this.index+1):this.state=o.InDeclaration},e.prototype.stateInSpecialComment=function(e){(e===n.Gt||this.fastForwardTo(n.Gt))&&(this.cbs.oncomment(this.sectionStart,this.index,0),this.state=o.Text,this.sectionStart=this.index+1)},e.prototype.stateBeforeSpecialS=function(e){var t=32|e;t===u.ScriptEnd[3]?this.startSpecial(u.ScriptEnd,4):t===u.StyleEnd[3]?this.startSpecial(u.StyleEnd,4):(this.state=o.InTagName,this.stateInTagName(e))},e.prototype.stateBeforeEntity=function(e){this.entityExcess=1,this.entityResult=0,e===n.Number?this.state=o.BeforeNumericEntity:e===n.Amp||(this.trieIndex=0,this.trieCurrent=this.entityTrie[0],this.state=o.InNamedEntity,this.stateInNamedEntity(e))},e.prototype.stateInNamedEntity=function(e){if(this.entityExcess+=1,this.trieIndex=(0,a.determineBranch)(this.entityTrie,this.trieCurrent,this.trieIndex+1,e),this.trieIndex<0)return this.emitNamedEntity(),void this.index--;this.trieCurrent=this.entityTrie[this.trieIndex];var t=this.trieCurrent&a.BinTrieFlags.VALUE_LENGTH;if(t){var r=(t>>14)-1;if(this.allowLegacyEntity()||e===n.Semi){var o=this.index-this.entityExcess+1;o>this.sectionStart&&this.emitPartial(this.sectionStart,o),this.entityResult=this.trieIndex,this.trieIndex+=r,this.entityExcess=0,this.sectionStart=this.index+1,0===r&&this.emitNamedEntity()}else this.trieIndex+=r}},e.prototype.emitNamedEntity=function(){if(this.state=this.baseState,0!==this.entityResult)switch((this.entityTrie[this.entityResult]&a.BinTrieFlags.VALUE_LENGTH)>>14){case 1:this.emitCodePoint(this.entityTrie[this.entityResult]&~a.BinTrieFlags.VALUE_LENGTH);break;case 2:this.emitCodePoint(this.entityTrie[this.entityResult+1]);break;case 3:this.emitCodePoint(this.entityTrie[this.entityResult+1]),this.emitCodePoint(this.entityTrie[this.entityResult+2])}},e.prototype.stateBeforeNumericEntity=function(e){(32|e)===n.LowerX?(this.entityExcess++,this.state=o.InHexEntity):(this.state=o.InNumericEntity,this.stateInNumericEntity(e))},e.prototype.emitNumericEntity=function(e){var t=this.index-this.entityExcess-1;t+2+Number(this.state===o.InHexEntity)!==this.index&&(t>this.sectionStart&&this.emitPartial(this.sectionStart,t),this.sectionStart=this.index+Number(e),this.emitCodePoint((0,a.replaceCodePoint)(this.entityResult))),this.state=this.baseState},e.prototype.stateInNumericEntity=function(e){e===n.Semi?this.emitNumericEntity(!0):c(e)?(this.entityResult=10*this.entityResult+(e-n.Zero),this.entityExcess++):(this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state=this.baseState,this.index--)},e.prototype.stateInHexEntity=function(e){e===n.Semi?this.emitNumericEntity(!0):c(e)?(this.entityResult=16*this.entityResult+(e-n.Zero),this.entityExcess++):function(e){return e>=n.UpperA&&e<=n.UpperF||e>=n.LowerA&&e<=n.LowerF}(e)?(this.entityResult=16*this.entityResult+((32|e)-n.LowerA+10),this.entityExcess++):(this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state=this.baseState,this.index--)},e.prototype.allowLegacyEntity=function(){return!this.xmlMode&&(this.baseState===o.Text||this.baseState===o.InSpecialTag)},e.prototype.cleanup=function(){this.running&&this.sectionStart!==this.index&&(this.state===o.Text||this.state===o.InSpecialTag&&0===this.sequenceIndex?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):this.state!==o.InAttributeValueDq&&this.state!==o.InAttributeValueSq&&this.state!==o.InAttributeValueNq||(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=this.index))},e.prototype.shouldContinue=function(){return this.index<this.buffer.length+this.offset&&this.running},e.prototype.parse=function(){for(;this.shouldContinue();){var e=this.buffer.charCodeAt(this.index-this.offset);switch(this.state){case o.Text:this.stateText(e);break;case o.SpecialStartSequence:this.stateSpecialStartSequence(e);break;case o.InSpecialTag:this.stateInSpecialTag(e);break;case o.CDATASequence:this.stateCDATASequence(e);break;case o.InAttributeValueDq:this.stateInAttributeValueDoubleQuotes(e);break;case o.InAttributeName:this.stateInAttributeName(e);break;case o.InCommentLike:this.stateInCommentLike(e);break;case o.InSpecialComment:this.stateInSpecialComment(e);break;case o.BeforeAttributeName:this.stateBeforeAttributeName(e);break;case o.InTagName:this.stateInTagName(e);break;case o.InClosingTagName:this.stateInClosingTagName(e);break;case o.BeforeTagName:this.stateBeforeTagName(e);break;case o.AfterAttributeName:this.stateAfterAttributeName(e);break;case o.InAttributeValueSq:this.stateInAttributeValueSingleQuotes(e);break;case o.BeforeAttributeValue:this.stateBeforeAttributeValue(e);break;case o.BeforeClosingTagName:this.stateBeforeClosingTagName(e);break;case o.AfterClosingTagName:this.stateAfterClosingTagName(e);break;case o.BeforeSpecialS:this.stateBeforeSpecialS(e);break;case o.InAttributeValueNq:this.stateInAttributeValueNoQuotes(e);break;case o.InSelfClosingTag:this.stateInSelfClosingTag(e);break;case o.InDeclaration:this.stateInDeclaration(e);break;case o.BeforeDeclaration:this.stateBeforeDeclaration(e);break;case o.BeforeComment:this.stateBeforeComment(e);break;case o.InProcessingInstruction:this.stateInProcessingInstruction(e);break;case o.InNamedEntity:this.stateInNamedEntity(e);break;case o.BeforeEntity:this.stateBeforeEntity(e);break;case o.InHexEntity:this.stateInHexEntity(e);break;case o.InNumericEntity:this.stateInNumericEntity(e);break;default:this.stateBeforeNumericEntity(e)}this.index++}this.cleanup()},e.prototype.finish=function(){this.state===o.InNamedEntity&&this.emitNamedEntity(),this.sectionStart<this.index&&this.handleTrailingData(),this.cbs.onend()},e.prototype.handleTrailingData=function(){var e=this.buffer.length+this.offset;this.state===o.InCommentLike?this.currentSequence===u.CdataEnd?this.cbs.oncdata(this.sectionStart,e,0):this.cbs.oncomment(this.sectionStart,e,0):this.state===o.InNumericEntity&&this.allowLegacyEntity()||this.state===o.InHexEntity&&this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state===o.InTagName||this.state===o.BeforeAttributeName||this.state===o.BeforeAttributeValue||this.state===o.AfterAttributeName||this.state===o.InAttributeName||this.state===o.InAttributeValueSq||this.state===o.InAttributeValueDq||this.state===o.InAttributeValueNq||this.state===o.InClosingTagName||this.cbs.ontext(this.sectionStart,e)},e.prototype.emitPartial=function(e,t){this.baseState!==o.Text&&this.baseState!==o.InSpecialTag?this.cbs.onattribdata(e,t):this.cbs.ontext(e,t)},e.prototype.emitCodePoint=function(e){this.baseState!==o.Text&&this.baseState!==o.InSpecialTag?this.cbs.onattribentity(e):this.cbs.ontextentity(e)},e}();t.default=p},2904:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.DomUtils=t.parseFeed=t.getFeed=t.ElementType=t.Tokenizer=t.createDomStream=t.parseDOM=t.parseDocument=t.DefaultHandler=t.DomHandler=t.Parser=void 0;var s=r(4418),l=r(4418);Object.defineProperty(t,"Parser",{enumerable:!0,get:function(){return l.Parser}});var c=r(6722),u=r(6722);function p(e,t){var r=new c.DomHandler(void 0,t);return new s.Parser(r,t).end(e),r.root}function d(e,t){return p(e,t).children}Object.defineProperty(t,"DomHandler",{enumerable:!0,get:function(){return u.DomHandler}}),Object.defineProperty(t,"DefaultHandler",{enumerable:!0,get:function(){return u.DomHandler}}),t.parseDocument=p,t.parseDOM=d,t.createDomStream=function(e,t,r){var n=new c.DomHandler(e,t,r);return new s.Parser(n,t)};var h=r(4614);Object.defineProperty(t,"Tokenizer",{enumerable:!0,get:function(){return a(h).default}}),t.ElementType=i(r(289));var f=r(557),g=r(557);Object.defineProperty(t,"getFeed",{enumerable:!0,get:function(){return g.getFeed}});var _={xmlMode:!0};t.parseFeed=function(e,t){return void 0===t&&(t=_),(0,f.getFeed)(d(e,t))},t.DomUtils=i(r(557))},4518:(e,t)=>{"use strict";function r(e){return"[object Object]"===Object.prototype.toString.call(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.isPlainObject=function(e){var t,n;return!1!==r(e)&&(void 0===(t=e.constructor)||!1!==r(n=t.prototype)&&!1!==n.hasOwnProperty("isPrototypeOf"))}},8523:function(e,t){var r,n;void 0===(n="function"==typeof(r=function(){return function(e){function t(e){return" "===e||"\t"===e||"\n"===e||"\f"===e||"\r"===e}function r(t){var r,n=t.exec(e.substring(g));if(n)return r=n[0],g+=r.length,r}for(var n,o,i,a,s,l=e.length,c=/^[ \t\n\r\u000c]+/,u=/^[, \t\n\r\u000c]+/,p=/^[^ \t\n\r\u000c]+/,d=/[,]+$/,h=/^\d+$/,f=/^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/,g=0,_=[];;){if(r(u),g>=l)return _;n=r(p),o=[],","===n.slice(-1)?(n=n.replace(d,""),v()):m()}function m(){for(r(c),i="",a="in descriptor";;){if(s=e.charAt(g),"in descriptor"===a)if(t(s))i&&(o.push(i),i="",a="after descriptor");else{if(","===s)return g+=1,i&&o.push(i),void v();if("("===s)i+=s,a="in parens";else{if(""===s)return i&&o.push(i),void v();i+=s}}else if("in parens"===a)if(")"===s)i+=s,a="in descriptor";else{if(""===s)return o.push(i),void v();i+=s}else if("after descriptor"===a)if(t(s));else{if(""===s)return void v();a="in descriptor",g-=1}g+=1}}function v(){var t,r,i,a,s,l,c,u,p,d=!1,g={};for(a=0;a<o.length;a++)l=(s=o[a])[s.length-1],c=s.substring(0,s.length-1),u=parseInt(c,10),p=parseFloat(c),h.test(c)&&"w"===l?((t||r)&&(d=!0),0===u?d=!0:t=u):f.test(c)&&"x"===l?((t||r||i)&&(d=!0),p<0?d=!0:r=p):h.test(c)&&"h"===l?((i||r)&&(d=!0),0===u?d=!0:i=u):d=!0;d?console&&console.log&&console.log("Invalid srcset descriptor found in '"+e+"' at '"+s+"'."):(g.url=n,t&&(g.w=t),r&&(g.d=r),i&&(g.h=i),_.push(g))}}})?r.apply(t,[]):r)||(e.exports=n)},686:e=>{var t=String,r=function(){return{isColorSupported:!1,reset:t,bold:t,dim:t,italic:t,underline:t,inverse:t,hidden:t,strikethrough:t,black:t,red:t,green:t,yellow:t,blue:t,magenta:t,cyan:t,white:t,gray:t,bgBlack:t,bgRed:t,bgGreen:t,bgYellow:t,bgBlue:t,bgMagenta:t,bgCyan:t,bgWhite:t}};e.exports=r(),e.exports.createColors=r},4926:(e,t,r)=>{const n=r(2904),o=r(8281),{isPlainObject:i}=r(4518),a=r(1857),s=r(8523),{parse:l}=r(5133),c=["img","audio","video","picture","svg","object","map","iframe","embed"],u=["script","style"];function p(e,t){e&&Object.keys(e).forEach((function(r){t(e[r],r)}))}function d(e,t){return{}.hasOwnProperty.call(e,t)}function h(e,t){const r=[];return p(e,(function(e){t(e)&&r.push(e)})),r}e.exports=g;const f=/^[^\0\t\n\f\r /<=>]+$/;function g(e,t,r){if(null==e)return"";"number"==typeof e&&(e=e.toString());let m="",v="";function A(e,t){const r=this;this.tag=e,this.attribs=t||{},this.tagPosition=m.length,this.text="",this.mediaChildren=[],this.updateParentNodeText=function(){O.length&&(O[O.length-1].text+=r.text)},this.updateParentNodeMediaChildren=function(){O.length&&c.includes(this.tag)&&O[O.length-1].mediaChildren.push(this.tag)}}(t=Object.assign({},g.defaults,t)).parser=Object.assign({},_,t.parser);const y=function(e){return!1===t.allowedTags||(t.allowedTags||[]).indexOf(e)>-1};u.forEach((function(e){y(e)&&!t.allowVulnerableTags&&console.warn(`\n\n⚠️ Your \`allowedTags\` option includes, \`${e}\`, which is inherently\nvulnerable to XSS attacks. Please remove it from \`allowedTags\`.\nOr, to disable this warning, add the \`allowVulnerableTags\` option\nand ensure you are accounting for this risk.\n\n`)}));const C=t.nonTextTags||["script","style","textarea","option"];let b,w;t.allowedAttributes&&(b={},w={},p(t.allowedAttributes,(function(e,t){b[t]=[];const r=[];e.forEach((function(e){"string"==typeof e&&e.indexOf("*")>=0?r.push(o(e).replace(/\\\*/g,".*")):b[t].push(e)})),r.length&&(w[t]=new RegExp("^("+r.join("|")+")$"))})));const x={},k={},S={};p(t.allowedClasses,(function(e,t){if(b&&(d(b,t)||(b[t]=[]),b[t].push("class")),x[t]=e,Array.isArray(e)){const r=[];x[t]=[],S[t]=[],e.forEach((function(e){"string"==typeof e&&e.indexOf("*")>=0?r.push(o(e).replace(/\\\*/g,".*")):e instanceof RegExp?S[t].push(e):x[t].push(e)})),r.length&&(k[t]=new RegExp("^("+r.join("|")+")$"))}}));const T={};let E,M,O,P,L,B,I;p(t.transformTags,(function(e,t){let r;"function"==typeof e?r=e:"string"==typeof e&&(r=g.simpleTransform(e)),"*"===t?E=r:T[t]=r}));let D=!1;R();const N=new n.Parser({onopentag:function(e,r){if(t.enforceHtmlBoundary&&"html"===e&&R(),B)return void I++;const n=new A(e,r);O.push(n);let o=!1;const c=!!n.text;let u;if(d(T,e)&&(u=T[e](e,r),n.attribs=r=u.attribs,void 0!==u.text&&(n.innerText=u.text),e!==u.tagName&&(n.name=e=u.tagName,L[M]=u.tagName)),E&&(u=E(e,r),n.attribs=r=u.attribs,e!==u.tagName&&(n.name=e=u.tagName,L[M]=u.tagName)),(!y(e)||"recursiveEscape"===t.disallowedTagsMode&&!function(e){for(const t in e)if(d(e,t))return!1;return!0}(P)||null!=t.nestingLimit&&M>=t.nestingLimit)&&(o=!0,P[M]=!0,"discard"===t.disallowedTagsMode&&-1!==C.indexOf(e)&&(B=!0,I=1),P[M]=!0),M++,o){if("discard"===t.disallowedTagsMode)return;v=m,m=""}m+="<"+e,"script"===e&&(t.allowedScriptHostnames||t.allowedScriptDomains)&&(n.innerText=""),(!b||d(b,e)||b["*"])&&p(r,(function(r,o){if(!f.test(o))return void delete n.attribs[o];if(""===r&&(t.nonBooleanAttributes.includes(o)||t.nonBooleanAttributes.includes("*")))return void delete n.attribs[o];let c=!1;if(!b||d(b,e)&&-1!==b[e].indexOf(o)||b["*"]&&-1!==b["*"].indexOf(o)||d(w,e)&&w[e].test(o)||w["*"]&&w["*"].test(o))c=!0;else if(b&&b[e])for(const t of b[e])if(i(t)&&t.name&&t.name===o){c=!0;let e="";if(!0===t.multiple){const n=r.split(" ");for(const r of n)-1!==t.values.indexOf(r)&&(""===e?e=r:e+=" "+r)}else t.values.indexOf(r)>=0&&(e=r);r=e}if(c){if(-1!==t.allowedSchemesAppliedToAttributes.indexOf(o)&&V(e,r))return void delete n.attribs[o];if("script"===e&&"src"===o){let e=!0;try{const n=H(r);if(t.allowedScriptHostnames||t.allowedScriptDomains){const r=(t.allowedScriptHostnames||[]).find((function(e){return e===n.url.hostname})),o=(t.allowedScriptDomains||[]).find((function(e){return n.url.hostname===e||n.url.hostname.endsWith(`.${e}`)}));e=r||o}}catch(t){e=!1}if(!e)return void delete n.attribs[o]}if("iframe"===e&&"src"===o){let e=!0;try{const n=H(r);if(n.isRelativeUrl)e=d(t,"allowIframeRelativeUrls")?t.allowIframeRelativeUrls:!t.allowedIframeHostnames&&!t.allowedIframeDomains;else if(t.allowedIframeHostnames||t.allowedIframeDomains){const r=(t.allowedIframeHostnames||[]).find((function(e){return e===n.url.hostname})),o=(t.allowedIframeDomains||[]).find((function(e){return n.url.hostname===e||n.url.hostname.endsWith(`.${e}`)}));e=r||o}}catch(t){e=!1}if(!e)return void delete n.attribs[o]}if("srcset"===o)try{let e=s(r);if(e.forEach((function(e){V("srcset",e.url)&&(e.evil=!0)})),e=h(e,(function(e){return!e.evil})),!e.length)return void delete n.attribs[o];r=h(e,(function(e){return!e.evil})).map((function(e){if(!e.url)throw new Error("URL missing");return e.url+(e.w?` ${e.w}w`:"")+(e.h?` ${e.h}h`:"")+(e.d?` ${e.d}x`:"")})).join(", "),n.attribs[o]=r}catch(e){return void delete n.attribs[o]}if("class"===o){const t=x[e],i=x["*"],s=k[e],l=S[e],c=[s,k["*"]].concat(l).filter((function(e){return e}));if(!(u=r,p=t&&i?a(t,i):t||i,g=c,r=p?(u=u.split(/\s+/)).filter((function(e){return-1!==p.indexOf(e)||g.some((function(t){return t.test(e)}))})).join(" "):u).length)return void delete n.attribs[o]}if("style"===o)if(t.parseStyleAttributes)try{if(0===(r=function(e){return e.nodes[0].nodes.reduce((function(e,t){return e.push(`${t.prop}:${t.value}${t.important?" !important":""}`),e}),[]).join(";")}(function(e,t){if(!t)return e;const r=e.nodes[0];let n;return n=t[r.selector]&&t["*"]?a(t[r.selector],t["*"]):t[r.selector]||t["*"],n&&(e.nodes[0].nodes=r.nodes.reduce(function(e){return function(t,r){return d(e,r.prop)&&e[r.prop].some((function(e){return e.test(r.value)}))&&t.push(r),t}}(n),[])),e}(l(e+" {"+r+"}"),t.allowedStyles))).length)return void delete n.attribs[o]}catch(t){return"undefined"!=typeof window&&console.warn('Failed to parse "'+e+" {"+r+"}\", If you're running this in a browser, we recommend to disable style parsing: options.parseStyleAttributes: false, since this only works in a node environment due to a postcss dependency, More info: https://github.com/apostrophecms/sanitize-html/issues/547"),void delete n.attribs[o]}else if(t.allowedStyles)throw new Error("allowedStyles option cannot be used together with parseStyleAttributes: false.");m+=" "+o,r&&r.length&&(m+='="'+j(r,!0)+'"')}else delete n.attribs[o];var u,p,g})),-1!==t.selfClosing.indexOf(e)?m+=" />":(m+=">",!n.innerText||c||t.textFilter||(m+=j(n.innerText),D=!0)),o&&(m=v+j(m),v="")},ontext:function(e){if(B)return;const r=O[O.length-1];let n;if(r&&(n=r.tag,e=void 0!==r.innerText?r.innerText:e),"discard"!==t.disallowedTagsMode||"script"!==n&&"style"!==n){const r=j(e,!1);t.textFilter&&!D?m+=t.textFilter(r,n):D||(m+=r)}else m+=e;O.length&&(O[O.length-1].text+=e)},onclosetag:function(e,r){if(B){if(I--,I)return;B=!1}const n=O.pop();if(!n)return;if(n.tag!==e)return void O.push(n);B=!!t.enforceHtmlBoundary&&"html"===e,M--;const o=P[M];if(o){if(delete P[M],"discard"===t.disallowedTagsMode)return void n.updateParentNodeText();v=m,m=""}L[M]&&(e=L[M],delete L[M]),t.exclusiveFilter&&t.exclusiveFilter(n)?m=m.substr(0,n.tagPosition):(n.updateParentNodeMediaChildren(),n.updateParentNodeText(),-1!==t.selfClosing.indexOf(e)||r&&!y(e)&&["escape","recursiveEscape"].indexOf(t.disallowedTagsMode)>=0?o&&(m=v,v=""):(m+="</"+e+">",o&&(m=v+j(m),v=""),D=!1))}},t.parser);return N.write(e),N.end(),m;function R(){m="",M=0,O=[],P={},L={},B=!1,I=0}function j(e,r){return"string"!=typeof e&&(e+=""),t.parser.decodeEntities&&(e=e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),r&&(e=e.replace(/"/g,"&quot;"))),e=e.replace(/&(?![a-zA-Z0-9#]{1,20};)/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),r&&(e=e.replace(/"/g,"&quot;")),e}function V(e,r){for(r=r.replace(/[\x00-\x20]+/g,"");;){const e=r.indexOf("\x3c!--");if(-1===e)break;const t=r.indexOf("--\x3e",e+4);if(-1===t)break;r=r.substring(0,e)+r.substring(t+3)}const n=r.match(/^([a-zA-Z][a-zA-Z0-9.\-+]*):/);if(!n)return!!r.match(/^[/\\]{2}/)&&!t.allowProtocolRelative;const o=n[1].toLowerCase();return d(t.allowedSchemesByTag,e)?-1===t.allowedSchemesByTag[e].indexOf(o):!t.allowedSchemes||-1===t.allowedSchemes.indexOf(o)}function H(e){if((e=e.replace(/^(\w+:)?\s*[\\/]\s*[\\/]/,"$1//")).startsWith("relative:"))throw new Error("relative: exploit attempt");let t="relative://relative-site";for(let e=0;e<100;e++)t+=`/${e}`;const r=new URL(e,t);return{isRelativeUrl:r&&"relative-site"===r.hostname&&"relative:"===r.protocol,url:r}}}const _={decodeEntities:!0};g.defaults={allowedTags:["address","article","aside","footer","header","h1","h2","h3","h4","h5","h6","hgroup","main","nav","section","blockquote","dd","div","dl","dt","figcaption","figure","hr","li","main","ol","p","pre","ul","a","abbr","b","bdi","bdo","br","cite","code","data","dfn","em","i","kbd","mark","q","rb","rp","rt","rtc","ruby","s","samp","small","span","strong","sub","sup","time","u","var","wbr","caption","col","colgroup","table","tbody","td","tfoot","th","thead","tr"],nonBooleanAttributes:["abbr","accept","accept-charset","accesskey","action","allow","alt","as","autocapitalize","autocomplete","blocking","charset","cite","class","color","cols","colspan","content","contenteditable","coords","crossorigin","data","datetime","decoding","dir","dirname","download","draggable","enctype","enterkeyhint","fetchpriority","for","form","formaction","formenctype","formmethod","formtarget","headers","height","hidden","high","href","hreflang","http-equiv","id","imagesizes","imagesrcset","inputmode","integrity","is","itemid","itemprop","itemref","itemtype","kind","label","lang","list","loading","low","max","maxlength","media","method","min","minlength","name","nonce","optimum","pattern","ping","placeholder","popover","popovertarget","popovertargetaction","poster","preload","referrerpolicy","rel","rows","rowspan","sandbox","scope","shape","size","sizes","slot","span","spellcheck","src","srcdoc","srclang","srcset","start","step","style","tabindex","target","title","translate","type","usemap","value","width","wrap","onauxclick","onafterprint","onbeforematch","onbeforeprint","onbeforeunload","onbeforetoggle","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextlost","oncontextmenu","oncontextrestored","oncopy","oncuechange","oncut","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","onformdata","onhashchange","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onlanguagechange","onload","onloadeddata","onloadedmetadata","onloadstart","onmessage","onmessageerror","onmousedown","onmouseenter","onmouseleave","onmousemove","onmouseout","onmouseover","onmouseup","onoffline","ononline","onpagehide","onpageshow","onpaste","onpause","onplay","onplaying","onpopstate","onprogress","onratechange","onreset","onresize","onrejectionhandled","onscroll","onscrollend","onsecuritypolicyviolation","onseeked","onseeking","onselect","onslotchange","onstalled","onstorage","onsubmit","onsuspend","ontimeupdate","ontoggle","onunhandledrejection","onunload","onvolumechange","onwaiting","onwheel"],disallowedTagsMode:"discard",allowedAttributes:{a:["href","name","target"],img:["src","srcset","alt","title","width","height","loading"]},selfClosing:["img","br","hr","area","base","basefont","input","link","meta"],allowedSchemes:["http","https","ftp","mailto","tel"],allowedSchemesByTag:{},allowedSchemesAppliedToAttributes:["href","src","cite"],allowProtocolRelative:!0,enforceHtmlBoundary:!1,parseStyleAttributes:!0},g.simpleTransform=function(e,t,r){return r=void 0===r||r,t=t||{},function(n,o){let i;if(r)for(i in t)o[i]=t[i];else o=t;return{tagName:e,attribs:o}}}},8281:e=>{"use strict";e.exports=e=>{if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}},3125:(e,t,r)=>{"use strict";let n=r(7906);class o extends n{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}}e.exports=o,o.default=o,n.registerAtRule(o)},4826:(e,t,r)=>{"use strict";let n=r(2332);class o extends n{constructor(e){super(e),this.type="comment"}}e.exports=o,o.default=o},7906:(e,t,r)=>{"use strict";let n,o,i,a,{isClean:s,my:l}=r(8123),c=r(5545),u=r(4826),p=r(2332);function d(e){return e.map((e=>(e.nodes&&(e.nodes=d(e.nodes)),delete e.source,e)))}function h(e){if(e[s]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)h(t)}class f extends p{append(...e){for(let t of e){let e=this.normalize(t,this.last);for(let t of e)this.proxyOf.nodes.push(t)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t,r,n=this.getIterator();for(;this.indexes[n]<this.proxyOf.nodes.length&&(t=this.indexes[n],r=e(this.proxyOf.nodes[t],t),!1!==r);)this.indexes[n]+=1;return delete this.indexes[n],r}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:e[t]?"each"===t||"string"==typeof t&&t.startsWith("walk")?(...r)=>e[t](...r.map((e=>"function"==typeof e?(t,r)=>e(t.toProxy(),r):e))):"every"===t||"some"===t?r=>e[t](((e,...t)=>r(e.toProxy(),...t))):"root"===t?()=>e.root().toProxy():"nodes"===t?e.nodes.map((e=>e.toProxy())):"first"===t||"last"===t?e[t].toProxy():e[t]:e[t],set:(e,t,r)=>(e[t]===r||(e[t]=r,"name"!==t&&"params"!==t&&"selector"!==t||e.markDirty()),!0)}}index(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r,n=this.index(e),o=this.normalize(t,this.proxyOf.nodes[n]).reverse();n=this.index(e);for(let e of o)this.proxyOf.nodes.splice(n+1,0,e);for(let e in this.indexes)r=this.indexes[e],n<r&&(this.indexes[e]=r+o.length);return this.markDirty(),this}insertBefore(e,t){let r,n=this.index(e),o=0===n&&"prepend",i=this.normalize(t,this.proxyOf.nodes[n],o).reverse();n=this.index(e);for(let e of i)this.proxyOf.nodes.splice(n,0,e);for(let e in this.indexes)r=this.indexes[e],n<=r&&(this.indexes[e]=r+i.length);return this.markDirty(),this}normalize(e,t){if("string"==typeof e)e=d(n(e).nodes);else if(Array.isArray(e)){e=e.slice(0);for(let t of e)t.parent&&t.parent.removeChild(t,"ignore")}else if("root"===e.type&&"document"!==this.type){e=e.nodes.slice(0);for(let t of e)t.parent&&t.parent.removeChild(t,"ignore")}else if(e.type)e=[e];else if(e.prop){if(void 0===e.value)throw new Error("Value field is missed in node creation");"string"!=typeof e.value&&(e.value=String(e.value)),e=[new c(e)]}else if(e.selector)e=[new o(e)];else if(e.name)e=[new i(e)];else{if(!e.text)throw new Error("Unknown node type in node creation");e=[new u(e)]}return e.map((e=>(e[l]||f.rebuild(e),(e=e.proxyOf).parent&&e.parent.removeChild(e),e[s]&&h(e),void 0===e.raws.before&&t&&void 0!==t.raws.before&&(e.raws.before=t.raws.before.replace(/\S/g,"")),e.parent=this.proxyOf,e)))}prepend(...e){e=e.reverse();for(let t of e){let e=this.normalize(t,this.first,"prepend").reverse();for(let t of e)this.proxyOf.nodes.unshift(t);for(let t in this.indexes)this.indexes[t]=this.indexes[t]+e.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){let t;e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls((n=>{t.props&&!t.props.includes(n.prop)||t.fast&&!n.value.includes(t.fast)||(n.value=n.value.replace(e,r))})),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each(((t,r)=>{let n;try{n=e(t,r)}catch(e){throw t.addToError(e)}return!1!==n&&t.walk&&(n=t.walk(e)),n}))}walkAtRules(e,t){return t?e instanceof RegExp?this.walk(((r,n)=>{if("atrule"===r.type&&e.test(r.name))return t(r,n)})):this.walk(((r,n)=>{if("atrule"===r.type&&r.name===e)return t(r,n)})):(t=e,this.walk(((e,r)=>{if("atrule"===e.type)return t(e,r)})))}walkComments(e){return this.walk(((t,r)=>{if("comment"===t.type)return e(t,r)}))}walkDecls(e,t){return t?e instanceof RegExp?this.walk(((r,n)=>{if("decl"===r.type&&e.test(r.prop))return t(r,n)})):this.walk(((r,n)=>{if("decl"===r.type&&r.prop===e)return t(r,n)})):(t=e,this.walk(((e,r)=>{if("decl"===e.type)return t(e,r)})))}walkRules(e,t){return t?e instanceof RegExp?this.walk(((r,n)=>{if("rule"===r.type&&e.test(r.selector))return t(r,n)})):this.walk(((r,n)=>{if("rule"===r.type&&r.selector===e)return t(r,n)})):(t=e,this.walk(((e,r)=>{if("rule"===e.type)return t(e,r)})))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}f.registerParse=e=>{n=e},f.registerRule=e=>{o=e},f.registerAtRule=e=>{i=e},f.registerRoot=e=>{a=e},e.exports=f,f.default=f,f.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,i.prototype):"rule"===e.type?Object.setPrototypeOf(e,o.prototype):"decl"===e.type?Object.setPrototypeOf(e,c.prototype):"comment"===e.type?Object.setPrototypeOf(e,u.prototype):"root"===e.type&&Object.setPrototypeOf(e,a.prototype),e[l]=!0,e.nodes&&e.nodes.forEach((e=>{f.rebuild(e)}))}},6696:(e,t,r)=>{"use strict";let n=r(686),o=r(5710);class i extends Error{constructor(e,t,r,n,o,a){super(e),this.name="CssSyntaxError",this.reason=e,o&&(this.file=o),n&&(this.source=n),a&&(this.plugin=a),void 0!==t&&void 0!==r&&("number"==typeof t?(this.line=t,this.column=r):(this.line=t.line,this.column=t.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,i)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;null==e&&(e=n.isColorSupported),o&&e&&(t=o(t));let r,i,a=t.split(/\r?\n/),s=Math.max(this.line-3,0),l=Math.min(this.line+2,a.length),c=String(l).length;if(e){let{bold:e,gray:t,red:o}=n.createColors(!0);r=t=>e(o(t)),i=e=>t(e)}else r=i=e=>e;return a.slice(s,l).map(((e,t)=>{let n=s+1+t,o=" "+(" "+n).slice(-c)+" | ";if(n===this.line){let t=i(o.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return r(">")+i(o)+e+"\n "+t+r("^")}return" "+i(o)+e})).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}}e.exports=i,i.default=i},5545:(e,t,r)=>{"use strict";let n=r(2332);class o extends n{constructor(e){e&&void 0!==e.value&&"string"!=typeof e.value&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}}e.exports=o,o.default=o},3078:(e,t,r)=>{"use strict";let n,o,i=r(7906);class a extends i{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new n(new o,this,e).stringify()}}a.registerLazyResult=e=>{n=e},a.registerProcessor=e=>{o=e},e.exports=a,a.default=a},1789:(e,t,r)=>{"use strict";let n=r(5545),o=r(5725),i=r(4826),a=r(3125),s=r(3235),l=r(9942),c=r(6779);function u(e,t){if(Array.isArray(e))return e.map((e=>u(e)));let{inputs:r,...p}=e;if(r){t=[];for(let e of r){let r={...e,__proto__:s.prototype};r.map&&(r.map={...r.map,__proto__:o.prototype}),t.push(r)}}if(p.nodes&&(p.nodes=e.nodes.map((e=>u(e,t)))),p.source){let{inputId:e,...r}=p.source;p.source=r,null!=e&&(p.source.input=t[e])}if("root"===p.type)return new l(p);if("decl"===p.type)return new n(p);if("rule"===p.type)return new c(p);if("comment"===p.type)return new i(p);if("atrule"===p.type)return new a(p);throw new Error("Unknown node type: "+e.type)}e.exports=u,u.default=u},3235:(e,t,r)=>{"use strict";let{SourceMapConsumer:n,SourceMapGenerator:o}=r(984),{fileURLToPath:i,pathToFileURL:a}=r(9121),{isAbsolute:s,resolve:l}=r(5426),{nanoid:c}=r(6521),u=r(5710),p=r(6696),d=r(5725),h=Symbol("fromOffsetCache"),f=Boolean(n&&o),g=Boolean(l&&s);class _{constructor(e,t={}){if(null==e||"object"==typeof e&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),"\ufeff"===this.css[0]||"￾"===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!g||/^\w+:\/\//.test(t.from)||s(t.from)?this.file=t.from:this.file=l(t.from)),g&&f){let e=new d(this.css,t);if(e.text){this.map=e;let t=e.consumer().file;!this.file&&t&&(this.file=this.mapResolve(t))}}this.file||(this.id="<input css "+c(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,n={}){let o,i,s;if(t&&"object"==typeof t){let e=t,n=r;if("number"==typeof e.offset){let n=this.fromOffset(e.offset);t=n.line,r=n.col}else t=e.line,r=e.column;if("number"==typeof n.offset){let e=this.fromOffset(n.offset);i=e.line,s=e.col}else i=n.line,s=n.column}else if(!r){let e=this.fromOffset(t);t=e.line,r=e.col}let l=this.origin(t,r,i,s);return o=l?new p(e,void 0===l.endLine?l.line:{column:l.column,line:l.line},void 0===l.endLine?l.column:{column:l.endColumn,line:l.endLine},l.source,l.file,n.plugin):new p(e,void 0===i?t:{column:r,line:t},void 0===i?r:{column:s,line:i},this.css,this.file,n.plugin),o.input={column:r,endColumn:s,endLine:i,line:t,source:this.css},this.file&&(a&&(o.input.url=a(this.file).toString()),o.input.file=this.file),o}fromOffset(e){let t,r;if(this[h])r=this[h];else{let e=this.css.split("\n");r=new Array(e.length);let t=0;for(let n=0,o=e.length;n<o;n++)r[n]=t,t+=e[n].length+1;this[h]=r}t=r[r.length-1];let n=0;if(e>=t)n=r.length-1;else{let t,o=r.length-2;for(;n<o;)if(t=n+(o-n>>1),e<r[t])o=t-1;else{if(!(e>=r[t+1])){n=t;break}n=t+1}}return{col:e-r[n]+1,line:n+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:l(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,n){if(!this.map)return!1;let o,l,c=this.map.consumer(),u=c.originalPositionFor({column:t,line:e});if(!u.source)return!1;"number"==typeof r&&(o=c.originalPositionFor({column:n,line:r})),l=s(u.source)?a(u.source):new URL(u.source,this.map.consumer().sourceRoot||a(this.map.mapFile));let p={column:u.column,endColumn:o&&o.column,endLine:o&&o.line,line:u.line,url:l.toString()};if("file:"===l.protocol){if(!i)throw new Error("file: protocol is not available in this PostCSS build");p.file=i(l)}let d=c.sourceContentFor(u.source);return d&&(p.source=d),p}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])null!=this[t]&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}}e.exports=_,_.default=_,u&&u.registerInput&&u.registerInput(_)},7369:(e,t,r)=>{"use strict";let{isClean:n,my:o}=r(8123),i=r(5002),a=r(406),s=r(7906),l=r(3078),c=(r(1724),r(3722)),u=r(6962),p=r(9942);const d={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},h={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},f={Once:!0,postcssPlugin:!0,prepare:!0};function g(e){return"object"==typeof e&&"function"==typeof e.then}function _(e){let t=!1,r=d[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[r,r+"-"+t,0,r+"Exit",r+"Exit-"+t]:t?[r,r+"-"+t,r+"Exit",r+"Exit-"+t]:e.append?[r,0,r+"Exit"]:[r,r+"Exit"]}function m(e){let t;return t="document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:_(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function v(e){return e[n]=!1,e.nodes&&e.nodes.forEach((e=>v(e))),e}let A={};class y{constructor(e,t,r){let n;if(this.stringified=!1,this.processed=!1,"object"!=typeof t||null===t||"root"!==t.type&&"document"!==t.type)if(t instanceof y||t instanceof c)n=v(t.root),t.map&&(void 0===r.map&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=t.map);else{let e=u;r.syntax&&(e=r.syntax.parse),r.parser&&(e=r.parser),e.parse&&(e=e.parse);try{n=e(t,r)}catch(e){this.processed=!0,this.error=e}n&&!n[o]&&s.rebuild(n)}else n=v(t);this.result=new c(e,n,r),this.helpers={...A,postcss:A,result:this.result},this.plugins=this.processor.plugins.map((e=>"object"==typeof e&&e.prepare?{...e,...e.prepare(this.result)}:e))}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin?r.postcssVersion:(e.plugin=r.postcssPlugin,e.setMessage())}catch(e){console&&console.error&&console.error(e)}return e}prepareVisitors(){this.listeners={};let e=(e,t,r)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,r])};for(let t of this.plugins)if("object"==typeof t)for(let r in t){if(!h[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!f[r])if("object"==typeof t[r])for(let n in t[r])e(t,"*"===n?r:r+"-"+n.toLowerCase(),t[r][n]);else"function"==typeof t[r]&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],r=this.runOnRoot(t);if(g(r))try{await r}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[n];){e[n]=!0;let t=[m(e)];for(;t.length>0;){let e=this.visitTick(t);if(g(e))try{await e}catch(e){let r=t[t.length-1].node;throw this.handleError(e,r)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if("document"===e.type){let t=e.nodes.map((e=>r(e,this.helpers)));await Promise.all(t)}else await r(e,this.helpers)}catch(e){throw this.handleError(e)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if("object"==typeof e&&e.Once){if("document"===this.result.root.type){let t=this.result.root.nodes.map((t=>e.Once(t,this.helpers)));return g(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)return e(this.result.root,this.result)}catch(e){throw this.handleError(e)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=a;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let r=new i(t,this.result.root,this.result.opts).generate();return this.result.css=r[0],this.result.map=r[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins)if(g(this.runOnRoot(e)))throw this.getAsyncError();if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[n];)e[n]=!0,this.walkSync(e);if(this.listeners.OnceExit)if("document"===e.type)for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,n]of e){let e;this.result.lastPlugin=r;try{e=n(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(g(e))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:o}=t;if("root"!==r.type&&"document"!==r.type&&!r.parent)return void e.pop();if(o.length>0&&t.visitorIndex<o.length){let[e,n]=o[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===o.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=e;try{return n(r.toProxy(),this.helpers)}catch(e){throw this.handleError(e,r)}}if(0!==t.iterator){let o,i=t.iterator;for(;o=r.nodes[r.indexes[i]];)if(r.indexes[i]+=1,!o[n])return o[n]=!0,void e.push(m(o));t.iterator=0,delete r.indexes[i]}let i=t.events;for(;t.eventIndex<i.length;){let e=i[t.eventIndex];if(t.eventIndex+=1,0===e)return void(r.nodes&&r.nodes.length&&(r[n]=!0,t.iterator=r.getIterator()));if(this.listeners[e])return void(t.visitors=this.listeners[e])}e.pop()}walkSync(e){e[n]=!0;let t=_(e);for(let r of t)if(0===r)e.nodes&&e.each((e=>{e[n]||this.walkSync(e)}));else{let t=this.listeners[r];if(t&&this.visitSync(t,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}}y.registerPostcss=e=>{A=e},e.exports=y,y.default=y,p.registerLazyResult(y),l.registerLazyResult(y)},5266:e=>{"use strict";let t={comma:e=>t.split(e,[","],!0),space:e=>t.split(e,[" ","\n","\t"]),split(e,t,r){let n=[],o="",i=!1,a=0,s=!1,l="",c=!1;for(let r of e)c?c=!1:"\\"===r?c=!0:s?r===l&&(s=!1):'"'===r||"'"===r?(s=!0,l=r):"("===r?a+=1:")"===r?a>0&&(a-=1):0===a&&t.includes(r)&&(i=!0),i?(""!==o&&n.push(o.trim()),o="",i=!1):o+=r;return(r||""!==o)&&n.push(o.trim()),n}};e.exports=t,t.default=t},5002:(e,t,r)=>{"use strict";let{SourceMapConsumer:n,SourceMapGenerator:o}=r(984),{dirname:i,relative:a,resolve:s,sep:l}=r(5426),{pathToFileURL:c}=r(9121),u=r(3235),p=Boolean(n&&o),d=Boolean(i&&s&&a&&l);e.exports=class{constructor(e,t,r,n){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=n,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;e=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";let t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t,r=this.toUrl(this.path(e.file)),o=e.root||i(e.file);!1===this.mapOpts.sourcesContent?(t=new n(e.text),t.sourcesContent&&(t.sourcesContent=t.sourcesContent.map((()=>null)))):t=e.consumer(),this.map.applySourceMap(t,r,this.toUrl(this.path(o)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],"comment"===e.type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/(\n)?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),d&&p&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,(t=>{e+=t})),[e]}}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=o.fromSourceMap(e)}else this.map=new o({file:this.outputFile()}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new o({file:this.outputFile()});let e,t,r=1,n=1,i="<no source>",a={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,((o,s,l)=>{if(this.css+=o,s&&"end"!==l&&(a.generated.line=r,a.generated.column=n-1,s.source&&s.source.start?(a.source=this.sourcePath(s),a.original.line=s.source.start.line,a.original.column=s.source.start.column-1,this.map.addMapping(a)):(a.source=i,a.original.line=1,a.original.column=0,this.map.addMapping(a))),e=o.match(/\n/g),e?(r+=e.length,t=o.lastIndexOf("\n"),n=o.length-t):n+=o.length,s&&"start"!==l){let e=s.parent||{raws:{}};("decl"===s.type||"atrule"===s.type&&!s.nodes)&&s===e.last&&!e.raws.semicolon||(s.source&&s.source.end?(a.source=this.sourcePath(s),a.original.line=s.source.end.line,a.original.column=s.source.end.column-1,a.generated.line=r,a.generated.column=n-2,this.map.addMapping(a)):(a.source=i,a.original.line=1,a.original.column=0,a.generated.line=r,a.generated.column=n-1,this.map.addMapping(a)))}}))}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some((e=>e.annotation)))}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;let e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some((e=>e.inline)))}isMap(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some((e=>e.withContent()))}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute)return e;if(60===e.charCodeAt(0))return e;if(/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?i(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(r=i(s(r,this.mapOpts.annotation)));let n=a(r,e);return this.memoizedPaths.set(e,n),n}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk((e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}}));else{let e=new u(this.css,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk((t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let n=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(n,t.source.input.css)}}}));else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(e,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(c){let t=c(e).toString();return this.memoizedFileURLs.set(e,t),t}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;"\\"===l&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}}},2547:(e,t,r)=>{"use strict";let n=r(5002),o=r(406),i=(r(1724),r(6962));const a=r(3722);class s{constructor(e,t,r){let i;t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let s=o;this.result=new a(this._processor,i,this._opts),this.result.css=t;let l=this;Object.defineProperty(this.result,"root",{get:()=>l.root});let c=new n(s,i,this._opts,t);if(c.isMap()){let[e,t]=c.generate();e&&(this.result.css=e),t&&(this.result.map=t)}}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=i;try{e=t(this._css,this._opts)}catch(e){this.error=e}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}}e.exports=s,s.default=s},2332:(e,t,r)=>{"use strict";let{isClean:n,my:o}=r(8123),i=r(6696),a=r(1008),s=r(406);function l(e,t){let r=new e.constructor;for(let n in e){if(!Object.prototype.hasOwnProperty.call(e,n))continue;if("proxyCache"===n)continue;let o=e[n],i=typeof o;"parent"===n&&"object"===i?t&&(r[n]=t):"source"===n?r[n]=o:Array.isArray(o)?r[n]=o.map((e=>l(e,r))):("object"===i&&null!==o&&(o=l(o)),r[n]=o)}return r}class c{constructor(e={}){this.raws={},this[n]=!1,this[o]=!0;for(let t in e)if("nodes"===t){this.nodes=[];for(let r of e[t])"function"==typeof r.clone?this.append(r.clone()):this.append(r)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=l(this);for(let r in e)t[r]=e[r];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:r,start:n}=this.rangeBy(t);return this.source.input.error(e,{column:n.column,line:n.line},{column:r.column,line:r.line},t)}return new i(e)}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t],set:(e,t,r)=>(e[t]===r||(e[t]=r,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0)}}markDirty(){if(this[n]){this[n]=!1;let e=this;for(;e=e.parent;)e[n]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let r=this.source.start;if(e.index)r=this.positionInside(e.index,t);else if(e.word){let n=(t=this.toString()).indexOf(e.word);-1!==n&&(r=this.positionInside(n,t))}return r}positionInside(e,t){let r=t||this.toString(),n=this.source.start.column,o=this.source.start.line;for(let t=0;t<e;t++)"\n"===r[t]?(n=1,o+=1):n+=1;return{column:n,line:o}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let n=this.toString(),o=n.indexOf(e.word);-1!==o&&(t=this.positionInside(o,n),r=this.positionInside(o+e.word.length,n))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:e.endIndex?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<t.line||r.line===t.line&&r.column<=t.column)&&(r={column:t.column+1,line:t.line}),{end:r,start:t}}raw(e,t){return(new a).raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,r=!1;for(let n of e)n===this?r=!0:r?(this.parent.insertAfter(t,n),t=n):this.parent.insertBefore(t,n);r||this.remove()}return this}root(){let e=this;for(;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}toJSON(e,t){let r={},n=null==t;t=t||new Map;let o=0;for(let e in this){if(!Object.prototype.hasOwnProperty.call(this,e))continue;if("parent"===e||"proxyCache"===e)continue;let n=this[e];if(Array.isArray(n))r[e]=n.map((e=>"object"==typeof e&&e.toJSON?e.toJSON(null,t):e));else if("object"==typeof n&&n.toJSON)r[e]=n.toJSON(null,t);else if("source"===e){let i=t.get(n.input);null==i&&(i=o,t.set(n.input,o),o++),r[e]={end:n.end,inputId:i,start:n.start}}else r[e]=n}return n&&(r.inputs=[...t.keys()].map((e=>e.toJSON()))),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=s){e.stringify&&(e=e.stringify);let t="";return e(this,(e=>{t+=e})),t}warn(e,t,r){let n={node:this};for(let e in r)n[e]=r[e];return e.warn(t,n)}get proxyOf(){return this}}e.exports=c,c.default=c},6962:(e,t,r)=>{"use strict";let n=r(7906),o=r(7232),i=r(3235);function a(e,t){let r=new i(e,t),n=new o(r);try{n.parse()}catch(e){throw e}return n.root}e.exports=a,a.default=a,n.registerParse(a)},7232:(e,t,r)=>{"use strict";let n=r(5545),o=r(9464),i=r(4826),a=r(3125),s=r(9942),l=r(6779);const c={empty:!0,space:!0};e.exports=class{constructor(e){this.input=e,this.root=new s,this.current=this.root,this.spaces="",this.semicolon=!1,this.customProperty=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t,r,n,o=new a;o.name=e[1].slice(1),""===o.name&&this.unnamedAtrule(o,e),this.init(o,e[2]);let i=!1,s=!1,l=[],c=[];for(;!this.tokenizer.endOfFile();){if(t=(e=this.tokenizer.nextToken())[0],"("===t||"["===t?c.push("("===t?")":"]"):"{"===t&&c.length>0?c.push("}"):t===c[c.length-1]&&c.pop(),0===c.length){if(";"===t){o.source.end=this.getPosition(e[2]),o.source.end.offset++,this.semicolon=!0;break}if("{"===t){s=!0;break}if("}"===t){if(l.length>0){for(n=l.length-1,r=l[n];r&&"space"===r[0];)r=l[--n];r&&(o.source.end=this.getPosition(r[3]||r[2]),o.source.end.offset++)}this.end(e);break}l.push(e)}else l.push(e);if(this.tokenizer.endOfFile()){i=!0;break}}o.raws.between=this.spacesAndCommentsFromEnd(l),l.length?(o.raws.afterName=this.spacesAndCommentsFromStart(l),this.raw(o,"params",l),i&&(e=l[l.length-1],o.source.end=this.getPosition(e[3]||e[2]),o.source.end.offset++,this.spaces=o.raws.between,o.raws.between="")):(o.raws.afterName="",o.params=""),s&&(o.nodes=[],this.current=o)}checkMissedSemicolon(e){let t=this.colon(e);if(!1===t)return;let r,n=0;for(let o=t-1;o>=0&&(r=e[o],"space"===r[0]||(n+=1,2!==n));o--);throw this.input.error("Missed semicolon","word"===r[0]?r[3]+1:r[2])}colon(e){let t,r,n,o=0;for(let[i,a]of e.entries()){if(t=a,r=t[0],"("===r&&(o+=1),")"===r&&(o-=1),0===o&&":"===r){if(n){if("word"===n[0]&&"progid"===n[1])continue;return i}this.doubleColon(t)}n=t}return!1}comment(e){let t=new i;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text="",t.raws.left=r,t.raws.right="";else{let e=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=e[2],t.raws.left=e[1],t.raws.right=e[3]}}createTokenizer(){this.tokenizer=o(this.input)}decl(e,t){let r=new n;this.init(r,e[0][2]);let o,i=e[e.length-1];for(";"===i[0]&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(i[3]||i[2]||function(e){for(let t=e.length-1;t>=0;t--){let r=e[t],n=r[3]||r[2];if(n)return n}}(e)),r.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let t=e[0][0];if(":"===t||"space"===t||"comment"===t)break;r.prop+=e.shift()[1]}for(r.raws.between="";e.length;){if(o=e.shift(),":"===o[0]){r.raws.between+=o[1];break}"word"===o[0]&&/\w/.test(o[1])&&this.unknownWord([o]),r.raws.between+=o[1]}"_"!==r.prop[0]&&"*"!==r.prop[0]||(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let a,s=[];for(;e.length&&(a=e[0][0],"space"===a||"comment"===a);)s.push(e.shift());this.precheckMissedSemicolon(e);for(let t=e.length-1;t>=0;t--){if(o=e[t],"!important"===o[1].toLowerCase()){r.important=!0;let n=this.stringFrom(e,t);n=this.spacesFromEnd(e)+n," !important"!==n&&(r.raws.important=n);break}if("important"===o[1].toLowerCase()){let n=e.slice(0),o="";for(let e=t;e>0;e--){let t=n[e][0];if(0===o.trim().indexOf("!")&&"space"!==t)break;o=n.pop()[1]+o}0===o.trim().indexOf("!")&&(r.important=!0,r.raws.important=o,e=n)}if("space"!==o[0]&&"comment"!==o[0])break}e.some((e=>"space"!==e[0]&&"comment"!==e[0]))&&(r.raws.between+=s.map((e=>e[1])).join(""),s=[]),this.raw(r,"value",s.concat(e),t),r.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new l;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let e=this.current.nodes[this.current.nodes.length-1];e&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="","comment"!==e.type&&(this.semicolon=!1)}other(e){let t=!1,r=null,n=!1,o=null,i=[],a=e[1].startsWith("--"),s=[],l=e;for(;l;){if(r=l[0],s.push(l),"("===r||"["===r)o||(o=l),i.push("("===r?")":"]");else if(a&&n&&"{"===r)o||(o=l),i.push("}");else if(0===i.length){if(";"===r){if(n)return void this.decl(s,a);break}if("{"===r)return void this.rule(s);if("}"===r){this.tokenizer.back(s.pop()),t=!0;break}":"===r&&(n=!0)}else r===i[i.length-1]&&(i.pop(),0===i.length&&(o=null));l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),i.length>0&&this.unclosedBracket(o),t&&n){if(!a)for(;s.length&&(l=s[s.length-1][0],"space"===l||"comment"===l);)this.tokenizer.back(s.pop());this.decl(s,a)}else this.unknownWord(s)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e)}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,n){let o,i,a,s,l=r.length,u="",p=!0;for(let e=0;e<l;e+=1)o=r[e],i=o[0],"space"!==i||e!==l-1||n?"comment"===i?(s=r[e-1]?r[e-1][0]:"empty",a=r[e+1]?r[e+1][0]:"empty",c[s]||c[a]||","===u.slice(-1)?p=!1:u+=o[1]):u+=o[1]:p=!1;if(!p){let n=r.reduce(((e,t)=>e+t[1]),"");e.raws[t]={raw:n,value:u}}e[t]=u}rule(e){e.pop();let t=new l;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],"space"===t||"comment"===t);)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],"space"===t||"comment"===t);)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],"space"===t);)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let n=t;n<e.length;n++)r+=e[n][1];return e.splice(t,e.length-t),r}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}}},5133:(e,t,r)=>{"use strict";let n=r(6696),o=r(5545),i=r(7369),a=r(7906),s=r(5367),l=r(406),c=r(1789),u=r(3078),p=r(8007),d=r(4826),h=r(3125),f=r(3722),g=r(3235),_=r(6962),m=r(5266),v=r(6779),A=r(9942),y=r(2332);function C(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new s(e)}C.plugin=function(e,t){let r,n=!1;function o(...r){console&&console.warn&&!n&&(n=!0,console.warn(e+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));let o=t(...r);return o.postcssPlugin=e,o.postcssVersion=(new s).version,o}return Object.defineProperty(o,"postcss",{get:()=>(r||(r=o()),r)}),o.process=function(e,t,r){return C([o(r)]).process(e,t)},o},C.stringify=l,C.parse=_,C.fromJSON=c,C.list=m,C.comment=e=>new d(e),C.atRule=e=>new h(e),C.decl=e=>new o(e),C.rule=e=>new v(e),C.root=e=>new A(e),C.document=e=>new u(e),C.CssSyntaxError=n,C.Declaration=o,C.Container=a,C.Processor=s,C.Document=u,C.Comment=d,C.Warning=p,C.AtRule=h,C.Result=f,C.Input=g,C.Rule=v,C.Root=A,C.Node=y,i.registerPostcss(C),e.exports=C,C.default=C},5725:(e,t,r)=>{"use strict";let{SourceMapConsumer:n,SourceMapGenerator:o}=r(984),{existsSync:i,readFileSync:a}=r(473),{dirname:s,join:l}=r(5426);class c{constructor(e,t){if(!1===t.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,n=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=s(this.mapFile)),n&&(this.text=n)}consumer(){return this.consumerCache||(this.consumerCache=new n(this.text)),this.consumerCache}decodeInline(e){if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(e)||/^data:application\/json;base64,/.test(e))return t=e.substr(RegExp.lastMatch.length),Buffer?Buffer.from(t,"base64").toString():window.atob(t);var t;let r=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+r)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return"object"==typeof e&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let r=e.lastIndexOf(t.pop()),n=e.indexOf("*/",r);r>-1&&n>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,n)))}loadFile(e){if(this.root=s(e),i(e))return this.mapFile=e,a(e,"utf-8").toString().trim()}loadMap(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(t instanceof n)return o.fromSourceMap(t).toString();if(t instanceof o)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}{let r=t(e);if(r){let e=this.loadFile(r);if(!e)throw new Error("Unable to load previous source map: "+r.toString());return e}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let t=this.annotation;return e&&(t=l(s(e),t)),this.loadFile(t)}}}startWith(e,t){return!!e&&e.substr(0,t.length)===t}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}e.exports=c,c.default=c},5367:(e,t,r)=>{"use strict";let n=r(2547),o=r(7369),i=r(3078),a=r(9942);class s{constructor(e=[]){this.version="8.4.31",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(!0===r.postcss?r=r():r.postcss&&(r=r.postcss),"object"==typeof r&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if("object"==typeof r&&r.postcssPlugin)t.push(r);else if("function"==typeof r)t.push(r);else if("object"!=typeof r||!r.parse&&!r.stringify)throw new Error(r+" is not a PostCSS plugin");return t}process(e,t={}){return 0===this.plugins.length&&void 0===t.parser&&void 0===t.stringifier&&void 0===t.syntax?new n(this,e,t):new o(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}}e.exports=s,s.default=s,a.registerProcessor(s),i.registerProcessor(s)},3722:(e,t,r)=>{"use strict";let n=r(8007);class o{constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new n(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter((e=>"warning"===e.type))}get content(){return this.css}}e.exports=o,o.default=o},9942:(e,t,r)=>{"use strict";let n,o,i=r(7906);class a extends i{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let n=super.normalize(e);if(t)if("prepend"===r)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let e of n)e.raws.before=t.raws.before;return n}removeChild(e,t){let r=this.index(e);return!t&&0===r&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new n(new o,this,e).stringify()}}a.registerLazyResult=e=>{n=e},a.registerProcessor=e=>{o=e},e.exports=a,a.default=a,i.registerRoot(a)},6779:(e,t,r)=>{"use strict";let n=r(7906),o=r(5266);class i extends n{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return o.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}}e.exports=i,i.default=i,n.registerRule(i)},1008:e=>{"use strict";const t={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:"    ",semicolon:!1};class r{constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,n=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?r+=e.raws.afterName:n&&(r+=" "),e.nodes)this.block(e,r+n);else{let o=(e.raws.between||"")+(t?";":"");this.builder(r+n+o,e)}}beforeAfter(e,t){let r;r="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");let n=e.parent,o=0;for(;n&&"root"!==n.type;)o+=1,n=n.parent;if(r.includes("\n")){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;e<o;e++)r+=t}return r}block(e,t){let r,n=this.raw(e,"between","beforeOpen");this.builder(t+n+"{",e,"start"),e.nodes&&e.nodes.length?(this.body(e),r=this.raw(e,"after")):r=this.raw(e,"after","emptyBody"),r&&this.builder(r),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&"comment"===e.nodes[t].type;)t-=1;let r=this.raw(e,"semicolon");for(let n=0;n<e.nodes.length;n++){let o=e.nodes[n],i=this.raw(o,"before");i&&this.builder(i),this.stringify(o,t!==n||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),n=e.prop+r+this.rawValue(e,"value");e.important&&(n+=e.raws.important||" !important"),t&&(n+=";"),this.builder(n,e)}document(e){this.body(e)}raw(e,r,n){let o;if(n||(n=r),r&&(o=e.raws[r],void 0!==o))return o;let i=e.parent;if("before"===n){if(!i||"root"===i.type&&i.first===e)return"";if(i&&"document"===i.type)return""}if(!i)return t[n];let a=e.root();if(a.rawCache||(a.rawCache={}),void 0!==a.rawCache[n])return a.rawCache[n];if("before"===n||"after"===n)return this.beforeAfter(e,n);{let t="raw"+((s=n)[0].toUpperCase()+s.slice(1));this[t]?o=this[t](a,e):a.walk((e=>{if(o=e.raws[r],void 0!==o)return!1}))}var s;return void 0===o&&(o=t[n]),a.rawCache[n]=o,o}rawBeforeClose(e){let t;return e.walk((e=>{if(e.nodes&&e.nodes.length>0&&void 0!==e.raws.after)return t=e.raws.after,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1})),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let r;return e.walkComments((e=>{if(void 0!==e.raws.before)return r=e.raws.before,r.includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1})),void 0===r?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,t){let r;return e.walkDecls((e=>{if(void 0!==e.raws.before)return r=e.raws.before,r.includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1})),void 0===r?r=this.raw(t,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let t;return e.walk((e=>{if("decl"!==e.type&&(t=e.raws.between,void 0!==t))return!1})),t}rawBeforeRule(e){let t;return e.walk((r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&void 0!==r.raws.before)return t=r.raws.before,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1})),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls((e=>{if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1})),t}rawEmptyBody(e){let t;return e.walk((e=>{if(e.nodes&&0===e.nodes.length&&(t=e.raws.after,void 0!==t))return!1})),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk((r=>{let n=r.parent;if(n&&n!==e&&n.parent&&n.parent===e&&void 0!==r.raws.before){let e=r.raws.before.split("\n");return t=e[e.length-1],t=t.replace(/\S/g,""),!1}})),t}rawSemicolon(e){let t;return e.walk((e=>{if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&(t=e.raws.semicolon,void 0!==t))return!1})),t}rawValue(e,t){let r=e[t],n=e.raws[t];return n&&n.value===r?n.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}}e.exports=r,r.default=r},406:(e,t,r)=>{"use strict";let n=r(1008);function o(e,t){new n(t).stringify(e)}e.exports=o,o.default=o},8123:e=>{"use strict";e.exports.isClean=Symbol("isClean"),e.exports.my=Symbol("my")},9464:e=>{"use strict";const t="'".charCodeAt(0),r='"'.charCodeAt(0),n="\\".charCodeAt(0),o="/".charCodeAt(0),i="\n".charCodeAt(0),a=" ".charCodeAt(0),s="\f".charCodeAt(0),l="\t".charCodeAt(0),c="\r".charCodeAt(0),u="[".charCodeAt(0),p="]".charCodeAt(0),d="(".charCodeAt(0),h=")".charCodeAt(0),f="{".charCodeAt(0),g="}".charCodeAt(0),_=";".charCodeAt(0),m="*".charCodeAt(0),v=":".charCodeAt(0),A="@".charCodeAt(0),y=/[\t\n\f\r "#'()/;[\\\]{}]/g,C=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,b=/.[\r\n"'(/\\]/,w=/[\da-f]/i;e.exports=function(e,x={}){let k,S,T,E,M,O,P,L,B,I,D=e.css.valueOf(),N=x.ignoreErrors,R=D.length,j=0,V=[],H=[];function q(t){throw e.error("Unclosed "+t,j)}return{back:function(e){H.push(e)},endOfFile:function(){return 0===H.length&&j>=R},nextToken:function(e){if(H.length)return H.pop();if(j>=R)return;let x=!!e&&e.ignoreUnclosed;switch(k=D.charCodeAt(j),k){case i:case a:case l:case c:case s:S=j;do{S+=1,k=D.charCodeAt(S)}while(k===a||k===i||k===l||k===c||k===s);I=["space",D.slice(j,S)],j=S-1;break;case u:case p:case f:case g:case v:case _:case h:{let e=String.fromCharCode(k);I=[e,e,j];break}case d:if(L=V.length?V.pop()[1]:"",B=D.charCodeAt(j+1),"url"===L&&B!==t&&B!==r&&B!==a&&B!==i&&B!==l&&B!==s&&B!==c){S=j;do{if(O=!1,S=D.indexOf(")",S+1),-1===S){if(N||x){S=j;break}q("bracket")}for(P=S;D.charCodeAt(P-1)===n;)P-=1,O=!O}while(O);I=["brackets",D.slice(j,S+1),j,S],j=S}else S=D.indexOf(")",j+1),E=D.slice(j,S+1),-1===S||b.test(E)?I=["(","(",j]:(I=["brackets",E,j,S],j=S);break;case t:case r:T=k===t?"'":'"',S=j;do{if(O=!1,S=D.indexOf(T,S+1),-1===S){if(N||x){S=j+1;break}q("string")}for(P=S;D.charCodeAt(P-1)===n;)P-=1,O=!O}while(O);I=["string",D.slice(j,S+1),j,S],j=S;break;case A:y.lastIndex=j+1,y.test(D),S=0===y.lastIndex?D.length-1:y.lastIndex-2,I=["at-word",D.slice(j,S+1),j,S],j=S;break;case n:for(S=j,M=!0;D.charCodeAt(S+1)===n;)S+=1,M=!M;if(k=D.charCodeAt(S+1),M&&k!==o&&k!==a&&k!==i&&k!==l&&k!==c&&k!==s&&(S+=1,w.test(D.charAt(S)))){for(;w.test(D.charAt(S+1));)S+=1;D.charCodeAt(S+1)===a&&(S+=1)}I=["word",D.slice(j,S+1),j,S],j=S;break;default:k===o&&D.charCodeAt(j+1)===m?(S=D.indexOf("*/",j+2)+1,0===S&&(N||x?S=D.length:q("comment")),I=["comment",D.slice(j,S+1),j,S],j=S):(C.lastIndex=j+1,C.test(D),S=0===C.lastIndex?D.length-1:C.lastIndex-2,I=["word",D.slice(j,S+1),j,S],V.push(I),j=S)}return j++,I},position:function(){return j}}}},1724:e=>{"use strict";let t={};e.exports=function(e){t[e]||(t[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))}},8007:e=>{"use strict";class t{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let e=t.node.rangeBy(t);this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column}for(let e in t)this[e]=t[e]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}e.exports=t,t.default=t},7538:(e,t,r)=>{var n=r(1892),o=r(6298);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);n(o,{insert:"head",singleton:!1}),e.exports=o.locals||{}},7998:(e,t,r)=>{var n=r(1892),o=r(2707);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);n(o,{insert:"head",singleton:!1}),e.exports=o.locals||{}},73:(e,t,r)=>{var n=r(1892),o=r(3861);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);n(o,{insert:"head",singleton:!1}),e.exports=o.locals||{}},3278:(e,t,r)=>{var n=r(1892),o=r(6469);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);n(o,{insert:"head",singleton:!1}),e.exports=o.locals||{}},9779:(e,t,r)=>{var n=r(1892),o=r(5726);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);n(o,{insert:"head",singleton:!1}),e.exports=o.locals||{}},8904:(e,t,r)=>{var n=r(1892),o=r(7813);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);n(o,{insert:"head",singleton:!1}),e.exports=o.locals||{}},3457:(e,t,r)=>{var n=r(1892),o=r(9042);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);n(o,{insert:"head",singleton:!1}),e.exports=o.locals||{}},1044:(e,t,r)=>{var n=r(1892),o=r(828);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);n(o,{insert:"head",singleton:!1}),e.exports=o.locals||{}},3930:(e,t,r)=>{var n=r(1892),o=r(9116);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);n(o,{insert:"head",singleton:!1}),e.exports=o.locals||{}},3364:(e,t,r)=>{var n=r(1892),o=r(6958);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);n(o,{insert:"head",singleton:!1}),e.exports=o.locals||{}},5318:(e,t,r)=>{var n=r(1892),o=r(3558);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);n(o,{insert:"head",singleton:!1}),e.exports=o.locals||{}},2484:(e,t,r)=>{var n=r(1892),o=r(5235);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);n(o,{insert:"head",singleton:!1}),e.exports=o.locals||{}},7863:(e,t,r)=>{var n=r(1892),o=r(7586);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);n(o,{insert:"head",singleton:!1}),e.exports=o.locals||{}},6513:(e,t,r)=>{var n=r(1892),o=r(7017);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);n(o,{insert:"head",singleton:!1}),e.exports=o.locals||{}},1892:(e,t,r)=>{"use strict";var n,o=function(){var e={};return function(t){if(void 0===e[t]){var r=document.querySelector(t);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(e){r=null}e[t]=r}return e[t]}}(),i=[];function a(e){for(var t=-1,r=0;r<i.length;r++)if(i[r].identifier===e){t=r;break}return t}function s(e,t){for(var r={},n=[],o=0;o<e.length;o++){var s=e[o],l=t.base?s[0]+t.base:s[0],c=r[l]||0,u="".concat(l," ").concat(c);r[l]=c+1;var p=a(u),d={css:s[1],media:s[2],sourceMap:s[3]};-1!==p?(i[p].references++,i[p].updater(d)):i.push({identifier:u,updater:g(d,t),references:1}),n.push(u)}return n}function l(e){var t=document.createElement("style"),n=e.attributes||{};if(void 0===n.nonce){var i=r.nc;i&&(n.nonce=i)}if(Object.keys(n).forEach((function(e){t.setAttribute(e,n[e])})),"function"==typeof e.insert)e.insert(t);else{var a=o(e.insert||"head");if(!a)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");a.appendChild(t)}return t}var c,u=(c=[],function(e,t){return c[e]=t,c.filter(Boolean).join("\n")});function p(e,t,r,n){var o=r?"":n.media?"@media ".concat(n.media," {").concat(n.css,"}"):n.css;if(e.styleSheet)e.styleSheet.cssText=u(t,o);else{var i=document.createTextNode(o),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(i,a[t]):e.appendChild(i)}}function d(e,t,r){var n=r.css,o=r.media,i=r.sourceMap;if(o?e.setAttribute("media",o):e.removeAttribute("media"),i&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}var h=null,f=0;function g(e,t){var r,n,o;if(t.singleton){var i=f++;r=h||(h=l(t)),n=p.bind(null,r,i,!1),o=p.bind(null,r,i,!0)}else r=l(t),n=d.bind(null,r,t),o=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(r)};return n(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;n(e=t)}else o()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=(void 0===n&&(n=Boolean(window&&document&&document.all&&!window.atob)),n));var r=s(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var n=0;n<r.length;n++){var o=a(r[n]);i[o].references--}for(var l=s(e,t),c=0;c<r.length;c++){var u=a(r[c]);0===i[u].references&&(i[u].updater(),i.splice(u,1))}r=l}}}},7390:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AttachPlaceholder=void 0;var n=r(4522),o=r(2052),i=r(1972),a=r(8904),s=o.ui.preacti18n.Text;t.AttachPlaceholder=function(e){var t=e.onAttach,r=e.onClose;return(0,n.h)("div",{className:a.attachPlaceholderContainer,"data-testid":"transcriptAttachPlaceholder"},(0,n.h)("div",{className:a.attachHeader},(0,n.h)("div",{className:a.attachHeaderTitle},(0,n.h)(s,{id:"transcript.transcript"},"Transcript")),(0,n.h)(i.Button,{type:i.ButtonType.borderless,size:i.ButtonSize.medium,icon:"close",onClick:r})),(0,n.h)("div",{className:a.attachContent},(0,n.h)("div",{className:a.attachText},(0,n.h)(s,{id:"transcript.attach_transcript_text"},"Transcript popped out")),(0,n.h)(i.Button,{type:i.ButtonType.primary,size:i.ButtonSize.medium,className:a.attachButton,onClick:t,testId:"transcriptAttachButton"},(0,n.h)(s,{id:"transcript.attach_transcript_button"},"Bring it back"))))}},8514:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(7390),t)},9320:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AutoscrollButton=void 0;var n=r(4522),o=r(3457),i=r(1972),a=KalturaPlayer.ui.preacti18n,s=a.withText,l=a.Text,c={autoScrollLabel:(0,n.h)(l,{id:"transcript.auto_scroll"},"Resume AutoScroll")};t.AutoscrollButton=s(c)((function(e){var t=e.onClick,r=e.isAutoScrollEnabled,a=e.setAutoscrollButtonRef,s=e.autoScrollLabel;return(0,n.h)("div",{className:o.autoscrollRoot,tabIndex:r?-1:1},(0,n.h)(i.Button,{onClick:t,setRef:a,className:"".concat(o.autoscrollButton," ").concat(r?"":o.autoscrollButtonVisible),type:i.ButtonType.primary,icon:"autoScroll",tooltip:{label:s,type:"left"},ariaLabel:s}))}))},7099:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(9320),t)},9291:function(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.CaptionList=void 0;var a=r(4522),s=r(3425),l=r(4539),c=r(6734),u=r(1044),p=KalturaPlayer.ui.utils.KeyMap,d=p.END,h=p.HOME,f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._currentCaptionRef=null,t._firstCaptionRef=null,t._lastCaptionRef=null,t._handleClick=function(e){return function(){(0,t.props.onSeek)(e)}},t._getShouldScroll=function(e){var r=t.props,n=r.isAutoScrollEnabled,o=r.highlightedMap;return n&&o[e]},t._getShouldScrollToSearchMatch=function(e){var r=t.props,n=r.isAutoScrollEnabled,o=r.searchMap,i=r.activeSearchIndex;return!n&&o[e]&&void 0!==o[e][i]},t._getSearchProps=function(e){var r=t.props,n=r.searchMap,o=r.activeSearchIndex,i=r.captionProps,a={};return n[e]&&(a.indexMap=n[e],a.activeSearchIndex=o,a.searchLength=i.searchLength),a},t._getCaptionProps=function(e){var r=t.props,n=r.highlightedMap,o=r.captionProps,a=r.isAutoScrollEnabled,s=e.id;return i({showTime:o.showTime,scrollTo:o.scrollTo,scrollToSearchMatch:o.scrollToSearchMatch,key:s,onClick:t._handleClick(e),caption:e,highlighted:n,longerThanHour:o.videoDuration>=l.HOUR,shouldScroll:t._getShouldScroll(s),shouldScrollToSearchMatch:t._getShouldScrollToSearchMatch(s),isAutoScrollEnabled:a,searchCaption:t.props.searchMap[e.id]},t._getSearchProps(s))},t._handleKeyUp=function(e){var r,n,o,i;e.keyCode===d?null===(n=null===(r=t._lastCaptionRef)||void 0===r?void 0:r._hotspotRef)||void 0===n||n.focus():e.keyCode===h&&(null===(i=null===(o=t._firstCaptionRef)||void 0===o?void 0:o._hotspotRef)||void 0===i||i.focus())},t}return o(t,e),t.prototype.shouldComponentUpdate=function(e){var t=this.props,r=t.highlightedMap,n=t.data,o=t.searchMap,i=t.activeSearchIndex,a=t.isAutoScrollEnabled,s=t.captionProps;return r!==e.highlightedMap||n!==e.data||o!==e.searchMap||i!==e.activeSearchIndex||a!==e.isAutoScrollEnabled||s.videoDuration!==e.captionProps.videoDuration},t.prototype.render=function(){var e=this,t=this.props.data,r=!1;return(0,a.h)("div",{className:u.transcriptWrapper,onKeyUp:this._handleKeyUp},t.map((function(n,o){var l=e._getCaptionProps(n);return(0,a.h)(s.ScreenReaderContext.Consumer,null,(function(s){return(0,a.h)(c.Caption,i({setTextToRead:s,ref:function(i){0===o?e._firstCaptionRef=i:o===t.length-1&&(e._lastCaptionRef=i),l.searchCaption&&Object.keys(l.searchCaption).forEach((function(t){parseInt(t)===e.props.activeSearchIndex&&(e._currentCaptionRef=i,r=!0)})),!r&&l.highlighted[n.id]&&(e._currentCaptionRef=i)}},l))}))})))},t}(a.Component);t.CaptionList=f},5271:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(9291),t)},5348:function(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)},a=this&&this.__decorate||function(e,t,r,n){var o,i=arguments.length,a=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,r,a):o(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a};Object.defineProperty(t,"__esModule",{value:!0}),t.Caption=void 0;var s=r(4522),l=r(979),c=r(4539),u=r(3930),p=r(2230),d=KalturaPlayer.ui.preacti18n,h=d.withText,f=d.Text,g=KalturaPlayer.ui.Event.withEventManager,_=KalturaPlayer.ui.components.withPlayer,m={captionLabel:(0,s.h)(f,{id:"transcript.caption_label"},"Jump to this point in video"),moveToSearch:(0,s.h)(f,{id:"transcript.move_to_search"},"Click to jump to search result")},v=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._captionRef=null,t._handleClick=function(){t._gotoCurrentTime()},t._gotoCurrentTime=function(){var e=t.props,r=e.caption,n=e.onClick;r.text.length&&n()},t._hasSearchMatch=function(){return!!t.props.indexMap&&Boolean(t.indexArray.find((function(e){return Number(e)===t.props.activeSearchIndex})))},t._renderText=function(e){var r=t.props,n=r.activeSearchIndex,o=r.searchLength,i=r.indexMap,a=t.indexArray;return 0===(null==e?void 0:e.length)?null:(0,s.h)("span",{className:u.captionSpan},i?a.map((function(t,r){var l=0===r?e.substring(0,i[t]):"",c=e.substring(i[t],i[t]+o),p=e.substring(i[t]+o,r-1===a.length?e.length:i[a[r+1]]);return(0,s.h)("span",null,l,(0,s.h)("span",{className:Number(t)===n?u.activeSearch:u.highlightSearch},c),p)})):e)},t}return o(t,e),Object.defineProperty(t.prototype,"indexArray",{get:function(){return this.props.indexMap?Object.keys(this.props.indexMap).sort((function(e,t){return Number(e)-Number(t)})):[]},enumerable:!1,configurable:!0}),t.prototype.componentDidUpdate=function(e){this._captionRef&&this.props.shouldScroll?this.props.scrollTo(this._captionRef):this._captionRef&&this.props.shouldScrollToSearchMatch&&this.props.scrollToSearchMatch(this._captionRef),this.props.indexMap&&e.activeSearchIndex!==this.props.activeSearchIndex&&this._hasSearchMatch()&&this.props.setTextToRead(this.props.caption.text)},t.prototype.componentDidMount=function(){var e=this,t=this.props,r=t.eventManager,n=t.player;null==r||r.listen(n,p.TranscriptEvents.TRANSCRIPT_TO_SEARCH_MATCH,(function(){var t;e._hasSearchMatch()&&(null===(t=e._captionRef)||void 0===t||t.focus())}))},t.prototype.shouldComponentUpdate=function(e){var t=this.props,r=t.indexMap,n=t.highlighted,o=t.isAutoScrollEnabled,i=t.activeSearchIndex;return t.longerThanHour!==e.longerThanHour||n!==e.highlighted||!(!n||o===e.isAutoScrollEnabled)||r!==e.indexMap||!(!r||!e.indexMap||r[i]===e.indexMap[e.activeSearchIndex])},t.prototype.render=function(){var e=this,t=this.props,r=t.caption,n=t.highlighted,o=t.showTime,a=t.longerThanHour,p=t.indexMap,d=t.captionLabel,h=t.moveToSearch,f=r.startTime,g=r.id,_=Object.keys(n).some((function(e){return e===g})),m=o?(0,c.secondsToTime)(f,a):"",v={ariaCurrent:_,tabIndex:0,ariaLabel:"".concat(m).concat(o?" ":"").concat(r.text," ").concat(p?h:d),role:"button"};return(0,s.h)(l.A11yWrapper,{onClick:this._handleClick},(0,s.h)("div",i({className:u.caption,ref:function(t){e._captionRef=t}},v),o&&(0,s.h)("div",{className:u.captionTime,"aria-hidden":"true"},m),(0,s.h)("div",{"aria-hidden":"true",className:"".concat(u.captionContent," ").concat(_?u.highlighted:""," ").concat(o?"":u.withoutTime)},this._renderText(r.text))))},a([h(m),g,_],t)}(s.Component);t.Caption=v},6734:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(5348),t)},1293:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.icons=void 0,(r=t.icons||(t.icons={})).PLUGIN_ICON="M23.1111111,19 C23.6020309,19 24,19.4477153 24,20 C24,20.5522847 23.6020309,21 23.1111111,21 L8.88888889,21 C8.39796911,21 8,20.5522847 8,20 C8,19.4477153 8.39796911,19 8.88888889,19 L23.1111111,19 Z M24.8695652,3 C26.5984566,3 28,4.24720677 28,5.78571429 L28,26.2142857 C28,27.7527932 26.5984566,29 24.8695652,29 L7.13043478,29 C5.40154339,29 4,27.7527932 4,26.2142857 L4,5.78571429 C4,4.24720677 5.40154339,3 7.13043478,3 L24.8695652,3 Z M26,17 L6,17 L6,26.0833333 C6,26.5895944 6.47127921,27 7.05263158,27 L24.9473684,27 C25.5287208,27 26,26.5895944 26,26.0833333 L26,17 Z M8.88888889,23 L23.1111111,23 C23.6020309,23 24,23.4477153 24,24 C24,24.5128358 23.6568532,24.9355072 23.2147743,24.9932723 L23.1111111,25 L8.88888889,25 C8.39796911,25 8,24.5522847 8,24 C8,23.4871642 8.34314684,23.0644928 8.78522567,23.0067277 L8.88888889,23 L23.1111111,23 L8.88888889,23 Z M24.9473684,5 L7.05263158,5 C6.47127921,5 6,5.41040565 6,5.91666667 L6,15 L26,15 L26,5.91666667 C26,5.41040565 25.5287208,5 24.9473684,5 Z",r.BigSize=32,r.MediumSize=24,r.SmallSize=16},2351:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PluginButton=void 0;var n=r(4522),o=r(3364),i=r(2052),a=r(1293),s=KalturaPlayer.ui.components,l=s.Tooltip,c=s.Icon;t.PluginButton=function(e){var t=e.isActive,r=e.label,s=e.id,u=e.icon,p=e.dataTestId,d=e.setRef;return(0,n.h)(l,{label:r,type:"bottom"},(0,n.h)("button",{ref:function(e){d&&d(e)},type:"button","aria-label":r,className:[i.ui.style.upperBarIcon,o.pluginButton,t?o.active:""].join(" "),"data-testid":p},(0,n.h)(c,{id:s,height:a.icons.BigSize,width:a.icons.BigSize,viewBox:"0 0 ".concat(a.icons.BigSize," ").concat(a.icons.BigSize),path:u,hidden:"true"})))},t.PluginButton.defaultProps={dataTestId:"transcript_pluginButton"}},8909:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PopoverMenu=void 0;var n=r(1664);Object.defineProperty(t,"PopoverMenu",{enumerable:!0,get:function(){return n.PopoverMenu}})},1664:function(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)},a=this&&this.__decorate||function(e,t,r,n){var o,i=arguments.length,a=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,r,a):o(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a};Object.defineProperty(t,"__esModule",{value:!0}),t.PopoverMenu=void 0;var s=r(979),l=r(4522),c=KalturaPlayer.ui.components.Tooltip,u=KalturaPlayer.ui.preacti18n,p=u.withText,d=u.Text,h=KalturaPlayer.ui.Event.withEventManager,f=KalturaPlayer.ui.utils.KeyMap.TAB,g=r(5318),_={moreOptionsLabel:(0,l.h)(d,{id:"transcript.more_options"},"More transcript options")},m=function(e){function t(t){var r,n,o=this;return(o=e.call(this,t)||this)._controlElementRef=null,o._popoverElementRef=null,o._itemsRefMap=new Map,o.handleMouseEvent=function(e){var t;(null===(t=o._controlElementRef)||void 0===t?void 0:t.contains(e.target))||o.closePopover()},o.handleKeydownEvent=function(e){var t,r,n=e.target;!o.state.isOpen||e.keyCode!==f||(null===(t=o._controlElementRef)||void 0===t?void 0:t.contains(n))||(null===(r=o._popoverElementRef)||void 0===r?void 0:r.contains(n))||n===o._controlElementRef||o.closePopover()},o._handleUpKeyPressed=function(e){return function(){var t;null===(t=o._getItemRef(e-1))||void 0===t||t.focus()}},o._handleDownKeyPressed=function(e){return function(){var t;null===(t=o._getItemRef(e+1))||void 0===t||t.focus()}},o.togglePopover=function(){var e=!o.state.isOpen;o.setState({isOpen:e},(function(){var t,r;e&&(null===(t=o._controlElementRef)||void 0===t||t.focus(),null===(r=o.props.eventManager)||void 0===r||r.listen(o._controlElementRef,"keydown",(function(e){var t;if(e.keyCode===f){var r=o.props.items.findIndex((function(e){return!e.isDisabled}));-1!==r&&(null===(t=o._getItemRef(r-1))||void 0===t||t.focus())}})))}))},o._getItemRef=function(e){return o._itemsRefMap.get(e)},o._setItemRef=function(e,t){return o._itemsRefMap.set(e,t)},o.state={isOpen:!1},null===(r=o.props.eventManager)||void 0===r||r.listen(document,"click",o.handleMouseEvent),null===(n=o.props.eventManager)||void 0===n||n.listen(document,"keydown",o.handleKeydownEvent),o}return o(t,e),t.prototype.componentWillUnmount=function(){this._itemsRefMap=new Map},t.prototype.closePopover=function(){this.setState({isOpen:!1})},t.prototype.render=function(){var e=this,t=this.props,r=t.children,n=t.items,o=t.kitchenSinkDetached,a=(0,l.h)("div",{className:g.popoverContainer},(0,l.h)(s.A11yWrapper,{onClick:function(t){t.stopPropagation(),e.togglePopover()}},(0,l.h)("div",{tabIndex:0,"data-testid":"popover-anchor-container",className:"".concat(g.popoverAnchorContainer," ").concat(this.state.isOpen?g.active:""),"aria-expanded":this.state.isOpen,"aria-controls":"popoverContent",ref:function(t){t&&(e._controlElementRef=t)}},(0,l.h)("div",{className:g.popoverAnchor},r))),(0,l.h)("div",{className:g.popoverComponent,role:"menu","aria-expanded":this.state.isOpen,id:"popoverContent",ref:function(t){e._popoverElementRef=t}},this.state.isOpen?n.map((function(t,r){var n=t.label,o=t.onClick,i=t.testId,a=t.isDisabled;return(0,l.h)(s.A11yWrapper,{role:"menuitem",onClick:function(){a||(e.closePopover(),o())},onDownKeyPressed:function(){a||e._handleDownKeyPressed(r)},onUpKeyPressed:function(){a||e._handleUpKeyPressed(r)}},(0,l.h)("div",{tabIndex:a?-1:0,role:"menuitem",className:"".concat(g.popoverMenuItem," ").concat(a?g.popoverMenuItemDisabled:""),"data-testid":i,ref:function(t){e._setItemRef(r,t)}},n))})):null));return this.state.isOpen?a:(0,l.h)("div",null,(0,l.h)(c,i({label:this.props.moreOptionsLabel},o?{type:"bottom-left",strictPosition:!0}:{}),a))},a([p(_),h],t)}(l.Component);t.PopoverMenu=m},3517:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(8372),t)},8372:function(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.Search=void 0;var i=r(4522),a=r(178),s=KalturaPlayer.ui.preacti18n,l=s.withText,c=s.Text,u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._inputField=null,t}return o(t,e),t.prototype.shouldComponentUpdate=function(e){var t=this.props,r=t.value,n=t.activeSearchIndex,o=t.totalSearchResults,i=t.kitchenSinkActive;return r!==e.value||n!==e.activeSearchIndex||o!==e.totalSearchResults||i!==e.kitchenSinkActive},t.prototype.componentDidUpdate=function(e){var t,r=this.props,n=r.kitchenSinkActive,o=r.toggledWithEnter;!e.kitchenSinkActive&&n&&o&&(null===(t=this._inputField)||void 0===t||t.setFocus({preventScroll:!0}))},t.prototype.render=function(){var e=this,t=this.props,r=t.value,n=t.totalSearchResults,o=t.activeSearchIndex,s=t.onChange,l=t.onSearchIndexChange;return(0,i.h)(a.InputField,{ref:function(t){e._inputField=t},value:r,onChange:s,placeholder:this.props.searchLabel,clearSearchLabel:this.props.clearSearchLabel,searchResults:{activeSearchIndex:o,totalSearchResults:n,onSearchIndexChange:l,nextMatchLabel:this.props.nextMatchLabel,prevMatchLabel:this.props.prevMatchLabel,searchResultsLabel:this.props.searchResultsLabel}})},t}(i.Component);t.Search=l((function(e){var t=e.activeSearchIndex,r=e.totalSearchResults;return{searchLabel:(0,i.h)(c,{id:"transcript.search"},"Search in Transcript"),clearSearchLabel:(0,i.h)(c,{id:"transcript.clear_search"},"Clear search"),nextMatchLabel:(0,i.h)(c,{id:"transcript.next_search_match"},"Next search result"),prevMatchLabel:(0,i.h)(c,{id:"transcript.prev_search_match"},"Previous search result"),searchResultsLabel:(0,i.h)(c,{id:"transcript.search_results",fields:{current:r>0?t:0,total:r}},"Search result ".concat(r>0?t:0," out of ").concat(r))}}))(u)},7123:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(4142),t)},4142:function(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=this&&this.__decorate||function(e,t,r,n){var o,i=arguments.length,a=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,r,a):o(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a};Object.defineProperty(t,"__esModule",{value:!0}),t.SmallScreenSlate=void 0;var a=r(4522),s=r(1972),l=r(4820),c=r(2052),u=c.ui.Components.withPlayer,p=c.ui.redux.connect,d=c.ui.preacti18n,h=d.withText,f=d.Text,g=r(2484),_=function(e){return{isMobile:e.shell.isMobile}},m={smallScreenText:(0,a.h)(f,{id:"transcript.small_screen"},"To see the transcript, go to full screen"),smallScreenMobileText:(0,a.h)(f,{id:"transcript.small_screen_mobile"},"To see the transcript, rotate the phone"),hideTranscript:(0,a.h)(f,{id:"transcript.hide_plugin"},"Hide Transcript")},v=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.render=function(){var e=this.props,t=e.isMobile,r=e.smallScreenMobileText,n=e.smallScreenText,o=e.onClose,i=e.toggledWithEnter,c=e.player,u=e.hideTranscript;return(0,a.h)("div",{className:g.smallScreenWrapper,"data-testid":"transcript_smallScreenWrapper"},(0,a.h)(s.Button,{icon:"close",onClick:o,type:s.ButtonType.borderless,focusOnMount:i,className:g.closeButton,ariaLabel:u,testId:"transcript_smallScreenClose"}),(0,a.h)("div",{className:g.contentWrapper},t?(0,a.h)(l.Icon,{name:"screenRotation",size:l.IconSize.large}):(0,a.h)(s.Button,{icon:"expand",onClick:function(){return null==c?void 0:c.enterFullscreen()},type:s.ButtonType.borderless,size:s.ButtonSize.medium,ariaLabel:n,testId:"transcript_smallScreenFullscreen"}),(0,a.h)("div",{className:g.textContent,"data-testid":"transcript_smallScreenTextContent"},t?r:n)))},i([h(m),u,p(_)],t)}(a.Component);t.SmallScreenSlate=v},1797:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(4350),t)},4350:function(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.Spinner=void 0;var i=r(4522),a=r(7863),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.render=function(){return(0,i.h)("div",{className:a.transcriptLoader},Array.apply(null,Array(20)).map((function(e,t){return(0,i.h)("svg",{key:t,width:"100%",height:"50",viewBox:"0 0 100% 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,i.h)("rect",{x:"16",y:"8",width:"90%",height:"12",rx:"4",fill:"white"}),(0,i.h)("rect",{x:"16",y:"30",width:"60%",height:"12",rx:"4",fill:"white"}))})))},t}(i.Component);t.Spinner=s},244:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TranscriptMenu=void 0;var n=r(6209);Object.defineProperty(t,"TranscriptMenu",{enumerable:!0,get:function(){return n.TranscriptMenu}})},6209:function(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=this&&this.__decorate||function(e,t,r,n){var o,i=arguments.length,a=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,r,a):o(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a};Object.defineProperty(t,"__esModule",{value:!0}),t.TranscriptMenu=void 0;var a=r(4522),s=r(8909),l=r(1972),c=KalturaPlayer.ui.preacti18n,u=c.withText,p=c.Text,d={printTranscript:(0,a.h)(p,{id:"transcript.print_transcript"},"Print current transcript"),downloadTranscript:(0,a.h)(p,{id:"transcript.download_transcript"},"Download current transcript"),moreOptionsLabel:(0,a.h)(p,{id:"transcript.more_options"},"More transcript options")},h=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.render=function(){var e=this.props,t=e.downloadDisabled,r=e.onDownload,n=e.printDisabled,o=e.onPrint,i=e.printTranscript,c=e.downloadTranscript,u=e.isLoading,p=e.detachMenuItem,d=e.kitchenSinkDetached,h=[];return p&&h.push(p),t||h.push({testId:"download-menu-item",label:c,onClick:r,isDisabled:u}),n||h.push({testId:"print-menu-item",label:i,onClick:o,isDisabled:u}),h.length?(0,a.h)(s.PopoverMenu,{items:h,kitchenSinkDetached:d},(0,a.h)(l.Button,{type:l.ButtonType.borderless,icon:"more",tabIndex:-1,ariaLabel:this.props.moreOptionsLabel})):null},i([u(d)],t)}(a.Component);t.TranscriptMenu=h},536:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorIcon=void 0;var n=r(4522);t.ErrorIcon=function(){return(0,n.h)("svg",{width:"184px",height:"184px",viewBox:"0 0 184 184",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},(0,n.h)("g",{id:"IL/-Error",stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},(0,n.h)("circle",{id:"Oval",fill:"#333333",cx:"92",cy:"92",r:"92"}),(0,n.h)("path",{d:"M86.8445942,41 C98.1281098,41 107.894768,46.3707345 112.610486,54.1896075 L112.772795,54.4651697 C121.905986,54.9935965 129.089492,60.510023 129.089492,67.2372881 C129.089492,67.4828605 129.07992,67.7268193 129.06103,67.9689809 C143.527428,69.1244669 154.803778,78.4637688 154.803778,89.8135593 C154.803778,101.945102 141.920543,111.779661 126.028268,111.779661 C122.218304,111.779661 118.581281,111.214432 115.253251,110.187831 C110.482744,111.936312 104.172429,113 97.2527575,113 C90.6076765,113 84.5245506,112.019057 79.8270144,110.392971 C76.2815407,111.290993 72.4601472,111.779661 68.4772473,111.779661 C49.8799037,111.779661 34.8037779,101.125556 34.8037779,87.9830508 C34.8037779,77.4055553 44.569383,68.439928 58.0766538,65.3432099 C58.0715743,65.1615713 58.069084,64.9793312 58.069084,64.7966102 C58.069084,51.6541053 70.9523188,41 86.8445942,41 Z",id:"Combined-Shape",fill:"#1A7080"}),(0,n.h)("path",{d:"M83.1492849,135.070223 C82.1325765,138.189187 86.1421275,140.443183 88.278329,137.95355 L112.039401,110.261242 C113.708897,108.315531 112.326427,105.307692 109.76264,105.307692 L102.55417,105.307692 L108.530391,92.2483573 C109.439682,90.2613598 107.987631,88 105.802461,88 L90.6745782,88 C89.4360625,88 88.3248534,88.7610908 87.8773011,89.9159147 L79.0065008,112.805338 C78.2445332,114.771451 79.6951774,116.889423 81.8037779,116.889423 L89.0757959,116.889423 L83.1492849,135.070223 Z",id:"Path-8",fill:"#333333","fill-rule":"nonzero"}),(0,n.h)("polygon",{id:"Path-8",fill:"#999999",points:"90.6745782 91 81.8037779 113.889423 93.2090926 113.889423 86.0015674 136 109.76264 108.307692 97.8821035 108.307692 105.802461 91"}),(0,n.h)("polygon",{id:"Path-8",fill:"#01ACCD",opacity:"0.5",points:"90.6745782 91 81.8037779 113.889423 93.2090926 113.889423 86.0015674 136 109.76264 108.307692 97.8821035 108.307692 105.802461 91"}),(0,n.h)("path",{d:"M86.9135883,41 C90.3885178,41 93.7197752,41.5049061 96.8044095,42.4302153 C80.0521708,44.2102049 67.0736479,56.714855 67.0736479,71.8761372 C67.0736479,72.1038764 67.0765763,72.331016 67.0824019,72.557529 C51.5088979,76.3414085 40.1641521,87.1546035 39.7216459,99.9991784 C36.6015945,96.4151247 34.8037779,92.202078 34.8037779,87.6945045 C34.8037779,77.1820037 44.5822685,68.2714617 58.1073807,65.1937351 C58.1024214,65.013137 58.0999284,64.8320391 58.0999284,64.6504633 C58.0999284,51.5886731 71.0002433,41 86.9135883,41 Z",id:"Combined-Shape",fill:"#222222",opacity:"0.3"}),(0,n.h)("path",{d:"M90.8028945,22 L90.8028945,29.0476864 C90.8028945,29.5999712 91.2506097,30.0476864 91.8028945,30.0476864 C92.3551792,30.0476864 92.8028945,29.5999712 92.8028945,29.0476864 L92.8028945,22 C92.8028945,21.4477153 92.3551792,21 91.8028945,21 C91.2506097,21 90.8028945,21.4477153 90.8028945,22 Z M126.112197,30.8515352 L121.582032,36.2503762 C121.22703,36.6734508 121.282214,37.3042064 121.705288,37.6592082 C122.128363,38.01421 122.759119,37.9590261 123.114121,37.5359514 L127.644286,32.1371104 C127.999288,31.7140357 127.944104,31.0832801 127.521029,30.7282783 C127.097955,30.3732765 126.467199,30.4284605 126.112197,30.8515352 Z M152.431974,58.6783398 L145.491357,59.9021577 C144.947463,59.9980609 144.584295,60.5167193 144.680198,61.0606136 C144.776101,61.6045079 145.294759,61.9676764 145.838654,61.8717732 L152.77927,60.6479553 C153.323164,60.552052 153.686333,60.0333936 153.59043,59.4894993 C153.494526,58.945605 152.975868,58.5824365 152.431974,58.6783398 Z M30.826519,60.6479553 L37.7671352,61.8717732 C38.3110295,61.9676764 38.8296879,61.6045079 38.9255912,61.0606136 C39.0214944,60.5167193 38.6583259,59.9980609 38.1144316,59.9021577 L31.1738154,58.6783398 C30.6299211,58.5824365 30.1112627,58.945605 30.0153594,59.4894993 C29.9194562,60.0333936 30.2826247,60.552052 30.826519,60.6479553 Z M55.9615029,32.1371104 L60.4916684,37.5359514 C60.8466702,37.9590261 61.4774258,38.01421 61.9005005,37.6592082 C62.3235751,37.3042064 62.3787591,36.6734508 62.0237573,36.2503762 L57.4935918,30.8515352 C57.13859,30.4284605 56.5078344,30.3732765 56.0847597,30.7282783 C55.6616851,31.0832801 55.6065011,31.7140357 55.9615029,32.1371104 Z",id:"Path-9",fill:"#01ACCD","fill-rule":"nonzero",opacity:"0.5"}),(0,n.h)("g",{id:"Oval-Copy-5",opacity:"0.3",transform:"translate(80.000000, 166.000000)",fill:"#01ACCD"},(0,n.h)("path",{d:"M3.3015873,6.64864865 C5.12500362,6.64864865 6.6031746,5.16029795 6.6031746,3.32432432 C6.6031746,1.4883507 5.12500362,-5.32907052e-15 3.3015873,-5.32907052e-15 C1.47817098,-5.32907052e-15 1.07647224e-12,1.4883507 1.07647224e-12,3.32432432 C1.07647224e-12,5.16029795 1.47817098,6.64864865 3.3015873,6.64864865 Z M3.3015873,4.64864865 C2.5858248,4.64864865 2,4.05878945 2,3.32432432 C2,2.5898592 2.5858248,2 3.3015873,2 C4.0173498,2 4.6031746,2.5898592 4.6031746,3.32432432 C4.6031746,4.05878945 4.0173498,4.64864865 3.3015873,4.64864865 Z",id:"Oval-Copy-3"})),(0,n.h)("g",{id:"Path-Copy-4",opacity:"0.9",transform:"translate(100.000000, 146.000000)",fill:"#01ACCD"},(0,n.h)("polygon",{id:"Path-Copy-2",points:"5.5 2.5 8 2.5 8 5.5 5.5 5.5 5.5 8 2.5 8 2.5 5.5 0 5.5 0 2.5 2.5 2.5 2.5 0 5.5 0"})),(0,n.h)("g",{id:"Oval-2",opacity:"0.5",transform:"translate(39.000000, 115.000000)",fill:"#01ACCD"},(0,n.h)("path",{d:"M3.3015873,6.64864865 C5.12500362,6.64864865 6.6031746,5.16029795 6.6031746,3.32432432 C6.6031746,1.4883507 5.12500362,0 3.3015873,0 C1.47817098,0 1.08002496e-12,1.4883507 1.08002496e-12,3.32432432 C1.08002496e-12,5.16029795 1.47817098,6.64864865 3.3015873,6.64864865 Z M3.3015873,4.64864865 C2.5858248,4.64864865 2,4.05878945 2,3.32432432 C2,2.5898592 2.5858248,2 3.3015873,2 C4.0173498,2 4.6031746,2.5898592 4.6031746,3.32432432 C4.6031746,4.05878945 4.0173498,4.64864865 3.3015873,4.64864865 Z",id:"Oval"})),(0,n.h)("g",{id:"Oval-Copy-4",opacity:"0.8",transform:"translate(60.000000, 139.000000)",fill:"#01ACCD"},(0,n.h)("path",{d:"M3.3015873,6.64864865 C5.12500362,6.64864865 6.6031746,5.16029795 6.6031746,3.32432432 C6.6031746,1.4883507 5.12500362,1.42108547e-14 3.3015873,1.42108547e-14 C1.47817098,1.42108547e-14 1.08002496e-12,1.4883507 1.08002496e-12,3.32432432 C1.08002496e-12,5.16029795 1.47817098,6.64864865 3.3015873,6.64864865 Z M3.3015873,4.64864865 C2.5858248,4.64864865 2,4.05878945 2,3.32432432 C2,2.5898592 2.5858248,2 3.3015873,2 C4.0173498,2 4.6031746,2.5898592 4.6031746,3.32432432 C4.6031746,4.05878945 4.0173498,4.64864865 3.3015873,4.64864865 Z",id:"Oval-Copy"})),(0,n.h)("g",{id:"Path-Copy-3",opacity:"0.3",transform:"translate(31.000000, 142.000000)",fill:"#01ACCD"},(0,n.h)("polygon",{id:"Path-Copy",points:"5.5 2.5 8 2.5 8 5.5 5.5 5.5 5.5 8 2.5 8 2.5 5.5 0 5.5 0 2.5 2.5 2.5 2.5 0 5.5 0"})),(0,n.h)("g",{id:"Oval-Copy-6",opacity:"0.6",transform:"translate(139.000000, 139.000000)",fill:"#01ACCD"},(0,n.h)("path",{d:"M3.3015873,6.64864865 C5.12500362,6.64864865 6.6031746,5.16029795 6.6031746,3.32432432 C6.6031746,1.4883507 5.12500362,0 3.3015873,0 C1.47817098,0 1.08713039e-12,1.4883507 1.08713039e-12,3.32432432 C1.08713039e-12,5.16029795 1.47817098,6.64864865 3.3015873,6.64864865 Z M3.3015873,4.64864865 C2.5858248,4.64864865 2,4.05878945 2,3.32432432 C2,2.5898592 2.5858248,2 3.3015873,2 C4.0173498,2 4.6031746,2.5898592 4.6031746,3.32432432 C4.6031746,4.05878945 4.0173498,4.64864865 3.3015873,4.64864865 Z",id:"Oval-Copy-2"})),(0,n.h)("g",{id:"Path-2",opacity:"0.4",transform:"translate(122.000000, 122.000000)",fill:"#01ACCD"},(0,n.h)("polygon",{id:"Path",points:"5.5 2.5 8 2.5 8 5.5 5.5 5.5 5.5 8 2.5 8 2.5 5.5 0 5.5 0 2.5 2.5 2.5 2.5 0 5.5 0"}))))}},9754:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(464),t)},464:function(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)},a=this&&this.__decorate||function(e,t,r,n){var o,i=arguments.length,a=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,r,a):o(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a};Object.defineProperty(t,"__esModule",{value:!0}),t.Transcript=void 0;var s=r(4522),l=r(2052),c=r(4539),u=r(6513),p=r(1797),d=r(3517),h=r(5271),f=r(536),g=r(7099),_=r(244),m=r(7123),v=r(1972),A=r(3425),y=r(2230),C=l.ui.utils.KeyMap,b=C.ENTER,w=C.SPACE,x=C.TAB,k=l.ui.preacti18n,S=k.withText,T=k.Text,E=l.ui.SidePanelModes,M=l.ui.Components.PLAYER_BREAK_POINTS,O=l.ui.redux.connect,P={skipTranscript:(0,s.h)(T,{id:"transcript.skip_transcript"},"Skip transcript"),errorTitle:(0,s.h)(T,{id:"transcript.whoops"},"Whoops!"),errorDescripton:(0,s.h)(T,{id:"transcript.load_failed"},"Failed to load transcript"),attachTranscript:(0,s.h)(T,{id:"transcript.attach_transcript"},"Bring Transcript back"),detachTranscript:(0,s.h)(T,{id:"transcript.detach_transcript"},"Popout transcript"),toSearchResult:(0,s.h)(T,{id:"transcript.to_search_result"},"Go to result")},L={search:"",activeSearchIndex:1,searchMap:{},totalSearchResults:0,searchLength:0},B=38,I=function(e,t){var r,n;return{smallScreen:t.expandMode===E.ALONGSIDE&&(null===(r=e.shell.playerClientRect)||void 0===r?void 0:r.width)<=M.TINY,isMobile:e.shell.isMobile,playerWidth:null===(n=e.shell.playerClientRect)||void 0===n?void 0:n.width}},D=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._transcriptListRef=null,t._captionListRef=null,t._skipTranscriptButtonRef=null,t._autoscrollButtonRef=null,t._preventScrollEvent=!1,t._scrollToSearchMatchEnabled=!1,t._widgetRootRef=null,t._widgetHeight=0,t._topAutoscrollEdge=0,t._bottomAutoscrollEdge=0,t._thirdOfWidgetHeight=0,t._resizeObserver=null,t.state=i({isAutoScrollEnabled:!0,widgetWidth:0},L),t._enableAutoScroll=function(e,r){var n;e.preventDefault(),t.state.isAutoScrollEnabled||(t._preventScrollEvent=!0,t.setState({isAutoScrollEnabled:!0}),r&&(null===(n=t._skipTranscriptButtonRef)||void 0===n||n.focus()))},t._renderScrollToButton=function(){var e=t.state.isAutoScrollEnabled;return(0,s.h)(g.AutoscrollButton,{setAutoscrollButtonRef:function(e){t._autoscrollButtonRef=e},isAutoScrollEnabled:e,onClick:t._enableAutoScroll})},t._renderDetachButton=function(){var e=t.props,r=e.onAttach,n=e.onDetach,o=e.attachTranscript,a=e.detachTranscript,l=e.kitchenSinkDetached;return e.isMobile?null:(0,s.h)("div",{"data-testid":"transcriptDetachAttachButton"},(0,s.h)(v.Button,{type:v.ButtonType.borderless,size:v.ButtonSize.medium,onClick:l?r:n,icon:l?"attach":"detach",ariaLabel:l?o:a,tooltip:i({label:l?o:a},l?{type:"bottom-left",strictPosition:l}:{})}))},t._onSearch=function(e){t.setState({search:e})},t._findSearchMatches=function(){t.setState((function(e){if(!e.search)return i({},L);var r=0,n=e.search.toLowerCase(),o={};return t.props.captions.forEach((function(e){for(var t,a,s=(null===(t=null==e?void 0:e.text)||void 0===t?void 0:t.toLowerCase())||"",l=new RegExp(n,"gi"),c=[];a=l.exec(s);)c.push(a.index);c.forEach((function(t){var n;r++,o[e.id]=i(i({},o[e.id]),((n={})[r]=t,n))}))})),t._debounced.searchEventDispatcher(e),{searchMap:o,totalSearchResults:r,activeSearchIndex:1,searchLength:n.length}}))},t._dispatchSearchEvent=function(e){t.props.dispatcher(y.TranscriptEvents.TRANSCRIPT_SEARCH,{search:t.state.search})},t._setActiveSearchIndex=function(e){t._scrollToSearchMatchEnabled=!0,t.setState({activeSearchIndex:e,isAutoScrollEnabled:!1}),t.props.dispatcher(y.TranscriptEvents.TRANSCRIPT_NAVIGATE_RESULT,{index:e})},t._getHeaderStyles=function(){var e=t.state.widgetWidth;return e>=692?"":e>=649?u.mediumWidth:u.smallWidth},t._renderJumpToSearchButton=function(){var e=t.props,r=e.toSearchResult,n=e.onJumpToSearchMatch,o=t.state,i=o.search,a=o.activeSearchIndex,l=o.totalSearchResults;return i&&0!==l&&0!==a?(0,s.h)(v.Button,{type:v.ButtonType.secondary,className:u.toSearchButton,onClick:n,ariaLabel:r,testId:"transcript_jumpToSearchMatch"},r):null},t._renderHeader=function(){var e=t.props,r=e.toggledWithEnter,n=e.kitchenSinkActive,o=e.kitchenSinkDetached,a=e.downloadDisabled,l=e.onDownload,c=e.printDisabled,p=e.onPrint,h=e.isLoading,f=e.attachTranscript,g=e.detachTranscript,m=e.onAttach,A=e.onDetach,y=t.state,C=y.search,b=y.activeSearchIndex,w=y.totalSearchResults,x=null;return t.state.widgetWidth<=240&&!o&&(x={label:o?f:g,onClick:o?m:A,testId:"transcript-detach-attach-button",disabled:h}),(0,s.h)("div",{className:[u.header,t._getHeaderStyles()].join(" "),"data-testid":"transcript_header"},(0,s.h)(d.Search,{onChange:t._onSearch,onSearchIndexChange:t._debounced.onActiveSearchIndexChange,value:C,activeSearchIndex:b,totalSearchResults:w,toggledWithEnter:r,kitchenSinkActive:n}),t._renderJumpToSearchButton(),(0,s.h)(_.TranscriptMenu,i({},{downloadDisabled:a,onDownload:l,printDisabled:c,onPrint:p,isLoading:h,detachMenuItem:x,kitchenSinkDetached:o})),!x&&t._renderDetachButton(),!o&&(0,s.h)("div",{"data-testid":"transcriptCloseButton"},(0,s.h)(v.Button,{type:v.ButtonType.borderless,size:v.ButtonSize.medium,disabled:!1,onClick:t.props.onClose,ariaLabel:"Hide Transcript",tooltip:{label:"Hide Transcript"},icon:"close"})))},t._handleClick=function(e){var r;e.preventDefault(),null===(r=t._autoscrollButtonRef)||void 0===r||r.focus()},t._handleKeyDown=function(e){var r,n;if(e.keyCode!==x||e.shiftKey)e.keyCode!==b&&e.keyCode!==w||t._handleClick(e);else{t.setState({isAutoScrollEnabled:!1});var o=null===(n=null===(r=t._captionListRef)||void 0===r?void 0:r._currentCaptionRef)||void 0===n?void 0:n._hotspotRef;o&&(e.preventDefault(),o.focus())}},t._renderSkipTranscriptButton=function(){return(0,s.h)("div",{role:"button",ref:function(e){t._skipTranscriptButtonRef=e},"data-testid":"transcript_skipButton",className:u.skipTranscriptButton,onKeyDown:t._handleKeyDown,onClick:t._handleClick,tabIndex:0},t.props.skipTranscript)},t._renderTranscript=function(){var e=t.props,r=e.captions,n=e.hasError,o=(e.onRetryLoad,e.showTime),i=e.videoDuration,a=e.highlightedMap,l=t.state,c=l.isAutoScrollEnabled,p=l.searchMap,d=l.activeSearchIndex,g=l.searchLength;if(n)return(0,s.h)("div",{className:u.errorWrapper},(0,s.h)("div",{className:u.errorIcon},(0,s.h)(f.ErrorIcon,null)),(0,s.h)("p",{className:u.errorMainText},t.props.errorTitle),(0,s.h)("p",{className:u.errorDescriptionText},t.props.errorDescripton));if(!r||!r.length)return null;var _={showTime:o,searchLength:g,scrollTo:t._scrollTo,scrollToSearchMatch:t._scrollToSearchMatch,videoDuration:i};return(0,s.h)(h.CaptionList,{ref:function(e){t._captionListRef=e},highlightedMap:a,data:r,onSeek:t._handleSeek,isAutoScrollEnabled:c,searchMap:p,activeSearchIndex:d,captionProps:_,onScroll:t._onScroll,widgetWidth:t.state.widgetWidth,showItemsIcons:!0,searchActive:!1})},t._setWidgetSize=function(){if(t._widgetRootRef){var e=t._widgetRootRef.getBoundingClientRect(),r=e.width,n=e.height;e.top,t.state.widgetWidth!==r&&t.setState({widgetWidth:r}),t._widgetHeight!==n&&(t._widgetHeight=n,t._thirdOfWidgetHeight=n/3,t._topAutoscrollEdge=Math.floor(t._thirdOfWidgetHeight+B),t._bottomAutoscrollEdge=Math.ceil(2*t._thirdOfWidgetHeight+B))}},t._renderLoading=function(){return(0,s.h)(p.Spinner,null)},t._scrollTo=function(e){if(t._transcriptListRef){t._preventScrollEvent=!0;var r=e.getBoundingClientRect().top;(r>=t._topAutoscrollEdge||r<=t._bottomAutoscrollEdge)&&(t._transcriptListRef.scrollTop=e.offsetTop-(t._thirdOfWidgetHeight-B))}},t._scrollToSearchMatch=function(e){t._transcriptListRef&&t._scrollToSearchMatchEnabled&&(t._scrollToSearchMatchEnabled=!1,t._preventScrollEvent=!0,t._transcriptListRef.scrollTop=e.offsetTop-B)},t._onScroll=function(){t._preventScrollEvent?t._preventScrollEvent=!1:t.setState({isAutoScrollEnabled:!1})},t._handleSeek=function(e){var r=t.props.onSeek,n=window.getSelection();n&&"Range"!==n.type&&r(e.startTime)},t._debounced={findSearchMatches:(0,c.debounce)(t._findSearchMatches,t.props.searchDebounceTimeout),onActiveSearchIndexChange:(0,c.debounce)(t._setActiveSearchIndex,t.props.searchNextPrevDebounceTimeout),searchEventDispatcher:(0,c.debounce)(t._dispatchSearchEvent,2e3)},t}return o(t,e),t.prototype.componentDidMount=function(){var e=this;window.ResizeObserver?(this._resizeObserver=new ResizeObserver((function(){e._setWidgetSize()})),this._resizeObserver.observe(this._widgetRootRef)):this._setWidgetSize()},t.prototype.componentDidUpdate=function(e,t){var r=this.props,n=r.captions,o=r.activeCaptionLanguage,i=r.playerWidth,a=this.state.search;e.captions!==n&&this.setState({search:e.activeCaptionLanguage!==o?"":t.search,isAutoScrollEnabled:!0}),(t.search!==a||e.captions!==n&&e.activeCaptionLanguage===o)&&this._debounced.findSearchMatches(),this._resizeObserver||e.playerWidth===i||this._setWidgetSize()},t.prototype.componentWillUnmount=function(){var e;this._resizeObserver&&(null===(e=this._resizeObserver)||void 0===e||e.disconnect(),this._resizeObserver=null)},t.prototype.render=function(e){var t=this,r=e.isLoading,n=e.kitchenSinkActive,o=e.kitchenSinkDetached,i=e.hasError,a=e.smallScreen,l=e.toggledWithEnter,c=!(r||i);return(0,s.h)(A.ScreenReaderProvider,null,(0,s.h)("div",{className:"".concat(u.root," ").concat(n||o?"":u.hidden),ref:function(e){t._widgetRootRef=e},"data-testid":"transcript_root"},a&&!o?(0,s.h)(m.SmallScreenSlate,{onClose:this.props.onClose,toggledWithEnter:l}):(0,s.h)("div",{className:u.globalContainer},this._renderHeader(),c&&this._renderSkipTranscriptButton(),(0,s.h)("div",{className:u.body,onScroll:this._onScroll,ref:function(e){t._transcriptListRef=e},"data-testid":"transcript_list"},r?this._renderLoading():this._renderTranscript()),c&&this._renderScrollToButton())))},a([O(I),S(P)],t)}(s.Component);t.Transcript=D},2230:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.CloseDetachTypes=t.TranscriptEvents=void 0,t.TranscriptEvents={TRANSCRIPT_OPEN:"transcript_open",TRANSCRIPT_CLOSE:"transcript_close",TRANSCRIPT_DOWNLOAD:"transcript_download",TRANSCRIPT_PRINT:"transcript_print",TRANSCRIPT_SEARCH:"transcript_search",TRANSCRIPT_NAVIGATE_RESULT:"transcript_navigate_result",TRANSCRIPT_POPOUT_OPEN:"transcript_popout_open",TRANSCRIPT_POPOUT_CLOSE:"transcript_popout_close",TRANSCRIPT_POPOUT_DRAG:"transcript_popout_drag",TRANSCRIPT_POPOUT_RESIZE:"transcript_popout_resize",TRANSCRIPT_TO_SEARCH_MATCH:"transcript_to_search_match"},(r=t.CloseDetachTypes||(t.CloseDetachTypes={})).closeWindow="close_window",r.bringBack="bring_back",r.arrow="arrow"},5667:function(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)},a=this&&this.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.TranscriptPlugin=t.pluginName=void 0;var s=r(4926),l=r(4522),c=r(2052),u=r(4539),p=r(1293),d=r(2351),h=r(9754),f=r(4539),g=r(2085),_=r(2230),m=r(8514);t.pluginName="playkit-js-transcript";var v=c.ui.SidePanelModes,A=c.ui.SidePanelPositions,y=c.ui.ReservedPresetNames,C=(c.ui.ReservedPresetAreas,KalturaPlayer.ui.preacti18n),b=C.withText,w=C.Text,x=u.ObjectUtils.get,k=function(e){function r(t,r,n){var o=e.call(this,t,r,n)||this;return o.displayName="Transcript",o.svgIcon={path:p.icons.PLUGIN_ICON,viewBox:"0 0 32 32"},o._activeCaptionMapId="",o._activeCuePointsMap={},o._captionMap=new Map,o._isLoading=!1,o._hasError=!1,o._triggeredByKeyboard=!1,o._transcriptPanel=-1,o._transcriptIcon=-1,o._audioPlayerIconId=-1,o._pluginState=null,o._pluginButtonRef=null,o._initLoading=function(){clearTimeout(o._loadingTimeoutId),o._isLoading=!1,o._hasError=!1,o._captionMap.has(o._activeCaptionMapId)||(o._isLoading=!0,o._loadingTimeoutId=setTimeout((function(){o._isLoading=!1,o._hasError=!0,o._updateTranscriptPanel()}),1e4)),o._updateTranscriptPanel()},o._handleLanguageChange=function(){o._activeCaptionMapId=o._getCaptionMapId(),o._initLoading()},o._onTimedMetadataAdded=function(e){var t=e.payload,r=[];if(t.cues.forEach((function(e){e.metadata.cuePointType===g.ItemTypes.Caption&&r.push((0,f.prepareCuePoint)(e))})),r.length){var n=t.cues[0].metadata,i=o._makeCaptionKey(n.language,n.label);o._addCaptionData(r,i),o._addTranscriptItem()}},o._onTimedMetadataChange=function(e){var t=e.payload.cues.filter((function(e){return e.metadata.cuePointType===g.ItemTypes.Caption})).filter((function(e,t,r){var n=r[t+1];return!n||e.endTime!==n.startTime}));o._activeCuePointsMap={},t.forEach((function(e){o._activeCuePointsMap[e.id]=!0})),o._updateTranscriptPanel()},o._addCaptionData=function(e,t){o._activeCaptionMapId=o._getCaptionMapId();var r=o._captionMap.get(t),n=o._sanitizeCaptions(e);o._captionMap.set(t,r?a(a([],r,!0),n,!0):n),o._isLoading=!1,clearTimeout(o._loadingTimeoutId),o._updateTranscriptPanel()},o._getTextTracks=function(){return o.player.getTracks(o.player.Track.TEXT)||[]},o._getCaptionMapId=function(){var e,t,r=o._getTextTracks(),n=r.find((function(e){return e.active}));return"off"===(null==n?void 0:n.language)?o._activeCaptionMapId?o._activeCaptionMapId:o._makeCaptionKey(null===(e=r[0])||void 0===e?void 0:e.language,null===(t=r[0])||void 0===t?void 0:t.label):o._makeCaptionKey(null==n?void 0:n.language,null==n?void 0:n.label)},o._makeCaptionKey=function(e,t){return"".concat(e||"default","-").concat(t)},o._activatePlugin=function(e){void 0===e&&(e=!1),o.ready.then((function(){var t,r;null===(t=o.sidePanelsManager)||void 0===t||t.activateItem(o._transcriptPanel),o._pluginState=g.PluginStates.OPENED,null===(r=o.upperBarManager)||void 0===r||r.update(o._transcriptIcon),o.dispatchEvent(_.TranscriptEvents.TRANSCRIPT_OPEN,{auto:e})}))},o._deactivatePlugin=function(){o.ready.then((function(){var e,t;null===(e=o.sidePanelsManager)||void 0===e||e.deactivateItem(o._transcriptPanel),null===(t=o.upperBarManager)||void 0===t||t.update(o._transcriptIcon),o.dispatchEvent(_.TranscriptEvents.TRANSCRIPT_CLOSE)}))},o._isPluginActive=function(){return o.sidePanelsManager.isItemActive(o._transcriptPanel)},o._handleClickOnPluginIcon=function(e,t){o._isPluginActive()?(o._triggeredByKeyboard=!1,o._deactivatePlugin(),o._pluginState=g.PluginStates.CLOSED):(o._triggeredByKeyboard=Boolean(t),o._activatePlugin())},o._sanitizeCaptions=function(e){return e.map((function(e){return i(i({},e),{text:(0,u.decodeString)(s(e.text||"",{allowedAttributes:{},allowedTags:[]}))})}))},o._handleDetach=function(){var e;o._isDetached()&&o._handleAttach(_.CloseDetachTypes.bringBack),null===(e=o.sidePanelsManager)||void 0===e||e.detachItem(o._transcriptPanel,{width:600,height:600,title:"Transcript",attachPlaceholder:function(){return(0,l.h)(m.AttachPlaceholder,{onAttach:function(){o._handleAttach(_.CloseDetachTypes.bringBack)},onClose:o._handleClose})},onDetachWindowClose:function(){o.dispatchEvent(_.TranscriptEvents.TRANSCRIPT_POPOUT_CLOSE,{type:_.CloseDetachTypes.closeWindow})},onDetachResize:function(e,t){o.dispatchEvent(_.TranscriptEvents.TRANSCRIPT_POPOUT_RESIZE,{size:{x:e,y:t}})},onDetachMove:function(e,t){o.dispatchEvent(_.TranscriptEvents.TRANSCRIPT_POPOUT_DRAG,{position:{x:e,y:t}})}}),o.dispatchEvent(_.TranscriptEvents.TRANSCRIPT_POPOUT_OPEN)},o._handleAttach=function(e){var t;null===(t=o.sidePanelsManager)||void 0===t||t.attachItem(o._transcriptPanel),o.dispatchEvent(_.TranscriptEvents.TRANSCRIPT_POPOUT_CLOSE,{type:e})},o._isDetached=function(){return o.sidePanelsManager.isItemDetached(o._transcriptPanel)},o._toSearchMatch=function(){o.dispatchEvent(_.TranscriptEvents.TRANSCRIPT_TO_SEARCH_MATCH)},o._setPluginButtonRef=function(e){o._pluginButtonRef=e},o._seekTo=function(e){o.player.currentTime=e},o._handleDownload=function(){var e=o.player.config,t=o._sanitizeCaptions(o._captionMap.get(o._activeCaptionMapId)||[]);if(t){var r=x(e,"sources.metadata",{}),n=o._getCaptionMapId();(0,u.downloadContent)((0,f.makePlainText)(t),"".concat(n).concat(r.name?"-".concat(r.name):"",".txt"))}o.dispatchEvent(_.TranscriptEvents.TRANSCRIPT_DOWNLOAD,{videoPosition:o.player.currentTime})},o._handlePrint=function(){var e=o._sanitizeCaptions(o._captionMap.get(o._activeCaptionMapId)||[]);e&&(0,u.printContent)((0,f.makePlainText)(e)),o.dispatchEvent(_.TranscriptEvents.TRANSCRIPT_PRINT,{videoPosition:o.player.currentTime})},o._handleClose=function(e,t){var r;t&&(null===(r=o._pluginButtonRef)||void 0===r||r.focus()),o._deactivatePlugin(),o._pluginState=g.PluginStates.CLOSED},o}return o(r,e),Object.defineProperty(r.prototype,"sidePanelsManager",{get:function(){return this.player.getService("sidePanelsManager")},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"upperBarManager",{get:function(){return this.player.getService("upperBarManager")},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"cuePointManager",{get:function(){return this.player.getService("kalturaCuepoints")},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"audioPluginsManager",{get:function(){return this.player.getService("AudioPluginsManager")||null},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"_data",{get:function(){return this._captionMap.get(this._activeCaptionMapId)||[]},enumerable:!1,configurable:!0}),r.prototype.loadMedia=function(){this.cuePointManager&&this.sidePanelsManager&&this.upperBarManager?this.player.isLive()||(this._initListeners(),this.cuePointManager.registerTypes([this.cuePointManager.CuepointType.CAPTION])):this.logger.warn("kalturaCuepoints, sidePanelsManager or upperBarManager haven't registered")},r.prototype._initListeners=function(){var e=this;this.eventManager.listenOnce(this.player,this.player.Event.TRACKS_CHANGED,(function(){e._getTextTracks().length&&(e.eventManager.listen(e.player,e.player.Event.TIMED_METADATA_CHANGE,e._onTimedMetadataChange),e.eventManager.listen(e.player,e.player.Event.TIMED_METADATA_ADDED,e._onTimedMetadataAdded),e.eventManager.listen(e.player,e.player.Event.TEXT_TRACK_CHANGED,e._handleLanguageChange))}))},r.prototype.open=function(){this._handleDetach()},r.prototype._updateTranscriptPanel=function(){var e;this._transcriptPanel&&(null===(e=this.sidePanelsManager)||void 0===e||e.update(this._transcriptPanel))},r.prototype._addTranscriptItem=function(){var e=this;if(!(Math.max(this._transcriptPanel,this._transcriptIcon,this._audioPlayerIconId)>0)){var r=this.config,n=r.expandMode,o=r.position,i=r.expandOnFirstPlay,a=r.showTime,s=r.scrollOffset,u=r.searchDebounceTimeout,m=r.searchNextPrevDebounceTimeout,A=r.downloadDisabled,C=r.printDisabled;this._transcriptPanel=this.sidePanelsManager.add({label:"Transcript",panelComponent:function(){return(0,l.h)(h.Transcript,{showTime:(0,f.getConfigValue)(a,f.isBoolean,!0),scrollOffset:(0,f.getConfigValue)(s,Number.isInteger,0),searchDebounceTimeout:(0,f.getConfigValue)(u,Number.isInteger,250),searchNextPrevDebounceTimeout:(0,f.getConfigValue)(m,Number.isInteger,100),highlightedMap:e._activeCuePointsMap,onSeek:e._seekTo,onItemClicked:e._seekTo,expandMode:e.config.expandMode,captions:e._data,isLoading:e._isLoading,hasError:e._hasError,onRetryLoad:e._updateTranscriptPanel,currentTime:e.player.currentTime,videoDuration:e.player.duration,kitchenSinkActive:e._isPluginActive(),kitchenSinkDetached:e._isDetached(),toggledWithEnter:e._triggeredByKeyboard,onClose:e._handleClose,downloadDisabled:(0,f.getConfigValue)(A,f.isBoolean,!1),onDownload:e._handleDownload,printDisabled:(0,f.getConfigValue)(C,f.isBoolean,!1),onPrint:e._handlePrint,dispatcher:function(t,r){return e.dispatchEvent(t,r)},activeCaptionLanguage:e._activeCaptionMapId,onDetach:e._handleDetach,onAttach:function(){e._handleAttach(_.CloseDetachTypes.arrow)},onJumpToSearchMatch:e._toSearchMatch})},presets:[y.Playback,y.Live,y.Ads,"MiniAudioUI"],position:o,expandMode:n===v.ALONGSIDE?v.ALONGSIDE:v.OVER});var x={showTranscript:(0,l.h)(w,{id:"transcript.show_plugin"},"Show Transcript"),hideTranscript:(0,l.h)(w,{id:"transcript.hide_plugin"},"Hide Transcript")};if(c.ui.redux.useStore().getState().shell.activePresetName!==y.MiniAudioUI)this._transcriptIcon=this.upperBarManager.add({displayName:"Transcript",ariaLabel:"Transcript",order:30,svgIcon:{path:p.icons.PLUGIN_ICON,viewBox:"0 0 ".concat(p.icons.BigSize," ").concat(p.icons.BigSize)},onClick:this._handleClickOnPluginIcon,component:b(x)((function(r){var n=e._isPluginActive(),o=n?r.hideTranscript:r.showTranscript;return(0,l.h)(d.PluginButton,{isActive:n,id:t.pluginName,label:o,icon:p.icons.PLUGIN_ICON,dataTestId:"transcript_pluginButton",setRef:e._setPluginButtonRef})}))});else{var k=this.displayName,S=this.svgIcon;this.audioPluginsManager&&(this._audioPlayerIconId=this.audioPluginsManager.add({displayName:k,svgIcon:S,onClick:function(){return e.open()}}))}(i&&!this._pluginState||this._pluginState===g.PluginStates.OPENED)&&this._activatePlugin(!0)}},r.isValid=function(){return!0},r.prototype.reset=function(){var e,t;this.eventManager.removeAll(),Math.max(this._transcriptPanel,this._transcriptIcon)>0&&(null===(e=this.sidePanelsManager)||void 0===e||e.remove(this._transcriptPanel),this.upperBarManager.remove(this._transcriptIcon),null===(t=this.audioPluginsManager)||void 0===t||t.remove(this._audioPlayerIconId),this._transcriptPanel=-1,this._transcriptIcon=-1,this._audioPlayerIconId=-1,this._pluginButtonRef=null),this._captionMap=new Map,this._activeCaptionMapId="",this._isLoading=!1,clearTimeout(this._loadingTimeoutId),this._hasError=!1,this._triggeredByKeyboard=!1},r.prototype.destroy=function(){this.reset()},r.defaultConfig={expandMode:v.ALONGSIDE,expandOnFirstPlay:!0,showTime:!0,position:A.RIGHT,scrollOffset:0,searchDebounceTimeout:250,searchNextPrevDebounceTimeout:100,downloadDisabled:!1,printDisabled:!1},r}(KalturaPlayer.core.BasePlugin);t.TranscriptPlugin=k},2085:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(5481),t),o(r(4944),t),o(r(1352),t)},4944:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},1352:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ItemTypes=void 0,(t.ItemTypes||(t.ItemTypes={})).Caption="kalturaCaption"},5481:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.PluginStates=void 0,(r=t.PluginStates||(t.PluginStates={})).OPENED="opened",r.CLOSED="closed"},7256:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.debounce=void 0,t.debounce=function(e,t,r){var n;return void 0===t&&(t=50),void 0===r&&(r={isImmediate:!1}),function(){for(var o=this,i=[],a=0;a<arguments.length;a++)i[a]=arguments[a];var s=function(){n=void 0,r.isImmediate||e.apply(o,i)},l=r.isImmediate&&void 0===n;void 0!==n&&clearTimeout(n),n=setTimeout(s,t),l&&e.apply(this,i)}}},4539:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(9714),t),o(r(4935),t),o(r(7256),t)},4935:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ObjectUtils=void 0;var r=function(){function e(){}return e.get=function(e,t,r){for(var n=function(e){var t=[];return e.split(".").forEach((function(e){e.split(/\[([^}]+)\]/g).forEach((function(e){e.length>0&&t.push(e)}))})),t}(t),o=e,i=0;i<n.length;i++){if(!o[n[i]])return r;o=o[n[i]]}return o},e}();t.ObjectUtils=r},9714:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.printContent=t.downloadContent=t.prepareCuePoint=t.decodeString=t.makePlainText=t.isBoolean=t.getConfigValue=t.secondsToTime=t.toSeconds=t.HOUR=void 0,t.HOUR=3600,t.toSeconds=function(e,r){void 0===r&&(r=!1);var n=(r?/(\d+):(\d{2}):(\d{2}).(\d{2,3}|\d{2})/:/(\d+):(\d{2}):(\d{2}),((\d{2,3}|\d{2}|\d{1}))?/).exec(e);if(null===n)return 0;for(var o=1;o<5;o++)n[o]=parseInt(n[o],10),isNaN(n[o])&&(n[o]=0);return n[1]*t.HOUR+60*n[2]+n[3]+n[4]/1e3};var r=function(e){return e<10?"0".concat(e):e};t.secondsToTime=function(e,n){var o=new Date(0);return o.setSeconds(e),"".concat(n?function(e){var r=Math.floor(e/t.HOUR);return r>=1?"".concat(r,":"):""}(e):"").concat(r(o.getUTCMinutes()),":").concat(r(o.getUTCSeconds()))},t.getConfigValue=function(e,t,r){var n=r;return"function"==typeof t&&t(e)&&(n=e),n},t.isBoolean=function(e){return"boolean"==typeof e},t.makePlainText=function(e){return e.reduce((function(e,t){return"".concat(e.trim()," ").concat(t.text.trim())}),"")},t.decodeString=function(e){return"string"!=typeof e?e:e.replace(/&lt;/gi,"<").replace(/&gt;/gi,">").replace(/&nbsp;/gi," ").replace(/  /gi," ").replace(/&amp;/gi,"&").replace(/&quot;/gi,'"')},t.prepareCuePoint=function(e){var r=e.metadata;return{id:e.id,startTime:e.startTime,displayTime:Math.floor(e.startTime),text:(0,t.decodeString)(r.text)}},t.downloadContent=function(e,t){var r=new Blob([e],{type:"text/plain;charset=utf-8;"}),n=document.createElement("a"),o=window.navigator;o.msSaveBlob?o.msSaveOrOpenBlob(r,t):(-1!==o.userAgent.search("Firefox")?(n.style.display="none",n.setAttribute("href","data:text/plain;charset=utf-8,"+encodeURIComponent(e))):n.setAttribute("href",URL.createObjectURL(r)),n.setAttribute("target","_blank"),n.setAttribute("download",t),n.click(),n.remove())},t.printContent=function(e){var t=window.open("","","width=400,height=600");t&&(t.document.write(e),t.document.close(),t.focus(),t.print(),t.close())}},2052:e=>{"use strict";e.exports=KalturaPlayer},4522:e=>{"use strict";e.exports=KalturaPlayer.ui.preact},5710:()=>{},473:()=>{},5426:()=>{},984:()=>{},9121:()=>{},6521:e=>{e.exports={nanoid:(e=21)=>{let t="",r=e;for(;r--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t},customAlphabet:(e,t=21)=>(r=t)=>{let n="",o=r;for(;o--;)n+=e[Math.random()*e.length|0];return n}}}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={id:n,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nc=void 0;var n={};(()=>{"use strict";var e=n;Object.defineProperty(e,"__esModule",{value:!0}),e.NAME=e.VERSION=e.Plugin=e.TranscriptEvents=void 0;var t=r(5667);Object.defineProperty(e,"Plugin",{enumerable:!0,get:function(){return t.TranscriptPlugin}}),e.VERSION="3.5.27",e.NAME="@playkit-js/transcript";var o=r(2230);Object.defineProperty(e,"TranscriptEvents",{enumerable:!0,get:function(){return o.TranscriptEvents}}),KalturaPlayer.core.registerPlugin(t.pluginName,t.TranscriptPlugin)})(),((KalturaPlayer=void 0===KalturaPlayer?{}:KalturaPlayer).plugins=KalturaPlayer.plugins||{}).transcript=n})();

/*! For license information please see playkit-ui-managers.js.LICENSE.txt */
(()=>{var t={5720:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.A11yWrapper=e.isKeyboardEvent=void 0;var o=n(4522),r=n(2052).ui.utils.KeyMap,i=r.ENTER,a=r.SPACE,s=r.UP,l=r.DOWN,c=r.LEFT,p=r.RIGHT,u=function(t){t.preventDefault(),t.stopPropagation()};e.isKeyboardEvent=function(t){return t instanceof KeyboardEvent||[t.offsetX,t.offsetY].every((function(t){return 0===t}))},e.A11yWrapper=function(t){var n=t.children,r=t.onClick,d=t.onUpKeyPressed,h=t.onDownKeyPressed,f=t.onLeftKeyPressed,A=t.onRightKeyPressed,C=t.role,y=t.type,v={onKeyDown:function(t){t.keyCode===a||t.keyCode===i?(u(t),r(t,!0)):t.keyCode===s&&d?(u(t),d(t)):t.keyCode===l&&h?(u(t),h(t)):t.keyCode===c&&f?(u(t),f(t)):t.keyCode===p&&A&&(u(t),A(t))},onClick:function(t){r(t,(0,e.isKeyboardEvent)(t))},role:C};return"button"===(null==n?void 0:n.type)&&(v.type=y||"button"),(0,o.cloneElement)(n,v)},e.A11yWrapper.defaultProps={role:"button"}},14:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Add=void 0;var o=n(4522);e.Add=function(){return(0,o.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,o.h)("path",{d:"M21.8083 4C22.4665 4 23 4.55964 23 5.25V18.75C23 19.4404 22.4665 20 21.8083 20H2.19167C1.53353 20 1 19.4404 1 18.75V5.25C1 4.55964 1.53353 4 2.19167 4H21.8083ZM15 6H3V18H15V6ZM12.999 8.967L13 9L12.998 8.94L12.999 8.967L13 9V15C13 15.5523 12.5523 16 12 16C11.4872 16 11.0645 15.614 11.0067 15.1166L11 15V11.414L6.70711 15.7071C6.34662 16.0676 5.77939 16.0953 5.3871 15.7903L5.29289 15.7071C4.93241 15.3466 4.90468 14.7794 5.2097 14.3871L5.29289 14.2929L9.584 10H6C5.48716 10 5.06449 9.61396 5.00673 9.11662L5 9C5 8.44772 5.44772 8 6 8L12.0193 8.00018C12.0427 8.00063 12.066 8.00189 12.0893 8.00397C12.1097 8.00575 12.1294 8.0081 12.149 8.01102C12.1659 8.01363 12.1834 8.0167 12.2007 8.02024C12.2227 8.02464 12.2444 8.02983 12.2658 8.03572C12.2815 8.0401 12.2969 8.04473 12.3121 8.04974C12.3318 8.05612 12.3516 8.06332 12.3711 8.0711L12.4232 8.09367C12.4439 8.10338 12.4643 8.11379 12.4843 8.12488C12.4964 8.1315 12.5086 8.13861 12.5207 8.146C12.5463 8.16172 12.5711 8.17849 12.5952 8.19631L12.6525 8.24221L12.6167 8.21279C12.6802 8.26255 12.7374 8.31982 12.7872 8.38325C12.7927 8.39016 12.7982 8.3974 12.8037 8.40469C12.8215 8.42887 12.8383 8.45372 12.8539 8.47934L12.8753 8.51594C12.8862 8.53571 12.8966 8.55611 12.9063 8.5769L12.9288 8.62866C12.9367 8.64842 12.9439 8.6682 12.9505 8.68826C12.9553 8.70315 12.9599 8.71854 12.9642 8.73401C12.9702 8.75556 12.9754 8.77725 12.9798 8.79921C12.9833 8.81662 12.9864 8.83405 12.989 8.85153L12.9972 8.92482L12.998 8.94L12.999 8.967Z",fill:"white"}))}},8963:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Close=void 0;var o=n(4522);e.Close=function(){return(0,o.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,o.h)("path",{d:"M11.6592 10.245L6.70483 5.29061C6.31701 4.9028 5.68581 4.90476 5.29528 5.29528C4.90204 5.68853 4.90267 6.31688 5.29061 6.70483L10.245 11.6592L5.29061 16.6137C4.9028 17.0015 4.90476 17.6327 5.29528 18.0232C5.68853 18.4165 6.31688 18.4158 6.70483 18.0279L11.6592 13.0735L16.6137 18.0279C17.0015 18.4157 17.6327 18.4137 18.0232 18.0232C18.4165 17.63 18.4158 17.0016 18.0279 16.6137L13.0735 11.6592L18.0279 6.70483C18.4157 6.31701 18.4137 5.68581 18.0232 5.29528C17.63 4.90204 17.0016 4.90267 16.6137 5.29061L11.6592 10.245Z",fill:"white"}))}},1495:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Download=void 0;var o=n(4522);e.Download=function(){return(0,o.h)("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,o.h)("path",{d:"M17.5 6C17.5 5.44772 17.0523 5 16.5 5L16.3834 5.00673C15.886 5.06449 15.5 5.48716 15.5 6L15.4997 17.693L9.71029 12.2702C9.30721 11.8926 8.67439 11.9133 8.29683 12.3164C7.91928 12.7195 7.93998 13.3523 8.34306 13.7298L15.8164 20.7298C15.8212 20.7343 15.826 20.7387 15.8308 20.7431L15.8164 20.7298L15.9035 20.8027C15.9034 20.8026 15.9037 20.8028 15.9035 20.8027C15.9135 20.8101 15.9231 20.817 15.9333 20.824C15.956 20.8397 15.9793 20.8544 16.0038 20.8684C16.0148 20.8747 16.0259 20.8808 16.0366 20.8864C16.0596 20.8984 16.0832 20.9096 16.1077 20.9201C16.1223 20.9263 16.1371 20.9322 16.1515 20.9376C16.1769 20.947 16.2028 20.9555 16.2299 20.963C16.2399 20.9658 16.25 20.9684 16.2595 20.9709C16.3365 20.9899 16.4171 21 16.5 21C16.5804 21 16.6585 20.9905 16.7336 20.9725C16.7521 20.968 16.7706 20.963 16.7889 20.9576C16.8097 20.9514 16.8303 20.9444 16.8507 20.9367C16.8632 20.932 16.8756 20.9271 16.8878 20.922C16.9121 20.9118 16.936 20.9006 16.9596 20.8883C16.9735 20.8812 16.9872 20.8736 17.0007 20.8658C17.0223 20.8533 17.0434 20.84 17.0636 20.8262C17.0764 20.8174 17.0891 20.8083 17.1021 20.7985C17.1224 20.7831 17.1422 20.767 17.161 20.7504C17.1685 20.7437 17.176 20.737 17.1834 20.7301L24.6619 13.7301C25.0651 13.3527 25.086 12.7198 24.7086 12.3166L24.6172 12.2304C24.2352 11.9126 23.6674 11.9215 23.2952 12.2699L17.4997 17.694L17.5 6Z",fill:"white"}),(0,o.h)("path",{d:"M27 26C27 26.5523 26.5523 27 26 27H7C6.44772 27 6 26.5523 6 26C6 25.4477 6.44772 25 7 25H26C26.5523 25 27 25.4477 27 26Z",fill:"white"}))}},3767:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Expand=void 0;var o=n(4522);e.Expand=function(){return(0,o.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,o.h)("path",{d:"M20.997 3.924L20.998 3.945L20.999 3.98L21 4V10C21 10.5523 20.5523 11 20 11C19.4872 11 19.0645 10.614 19.0067 10.1166L19 10V6.416L14.7071 10.7071C14.3466 11.0676 13.7794 11.0953 13.3871 10.7903L13.2929 10.7071C12.9324 10.3466 12.9047 9.77939 13.2097 9.3871L13.2929 9.29289L17.586 5H14C13.4872 5 13.0645 4.61396 13.0067 4.11662L13 4C13 3.48716 13.386 3.06449 13.8834 3.00673L14 3L20.0332 3.00054C20.0503 3.00109 20.0683 3.00216 20.0862 3.0037C20.1079 3.00553 20.1285 3.00797 20.149 3.01102C20.166 3.01363 20.1834 3.0167 20.2007 3.02024C20.2227 3.02464 20.2444 3.02983 20.2658 3.03572C20.2815 3.0401 20.2969 3.04473 20.3121 3.04974C20.3318 3.05612 20.3516 3.06332 20.3711 3.0711L20.4232 3.09367C20.4439 3.10338 20.4643 3.11379 20.4843 3.12488C20.4964 3.1315 20.5086 3.13861 20.5207 3.146C20.5463 3.16172 20.5711 3.17849 20.5952 3.19631L20.6525 3.24221L20.6168 3.21279C20.6802 3.26255 20.7374 3.31982 20.7872 3.38325C20.7927 3.39016 20.7982 3.3974 20.8037 3.40469C20.8215 3.42887 20.8383 3.45373 20.8539 3.47934L20.8753 3.51594C20.8862 3.53571 20.8966 3.55611 20.9063 3.5769L20.9288 3.62866C20.9367 3.64842 20.9439 3.6682 20.9505 3.68826C20.9553 3.70315 20.9599 3.71854 20.9642 3.73401C20.9702 3.75556 20.9754 3.77725 20.9798 3.79921C20.9833 3.81662 20.9864 3.83405 20.989 3.85153L20.996 3.91075L20.996 3.919L20.997 3.921V3.924ZM3.002 20.059V20.071L3.00175 20.0593C3.00122 20.0503 3.00081 20.0413 3.00052 20.0323L3 14C3 13.4477 3.44772 13 4 13C4.51284 13 4.93551 13.386 4.99327 13.8834L5 14V17.586L9.29289 13.2929C9.65338 12.9324 10.2206 12.9047 10.6129 13.2097L10.7071 13.2929C11.0676 13.6534 11.0953 14.2206 10.7903 14.6129L10.7071 14.7071L6.416 19H10C10.5128 19 10.9355 19.386 10.9933 19.8834L11 20C11 20.5128 10.614 20.9355 10.1166 20.9933L10 21H4C3.99354 21 3.98709 20.9999 3.98066 20.9998C3.95732 20.9994 3.93401 20.9981 3.91075 20.996C3.89031 20.9943 3.87058 20.9919 3.85104 20.989C3.83405 20.9864 3.81662 20.9833 3.79927 20.9798C3.77725 20.9754 3.75556 20.9702 3.73416 20.9643C3.71854 20.9599 3.70315 20.9553 3.68786 20.9503C3.6682 20.9439 3.64842 20.9367 3.62894 20.9289L3.57678 20.9063C3.55611 20.8966 3.53571 20.8862 3.51572 20.8751C3.50361 20.8685 3.49139 20.8614 3.47929 20.854C3.45373 20.8383 3.42887 20.8215 3.40484 20.8037L3.34745 20.7578L3.38325 20.7872C3.31982 20.7374 3.26255 20.6802 3.21279 20.6168C3.20728 20.6098 3.20175 20.6026 3.19633 20.5953C3.17849 20.5711 3.16172 20.5463 3.14607 20.5207L3.12467 20.4841C3.11379 20.4643 3.10338 20.4439 3.09365 20.4231L3.07123 20.3713C3.06332 20.3516 3.05612 20.3318 3.04955 20.3117C3.04473 20.2969 3.0401 20.2815 3.03585 20.266C3.02983 20.2444 3.02464 20.2227 3.02017 20.2008C3.0167 20.1834 3.01363 20.1659 3.01102 20.1485L3.0037 20.0862L3.002 20.059Z",fill:"white"}))}},9294:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Icons=void 0;var o=n(8963),r=n(9761),i=n(1495),a=n(1060),s=n(9109),l=n(0),c=n(6139),p=n(1384),u=n(3410),d=n(14),h=n(8671),f=n(1383),A=n(3767);e.Icons={close:o.Close,print:r.Print,download:i.Download,related:a.Related,message:s.Message,share:l.Share,more:c.More,quiz:p.QuizIcon,switch:u.Switch,add:d.Add,minimizedVideo:h.MinimizedVideo,pictureInPicture:f.PictureInPicture,expand:A.Expand}},9109:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Message=void 0;var o=n(4522);e.Message=function(){return(0,o.h)("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,o.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M25 5C27.2091 5 29 6.75035 29 8.90952V18.6833C29 20.8425 27.2091 22.5928 25 22.5928H14.985L10.7019 26.7188C10.546 26.8689 10.3449 26.9641 10.1302 26.9917L10 27C9.44772 27 9 26.5624 9 26.0226V22.5928H7C4.79086 22.5928 3 20.8425 3 18.6833V8.90952C3 6.75035 4.79086 5 7 5H25ZM25 6.95476H7C5.89543 6.95476 5 7.82994 5 8.90952V18.6833C5 19.7629 5.89543 20.6381 7 20.6381H11V23.687L14.1651 20.6381H25C26.1046 20.6381 27 19.7629 27 18.6833V8.90952C27 7.82994 26.1046 6.95476 25 6.95476ZM19 14.7738C19.5523 14.7738 20 15.2114 20 15.7512C20 16.291 19.5523 16.7286 19 16.7286H10C9.44772 16.7286 9 16.291 9 15.7512C9 15.2114 9.44772 14.7738 10 14.7738H19ZM23 10.8643C23.5523 10.8643 24 11.3019 24 11.8417C24 12.3815 23.5523 12.819 23 12.819H10C9.44772 12.819 9 12.3815 9 11.8417C9 11.3019 9.44772 10.8643 10 10.8643H23Z",fill:"white"}))}},8671:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MinimizedVideo=void 0;var o=n(4522);e.MinimizedVideo=function(){return(0,o.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,o.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M5.25 4.5H18.75C19.9926 4.5 21 5.50736 21 6.75V17.25C21 18.4926 19.9926 19.5 18.75 19.5H5.25C4.00736 19.5 3 18.4926 3 17.25V6.75C3 5.50736 4.00736 4.5 5.25 4.5ZM5.25 6C4.83579 6 4.5 6.33579 4.5 6.75V17.25C4.5 17.6642 4.83579 18 5.25 18H18.75C19.1642 18 19.5 17.6642 19.5 17.25V6.75C19.5 6.33579 19.1642 6 18.75 6H5.25ZM13 12C12.4477 12 12 12.4477 12 13V15.5C12 16.0523 12.4477 16.5 13 16.5H17C17.5523 16.5 18 16.0523 18 15.5V13C18 12.4477 17.5523 12 17 12H13Z",fill:"white"}))}},6139:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.More=void 0;var o=n(4522);e.More=function(){return(0,o.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,o.h)("path",{d:"M8 12C8 13.1046 7.10457 14 6 14C4.89543 14 4 13.1046 4 12C4 10.8954 4.89543 10 6 10C7.10457 10 8 10.8954 8 12ZM14 12C14 13.1046 13.1046 14 12 14C10.8954 14 10 13.1046 10 12C10 10.8954 10.8954 10 12 10C13.1046 10 14 10.8954 14 12ZM20 12C20 13.1046 19.1046 14 18 14C16.8954 14 16 13.1046 16 12C16 10.8954 16.8954 10 18 10C19.1046 10 20 10.8954 20 12Z",fill:"white"}))}},1383:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PictureInPicture=void 0;var o=n(4522);e.PictureInPicture=function(){return(0,o.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,o.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M18.75 4.5H5.25C4.00736 4.5 3 5.50736 3 6.75V17.25C3 18.4926 4.00736 19.5 5.25 19.5H18.75C19.9926 19.5 21 18.4926 21 17.25V6.75C21 5.50736 19.9926 4.5 18.75 4.5ZM13 12C12.4477 12 12 12.4477 12 13V15.5C12 16.0523 12.4477 16.5 13 16.5H17C17.5523 16.5 18 16.0523 18 15.5V13C18 12.4477 17.5523 12 17 12H13Z",fill:"white"}))}},9761:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Print=void 0;var o=n(4522);e.Print=function(){return(0,o.h)("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,o.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M23 23H26C27.1046 23 28 22.1046 28 21V11C28 9.89543 27.1046 9 26 9H23V5C23 3.89543 22.1046 3 21 3H11C9.89543 3 9 3.89543 9 5V9H6C4.89543 9 4 9.89543 4 11V21C4 22.1046 4.89543 23 6 23H9V28C9 29.1046 9.89543 30 11 30H21C22.1046 30 23 29.1046 23 28V23ZM6 11V21H9V19C8.44772 19 8 18.5523 8 18C8 17.4477 8.44772 17 9 17H23C23.5523 17 24 17.4477 24 18C24 18.5523 23.5523 19 23 19V21H26V11H6ZM21 9V5H11V9H21ZM11 19V28H21V19H11Z",fill:"white"}))}},1384:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QuizIcon=void 0;var o=n(4522);e.QuizIcon=function(){return(0,o.h)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,o.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.49857 2.11499L12.7442 4.2052C12.9162 4.28987 12.9812 4.48721 12.8895 4.64597C12.8594 4.69807 12.8145 4.74163 12.7597 4.77201L8.54484 7.10634C8.20953 7.29205 7.79063 7.29205 7.45532 7.10634L3.2405 4.77202C3.07335 4.67945 3.01915 4.47933 3.11944 4.32505C3.15235 4.27441 3.19956 4.23299 3.256 4.2052L7.50203 2.11498C7.81345 1.96167 8.18715 1.96168 8.49857 2.11499ZM14 6.02878V10.7642C14 11.1075 13.8049 11.4256 13.486 11.6022L9.24043 13.9536C9.07328 14.0461 8.85649 13.9961 8.7562 13.8418C8.72329 13.7912 8.7059 13.7333 8.7059 13.6742V8.93882C8.7059 8.59551 8.90104 8.27738 9.21997 8.10075L13.4655 5.74942C13.6326 5.65685 13.8494 5.70688 13.9497 5.86116C13.9826 5.91179 14 5.96973 14 6.02878ZM6.5145 8.31192L2.50483 6.04476C2.45303 6.01547 2.39375 6 2.33333 6C2.14924 6 2 6.14064 2 6.31412V10.88C2 11.211 2.1843 11.5178 2.4855 11.6881L6.49517 13.9552C6.54697 13.9845 6.60625 14 6.66667 14C6.85076 14 7 13.8594 7 13.6859V9.12C7 8.78898 6.8157 8.48223 6.5145 8.31192Z",fill:"white"}))}},1060:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Related=void 0;var o=n(4522);e.Related=function(){return(0,o.h)("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,o.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8 7H12C13.1046 7 14 7.89543 14 9V13C14 14.1046 13.1046 15 12 15H8C6.89543 15 6 14.1046 6 13V9C6 7.89543 6.89543 7 8 7ZM8 13H12V9H8V13Z",fill:"white"}),(0,o.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8 18H12C13.1046 18 14 18.8954 14 20V24C14 25.1046 13.1046 26 12 26H8C6.89543 26 6 25.1046 6 24V20C6 18.8954 6.89543 18 8 18ZM8 24H12V20H8V24Z",fill:"white"}),(0,o.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M24 7H20C18.8954 7 18 7.89543 18 9V13C18 14.1046 18.8954 15 20 15H24C25.1046 15 26 14.1046 26 13V9C26 7.89543 25.1046 7 24 7ZM24 13H20V9H24V13Z",fill:"white"}),(0,o.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M20 18H24C25.1046 18 26 18.8954 26 20V24C26 25.1046 25.1046 26 24 26H20C18.8954 26 18 25.1046 18 24V20C18 18.8954 18.8954 18 20 18ZM20 24H24V20H20V24Z",fill:"white"}))}},0:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Share=void 0;var o=n(4522);e.Share=function(){return(0,o.h)("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,o.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M22.6667 12.6667C24.5076 12.6667 26 11.1743 26 9.33333C26 7.49238 24.5076 6 22.6667 6C20.8257 6 19.3333 7.49238 19.3333 9.33333C19.3333 9.38882 19.3347 9.44399 19.3374 9.49881L11.9575 13.9443C11.3473 13.1665 10.3987 12.6667 9.33333 12.6667C7.49238 12.6667 6 14.1591 6 16C6 17.8409 7.49238 19.3333 9.33333 19.3333C10.3981 19.3333 11.3462 18.8341 11.9564 18.057L19.3374 22.5013C19.3347 22.5561 19.3333 22.6112 19.3333 22.6667C19.3333 24.5076 20.8257 26 22.6667 26C24.5076 26 26 24.5076 26 22.6667C26 20.8257 24.5076 19.3333 22.6667 19.3333C21.6074 19.3333 20.6636 19.8274 20.053 20.5976L12.864 16.2689L12.8651 15.7324L20.0531 11.4025C20.6637 12.1727 21.6075 12.6667 22.6667 12.6667ZM22.6667 10.6667C21.9303 10.6667 21.3333 10.0697 21.3333 9.33333C21.3333 8.59695 21.9303 8 22.6667 8C23.403 8 24 8.59695 24 9.33333C24 10.0697 23.403 10.6667 22.6667 10.6667ZM9.33333 17.3333C8.59695 17.3333 8 16.7364 8 16C8 15.2636 8.59695 14.6667 9.33333 14.6667C10.0697 14.6667 10.6667 15.2636 10.6667 16C10.6667 16.7364 10.0697 17.3333 9.33333 17.3333ZM21.3333 22.6667C21.3333 23.403 21.9303 24 22.6667 24C23.403 24 24 23.403 24 22.6667C24 21.9303 23.403 21.3333 22.6667 21.3333C21.9303 21.3333 21.3333 21.9303 21.3333 22.6667Z",fill:"white"}))}},3410:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Switch=void 0;var o=n(4522);e.Switch=function(){return(0,o.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,o.h)("path",{d:"M17.6744 9.27934L21.7563 13.3632L21.8282 13.4537L21.887 13.5492L21.9333 13.6489L21.9684 13.7556L21.9824 13.8172L21.9974 13.929L22 14L21.9897 14.1405L21.9824 14.1828L21.9535 14.2949L21.9231 14.3759L21.887 14.4508L21.8281 14.5463L21.7763 14.6137L21.7207 14.6744L17.6744 18.7207C17.3019 19.0931 16.6981 19.0931 16.3256 18.7207C15.9818 18.3769 15.9554 17.8359 16.2463 17.4617L16.3256 17.3719L18.7439 14.9536L12.9537 14.9537C12.4675 14.9537 12.0663 14.5899 12.0074 14.1196L12 14C12 13.5109 12.3682 13.1078 12.8425 13.0527L12.9537 13.0463L18.7426 13.0451L16.3256 10.6281C15.9798 10.2823 15.9551 9.73687 16.2515 9.36252L16.3256 9.27934C16.6981 8.90689 17.3019 8.90689 17.6744 9.27934ZM6.32562 5.27934C6.69807 4.90689 7.30193 4.90689 7.67438 5.27934L7.74849 5.36252C8.04493 5.73687 8.02023 6.28225 7.67438 6.6281L5.2574 9.04508L11.0463 9.04628L11.1575 9.0527C11.6318 9.10779 12 9.5109 12 10L11.9926 10.1196C11.9337 10.5899 11.5325 10.9537 11.0463 10.9537L5.25605 10.9536L7.67438 13.3719L7.75372 13.4617C8.04463 13.8359 8.01818 14.3769 7.67438 14.7207C7.30193 15.0931 6.69807 15.0931 6.32562 14.7207L2.25793 10.6523L2.18664 10.5668L2.12413 10.4708L2.07695 10.3759L2.03697 10.2639L2.01028 10.1405L2 10C2 9.95226 2.00351 9.90534 2.01036 9.85937L2.01758 9.81716L2.04651 9.70514L2.08932 9.59642L2.12415 9.52899L2.18631 9.43351L2.24369 9.36325L6.32562 5.27934Z",fill:"white"}))}},9731:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Icon=e.IconSize=void 0;var o,r=n(4522),i=n(4184),a=n(9294),s=n(5839);!function(t){t.small="small",t.medium="medium",t.large="large"}(o=e.IconSize||(e.IconSize={})),e.Icon=function(t){var e=a.Icons[t.name];return e?(0,r.h)("div",{className:i(s.iconWrapper,s[t.size])},(0,r.h)(e,null)):null},e.Icon.defaultProps={size:o.medium}},3266:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EventsManager=void 0;var n=function(){function t(){this._eventListeners={},this._wildcardEventListeners=[]}return t.prototype.on=function(t,e){"*"!==t?(this._eventListeners[t]||(this._eventListeners[t]=[])).push(e):this._wildcardEventListeners.push(e)},t.prototype.off=function(t,e){if("*"!==t){var n=this._eventListeners[t];n&&n.splice(n.indexOf(e)>>>0,1)}else this._wildcardEventListeners.splice(this._wildcardEventListeners.indexOf(e)>>>0,1)},t.prototype.emit=function(t){(this._eventListeners[t.type]||[]).slice().map((function(e){e(t)})),this._wildcardEventListeners.slice().map((function(e){e(t)}))},t}();e.EventsManager=n},3181:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InjectedComponent=void 0;var o=n(6425);Object.defineProperty(e,"InjectedComponent",{enumerable:!0,get:function(){return o.InjectedComponent}})},6425:function(t,e,n){"use strict";var o,r=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.InjectedComponent=void 0;var i=n(4522),a=n(5070),s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._root=null,e}return r(e,t),e.prototype.shouldComponentUpdate=function(){return!1},e.prototype.componentDidMount=function(){var t=this.props,e=t.onCreate;if(t.label,e){var n=this._root;n&&e({parent:n})}},e.prototype.componentWillUnmount=function(){var t=this.props,e=t.onDestroy,n=(t.label,this._root);n&&e&&e({parent:n})},e.prototype.render=function(){var t=this,e=this.props,n=e.label,o=e.fillContainer?a.fillContainer:"";return(0,i.h)("div",{"data-contrib-injected":n,className:o,ref:function(e){return t._root=e}})},e}(i.Component);e.InjectedComponent=s},6227:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getVideoSize=e.getPlayerSize=void 0,e.getPlayerSize=function(t){return t?t.dimensions:{width:0,height:0}},e.getVideoSize=function(t){if(!t)return{width:0,height:0};var e=t.getActiveTracks().video;return e&&void 0!==e.width&&void 0!==e.height?{width:e.width,height:e.height}:t.getVideoElement()?{width:t.getVideoElement().videoWidth,height:t.getVideoElement().videoHeight}:{width:0,height:0}}},9350:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UUID=void 0;var n=function(){function t(){}return t.uuidV1=function(){return"".concat(Date.now(),"-").concat(Math.random())},t}();e.UUID=n},4184:(t,e)=>{var n;!function(){"use strict";var o={}.hasOwnProperty;function r(){for(var t=[],e=0;e<arguments.length;e++){var n=arguments[e];if(n){var i=typeof n;if("string"===i||"number"===i)t.push(n);else if(Array.isArray(n)){if(n.length){var a=r.apply(null,n);a&&t.push(a)}}else if("object"===i){if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]")){t.push(n.toString());continue}for(var s in n)o.call(n,s)&&n[s]&&t.push(s)}}}return t.join(" ")}t.exports?(r.default=r,t.exports=r):void 0===(n=function(){return r}.apply(e,[]))||(t.exports=n)}()},4137:(t,e,n)=>{"use strict";n.d(e,{IV:()=>c,ZP:()=>u,aW:()=>s,bH:()=>p,yG:()=>l});var o=n(7537),r=n.n(o),i=n(3645),a=n.n(i)()(r());a.push([t.id,".playkit-iconWrapper_XI.playkit-small_S5{width:16px;height:16px}.playkit-iconWrapper_XI.playkit-medium_Jb{width:24px;height:24px}.playkit-iconWrapper_XI.playkit-large_dv{width:32px;height:32px}.playkit-iconWrapper_XI>svg{width:100%;height:100%}","",{version:3,sources:["webpack://./node_modules/@playkit-js/common/dist/icon/icon.scss"],names:[],mappings:"AAAA,yCAAmB,UAAU,CAAC,WAAW,CAAC,0CAAoB,UAAU,CAAC,WAAW,CAAC,yCAAmB,UAAU,CAAC,WAAW,CAAC,4BAAiB,UAAU,CAAC,WAAW",sourcesContent:[".iconWrapper.small{width:16px;height:16px}.iconWrapper.medium{width:24px;height:24px}.iconWrapper.large{width:32px;height:32px}.iconWrapper>svg{width:100%;height:100%}"],sourceRoot:""}]);var s="playkit-iconWrapper_XI",l="playkit-small_S5",c="playkit-medium_Jb",p="playkit-large_dv";const u=a},6426:(t,e,n)=>{"use strict";n.d(e,{V:()=>s,Z:()=>l});var o=n(7537),r=n.n(o),i=n(3645),a=n.n(i)()(r());a.push([t.id,".playkit-fill-container_nM{width:100%;height:100%;overflow:hidden}","",{version:3,sources:["webpack://./node_modules/@playkit-js/common/dist/ui-common/injected-component/injected-component.scss"],names:[],mappings:"AAAA,2BAAgB,UAAU,CAAC,WAAW,CAAC,eAAe",sourcesContent:[".fill-container{width:100%;height:100%;overflow:hidden}"],sourceRoot:""}]);var s="playkit-fill-container_nM";const l=a},8824:(t,e,n)=>{"use strict";n.d(e,{Ah:()=>c,Cg:()=>l,ZP:()=>d,bH:()=>u,ce:()=>s,yG:()=>p});var o=n(7537),r=n.n(o),i=n(3645),a=n.n(i)()(r());a.push([t.id,".playkit-bannerContainerRoot_If{position:absolute;max-width:100%;min-width:270px;padding:0 16px 8px;height:88px;bottom:0;left:0;transition:all .5s ease}.playkit-bannerContainer_Pb{position:relative;width:100%;height:100%;border-radius:4px;transition:all .5s ease}.playkit-closeButton__6{position:absolute;background-color:rgba(0,0,0,0);padding:0;border:none;top:0;right:0;width:32px;height:32px;padding:0}.playkit-closeButton__6 .playkit-small_Hx{display:none}.playkit-closeButton__6:hover,.playkit-closeButton__6:active{cursor:pointer}.playkit-size-md .playkit-bannerContainerRoot_If{height:68px;min-width:230px}.playkit-size-md .playkit-closeButton__6{top:8px;right:8px;width:10px;height:10px}.playkit-size-md .playkit-closeButton__6 .playkit-large_v4{display:none}.playkit-size-md .playkit-closeButton__6 .playkit-small_Hx{display:block}.playkit-size-sm .playkit-bannerContainerRoot_If,.playkit-size-xs .playkit-bannerContainerRoot_If,.playkit-size-ty .playkit-bannerContainerRoot_If{display:none;width:0;height:0}","",{version:3,sources:["webpack://./src/services/banner-manager/ui/banner-container/banner-container.scss"],names:[],mappings:"AAAA,gCAAqB,iBAAiB,CAAC,cAAc,CAAC,eAAe,CAAC,kBAAkB,CAAC,WAAW,CAAC,QAAQ,CAAC,MAAM,CAAC,uBAAuB,CAAC,4BAAiB,iBAAiB,CAAC,UAAU,CAAC,WAAW,CAAC,iBAAiB,CAAC,uBAAuB,CAAC,wBAAa,iBAAiB,CAAC,8BAA8B,CAAC,SAAS,CAAC,WAAW,CAAC,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,WAAW,CAAC,SAAS,CAAC,0CAAoB,YAAY,CAAC,6DAAuC,cAAc,CAAC,iDAAqD,WAAW,CAAC,eAAe,CAAC,yCAA6C,OAAO,CAAC,SAAS,CAAC,UAAU,CAAC,WAAW,CAAC,2DAAoD,YAAY,CAAC,2DAAoD,aAAa,CAAC,mJAA+J,YAAY,CAAC,OAAO,CAAC,QAAQ",sourcesContent:[".bannerContainerRoot{position:absolute;max-width:100%;min-width:270px;padding:0 16px 8px;height:88px;bottom:0;left:0;transition:all .5s ease}.bannerContainer{position:relative;width:100%;height:100%;border-radius:4px;transition:all .5s ease}.closeButton{position:absolute;background-color:rgba(0,0,0,0);padding:0;border:none;top:0;right:0;width:32px;height:32px;padding:0}.closeButton .small{display:none}.closeButton:hover,.closeButton:active{cursor:pointer}:global .playkit-size-md :local .bannerContainerRoot{height:68px;min-width:230px}:global .playkit-size-md :local .closeButton{top:8px;right:8px;width:10px;height:10px}:global .playkit-size-md :local .closeButton .large{display:none}:global .playkit-size-md :local .closeButton .small{display:block}:global .playkit-size-sm :local .bannerContainerRoot,:global .playkit-size-xs :local .bannerContainerRoot,:global .playkit-size-ty :local .bannerContainerRoot{display:none;width:0;height:0}"],sourceRoot:""}]);var s="playkit-bannerContainerRoot_If",l="playkit-bannerContainer_Pb",c="playkit-closeButton__6",p="playkit-small_Hx",u="playkit-large_v4";const d=a},4769:(t,e,n)=>{"use strict";n.d(e,{Fu:()=>c,TN:()=>f,Wd:()=>l,ZP:()=>y,aW:()=>p,bH:()=>C,cy:()=>u,d7:()=>h,fL:()=>A,m0:()=>s,yG:()=>d});var o=n(7537),r=n.n(o),i=n(3645),a=n.n(i)()(r());a.push([t.id,".playkit-defaultBannerRoot_CP{display:flex;max-width:100%;height:100%;transition:all .5s ease;text-align:left}.playkit-bannerWrapper_co{padding:18px 17px 17px 16px}.playkit-iconContainer_sj{height:100%;width:64px}.playkit-iconWrapper_a5{position:relative;height:48px;width:48px;background-color:rgba(255,255,255,.14);border-radius:50%;transition:all .5s ease}.playkit-iconImage_BL{position:absolute;width:32px;height:32px;left:calc(50% - 16px);top:calc(50% - 16px);transition:all .5s ease;padding:0}.playkit-iconImage_BL .playkit-small_bv{display:none}.playkit-bannerBody_Fj{height:100%;flex:1 1 auto;overflow:hidden}.playkit-title_vu{opacity:.9;font-size:14px;font-weight:normal;font-style:normal;font-stretch:normal;line-height:1;letter-spacing:normal;color:#ebebeb}.playkit-text_OX{opacity:.9;font-size:24px;font-weight:normal;font-style:normal;font-stretch:normal;line-height:1.21;letter-spacing:normal;color:#fff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;transition:all .5s ease}.playkit-size-md .playkit-bannerWrapper_co{padding:14px 16px 14px}.playkit-size-md .playkit-iconContainer_sj{width:44px}.playkit-size-md .playkit-iconWrapper_a5{height:32px;width:32px}.playkit-size-md .playkit-iconImage_BL{width:20px;height:20px;left:calc(50% - 10px);top:calc(50% - 10px)}.playkit-size-md .playkit-iconImage_BL .playkit-small_bv{display:block}.playkit-size-md .playkit-iconImage_BL .playkit-large_Ii{display:none}.playkit-size-md .playkit-bannerBody_Fj{flex:1 1 auto}.playkit-size-md .playkit-title_vu{font-size:12px;font-weight:bold;line-height:1.17}.playkit-size-md .playkit-text_OX{font-size:15px;line-height:1.27}","",{version:3,sources:["webpack://./src/services/banner-manager/ui/banner/banner.scss"],names:[],mappings:"AAAA,8BAAmB,YAAY,CAAC,cAAc,CAAC,WAAW,CAAC,uBAAuB,CAAC,eAAe,CAAC,0BAAe,2BAA2B,CAAC,0BAAe,WAAW,CAAC,UAAU,CAAC,wBAAa,iBAAiB,CAAC,WAAW,CAAC,UAAU,CAAC,sCAAsC,CAAC,iBAAiB,CAAC,uBAAuB,CAAC,sBAAW,iBAAiB,CAAC,UAAU,CAAC,WAAW,CAAC,qBAAqB,CAAC,oBAAoB,CAAC,uBAAuB,CAAC,SAAS,CAAC,wCAAkB,YAAY,CAAC,uBAAY,WAAW,CAAC,aAAa,CAAC,eAAe,CAAC,kBAAO,UAAU,CAAC,cAAc,CAAC,kBAAkB,CAAC,iBAAiB,CAAC,mBAAmB,CAAC,aAAa,CAAC,qBAAqB,CAAC,aAAa,CAAC,iBAAM,UAAU,CAAC,cAAc,CAAC,kBAAkB,CAAC,iBAAiB,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,qBAAqB,CAAC,UAAU,CAAC,kBAAkB,CAAC,eAAe,CAAC,sBAAsB,CAAC,uBAAuB,CAAC,2CAA+C,sBAAsB,CAAC,2CAA+C,UAAU,CAAC,yCAA6C,WAAW,CAAC,UAAU,CAAC,uCAA2C,UAAU,CAAC,WAAW,CAAC,qBAAqB,CAAC,oBAAoB,CAAC,yDAAkD,aAAa,CAAC,yDAAkD,YAAY,CAAC,wCAA4C,aAAa,CAAC,mCAAuC,cAAc,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,kCAAsC,cAAc,CAAC,gBAAgB",sourcesContent:[".defaultBannerRoot{display:flex;max-width:100%;height:100%;transition:all .5s ease;text-align:left}.bannerWrapper{padding:18px 17px 17px 16px}.iconContainer{height:100%;width:64px}.iconWrapper{position:relative;height:48px;width:48px;background-color:rgba(255,255,255,.14);border-radius:50%;transition:all .5s ease}.iconImage{position:absolute;width:32px;height:32px;left:calc(50% - 16px);top:calc(50% - 16px);transition:all .5s ease;padding:0}.iconImage .small{display:none}.bannerBody{height:100%;flex:1 1 auto;overflow:hidden}.title{opacity:.9;font-size:14px;font-weight:normal;font-style:normal;font-stretch:normal;line-height:1;letter-spacing:normal;color:#ebebeb}.text{opacity:.9;font-size:24px;font-weight:normal;font-style:normal;font-stretch:normal;line-height:1.21;letter-spacing:normal;color:#fff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;transition:all .5s ease}:global .playkit-size-md :local .bannerWrapper{padding:14px 16px 14px}:global .playkit-size-md :local .iconContainer{width:44px}:global .playkit-size-md :local .iconWrapper{height:32px;width:32px}:global .playkit-size-md :local .iconImage{width:20px;height:20px;left:calc(50% - 10px);top:calc(50% - 10px)}:global .playkit-size-md :local .iconImage .small{display:block}:global .playkit-size-md :local .iconImage .large{display:none}:global .playkit-size-md :local .bannerBody{flex:1 1 auto}:global .playkit-size-md :local .title{font-size:12px;font-weight:bold;line-height:1.17}:global .playkit-size-md :local .text{font-size:15px;line-height:1.27}"],sourceRoot:""}]);var s="playkit-defaultBannerRoot_CP",l="playkit-bannerWrapper_co",c="playkit-iconContainer_sj",p="playkit-iconWrapper_a5",u="playkit-iconImage_BL",d="playkit-small_bv",h="playkit-bannerBody_Fj",f="playkit-title_vu",A="playkit-text_OX",C="playkit-large_Ii";const y=a},2023:(t,e,n)=>{"use strict";n.d(e,{V:()=>s,Z:()=>l});var o=n(7537),r=n.n(o),i=n(3645),a=n.n(i)()(r());a.push([t.id,".playkit-fill-container_Ah{width:100%;height:100%}","",{version:3,sources:["webpack://./src/services/preset-manager/ui/managed-component.scss"],names:[],mappings:"AAAA,2BAAgB,UAAU,CAAC,WAAW",sourcesContent:[".fill-container{width:100%;height:100%}"],sourceRoot:""}]);var s="playkit-fill-container_Ah";const l=a},499:(t,e,n)=>{"use strict";n.d(e,{Mk:()=>s,ZP:()=>c,uj:()=>l});var o=n(7537),r=n.n(o),i=n(3645),a=n.n(i)()(r());a.push([t.id,".playkit-side-panel-wrapper_Wr{visibility:hidden;position:absolute;width:100%;height:100%}.playkit-active-state_vh{visibility:visible}","",{version:3,sources:["webpack://./src/services/side-panels-manager/ui/panel-item-wrapper/panel-item-wrapper.component.scss"],names:[],mappings:"AAAA,+BAAoB,iBAAiB,CAAC,iBAAiB,CAAC,UAAU,CAAC,WAAW,CAAC,yBAAc,kBAAkB",sourcesContent:[".side-panel-wrapper{visibility:hidden;position:absolute;width:100%;height:100%}.active-state{visibility:visible}"],sourceRoot:""}]);var s="playkit-side-panel-wrapper_Wr",l="playkit-active-state_vh";const c=a},6761:(t,e,n)=>{"use strict";n.d(e,{Ah:()=>d,Fu:()=>A,GK:()=>s,Jc:()=>u,Qm:()=>c,Rr:()=>l,TN:()=>h,X$:()=>f,ZP:()=>v,aW:()=>C,fL:()=>y,x_:()=>p});var o=n(7537),r=n.n(o),i=n(3645),a=n.n(i)()(r());a.push([t.id,".playkit-toastWrapper_Ys{position:relative;min-width:120px;max-width:310px;height:100%;border-radius:4px;background-color:#222;border-left-style:solid;border-left-width:2px;text-align:left;padding:8px}.playkit-infoToast_Xh{border-left-color:var(--playkit-primary-color)}.playkit-successToast_g_{border-left-color:var(--playkit-success-color)}.playkit-warnToast_w7{border-left-color:var(--playkit-warning-color)}.playkit-errorToast_t6{border-left-color:var(--playkit-danger-color)}.playkit-closeButton_zr{position:absolute;background-color:rgba(0,0,0,0);top:0;right:0;width:16px;height:16px;object-fit:contain;background-repeat:no-repeat;border:none;padding:0;margin-top:8px;margin-right:8px}.playkit-closeButton_zr:hover{cursor:pointer}.playkit-title_SE{font-size:12px;font-weight:normal;font-style:normal;font-stretch:normal;line-height:1.17;letter-spacing:normal;color:var(--playkit-tone-1-color);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding-top:4px;padding-right:16px}.playkit-toastBody_YK{position:relative;width:100%;padding:0px 16px 5px 0px;margin-top:8px}.playkit-iconContainer_dR{position:relative;height:16px;width:16px;float:left;margin-right:7px}.playkit-iconWrapper_C5{height:16px;width:16px}.playkit-text_XI{font-size:14px;font-weight:bold;font-style:normal;font-stretch:normal;line-height:normal;letter-spacing:normal;color:var(--playkit-tone-1-color);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}","",{version:3,sources:["webpack://./src/services/toast-manager/ui/toast/toast.scss"],names:[],mappings:"AAAA,yBAAc,iBAAiB,CAAC,eAAe,CAAC,eAAe,CAAC,WAAW,CAAC,iBAAiB,CAAC,qBAAqB,CAAC,uBAAuB,CAAC,qBAAqB,CAAC,eAAe,CAAC,WAAW,CAAC,sBAAW,8CAA8C,CAAC,yBAAc,8CAA8C,CAAC,sBAAW,8CAA8C,CAAC,uBAAY,6CAA6C,CAAC,wBAAa,iBAAiB,CAAC,8BAA8B,CAAC,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,WAAW,CAAC,kBAAkB,CAAC,2BAA2B,CAAC,WAAW,CAAC,SAAS,CAAC,cAAc,CAAC,gBAAgB,CAAC,8BAAmB,cAAc,CAAC,kBAAO,cAAc,CAAC,kBAAkB,CAAC,iBAAiB,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,qBAAqB,CAAC,iCAAiC,CAAC,kBAAkB,CAAC,eAAe,CAAC,sBAAsB,CAAC,eAAe,CAAC,kBAAkB,CAAC,sBAAW,iBAAiB,CAAC,UAAU,CAAC,wBAAwB,CAAC,cAAc,CAAC,0BAAe,iBAAiB,CAAC,WAAW,CAAC,UAAU,CAAC,UAAU,CAAC,gBAAgB,CAAC,wBAAa,WAAW,CAAC,UAAU,CAAC,iBAAM,cAAc,CAAC,gBAAgB,CAAC,iBAAiB,CAAC,mBAAmB,CAAC,kBAAkB,CAAC,qBAAqB,CAAC,iCAAiC,CAAC,kBAAkB,CAAC,eAAe,CAAC,sBAAsB",sourcesContent:[".toastWrapper{position:relative;min-width:120px;max-width:310px;height:100%;border-radius:4px;background-color:#222;border-left-style:solid;border-left-width:2px;text-align:left;padding:8px}.infoToast{border-left-color:var(--playkit-primary-color)}.successToast{border-left-color:var(--playkit-success-color)}.warnToast{border-left-color:var(--playkit-warning-color)}.errorToast{border-left-color:var(--playkit-danger-color)}.closeButton{position:absolute;background-color:rgba(0,0,0,0);top:0;right:0;width:16px;height:16px;object-fit:contain;background-repeat:no-repeat;border:none;padding:0;margin-top:8px;margin-right:8px}.closeButton:hover{cursor:pointer}.title{font-size:12px;font-weight:normal;font-style:normal;font-stretch:normal;line-height:1.17;letter-spacing:normal;color:var(--playkit-tone-1-color);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding-top:4px;padding-right:16px}.toastBody{position:relative;width:100%;padding:0px 16px 5px 0px;margin-top:8px}.iconContainer{position:relative;height:16px;width:16px;float:left;margin-right:7px}.iconWrapper{height:16px;width:16px}.text{font-size:14px;font-weight:bold;font-style:normal;font-stretch:normal;line-height:normal;letter-spacing:normal;color:var(--playkit-tone-1-color);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}"],sourceRoot:""}]);var s="playkit-toastWrapper_Ys",l="playkit-infoToast_Xh",c="playkit-successToast_g_",p="playkit-warnToast_w7",u="playkit-errorToast_t6",d="playkit-closeButton_zr",h="playkit-title_SE",f="playkit-toastBody_YK",A="playkit-iconContainer_dR",C="playkit-iconWrapper_C5",y="playkit-text_XI";const v=a},9857:(t,e,n)=>{"use strict";n.d(e,{Oq:()=>d,Q$:()=>s,YY:()=>p,ZP:()=>h,f6:()=>l,hT:()=>u,w3:()=>c});var o=n(7537),r=n.n(o),i=n(3645),a=n.n(i)()(r());a.push([t.id,".playkit-toastsContainer_Ev{position:absolute;min-width:120px;max-width:310px;display:flex;flex-direction:column;z-index:2}.playkit-toastsContainer_Ev.playkit-top-right_fC{right:0;top:0}.playkit-toastsContainer_Ev.playkit-top-left_Pi{left:0;top:0}.playkit-toastsContainer_Ev.playkit-top-left_Pi .playkit-toastRow_Va{align-self:flex-start}.playkit-toastsContainer_Ev.playkit-bottom-right_KT{right:0;bottom:0}.playkit-toastsContainer_Ev.playkit-bottom-left_Dx{left:0;bottom:0}.playkit-toastsContainer_Ev.playkit-bottom-left_Dx .playkit-toastRow_Va{align-self:flex-start}.playkit-toastRow_Va{height:58px;min-width:120px;max-width:310px;margin-top:8px;overflow:hidden;overflow-wrap:break-word;text-overflow:ellipsis;align-self:flex-end}","",{version:3,sources:["webpack://./src/services/toast-manager/ui/toasts-container/toasts-container.scss"],names:[],mappings:"AAAA,4BAAiB,iBAAiB,CAAC,eAAe,CAAC,eAAe,CAAC,YAAY,CAAC,qBAAqB,CAAC,SAAS,CAAC,iDAA2B,OAAO,CAAC,KAAK,CAAC,gDAA0B,MAAM,CAAC,KAAK,CAAC,qEAAoC,qBAAqB,CAAC,oDAA8B,OAAO,CAAC,QAAQ,CAAC,mDAA6B,MAAM,CAAC,QAAQ,CAAC,wEAAuC,qBAAqB,CAAC,qBAAU,WAAW,CAAC,eAAe,CAAC,eAAe,CAAC,cAAc,CAAC,eAAe,CAAC,wBAAwB,CAAC,sBAAsB,CAAC,mBAAmB",sourcesContent:[".toastsContainer{position:absolute;min-width:120px;max-width:310px;display:flex;flex-direction:column;z-index:2}.toastsContainer.top-right{right:0;top:0}.toastsContainer.top-left{left:0;top:0}.toastsContainer.top-left .toastRow{align-self:flex-start}.toastsContainer.bottom-right{right:0;bottom:0}.toastsContainer.bottom-left{left:0;bottom:0}.toastsContainer.bottom-left .toastRow{align-self:flex-start}.toastRow{height:58px;min-width:120px;max-width:310px;margin-top:8px;overflow:hidden;overflow-wrap:break-word;text-overflow:ellipsis;align-self:flex-end}"],sourceRoot:""}]);var s="playkit-toastsContainer_Ev",l="playkit-top-right_fC",c="playkit-top-left_Pi",p="playkit-toastRow_Va",u="playkit-bottom-right_KT",d="playkit-bottom-left_Dx";const h=a},6477:(t,e,n)=>{"use strict";n.d(e,{A:()=>s,Z:()=>l});var o=n(7537),r=n.n(o),i=n(3645),a=n.n(i)()(r());a.push([t.id,".playkit-right-upper-bar-wrapper-container_Vm{direction:ltr;display:flex;align-items:center}","",{version:3,sources:["webpack://./src/services/upper-bar-manager/ui/displayed-bar/displayed-bar.component.scss"],names:[],mappings:"AAAA,8CAAmC,aAAa,CAAC,YAAY,CAAC,kBAAkB",sourcesContent:[".right-upper-bar-wrapper-container{direction:ltr;display:flex;align-items:center}"],sourceRoot:""}]);var s="playkit-right-upper-bar-wrapper-container_Vm";const l=a},4778:(t,e,n)=>{"use strict";n.d(e,{Af:()=>d,ZP:()=>h,_h:()=>c,aT:()=>u,mB:()=>s,qv:()=>l,rd:()=>p});var o=n(7537),r=n.n(o),i=n(3645),a=n.n(i)()(r());a.push([t.id,".playkit-dropdown-item_kw{border-radius:4px;padding:4px 12px 4px 15px;display:flex;margin:4px 0;cursor:pointer;align-items:center}.playkit-dropdown-item_kw .playkit-icon_tv{width:24px;height:24px;display:flex;align-items:center;justify-content:center}.playkit-dropdown-item_kw .playkit-icon_tv i{display:inline-block}.playkit-dropdown-item_kw:hover{background-color:var(--playkit-tone-6-color)}.playkit-dropdown-item_kw .playkit-dropdown-item-description_Al{flex:1;font-size:14px;font-weight:700;padding-left:11px;overflow:hidden;white-space:nowrap}.playkit-dropdown-item_kw .playkit-dropdown-item-description_Al.playkit-trim-text_Kj{text-overflow:ellipsis}.playkit-dropdown-item_kw .playkit-comparison-text_OS{position:absolute;font-size:14px;font-weight:700;left:0;padding:0}.playkit-more-item-tooltip_y7{z-index:1}","",{version:3,sources:["webpack://./src/services/upper-bar-manager/ui/dropdown-bar-item/dropdown-bar-item.scss"],names:[],mappings:"AAAA,0BAAe,iBAAiB,CAAC,yBAAyB,CAAC,YAAY,CAAC,YAAY,CAAC,cAAc,CAAC,kBAAkB,CAAC,2CAAqB,UAAU,CAAC,WAAW,CAAC,YAAY,CAAC,kBAAkB,CAAC,sBAAsB,CAAC,6CAAuB,oBAAoB,CAAC,gCAAqB,4CAA4C,CAAC,gEAA0C,MAAM,CAAC,cAAc,CAAC,eAAe,CAAC,iBAAiB,CAAC,eAAe,CAAC,kBAAkB,CAAC,qFAAoD,sBAAsB,CAAC,sDAAgC,iBAAiB,CAAC,cAAc,CAAC,eAAe,CAAC,MAAM,CAAC,SAAS,CAAC,8BAAmB,SAAS",sourcesContent:[".dropdown-item{border-radius:4px;padding:4px 12px 4px 15px;display:flex;margin:4px 0;cursor:pointer;align-items:center}.dropdown-item .icon{width:24px;height:24px;display:flex;align-items:center;justify-content:center}.dropdown-item .icon i{display:inline-block}.dropdown-item:hover{background-color:var(--playkit-tone-6-color)}.dropdown-item .dropdown-item-description{flex:1;font-size:14px;font-weight:700;padding-left:11px;overflow:hidden;white-space:nowrap}.dropdown-item .dropdown-item-description.trim-text{text-overflow:ellipsis}.dropdown-item .comparison-text{position:absolute;font-size:14px;font-weight:700;left:0;padding:0}.more-item-tooltip{z-index:1}"],sourceRoot:""}]);var s="playkit-dropdown-item_kw",l="playkit-icon_tv",c="playkit-dropdown-item-description_Al",p="playkit-trim-text_Kj",u="playkit-comparison-text_OS",d="playkit-more-item-tooltip_y7";const h=a},3206:(t,e,n)=>{"use strict";n.d(e,{Z:()=>l,p:()=>s});var o=n(7537),r=n.n(o),i=n(3645),a=n.n(i)()(r());a.push([t.id,".playkit-more-dropdown_SJ{position:absolute;padding:8px 4px;width:200px;background-color:var(--playkit-tone-7-color);border-radius:4px;top:44px;right:0;overflow:hidden}","",{version:3,sources:["webpack://./src/services/upper-bar-manager/ui/dropdown-bar/dropdown-bar.component.scss"],names:[],mappings:"AAAA,0BAAe,iBAAiB,CAAC,eAAe,CAAC,WAAW,CAAC,4CAA4C,CAAC,iBAAiB,CAAC,QAAQ,CAAC,OAAO,CAAC,eAAe",sourcesContent:[".more-dropdown{position:absolute;padding:8px 4px;width:200px;background-color:var(--playkit-tone-7-color);border-radius:4px;top:44px;right:0;overflow:hidden}"],sourceRoot:""}]);var s="playkit-more-dropdown_SJ";const l=a},324:(t,e,n)=>{"use strict";n.d(e,{W:()=>s,Z:()=>l});var o=n(7537),r=n.n(o),i=n(3645),a=n.n(i)()(r());a.push([t.id,".playkit-more-icon_fR{margin-right:0;z-index:2}","",{version:3,sources:["webpack://./src/services/upper-bar-manager/ui/more-icon/more-icon.component.scss"],names:[],mappings:"AAAA,sBAAW,cAAc,CAAC,SAAS",sourcesContent:[".more-icon{margin-right:0;z-index:2}"],sourceRoot:""}]);var s="playkit-more-icon_fR";const l=a},3645:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n="",o=void 0!==e[5];return e[4]&&(n+="@supports (".concat(e[4],") {")),e[2]&&(n+="@media ".concat(e[2]," {")),o&&(n+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),n+=t(e),o&&(n+="}"),e[2]&&(n+="}"),e[4]&&(n+="}"),n})).join("")},e.i=function(t,n,o,r,i){"string"==typeof t&&(t=[[null,t,void 0]]);var a={};if(o)for(var s=0;s<this.length;s++){var l=this[s][0];null!=l&&(a[l]=!0)}for(var c=0;c<t.length;c++){var p=[].concat(t[c]);o&&a[p[0]]||(void 0!==i&&(void 0===p[5]||(p[1]="@layer".concat(p[5].length>0?" ".concat(p[5]):""," {").concat(p[1],"}")),p[5]=i),n&&(p[2]?(p[1]="@media ".concat(p[2]," {").concat(p[1],"}"),p[2]=n):p[2]=n),r&&(p[4]?(p[1]="@supports (".concat(p[4],") {").concat(p[1],"}"),p[4]=r):p[4]="".concat(r)),e.push(p))}},e}},7537:t=>{"use strict";t.exports=function(t){var e=t[1],n=t[3];if(!n)return e;if("function"==typeof btoa){var o=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),r="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(o),i="/*# ".concat(r," */"),a=n.sources.map((function(t){return"/*# sourceURL=".concat(n.sourceRoot||"").concat(t," */")}));return[e].concat(a).concat([i]).join("\n")}return[e].join("\n")}},5839:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>y,iconWrapper:()=>A.aW,large:()=>A.bH,medium:()=>A.IV,small:()=>A.yG});var o=n(3379),r=n.n(o),i=n(7795),a=n.n(i),s=n(569),l=n.n(s),c=n(3565),p=n.n(c),u=n(9216),d=n.n(u),h=n(4589),f=n.n(h),A=n(4137),C={};C.styleTagTransform=f(),C.setAttributes=p(),C.insert=l().bind(null,"head"),C.domAPI=a(),C.insertStyleElement=d(),r()(A.ZP,C);const y=A.ZP&&A.ZP.locals?A.ZP.locals:void 0},5070:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>y,fillContainer:()=>A.V});var o=n(3379),r=n.n(o),i=n(7795),a=n.n(i),s=n(569),l=n.n(s),c=n(3565),p=n.n(c),u=n(9216),d=n.n(u),h=n(4589),f=n.n(h),A=n(6426),C={};C.styleTagTransform=f(),C.setAttributes=p(),C.insert=l().bind(null,"head"),C.domAPI=a(),C.insertStyleElement=d(),r()(A.Z,C);const y=A.Z&&A.Z.locals?A.Z.locals:void 0},179:(t,e,n)=>{"use strict";n.r(e),n.d(e,{bannerContainer:()=>A.Cg,bannerContainerRoot:()=>A.ce,closeButton:()=>A.Ah,default:()=>y,large:()=>A.bH,small:()=>A.yG});var o=n(3379),r=n.n(o),i=n(7795),a=n.n(i),s=n(569),l=n.n(s),c=n(3565),p=n.n(c),u=n(9216),d=n.n(u),h=n(4589),f=n.n(h),A=n(8824),C={};C.styleTagTransform=f(),C.setAttributes=p(),C.insert=l().bind(null,"head"),C.domAPI=a(),C.insertStyleElement=d(),r()(A.ZP,C);const y=A.ZP&&A.ZP.locals?A.ZP.locals:void 0},3665:(t,e,n)=>{"use strict";n.r(e),n.d(e,{bannerBody:()=>A.d7,bannerWrapper:()=>A.Wd,default:()=>y,defaultBannerRoot:()=>A.m0,iconContainer:()=>A.Fu,iconImage:()=>A.cy,iconWrapper:()=>A.aW,large:()=>A.bH,small:()=>A.yG,text:()=>A.fL,title:()=>A.TN});var o=n(3379),r=n.n(o),i=n(7795),a=n.n(i),s=n(569),l=n.n(s),c=n(3565),p=n.n(c),u=n(9216),d=n.n(u),h=n(4589),f=n.n(h),A=n(4769),C={};C.styleTagTransform=f(),C.setAttributes=p(),C.insert=l().bind(null,"head"),C.domAPI=a(),C.insertStyleElement=d(),r()(A.ZP,C);const y=A.ZP&&A.ZP.locals?A.ZP.locals:void 0},8676:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>y,fillContainer:()=>A.V});var o=n(3379),r=n.n(o),i=n(7795),a=n.n(i),s=n(569),l=n.n(s),c=n(3565),p=n.n(c),u=n(9216),d=n.n(u),h=n(4589),f=n.n(h),A=n(2023),C={};C.styleTagTransform=f(),C.setAttributes=p(),C.insert=l().bind(null,"head"),C.domAPI=a(),C.insertStyleElement=d(),r()(A.Z,C);const y=A.Z&&A.Z.locals?A.Z.locals:void 0},2767:(t,e,n)=>{"use strict";n.r(e),n.d(e,{activeState:()=>A.uj,default:()=>y,sidePanelWrapper:()=>A.Mk});var o=n(3379),r=n.n(o),i=n(7795),a=n.n(i),s=n(569),l=n.n(s),c=n(3565),p=n.n(c),u=n(9216),d=n.n(u),h=n(4589),f=n.n(h),A=n(499),C={};C.styleTagTransform=f(),C.setAttributes=p(),C.insert=l().bind(null,"head"),C.domAPI=a(),C.insertStyleElement=d(),r()(A.ZP,C);const y=A.ZP&&A.ZP.locals?A.ZP.locals:void 0},5553:(t,e,n)=>{"use strict";n.r(e),n.d(e,{closeButton:()=>A.Ah,default:()=>y,errorToast:()=>A.Jc,iconContainer:()=>A.Fu,iconWrapper:()=>A.aW,infoToast:()=>A.Rr,successToast:()=>A.Qm,text:()=>A.fL,title:()=>A.TN,toastBody:()=>A.X$,toastWrapper:()=>A.GK,warnToast:()=>A.x_});var o=n(3379),r=n.n(o),i=n(7795),a=n.n(i),s=n(569),l=n.n(s),c=n(3565),p=n.n(c),u=n(9216),d=n.n(u),h=n(4589),f=n.n(h),A=n(6761),C={};C.styleTagTransform=f(),C.setAttributes=p(),C.insert=l().bind(null,"head"),C.domAPI=a(),C.insertStyleElement=d(),r()(A.ZP,C);const y=A.ZP&&A.ZP.locals?A.ZP.locals:void 0},6245:(t,e,n)=>{"use strict";n.r(e),n.d(e,{bottomLeft:()=>A.Oq,bottomRight:()=>A.hT,default:()=>y,toastRow:()=>A.YY,toastsContainer:()=>A.Q$,topLeft:()=>A.w3,topRight:()=>A.f6});var o=n(3379),r=n.n(o),i=n(7795),a=n.n(i),s=n(569),l=n.n(s),c=n(3565),p=n.n(c),u=n(9216),d=n.n(u),h=n(4589),f=n.n(h),A=n(9857),C={};C.styleTagTransform=f(),C.setAttributes=p(),C.insert=l().bind(null,"head"),C.domAPI=a(),C.insertStyleElement=d(),r()(A.ZP,C);const y=A.ZP&&A.ZP.locals?A.ZP.locals:void 0},611:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>y,rightUpperBarWrapperContainer:()=>A.A});var o=n(3379),r=n.n(o),i=n(7795),a=n.n(i),s=n(569),l=n.n(s),c=n(3565),p=n.n(c),u=n(9216),d=n.n(u),h=n(4589),f=n.n(h),A=n(6477),C={};C.styleTagTransform=f(),C.setAttributes=p(),C.insert=l().bind(null,"head"),C.domAPI=a(),C.insertStyleElement=d(),r()(A.Z,C);const y=A.Z&&A.Z.locals?A.Z.locals:void 0},7896:(t,e,n)=>{"use strict";n.r(e),n.d(e,{comparisonText:()=>A.aT,default:()=>y,dropdownItem:()=>A.mB,dropdownItemDescription:()=>A._h,icon:()=>A.qv,moreItemTooltip:()=>A.Af,trimText:()=>A.rd});var o=n(3379),r=n.n(o),i=n(7795),a=n.n(i),s=n(569),l=n.n(s),c=n(3565),p=n.n(c),u=n(9216),d=n.n(u),h=n(4589),f=n.n(h),A=n(4778),C={};C.styleTagTransform=f(),C.setAttributes=p(),C.insert=l().bind(null,"head"),C.domAPI=a(),C.insertStyleElement=d(),r()(A.ZP,C);const y=A.ZP&&A.ZP.locals?A.ZP.locals:void 0},8023:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>y,moreDropdown:()=>A.p});var o=n(3379),r=n.n(o),i=n(7795),a=n.n(i),s=n(569),l=n.n(s),c=n(3565),p=n.n(c),u=n(9216),d=n.n(u),h=n(4589),f=n.n(h),A=n(3206),C={};C.styleTagTransform=f(),C.setAttributes=p(),C.insert=l().bind(null,"head"),C.domAPI=a(),C.insertStyleElement=d(),r()(A.Z,C);const y=A.Z&&A.Z.locals?A.Z.locals:void 0},781:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>y,moreIcon:()=>A.W});var o=n(3379),r=n.n(o),i=n(7795),a=n.n(i),s=n(569),l=n.n(s),c=n(3565),p=n.n(c),u=n(9216),d=n.n(u),h=n(4589),f=n.n(h),A=n(324),C={};C.styleTagTransform=f(),C.setAttributes=p(),C.insert=l().bind(null,"head"),C.domAPI=a(),C.insertStyleElement=d(),r()(A.Z,C);const y=A.Z&&A.Z.locals?A.Z.locals:void 0},3379:t=>{"use strict";var e=[];function n(t){for(var n=-1,o=0;o<e.length;o++)if(e[o].identifier===t){n=o;break}return n}function o(t,o){for(var i={},a=[],s=0;s<t.length;s++){var l=t[s],c=o.base?l[0]+o.base:l[0],p=i[c]||0,u="".concat(c," ").concat(p);i[c]=p+1;var d=n(u),h={css:l[1],media:l[2],sourceMap:l[3],supports:l[4],layer:l[5]};if(-1!==d)e[d].references++,e[d].updater(h);else{var f=r(h,o);o.byIndex=s,e.splice(s,0,{identifier:u,updater:f,references:1})}a.push(u)}return a}function r(t,e){var n=e.domAPI(e);return n.update(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap&&e.supports===t.supports&&e.layer===t.layer)return;n.update(t=e)}else n.remove()}}t.exports=function(t,r){var i=o(t=t||[],r=r||{});return function(t){t=t||[];for(var a=0;a<i.length;a++){var s=n(i[a]);e[s].references--}for(var l=o(t,r),c=0;c<i.length;c++){var p=n(i[c]);0===e[p].references&&(e[p].updater(),e.splice(p,1))}i=l}}},569:t=>{"use strict";var e={};t.exports=function(t,n){var o=function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}e[t]=n}return e[t]}(t);if(!o)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");o.appendChild(n)}},9216:t=>{"use strict";t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},3565:(t,e,n)=>{"use strict";t.exports=function(t){var e=n.nc;e&&t.setAttribute("nonce",e)}},7795:t=>{"use strict";t.exports=function(t){var e=t.insertStyleElement(t);return{update:function(n){!function(t,e,n){var o="";n.supports&&(o+="@supports (".concat(n.supports,") {")),n.media&&(o+="@media ".concat(n.media," {"));var r=void 0!==n.layer;r&&(o+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),o+=n.css,r&&(o+="}"),n.media&&(o+="}"),n.supports&&(o+="}");var i=n.sourceMap;i&&"undefined"!=typeof btoa&&(o+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),e.styleTagTransform(o,t,e.options)}(e,t,n)},remove:function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(e)}}}},4589:t=>{"use strict";t.exports=function(t,e){if(e.styleSheet)e.styleSheet.cssText=t;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(t))}}},5216:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UiManagersEvent=void 0,e.UiManagersEvent={UPDATE_COMPONENTS:"UPDATE_COMPONENTS"}},1968:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BannerManager=e.VisibilityMode=void 0;var o,r=n(4522),i=n(6237),a=n(5091),s=n(6227);!function(t){t.VISIBLE="VISIBLE",t.HIDDEN="HIDDEN"}(o=e.VisibilityMode||(e.VisibilityMode={}));var l=function(){function t(t){this.options=t,this._floatingItem=null,this._timerSubscription=void 0,this._options=t,this._bannerConfig={theme:{backgroundColor:"rgba(0, 0, 0, .7)",blur:"10px"}}}return t.prototype.add=function(t){return this._floatingItem&&this.remove(),this._floatingItem=this._options.floatingManager.add({label:"Banner",mode:"Immediate",position:"InteractiveArea",renderContent:this._createRenderBanner(t,{onClose:this._handleCloseEvent.bind(this),theme:this._bannerConfig.theme})}),t.autoClose&&this._startDurationTimer(t.duration),this._getState()},t.prototype.remove=function(){this._floatingItem&&(this._timerSubscription&&clearTimeout(this._timerSubscription),this._options.floatingManager.remove(this._floatingItem),this._floatingItem=null)},t.prototype.reset=function(){this.remove()},t.prototype._createRenderBanner=function(t,e){var n=t.content,o=t.renderContent,s=e.onClose,l=e.theme;return function(t){return(0,r.h)(a.BannerContainer,{onClose:s,theme:l},o?o(n,t):(0,r.h)(i.Banner,{content:n}))}},t.prototype._handleCloseEvent=function(){this.remove()},t.prototype._startDurationTimer=function(t){void 0===t&&(t=6e4),this._timerSubscription=setTimeout(this.remove.bind(this),Math.max(5e3,t))},t.prototype._getState=function(){var t=(0,s.getPlayerSize)(this._options.kalturaPlayer);return{visibilityMode:!t||t.width<480?o.HIDDEN:o.VISIBLE}},t}();e.BannerManager=l},5091:function(t,e,n){"use strict";var o,r=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__createBinding||(Object.create?function(t,e,n,o){void 0===o&&(o=n);var r=Object.getOwnPropertyDescriptor(e,n);r&&!("get"in r?!e.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,o,r)}:function(t,e,n,o){void 0===o&&(o=n),t[o]=e[n]}),a=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),s=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&i(e,t,n);return a(e,t),e};Object.defineProperty(e,"__esModule",{value:!0}),e.BannerContainer=void 0;var l=n(4522),c=s(n(179)),p=n(9731),u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.render=function(t){var e=this.props.theme,n=e.backgroundColor,o=e.blur;return(0,l.h)("div",{className:c.bannerContainerRoot,"aria-live":"polite"},(0,l.h)("div",{style:"\n                background-color:".concat(n,"; \n                backdrop-filter: blur(").concat(o,");\n             "),className:c.bannerContainer},(0,l.h)("button",{className:c.closeButton,onClick:t.onClose},(0,l.h)("div",{className:c.small},(0,l.h)(p.Icon,{size:p.IconSize.small,name:"close"})),(0,l.h)("div",{className:c.large},(0,l.h)(p.Icon,{size:p.IconSize.large,name:"close"}))),this.props.children))},e}(l.Component);e.BannerContainer=u},2282:function(t,e,n){"use strict";var o,r=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__createBinding||(Object.create?function(t,e,n,o){void 0===o&&(o=n);var r=Object.getOwnPropertyDescriptor(e,n);r&&!("get"in r?!e.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,o,r)}:function(t,e,n,o){void 0===o&&(o=n),t[o]=e[n]}),a=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),s=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&i(e,t,n);return a(e,t),e};Object.defineProperty(e,"__esModule",{value:!0}),e.Banner=void 0;var l=n(4522),c=s(n(3665)),p=n(2248),u=n(1160),d=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.render=function(t){var e=t.content,n=e.text,o=e.title,r=void 0===o?"Audience asks:":o,i=e.icon,a=void 0===i?this._defaultIcon():i;return(0,l.h)("div",{className:c.defaultBannerRoot+" "+c.bannerWrapper},(0,l.h)("div",{className:c.iconContainer},(0,l.h)("div",{className:c.iconWrapper},a)),(0,l.h)("div",{className:c.bannerBody},(0,l.h)("div",{className:c.title},r),(0,l.h)("div",{className:c.text},n)))},e.prototype._defaultIcon=function(){return(0,l.h)("div",{className:c.iconImage},(0,l.h)(p.SomeoneAsksLarge,{className:c.large}),(0,l.h)(u.SomeoneAsksSmall,{className:c.small}))},e}(l.Component);e.Banner=d},6237:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Banner=void 0;var o=n(2282);Object.defineProperty(e,"Banner",{enumerable:!0,get:function(){return o.Banner}})},2248:function(t,e,n){"use strict";var o=this&&this.__assign||function(){return o=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t},o.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.SomeoneAsksLarge=void 0;var r=n(4522);e.SomeoneAsksLarge=function(t){return(0,r.h)("svg",o({width:"32px",height:"32px",viewBox:"0 0 32 32",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},t),(0,r.h)("g",{id:"Icons/32/Someone-asks",stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},(0,r.h)("g",{id:"Group",transform:"translate(4.000000, 5.000000)",fill:"#B2D238"},(0,r.h)("ellipse",{id:"Oval",cx:"12",cy:"5.5",rx:"6",ry:"5.5"}),(0,r.h)("path",{d:"M12,13 C7.995,13 0,15.01 0,19 L0,20.5 C0,21.325 0.675,22 1.5,22 L22.5,22 C23.325,22 24,21.325 24,20.5 L24,19 C24,15.01 16.005,13 12,13 Z",id:"Path"}))))}},1160:function(t,e,n){"use strict";var o=this&&this.__assign||function(){return o=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t},o.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.SomeoneAsksSmall=void 0;var r=n(4522);e.SomeoneAsksSmall=function(t){return(0,r.h)("svg",o({width:"20px",height:"20px",viewBox:"0 0 20 20",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},t),(0,r.h)("g",{id:"Icons/20/Someone-asks",stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},(0,r.h)("g",{id:"Group",transform:"translate(2.000000, 2.000000)",fill:"#B2D238"},(0,r.h)("circle",{id:"Oval",cx:"8",cy:"4",r:"4"}),(0,r.h)("path",{d:"M8,9 C5.33,9 0,10.5633333 0,13.6666667 L0,14.8333333 C0,15.475 0.45,16 1,16 L15,16 C15.55,16 16,15.475 16,14.8333333 L16,13.6666667 C16,10.5633333 10.67,9 8,9 Z",id:"Path"}))))}},7243:function(t,e,n){"use strict";var o=this&&this.__assign||function(){return o=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t},o.apply(this,arguments)},r=this&&this.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var o,r,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(o=i.next()).done;)a.push(o.value)}catch(t){r={error:t}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return a},i=this&&this.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var o,r=0,i=e.length;r<i;r++)!o&&r in e||(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.FloatingManager=void 0;var a=n(4522),s=n(3121),l=n(4019),c=n(6227),p=n(3775),u=n(5216),d={VideoArea:{Live:"VideoArea",Playback:"VideoArea"},PresetArea:{Live:"PresetArea",Playback:"PresetArea"},InteractiveArea:{Live:"InteractiveArea",Playback:"InteractiveArea"}},h=function(){function t(t){var e=this;this._options=t,this._registered=!1,this._items={VideoArea:[],InteractiveArea:[],PresetArea:[]},this._componentRef={InteractiveArea:null,VideoArea:null,PresetArea:null},this._cache={canvas:{playerSize:{width:0,height:0},videoSize:{width:0,height:0}}},this._renderItems=function(t){var n=e._getRendererProps({});return e._items[t].map((function(t){return t.renderFloatingChild(n)}))},this._renderChild=function(t){return(0,a.h)(l.ManagedComponent,{label:"floating-manager",renderChildren:function(){return e._renderItems(t)},isShown:function(){return!0},ref:function(n){return e._componentRef[t]=n}})},this._onTimeUpdate=function(){e._updateComponents()},this._onMediaLoaded=function(){e._updateCachedCanvas(),e._updateComponents()},this._onLoadedData=function(){e._updateCachedCanvas(),e._updateComponents()},Object.keys(d).forEach((function(t){e._options.presetManager.add({label:"floating-manager",presetAreas:d[t],renderChild:function(){return e._renderChild(t)}})})),this._logger=t.logger,this._eventManager=t.eventManager,this._addPlayerBindings(),this._updateCachedCanvas()}return t.prototype.add=function(t){var e=this._options.presetManager,n=o(o({presetManager:e},this._options),{data:t}),r=new p.FloatingItem(n);return this._items[t.position].push(r),r},t.prototype.remove=function(t){var e=this._items[t.data.position],n=e.indexOf(t);n>-1?(e[n].destroy(),e.splice(n,1)):this._logger.warn("couldn't remove ".concat(t," since it wasn't found"))},t.prototype.reset=function(){var t=this;i(i(i([],r(this._items.VideoArea),!1),r(this._items.InteractiveArea),!1),r(this._items.PresetArea),!1).forEach((function(e){try{e.destroy()}catch(e){t._logger.warn(e)}})),this._items.VideoArea=[],this._items.PresetArea=[],this._items.InteractiveArea=[]},t.prototype._getRendererProps=function(t){var e=this._options.kalturaPlayer;return{currentTime:void 0!==t.currentTime?t.currentTime:1e3*e.currentTime,canvas:this._cache.canvas}},t.prototype._updateCachedCanvas=function(){this._cache.canvas={playerSize:(0,c.getPlayerSize)(this._options.kalturaPlayer),videoSize:(0,c.getVideoSize)(this._options.kalturaPlayer)}},t.prototype._updateComponents=function(){this._componentRef.InteractiveArea&&this._componentRef.InteractiveArea.update(),this._componentRef.PresetArea&&this._componentRef.PresetArea.update(),this._componentRef.VideoArea&&this._componentRef.VideoArea.update()},t.prototype._addPlayerBindings=function(){var t=this,e=this._options.kalturaPlayer;this._eventManager.listen(e,e.Event.Core.TIME_UPDATE,this._onTimeUpdate),this._eventManager.listen(e,e.Event.Core.MEDIA_LOADED,this._onMediaLoaded),this._eventManager.listen(e,e.Event.Core.LOADED_DATA,this._onLoadedData),this._options.presetManager.on(s.PresetManagerEventTypes.VideoResizeEvent,(function(){t._updateCachedCanvas(),t._updateComponents()})),this._options.presetManager.on(s.PresetManagerEventTypes.PresetResizeEvent,(function(){t._updateCachedCanvas(),t._updateComponents()})),this._eventManager.listen(e,u.UiManagersEvent.UPDATE_COMPONENTS,(function(){return t._updateComponents()}))},t}();e.FloatingManager=h},3775:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FloatingItem=void 0;var o=n(4522),r=n(4019),i=function(){function t(t){var e=this;this._isShown=!1,this._componentRef=null,this.remove=function(){e._isShown=!1,e._componentRef&&e._componentRef.update()},this.add=function(){e._isShown=!0,e._componentRef&&e._componentRef.update()},this.update=function(){e._componentRef&&e._componentRef.update()},this._options=t,this._addPlayerBindings()}return Object.defineProperty(t.prototype,"data",{get:function(){return this._options.data},enumerable:!1,configurable:!0}),t.prototype.destroy=function(){this.remove()},t.prototype.renderFloatingChild=function(t){var e=this,n=this._options.data.label;return(0,o.h)(r.ManagedComponent,{label:n,renderChildren:function(){return e._options.data.renderContent(t)},isShown:function(){return e._isShown},ref:function(t){e._componentRef=t}})},t.prototype._addPlayerBindings=function(){var t=this._options,e=t.kalturaPlayer,n=t.data,o=t.eventManager;"MediaLoaded"===n.mode&&o.listenOnce(e,e.Event.Core.MEDIA_LOADED,this.add),"FirstPlay"===n.mode&&o.listenOnce(e,e.Event.Core.FIRST_PLAY,this.add),"Immediate"===n.mode&&this.add()},t}();e.FloatingItem=i},5462:(t,e)=>{"use strict";var n,o,r;Object.defineProperty(e,"__esModule",{value:!0}),e.RelativeToTypes=e.ReservedPresetAreas=e.ReservedPresetNames=void 0,(r=e.ReservedPresetNames||(e.ReservedPresetNames={})).Playback="Playback",r.Live="Live",(o=e.ReservedPresetAreas||(e.ReservedPresetAreas={})).PresetFloating="PresetFloating",o.BottomBarLeftControls="BottomBarLeftControls",o.BottomBarRightControls="BottomBarRightControls",o.TopBarLeftControls="TopBarLeftControls",o.TopBarRightControls="TopBarRightControls",o.SidePanelTop="SidePanelTop",o.SidePanelLeft="SidePanelLeft",o.SidePanelRight="SidePanelRight",o.SidePanelBottom="SidePanelBottom",o.PresetArea="PresetArea",o.InteractiveArea="InteractiveArea",o.PlayerArea="PlayerArea",o.VideoArea="VideoArea",(n=e.RelativeToTypes||(e.RelativeToTypes={})).Before="Before",n.After="After",n.Replace="Replace"},3121:function(t,e,n){"use strict";var o=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],o=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&o>=t.length&&(t=void 0),{value:t&&t[o++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.PresetManager=e.PresetManagerEventTypes=void 0;var r,i=n(4522),a=n(3266),s=n(2194),l=n(4869);!function(t){t.PresetResizeEvent="PresetResizeEvent",t.VideoResizeEvent="VideoResizeEvent"}(r=e.PresetManagerEventTypes||(e.PresetManagerEventTypes={}));var c=function(){function t(t){var e=this;this._events=new a.EventsManager,this._registerToPlayer=function(){e._eventManager.listen(e._kalturaPlayer,e._kalturaPlayer.Event.UI.UI_PRESET_RESIZE,e._notifyUIPresetResize),e._eventManager.listen(e._kalturaPlayer,e._kalturaPlayer.Event.UI.VIDEO_RESIZE,e._notifyVideoResize)},this._notifyVideoResize=function(){e._events.emit({type:r.VideoResizeEvent})},this._notifyUIPresetResize=function(){e._events.emit({type:r.PresetResizeEvent})},this._unregisterToPlayer=function(){e._eventManager.unlisten(e._kalturaPlayer,e._kalturaPlayer.Event.UI.UI_PRESET_RESIZE,e._notifyUIPresetResize),e._eventManager.unlisten(e._kalturaPlayer,e._kalturaPlayer.Event.UI.VIDEO_RESIZE,e._notifyVideoResize)},this.on=this._events.on.bind(this._events),this.off=this._events.off.bind(this._events),this._eventManager=t.eventManager,this._kalturaPlayer=t.kalturaPlayer,this.add({label:"preset-manager",presetAreas:{Playback:"PlayerArea",Live:"PlayerArea"},renderChild:function(){return(0,i.h)(s.UIPlayerAdapter,{player:t.kalturaPlayer,onMount:e._registerToPlayer,onUnmount:e._unregisterToPlayer})}})}return t.prototype.add=function(t){var e,n,r=new l.PresetItem({kalturaPlayer:this._kalturaPlayer,data:t}).playerConfig;try{for(var i=o(r),a=i.next();!a.done;a=i.next()){var s=a.value,c=s.label,p=s.presets,u=s.container,d=s.get;this._kalturaPlayer.ui.addComponent({label:c,presets:p,container:u,get:d})}}catch(t){e={error:t}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}},t}();e.PresetManager=c},2194:function(t,e,n){"use strict";var o,r=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.UIPlayerAdapter=void 0;var i=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.componentDidMount=function(){this.props.onMount(this.props.player)},e.prototype.componentWillUnmount=function(){this.props.onUnmount(this.props.player)},e.prototype.render=function(){return null},e.defaultProps={player:null},e}(n(4522).Component);e.UIPlayerAdapter=i},4019:function(t,e,n){"use strict";var o,r=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__createBinding||(Object.create?function(t,e,n,o){void 0===o&&(o=n);var r=Object.getOwnPropertyDescriptor(e,n);r&&!("get"in r?!e.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,o,r)}:function(t,e,n,o){void 0===o&&(o=n),t[o]=e[n]}),a=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),s=this&&this.__decorate||function(t,e,n,o){var r,i=arguments.length,a=i<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,o);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(i<3?r(a):i>3?r(e,n,a):r(e,n))||a);return i>3&&a&&Object.defineProperty(e,n,a),a},l=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&i(e,t,n);return a(e,t),e};Object.defineProperty(e,"__esModule",{value:!0}),e.ManagedComponent=void 0;var c=n(4522),p=l(n(8676)),u=n(2052).ui.redux.connect,d=function(t){return{playerSize:t.shell.playerSize}},h=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.update=function(){this.setState((function(t){return{toggler:!t.toggler}}))},e.prototype.shouldComponentUpdate=function(t){var e=this.props,n=e.updateOnPlayerSizeChanged,o=e.playerSize;return n&&t.playerSize!==o||t.playerSize===o},e.prototype.componentDidMount=function(){this.setState({toggler:!1})},e.prototype.render=function(){var t=this.props,e=t.fillContainer,n=t.isShown,o=t.playerSize;return n()?(0,c.h)("div",{"data-contrib-item":this.props.label,className:"".concat(e?p.fillContainer:"")},this.props.renderChildren(o)):null},e.defaultProps={fillContainer:!1},s([u(d,null,null,{forwardRef:!0})],e)}(c.Component);e.ManagedComponent=h},4869:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PresetItem=void 0;var o=n(4522),r=n(5462),i=n(3181),a=function(){function t(t){var e=this;this._render=function(){if(e._options.data.isolateComponent){var t=e._options.data,n=t.label,r=t.fillContainer;return(0,o.h)(i.InjectedComponent,{label:n,fillContainer:r||!1,onCreate:e._onCreate,onDestroy:e._onDestroy})}return e._options.data.renderChild()},this._onDestroy=function(t){t.parent&&(0,o.render)(null,t.parent)},this._onCreate=function(t){try{if(!t.parent)return;var n=e._options.data.renderChild();if(!n)return;(0,o.render)(n,t.parent)}catch(t){}},this._options=t}return Object.defineProperty(t.prototype,"playerConfig",{get:function(){var t=[];for(var e in this._options.data.presetAreas){var n=this._options.data.presetAreas[e],o=this._options.data.relativeTo;if(n){var i={label:this._options.data.label,presets:[e],container:n,get:this._render};if(o)switch(o.type){case r.RelativeToTypes.After:i.afterComponent=o.name;break;case r.RelativeToTypes.Before:i.beforeComponent=o.name;break;case r.RelativeToTypes.Replace:i.replaceComponent=o.name}t.push(i)}}return t},enumerable:!1,configurable:!0}),t}();e.PresetItem=a},7321:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ItemWrapper=void 0;var o=n(4522),r=n(2837),i=n(8399),a=function(){function t(e,n){var o=this;this._detachWindow=null,this._closingDetachWindow=!1,this._attachingDetachWindow=!1,this._detachWindowPosition={screenX:0,screenY:0},this._detachWindowSize={innerWidth:0,innerHeight:0},this._detachWindowAnalyticsInterval=null,this._initialDetachWindowSizeSet=!1,this.attach=function(){o.isDetached&&(o._attachingDetachWindow=!0,o.panelItemComponentRef.current.attach(),o._closeDetachedWindow())},this._setDetachWindowPosition=function(t,e){o._detachWindowPosition={screenX:t,screenY:e}},this._setDetachWindowSize=function(t,e){o._detachWindowSize={innerWidth:t,innerHeight:e}},this._closeDetachedWindow=function(){o._detachWindow&&!o._closingDetachWindow&&(o._closingDetachWindow=!0,i.CLOSE_DETACH_EVENTS.forEach((function(t){window.removeEventListener(t,o._closeDetachedWindow)})),o._detachWindow.close(),o._detachWindow=null,o._closingDetachWindow=!1,o._attachingDetachWindow=!1,o._initialDetachWindowSizeSet=!1,o._setDetachWindowPosition(0,0),o._setDetachWindowSize(0,0),o._detachWindowAnalyticsInterval&&(clearInterval(o._detachWindowAnalyticsInterval),o._detachWindowAnalyticsInterval=null))},this.id=++t.nextId,this.item=e,this.player=n,this.isActive=!1,this.injectPanelComponent()}return t.prototype.activate=function(){var t=this;this.panelItemComponentRef.current?(this.panelItemComponentRef.current.on(),this.isActive=!0):setTimeout((function(){return t.activate()}))},t.prototype.deactivate=function(t){var e;void 0===t&&(t=!1),null===(e=this.panelItemComponentRef.current)||void 0===e||e.off(t),this.isActive=!1},t.prototype.detach=function(t){var e,n,o=this,r=document.createElement("div");r.style.width="100%",r.style.height="100%",r.className="".concat(i.DETACH_CONTAINER_CLASS,"-").concat(this.id);var a="menubar=no,status=no,location=no,toolbar=no";a+=",width=".concat((null==t?void 0:t.width)||"auto",",height=").concat((null==t?void 0:t.height)||"auto"),a+=",top=".concat((null==t?void 0:t.top)||"auto",", left=").concat((null==t?void 0:t.left)||"auto"),this._detachWindow=window.open("","_blank",a),this._detachWindow.document.title=null==t?void 0:t.title,null===(e=this._detachWindow)||void 0===e||e.focus();var s=document.head,l=this._detachWindow.document.head,c=this._detachWindow.document.body;if(s.querySelectorAll("style").forEach((function(t){var e=o._detachWindow.document.createElement("style");e.textContent=t.textContent,l.appendChild(e)})),Object.assign(c.style,i.DETACHED_WINDOW_STYLES),null===(n=this._detachWindow)||void 0===n||n.document.body.appendChild(r),this._detachWindow.onbeforeunload=function(){o._attachingDetachWindow||(t.onDetachWindowClose(),o._closeDetachedWindow())},i.CLOSE_DETACH_EVENTS.forEach((function(t){window.addEventListener(t,o._closeDetachedWindow)})),((null==t?void 0:t.maxWidth)||(null==t?void 0:t.maxHeight))&&this._detachWindow.addEventListener("resize",(function(e){e.preventDefault(),(null==t?void 0:t.maxWidth)&&o._detachWindow.innerWidth>t.maxWidth&&o._detachWindow.resizeTo(t.maxWidth,o._detachWindow.outerHeight),(null==t?void 0:t.maxHeight)&&o._detachWindow.innerHeight>t.maxHeight&&o._detachWindow.resizeTo(o._detachWindow.outerWidth,t.maxHeight)})),t.onDetachMove||t.onDetachResize){var p=this._detachWindow,u=p.screenX,d=p.screenY;this._setDetachWindowPosition(u,d),this._detachWindowAnalyticsInterval=setInterval((function(){o._initialDetachWindowSizeSet||(o._setDetachWindowSize(o._detachWindow.innerWidth,o._detachWindow.innerHeight),o._initialDetachWindowSizeSet=!0),!t.onDetachMove||o._detachWindow.screenX===o._detachWindowPosition.screenX&&o._detachWindow.screenY===o._detachWindowPosition.screenY||(o._setDetachWindowPosition(o._detachWindow.screenX,o._detachWindow.screenY),t.onDetachMove(o._detachWindow.screenX,o._detachWindow.screenY)),!t.onDetachResize||o._detachWindow.innerWidth===o._detachWindowSize.innerWidth&&o._detachWindow.innerHeight===o._detachWindowSize.innerHeight||(o._setDetachWindowSize(o._detachWindow.innerWidth,o._detachWindow.innerHeight),t.onDetachResize(o._detachWindow.innerWidth,o._detachWindow.innerHeight))}),i.DETACH_POSITION_INTERVAL)}this.panelItemComponentRef.current.detach(r,(null==t?void 0:t.attachPlaceholder)||function(){return null})},Object.defineProperty(t.prototype,"isDetached",{get:function(){return Boolean(this._detachWindow)},enumerable:!1,configurable:!0}),t.prototype.getDetachedRef=function(){var t;return null===(t=this.panelItemComponentRef.current)||void 0===t?void 0:t.detachRef},t.prototype.remove=function(){this.removePanelComponentFn(),this._closeDetachedWindow()},t.prototype.update=function(){var t;null===(t=this.panelItemComponentRef.current)||void 0===t||t.forceUpdate()},t.prototype.injectPanelComponent=function(){var e=this,n=this.item,i=n.label,a=n.position,s=n.panelComponent,l=n.presets,c=s,p=(0,o.createRef)();this.panelItemComponentRef=p,this.removePanelComponentFn=this.player.ui.addComponent({label:"Side-panel-".concat(a,"-").concat(i),presets:l,area:t.getPanelArea(a),get:function(){return(0,o.h)(r.PanelItemWrapper,{ref:p},(0,o.h)(c,{isActive:e.isActive}))}})},t.getPanelArea=function(t){return"SidePanel".concat(t.charAt(0).toUpperCase()).concat(t.slice(1))},t.nextId=0,t}();e.ItemWrapper=a},8399:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DETACH_POSITION_INTERVAL=e.CLOSE_DETACH_EVENTS=e.DETACH_CONTAINER_CLASS=e.DETACHED_WINDOW_STYLES=void 0,e.DETACHED_WINDOW_STYLES={margin:"0px",backgroundColor:"#000"},e.DETACH_CONTAINER_CLASS="playkit-player detach-sidebar-container",e.CLOSE_DETACH_EVENTS=["beforeunload","popstate"],e.DETACH_POSITION_INTERVAL=1e3},3682:function(t,e,n){"use strict";var o,r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t},r.apply(this,arguments)},i=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],o=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&o>=t.length&&(t=void 0),{value:t&&t[o++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.SidePanelsManager=void 0;var a=n(2052),s=n(7321),l=a.ui.SidePanelModes,c=a.ui.SidePanelPositions,p=a.ui.ReservedPresetNames,u=((o={})[c.TOP]=c.BOTTOM,o[c.BOTTOM]=c.TOP,o[c.RIGHT]=c.LEFT,o[c.LEFT]=c.RIGHT,o),d=function(){function t(t,e){this.player=t,this.activePanels={top:null,bottom:null,right:null,left:null},this.componentsRegistry=new Map,this.logger=e}return t.prototype.add=function(e){if(t.validateItem(e)){var n=new s.ItemWrapper(e,this.player);return this.componentsRegistry.set(n.id,n),this.logger.debug("New Panel Item Added",e),n.id}this.logger.error("Invalid SidePanelItem parameters",e)},t.prototype.remove=function(t){var e=this.componentsRegistry.get(t);e?(this.isItemActive(t)&&this.deactivateItem(t),e.remove(),this.componentsRegistry.delete(t)):this.logger.warn("".concat(t," is not registered"))},t.prototype.activateItem=function(e){var n=this.componentsRegistry.get(e);if(n){var o=n.item,r=o.position,i=o.expandMode;if(this.isItemActive(e))return;var a=this.activePanels[r];null!==a&&a.deactivate(!0);var s=t.getCounterPanelPosition(r);this.activePanels[s]&&this.deactivateItem(this.activePanels[s].id),n.activate(),this.expand(r,i),this.activePanels[r]=n}else this.logger.warn("".concat(e," is not registered"))},t.prototype.deactivateItem=function(t){var e=this.componentsRegistry.get(t);if(e){if(!this.isItemActive(t))return;var n=e.item.position;e.deactivate(),this.collapse(n),this.activePanels[n]=null}else this.logger.warn("".concat(t," is not registered"))},t.prototype.isItemActive=function(t){var e,n=this.componentsRegistry.get(t);return n?(null===(e=this.activePanels[n.item.position])||void 0===e?void 0:e.id)===t:(this.logger.warn("".concat(t," is not registered")),!1)},t.prototype.isItemDetached=function(t){var e=this.componentsRegistry.get(t);return e?e.isDetached:(this.logger.warn("".concat(t," is not registered")),!1)},t.prototype.detachItem=function(t,e){var n=this,o=this.componentsRegistry.get(t);o?(this.deactivateItem(t),o.detach(r(r({},e),{onDetachWindowClose:function(){n.attachItem(t),null==e||e.onDetachWindowClose()}}))):this.logger.warn("".concat(t," is not registered"))},t.prototype.attachItem=function(t){var e=this.componentsRegistry.get(t);e?(e.attach(),this.activateItem(t)):this.logger.warn("".concat(t," is not registered"))},t.prototype.getDetachedRef=function(t){return this.isItemDetached(t)?this.componentsRegistry.get(t).getDetachedRef():null},t.prototype.update=function(t){var e=this.componentsRegistry.get(t);e?e.update():this.logger.warn("".concat(t," is not registered"))},t.prototype.reset=function(){this.logger.debug("reset")},t.prototype.destroy=function(){this.logger.debug("destroy"),this.removeAllItems()},t.prototype.removeAllItems=function(){var t,e;try{for(var n=i(this.componentsRegistry.values()),o=n.next();!o.done;o=n.next()){var r=o.value;this.remove(r.id)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}},t.prototype.toggle=function(t){this.isItemActive(t)?this.deactivateItem(t):this.activateItem(t)},t.prototype.expand=function(t,e){this.player.ui.store.dispatch(a.ui.reducers.shell.actions.updateSidePanelMode(t,e))},t.prototype.collapse=function(t){this.player.ui.store.dispatch(a.ui.reducers.shell.actions.updateSidePanelMode(t,l.HIDDEN))},t.getCounterPanelPosition=function(t){return u[t]},t.validateItem=function(t){var e=t.label,n=t.panelComponent,o=t.position,r=t.expandMode,i=t.presets;return!!(e&&Object.values(c).includes(o)&&Object.values(l).includes(r)&&i.every((function(t){return Object.values(p).includes(t)}))&&"function"==typeof n)},t}();e.SidePanelsManager=d},2837:function(t,e,n){"use strict";var o,r=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__createBinding||(Object.create?function(t,e,n,o){void 0===o&&(o=n);var r=Object.getOwnPropertyDescriptor(e,n);r&&!("get"in r?!e.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,o,r)}:function(t,e,n,o){void 0===o&&(o=n),t[o]=e[n]}),a=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),s=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&i(e,t,n);return a(e,t),e};Object.defineProperty(e,"__esModule",{value:!0}),e.PanelItemWrapper=void 0;var l=n(4522),c=s(n(2767)),p=n(2052),u=p.ui.style.defaultTransitionTime,d=p.ui.createPortal,h=function(t){function e(){var e=t.call(this)||this;return e.detach=function(t,n){e.setState({detachRef:t,attachPlaceholder:n})},e.attach=function(){e.setState({detachRef:null,attachPlaceholder:function(){return null}})},e.state={on:!1,detachRef:null,attachPlaceholder:function(){return null}},e.switchMode=!1,e}return r(e,t),e.prototype.on=function(){this.setState({on:!0})},e.prototype.off=function(t){this.switchMode=t,this.setState({on:!1})},Object.defineProperty(e.prototype,"detachRef",{get:function(){return this.state.detachRef},enumerable:!1,configurable:!0}),e.prototype.render=function(){var t=(0,l.cloneElement)(this.props.children);return(0,l.h)("div",{className:[c.sidePanelWrapper,this.state.on?c.activeState:""].join(" "),style:this.state.on||this.switchMode?"":{transition:"visibility ".concat(u,"ms")}},this.detachRef?(0,l.h)(l.Fragment,null,d(t,this.detachRef),(0,l.h)(this.state.attachPlaceholder,null)):t)},e}(l.Component);e.PanelItemWrapper=h},3884:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ToastType=void 0;var o=n(3618);Object.defineProperty(e,"ToastType",{enumerable:!0,get:function(){return o.ToastType}})},3618:(t,e)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.ToastType=void 0,(n=e.ToastType||(e.ToastType={})).TopRight="topRight",n.TopLeft="topLeft",n.BottomRight="bottomRight",n.BottomLeft="bottomLeft"},5963:function(t,e,n){"use strict";var o=this&&this.__assign||function(){return o=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t},o.apply(this,arguments)},r=this&&this.__rest||function(t,e){var n={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(n[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(t);r<o.length;r++)e.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(t,o[r])&&(n[o[r]]=t[o[r]])}return n};Object.defineProperty(e,"__esModule",{value:!0}),e.ToastManager=void 0;var i=n(4522),a=n(9350),s=n(3884),l=n(7233),c=n(5216),p=function(){function t(t,e){var n=this;this.options=t,this.dispatchEvent=e,this._toasts=[],this._floatingItem=null,this._remove=function(t){var e=n._findToastIndexById(t);-1!==e&&(clearTimeout(n._toasts[e].timerSubscription),n._toasts.splice(e,1),n._updateToastsUI(),0===n._toasts.length&&n._removeToastsContainer())},this._options=t,this._dispatchEvent=e}return t.prototype.add=function(t){var e=t.duration,n=t.toastType,i=r(t,["duration","toastType"]);this._floatingItem||this._addToastsContainer(n);var s={toastProps:o(o({},i),{id:a.UUID.uuidV1(),onClose:this._remove}),duration:e,timerSubscription:null};this._toasts.push(s),this._updateToastsUI(),this._startDurationTimer(s),this.dispatchEvent(c.UiManagersEvent.UPDATE_COMPONENTS)},t.prototype.reset=function(){var t=this;this._toasts.forEach((function(e){t._remove(e.toastProps.id)}))},t.prototype._startDurationTimer=function(t){var e=this;t.timerSubscription=setTimeout((function(){e._remove(t.toastProps.id)}),t.duration)},t.prototype._addToastsContainer=function(t){var e=this;this._floatingItem=this._options.floatingManager.add({label:"Toasts",mode:"Immediate",position:"InteractiveArea",renderContent:function(){return(0,i.h)(l.ToastsContainer,{toastType:t||s.ToastType.BottomLeft,toasts:e._toasts.map((function(t){return t.toastProps}))})}})},t.prototype._removeToastsContainer=function(){this._floatingItem&&(this._options.floatingManager.remove(this._floatingItem),this._floatingItem=null)},t.prototype._updateToastsUI=function(){this._floatingItem&&this._floatingItem.update()},t.prototype._findToastIndexById=function(t){for(var e=0;e<this._toasts.length;){if(this._toasts[e].toastProps.id===t)return e;e++}return-1},t}();e.ToastManager=p},3118:function(t,e,n){"use strict";var o,r=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__createBinding||(Object.create?function(t,e,n,o){void 0===o&&(o=n);var r=Object.getOwnPropertyDescriptor(e,n);r&&!("get"in r?!e.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,o,r)}:function(t,e,n,o){void 0===o&&(o=n),t[o]=e[n]}),a=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),s=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&i(e,t,n);return a(e,t),e};Object.defineProperty(e,"__esModule",{value:!0}),e.Toast=void 0;var l=n(4522),c=s(n(5553)),p=n(9731),u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.state={isShown:!0},e._onClick=function(t){e.props.onClick(),e._onClose(t)},e._onClose=function(t){t.stopPropagation(),e.setState({isShown:!1}),e.props.onClose(e.props.id)},e}return r(e,t),e.prototype._getToastSeverityClass=function(){switch(this.props.severity){case"Success":return c.successToast;case"Warning":return c.warnToast;case"Error":return c.errorToast;default:return c.infoToast}},e.prototype.render=function(){var t=this.props,e=t.text,n=t.title,o=t.icon;return(0,l.h)("div",{className:c.toastWrapper+" "+this._getToastSeverityClass(),onClick:this._onClick},(0,l.h)("button",{className:c.closeButton,onClick:this._onClose},(0,l.h)(p.Icon,{size:p.IconSize.small,name:"close"})),(0,l.h)("div",{className:c.title},n),(0,l.h)("div",{className:c.toastBody},(0,l.h)("div",{className:c.iconContainer},(0,l.h)("div",{className:c.iconWrapper},o)),(0,l.h)("div",{className:c.text},e)))},e}(l.Component);e.Toast=u},7233:function(t,e,n){"use strict";var o,r=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return i=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t},i.apply(this,arguments)},a=this&&this.__createBinding||(Object.create?function(t,e,n,o){void 0===o&&(o=n);var r=Object.getOwnPropertyDescriptor(e,n);r&&!("get"in r?!e.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,o,r)}:function(t,e,n,o){void 0===o&&(o=n),t[o]=e[n]}),s=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),l=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&a(e,t,n);return s(e,t),e};Object.defineProperty(e,"__esModule",{value:!0}),e.ToastsContainer=void 0;var c=n(4522),p=n(3118),u=l(n(6245)),d=n(3884),h=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.render=function(){var t=[u.toastsContainer,u["".concat(this.props.toastType||d.ToastType.BottomLeft)]];return(0,c.h)("div",{className:t.join(" "),"aria-live":"polite"},this.props.toasts.map((function(t){return(0,c.h)("div",{className:u.toastRow,key:t.id},(0,c.h)(p.Toast,i({},t)))})))},e}(c.Component);e.ToastsContainer=h},183:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IconModel=void 0;var o=n(4522),r=n(2052).ui.ReservedPresetNames,i=function(){function t(e){this.id=++t.nextId,this.displayName=e.displayName,this.ariaLabel=e.ariaLabel,this.order=e.order,this.component=e.component,this.svgIcon=e.svgIcon,this.onClick=e.onClick,this.componentRef=(0,o.createRef)(),this.presets=e.presets&&e.presets.length>0?e.presets:[r.Playback,r.Live],this.shouldHandleOnClick="boolean"!=typeof e.shouldHandleOnClick||e.shouldHandleOnClick}return t.prototype.update=function(){var t;null===(t=this.componentRef.current)||void 0===t||t.forceUpdate()},t.nextId=0,t}();e.IconModel=i},2195:function(t,e){"use strict";var n=this&&this.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var o,r,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(o=i.next()).done;)a.push(o.value)}catch(t){r={error:t}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return a},o=this&&this.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var o,r=0,i=e.length;r<i;r++)!o&&r in e||(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.MoveControlsManager=void 0;var r=function(){function t(t,e,n,o){this.player=t,this.logger=e,this.store=o.useStore(),this.upperBarManager=n,this.store.subscribe(this.handleStoreChange.bind(this)),this.currentState=this.store.getState(),this.iconIds=new Map}return Object.defineProperty(t.prototype,"bottomBarRegistryManager",{get:function(){return this.player.getService("bottomBarRegistryManager")||void 0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"state",{get:function(){return this.store.getState()},enumerable:!1,configurable:!0}),t.prototype.handleStoreChange=function(){var t=this,e=this.state,r=this.bottomBarRegistryManager;if(r&&this.currentState.bottomBar!==e.bottomBar){this.logger.debug("Removing core controls from upper bar"),o([],n(this.iconIds.values()),!1).forEach((function(e){return t.upperBarManager.remove(e)})),this.iconIds.clear();var i=e.bottomBar.controlsToMove;i.length>0&&(this.logger.debug("Adding core controls to upper bar: ",i),i.forEach((function(e){var n=r.getComponentItem(e);if(n){var o=t.upperBarManager.add(n);"number"==typeof o&&t.iconIds.set(e,o)}}))),this.currentState=e}},t}();e.MoveControlsManager=r},9328:function(t,e,n){"use strict";var o,r=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__createBinding||(Object.create?function(t,e,n,o){void 0===o&&(o=n);var r=Object.getOwnPropertyDescriptor(e,n);r&&!("get"in r?!e.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,o,r)}:function(t,e,n,o){void 0===o&&(o=n),t[o]=e[n]}),a=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),s=this&&this.__decorate||function(t,e,n,o){var r,i=arguments.length,a=i<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,o);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(i<3?r(a):i>3?r(e,n,a):r(e,n))||a);return i>3&&a&&Object.defineProperty(e,n,a),a},l=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&i(e,t,n);return a(e,t),e},c=this&&this.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var o,r,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(o=i.next()).done;)a.push(o.value)}catch(t){r={error:t}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return a},p=this&&this.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var o,r=0,i=e.length;r<i;r++)!o&&r in e||(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.DisplayedBar=void 0;var u=n(4522),d=n(5883),h=l(n(611)),f=n(2052),A=n(4951),C=f.ui.Components.PLAYER_SIZE,y=f.ui.redux.connect,v=function(t){return{playerSize:t.shell.playerSize}},g=function(t){function e(){var e=t.call(this)||this;return e.handleOnClick=function(){e.setState((function(t){return{showDropdown:!t.showDropdown}}))},e.update=function(){e.forceUpdate()},e.state={showDropdown:!1},e}return r(e,t),e.prototype.closeDropdown=function(){this.setState({showDropdown:!1})},e.prototype.splitControlsIntoDisplayedAndDropdown=function(){switch(this.props.playerSize){case C.TINY:return{displayedControls:[],dropdownControls:[]};case C.EXTRA_SMALL:case C.SMALL:return this.splitControls(2);default:return this.splitControls(4)}},e.prototype.splitControls=function(t){var e,n,o=this.props.getControls();return o.length>t+1?(e=o.slice(0,t),n=o.slice(t)):(e=o,n=[]),{displayedControls:e,dropdownControls:n}},e.prototype.render=function(){var t=this,e=this.splitControlsIntoDisplayedAndDropdown(),n=e.displayedControls,o=e.dropdownControls;return n.length>0?(0,u.h)("div",{className:h.rightUpperBarWrapperContainer},n.map((function(e){var n=e.id,o=e.component,r=e.onClick,i=e.componentRef,a=e.shouldHandleOnClick,s=o;return(0,u.h)(d.IconWrapper,{key:n,onClick:function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];a&&r.apply(void 0,p([],c(e),!1)),t.closeDropdown()},ref:i},(0,u.h)(s,null))})),o.length>0&&(0,u.h)(A.MoreIcon,{showDropdown:this.state.showDropdown,onClick:this.handleOnClick,icons:o,player:this.props.player})):void 0},s([y(v,null,null,{forwardRef:!0})],e)}(u.Component);e.DisplayedBar=g},9705:function(t,e,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(t,e,n,o){void 0===o&&(o=n);var r=Object.getOwnPropertyDescriptor(e,n);r&&!("get"in r?!e.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,o,r)}:function(t,e,n,o){void 0===o&&(o=n),t[o]=e[n]}),r=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&o(e,t,n);return r(e,t),e},a=this&&this.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var o,r,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(o=i.next()).done;)a.push(o.value)}catch(t){r={error:t}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return a};Object.defineProperty(e,"__esModule",{value:!0}),e.DropdownBarItem=void 0;var s=n(4522),l=n(8750),c=i(n(7896)),p=n(2052),u=n(5720),d=p.ui.Components,h=d.Icon,f=d.Tooltip;e.DropdownBarItem=function(t){var e=t.displayName,n=t.text,o=t.icon,r=t.onClick,i=t.onDropdownClick,p=t.tooltipPosition,d=(0,l.useRef)(null),A=(0,l.useRef)(null),C=a((0,l.useState)(!1),2),y=C[0],v=C[1],g=a((0,l.useState)(!1),2),m=g[0],_=g[1];(0,l.useLayoutEffect)((function(){if(!m&&(null==A?void 0:A.current)&&(null==d?void 0:d.current)){_(!0);var t=(null==A?void 0:A.current.getBoundingClientRect().width)-11,e=null==d?void 0:d.current.getBoundingClientRect().width;v(e>t)}}));var w=(0,s.h)("span",{className:[c.dropdownItemDescription,y?c.trimText:""].join(" "),ref:A},n),b=(0,s.h)("span",{ref:d,className:c.comparisonText},n),x=m?w:(0,s.h)(s.Fragment,null,w,b),P=function(){return(0,s.h)(u.A11yWrapper,{onClick:function(t){r(t),i()},role:"menuitem"},(0,s.h)("div",{className:c.dropdownItem,tabIndex:0,"aria-label":n},(0,s.h)("div",{className:c.icon},(0,s.h)(h,{type:o.type,id:e,path:o.path,viewBox:o.viewBox||"0 0 32 32"})),x))};return(0,s.h)(s.Fragment,null,y?(0,s.h)(f,{label:n,type:p,className:c.moreItemTooltip},P()):P())}},5174:function(t,e,n){"use strict";var o,r=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return i=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t},i.apply(this,arguments)},a=this&&this.__createBinding||(Object.create?function(t,e,n,o){void 0===o&&(o=n);var r=Object.getOwnPropertyDescriptor(e,n);r&&!("get"in r?!e.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,o,r)}:function(t,e,n,o){void 0===o&&(o=n),t[o]=e[n]}),s=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),l=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&a(e,t,n);return s(e,t),e};Object.defineProperty(e,"__esModule",{value:!0}),e.DropdownBar=void 0;var c=n(4522),p=l(n(8023)),u=n(2052),d=n(9705),h=u.ui.Components.Scrollable,f=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.calculateMaxHeight=function(){return this.props.player.getVideoElement().clientHeight-Number(window.KalturaPlayer.ui.style.topBarMaxHeight)-16},e.prototype.render=function(){var t=this,e=this.calculateMaxHeight(),n={className:p.moreDropdown,role:"menu",ariaExpanded:!0,style:{maxHeight:"".concat(e,"px")}},o=this.props.controls.length;return(0,c.h)("div",i({},n),(0,c.h)(h,{isVertical:!0},this.props.controls.map((function(e,n){var r=e.id,i=e.displayName,a=e.ariaLabel,s=e.svgIcon,l=e.onClick,p="function"==typeof s?s():s,u="function"==typeof a?a():a;return(0,c.h)(d.DropdownBarItem,{key:r,displayName:i,text:u,icon:p,onClick:l,onDropdownClick:t.props.onDropdownClick,tooltipPosition:n===o-1?"top":"bottom"})}))))},e}(c.Component);e.DropdownBar=f},5883:function(t,e,n){"use strict";var o,r=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.IconWrapper=void 0;var i=n(4522),a=n(5720),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.render=function(){return(0,i.h)(a.A11yWrapper,{role:"generic",onClick:this.props.onClick},(0,i.h)("div",null,(0,i.cloneElement)(this.props.children)))},e}(i.Component);e.IconWrapper=s},4951:function(t,e,n){"use strict";var o,r=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__createBinding||(Object.create?function(t,e,n,o){void 0===o&&(o=n);var r=Object.getOwnPropertyDescriptor(e,n);r&&!("get"in r?!e.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,o,r)}:function(t,e,n,o){void 0===o&&(o=n),t[o]=e[n]}),a=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),s=this&&this.__decorate||function(t,e,n,o){var r,i=arguments.length,a=i<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,o);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(i<3?r(a):i>3?r(e,n,a):r(e,n))||a);return i>3&&a&&Object.defineProperty(e,n,a),a},l=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&i(e,t,n);return a(e,t),e};Object.defineProperty(e,"__esModule",{value:!0}),e.MoreIcon=void 0;var c=n(4522),p=n(5720),u=n(2052),d=l(n(781)),h=n(5174),f=n(562),A=u.ui.Components,C=A.Icon,y=A.Tooltip,v=u.ui.Event.withEventManager,g=u.ui.preacti18n,m=g.withText,_=g.Text,w=function(t){function e(){var e=t.call(this)||this;return e.moreButtonRef=(0,c.createRef)(),e}return r(e,t),e.prototype.componentDidMount=function(){var t=this;this.props.eventManager.listen(document,"click",(function(e){return t.handleClickOutside(e)}))},e.prototype.handleClickOutside=function(t){this.moreButtonRef&&!this.moreButtonRef.current.contains(t.target)&&this.setState({toggle:!1})},e.prototype.render=function(){return(0,c.h)("div",{style:{position:"relative"}},(0,c.h)(y,{label:this.props.moreIconTxt},(0,c.h)(p.A11yWrapper,{onClick:this.props.onClick},(0,c.h)("button",{ref:this.moreButtonRef,className:"".concat(u.ui.style.upperBarIcon," ").concat(d.moreIcon),tabIndex:0,"aria-label":this.props.moreIconTxt},(0,c.h)(C,{id:"".concat(f.pluginName,"-upper-bar-manager"),path:"M16 22a3 3 0 1 1 0 6 3 3 0 0 1 0-6zm0 2a1 1 0 1 0 0 2 1 1 0 0 0 0-2zm0-11a3 3 0 1 1 0 6 3 3 0 0 1 0-6zm0 2a1 1 0 1 0 0 2 1 1 0 0 0 0-2zm0-11a3 3 0 1 1 0 6 3 3 0 0 1 0-6zm0 2a1 1 0 1 0 0 2 1 1 0 0 0 0-2z",viewBox:"0 0 32 32"})))),this.props.showDropdown&&(0,c.h)("div",null,(0,c.h)(h.DropdownBar,{onDropdownClick:this.props.onClick,controls:this.props.icons,player:this.props.player})))},s([v,m({moreIconTxt:(0,c.h)(_,{id:"controls.moreIcon"},"More")})],e)}(c.Component);e.MoreIcon=w},3765:function(t,e,n){"use strict";var o=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],o=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&o>=t.length&&(t=void 0),{value:t&&t[o++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.UpperBarManager=void 0;var r=n(2052),i=n(183),a=n(4522),s=n(9328),l=n(2195),c=r.ui.ReservedPresetAreas,p=r.ui.ReservedPresetNames,u=r.ui.redux,d=Object.values(p).filter((function(t){return t!==p.Idle&&t!==p.Error})),h=function(){function t(t,e){var n=this;this.player=t,this.componentsRegistry=new Map,this.logger=e,this.displayedBarComponentRefs={},this.iconsOrder={},d.forEach((function(t){return n.displayedBarComponentRefs[t]=(0,a.createRef)()})),this.injectDisplayedBarComponentWrapper(),this.moveControlsManager=new l.MoveControlsManager(t,e,this,u)}return t.prototype.add=function(e){var n=this;if(t.validateItem(e)){var o=new i.IconModel(e);return this.componentsRegistry.set(o.id,o),this.iconsOrder[e.displayName]=e.order,o.presets.forEach((function(t){var e;return null===(e=n.displayedBarComponentRefs[t].current)||void 0===e?void 0:e.update()})),this.logger.debug("control '".concat(o.displayName,"' added, id: '").concat(o.id,"' ")),o.id}this.logger.error("icon cannot be added due to invalid parameters",JSON.stringify(e))},t.prototype.remove=function(t){var e=this,n=this.componentsRegistry.get(t);n?(this.componentsRegistry.delete(t),n.presets.forEach((function(t){var n;return null===(n=e.displayedBarComponentRefs[t].current)||void 0===n?void 0:n.update()})),this.logger.debug("control '".concat(n.displayName,"' removed, id: '").concat(n.id,"' "))):this.logger.warn("control ".concat(t," is not registered"))},t.prototype.isActive=function(t){return!!this.componentsRegistry.get(t)},t.prototype.update=function(t){var e=this.componentsRegistry.get(t);e?e.update():this.logger.warn("control ".concat(t," is not registered"))},t.prototype.getControls=function(t){return Array.from(this.componentsRegistry.values()).sort((function(e,n){return t[e.displayName]-t[n.displayName]}))},t.prototype.injectDisplayedBarComponentWrapper=function(){var t,e,n=this,r=this.iconsOrder,i=function(t){l.player.ui.addComponent({label:"Right-Upper-Bar-Wrapper",presets:[t],area:c.TopBarRightControls,get:function(){return(0,a.h)(s.DisplayedBar,{ref:n.displayedBarComponentRefs[t],getControls:function(){return n.getControls(r).filter((function(e){return e.presets.includes(t)}))},player:n.player})}})},l=this;try{for(var p=o(d),u=p.next();!u.done;u=p.next())i(u.value)}catch(e){t={error:e}}finally{try{u&&!u.done&&(e=p.return)&&e.call(p)}finally{if(t)throw t.error}}},t.validateItem=function(t){return"function"==typeof t.onClick&&"function"==typeof t.component},t}();e.UpperBarManager=h},562:function(t,e,n){"use strict";var o,r=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.UIManagers=e.pluginName=void 0;var i=n(2052),a=n(3682),s=n(3765),l=n(7243),c=n(3121),p=n(5963),u=n(1968);e.pluginName="uiManagers";var d=function(t){function e(e,n,o){var r=t.call(this,e,n,o)||this;n.registerService("sidePanelsManager",new a.SidePanelsManager(n,r.logger)),n.registerService("upperBarManager",new s.UpperBarManager(n,r.logger));var i=new c.PresetManager({kalturaPlayer:n,eventManager:r.eventManager}),d=new l.FloatingManager({presetManager:i,kalturaPlayer:n,logger:r.logger,eventManager:r.eventManager});return n.registerService("floatingManager",d),n.registerService("toastManager",new p.ToastManager({floatingManager:d},(function(t){return r.dispatchEvent(t)}))),n.registerService("bannerManager",new u.BannerManager({floatingManager:d,kalturaPlayer:n})),r}return r(e,t),e.isValid=function(){return!0},e.defaultConfig={},e}(i.BasePlugin);e.UIManagers=d},2052:t=>{"use strict";t.exports=KalturaPlayer},4522:t=>{"use strict";t.exports=KalturaPlayer.ui.preact},8750:t=>{"use strict";t.exports=KalturaPlayer.ui.preactHooks}},e={};function n(o){var r=e[o];if(void 0!==r)return r.exports;var i=e[o]={id:o,exports:{}};return t[o].call(i.exports,i,i.exports,n),i.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var o in e)n.o(e,o)&&!n.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.nc=void 0,(()=>{"use strict";var t=n(2052),e=n(562);(0,t.registerPlugin)(e.pluginName,e.UIManagers)})()})();

!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("@playkit-js/playkit-js-ui"),require("kaltura-player-js")):"function"==typeof define&&define.amd?define("visibility",["playkit-js-ui","kaltura-player-js"],e):"object"==typeof exports?exports.visibility=e(require("@playkit-js/playkit-js-ui"),require("kaltura-player-js")):(t.KalturaPlayer=t.KalturaPlayer||{},t.KalturaPlayer.plugins=t.KalturaPlayer.plugins||{},t.KalturaPlayer.plugins.visibility=e(t.KalturaPlayer.ui,t.KalturaPlayer))}(window,(function(t,e){return function(t){var e={};function n(i){if(e[i])return e[i].exports;var o=e[i]={i:i,l:!1,exports:{}};return t[i].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(i,o,function(e){return t[e]}.bind(null,o));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=7)}([function(e,n){e.exports=t},function(t,n){t.exports=e},function(t,e,n){"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n=function(t,e){var n=t[1]||"",i=t[3];if(!i)return n;if(e&&"function"==typeof btoa){var o=(a=i,s=btoa(unescape(encodeURIComponent(JSON.stringify(a)))),c="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(s),"/*# ".concat(c," */")),r=i.sources.map((function(t){return"/*# sourceURL=".concat(i.sourceRoot||"").concat(t," */")}));return[n].concat(r).concat([o]).join("\n")}var a,s,c;return[n].join("\n")}(e,t);return e[2]?"@media ".concat(e[2]," {").concat(n,"}"):n})).join("")},e.i=function(t,n,i){"string"==typeof t&&(t=[[null,t,""]]);var o={};if(i)for(var r=0;r<this.length;r++){var a=this[r][0];null!=a&&(o[a]=!0)}for(var s=0;s<t.length;s++){var c=[].concat(t[s]);i&&o[c[0]]||(n&&(c[2]?c[2]="".concat(n," and ").concat(c[2]):c[2]=n),e.push(c))}},e}},function(t,e,n){var i=n(4),o=n(5);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[t.i,o,""]]);var r={insert:"head",singleton:!1};i(o,r);t.exports=o.locals||{}},function(t,e,n){"use strict";var i,o=function(){return void 0===i&&(i=Boolean(window&&document&&document.all&&!window.atob)),i},r=function(){var t={};return function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}t[e]=n}return t[e]}}(),a=[];function s(t){for(var e=-1,n=0;n<a.length;n++)if(a[n].identifier===t){e=n;break}return e}function c(t,e){for(var n={},i=[],o=0;o<t.length;o++){var r=t[o],c=e.base?r[0]+e.base:r[0],l=n[c]||0,u="".concat(c," ").concat(l);n[c]=l+1;var f=s(u),h={css:r[1],media:r[2],sourceMap:r[3]};-1!==f?(a[f].references++,a[f].updater(h)):a.push({identifier:u,updater:y(h,e),references:1}),i.push(u)}return i}function l(t){var e=document.createElement("style"),i=t.attributes||{};if(void 0===i.nonce){var o=n.nc;o&&(i.nonce=o)}if(Object.keys(i).forEach((function(t){e.setAttribute(t,i[t])})),"function"==typeof t.insert)t.insert(e);else{var a=r(t.insert||"head");if(!a)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");a.appendChild(e)}return e}var u,f=(u=[],function(t,e){return u[t]=e,u.filter(Boolean).join("\n")});function h(t,e,n,i){var o=n?"":i.media?"@media ".concat(i.media," {").concat(i.css,"}"):i.css;if(t.styleSheet)t.styleSheet.cssText=f(e,o);else{var r=document.createTextNode(o),a=t.childNodes;a[e]&&t.removeChild(a[e]),a.length?t.insertBefore(r,a[e]):t.appendChild(r)}}function p(t,e,n){var i=n.css,o=n.media,r=n.sourceMap;if(o?t.setAttribute("media",o):t.removeAttribute("media"),r&&btoa&&(i+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(r))))," */")),t.styleSheet)t.styleSheet.cssText=i;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(i))}}var g=null,d=0;function y(t,e){var n,i,o;if(e.singleton){var r=d++;n=g||(g=l(e)),i=h.bind(null,n,r,!1),o=h.bind(null,n,r,!0)}else n=l(e),i=p.bind(null,n,e),o=function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(n)};return i(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;i(t=e)}else o()}}t.exports=function(t,e){(e=e||{}).singleton||"boolean"==typeof e.singleton||(e.singleton=o());var n=c(t=t||[],e);return function(t){if(t=t||[],"[object Array]"===Object.prototype.toString.call(t)){for(var i=0;i<n.length;i++){var o=s(n[i]);a[o].references--}for(var r=c(t,e),l=0;l<n.length;l++){var u=s(n[l]);0===a[u].references&&(a[u].updater(),a.splice(u,1))}n=r}}}},function(t,e,n){"use strict";n.r(e);var i=n(2),o=n.n(i)()(!0);o.push([t.i,".playkit-floating-poster {\n  height: 100%;\n  width: 100%;\n  background-color: black;\n  background-repeat: no-repeat;\n  background-size: contain;\n  background-position: center;\n  display: none;\n}\n.playkit-floating-poster.playkit-floating-poster-show {\n  display: block;\n}\n.playkit-floating-active.playkit-floating-active-top {\n  top: 0;\n}\n.playkit-floating-active.playkit-floating-active-bottom {\n  bottom: 0;\n}\n.playkit-floating-active.playkit-floating-active-left {\n  left: 0;\n}\n.playkit-floating-active.playkit-floating-active-right {\n  right: 0;\n}\n\n.playkit-floating-container {\n  height: 100%;\n  width: 100%;\n  touch-action: none;\n}\n.playkit-floating-container.playkit-floating-active {\n  z-index: 9999;\n  position: fixed;\n}\n.playkit-floating-container.playkit-floating-active.draggable {\n  cursor: grab;\n}\n\n.playkit-floating-dismissible {\n  display: none;\n  height: 24px;\n  width: 24px;\n}\n\n.playkit-floating-container.playkit-floating-active .playkit-floating-dismissible {\n  display: inline-block;\n}\n","",{version:3,sources:["style.css"],names:[],mappings:"AAAA;EACE,YAAY;EACZ,WAAW;EACX,uBAAuB;EACvB,4BAA4B;EAC5B,wBAAwB;EACxB,2BAA2B;EAC3B,aAAa;AACf;AACA;EACE,cAAc;AAChB;AACA;EACE,MAAM;AACR;AACA;EACE,SAAS;AACX;AACA;EACE,OAAO;AACT;AACA;EACE,QAAQ;AACV;;AAEA;EACE,YAAY;EACZ,WAAW;EACX,kBAAkB;AACpB;AACA;EACE,aAAa;EACb,eAAe;AACjB;AACA;EACE,YAAY;AACd;;AAEA;EACE,aAAa;EACb,YAAY;EACZ,WAAW;AACb;;AAEA;EACE,qBAAqB;AACvB",file:"style.css",sourcesContent:[".playkit-floating-poster {\n  height: 100%;\n  width: 100%;\n  background-color: black;\n  background-repeat: no-repeat;\n  background-size: contain;\n  background-position: center;\n  display: none;\n}\n.playkit-floating-poster.playkit-floating-poster-show {\n  display: block;\n}\n.playkit-floating-active.playkit-floating-active-top {\n  top: 0;\n}\n.playkit-floating-active.playkit-floating-active-bottom {\n  bottom: 0;\n}\n.playkit-floating-active.playkit-floating-active-left {\n  left: 0;\n}\n.playkit-floating-active.playkit-floating-active-right {\n  right: 0;\n}\n\n.playkit-floating-container {\n  height: 100%;\n  width: 100%;\n  touch-action: none;\n}\n.playkit-floating-container.playkit-floating-active {\n  z-index: 9999;\n  position: fixed;\n}\n.playkit-floating-container.playkit-floating-active.draggable {\n  cursor: grab;\n}\n\n.playkit-floating-dismissible {\n  display: none;\n  height: 24px;\n  width: 24px;\n}\n\n.playkit-floating-container.playkit-floating-active .playkit-floating-dismissible {\n  display: inline-block;\n}\n"]}]),e.default=o},function(t,e){!function(){"use strict";if("object"==typeof window)if("IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in window.IntersectionObserverEntry.prototype)"isIntersecting"in window.IntersectionObserverEntry.prototype||Object.defineProperty(window.IntersectionObserverEntry.prototype,"isIntersecting",{get:function(){return this.intersectionRatio>0}});else{var t=window.document,e=[],n=null,i=null;r.prototype.THROTTLE_TIMEOUT=100,r.prototype.POLL_INTERVAL=null,r.prototype.USE_MUTATION_OBSERVER=!0,r._setupCrossOriginUpdater=function(){return n||(n=function(t,n){i=t&&n?u(t,n):{top:0,bottom:0,left:0,right:0,width:0,height:0},e.forEach((function(t){t._checkForIntersections()}))}),n},r._resetCrossOriginUpdater=function(){n=null,i=null},r.prototype.observe=function(t){if(!this._observationTargets.some((function(e){return e.element==t}))){if(!t||1!=t.nodeType)throw new Error("target must be an Element");this._registerInstance(),this._observationTargets.push({element:t,entry:null}),this._monitorIntersections(t.ownerDocument),this._checkForIntersections()}},r.prototype.unobserve=function(t){this._observationTargets=this._observationTargets.filter((function(e){return e.element!=t})),this._unmonitorIntersections(t.ownerDocument),0==this._observationTargets.length&&this._unregisterInstance()},r.prototype.disconnect=function(){this._observationTargets=[],this._unmonitorAllIntersections(),this._unregisterInstance()},r.prototype.takeRecords=function(){var t=this._queuedEntries.slice();return this._queuedEntries=[],t},r.prototype._initThresholds=function(t){var e=t||[0];return Array.isArray(e)||(e=[e]),e.sort().filter((function(t,e,n){if("number"!=typeof t||isNaN(t)||t<0||t>1)throw new Error("threshold must be a number between 0 and 1 inclusively");return t!==n[e-1]}))},r.prototype._parseRootMargin=function(t){var e=(t||"0px").split(/\s+/).map((function(t){var e=/^(-?\d*\.?\d+)(px|%)$/.exec(t);if(!e)throw new Error("rootMargin must be specified in pixels or percent");return{value:parseFloat(e[1]),unit:e[2]}}));return e[1]=e[1]||e[0],e[2]=e[2]||e[0],e[3]=e[3]||e[1],e},r.prototype._monitorIntersections=function(e){var n=e.defaultView;if(n&&-1==this._monitoringDocuments.indexOf(e)){var i=this._checkForIntersections,o=null,r=null;if(this.POLL_INTERVAL?o=n.setInterval(i,this.POLL_INTERVAL):(a(n,"resize",i,!0),a(e,"scroll",i,!0),this.USE_MUTATION_OBSERVER&&"MutationObserver"in n&&(r=new n.MutationObserver(i)).observe(e,{attributes:!0,childList:!0,characterData:!0,subtree:!0})),this._monitoringDocuments.push(e),this._monitoringUnsubscribes.push((function(){var t=e.defaultView;t&&(o&&t.clearInterval(o),s(t,"resize",i,!0)),s(e,"scroll",i,!0),r&&r.disconnect()})),e!=(this.root&&this.root.ownerDocument||t)){var c=p(e);c&&this._monitorIntersections(c.ownerDocument)}}},r.prototype._unmonitorIntersections=function(e){var n=this._monitoringDocuments.indexOf(e);if(-1!=n){var i=this.root&&this.root.ownerDocument||t;if(!this._observationTargets.some((function(t){var n=t.element.ownerDocument;if(n==e)return!0;for(;n&&n!=i;){var o=p(n);if((n=o&&o.ownerDocument)==e)return!0}return!1}))){var o=this._monitoringUnsubscribes[n];if(this._monitoringDocuments.splice(n,1),this._monitoringUnsubscribes.splice(n,1),o(),e!=i){var r=p(e);r&&this._unmonitorIntersections(r.ownerDocument)}}}},r.prototype._unmonitorAllIntersections=function(){var t=this._monitoringUnsubscribes.slice(0);this._monitoringDocuments.length=0,this._monitoringUnsubscribes.length=0;for(var e=0;e<t.length;e++)t[e]()},r.prototype._checkForIntersections=function(){if(this.root||!n||i){var t=this._rootIsInDom(),e=t?this._getRootRect():{top:0,bottom:0,left:0,right:0,width:0,height:0};this._observationTargets.forEach((function(i){var r=i.element,a=c(r),s=this._rootContainsTarget(r),l=i.entry,u=t&&s&&this._computeTargetAndRootIntersection(r,a,e),f=i.entry=new o({time:window.performance&&performance.now&&performance.now(),target:r,boundingClientRect:a,rootBounds:n&&!this.root?null:e,intersectionRect:u});l?t&&s?this._hasCrossedThreshold(l,f)&&this._queuedEntries.push(f):l&&l.isIntersecting&&this._queuedEntries.push(f):this._queuedEntries.push(f)}),this),this._queuedEntries.length&&this._callback(this.takeRecords(),this)}},r.prototype._computeTargetAndRootIntersection=function(e,o,r){if("none"!=window.getComputedStyle(e).display){for(var a,s,l,f,p,g,d,y,v=o,m=h(e),b=!1;!b&&m;){var _=null,A=1==m.nodeType?window.getComputedStyle(m):{};if("none"==A.display)return null;if(m==this.root||9==m.nodeType)if(b=!0,m==this.root||m==t)n&&!this.root?!i||0==i.width&&0==i.height?(m=null,_=null,v=null):_=i:_=r;else{var E=h(m),C=E&&c(E),w=E&&this._computeTargetAndRootIntersection(E,C,r);C&&w?(m=E,_=u(C,w)):(m=null,v=null)}else{var k=m.ownerDocument;m!=k.body&&m!=k.documentElement&&"visible"!=A.overflow&&(_=c(m))}if(_&&(a=_,s=v,l=void 0,f=void 0,p=void 0,g=void 0,d=void 0,y=void 0,l=Math.max(a.top,s.top),f=Math.min(a.bottom,s.bottom),p=Math.max(a.left,s.left),g=Math.min(a.right,s.right),y=f-l,v=(d=g-p)>=0&&y>=0&&{top:l,bottom:f,left:p,right:g,width:d,height:y}||null),!v)break;m=m&&h(m)}return v}},r.prototype._getRootRect=function(){var e;if(this.root)e=c(this.root);else{var n=t.documentElement,i=t.body;e={top:0,left:0,right:n.clientWidth||i.clientWidth,width:n.clientWidth||i.clientWidth,bottom:n.clientHeight||i.clientHeight,height:n.clientHeight||i.clientHeight}}return this._expandRectByRootMargin(e)},r.prototype._expandRectByRootMargin=function(t){var e=this._rootMarginValues.map((function(e,n){return"px"==e.unit?e.value:e.value*(n%2?t.width:t.height)/100})),n={top:t.top-e[0],right:t.right+e[1],bottom:t.bottom+e[2],left:t.left-e[3]};return n.width=n.right-n.left,n.height=n.bottom-n.top,n},r.prototype._hasCrossedThreshold=function(t,e){var n=t&&t.isIntersecting?t.intersectionRatio||0:-1,i=e.isIntersecting?e.intersectionRatio||0:-1;if(n!==i)for(var o=0;o<this.thresholds.length;o++){var r=this.thresholds[o];if(r==n||r==i||r<n!=r<i)return!0}},r.prototype._rootIsInDom=function(){return!this.root||f(t,this.root)},r.prototype._rootContainsTarget=function(e){return f(this.root||t,e)&&(!this.root||this.root.ownerDocument==e.ownerDocument)},r.prototype._registerInstance=function(){e.indexOf(this)<0&&e.push(this)},r.prototype._unregisterInstance=function(){var t=e.indexOf(this);-1!=t&&e.splice(t,1)},window.IntersectionObserver=r,window.IntersectionObserverEntry=o}function o(t){this.time=t.time,this.target=t.target,this.rootBounds=l(t.rootBounds),this.boundingClientRect=l(t.boundingClientRect),this.intersectionRect=l(t.intersectionRect||{top:0,bottom:0,left:0,right:0,width:0,height:0}),this.isIntersecting=!!t.intersectionRect;var e=this.boundingClientRect,n=e.width*e.height,i=this.intersectionRect,o=i.width*i.height;this.intersectionRatio=n?Number((o/n).toFixed(4)):this.isIntersecting?1:0}function r(t,e){var n,i,o,r=e||{};if("function"!=typeof t)throw new Error("callback must be a function");if(r.root&&1!=r.root.nodeType)throw new Error("root must be an Element");this._checkForIntersections=(n=this._checkForIntersections.bind(this),i=this.THROTTLE_TIMEOUT,o=null,function(){o||(o=setTimeout((function(){n(),o=null}),i))}),this._callback=t,this._observationTargets=[],this._queuedEntries=[],this._rootMarginValues=this._parseRootMargin(r.rootMargin),this.thresholds=this._initThresholds(r.threshold),this.root=r.root||null,this.rootMargin=this._rootMarginValues.map((function(t){return t.value+t.unit})).join(" "),this._monitoringDocuments=[],this._monitoringUnsubscribes=[]}function a(t,e,n,i){"function"==typeof t.addEventListener?t.addEventListener(e,n,i||!1):"function"==typeof t.attachEvent&&t.attachEvent("on"+e,n)}function s(t,e,n,i){"function"==typeof t.removeEventListener?t.removeEventListener(e,n,i||!1):"function"==typeof t.detatchEvent&&t.detatchEvent("on"+e,n)}function c(t){var e;try{e=t.getBoundingClientRect()}catch(t){}return e?(e.width&&e.height||(e={top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:e.right-e.left,height:e.bottom-e.top}),e):{top:0,bottom:0,left:0,right:0,width:0,height:0}}function l(t){return!t||"x"in t?t:{top:t.top,y:t.top,bottom:t.bottom,left:t.left,x:t.left,right:t.right,width:t.width,height:t.height}}function u(t,e){var n=e.top-t.top,i=e.left-t.left;return{top:n,left:i,height:e.height,width:e.width,bottom:n+e.height,right:i+e.width}}function f(t,e){for(var n=e;n;){if(n==t)return!0;n=h(n)}return!1}function h(e){var n=e.parentNode;return 9==e.nodeType&&e!=t?p(e):n&&11==n.nodeType&&n.host?n.host:n&&n.assignedSlot?n.assignedSlot.parentNode:n}function p(t){try{return t.defaultView&&t.defaultView.frameElement||null}catch(t){return null}}}()},function(t,e,n){"use strict";n.r(e),n.d(e,"Plugin",(function(){return D})),n.d(e,"VERSION",(function(){return M})),n.d(e,"NAME",(function(){return x})),n.d(e,"EventType",(function(){return b}));var i=n(1),o=(n(3),n(0));function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function c(t,e){return(c=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function l(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,i=f(t);if(e){var o=f(this).constructor;n=Reflect.construct(i,arguments,o)}else n=i.apply(this,arguments);return u(this,n)}}function u(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function f(t){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var h=o.preacti18n.Localizer,p=o.preacti18n.Text,g=o.preact.Component,d=o.utils.KeyMap,y=o.Components.Icon,v=o.Components.IconType,m=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&c(t,e)}(u,t);var e,n,i,r=l(u);function u(){return a(this,u),r.apply(this,arguments)}return e=u,(n=[{key:"render",value:function(t){return Object(o.h)(h,null,Object(o.h)("a",{role:"button",ref:function(e){t.addAccessibleChild&&t.addAccessibleChild(e)},tabIndex:"0",onClick:function(){return t.onClose()},onKeyDown:function(e){e.keyCode===d.ENTER&&t.onClose()},"aria-label":Object(o.h)(p,{id:"overlay.close"}),className:"playkit-floating-dismissible playkit-icon playkit-icon-close"},Object(o.h)(y,{type:v.Close})))}}])&&s(e.prototype,n),i&&s(e,i),u}(g),b=(n(6),{PLAYER_VISIBILITY_CHANGED:"playervisibilitychanged",FLOATING_PLAYER_STATE_CHANGED:"floatingplayerstatechanged",FLOATING_PLAYER_DISMISSED:"floatingplayerdismissed"});function _(t){return(_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function A(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function E(t,e,n){return e&&A(t.prototype,e),n&&A(t,n),t}function C(t,e){return(C=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function w(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,i=I(t);if(e){var o=I(this).constructor;n=Reflect.construct(i,arguments,o)}else n=i.apply(this,arguments);return k(this,n)}}function k(t,e){return!e||"object"!==_(e)&&"function"!=typeof e?T(t):e}function T(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function I(t){return(I=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function O(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var R=i.core.Utils,P={position:"bottom-right",height:"225",width:"400",marginX:"20",marginY:"20",dismissible:!0,draggable:!0},D=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&C(t,e)}(n,t);var e=w(n);function n(t,i,o){var r;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),O(T(r=e.call(this,t,i,o)),"_playbackStartOccurred",!1),O(T(r),"_dismissed",!1),O(T(r),"_isInPIP",!1),O(T(r),"_currMousePos",{x:0,y:0}),O(T(r),"_throttleWait",!1),r._appTargetContainer=R.Dom.getElementById(r.player.config.targetId),r.config.floating&&r._initFloating(),r._addBindings();var a={threshold:r.config.threshold/100};return r._observer=new window.IntersectionObserver(r._handleVisibilityChange.bind(T(r)),a),r._observer.observe(r._appTargetContainer),r}return E(n,[{key:"getUIComponents",value:function(){var t=this;return this.config.floating&&this.config.floating.dismissible?[{label:"dismissibleFloatingButtonComponent",presets:["Playback","Live","Error","Ads","Idle"],container:"TopBarRightControls",get:m,props:{onClose:function(){t._handleDismissFloating()}}}]:[]}}],[{key:"isValid",value:function(){return!0}}]),E(n,[{key:"_initFloating",value:function(){var t=this;this.config=R.Object.mergeDeep({floating:P},this.config),this._floatingPoster=R.Dom.createElement("div"),this._floatingPoster.className="playkit-floating-poster",this._floatingContainer=R.Dom.createElement("div"),this._floatingContainer.className="playkit-floating-container",R.Dom.prependTo(this._floatingPoster,this._appTargetContainer);var e=R.Dom.getElementById(this.player.config.ui.targetId);this._appTargetContainer&&this._floatingContainer&&(this._appTargetContainer.replaceChild(this._floatingContainer,e),R.Dom.appendChild(this._floatingContainer,e),this.config.floating.position.split("-").forEach((function(e){R.Dom.addClassName(t._floatingContainer,"".concat("playkit-floating-active","-").concat(e))}))),this.config.floating.draggable&&R.Dom.addClassName(this._floatingContainer,"playkit-floating-draggable")}},{key:"_handleDismissFloating",value:function(){this._dismissed=!0,this.player.pause(),this._stopFloating(),this.dispatchEvent(b.FLOATING_PLAYER_DISMISSED)}},{key:"_stopFloating",value:function(){R.Dom.removeClassName(this._floatingPoster,"playkit-floating-poster-show"),R.Dom.removeClassName(this._floatingContainer,"playkit-floating-active"),R.Dom.removeAttribute(this._floatingContainer,"style"),this.config.floating.draggable&&(this.eventManager.unlisten(this._floatingContainer,"mousedown"),this.eventManager.unlisten(this._floatingContainer,"touchstart"),this._stopDrag()),this.dispatchEvent(b.FLOATING_PLAYER_STATE_CHANGED,{active:!1})}},{key:"_startFloating",value:function(){var t=this;R.Dom.addClassName(this._floatingContainer,"playkit-floating-active"),R.Dom.addClassName(this._floatingPoster,"playkit-floating-poster-show"),R.Dom.setStyle(this._floatingContainer,"height",this.config.floating.height+"px"),R.Dom.setStyle(this._floatingContainer,"width",this.config.floating.width+"px"),R.Dom.setStyle(this._floatingContainer,"margin","".concat(this.config.floating.marginY,"px ").concat(this.config.floating.marginX,"px")),this.config.floating.draggable&&(this.eventManager.listen(this._floatingContainer,"mousedown",(function(e){t._startDrag(e,"mousemove","mouseup")})),this.eventManager.listen(this._floatingContainer,"touchstart",(function(e){t.eventManager.unlisten(t._floatingContainer,"mousedown"),t._startDrag(e,"touchmove","touchend")}))),this.dispatchEvent(b.FLOATING_PLAYER_STATE_CHANGED,{active:!0})}},{key:"_handleVisibilityChange",value:function(t){var e=t[0].intersectionRatio<this.config.threshold/100;this.config.floating&&this._playbackStartOccurred&&!this._dismissed&&!this._isInPIP&&this._handleFloatingChange(e),this.dispatchEvent(b.PLAYER_VISIBILITY_CHANGED,{visible:!e})}},{key:"_handleFloatingChange",value:function(t){t?this._startFloating():this._stopFloating()}},{key:"_addBindings",value:function(){var t=this;this.eventManager.listen(this.player,this.player.Event.ENTER_PICTURE_IN_PICTURE,(function(){t._stopFloating(),t._isInPIP=!0})),this.eventManager.listen(this.player,this.player.Event.LEAVE_PICTURE_IN_PICTURE,(function(){t._isInPIP=!1})),this.eventManager.listen(this.player,this.player.Event.PLAYBACK_START,(function(){t._playbackStartOccurred=!0,R.Dom.setStyle(t._floatingPoster,"background-image",'url("'.concat(t.player.config.sources.poster,'")'))}))}},{key:"destroy",value:function(){this.logger.debug("destroy"),R.Dom.removeChild(this._appTargetContainer,this._floatingContainer),R.Dom.removeChild(this._appTargetContainer,this._floatingPoster),this._appTargetContainer=null,this._floatingContainer=null,this._floatingPoster=null,this._observer.disconnect(),this._observer=null,this.eventManager.destroy()}},{key:"_startDrag",value:function(t,e,n){var i=this;this.eventManager.listenOnce(document,n,(function(){i._stopDrag()})),this._currMousePos.x=this._clientX(t),this._currMousePos.y=this._clientY(t),this.eventManager.listen(document,e,(function(t){i._moveDrag(t)}))}},{key:"_clientX",value:function(t){return t instanceof MouseEvent?t.clientX:t.changedTouches&&t.changedTouches[0]&&t.changedTouches[0].clientX}},{key:"_clientY",value:function(t){return t instanceof MouseEvent?t.clientY:t.changedTouches&&t.changedTouches[0]&&t.changedTouches[0].clientY}},{key:"_moveDrag",value:function(t){var e=this;if(!this._throttleWait){t=t||window.event;var n=this._currMousePos.x-this._clientX(t),i=this._currMousePos.y-this._clientY(t);this._currMousePos.x=this._clientX(t),this._currMousePos.y=this._clientY(t);var o=this._floatingContainer;if(o){var r=o.getBoundingClientRect(),a=Math.max(r.top-parseInt(o.style.marginTop)-i,0);a=Math.min(a,window.innerHeight-r.height-2*this.config.floating.marginY),o.style.top=a+"px";var s=Math.max(r.left-parseInt(o.style.marginLeft)-n,0);s=Math.min(s,window.innerWidth-r.width-2*this.config.floating.marginX),o.style.left=s+"px"}this._throttleWait=!0,setTimeout((function(){e._throttleWait=!1}),30)}}},{key:"_stopDrag",value:function(){this.eventManager.unlisten(document,"mousemove"),this.eventManager.unlisten(document,"touchmove")}}]),n}(i.BasePlugin);O(D,"defaultConfig",{threshold:50});var M="1.2.0",x="@playkit-js/playkit-js-visibility";Object(i.registerPlugin)("visibility",D)}])}));

!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("kaltura-player-js")):"function"==typeof define&&define.amd?define("vr",["kaltura-player-js"],e):"object"==typeof exports?exports.vr=e(require("kaltura-player-js")):(t.KalturaPlayer=t.KalturaPlayer||{},t.KalturaPlayer.plugins=t.KalturaPlayer.plugins||{},t.KalturaPlayer.plugins.vr=e(t.KalturaPlayer))}(window,(function(t){return function(t){var e={};function i(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)i.d(n,r,function(e){return t[e]}.bind(null,r));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=5)}([function(e,i){e.exports=t},function(t,e,i){var n=i(2),r=i(3);"string"==typeof(r=r.__esModule?r.default:r)&&(r=[[t.i,r,""]]);var a={insert:"head",singleton:!1};n(r,a);t.exports=r.locals||{}},function(t,e,i){"use strict";var n,r=function(){return void 0===n&&(n=Boolean(window&&document&&document.all&&!window.atob)),n},a=function(){var t={};return function(e){if(void 0===t[e]){var i=document.querySelector(e);if(window.HTMLIFrameElement&&i instanceof window.HTMLIFrameElement)try{i=i.contentDocument.head}catch(t){i=null}t[e]=i}return t[e]}}(),o=[];function s(t){for(var e=-1,i=0;i<o.length;i++)if(o[i].identifier===t){e=i;break}return e}function c(t,e){for(var i={},n=[],r=0;r<t.length;r++){var a=t[r],c=e.base?a[0]+e.base:a[0],h=i[c]||0,l="".concat(c," ").concat(h);i[c]=h+1;var u=s(l),p={css:a[1],media:a[2],sourceMap:a[3]};-1!==u?(o[u].references++,o[u].updater(p)):o.push({identifier:l,updater:g(p,e),references:1}),n.push(l)}return n}function h(t){var e=document.createElement("style"),n=t.attributes||{};if(void 0===n.nonce){var r=i.nc;r&&(n.nonce=r)}if(Object.keys(n).forEach((function(t){e.setAttribute(t,n[t])})),"function"==typeof t.insert)t.insert(e);else{var o=a(t.insert||"head");if(!o)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");o.appendChild(e)}return e}var l,u=(l=[],function(t,e){return l[t]=e,l.filter(Boolean).join("\n")});function p(t,e,i,n){var r=i?"":n.media?"@media ".concat(n.media," {").concat(n.css,"}"):n.css;if(t.styleSheet)t.styleSheet.cssText=u(e,r);else{var a=document.createTextNode(r),o=t.childNodes;o[e]&&t.removeChild(o[e]),o.length?t.insertBefore(a,o[e]):t.appendChild(a)}}function d(t,e,i){var n=i.css,r=i.media,a=i.sourceMap;if(r?t.setAttribute("media",r):t.removeAttribute("media"),a&&btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(a))))," */")),t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}var f=null,m=0;function g(t,e){var i,n,r;if(e.singleton){var a=m++;i=f||(f=h(e)),n=p.bind(null,i,a,!1),r=p.bind(null,i,a,!0)}else i=h(e),n=d.bind(null,i,e),r=function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(i)};return n(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;n(t=e)}else r()}}t.exports=function(t,e){(e=e||{}).singleton||"boolean"==typeof e.singleton||(e.singleton=r());var i=c(t=t||[],e);return function(t){if(t=t||[],"[object Array]"===Object.prototype.toString.call(t)){for(var n=0;n<i.length;n++){var r=s(i[n]);o[r].references--}for(var a=c(t,e),h=0;h<i.length;h++){var l=s(i[h]);0===o[l].references&&(o[l].updater(),o.splice(l,1))}i=a}}}},function(t,e,i){(e=i(4)(!1)).push([t.i,".playkit-vr-video {\n  opacity: 0;\n}\n\n.playkit-vr-canvas {\n  position: absolute;\n  top: 0;\n  bottom: 0;\n  right: 0;\n  left: 0;\n  margin: auto;\n  width: 100%;\n}\n",""]),t.exports=e},function(t,e,i){"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var i=function(t,e){var i=t[1]||"",n=t[3];if(!n)return i;if(e&&"function"==typeof btoa){var r=(o=n,s=btoa(unescape(encodeURIComponent(JSON.stringify(o)))),c="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(s),"/*# ".concat(c," */")),a=n.sources.map((function(t){return"/*# sourceURL=".concat(n.sourceRoot||"").concat(t," */")}));return[i].concat(a).concat([r]).join("\n")}var o,s,c;return[i].join("\n")}(e,t);return e[2]?"@media ".concat(e[2]," {").concat(i,"}"):i})).join("")},e.i=function(t,i,n){"string"==typeof t&&(t=[[null,t,""]]);var r={};if(n)for(var a=0;a<this.length;a++){var o=this[a][0];null!=o&&(r[o]=!0)}for(var s=0;s<t.length;s++){var c=[].concat(t[s]);n&&r[c[0]]||(i&&(c[2]?c[2]="".concat(i," and ").concat(c[2]):c[2]=i),e.push(c))}},e}},function(t,e,i){"use strict";i.r(e),i.d(e,"Plugin",(function(){return ys})),i.d(e,"VERSION",(function(){return xs})),i.d(e,"NAME",(function(){return _s}));var n=i(0);function r(){}void 0===Number.EPSILON&&(Number.EPSILON=Math.pow(2,-52)),void 0===Number.isInteger&&(Number.isInteger=function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t}),void 0===Math.sign&&(Math.sign=function(t){return t<0?-1:t>0?1:+t}),"name"in Function.prototype==!1&&Object.defineProperty(Function.prototype,"name",{get:function(){return this.toString().match(/^\s*function\s*([^\(\s]*)/)[1]}}),void 0===Object.assign&&(Object.assign=function(t){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),i=1;i<arguments.length;i++){var n=arguments[i];if(null!=n)for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}),Object.assign(r.prototype,{addEventListener:function(t,e){void 0===this._listeners&&(this._listeners={});var i=this._listeners;void 0===i[t]&&(i[t]=[]),-1===i[t].indexOf(e)&&i[t].push(e)},hasEventListener:function(t,e){if(void 0===this._listeners)return!1;var i=this._listeners;return void 0!==i[t]&&-1!==i[t].indexOf(e)},removeEventListener:function(t,e){if(void 0!==this._listeners){var i=this._listeners[t];if(void 0!==i){var n=i.indexOf(e);-1!==n&&i.splice(n,1)}}},dispatchEvent:function(t){if(void 0!==this._listeners){var e=this._listeners[t.type];if(void 0!==e){t.target=this;for(var i=e.slice(0),n=0,r=i.length;n<r;n++)i[n].call(this,t)}}}});var a,o,s,c,h,l,u,p,d,f,m,g={DEG2RAD:Math.PI/180,RAD2DEG:180/Math.PI,generateUUID:function(){for(var t=[],e=0;e<256;e++)t[e]=(e<16?"0":"")+e.toString(16);return function(){var e=4294967295*Math.random()|0,i=4294967295*Math.random()|0,n=4294967295*Math.random()|0,r=4294967295*Math.random()|0;return(t[255&e]+t[e>>8&255]+t[e>>16&255]+t[e>>24&255]+"-"+t[255&i]+t[i>>8&255]+"-"+t[i>>16&15|64]+t[i>>24&255]+"-"+t[63&n|128]+t[n>>8&255]+"-"+t[n>>16&255]+t[n>>24&255]+t[255&r]+t[r>>8&255]+t[r>>16&255]+t[r>>24&255]).toUpperCase()}}(),clamp:function(t,e,i){return Math.max(e,Math.min(i,t))},euclideanModulo:function(t,e){return(t%e+e)%e},mapLinear:function(t,e,i,n,r){return n+(t-e)*(r-n)/(i-e)},lerp:function(t,e,i){return(1-i)*t+i*e},smoothstep:function(t,e,i){return t<=e?0:t>=i?1:(t=(t-e)/(i-e))*t*(3-2*t)},smootherstep:function(t,e,i){return t<=e?0:t>=i?1:(t=(t-e)/(i-e))*t*t*(t*(6*t-15)+10)},randInt:function(t,e){return t+Math.floor(Math.random()*(e-t+1))},randFloat:function(t,e){return t+Math.random()*(e-t)},randFloatSpread:function(t){return t*(.5-Math.random())},degToRad:function(t){return t*g.DEG2RAD},radToDeg:function(t){return t*g.RAD2DEG},isPowerOfTwo:function(t){return 0==(t&t-1)&&0!==t},ceilPowerOfTwo:function(t){return Math.pow(2,Math.ceil(Math.log(t)/Math.LN2))},floorPowerOfTwo:function(t){return Math.pow(2,Math.floor(Math.log(t)/Math.LN2))}};function v(t,e){this.x=t||0,this.y=e||0}function y(){this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],arguments.length>0&&console.error("THREE.Matrix4: the constructor no longer reads arguments. use .set() instead.")}function x(t,e,i,n){this._x=t||0,this._y=e||0,this._z=i||0,this._w=void 0!==n?n:1}function _(t,e,i){this.x=t||0,this.y=e||0,this.z=i||0}function b(){this.elements=[1,0,0,0,1,0,0,0,1],arguments.length>0&&console.error("THREE.Matrix3: the constructor no longer reads arguments. use .set() instead.")}Object.defineProperties(v.prototype,{width:{get:function(){return this.x},set:function(t){this.x=t}},height:{get:function(){return this.y},set:function(t){this.y=t}}}),Object.assign(v.prototype,{isVector2:!0,set:function(t,e){return this.x=t,this.y=e,this},setScalar:function(t){return this.x=t,this.y=t,this},setX:function(t){return this.x=t,this},setY:function(t){return this.y=t,this},setComponent:function(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;default:throw new Error("index is out of range: "+t)}return this},getComponent:function(t){switch(t){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+t)}},clone:function(){return new this.constructor(this.x,this.y)},copy:function(t){return this.x=t.x,this.y=t.y,this},add:function(t,e){return void 0!==e?(console.warn("THREE.Vector2: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(t,e)):(this.x+=t.x,this.y+=t.y,this)},addScalar:function(t){return this.x+=t,this.y+=t,this},addVectors:function(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this},addScaledVector:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this},sub:function(t,e){return void 0!==e?(console.warn("THREE.Vector2: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(t,e)):(this.x-=t.x,this.y-=t.y,this)},subScalar:function(t){return this.x-=t,this.y-=t,this},subVectors:function(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this},multiplyScalar:function(t){return this.x*=t,this.y*=t,this},divide:function(t){return this.x/=t.x,this.y/=t.y,this},divideScalar:function(t){return this.multiplyScalar(1/t)},applyMatrix3:function(t){var e=this.x,i=this.y,n=t.elements;return this.x=n[0]*e+n[3]*i+n[6],this.y=n[1]*e+n[4]*i+n[7],this},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this},clamp:function(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this},clampScalar:(a=new v,o=new v,function(t,e){return a.set(t,t),o.set(e,e),this.clamp(a,o)}),clampLength:function(t,e){var i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(t,Math.min(e,i)))},floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},roundToZero:function(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this},negate:function(){return this.x=-this.x,this.y=-this.y,this},dot:function(t){return this.x*t.x+this.y*t.y},lengthSq:function(){return this.x*this.x+this.y*this.y},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)},normalize:function(){return this.divideScalar(this.length()||1)},angle:function(){var t=Math.atan2(this.y,this.x);return t<0&&(t+=2*Math.PI),t},distanceTo:function(t){return Math.sqrt(this.distanceToSquared(t))},distanceToSquared:function(t){var e=this.x-t.x,i=this.y-t.y;return e*e+i*i},manhattanDistanceTo:function(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)},setLength:function(t){return this.normalize().multiplyScalar(t)},lerp:function(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this},lerpVectors:function(t,e,i){return this.subVectors(e,t).multiplyScalar(i).add(t)},equals:function(t){return t.x===this.x&&t.y===this.y},fromArray:function(t,e){return void 0===e&&(e=0),this.x=t[e],this.y=t[e+1],this},toArray:function(t,e){return void 0===t&&(t=[]),void 0===e&&(e=0),t[e]=this.x,t[e+1]=this.y,t},fromBufferAttribute:function(t,e,i){return void 0!==i&&console.warn("THREE.Vector2: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(e),this.y=t.getY(e),this},rotateAround:function(t,e){var i=Math.cos(e),n=Math.sin(e),r=this.x-t.x,a=this.y-t.y;return this.x=r*i-a*n+t.x,this.y=r*n+a*i+t.y,this}}),Object.assign(y.prototype,{isMatrix4:!0,set:function(t,e,i,n,r,a,o,s,c,h,l,u,p,d,f,m){var g=this.elements;return g[0]=t,g[4]=e,g[8]=i,g[12]=n,g[1]=r,g[5]=a,g[9]=o,g[13]=s,g[2]=c,g[6]=h,g[10]=l,g[14]=u,g[3]=p,g[7]=d,g[11]=f,g[15]=m,this},identity:function(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this},clone:function(){return(new y).fromArray(this.elements)},copy:function(t){var e=this.elements,i=t.elements;return e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e[4]=i[4],e[5]=i[5],e[6]=i[6],e[7]=i[7],e[8]=i[8],e[9]=i[9],e[10]=i[10],e[11]=i[11],e[12]=i[12],e[13]=i[13],e[14]=i[14],e[15]=i[15],this},copyPosition:function(t){var e=this.elements,i=t.elements;return e[12]=i[12],e[13]=i[13],e[14]=i[14],this},extractBasis:function(t,e,i){return t.setFromMatrixColumn(this,0),e.setFromMatrixColumn(this,1),i.setFromMatrixColumn(this,2),this},makeBasis:function(t,e,i){return this.set(t.x,e.x,i.x,0,t.y,e.y,i.y,0,t.z,e.z,i.z,0,0,0,0,1),this},extractRotation:(f=new _,function(t){var e=this.elements,i=t.elements,n=1/f.setFromMatrixColumn(t,0).length(),r=1/f.setFromMatrixColumn(t,1).length(),a=1/f.setFromMatrixColumn(t,2).length();return e[0]=i[0]*n,e[1]=i[1]*n,e[2]=i[2]*n,e[3]=0,e[4]=i[4]*r,e[5]=i[5]*r,e[6]=i[6]*r,e[7]=0,e[8]=i[8]*a,e[9]=i[9]*a,e[10]=i[10]*a,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this}),makeRotationFromEuler:function(t){t&&t.isEuler||console.error("THREE.Matrix4: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.");var e=this.elements,i=t.x,n=t.y,r=t.z,a=Math.cos(i),o=Math.sin(i),s=Math.cos(n),c=Math.sin(n),h=Math.cos(r),l=Math.sin(r);if("XYZ"===t.order){var u=a*h,p=a*l,d=o*h,f=o*l;e[0]=s*h,e[4]=-s*l,e[8]=c,e[1]=p+d*c,e[5]=u-f*c,e[9]=-o*s,e[2]=f-u*c,e[6]=d+p*c,e[10]=a*s}else if("YXZ"===t.order){var m=s*h,g=s*l,v=c*h,y=c*l;e[0]=m+y*o,e[4]=v*o-g,e[8]=a*c,e[1]=a*l,e[5]=a*h,e[9]=-o,e[2]=g*o-v,e[6]=y+m*o,e[10]=a*s}else if("ZXY"===t.order){m=s*h,g=s*l,v=c*h,y=c*l;e[0]=m-y*o,e[4]=-a*l,e[8]=v+g*o,e[1]=g+v*o,e[5]=a*h,e[9]=y-m*o,e[2]=-a*c,e[6]=o,e[10]=a*s}else if("ZYX"===t.order){u=a*h,p=a*l,d=o*h,f=o*l;e[0]=s*h,e[4]=d*c-p,e[8]=u*c+f,e[1]=s*l,e[5]=f*c+u,e[9]=p*c-d,e[2]=-c,e[6]=o*s,e[10]=a*s}else if("YZX"===t.order){var x=a*s,_=a*c,b=o*s,w=o*c;e[0]=s*h,e[4]=w-x*l,e[8]=b*l+_,e[1]=l,e[5]=a*h,e[9]=-o*h,e[2]=-c*h,e[6]=_*l+b,e[10]=x-w*l}else if("XZY"===t.order){x=a*s,_=a*c,b=o*s,w=o*c;e[0]=s*h,e[4]=-l,e[8]=c*h,e[1]=x*l+w,e[5]=a*h,e[9]=_*l-b,e[2]=b*l-_,e[6]=o*h,e[10]=w*l+x}return e[3]=0,e[7]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this},makeRotationFromQuaternion:(p=new _(0,0,0),d=new _(1,1,1),function(t){return this.compose(p,t,d)}),lookAt:(h=new _,l=new _,u=new _,function(t,e,i){var n=this.elements;return u.subVectors(t,e),0===u.lengthSq()&&(u.z=1),u.normalize(),h.crossVectors(i,u),0===h.lengthSq()&&(1===Math.abs(i.z)?u.x+=1e-4:u.z+=1e-4,u.normalize(),h.crossVectors(i,u)),h.normalize(),l.crossVectors(u,h),n[0]=h.x,n[4]=l.x,n[8]=u.x,n[1]=h.y,n[5]=l.y,n[9]=u.y,n[2]=h.z,n[6]=l.z,n[10]=u.z,this}),multiply:function(t,e){return void 0!==e?(console.warn("THREE.Matrix4: .multiply() now only accepts one argument. Use .multiplyMatrices( a, b ) instead."),this.multiplyMatrices(t,e)):this.multiplyMatrices(this,t)},premultiply:function(t){return this.multiplyMatrices(t,this)},multiplyMatrices:function(t,e){var i=t.elements,n=e.elements,r=this.elements,a=i[0],o=i[4],s=i[8],c=i[12],h=i[1],l=i[5],u=i[9],p=i[13],d=i[2],f=i[6],m=i[10],g=i[14],v=i[3],y=i[7],x=i[11],_=i[15],b=n[0],w=n[4],M=n[8],E=n[12],T=n[1],S=n[5],A=n[9],R=n[13],L=n[2],P=n[6],C=n[10],O=n[14],I=n[3],N=n[7],D=n[11],U=n[15];return r[0]=a*b+o*T+s*L+c*I,r[4]=a*w+o*S+s*P+c*N,r[8]=a*M+o*A+s*C+c*D,r[12]=a*E+o*R+s*O+c*U,r[1]=h*b+l*T+u*L+p*I,r[5]=h*w+l*S+u*P+p*N,r[9]=h*M+l*A+u*C+p*D,r[13]=h*E+l*R+u*O+p*U,r[2]=d*b+f*T+m*L+g*I,r[6]=d*w+f*S+m*P+g*N,r[10]=d*M+f*A+m*C+g*D,r[14]=d*E+f*R+m*O+g*U,r[3]=v*b+y*T+x*L+_*I,r[7]=v*w+y*S+x*P+_*N,r[11]=v*M+y*A+x*C+_*D,r[15]=v*E+y*R+x*O+_*U,this},multiplyScalar:function(t){var e=this.elements;return e[0]*=t,e[4]*=t,e[8]*=t,e[12]*=t,e[1]*=t,e[5]*=t,e[9]*=t,e[13]*=t,e[2]*=t,e[6]*=t,e[10]*=t,e[14]*=t,e[3]*=t,e[7]*=t,e[11]*=t,e[15]*=t,this},applyToBufferAttribute:function(){var t=new _;return function(e){for(var i=0,n=e.count;i<n;i++)t.x=e.getX(i),t.y=e.getY(i),t.z=e.getZ(i),t.applyMatrix4(this),e.setXYZ(i,t.x,t.y,t.z);return e}}(),determinant:function(){var t=this.elements,e=t[0],i=t[4],n=t[8],r=t[12],a=t[1],o=t[5],s=t[9],c=t[13],h=t[2],l=t[6],u=t[10],p=t[14];return t[3]*(+r*s*l-n*c*l-r*o*u+i*c*u+n*o*p-i*s*p)+t[7]*(+e*s*p-e*c*u+r*a*u-n*a*p+n*c*h-r*s*h)+t[11]*(+e*c*l-e*o*p-r*a*l+i*a*p+r*o*h-i*c*h)+t[15]*(-n*o*h-e*s*l+e*o*u+n*a*l-i*a*u+i*s*h)},transpose:function(){var t,e=this.elements;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this},setPosition:function(t){var e=this.elements;return e[12]=t.x,e[13]=t.y,e[14]=t.z,this},getInverse:function(t,e){var i=this.elements,n=t.elements,r=n[0],a=n[1],o=n[2],s=n[3],c=n[4],h=n[5],l=n[6],u=n[7],p=n[8],d=n[9],f=n[10],m=n[11],g=n[12],v=n[13],y=n[14],x=n[15],_=d*y*u-v*f*u+v*l*m-h*y*m-d*l*x+h*f*x,b=g*f*u-p*y*u-g*l*m+c*y*m+p*l*x-c*f*x,w=p*v*u-g*d*u+g*h*m-c*v*m-p*h*x+c*d*x,M=g*d*l-p*v*l-g*h*f+c*v*f+p*h*y-c*d*y,E=r*_+a*b+o*w+s*M;if(0===E){var T="THREE.Matrix4: .getInverse() can't invert matrix, determinant is 0";if(!0===e)throw new Error(T);return console.warn(T),this.identity()}var S=1/E;return i[0]=_*S,i[1]=(v*f*s-d*y*s-v*o*m+a*y*m+d*o*x-a*f*x)*S,i[2]=(h*y*s-v*l*s+v*o*u-a*y*u-h*o*x+a*l*x)*S,i[3]=(d*l*s-h*f*s-d*o*u+a*f*u+h*o*m-a*l*m)*S,i[4]=b*S,i[5]=(p*y*s-g*f*s+g*o*m-r*y*m-p*o*x+r*f*x)*S,i[6]=(g*l*s-c*y*s-g*o*u+r*y*u+c*o*x-r*l*x)*S,i[7]=(c*f*s-p*l*s+p*o*u-r*f*u-c*o*m+r*l*m)*S,i[8]=w*S,i[9]=(g*d*s-p*v*s-g*a*m+r*v*m+p*a*x-r*d*x)*S,i[10]=(c*v*s-g*h*s+g*a*u-r*v*u-c*a*x+r*h*x)*S,i[11]=(p*h*s-c*d*s-p*a*u+r*d*u+c*a*m-r*h*m)*S,i[12]=M*S,i[13]=(p*v*o-g*d*o+g*a*f-r*v*f-p*a*y+r*d*y)*S,i[14]=(g*h*o-c*v*o-g*a*l+r*v*l+c*a*y-r*h*y)*S,i[15]=(c*d*o-p*h*o+p*a*l-r*d*l-c*a*f+r*h*f)*S,this},scale:function(t){var e=this.elements,i=t.x,n=t.y,r=t.z;return e[0]*=i,e[4]*=n,e[8]*=r,e[1]*=i,e[5]*=n,e[9]*=r,e[2]*=i,e[6]*=n,e[10]*=r,e[3]*=i,e[7]*=n,e[11]*=r,this},getMaxScaleOnAxis:function(){var t=this.elements,e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],i=t[4]*t[4]+t[5]*t[5]+t[6]*t[6],n=t[8]*t[8]+t[9]*t[9]+t[10]*t[10];return Math.sqrt(Math.max(e,i,n))},makeTranslation:function(t,e,i){return this.set(1,0,0,t,0,1,0,e,0,0,1,i,0,0,0,1),this},makeRotationX:function(t){var e=Math.cos(t),i=Math.sin(t);return this.set(1,0,0,0,0,e,-i,0,0,i,e,0,0,0,0,1),this},makeRotationY:function(t){var e=Math.cos(t),i=Math.sin(t);return this.set(e,0,i,0,0,1,0,0,-i,0,e,0,0,0,0,1),this},makeRotationZ:function(t){var e=Math.cos(t),i=Math.sin(t);return this.set(e,-i,0,0,i,e,0,0,0,0,1,0,0,0,0,1),this},makeRotationAxis:function(t,e){var i=Math.cos(e),n=Math.sin(e),r=1-i,a=t.x,o=t.y,s=t.z,c=r*a,h=r*o;return this.set(c*a+i,c*o-n*s,c*s+n*o,0,c*o+n*s,h*o+i,h*s-n*a,0,c*s-n*o,h*s+n*a,r*s*s+i,0,0,0,0,1),this},makeScale:function(t,e,i){return this.set(t,0,0,0,0,e,0,0,0,0,i,0,0,0,0,1),this},makeShear:function(t,e,i){return this.set(1,e,i,0,t,1,i,0,t,e,1,0,0,0,0,1),this},compose:function(t,e,i){var n=this.elements,r=e._x,a=e._y,o=e._z,s=e._w,c=r+r,h=a+a,l=o+o,u=r*c,p=r*h,d=r*l,f=a*h,m=a*l,g=o*l,v=s*c,y=s*h,x=s*l,_=i.x,b=i.y,w=i.z;return n[0]=(1-(f+g))*_,n[1]=(p+x)*_,n[2]=(d-y)*_,n[3]=0,n[4]=(p-x)*b,n[5]=(1-(u+g))*b,n[6]=(m+v)*b,n[7]=0,n[8]=(d+y)*w,n[9]=(m-v)*w,n[10]=(1-(u+f))*w,n[11]=0,n[12]=t.x,n[13]=t.y,n[14]=t.z,n[15]=1,this},decompose:(s=new _,c=new y,function(t,e,i){var n=this.elements,r=s.set(n[0],n[1],n[2]).length(),a=s.set(n[4],n[5],n[6]).length(),o=s.set(n[8],n[9],n[10]).length();this.determinant()<0&&(r=-r),t.x=n[12],t.y=n[13],t.z=n[14],c.copy(this);var h=1/r,l=1/a,u=1/o;return c.elements[0]*=h,c.elements[1]*=h,c.elements[2]*=h,c.elements[4]*=l,c.elements[5]*=l,c.elements[6]*=l,c.elements[8]*=u,c.elements[9]*=u,c.elements[10]*=u,e.setFromRotationMatrix(c),i.x=r,i.y=a,i.z=o,this}),makePerspective:function(t,e,i,n,r,a){void 0===a&&console.warn("THREE.Matrix4: .makePerspective() has been redefined and has a new signature. Please check the docs.");var o=this.elements,s=2*r/(e-t),c=2*r/(i-n),h=(e+t)/(e-t),l=(i+n)/(i-n),u=-(a+r)/(a-r),p=-2*a*r/(a-r);return o[0]=s,o[4]=0,o[8]=h,o[12]=0,o[1]=0,o[5]=c,o[9]=l,o[13]=0,o[2]=0,o[6]=0,o[10]=u,o[14]=p,o[3]=0,o[7]=0,o[11]=-1,o[15]=0,this},makeOrthographic:function(t,e,i,n,r,a){var o=this.elements,s=1/(e-t),c=1/(i-n),h=1/(a-r),l=(e+t)*s,u=(i+n)*c,p=(a+r)*h;return o[0]=2*s,o[4]=0,o[8]=0,o[12]=-l,o[1]=0,o[5]=2*c,o[9]=0,o[13]=-u,o[2]=0,o[6]=0,o[10]=-2*h,o[14]=-p,o[3]=0,o[7]=0,o[11]=0,o[15]=1,this},equals:function(t){for(var e=this.elements,i=t.elements,n=0;n<16;n++)if(e[n]!==i[n])return!1;return!0},fromArray:function(t,e){void 0===e&&(e=0);for(var i=0;i<16;i++)this.elements[i]=t[i+e];return this},toArray:function(t,e){void 0===t&&(t=[]),void 0===e&&(e=0);var i=this.elements;return t[e]=i[0],t[e+1]=i[1],t[e+2]=i[2],t[e+3]=i[3],t[e+4]=i[4],t[e+5]=i[5],t[e+6]=i[6],t[e+7]=i[7],t[e+8]=i[8],t[e+9]=i[9],t[e+10]=i[10],t[e+11]=i[11],t[e+12]=i[12],t[e+13]=i[13],t[e+14]=i[14],t[e+15]=i[15],t}}),Object.assign(x,{slerp:function(t,e,i,n){return i.copy(t).slerp(e,n)},slerpFlat:function(t,e,i,n,r,a,o){var s=i[n+0],c=i[n+1],h=i[n+2],l=i[n+3],u=r[a+0],p=r[a+1],d=r[a+2],f=r[a+3];if(l!==f||s!==u||c!==p||h!==d){var m=1-o,g=s*u+c*p+h*d+l*f,v=g>=0?1:-1,y=1-g*g;if(y>Number.EPSILON){var x=Math.sqrt(y),_=Math.atan2(x,g*v);m=Math.sin(m*_)/x,o=Math.sin(o*_)/x}var b=o*v;if(s=s*m+u*b,c=c*m+p*b,h=h*m+d*b,l=l*m+f*b,m===1-o){var w=1/Math.sqrt(s*s+c*c+h*h+l*l);s*=w,c*=w,h*=w,l*=w}}t[e]=s,t[e+1]=c,t[e+2]=h,t[e+3]=l}}),Object.defineProperties(x.prototype,{x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback()}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback()}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback()}},w:{get:function(){return this._w},set:function(t){this._w=t,this.onChangeCallback()}}}),Object.assign(x.prototype,{set:function(t,e,i,n){return this._x=t,this._y=e,this._z=i,this._w=n,this.onChangeCallback(),this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._w)},copy:function(t){return this._x=t.x,this._y=t.y,this._z=t.z,this._w=t.w,this.onChangeCallback(),this},setFromEuler:function(t,e){if(!t||!t.isEuler)throw new Error("THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.");var i=t._x,n=t._y,r=t._z,a=t.order,o=Math.cos,s=Math.sin,c=o(i/2),h=o(n/2),l=o(r/2),u=s(i/2),p=s(n/2),d=s(r/2);return"XYZ"===a?(this._x=u*h*l+c*p*d,this._y=c*p*l-u*h*d,this._z=c*h*d+u*p*l,this._w=c*h*l-u*p*d):"YXZ"===a?(this._x=u*h*l+c*p*d,this._y=c*p*l-u*h*d,this._z=c*h*d-u*p*l,this._w=c*h*l+u*p*d):"ZXY"===a?(this._x=u*h*l-c*p*d,this._y=c*p*l+u*h*d,this._z=c*h*d+u*p*l,this._w=c*h*l-u*p*d):"ZYX"===a?(this._x=u*h*l-c*p*d,this._y=c*p*l+u*h*d,this._z=c*h*d-u*p*l,this._w=c*h*l+u*p*d):"YZX"===a?(this._x=u*h*l+c*p*d,this._y=c*p*l+u*h*d,this._z=c*h*d-u*p*l,this._w=c*h*l-u*p*d):"XZY"===a&&(this._x=u*h*l-c*p*d,this._y=c*p*l-u*h*d,this._z=c*h*d+u*p*l,this._w=c*h*l+u*p*d),!1!==e&&this.onChangeCallback(),this},setFromAxisAngle:function(t,e){var i=e/2,n=Math.sin(i);return this._x=t.x*n,this._y=t.y*n,this._z=t.z*n,this._w=Math.cos(i),this.onChangeCallback(),this},setFromRotationMatrix:function(t){var e,i=t.elements,n=i[0],r=i[4],a=i[8],o=i[1],s=i[5],c=i[9],h=i[2],l=i[6],u=i[10],p=n+s+u;return p>0?(e=.5/Math.sqrt(p+1),this._w=.25/e,this._x=(l-c)*e,this._y=(a-h)*e,this._z=(o-r)*e):n>s&&n>u?(e=2*Math.sqrt(1+n-s-u),this._w=(l-c)/e,this._x=.25*e,this._y=(r+o)/e,this._z=(a+h)/e):s>u?(e=2*Math.sqrt(1+s-n-u),this._w=(a-h)/e,this._x=(r+o)/e,this._y=.25*e,this._z=(c+l)/e):(e=2*Math.sqrt(1+u-n-s),this._w=(o-r)/e,this._x=(a+h)/e,this._y=(c+l)/e,this._z=.25*e),this.onChangeCallback(),this},setFromUnitVectors:function(){var t,e=new _;return function(i,n){return void 0===e&&(e=new _),(t=i.dot(n)+1)<1e-6?(t=0,Math.abs(i.x)>Math.abs(i.z)?e.set(-i.y,i.x,0):e.set(0,-i.z,i.y)):e.crossVectors(i,n),this._x=e.x,this._y=e.y,this._z=e.z,this._w=t,this.normalize()}}(),inverse:function(){return this.conjugate()},conjugate:function(){return this._x*=-1,this._y*=-1,this._z*=-1,this.onChangeCallback(),this},dot:function(t){return this._x*t._x+this._y*t._y+this._z*t._z+this._w*t._w},lengthSq:function(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w},length:function(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)},normalize:function(){var t=this.length();return 0===t?(this._x=0,this._y=0,this._z=0,this._w=1):(t=1/t,this._x=this._x*t,this._y=this._y*t,this._z=this._z*t,this._w=this._w*t),this.onChangeCallback(),this},multiply:function(t,e){return void 0!==e?(console.warn("THREE.Quaternion: .multiply() now only accepts one argument. Use .multiplyQuaternions( a, b ) instead."),this.multiplyQuaternions(t,e)):this.multiplyQuaternions(this,t)},premultiply:function(t){return this.multiplyQuaternions(t,this)},multiplyQuaternions:function(t,e){var i=t._x,n=t._y,r=t._z,a=t._w,o=e._x,s=e._y,c=e._z,h=e._w;return this._x=i*h+a*o+n*c-r*s,this._y=n*h+a*s+r*o-i*c,this._z=r*h+a*c+i*s-n*o,this._w=a*h-i*o-n*s-r*c,this.onChangeCallback(),this},slerp:function(t,e){if(0===e)return this;if(1===e)return this.copy(t);var i=this._x,n=this._y,r=this._z,a=this._w,o=a*t._w+i*t._x+n*t._y+r*t._z;if(o<0?(this._w=-t._w,this._x=-t._x,this._y=-t._y,this._z=-t._z,o=-o):this.copy(t),o>=1)return this._w=a,this._x=i,this._y=n,this._z=r,this;var s=Math.sqrt(1-o*o);if(Math.abs(s)<.001)return this._w=.5*(a+this._w),this._x=.5*(i+this._x),this._y=.5*(n+this._y),this._z=.5*(r+this._z),this;var c=Math.atan2(s,o),h=Math.sin((1-e)*c)/s,l=Math.sin(e*c)/s;return this._w=a*h+this._w*l,this._x=i*h+this._x*l,this._y=n*h+this._y*l,this._z=r*h+this._z*l,this.onChangeCallback(),this},equals:function(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._w===this._w},fromArray:function(t,e){return void 0===e&&(e=0),this._x=t[e],this._y=t[e+1],this._z=t[e+2],this._w=t[e+3],this.onChangeCallback(),this},toArray:function(t,e){return void 0===t&&(t=[]),void 0===e&&(e=0),t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._w,t},onChange:function(t){return this.onChangeCallback=t,this},onChangeCallback:function(){}}),Object.assign(_.prototype,{isVector3:!0,set:function(t,e,i){return this.x=t,this.y=e,this.z=i,this},setScalar:function(t){return this.x=t,this.y=t,this.z=t,this},setX:function(t){return this.x=t,this},setY:function(t){return this.y=t,this},setZ:function(t){return this.z=t,this},setComponent:function(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;default:throw new Error("index is out of range: "+t)}return this},getComponent:function(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+t)}},clone:function(){return new this.constructor(this.x,this.y,this.z)},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z,this},add:function(t,e){return void 0!==e?(console.warn("THREE.Vector3: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(t,e)):(this.x+=t.x,this.y+=t.y,this.z+=t.z,this)},addScalar:function(t){return this.x+=t,this.y+=t,this.z+=t,this},addVectors:function(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this},addScaledVector:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this},sub:function(t,e){return void 0!==e?(console.warn("THREE.Vector3: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(t,e)):(this.x-=t.x,this.y-=t.y,this.z-=t.z,this)},subScalar:function(t){return this.x-=t,this.y-=t,this.z-=t,this},subVectors:function(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this},multiply:function(t,e){return void 0!==e?(console.warn("THREE.Vector3: .multiply() now only accepts one argument. Use .multiplyVectors( a, b ) instead."),this.multiplyVectors(t,e)):(this.x*=t.x,this.y*=t.y,this.z*=t.z,this)},multiplyScalar:function(t){return this.x*=t,this.y*=t,this.z*=t,this},multiplyVectors:function(t,e){return this.x=t.x*e.x,this.y=t.y*e.y,this.z=t.z*e.z,this},applyEuler:(m=new x,function(t){return t&&t.isEuler||console.error("THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order."),this.applyQuaternion(m.setFromEuler(t))}),applyAxisAngle:function(){var t=new x;return function(e,i){return this.applyQuaternion(t.setFromAxisAngle(e,i))}}(),applyMatrix3:function(t){var e=this.x,i=this.y,n=this.z,r=t.elements;return this.x=r[0]*e+r[3]*i+r[6]*n,this.y=r[1]*e+r[4]*i+r[7]*n,this.z=r[2]*e+r[5]*i+r[8]*n,this},applyMatrix4:function(t){var e=this.x,i=this.y,n=this.z,r=t.elements,a=1/(r[3]*e+r[7]*i+r[11]*n+r[15]);return this.x=(r[0]*e+r[4]*i+r[8]*n+r[12])*a,this.y=(r[1]*e+r[5]*i+r[9]*n+r[13])*a,this.z=(r[2]*e+r[6]*i+r[10]*n+r[14])*a,this},applyQuaternion:function(t){var e=this.x,i=this.y,n=this.z,r=t.x,a=t.y,o=t.z,s=t.w,c=s*e+a*n-o*i,h=s*i+o*e-r*n,l=s*n+r*i-a*e,u=-r*e-a*i-o*n;return this.x=c*s+u*-r+h*-o-l*-a,this.y=h*s+u*-a+l*-r-c*-o,this.z=l*s+u*-o+c*-a-h*-r,this},project:function(){var t=new y;return function(e){return t.multiplyMatrices(e.projectionMatrix,t.getInverse(e.matrixWorld)),this.applyMatrix4(t)}}(),unproject:function(){var t=new y;return function(e){return t.multiplyMatrices(e.matrixWorld,t.getInverse(e.projectionMatrix)),this.applyMatrix4(t)}}(),transformDirection:function(t){var e=this.x,i=this.y,n=this.z,r=t.elements;return this.x=r[0]*e+r[4]*i+r[8]*n,this.y=r[1]*e+r[5]*i+r[9]*n,this.z=r[2]*e+r[6]*i+r[10]*n,this.normalize()},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this},divideScalar:function(t){return this.multiplyScalar(1/t)},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this},clamp:function(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this.z=Math.max(t.z,Math.min(e.z,this.z)),this},clampScalar:function(){var t=new _,e=new _;return function(i,n){return t.set(i,i,i),e.set(n,n,n),this.clamp(t,e)}}(),clampLength:function(t,e){var i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(t,Math.min(e,i)))},floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this},ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this},round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this},roundToZero:function(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z},lengthSq:function(){return this.x*this.x+this.y*this.y+this.z*this.z},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)},normalize:function(){return this.divideScalar(this.length()||1)},setLength:function(t){return this.normalize().multiplyScalar(t)},lerp:function(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this},lerpVectors:function(t,e,i){return this.subVectors(e,t).multiplyScalar(i).add(t)},cross:function(t,e){return void 0!==e?(console.warn("THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead."),this.crossVectors(t,e)):this.crossVectors(this,t)},crossVectors:function(t,e){var i=t.x,n=t.y,r=t.z,a=e.x,o=e.y,s=e.z;return this.x=n*s-r*o,this.y=r*a-i*s,this.z=i*o-n*a,this},projectOnVector:function(t){var e=t.dot(this)/t.lengthSq();return this.copy(t).multiplyScalar(e)},projectOnPlane:function(){var t=new _;return function(e){return t.copy(this).projectOnVector(e),this.sub(t)}}(),reflect:function(){var t=new _;return function(e){return this.sub(t.copy(e).multiplyScalar(2*this.dot(e)))}}(),angleTo:function(t){var e=this.dot(t)/Math.sqrt(this.lengthSq()*t.lengthSq());return Math.acos(g.clamp(e,-1,1))},distanceTo:function(t){return Math.sqrt(this.distanceToSquared(t))},distanceToSquared:function(t){var e=this.x-t.x,i=this.y-t.y,n=this.z-t.z;return e*e+i*i+n*n},manhattanDistanceTo:function(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)+Math.abs(this.z-t.z)},setFromSpherical:function(t){var e=Math.sin(t.phi)*t.radius;return this.x=e*Math.sin(t.theta),this.y=Math.cos(t.phi)*t.radius,this.z=e*Math.cos(t.theta),this},setFromCylindrical:function(t){return this.x=t.radius*Math.sin(t.theta),this.y=t.y,this.z=t.radius*Math.cos(t.theta),this},setFromMatrixPosition:function(t){var e=t.elements;return this.x=e[12],this.y=e[13],this.z=e[14],this},setFromMatrixScale:function(t){var e=this.setFromMatrixColumn(t,0).length(),i=this.setFromMatrixColumn(t,1).length(),n=this.setFromMatrixColumn(t,2).length();return this.x=e,this.y=i,this.z=n,this},setFromMatrixColumn:function(t,e){return this.fromArray(t.elements,4*e)},equals:function(t){return t.x===this.x&&t.y===this.y&&t.z===this.z},fromArray:function(t,e){return void 0===e&&(e=0),this.x=t[e],this.y=t[e+1],this.z=t[e+2],this},toArray:function(t,e){return void 0===t&&(t=[]),void 0===e&&(e=0),t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t},fromBufferAttribute:function(t,e,i){return void 0!==i&&console.warn("THREE.Vector3: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this}}),Object.assign(b.prototype,{isMatrix3:!0,set:function(t,e,i,n,r,a,o,s,c){var h=this.elements;return h[0]=t,h[1]=n,h[2]=o,h[3]=e,h[4]=r,h[5]=s,h[6]=i,h[7]=a,h[8]=c,this},identity:function(){return this.set(1,0,0,0,1,0,0,0,1),this},clone:function(){return(new this.constructor).fromArray(this.elements)},copy:function(t){var e=this.elements,i=t.elements;return e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e[4]=i[4],e[5]=i[5],e[6]=i[6],e[7]=i[7],e[8]=i[8],this},setFromMatrix4:function(t){var e=t.elements;return this.set(e[0],e[4],e[8],e[1],e[5],e[9],e[2],e[6],e[10]),this},applyToBufferAttribute:function(){var t=new _;return function(e){for(var i=0,n=e.count;i<n;i++)t.x=e.getX(i),t.y=e.getY(i),t.z=e.getZ(i),t.applyMatrix3(this),e.setXYZ(i,t.x,t.y,t.z);return e}}(),multiply:function(t){return this.multiplyMatrices(this,t)},premultiply:function(t){return this.multiplyMatrices(t,this)},multiplyMatrices:function(t,e){var i=t.elements,n=e.elements,r=this.elements,a=i[0],o=i[3],s=i[6],c=i[1],h=i[4],l=i[7],u=i[2],p=i[5],d=i[8],f=n[0],m=n[3],g=n[6],v=n[1],y=n[4],x=n[7],_=n[2],b=n[5],w=n[8];return r[0]=a*f+o*v+s*_,r[3]=a*m+o*y+s*b,r[6]=a*g+o*x+s*w,r[1]=c*f+h*v+l*_,r[4]=c*m+h*y+l*b,r[7]=c*g+h*x+l*w,r[2]=u*f+p*v+d*_,r[5]=u*m+p*y+d*b,r[8]=u*g+p*x+d*w,this},multiplyScalar:function(t){var e=this.elements;return e[0]*=t,e[3]*=t,e[6]*=t,e[1]*=t,e[4]*=t,e[7]*=t,e[2]*=t,e[5]*=t,e[8]*=t,this},determinant:function(){var t=this.elements,e=t[0],i=t[1],n=t[2],r=t[3],a=t[4],o=t[5],s=t[6],c=t[7],h=t[8];return e*a*h-e*o*c-i*r*h+i*o*s+n*r*c-n*a*s},getInverse:function(t,e){t&&t.isMatrix4&&console.error("THREE.Matrix3: .getInverse() no longer takes a Matrix4 argument.");var i=t.elements,n=this.elements,r=i[0],a=i[1],o=i[2],s=i[3],c=i[4],h=i[5],l=i[6],u=i[7],p=i[8],d=p*c-h*u,f=h*l-p*s,m=u*s-c*l,g=r*d+a*f+o*m;if(0===g){var v="THREE.Matrix3: .getInverse() can't invert matrix, determinant is 0";if(!0===e)throw new Error(v);return console.warn(v),this.identity()}var y=1/g;return n[0]=d*y,n[1]=(o*u-p*a)*y,n[2]=(h*a-o*c)*y,n[3]=f*y,n[4]=(p*r-o*l)*y,n[5]=(o*s-h*r)*y,n[6]=m*y,n[7]=(a*l-u*r)*y,n[8]=(c*r-a*s)*y,this},transpose:function(){var t,e=this.elements;return t=e[1],e[1]=e[3],e[3]=t,t=e[2],e[2]=e[6],e[6]=t,t=e[5],e[5]=e[7],e[7]=t,this},getNormalMatrix:function(t){return this.setFromMatrix4(t).getInverse(this).transpose()},transposeIntoArray:function(t){var e=this.elements;return t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8],this},setUvTransform:function(t,e,i,n,r,a,o){var s=Math.cos(r),c=Math.sin(r);this.set(i*s,i*c,-i*(s*a+c*o)+a+t,-n*c,n*s,-n*(-c*a+s*o)+o+e,0,0,1)},scale:function(t,e){var i=this.elements;return i[0]*=t,i[3]*=t,i[6]*=t,i[1]*=e,i[4]*=e,i[7]*=e,this},rotate:function(t){var e=Math.cos(t),i=Math.sin(t),n=this.elements,r=n[0],a=n[3],o=n[6],s=n[1],c=n[4],h=n[7];return n[0]=e*r+i*s,n[3]=e*a+i*c,n[6]=e*o+i*h,n[1]=-i*r+e*s,n[4]=-i*a+e*c,n[7]=-i*o+e*h,this},translate:function(t,e){var i=this.elements;return i[0]+=t*i[2],i[3]+=t*i[5],i[6]+=t*i[8],i[1]+=e*i[2],i[4]+=e*i[5],i[7]+=e*i[8],this},equals:function(t){for(var e=this.elements,i=t.elements,n=0;n<9;n++)if(e[n]!==i[n])return!1;return!0},fromArray:function(t,e){void 0===e&&(e=0);for(var i=0;i<9;i++)this.elements[i]=t[i+e];return this},toArray:function(t,e){void 0===t&&(t=[]),void 0===e&&(e=0);var i=this.elements;return t[e]=i[0],t[e+1]=i[1],t[e+2]=i[2],t[e+3]=i[3],t[e+4]=i[4],t[e+5]=i[5],t[e+6]=i[6],t[e+7]=i[7],t[e+8]=i[8],t}});var w,M,E,T,S,A=0;function R(t,e,i,n,r,a,o,s,c,h){Object.defineProperty(this,"id",{value:A++}),this.uuid=g.generateUUID(),this.name="",this.image=void 0!==t?t:R.DEFAULT_IMAGE,this.mipmaps=[],this.mapping=void 0!==e?e:R.DEFAULT_MAPPING,this.wrapS=void 0!==i?i:1001,this.wrapT=void 0!==n?n:1001,this.magFilter=void 0!==r?r:1006,this.minFilter=void 0!==a?a:1008,this.anisotropy=void 0!==c?c:1,this.format=void 0!==o?o:1023,this.type=void 0!==s?s:1009,this.offset=new v(0,0),this.repeat=new v(1,1),this.center=new v(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new b,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.encoding=void 0!==h?h:3e3,this.version=0,this.onUpdate=null}function L(t,e,i,n){this.x=t||0,this.y=e||0,this.z=i||0,this.w=void 0!==n?n:1}function P(t,e,i){this.width=t,this.height=e,this.scissor=new L(0,0,t,e),this.scissorTest=!1,this.viewport=new L(0,0,t,e),void 0===(i=i||{}).minFilter&&(i.minFilter=1006),this.texture=new R(void 0,void 0,i.wrapS,i.wrapT,i.magFilter,i.minFilter,i.format,i.type,i.anisotropy,i.encoding),this.texture.generateMipmaps=void 0===i.generateMipmaps||i.generateMipmaps,this.depthBuffer=void 0===i.depthBuffer||i.depthBuffer,this.stencilBuffer=void 0===i.stencilBuffer||i.stencilBuffer,this.depthTexture=void 0!==i.depthTexture?i.depthTexture:null}function C(t,e,i){P.call(this,t,e,i),this.activeCubeFace=0,this.activeMipMapLevel=0}function O(t,e,i,n,r,a,o,s,c,h,l,u){R.call(this,null,a,o,s,c,h,n,r,l,u),this.image={data:t,width:e,height:i},this.magFilter=void 0!==c?c:1003,this.minFilter=void 0!==h?h:1003,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}function I(t,e){this.min=void 0!==t?t:new _(1/0,1/0,1/0),this.max=void 0!==e?e:new _(-1/0,-1/0,-1/0)}function N(t,e){this.center=void 0!==t?t:new _,this.radius=void 0!==e?e:0}function D(t,e){this.normal=void 0!==t?t:new _(1,0,0),this.constant=void 0!==e?e:0}function U(t,e,i,n,r,a){this.planes=[void 0!==t?t:new D,void 0!==e?e:new D,void 0!==i?i:new D,void 0!==n?n:new D,void 0!==r?r:new D,void 0!==a?a:new D]}R.DEFAULT_IMAGE=void 0,R.DEFAULT_MAPPING=300,R.prototype=Object.assign(Object.create(r.prototype),{constructor:R,isTexture:!0,updateMatrix:function(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.name=t.name,this.image=t.image,this.mipmaps=t.mipmaps.slice(0),this.mapping=t.mapping,this.wrapS=t.wrapS,this.wrapT=t.wrapT,this.magFilter=t.magFilter,this.minFilter=t.minFilter,this.anisotropy=t.anisotropy,this.format=t.format,this.type=t.type,this.offset.copy(t.offset),this.repeat.copy(t.repeat),this.center.copy(t.center),this.rotation=t.rotation,this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrix.copy(t.matrix),this.generateMipmaps=t.generateMipmaps,this.premultiplyAlpha=t.premultiplyAlpha,this.flipY=t.flipY,this.unpackAlignment=t.unpackAlignment,this.encoding=t.encoding,this},toJSON:function(t){var e=void 0===t||"string"==typeof t;if(!e&&void 0!==t.textures[this.uuid])return t.textures[this.uuid];var i={metadata:{version:4.5,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,mapping:this.mapping,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY};if(void 0!==this.image){var n=this.image;void 0===n.uuid&&(n.uuid=g.generateUUID()),e||void 0!==t.images[n.uuid]||(t.images[n.uuid]={uuid:n.uuid,url:function(t){var e;if(t instanceof HTMLCanvasElement)e=t;else{(e=document.createElementNS("http://www.w3.org/1999/xhtml","canvas")).width=t.width,e.height=t.height;var i=e.getContext("2d");t instanceof ImageData?i.putImageData(t,0,0):i.drawImage(t,0,0,t.width,t.height)}return e.width>2048||e.height>2048?e.toDataURL("image/jpeg",.6):e.toDataURL("image/png")}(n)}),i.image=n.uuid}return e||(t.textures[this.uuid]=i),i},dispose:function(){this.dispatchEvent({type:"dispose"})},transformUv:function(t){if(300===this.mapping){if(t.applyMatrix3(this.matrix),t.x<0||t.x>1)switch(this.wrapS){case 1e3:t.x=t.x-Math.floor(t.x);break;case 1001:t.x=t.x<0?0:1;break;case 1002:1===Math.abs(Math.floor(t.x)%2)?t.x=Math.ceil(t.x)-t.x:t.x=t.x-Math.floor(t.x)}if(t.y<0||t.y>1)switch(this.wrapT){case 1e3:t.y=t.y-Math.floor(t.y);break;case 1001:t.y=t.y<0?0:1;break;case 1002:1===Math.abs(Math.floor(t.y)%2)?t.y=Math.ceil(t.y)-t.y:t.y=t.y-Math.floor(t.y)}this.flipY&&(t.y=1-t.y)}}}),Object.defineProperty(R.prototype,"needsUpdate",{set:function(t){!0===t&&this.version++}}),Object.assign(L.prototype,{isVector4:!0,set:function(t,e,i,n){return this.x=t,this.y=e,this.z=i,this.w=n,this},setScalar:function(t){return this.x=t,this.y=t,this.z=t,this.w=t,this},setX:function(t){return this.x=t,this},setY:function(t){return this.y=t,this},setZ:function(t){return this.z=t,this},setW:function(t){return this.w=t,this},setComponent:function(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;case 3:this.w=e;break;default:throw new Error("index is out of range: "+t)}return this},getComponent:function(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+t)}},clone:function(){return new this.constructor(this.x,this.y,this.z,this.w)},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=void 0!==t.w?t.w:1,this},add:function(t,e){return void 0!==e?(console.warn("THREE.Vector4: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(t,e)):(this.x+=t.x,this.y+=t.y,this.z+=t.z,this.w+=t.w,this)},addScalar:function(t){return this.x+=t,this.y+=t,this.z+=t,this.w+=t,this},addVectors:function(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this.w=t.w+e.w,this},addScaledVector:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this.w+=t.w*e,this},sub:function(t,e){return void 0!==e?(console.warn("THREE.Vector4: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(t,e)):(this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,this)},subScalar:function(t){return this.x-=t,this.y-=t,this.z-=t,this.w-=t,this},subVectors:function(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this.w=t.w-e.w,this},multiplyScalar:function(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this},applyMatrix4:function(t){var e=this.x,i=this.y,n=this.z,r=this.w,a=t.elements;return this.x=a[0]*e+a[4]*i+a[8]*n+a[12]*r,this.y=a[1]*e+a[5]*i+a[9]*n+a[13]*r,this.z=a[2]*e+a[6]*i+a[10]*n+a[14]*r,this.w=a[3]*e+a[7]*i+a[11]*n+a[15]*r,this},divideScalar:function(t){return this.multiplyScalar(1/t)},setAxisAngleFromQuaternion:function(t){this.w=2*Math.acos(t.w);var e=Math.sqrt(1-t.w*t.w);return e<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=t.x/e,this.y=t.y/e,this.z=t.z/e),this},setAxisAngleFromRotationMatrix:function(t){var e,i,n,r,a=t.elements,o=a[0],s=a[4],c=a[8],h=a[1],l=a[5],u=a[9],p=a[2],d=a[6],f=a[10];if(Math.abs(s-h)<.01&&Math.abs(c-p)<.01&&Math.abs(u-d)<.01){if(Math.abs(s+h)<.1&&Math.abs(c+p)<.1&&Math.abs(u+d)<.1&&Math.abs(o+l+f-3)<.1)return this.set(1,0,0,0),this;e=Math.PI;var m=(o+1)/2,g=(l+1)/2,v=(f+1)/2,y=(s+h)/4,x=(c+p)/4,_=(u+d)/4;return m>g&&m>v?m<.01?(i=0,n=.707106781,r=.707106781):(n=y/(i=Math.sqrt(m)),r=x/i):g>v?g<.01?(i=.707106781,n=0,r=.707106781):(i=y/(n=Math.sqrt(g)),r=_/n):v<.01?(i=.707106781,n=.707106781,r=0):(i=x/(r=Math.sqrt(v)),n=_/r),this.set(i,n,r,e),this}var b=Math.sqrt((d-u)*(d-u)+(c-p)*(c-p)+(h-s)*(h-s));return Math.abs(b)<.001&&(b=1),this.x=(d-u)/b,this.y=(c-p)/b,this.z=(h-s)/b,this.w=Math.acos((o+l+f-1)/2),this},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this.w=Math.min(this.w,t.w),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this.w=Math.max(this.w,t.w),this},clamp:function(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this.z=Math.max(t.z,Math.min(e.z,this.z)),this.w=Math.max(t.w,Math.min(e.w,this.w)),this},clampScalar:function(){var t,e;return function(i,n){return void 0===t&&(t=new L,e=new L),t.set(i,i,i,i),e.set(n,n,n,n),this.clamp(t,e)}}(),clampLength:function(t,e){var i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(t,Math.min(e,i)))},floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this},ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this},round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this},roundToZero:function(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this.w=this.w<0?Math.ceil(this.w):Math.floor(this.w),this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lengthSq:function(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)},normalize:function(){return this.divideScalar(this.length()||1)},setLength:function(t){return this.normalize().multiplyScalar(t)},lerp:function(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this.w+=(t.w-this.w)*e,this},lerpVectors:function(t,e,i){return this.subVectors(e,t).multiplyScalar(i).add(t)},equals:function(t){return t.x===this.x&&t.y===this.y&&t.z===this.z&&t.w===this.w},fromArray:function(t,e){return void 0===e&&(e=0),this.x=t[e],this.y=t[e+1],this.z=t[e+2],this.w=t[e+3],this},toArray:function(t,e){return void 0===t&&(t=[]),void 0===e&&(e=0),t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t[e+3]=this.w,t},fromBufferAttribute:function(t,e,i){return void 0!==i&&console.warn("THREE.Vector4: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this.w=t.getW(e),this}}),P.prototype=Object.assign(Object.create(r.prototype),{constructor:P,isWebGLRenderTarget:!0,setSize:function(t,e){this.width===t&&this.height===e||(this.width=t,this.height=e,this.dispose()),this.viewport.set(0,0,t,e),this.scissor.set(0,0,t,e)},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.width=t.width,this.height=t.height,this.viewport.copy(t.viewport),this.texture=t.texture.clone(),this.depthBuffer=t.depthBuffer,this.stencilBuffer=t.stencilBuffer,this.depthTexture=t.depthTexture,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),C.prototype=Object.create(P.prototype),C.prototype.constructor=C,C.prototype.isWebGLRenderTargetCube=!0,O.prototype=Object.create(R.prototype),O.prototype.constructor=O,O.prototype.isDataTexture=!0,Object.assign(I.prototype,{isBox3:!0,set:function(t,e){return this.min.copy(t),this.max.copy(e),this},setFromArray:function(t){for(var e=1/0,i=1/0,n=1/0,r=-1/0,a=-1/0,o=-1/0,s=0,c=t.length;s<c;s+=3){var h=t[s],l=t[s+1],u=t[s+2];h<e&&(e=h),l<i&&(i=l),u<n&&(n=u),h>r&&(r=h),l>a&&(a=l),u>o&&(o=u)}return this.min.set(e,i,n),this.max.set(r,a,o),this},setFromBufferAttribute:function(t){for(var e=1/0,i=1/0,n=1/0,r=-1/0,a=-1/0,o=-1/0,s=0,c=t.count;s<c;s++){var h=t.getX(s),l=t.getY(s),u=t.getZ(s);h<e&&(e=h),l<i&&(i=l),u<n&&(n=u),h>r&&(r=h),l>a&&(a=l),u>o&&(o=u)}return this.min.set(e,i,n),this.max.set(r,a,o),this},setFromPoints:function(t){this.makeEmpty();for(var e=0,i=t.length;e<i;e++)this.expandByPoint(t[e]);return this},setFromCenterAndSize:function(){var t=new _;return function(e,i){var n=t.copy(i).multiplyScalar(.5);return this.min.copy(e).sub(n),this.max.copy(e).add(n),this}}(),setFromObject:function(t){return this.makeEmpty(),this.expandByObject(t)},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.min.copy(t.min),this.max.copy(t.max),this},makeEmpty:function(){return this.min.x=this.min.y=this.min.z=1/0,this.max.x=this.max.y=this.max.z=-1/0,this},isEmpty:function(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z},getCenter:function(t){return void 0===t&&(console.warn("THREE.Box3: .getCenter() target is now required"),t=new _),this.isEmpty()?t.set(0,0,0):t.addVectors(this.min,this.max).multiplyScalar(.5)},getSize:function(t){return void 0===t&&(console.warn("THREE.Box3: .getSize() target is now required"),t=new _),this.isEmpty()?t.set(0,0,0):t.subVectors(this.max,this.min)},expandByPoint:function(t){return this.min.min(t),this.max.max(t),this},expandByVector:function(t){return this.min.sub(t),this.max.add(t),this},expandByScalar:function(t){return this.min.addScalar(-t),this.max.addScalar(t),this},expandByObject:function(){var t,e,i,n=new _;function r(r){var a=r.geometry;if(void 0!==a)if(a.isGeometry){var o=a.vertices;for(e=0,i=o.length;e<i;e++)n.copy(o[e]),n.applyMatrix4(r.matrixWorld),t.expandByPoint(n)}else if(a.isBufferGeometry){var s=a.attributes.position;if(void 0!==s)for(e=0,i=s.count;e<i;e++)n.fromBufferAttribute(s,e).applyMatrix4(r.matrixWorld),t.expandByPoint(n)}}return function(e){return t=this,e.updateMatrixWorld(!0),e.traverse(r),this}}(),containsPoint:function(t){return!(t.x<this.min.x||t.x>this.max.x||t.y<this.min.y||t.y>this.max.y||t.z<this.min.z||t.z>this.max.z)},containsBox:function(t){return this.min.x<=t.min.x&&t.max.x<=this.max.x&&this.min.y<=t.min.y&&t.max.y<=this.max.y&&this.min.z<=t.min.z&&t.max.z<=this.max.z},getParameter:function(t,e){return void 0===e&&(console.warn("THREE.Box3: .getParameter() target is now required"),e=new _),e.set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y),(t.z-this.min.z)/(this.max.z-this.min.z))},intersectsBox:function(t){return!(t.max.x<this.min.x||t.min.x>this.max.x||t.max.y<this.min.y||t.min.y>this.max.y||t.max.z<this.min.z||t.min.z>this.max.z)},intersectsSphere:(w=new _,function(t){return this.clampPoint(t.center,w),w.distanceToSquared(t.center)<=t.radius*t.radius}),intersectsPlane:function(t){var e,i;return t.normal.x>0?(e=t.normal.x*this.min.x,i=t.normal.x*this.max.x):(e=t.normal.x*this.max.x,i=t.normal.x*this.min.x),t.normal.y>0?(e+=t.normal.y*this.min.y,i+=t.normal.y*this.max.y):(e+=t.normal.y*this.max.y,i+=t.normal.y*this.min.y),t.normal.z>0?(e+=t.normal.z*this.min.z,i+=t.normal.z*this.max.z):(e+=t.normal.z*this.max.z,i+=t.normal.z*this.min.z),e<=t.constant&&i>=t.constant},intersectsTriangle:function(){var t=new _,e=new _,i=new _,n=new _,r=new _,a=new _,o=new _,s=new _,c=new _,h=new _;function l(n){var r,a;for(r=0,a=n.length-3;r<=a;r+=3){o.fromArray(n,r);var s=c.x*Math.abs(o.x)+c.y*Math.abs(o.y)+c.z*Math.abs(o.z),h=t.dot(o),l=e.dot(o),u=i.dot(o);if(Math.max(-Math.max(h,l,u),Math.min(h,l,u))>s)return!1}return!0}return function(o){if(this.isEmpty())return!1;this.getCenter(s),c.subVectors(this.max,s),t.subVectors(o.a,s),e.subVectors(o.b,s),i.subVectors(o.c,s),n.subVectors(e,t),r.subVectors(i,e),a.subVectors(t,i);var u=[0,-n.z,n.y,0,-r.z,r.y,0,-a.z,a.y,n.z,0,-n.x,r.z,0,-r.x,a.z,0,-a.x,-n.y,n.x,0,-r.y,r.x,0,-a.y,a.x,0];return!!l(u)&&(!!l(u=[1,0,0,0,1,0,0,0,1])&&(h.crossVectors(n,r),l(u=[h.x,h.y,h.z])))}}(),clampPoint:function(t,e){return void 0===e&&(console.warn("THREE.Box3: .clampPoint() target is now required"),e=new _),e.copy(t).clamp(this.min,this.max)},distanceToPoint:function(){var t=new _;return function(e){return t.copy(e).clamp(this.min,this.max).sub(e).length()}}(),getBoundingSphere:function(){var t=new _;return function(e){return void 0===e&&(console.warn("THREE.Box3: .getBoundingSphere() target is now required"),e=new N),this.getCenter(e.center),e.radius=.5*this.getSize(t).length(),e}}(),intersect:function(t){return this.min.max(t.min),this.max.min(t.max),this.isEmpty()&&this.makeEmpty(),this},union:function(t){return this.min.min(t.min),this.max.max(t.max),this},applyMatrix4:function(t){if(this.isEmpty())return this;var e=t.elements,i=e[0]*this.min.x,n=e[1]*this.min.x,r=e[2]*this.min.x,a=e[0]*this.max.x,o=e[1]*this.max.x,s=e[2]*this.max.x,c=e[4]*this.min.y,h=e[5]*this.min.y,l=e[6]*this.min.y,u=e[4]*this.max.y,p=e[5]*this.max.y,d=e[6]*this.max.y,f=e[8]*this.min.z,m=e[9]*this.min.z,g=e[10]*this.min.z,v=e[8]*this.max.z,y=e[9]*this.max.z,x=e[10]*this.max.z;return this.min.x=Math.min(i,a)+Math.min(c,u)+Math.min(f,v)+e[12],this.min.y=Math.min(n,o)+Math.min(h,p)+Math.min(m,y)+e[13],this.min.z=Math.min(r,s)+Math.min(l,d)+Math.min(g,x)+e[14],this.max.x=Math.max(i,a)+Math.max(c,u)+Math.max(f,v)+e[12],this.max.y=Math.max(n,o)+Math.max(h,p)+Math.max(m,y)+e[13],this.max.z=Math.max(r,s)+Math.max(l,d)+Math.max(g,x)+e[14],this},translate:function(t){return this.min.add(t),this.max.add(t),this},equals:function(t){return t.min.equals(this.min)&&t.max.equals(this.max)}}),Object.assign(N.prototype,{set:function(t,e){return this.center.copy(t),this.radius=e,this},setFromPoints:(M=new I,function(t,e){var i=this.center;void 0!==e?i.copy(e):M.setFromPoints(t).getCenter(i);for(var n=0,r=0,a=t.length;r<a;r++)n=Math.max(n,i.distanceToSquared(t[r]));return this.radius=Math.sqrt(n),this}),clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.center.copy(t.center),this.radius=t.radius,this},empty:function(){return this.radius<=0},containsPoint:function(t){return t.distanceToSquared(this.center)<=this.radius*this.radius},distanceToPoint:function(t){return t.distanceTo(this.center)-this.radius},intersectsSphere:function(t){var e=this.radius+t.radius;return t.center.distanceToSquared(this.center)<=e*e},intersectsBox:function(t){return t.intersectsSphere(this)},intersectsPlane:function(t){return Math.abs(t.distanceToPoint(this.center))<=this.radius},clampPoint:function(t,e){var i=this.center.distanceToSquared(t);return void 0===e&&(console.warn("THREE.Sphere: .clampPoint() target is now required"),e=new _),e.copy(t),i>this.radius*this.radius&&(e.sub(this.center).normalize(),e.multiplyScalar(this.radius).add(this.center)),e},getBoundingBox:function(t){return void 0===t&&(console.warn("THREE.Sphere: .getBoundingBox() target is now required"),t=new I),t.set(this.center,this.center),t.expandByScalar(this.radius),t},applyMatrix4:function(t){return this.center.applyMatrix4(t),this.radius=this.radius*t.getMaxScaleOnAxis(),this},translate:function(t){return this.center.add(t),this},equals:function(t){return t.center.equals(this.center)&&t.radius===this.radius}}),Object.assign(D.prototype,{set:function(t,e){return this.normal.copy(t),this.constant=e,this},setComponents:function(t,e,i,n){return this.normal.set(t,e,i),this.constant=n,this},setFromNormalAndCoplanarPoint:function(t,e){return this.normal.copy(t),this.constant=-e.dot(this.normal),this},setFromCoplanarPoints:function(){var t=new _,e=new _;return function(i,n,r){var a=t.subVectors(r,n).cross(e.subVectors(i,n)).normalize();return this.setFromNormalAndCoplanarPoint(a,i),this}}(),clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.normal.copy(t.normal),this.constant=t.constant,this},normalize:function(){var t=1/this.normal.length();return this.normal.multiplyScalar(t),this.constant*=t,this},negate:function(){return this.constant*=-1,this.normal.negate(),this},distanceToPoint:function(t){return this.normal.dot(t)+this.constant},distanceToSphere:function(t){return this.distanceToPoint(t.center)-t.radius},projectPoint:function(t,e){return void 0===e&&(console.warn("THREE.Plane: .projectPoint() target is now required"),e=new _),e.copy(this.normal).multiplyScalar(-this.distanceToPoint(t)).add(t)},intersectLine:function(){var t=new _;return function(e,i){void 0===i&&(console.warn("THREE.Plane: .intersectLine() target is now required"),i=new _);var n=e.delta(t),r=this.normal.dot(n);if(0===r)return 0===this.distanceToPoint(e.start)?i.copy(e.start):void 0;var a=-(e.start.dot(this.normal)+this.constant)/r;return a<0||a>1?void 0:i.copy(n).multiplyScalar(a).add(e.start)}}(),intersectsLine:function(t){var e=this.distanceToPoint(t.start),i=this.distanceToPoint(t.end);return e<0&&i>0||i<0&&e>0},intersectsBox:function(t){return t.intersectsPlane(this)},intersectsSphere:function(t){return t.intersectsPlane(this)},coplanarPoint:function(t){return void 0===t&&(console.warn("THREE.Plane: .coplanarPoint() target is now required"),t=new _),t.copy(this.normal).multiplyScalar(-this.constant)},applyMatrix4:function(){var t=new _,e=new b;return function(i,n){var r=n||e.getNormalMatrix(i),a=this.coplanarPoint(t).applyMatrix4(i),o=this.normal.applyMatrix3(r).normalize();return this.constant=-a.dot(o),this}}(),translate:function(t){return this.constant-=t.dot(this.normal),this},equals:function(t){return t.normal.equals(this.normal)&&t.constant===this.constant}}),Object.assign(U.prototype,{set:function(t,e,i,n,r,a){var o=this.planes;return o[0].copy(t),o[1].copy(e),o[2].copy(i),o[3].copy(n),o[4].copy(r),o[5].copy(a),this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){for(var e=this.planes,i=0;i<6;i++)e[i].copy(t.planes[i]);return this},setFromMatrix:function(t){var e=this.planes,i=t.elements,n=i[0],r=i[1],a=i[2],o=i[3],s=i[4],c=i[5],h=i[6],l=i[7],u=i[8],p=i[9],d=i[10],f=i[11],m=i[12],g=i[13],v=i[14],y=i[15];return e[0].setComponents(o-n,l-s,f-u,y-m).normalize(),e[1].setComponents(o+n,l+s,f+u,y+m).normalize(),e[2].setComponents(o+r,l+c,f+p,y+g).normalize(),e[3].setComponents(o-r,l-c,f-p,y-g).normalize(),e[4].setComponents(o-a,l-h,f-d,y-v).normalize(),e[5].setComponents(o+a,l+h,f+d,y+v).normalize(),this},intersectsObject:(S=new N,function(t){var e=t.geometry;return null===e.boundingSphere&&e.computeBoundingSphere(),S.copy(e.boundingSphere).applyMatrix4(t.matrixWorld),this.intersectsSphere(S)}),intersectsSprite:function(){var t=new N;return function(e){return t.center.set(0,0,0),t.radius=.7071067811865476,t.applyMatrix4(e.matrixWorld),this.intersectsSphere(t)}}(),intersectsSphere:function(t){for(var e=this.planes,i=t.center,n=-t.radius,r=0;r<6;r++){if(e[r].distanceToPoint(i)<n)return!1}return!0},intersectsBox:(E=new _,T=new _,function(t){for(var e=this.planes,i=0;i<6;i++){var n=e[i];E.x=n.normal.x>0?t.min.x:t.max.x,T.x=n.normal.x>0?t.max.x:t.min.x,E.y=n.normal.y>0?t.min.y:t.max.y,T.y=n.normal.y>0?t.max.y:t.min.y,E.z=n.normal.z>0?t.min.z:t.max.z,T.z=n.normal.z>0?t.max.z:t.min.z;var r=n.distanceToPoint(E),a=n.distanceToPoint(T);if(r<0&&a<0)return!1}return!0}),containsPoint:function(t){for(var e=this.planes,i=0;i<6;i++)if(e[i].distanceToPoint(t)<0)return!1;return!0}});var z,B={alphamap_fragment:"#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, vUv ).g;\n#endif\n",alphamap_pars_fragment:"#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif\n",alphatest_fragment:"#ifdef ALPHATEST\n\tif ( diffuseColor.a < ALPHATEST ) discard;\n#endif\n",aomap_fragment:"#ifdef USE_AOMAP\n\tfloat ambientOcclusion = ( texture2D( aoMap, vUv2 ).r - 1.0 ) * aoMapIntensity + 1.0;\n\treflectedLight.indirectDiffuse *= ambientOcclusion;\n\t#if defined( USE_ENVMAP ) && defined( PHYSICAL )\n\t\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\t\treflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.specularRoughness );\n\t#endif\n#endif\n",aomap_pars_fragment:"#ifdef USE_AOMAP\n\tuniform sampler2D aoMap;\n\tuniform float aoMapIntensity;\n#endif",begin_vertex:"\nvec3 transformed = vec3( position );\n",beginnormal_vertex:"\nvec3 objectNormal = vec3( normal );\n",bsdfs:"float punctualLightIntensityToIrradianceFactor( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n\tif( decayExponent > 0.0 ) {\n#if defined ( PHYSICALLY_CORRECT_LIGHTS )\n\t\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\t\tfloat maxDistanceCutoffFactor = pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t\treturn distanceFalloff * maxDistanceCutoffFactor;\n#else\n\t\treturn pow( saturate( -lightDistance / cutoffDistance + 1.0 ), decayExponent );\n#endif\n\t}\n\treturn 1.0;\n}\nvec3 BRDF_Diffuse_Lambert( const in vec3 diffuseColor ) {\n\treturn RECIPROCAL_PI * diffuseColor;\n}\nvec3 F_Schlick( const in vec3 specularColor, const in float dotLH ) {\n\tfloat fresnel = exp2( ( -5.55473 * dotLH - 6.98316 ) * dotLH );\n\treturn ( 1.0 - specularColor ) * fresnel + specularColor;\n}\nfloat G_GGX_Smith( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\tfloat gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\treturn 1.0 / ( gl * gv );\n}\nfloat G_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\treturn 0.5 / max( gv + gl, EPSILON );\n}\nfloat D_GGX( const in float alpha, const in float dotNH ) {\n\tfloat a2 = pow2( alpha );\n\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\n\treturn RECIPROCAL_PI * a2 / pow2( denom );\n}\nvec3 BRDF_Specular_GGX( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float roughness ) {\n\tfloat alpha = pow2( roughness );\n\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\n\tfloat dotNL = saturate( dot( geometry.normal, incidentLight.direction ) );\n\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\n\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, dotLH );\n\tfloat G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\tfloat D = D_GGX( alpha, dotNH );\n\treturn F * ( G * D );\n}\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\n\tconst float LUT_SIZE  = 64.0;\n\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\n\tconst float LUT_BIAS  = 0.5 / LUT_SIZE;\n\tfloat dotNV = saturate( dot( N, V ) );\n\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\n\tuv = uv * LUT_SCALE + LUT_BIAS;\n\treturn uv;\n}\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\n\tfloat l = length( f );\n\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\n}\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\n\tfloat x = dot( v1, v2 );\n\tfloat y = abs( x );\n\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\n\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\n\tfloat v = a / b;\n\tfloat theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\n\treturn cross( v1, v2 ) * theta_sintheta;\n}\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\n\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\n\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\n\tvec3 lightNormal = cross( v1, v2 );\n\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\n\tvec3 T1, T2;\n\tT1 = normalize( V - N * dot( V, N ) );\n\tT2 = - cross( N, T1 );\n\tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\n\tvec3 coords[ 4 ];\n\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\n\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\n\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\n\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\n\tcoords[ 0 ] = normalize( coords[ 0 ] );\n\tcoords[ 1 ] = normalize( coords[ 1 ] );\n\tcoords[ 2 ] = normalize( coords[ 2 ] );\n\tcoords[ 3 ] = normalize( coords[ 3 ] );\n\tvec3 vectorFormFactor = vec3( 0.0 );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\n\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\n\treturn vec3( result );\n}\nvec3 BRDF_Specular_GGX_Environment( const in GeometricContext geometry, const in vec3 specularColor, const in float roughness ) {\n\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\n\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\n\tvec4 r = roughness * c0 + c1;\n\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\n\tvec2 AB = vec2( -1.04, 1.04 ) * a004 + r.zw;\n\treturn specularColor * AB.x + AB.y;\n}\nfloat G_BlinnPhong_Implicit( ) {\n\treturn 0.25;\n}\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\n\treturn RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\n}\nvec3 BRDF_Specular_BlinnPhong( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float shininess ) {\n\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\n\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\n\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, dotLH );\n\tfloat G = G_BlinnPhong_Implicit( );\n\tfloat D = D_BlinnPhong( shininess, dotNH );\n\treturn F * ( G * D );\n}\nfloat GGXRoughnessToBlinnExponent( const in float ggxRoughness ) {\n\treturn ( 2.0 / pow2( ggxRoughness + 0.0001 ) - 2.0 );\n}\nfloat BlinnExponentToGGXRoughness( const in float blinnExponent ) {\n\treturn sqrt( 2.0 / ( blinnExponent + 2.0 ) );\n}\n",bumpmap_pars_fragment:"#ifdef USE_BUMPMAP\n\tuniform sampler2D bumpMap;\n\tuniform float bumpScale;\n\tvec2 dHdxy_fwd() {\n\t\tvec2 dSTdx = dFdx( vUv );\n\t\tvec2 dSTdy = dFdy( vUv );\n\t\tfloat Hll = bumpScale * texture2D( bumpMap, vUv ).x;\n\t\tfloat dBx = bumpScale * texture2D( bumpMap, vUv + dSTdx ).x - Hll;\n\t\tfloat dBy = bumpScale * texture2D( bumpMap, vUv + dSTdy ).x - Hll;\n\t\treturn vec2( dBx, dBy );\n\t}\n\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy ) {\n\t\tvec3 vSigmaX = vec3( dFdx( surf_pos.x ), dFdx( surf_pos.y ), dFdx( surf_pos.z ) );\n\t\tvec3 vSigmaY = vec3( dFdy( surf_pos.x ), dFdy( surf_pos.y ), dFdy( surf_pos.z ) );\n\t\tvec3 vN = surf_norm;\n\t\tvec3 R1 = cross( vSigmaY, vN );\n\t\tvec3 R2 = cross( vN, vSigmaX );\n\t\tfloat fDet = dot( vSigmaX, R1 );\n\t\tfDet *= ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\n\t\treturn normalize( abs( fDet ) * surf_norm - vGrad );\n\t}\n#endif\n",clipping_planes_fragment:"#if NUM_CLIPPING_PLANES > 0\n\tvec4 plane;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n\t\tplane = clippingPlanes[ i ];\n\t\tif ( dot( vViewPosition, plane.xyz ) > plane.w ) discard;\n\t}\n\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\tbool clipped = true;\n\t\t#pragma unroll_loop\n\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tclipped = ( dot( vViewPosition, plane.xyz ) > plane.w ) && clipped;\n\t\t}\n\t\tif ( clipped ) discard;\n\t#endif\n#endif\n",clipping_planes_pars_fragment:"#if NUM_CLIPPING_PLANES > 0\n\t#if ! defined( PHYSICAL ) && ! defined( PHONG )\n\t\tvarying vec3 vViewPosition;\n\t#endif\n\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\n#endif\n",clipping_planes_pars_vertex:"#if NUM_CLIPPING_PLANES > 0 && ! defined( PHYSICAL ) && ! defined( PHONG )\n\tvarying vec3 vViewPosition;\n#endif\n",clipping_planes_vertex:"#if NUM_CLIPPING_PLANES > 0 && ! defined( PHYSICAL ) && ! defined( PHONG )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n",color_fragment:"#ifdef USE_COLOR\n\tdiffuseColor.rgb *= vColor;\n#endif",color_pars_fragment:"#ifdef USE_COLOR\n\tvarying vec3 vColor;\n#endif\n",color_pars_vertex:"#ifdef USE_COLOR\n\tvarying vec3 vColor;\n#endif",color_vertex:"#ifdef USE_COLOR\n\tvColor.xyz = color.xyz;\n#endif",common:"#define PI 3.14159265359\n#define PI2 6.28318530718\n#define PI_HALF 1.5707963267949\n#define RECIPROCAL_PI 0.31830988618\n#define RECIPROCAL_PI2 0.15915494\n#define LOG2 1.442695\n#define EPSILON 1e-6\n#define saturate(a) clamp( a, 0.0, 1.0 )\n#define whiteCompliment(a) ( 1.0 - saturate( a ) )\nfloat pow2( const in float x ) { return x*x; }\nfloat pow3( const in float x ) { return x*x*x; }\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\nfloat average( const in vec3 color ) { return dot( color, vec3( 0.3333 ) ); }\nhighp float rand( const in vec2 uv ) {\n\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\n\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\n\treturn fract(sin(sn) * c);\n}\nstruct IncidentLight {\n\tvec3 color;\n\tvec3 direction;\n\tbool visible;\n};\nstruct ReflectedLight {\n\tvec3 directDiffuse;\n\tvec3 directSpecular;\n\tvec3 indirectDiffuse;\n\tvec3 indirectSpecular;\n};\nstruct GeometricContext {\n\tvec3 position;\n\tvec3 normal;\n\tvec3 viewDir;\n};\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n}\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\n}\nvec3 projectOnPlane(in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\tfloat distance = dot( planeNormal, point - pointOnPlane );\n\treturn - distance * planeNormal + point;\n}\nfloat sideOfPlane( in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\treturn sign( dot( point - pointOnPlane, planeNormal ) );\n}\nvec3 linePlaneIntersect( in vec3 pointOnLine, in vec3 lineDirection, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\treturn lineDirection * ( dot( planeNormal, pointOnPlane - pointOnLine ) / dot( planeNormal, lineDirection ) ) + pointOnLine;\n}\nmat3 transposeMat3( const in mat3 m ) {\n\tmat3 tmp;\n\ttmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\n\ttmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\n\ttmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\n\treturn tmp;\n}\nfloat linearToRelativeLuminance( const in vec3 color ) {\n\tvec3 weights = vec3( 0.2126, 0.7152, 0.0722 );\n\treturn dot( weights, color.rgb );\n}\n",cube_uv_reflection_fragment:"#ifdef ENVMAP_TYPE_CUBE_UV\n#define cubeUV_textureSize (1024.0)\nint getFaceFromDirection(vec3 direction) {\n\tvec3 absDirection = abs(direction);\n\tint face = -1;\n\tif( absDirection.x > absDirection.z ) {\n\t\tif(absDirection.x > absDirection.y )\n\t\t\tface = direction.x > 0.0 ? 0 : 3;\n\t\telse\n\t\t\tface = direction.y > 0.0 ? 1 : 4;\n\t}\n\telse {\n\t\tif(absDirection.z > absDirection.y )\n\t\t\tface = direction.z > 0.0 ? 2 : 5;\n\t\telse\n\t\t\tface = direction.y > 0.0 ? 1 : 4;\n\t}\n\treturn face;\n}\n#define cubeUV_maxLods1  (log2(cubeUV_textureSize*0.25) - 1.0)\n#define cubeUV_rangeClamp (exp2((6.0 - 1.0) * 2.0))\nvec2 MipLevelInfo( vec3 vec, float roughnessLevel, float roughness ) {\n\tfloat scale = exp2(cubeUV_maxLods1 - roughnessLevel);\n\tfloat dxRoughness = dFdx(roughness);\n\tfloat dyRoughness = dFdy(roughness);\n\tvec3 dx = dFdx( vec * scale * dxRoughness );\n\tvec3 dy = dFdy( vec * scale * dyRoughness );\n\tfloat d = max( dot( dx, dx ), dot( dy, dy ) );\n\td = clamp(d, 1.0, cubeUV_rangeClamp);\n\tfloat mipLevel = 0.5 * log2(d);\n\treturn vec2(floor(mipLevel), fract(mipLevel));\n}\n#define cubeUV_maxLods2 (log2(cubeUV_textureSize*0.25) - 2.0)\n#define cubeUV_rcpTextureSize (1.0 / cubeUV_textureSize)\nvec2 getCubeUV(vec3 direction, float roughnessLevel, float mipLevel) {\n\tmipLevel = roughnessLevel > cubeUV_maxLods2 - 3.0 ? 0.0 : mipLevel;\n\tfloat a = 16.0 * cubeUV_rcpTextureSize;\n\tvec2 exp2_packed = exp2( vec2( roughnessLevel, mipLevel ) );\n\tvec2 rcp_exp2_packed = vec2( 1.0 ) / exp2_packed;\n\tfloat powScale = exp2_packed.x * exp2_packed.y;\n\tfloat scale = rcp_exp2_packed.x * rcp_exp2_packed.y * 0.25;\n\tfloat mipOffset = 0.75*(1.0 - rcp_exp2_packed.y) * rcp_exp2_packed.x;\n\tbool bRes = mipLevel == 0.0;\n\tscale =  bRes && (scale < a) ? a : scale;\n\tvec3 r;\n\tvec2 offset;\n\tint face = getFaceFromDirection(direction);\n\tfloat rcpPowScale = 1.0 / powScale;\n\tif( face == 0) {\n\t\tr = vec3(direction.x, -direction.z, direction.y);\n\t\toffset = vec2(0.0+mipOffset,0.75 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\n\t}\n\telse if( face == 1) {\n\t\tr = vec3(direction.y, direction.x, direction.z);\n\t\toffset = vec2(scale+mipOffset, 0.75 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\n\t}\n\telse if( face == 2) {\n\t\tr = vec3(direction.z, direction.x, direction.y);\n\t\toffset = vec2(2.0*scale+mipOffset, 0.75 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\n\t}\n\telse if( face == 3) {\n\t\tr = vec3(direction.x, direction.z, direction.y);\n\t\toffset = vec2(0.0+mipOffset,0.5 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\n\t}\n\telse if( face == 4) {\n\t\tr = vec3(direction.y, direction.x, -direction.z);\n\t\toffset = vec2(scale+mipOffset, 0.5 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\n\t}\n\telse {\n\t\tr = vec3(direction.z, -direction.x, direction.y);\n\t\toffset = vec2(2.0*scale+mipOffset, 0.5 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\n\t}\n\tr = normalize(r);\n\tfloat texelOffset = 0.5 * cubeUV_rcpTextureSize;\n\tvec2 s = ( r.yz / abs( r.x ) + vec2( 1.0 ) ) * 0.5;\n\tvec2 base = offset + vec2( texelOffset );\n\treturn base + s * ( scale - 2.0 * texelOffset );\n}\n#define cubeUV_maxLods3 (log2(cubeUV_textureSize*0.25) - 3.0)\nvec4 textureCubeUV(vec3 reflectedDirection, float roughness ) {\n\tfloat roughnessVal = roughness* cubeUV_maxLods3;\n\tfloat r1 = floor(roughnessVal);\n\tfloat r2 = r1 + 1.0;\n\tfloat t = fract(roughnessVal);\n\tvec2 mipInfo = MipLevelInfo(reflectedDirection, r1, roughness);\n\tfloat s = mipInfo.y;\n\tfloat level0 = mipInfo.x;\n\tfloat level1 = level0 + 1.0;\n\tlevel1 = level1 > 5.0 ? 5.0 : level1;\n\tlevel0 += min( floor( s + 0.5 ), 5.0 );\n\tvec2 uv_10 = getCubeUV(reflectedDirection, r1, level0);\n\tvec4 color10 = envMapTexelToLinear(texture2D(envMap, uv_10));\n\tvec2 uv_20 = getCubeUV(reflectedDirection, r2, level0);\n\tvec4 color20 = envMapTexelToLinear(texture2D(envMap, uv_20));\n\tvec4 result = mix(color10, color20, t);\n\treturn vec4(result.rgb, 1.0);\n}\n#endif\n",defaultnormal_vertex:"vec3 transformedNormal = normalMatrix * objectNormal;\n#ifdef FLIP_SIDED\n\ttransformedNormal = - transformedNormal;\n#endif\n",displacementmap_pars_vertex:"#ifdef USE_DISPLACEMENTMAP\n\tuniform sampler2D displacementMap;\n\tuniform float displacementScale;\n\tuniform float displacementBias;\n#endif\n",displacementmap_vertex:"#ifdef USE_DISPLACEMENTMAP\n\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, uv ).x * displacementScale + displacementBias );\n#endif\n",emissivemap_fragment:"#ifdef USE_EMISSIVEMAP\n\tvec4 emissiveColor = texture2D( emissiveMap, vUv );\n\temissiveColor.rgb = emissiveMapTexelToLinear( emissiveColor ).rgb;\n\ttotalEmissiveRadiance *= emissiveColor.rgb;\n#endif\n",emissivemap_pars_fragment:"#ifdef USE_EMISSIVEMAP\n\tuniform sampler2D emissiveMap;\n#endif\n",encodings_fragment:"  gl_FragColor = linearToOutputTexel( gl_FragColor );\n",encodings_pars_fragment:"\nvec4 LinearToLinear( in vec4 value ) {\n\treturn value;\n}\nvec4 GammaToLinear( in vec4 value, in float gammaFactor ) {\n\treturn vec4( pow( value.xyz, vec3( gammaFactor ) ), value.w );\n}\nvec4 LinearToGamma( in vec4 value, in float gammaFactor ) {\n\treturn vec4( pow( value.xyz, vec3( 1.0 / gammaFactor ) ), value.w );\n}\nvec4 sRGBToLinear( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.w );\n}\nvec4 LinearTosRGB( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.w );\n}\nvec4 RGBEToLinear( in vec4 value ) {\n\treturn vec4( value.rgb * exp2( value.a * 255.0 - 128.0 ), 1.0 );\n}\nvec4 LinearToRGBE( in vec4 value ) {\n\tfloat maxComponent = max( max( value.r, value.g ), value.b );\n\tfloat fExp = clamp( ceil( log2( maxComponent ) ), -128.0, 127.0 );\n\treturn vec4( value.rgb / exp2( fExp ), ( fExp + 128.0 ) / 255.0 );\n}\nvec4 RGBMToLinear( in vec4 value, in float maxRange ) {\n\treturn vec4( value.xyz * value.w * maxRange, 1.0 );\n}\nvec4 LinearToRGBM( in vec4 value, in float maxRange ) {\n\tfloat maxRGB = max( value.x, max( value.g, value.b ) );\n\tfloat M      = clamp( maxRGB / maxRange, 0.0, 1.0 );\n\tM            = ceil( M * 255.0 ) / 255.0;\n\treturn vec4( value.rgb / ( M * maxRange ), M );\n}\nvec4 RGBDToLinear( in vec4 value, in float maxRange ) {\n\treturn vec4( value.rgb * ( ( maxRange / 255.0 ) / value.a ), 1.0 );\n}\nvec4 LinearToRGBD( in vec4 value, in float maxRange ) {\n\tfloat maxRGB = max( value.x, max( value.g, value.b ) );\n\tfloat D      = max( maxRange / maxRGB, 1.0 );\n\tD            = min( floor( D ) / 255.0, 1.0 );\n\treturn vec4( value.rgb * ( D * ( 255.0 / maxRange ) ), D );\n}\nconst mat3 cLogLuvM = mat3( 0.2209, 0.3390, 0.4184, 0.1138, 0.6780, 0.7319, 0.0102, 0.1130, 0.2969 );\nvec4 LinearToLogLuv( in vec4 value )  {\n\tvec3 Xp_Y_XYZp = value.rgb * cLogLuvM;\n\tXp_Y_XYZp = max(Xp_Y_XYZp, vec3(1e-6, 1e-6, 1e-6));\n\tvec4 vResult;\n\tvResult.xy = Xp_Y_XYZp.xy / Xp_Y_XYZp.z;\n\tfloat Le = 2.0 * log2(Xp_Y_XYZp.y) + 127.0;\n\tvResult.w = fract(Le);\n\tvResult.z = (Le - (floor(vResult.w*255.0))/255.0)/255.0;\n\treturn vResult;\n}\nconst mat3 cLogLuvInverseM = mat3( 6.0014, -2.7008, -1.7996, -1.3320, 3.1029, -5.7721, 0.3008, -1.0882, 5.6268 );\nvec4 LogLuvToLinear( in vec4 value ) {\n\tfloat Le = value.z * 255.0 + value.w;\n\tvec3 Xp_Y_XYZp;\n\tXp_Y_XYZp.y = exp2((Le - 127.0) / 2.0);\n\tXp_Y_XYZp.z = Xp_Y_XYZp.y / value.y;\n\tXp_Y_XYZp.x = value.x * Xp_Y_XYZp.z;\n\tvec3 vRGB = Xp_Y_XYZp.rgb * cLogLuvInverseM;\n\treturn vec4( max(vRGB, 0.0), 1.0 );\n}\n",envmap_fragment:"#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\n\t\tvec3 cameraToVertex = normalize( vWorldPosition - cameraPosition );\n\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( cameraToVertex, worldNormal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( cameraToVertex, worldNormal, refractionRatio );\n\t\t#endif\n\t#else\n\t\tvec3 reflectVec = vReflect;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n\t#elif defined( ENVMAP_TYPE_EQUIREC )\n\t\tvec2 sampleUV;\n\t\treflectVec = normalize( reflectVec );\n\t\tsampleUV.y = asin( clamp( reflectVec.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\t\tsampleUV.x = atan( reflectVec.z, reflectVec.x ) * RECIPROCAL_PI2 + 0.5;\n\t\tvec4 envColor = texture2D( envMap, sampleUV );\n\t#elif defined( ENVMAP_TYPE_SPHERE )\n\t\treflectVec = normalize( reflectVec );\n\t\tvec3 reflectView = normalize( ( viewMatrix * vec4( reflectVec, 0.0 ) ).xyz + vec3( 0.0, 0.0, 1.0 ) );\n\t\tvec4 envColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5 );\n\t#else\n\t\tvec4 envColor = vec4( 0.0 );\n\t#endif\n\tenvColor = envMapTexelToLinear( envColor );\n\t#ifdef ENVMAP_BLENDING_MULTIPLY\n\t\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_MIX )\n\t\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_ADD )\n\t\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\n\t#endif\n#endif\n",envmap_pars_fragment:"#if defined( USE_ENVMAP ) || defined( PHYSICAL )\n\tuniform float reflectivity;\n\tuniform float envMapIntensity;\n#endif\n#ifdef USE_ENVMAP\n\t#if ! defined( PHYSICAL ) && ( defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) )\n\t\tvarying vec3 vWorldPosition;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tuniform samplerCube envMap;\n\t#else\n\t\tuniform sampler2D envMap;\n\t#endif\n\tuniform float flipEnvMap;\n\tuniform int maxMipLevel;\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( PHYSICAL )\n\t\tuniform float refractionRatio;\n\t#else\n\t\tvarying vec3 vReflect;\n\t#endif\n#endif\n",envmap_pars_vertex:"#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\n\t\tvarying vec3 vWorldPosition;\n\t#else\n\t\tvarying vec3 vReflect;\n\t\tuniform float refractionRatio;\n\t#endif\n#endif\n",envmap_vertex:"#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\n\t\tvWorldPosition = worldPosition.xyz;\n\t#else\n\t\tvec3 cameraToVertex = normalize( worldPosition.xyz - cameraPosition );\n\t\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvReflect = reflect( cameraToVertex, worldNormal );\n\t\t#else\n\t\t\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\n\t\t#endif\n\t#endif\n#endif\n",fog_vertex:"\n#ifdef USE_FOG\nfogDepth = -mvPosition.z;\n#endif",fog_pars_vertex:"#ifdef USE_FOG\n  varying float fogDepth;\n#endif\n",fog_fragment:"#ifdef USE_FOG\n\t#ifdef FOG_EXP2\n\t\tfloat fogFactor = whiteCompliment( exp2( - fogDensity * fogDensity * fogDepth * fogDepth * LOG2 ) );\n\t#else\n\t\tfloat fogFactor = smoothstep( fogNear, fogFar, fogDepth );\n\t#endif\n\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n#endif\n",fog_pars_fragment:"#ifdef USE_FOG\n\tuniform vec3 fogColor;\n\tvarying float fogDepth;\n\t#ifdef FOG_EXP2\n\t\tuniform float fogDensity;\n\t#else\n\t\tuniform float fogNear;\n\t\tuniform float fogFar;\n\t#endif\n#endif\n",gradientmap_pars_fragment:"#ifdef TOON\n\tuniform sampler2D gradientMap;\n\tvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\n\t\tfloat dotNL = dot( normal, lightDirection );\n\t\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\n\t\t#ifdef USE_GRADIENTMAP\n\t\t\treturn texture2D( gradientMap, coord ).rgb;\n\t\t#else\n\t\t\treturn ( coord.x < 0.7 ) ? vec3( 0.7 ) : vec3( 1.0 );\n\t\t#endif\n\t}\n#endif\n",lightmap_fragment:"#ifdef USE_LIGHTMAP\n\treflectedLight.indirectDiffuse += PI * texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\n#endif\n",lightmap_pars_fragment:"#ifdef USE_LIGHTMAP\n\tuniform sampler2D lightMap;\n\tuniform float lightMapIntensity;\n#endif",lights_lambert_vertex:"vec3 diffuse = vec3( 1.0 );\nGeometricContext geometry;\ngeometry.position = mvPosition.xyz;\ngeometry.normal = normalize( transformedNormal );\ngeometry.viewDir = normalize( -mvPosition.xyz );\nGeometricContext backGeometry;\nbackGeometry.position = geometry.position;\nbackGeometry.normal = -geometry.normal;\nbackGeometry.viewDir = geometry.viewDir;\nvLightFront = vec3( 0.0 );\n#ifdef DOUBLE_SIDED\n\tvLightBack = vec3( 0.0 );\n#endif\nIncidentLight directLight;\nfloat dotNL;\nvec3 directLightColor_Diffuse;\n#if NUM_POINT_LIGHTS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tgetPointDirectLightIrradiance( pointLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tgetSpotDirectLightIrradiance( spotLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n#endif\n#if NUM_DIR_LIGHTS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tgetDirectionalDirectLightIrradiance( directionalLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\tvLightFront += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += getHemisphereLightIrradiance( hemisphereLights[ i ], backGeometry );\n\t\t#endif\n\t}\n#endif\n",lights_pars_begin:"uniform vec3 ambientLightColor;\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\n\tvec3 irradiance = ambientLightColor;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\treturn irradiance;\n}\n#if NUM_DIR_LIGHTS > 0\n\tstruct DirectionalLight {\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tint shadow;\n\t\tfloat shadowBias;\n\t\tfloat shadowRadius;\n\t\tvec2 shadowMapSize;\n\t};\n\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\n\tvoid getDirectionalDirectLightIrradiance( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\t\tdirectLight.color = directionalLight.color;\n\t\tdirectLight.direction = directionalLight.direction;\n\t\tdirectLight.visible = true;\n\t}\n#endif\n#if NUM_POINT_LIGHTS > 0\n\tstruct PointLight {\n\t\tvec3 position;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tint shadow;\n\t\tfloat shadowBias;\n\t\tfloat shadowRadius;\n\t\tvec2 shadowMapSize;\n\t\tfloat shadowCameraNear;\n\t\tfloat shadowCameraFar;\n\t};\n\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\n\tvoid getPointDirectLightIrradiance( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\t\tvec3 lVector = pointLight.position - geometry.position;\n\t\tdirectLight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tdirectLight.color = pointLight.color;\n\t\tdirectLight.color *= punctualLightIntensityToIrradianceFactor( lightDistance, pointLight.distance, pointLight.decay );\n\t\tdirectLight.visible = ( directLight.color != vec3( 0.0 ) );\n\t}\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\tstruct SpotLight {\n\t\tvec3 position;\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tfloat coneCos;\n\t\tfloat penumbraCos;\n\t\tint shadow;\n\t\tfloat shadowBias;\n\t\tfloat shadowRadius;\n\t\tvec2 shadowMapSize;\n\t};\n\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\n\tvoid getSpotDirectLightIrradiance( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight directLight  ) {\n\t\tvec3 lVector = spotLight.position - geometry.position;\n\t\tdirectLight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tfloat angleCos = dot( directLight.direction, spotLight.direction );\n\t\tif ( angleCos > spotLight.coneCos ) {\n\t\t\tfloat spotEffect = smoothstep( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n\t\t\tdirectLight.color = spotLight.color;\n\t\t\tdirectLight.color *= spotEffect * punctualLightIntensityToIrradianceFactor( lightDistance, spotLight.distance, spotLight.decay );\n\t\t\tdirectLight.visible = true;\n\t\t} else {\n\t\t\tdirectLight.color = vec3( 0.0 );\n\t\t\tdirectLight.visible = false;\n\t\t}\n\t}\n#endif\n#if NUM_RECT_AREA_LIGHTS > 0\n\tstruct RectAreaLight {\n\t\tvec3 color;\n\t\tvec3 position;\n\t\tvec3 halfWidth;\n\t\tvec3 halfHeight;\n\t};\n\tuniform sampler2D ltc_1;\tuniform sampler2D ltc_2;\n\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\tstruct HemisphereLight {\n\t\tvec3 direction;\n\t\tvec3 skyColor;\n\t\tvec3 groundColor;\n\t};\n\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\n\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in GeometricContext geometry ) {\n\t\tfloat dotNL = dot( geometry.normal, hemiLight.direction );\n\t\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n\t\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tirradiance *= PI;\n\t\t#endif\n\t\treturn irradiance;\n\t}\n#endif\n",lights_pars_maps:"#if defined( USE_ENVMAP ) && defined( PHYSICAL )\n\tvec3 getLightProbeIndirectIrradiance( const in GeometricContext geometry, const in int maxMIPLevel ) {\n\t\tvec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );\n\t\t#ifdef ENVMAP_TYPE_CUBE\n\t\t\tvec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = textureCubeLodEXT( envMap, queryVec, float( maxMIPLevel ) );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = textureCube( envMap, queryVec, float( maxMIPLevel ) );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\n\t\t\tvec4 envMapColor = textureCubeUV( queryVec, 1.0 );\n\t\t#else\n\t\t\tvec4 envMapColor = vec4( 0.0 );\n\t\t#endif\n\t\treturn PI * envMapColor.rgb * envMapIntensity;\n\t}\n\tfloat getSpecularMIPLevel( const in float blinnShininessExponent, const in int maxMIPLevel ) {\n\t\tfloat maxMIPLevelScalar = float( maxMIPLevel );\n\t\tfloat desiredMIPLevel = maxMIPLevelScalar + 0.79248 - 0.5 * log2( pow2( blinnShininessExponent ) + 1.0 );\n\t\treturn clamp( desiredMIPLevel, 0.0, maxMIPLevelScalar );\n\t}\n\tvec3 getLightProbeIndirectRadiance( const in GeometricContext geometry, const in float blinnShininessExponent, const in int maxMIPLevel ) {\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( -geometry.viewDir, geometry.normal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( -geometry.viewDir, geometry.normal, refractionRatio );\n\t\t#endif\n\t\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n\t\tfloat specularMIPLevel = getSpecularMIPLevel( blinnShininessExponent, maxMIPLevel );\n\t\t#ifdef ENVMAP_TYPE_CUBE\n\t\t\tvec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = textureCubeLodEXT( envMap, queryReflectVec, specularMIPLevel );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = textureCube( envMap, queryReflectVec, specularMIPLevel );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\n\t\t\tvec4 envMapColor = textureCubeUV(queryReflectVec, BlinnExponentToGGXRoughness(blinnShininessExponent));\n\t\t#elif defined( ENVMAP_TYPE_EQUIREC )\n\t\t\tvec2 sampleUV;\n\t\t\tsampleUV.y = asin( clamp( reflectVec.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\t\t\tsampleUV.x = atan( reflectVec.z, reflectVec.x ) * RECIPROCAL_PI2 + 0.5;\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = texture2DLodEXT( envMap, sampleUV, specularMIPLevel );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = texture2D( envMap, sampleUV, specularMIPLevel );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#elif defined( ENVMAP_TYPE_SPHERE )\n\t\t\tvec3 reflectView = normalize( ( viewMatrix * vec4( reflectVec, 0.0 ) ).xyz + vec3( 0.0,0.0,1.0 ) );\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = texture2DLodEXT( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#endif\n\t\treturn envMapColor.rgb * envMapIntensity;\n\t}\n#endif\n",lights_phong_fragment:"BlinnPhongMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;\n",lights_phong_pars_fragment:"varying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\nstruct BlinnPhongMaterial {\n\tvec3\tdiffuseColor;\n\tvec3\tspecularColor;\n\tfloat\tspecularShininess;\n\tfloat\tspecularStrength;\n};\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\t#ifdef TOON\n\t\tvec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color;\n\t#else\n\t\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\t\tvec3 irradiance = dotNL * directLight.color;\n\t#endif\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\treflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n\treflectedLight.directSpecular += irradiance * BRDF_Specular_BlinnPhong( directLight, geometry, material.specularColor, material.specularShininess ) * material.specularStrength;\n}\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_BlinnPhong\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_BlinnPhong\n#define Material_LightProbeLOD( material )\t(0)\n",lights_physical_fragment:"PhysicalMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\nmaterial.specularRoughness = clamp( roughnessFactor, 0.04, 1.0 );\n#ifdef STANDARD\n\tmaterial.specularColor = mix( vec3( DEFAULT_SPECULAR_COEFFICIENT ), diffuseColor.rgb, metalnessFactor );\n#else\n\tmaterial.specularColor = mix( vec3( MAXIMUM_SPECULAR_COEFFICIENT * pow2( reflectivity ) ), diffuseColor.rgb, metalnessFactor );\n\tmaterial.clearCoat = saturate( clearCoat );\tmaterial.clearCoatRoughness = clamp( clearCoatRoughness, 0.04, 1.0 );\n#endif\n",lights_physical_pars_fragment:"struct PhysicalMaterial {\n\tvec3\tdiffuseColor;\n\tfloat\tspecularRoughness;\n\tvec3\tspecularColor;\n\t#ifndef STANDARD\n\t\tfloat clearCoat;\n\t\tfloat clearCoatRoughness;\n\t#endif\n};\n#define MAXIMUM_SPECULAR_COEFFICIENT 0.16\n#define DEFAULT_SPECULAR_COEFFICIENT 0.04\nfloat clearCoatDHRApprox( const in float roughness, const in float dotNL ) {\n\treturn DEFAULT_SPECULAR_COEFFICIENT + ( 1.0 - DEFAULT_SPECULAR_COEFFICIENT ) * ( pow( 1.0 - dotNL, 5.0 ) * pow( 1.0 - roughness, 2.0 ) );\n}\n#if NUM_RECT_AREA_LIGHTS > 0\n\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\t\tvec3 normal = geometry.normal;\n\t\tvec3 viewDir = geometry.viewDir;\n\t\tvec3 position = geometry.position;\n\t\tvec3 lightPos = rectAreaLight.position;\n\t\tvec3 halfWidth = rectAreaLight.halfWidth;\n\t\tvec3 halfHeight = rectAreaLight.halfHeight;\n\t\tvec3 lightColor = rectAreaLight.color;\n\t\tfloat roughness = material.specularRoughness;\n\t\tvec3 rectCoords[ 4 ];\n\t\trectCoords[ 0 ] = lightPos - halfWidth - halfHeight;\t\trectCoords[ 1 ] = lightPos + halfWidth - halfHeight;\n\t\trectCoords[ 2 ] = lightPos + halfWidth + halfHeight;\n\t\trectCoords[ 3 ] = lightPos - halfWidth + halfHeight;\n\t\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\n\t\tvec4 t1 = texture2D( ltc_1, uv );\n\t\tvec4 t2 = texture2D( ltc_2, uv );\n\t\tmat3 mInv = mat3(\n\t\t\tvec3( t1.x, 0, t1.y ),\n\t\t\tvec3(    0, 1,    0 ),\n\t\t\tvec3( t1.z, 0, t1.w )\n\t\t);\n\t\tvec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\n\t\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\n\t\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\n\t}\n#endif\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\t#ifndef STANDARD\n\t\tfloat clearCoatDHR = material.clearCoat * clearCoatDHRApprox( material.clearCoatRoughness, dotNL );\n\t#else\n\t\tfloat clearCoatDHR = 0.0;\n\t#endif\n\treflectedLight.directSpecular += ( 1.0 - clearCoatDHR ) * irradiance * BRDF_Specular_GGX( directLight, geometry, material.specularColor, material.specularRoughness );\n\treflectedLight.directDiffuse += ( 1.0 - clearCoatDHR ) * irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n\t#ifndef STANDARD\n\t\treflectedLight.directSpecular += irradiance * material.clearCoat * BRDF_Specular_GGX( directLight, geometry, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearCoatRoughness );\n\t#endif\n}\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 clearCoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\t#ifndef STANDARD\n\t\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\t\tfloat dotNL = dotNV;\n\t\tfloat clearCoatDHR = material.clearCoat * clearCoatDHRApprox( material.clearCoatRoughness, dotNL );\n\t#else\n\t\tfloat clearCoatDHR = 0.0;\n\t#endif\n\treflectedLight.indirectSpecular += ( 1.0 - clearCoatDHR ) * radiance * BRDF_Specular_GGX_Environment( geometry, material.specularColor, material.specularRoughness );\n\t#ifndef STANDARD\n\t\treflectedLight.indirectSpecular += clearCoatRadiance * material.clearCoat * BRDF_Specular_GGX_Environment( geometry, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearCoatRoughness );\n\t#endif\n}\n#define RE_Direct\t\t\t\tRE_Direct_Physical\n#define RE_Direct_RectArea\t\tRE_Direct_RectArea_Physical\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Physical\n#define RE_IndirectSpecular\t\tRE_IndirectSpecular_Physical\n#define Material_BlinnShininessExponent( material )   GGXRoughnessToBlinnExponent( material.specularRoughness )\n#define Material_ClearCoat_BlinnShininessExponent( material )   GGXRoughnessToBlinnExponent( material.clearCoatRoughness )\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\n\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\n}\n",lights_fragment_begin:"\nGeometricContext geometry;\ngeometry.position = - vViewPosition;\ngeometry.normal = normal;\ngeometry.viewDir = normalize( vViewPosition );\nIncidentLight directLight;\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n\tPointLight pointLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tgetPointDirectLightIrradiance( pointLight, geometry, directLight );\n\t\t#ifdef USE_SHADOWMAP\n\t\tdirectLight.color *= all( bvec2( pointLight.shadow, directLight.visible ) ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n#endif\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n\tSpotLight spotLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tgetSpotDirectLightIrradiance( spotLight, geometry, directLight );\n\t\t#ifdef USE_SHADOWMAP\n\t\tdirectLight.color *= all( bvec2( spotLight.shadow, directLight.visible ) ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n#endif\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n\tDirectionalLight directionalLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tgetDirectionalDirectLightIrradiance( directionalLight, geometry, directLight );\n\t\t#ifdef USE_SHADOWMAP\n\t\tdirectLight.color *= all( bvec2( directionalLight.shadow, directLight.visible ) ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n#endif\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\n\tRectAreaLight rectAreaLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\n\t\trectAreaLight = rectAreaLights[ i ];\n\t\tRE_Direct_RectArea( rectAreaLight, geometry, material, reflectedLight );\n\t}\n#endif\n#if defined( RE_IndirectDiffuse )\n\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n\t#if ( NUM_HEMI_LIGHTS > 0 )\n\t\t#pragma unroll_loop\n\t\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\t\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\n\t\t}\n\t#endif\n#endif\n#if defined( RE_IndirectSpecular )\n\tvec3 radiance = vec3( 0.0 );\n\tvec3 clearCoatRadiance = vec3( 0.0 );\n#endif\n",lights_fragment_maps:"#if defined( RE_IndirectDiffuse )\n\t#ifdef USE_LIGHTMAP\n\t\tvec3 lightMapIrradiance = texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tlightMapIrradiance *= PI;\n\t\t#endif\n\t\tirradiance += lightMapIrradiance;\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( PHYSICAL ) && defined( ENVMAP_TYPE_CUBE_UV )\n\t\tirradiance += getLightProbeIndirectIrradiance( geometry, maxMipLevel );\n\t#endif\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n\tradiance += getLightProbeIndirectRadiance( geometry, Material_BlinnShininessExponent( material ), maxMipLevel );\n\t#ifndef STANDARD\n\t\tclearCoatRadiance += getLightProbeIndirectRadiance( geometry, Material_ClearCoat_BlinnShininessExponent( material ), maxMipLevel );\n\t#endif\n#endif\n",lights_fragment_end:"#if defined( RE_IndirectDiffuse )\n\tRE_IndirectDiffuse( irradiance, geometry, material, reflectedLight );\n#endif\n#if defined( RE_IndirectSpecular )\n\tRE_IndirectSpecular( radiance, clearCoatRadiance, geometry, material, reflectedLight );\n#endif\n",logdepthbuf_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tgl_FragDepthEXT = log2( vFragDepth ) * logDepthBufFC * 0.5;\n#endif",logdepthbuf_pars_fragment:"#ifdef USE_LOGDEPTHBUF\n\tuniform float logDepthBufFC;\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvarying float vFragDepth;\n\t#endif\n#endif\n",logdepthbuf_pars_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvarying float vFragDepth;\n\t#endif\n\tuniform float logDepthBufFC;\n#endif",logdepthbuf_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvFragDepth = 1.0 + gl_Position.w;\n\t#else\n\t\tgl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;\n\t\tgl_Position.z *= gl_Position.w;\n\t#endif\n#endif\n",map_fragment:"#ifdef USE_MAP\n\tvec4 texelColor = texture2D( map, vUv );\n\ttexelColor = mapTexelToLinear( texelColor );\n\tdiffuseColor *= texelColor;\n#endif\n",map_pars_fragment:"#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif\n",map_particle_fragment:"#ifdef USE_MAP\n\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\n\tvec4 mapTexel = texture2D( map, uv );\n\tdiffuseColor *= mapTexelToLinear( mapTexel );\n#endif\n",map_particle_pars_fragment:"#ifdef USE_MAP\n\tuniform mat3 uvTransform;\n\tuniform sampler2D map;\n#endif\n",metalnessmap_fragment:"float metalnessFactor = metalness;\n#ifdef USE_METALNESSMAP\n\tvec4 texelMetalness = texture2D( metalnessMap, vUv );\n\tmetalnessFactor *= texelMetalness.b;\n#endif\n",metalnessmap_pars_fragment:"#ifdef USE_METALNESSMAP\n\tuniform sampler2D metalnessMap;\n#endif",morphnormal_vertex:"#ifdef USE_MORPHNORMALS\n\tobjectNormal += ( morphNormal0 - normal ) * morphTargetInfluences[ 0 ];\n\tobjectNormal += ( morphNormal1 - normal ) * morphTargetInfluences[ 1 ];\n\tobjectNormal += ( morphNormal2 - normal ) * morphTargetInfluences[ 2 ];\n\tobjectNormal += ( morphNormal3 - normal ) * morphTargetInfluences[ 3 ];\n#endif\n",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\n\t#ifndef USE_MORPHNORMALS\n\tuniform float morphTargetInfluences[ 8 ];\n\t#else\n\tuniform float morphTargetInfluences[ 4 ];\n\t#endif\n#endif",morphtarget_vertex:"#ifdef USE_MORPHTARGETS\n\ttransformed += ( morphTarget0 - position ) * morphTargetInfluences[ 0 ];\n\ttransformed += ( morphTarget1 - position ) * morphTargetInfluences[ 1 ];\n\ttransformed += ( morphTarget2 - position ) * morphTargetInfluences[ 2 ];\n\ttransformed += ( morphTarget3 - position ) * morphTargetInfluences[ 3 ];\n\t#ifndef USE_MORPHNORMALS\n\ttransformed += ( morphTarget4 - position ) * morphTargetInfluences[ 4 ];\n\ttransformed += ( morphTarget5 - position ) * morphTargetInfluences[ 5 ];\n\ttransformed += ( morphTarget6 - position ) * morphTargetInfluences[ 6 ];\n\ttransformed += ( morphTarget7 - position ) * morphTargetInfluences[ 7 ];\n\t#endif\n#endif\n",normal_fragment_begin:"#ifdef FLAT_SHADED\n\tvec3 fdx = vec3( dFdx( vViewPosition.x ), dFdx( vViewPosition.y ), dFdx( vViewPosition.z ) );\n\tvec3 fdy = vec3( dFdy( vViewPosition.x ), dFdy( vViewPosition.y ), dFdy( vViewPosition.z ) );\n\tvec3 normal = normalize( cross( fdx, fdy ) );\n#else\n\tvec3 normal = normalize( vNormal );\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t#endif\n#endif\n",normal_fragment_maps:"#ifdef USE_NORMALMAP\n\tnormal = perturbNormal2Arb( -vViewPosition, normal );\n#elif defined( USE_BUMPMAP )\n\tnormal = perturbNormalArb( -vViewPosition, normal, dHdxy_fwd() );\n#endif\n",normalmap_pars_fragment:"#ifdef USE_NORMALMAP\n\tuniform sampler2D normalMap;\n\tuniform vec2 normalScale;\n\tvec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm ) {\n\t\tvec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) );\n\t\tvec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) );\n\t\tvec2 st0 = dFdx( vUv.st );\n\t\tvec2 st1 = dFdy( vUv.st );\n\t\tfloat scale = sign( st1.t * st0.s - st0.t * st1.s );\n\t\tvec3 S = normalize( ( q0 * st1.t - q1 * st0.t ) * scale );\n\t\tvec3 T = normalize( ( - q0 * st1.s + q1 * st0.s ) * scale );\n\t\tvec3 N = normalize( surf_norm );\n\t\tmat3 tsn = mat3( S, T, N );\n\t\tvec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n\t\tmapN.xy *= normalScale;\n\t\tmapN.xy *= ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t\treturn normalize( tsn * mapN );\n\t}\n#endif\n",packing:"vec3 packNormalToRGB( const in vec3 normal ) {\n\treturn normalize( normal ) * 0.5 + 0.5;\n}\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\n\treturn 2.0 * rgb.xyz - 1.0;\n}\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;\nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256.,  256. );\nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\nconst float ShiftRight8 = 1. / 256.;\nvec4 packDepthToRGBA( const in float v ) {\n\tvec4 r = vec4( fract( v * PackFactors ), v );\n\tr.yzw -= r.xyz * ShiftRight8;\treturn r * PackUpscale;\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors );\n}\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( viewZ + near ) / ( near - far );\n}\nfloat orthographicDepthToViewZ( const in float linearClipZ, const in float near, const in float far ) {\n\treturn linearClipZ * ( near - far ) - near;\n}\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn (( near + viewZ ) * far ) / (( far - near ) * viewZ );\n}\nfloat perspectiveDepthToViewZ( const in float invClipZ, const in float near, const in float far ) {\n\treturn ( near * far ) / ( ( far - near ) * invClipZ - far );\n}\n",premultiplied_alpha_fragment:"#ifdef PREMULTIPLIED_ALPHA\n\tgl_FragColor.rgb *= gl_FragColor.a;\n#endif\n",project_vertex:"vec4 mvPosition = modelViewMatrix * vec4( transformed, 1.0 );\ngl_Position = projectionMatrix * mvPosition;\n",dithering_fragment:"#if defined( DITHERING )\n  gl_FragColor.rgb = dithering( gl_FragColor.rgb );\n#endif\n",dithering_pars_fragment:"#if defined( DITHERING )\n\tvec3 dithering( vec3 color ) {\n\t\tfloat grid_position = rand( gl_FragCoord.xy );\n\t\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\n\t\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\n\t\treturn color + dither_shift_RGB;\n\t}\n#endif\n",roughnessmap_fragment:"float roughnessFactor = roughness;\n#ifdef USE_ROUGHNESSMAP\n\tvec4 texelRoughness = texture2D( roughnessMap, vUv );\n\troughnessFactor *= texelRoughness.g;\n#endif\n",roughnessmap_pars_fragment:"#ifdef USE_ROUGHNESSMAP\n\tuniform sampler2D roughnessMap;\n#endif",shadowmap_pars_fragment:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHTS > 0\n\t\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHTS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHTS ];\n\t#endif\n\t#if NUM_SPOT_LIGHTS > 0\n\t\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHTS ];\n\t\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHTS ];\n\t#endif\n\t#if NUM_POINT_LIGHTS > 0\n\t\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHTS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHTS ];\n\t#endif\n\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\n\t\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\n\t}\n\tfloat texture2DShadowLerp( sampler2D depths, vec2 size, vec2 uv, float compare ) {\n\t\tconst vec2 offset = vec2( 0.0, 1.0 );\n\t\tvec2 texelSize = vec2( 1.0 ) / size;\n\t\tvec2 centroidUV = floor( uv * size + 0.5 ) / size;\n\t\tfloat lb = texture2DCompare( depths, centroidUV + texelSize * offset.xx, compare );\n\t\tfloat lt = texture2DCompare( depths, centroidUV + texelSize * offset.xy, compare );\n\t\tfloat rb = texture2DCompare( depths, centroidUV + texelSize * offset.yx, compare );\n\t\tfloat rt = texture2DCompare( depths, centroidUV + texelSize * offset.yy, compare );\n\t\tvec2 f = fract( uv * size + 0.5 );\n\t\tfloat a = mix( lb, lt, f.y );\n\t\tfloat b = mix( rb, rt, f.y );\n\t\tfloat c = mix( a, b, f.x );\n\t\treturn c;\n\t}\n\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\t\tfloat shadow = 1.0;\n\t\tshadowCoord.xyz /= shadowCoord.w;\n\t\tshadowCoord.z += shadowBias;\n\t\tbvec4 inFrustumVec = bvec4 ( shadowCoord.x >= 0.0, shadowCoord.x <= 1.0, shadowCoord.y >= 0.0, shadowCoord.y <= 1.0 );\n\t\tbool inFrustum = all( inFrustumVec );\n\t\tbvec2 frustumTestVec = bvec2( inFrustum, shadowCoord.z <= 1.0 );\n\t\tbool frustumTest = all( frustumTestVec );\n\t\tif ( frustumTest ) {\n\t\t#if defined( SHADOWMAP_TYPE_PCF )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\n\t\t\tshadow = (\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#else\n\t\t\tshadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#endif\n\t\t}\n\t\treturn shadow;\n\t}\n\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\n\t\tvec3 absV = abs( v );\n\t\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\n\t\tabsV *= scaleToCube;\n\t\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\n\t\tvec2 planar = v.xy;\n\t\tfloat almostATexel = 1.5 * texelSizeY;\n\t\tfloat almostOne = 1.0 - almostATexel;\n\t\tif ( absV.z >= almostOne ) {\n\t\t\tif ( v.z > 0.0 )\n\t\t\t\tplanar.x = 4.0 - v.x;\n\t\t} else if ( absV.x >= almostOne ) {\n\t\t\tfloat signX = sign( v.x );\n\t\t\tplanar.x = v.z * signX + 2.0 * signX;\n\t\t} else if ( absV.y >= almostOne ) {\n\t\t\tfloat signY = sign( v.y );\n\t\t\tplanar.x = v.x + 2.0 * signY + 2.0;\n\t\t\tplanar.y = v.z * signY - 2.0;\n\t\t}\n\t\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\n\t}\n\tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\n\t\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\n\t\tvec3 lightToPosition = shadowCoord.xyz;\n\t\tfloat dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );\t\tdp += shadowBias;\n\t\tvec3 bd3D = normalize( lightToPosition );\n\t\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT )\n\t\t\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\n\t\t\treturn (\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#else\n\t\t\treturn texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\n\t\t#endif\n\t}\n#endif\n",shadowmap_pars_vertex:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHTS > 0\n\t\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHTS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHTS ];\n\t#endif\n\t#if NUM_SPOT_LIGHTS > 0\n\t\tuniform mat4 spotShadowMatrix[ NUM_SPOT_LIGHTS ];\n\t\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHTS ];\n\t#endif\n\t#if NUM_POINT_LIGHTS > 0\n\t\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHTS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHTS ];\n\t#endif\n#endif\n",shadowmap_vertex:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHTS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * worldPosition;\n\t}\n\t#endif\n\t#if NUM_SPOT_LIGHTS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tvSpotShadowCoord[ i ] = spotShadowMatrix[ i ] * worldPosition;\n\t}\n\t#endif\n\t#if NUM_POINT_LIGHTS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * worldPosition;\n\t}\n\t#endif\n#endif\n",shadowmask_pars_fragment:"float getShadowMask() {\n\tfloat shadow = 1.0;\n\t#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHTS > 0\n\tDirectionalLight directionalLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tshadow *= bool( directionalLight.shadow ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t}\n\t#endif\n\t#if NUM_SPOT_LIGHTS > 0\n\tSpotLight spotLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tshadow *= bool( spotLight.shadow ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t}\n\t#endif\n\t#if NUM_POINT_LIGHTS > 0\n\tPointLight pointLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tshadow *= bool( pointLight.shadow ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\t}\n\t#endif\n\t#endif\n\treturn shadow;\n}\n",skinbase_vertex:"#ifdef USE_SKINNING\n\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\n\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\n\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\n\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\n#endif",skinning_pars_vertex:"#ifdef USE_SKINNING\n\tuniform mat4 bindMatrix;\n\tuniform mat4 bindMatrixInverse;\n\t#ifdef BONE_TEXTURE\n\t\tuniform sampler2D boneTexture;\n\t\tuniform int boneTextureSize;\n\t\tmat4 getBoneMatrix( const in float i ) {\n\t\t\tfloat j = i * 4.0;\n\t\t\tfloat x = mod( j, float( boneTextureSize ) );\n\t\t\tfloat y = floor( j / float( boneTextureSize ) );\n\t\t\tfloat dx = 1.0 / float( boneTextureSize );\n\t\t\tfloat dy = 1.0 / float( boneTextureSize );\n\t\t\ty = dy * ( y + 0.5 );\n\t\t\tvec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) );\n\t\t\tvec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) );\n\t\t\tvec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) );\n\t\t\tvec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) );\n\t\t\tmat4 bone = mat4( v1, v2, v3, v4 );\n\t\t\treturn bone;\n\t\t}\n\t#else\n\t\tuniform mat4 boneMatrices[ MAX_BONES ];\n\t\tmat4 getBoneMatrix( const in float i ) {\n\t\t\tmat4 bone = boneMatrices[ int(i) ];\n\t\t\treturn bone;\n\t\t}\n\t#endif\n#endif\n",skinning_vertex:"#ifdef USE_SKINNING\n\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\n\tvec4 skinned = vec4( 0.0 );\n\tskinned += boneMatX * skinVertex * skinWeight.x;\n\tskinned += boneMatY * skinVertex * skinWeight.y;\n\tskinned += boneMatZ * skinVertex * skinWeight.z;\n\tskinned += boneMatW * skinVertex * skinWeight.w;\n\ttransformed = ( bindMatrixInverse * skinned ).xyz;\n#endif\n",skinnormal_vertex:"#ifdef USE_SKINNING\n\tmat4 skinMatrix = mat4( 0.0 );\n\tskinMatrix += skinWeight.x * boneMatX;\n\tskinMatrix += skinWeight.y * boneMatY;\n\tskinMatrix += skinWeight.z * boneMatZ;\n\tskinMatrix += skinWeight.w * boneMatW;\n\tskinMatrix  = bindMatrixInverse * skinMatrix * bindMatrix;\n\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\n#endif\n",specularmap_fragment:"float specularStrength;\n#ifdef USE_SPECULARMAP\n\tvec4 texelSpecular = texture2D( specularMap, vUv );\n\tspecularStrength = texelSpecular.r;\n#else\n\tspecularStrength = 1.0;\n#endif",specularmap_pars_fragment:"#ifdef USE_SPECULARMAP\n\tuniform sampler2D specularMap;\n#endif",tonemapping_fragment:"#if defined( TONE_MAPPING )\n  gl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\n#endif\n",tonemapping_pars_fragment:"#ifndef saturate\n\t#define saturate(a) clamp( a, 0.0, 1.0 )\n#endif\nuniform float toneMappingExposure;\nuniform float toneMappingWhitePoint;\nvec3 LinearToneMapping( vec3 color ) {\n\treturn toneMappingExposure * color;\n}\nvec3 ReinhardToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( color / ( vec3( 1.0 ) + color ) );\n}\n#define Uncharted2Helper( x ) max( ( ( x * ( 0.15 * x + 0.10 * 0.50 ) + 0.20 * 0.02 ) / ( x * ( 0.15 * x + 0.50 ) + 0.20 * 0.30 ) ) - 0.02 / 0.30, vec3( 0.0 ) )\nvec3 Uncharted2ToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( Uncharted2Helper( color ) / Uncharted2Helper( vec3( toneMappingWhitePoint ) ) );\n}\nvec3 OptimizedCineonToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\tcolor = max( vec3( 0.0 ), color - 0.004 );\n\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\n}\n",uv_pars_fragment:"#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\n\tvarying vec2 vUv;\n#endif",uv_pars_vertex:"#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\n\tvarying vec2 vUv;\n\tuniform mat3 uvTransform;\n#endif\n",uv_vertex:"#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n#endif",uv2_pars_fragment:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvarying vec2 vUv2;\n#endif",uv2_pars_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tattribute vec2 uv2;\n\tvarying vec2 vUv2;\n#endif",uv2_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvUv2 = uv2;\n#endif",worldpos_vertex:"#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP )\n\tvec4 worldPosition = modelMatrix * vec4( transformed, 1.0 );\n#endif\n",cube_frag:"uniform samplerCube tCube;\nuniform float tFlip;\nuniform float opacity;\nvarying vec3 vWorldPosition;\nvoid main() {\n\tgl_FragColor = textureCube( tCube, vec3( tFlip * vWorldPosition.x, vWorldPosition.yz ) );\n\tgl_FragColor.a *= opacity;\n}\n",cube_vert:"varying vec3 vWorldPosition;\n#include <common>\nvoid main() {\n\tvWorldPosition = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\tgl_Position.z = gl_Position.w;\n}\n",depth_frag:"#if DEPTH_PACKING == 3200\n\tuniform float opacity;\n#endif\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#if DEPTH_PACKING == 3200\n\t\tdiffuseColor.a = opacity;\n\t#endif\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <logdepthbuf_fragment>\n\t#if DEPTH_PACKING == 3200\n\t\tgl_FragColor = vec4( vec3( 1.0 - gl_FragCoord.z ), opacity );\n\t#elif DEPTH_PACKING == 3201\n\t\tgl_FragColor = packDepthToRGBA( gl_FragCoord.z );\n\t#endif\n}\n",depth_vert:"#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n}\n",distanceRGBA_frag:"#define DISTANCE\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main () {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\tfloat dist = length( vWorldPosition - referencePosition );\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n\tdist = saturate( dist );\n\tgl_FragColor = packDepthToRGBA( dist );\n}\n",distanceRGBA_vert:"#define DISTANCE\nvarying vec3 vWorldPosition;\n#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_vertex>\n\t#include <clipping_planes_vertex>\n\tvWorldPosition = worldPosition.xyz;\n}\n",equirect_frag:"uniform sampler2D tEquirect;\nvarying vec3 vWorldPosition;\n#include <common>\nvoid main() {\n\tvec3 direction = normalize( vWorldPosition );\n\tvec2 sampleUV;\n\tsampleUV.y = asin( clamp( direction.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\tsampleUV.x = atan( direction.z, direction.x ) * RECIPROCAL_PI2 + 0.5;\n\tgl_FragColor = texture2D( tEquirect, sampleUV );\n}\n",equirect_vert:"varying vec3 vWorldPosition;\n#include <common>\nvoid main() {\n\tvWorldPosition = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n}\n",linedashed_frag:"uniform vec3 diffuse;\nuniform float opacity;\nuniform float dashSize;\nuniform float totalSize;\nvarying float vLineDistance;\n#include <common>\n#include <color_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\n\t\tdiscard;\n\t}\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <color_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <premultiplied_alpha_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}\n",linedashed_vert:"uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;\n#include <common>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <color_vertex>\n\tvLineDistance = scale * lineDistance;\n\tvec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );\n\tgl_Position = projectionMatrix * mvPosition;\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n}\n",meshbasic_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <envmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\t#ifdef USE_LIGHTMAP\n\t\treflectedLight.indirectDiffuse += texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\n\t#else\n\t\treflectedLight.indirectDiffuse += vec3( 1.0 );\n\t#endif\n\t#include <aomap_fragment>\n\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\n\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\n\t#include <envmap_fragment>\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <premultiplied_alpha_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}\n",meshbasic_vert:"#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_ENVMAP\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <worldpos_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <envmap_vertex>\n\t#include <fog_vertex>\n}\n",meshlambert_frag:"uniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\nvarying vec3 vLightFront;\n#ifdef DOUBLE_SIDED\n\tvarying vec3 vLightBack;\n#endif\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <lights_pars_maps>\n#include <fog_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <shadowmask_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\t#include <emissivemap_fragment>\n\treflectedLight.indirectDiffuse = getAmbientLightIrradiance( ambientLightColor );\n\t#include <lightmap_fragment>\n\treflectedLight.indirectDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb );\n\t#ifdef DOUBLE_SIDED\n\t\treflectedLight.directDiffuse = ( gl_FrontFacing ) ? vLightFront : vLightBack;\n\t#else\n\t\treflectedLight.directDiffuse = vLightFront;\n\t#endif\n\treflectedLight.directDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb ) * getShadowMask();\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}\n",meshlambert_vert:"#define LAMBERT\nvarying vec3 vLightFront;\n#ifdef DOUBLE_SIDED\n\tvarying vec3 vLightBack;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <envmap_pars_vertex>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <lights_pars_maps>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <lights_lambert_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}\n",meshphong_frag:"#define PHONG\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_pars_fragment>\n#include <gradientmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <lights_pars_maps>\n#include <lights_phong_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_phong_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}\n",meshphong_vert:"#define PHONG\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}\n",meshphysical_frag:"#define PHYSICAL\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifndef STANDARD\n\tuniform float clearCoat;\n\tuniform float clearCoatRoughness;\n#endif\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <cube_uv_reflection_fragment>\n#include <lights_pars_begin>\n#include <lights_pars_maps>\n#include <lights_physical_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <roughnessmap_pars_fragment>\n#include <metalnessmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <roughnessmap_fragment>\n\t#include <metalnessmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_physical_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}\n",meshphysical_vert:"#define PHYSICAL\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}\n",normal_frag:"#define NORMAL\nuniform float opacity;\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP )\n\tvarying vec3 vViewPosition;\n#endif\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <packing>\n#include <uv_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\nvoid main() {\n\t#include <logdepthbuf_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\tgl_FragColor = vec4( packNormalToRGB( normal ), opacity );\n}\n",normal_vert:"#define NORMAL\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP )\n\tvarying vec3 vViewPosition;\n#endif\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n}\n",points_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <color_pars_fragment>\n#include <map_particle_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_particle_fragment>\n\t#include <color_fragment>\n\t#include <alphatest_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <premultiplied_alpha_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}\n",points_vert:"uniform float size;\nuniform float scale;\n#include <common>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <color_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <project_vertex>\n\t#ifdef USE_SIZEATTENUATION\n\t\tgl_PointSize = size * ( scale / - mvPosition.z );\n\t#else\n\t\tgl_PointSize = size;\n\t#endif\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <fog_vertex>\n}\n",shadow_frag:"uniform vec3 color;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <shadowmap_pars_fragment>\n#include <shadowmask_pars_fragment>\nvoid main() {\n\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n\t#include <fog_fragment>\n}\n",shadow_vert:"#include <fog_pars_vertex>\n#include <shadowmap_pars_vertex>\nvoid main() {\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}\n"},F={merge:function(t){for(var e={},i=0;i<t.length;i++){var n=this.clone(t[i]);for(var r in n)e[r]=n[r]}return e},clone:function(t){var e={};for(var i in t)for(var n in e[i]={},t[i]){var r=t[i][n];r&&(r.isColor||r.isMatrix3||r.isMatrix4||r.isVector2||r.isVector3||r.isVector4||r.isTexture)?e[i][n]=r.clone():Array.isArray(r)?e[i][n]=r.slice():e[i][n]=r}return e}},G={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function H(t,e,i){return void 0===e&&void 0===i?this.set(t):this.setRGB(t,e,i)}Object.assign(H.prototype,{isColor:!0,r:1,g:1,b:1,set:function(t){return t&&t.isColor?this.copy(t):"number"==typeof t?this.setHex(t):"string"==typeof t&&this.setStyle(t),this},setScalar:function(t){return this.r=t,this.g=t,this.b=t,this},setHex:function(t){return t=Math.floor(t),this.r=(t>>16&255)/255,this.g=(t>>8&255)/255,this.b=(255&t)/255,this},setRGB:function(t,e,i){return this.r=t,this.g=e,this.b=i,this},setHSL:function(){function t(t,e,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?t+6*(e-t)*i:i<.5?e:i<2/3?t+6*(e-t)*(2/3-i):t}return function(e,i,n){if(e=g.euclideanModulo(e,1),i=g.clamp(i,0,1),n=g.clamp(n,0,1),0===i)this.r=this.g=this.b=n;else{var r=n<=.5?n*(1+i):n+i-n*i,a=2*n-r;this.r=t(a,r,e+1/3),this.g=t(a,r,e),this.b=t(a,r,e-1/3)}return this}}(),setStyle:function(t){function e(e){void 0!==e&&parseFloat(e)<1&&console.warn("THREE.Color: Alpha component of "+t+" will be ignored.")}var i;if(i=/^((?:rgb|hsl)a?)\(\s*([^\)]*)\)/.exec(t)){var n,r=i[1],a=i[2];switch(r){case"rgb":case"rgba":if(n=/^(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(a))return this.r=Math.min(255,parseInt(n[1],10))/255,this.g=Math.min(255,parseInt(n[2],10))/255,this.b=Math.min(255,parseInt(n[3],10))/255,e(n[5]),this;if(n=/^(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(a))return this.r=Math.min(100,parseInt(n[1],10))/100,this.g=Math.min(100,parseInt(n[2],10))/100,this.b=Math.min(100,parseInt(n[3],10))/100,e(n[5]),this;break;case"hsl":case"hsla":if(n=/^([0-9]*\.?[0-9]+)\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(a)){var o=parseFloat(n[1])/360,s=parseInt(n[2],10)/100,c=parseInt(n[3],10)/100;return e(n[5]),this.setHSL(o,s,c)}}}else if(i=/^\#([A-Fa-f0-9]+)$/.exec(t)){var h,l=(h=i[1]).length;if(3===l)return this.r=parseInt(h.charAt(0)+h.charAt(0),16)/255,this.g=parseInt(h.charAt(1)+h.charAt(1),16)/255,this.b=parseInt(h.charAt(2)+h.charAt(2),16)/255,this;if(6===l)return this.r=parseInt(h.charAt(0)+h.charAt(1),16)/255,this.g=parseInt(h.charAt(2)+h.charAt(3),16)/255,this.b=parseInt(h.charAt(4)+h.charAt(5),16)/255,this}t&&t.length>0&&(void 0!==(h=G[t])?this.setHex(h):console.warn("THREE.Color: Unknown color "+t));return this},clone:function(){return new this.constructor(this.r,this.g,this.b)},copy:function(t){return this.r=t.r,this.g=t.g,this.b=t.b,this},copyGammaToLinear:function(t,e){return void 0===e&&(e=2),this.r=Math.pow(t.r,e),this.g=Math.pow(t.g,e),this.b=Math.pow(t.b,e),this},copyLinearToGamma:function(t,e){void 0===e&&(e=2);var i=e>0?1/e:1;return this.r=Math.pow(t.r,i),this.g=Math.pow(t.g,i),this.b=Math.pow(t.b,i),this},convertGammaToLinear:function(t){return this.copyGammaToLinear(this,t),this},convertLinearToGamma:function(t){return this.copyLinearToGamma(this,t),this},getHex:function(){return 255*this.r<<16^255*this.g<<8^255*this.b<<0},getHexString:function(){return("000000"+this.getHex().toString(16)).slice(-6)},getHSL:function(t){void 0===t&&(console.warn("THREE.Color: .getHSL() target is now required"),t={h:0,s:0,l:0});var e,i,n=this.r,r=this.g,a=this.b,o=Math.max(n,r,a),s=Math.min(n,r,a),c=(s+o)/2;if(s===o)e=0,i=0;else{var h=o-s;switch(i=c<=.5?h/(o+s):h/(2-o-s),o){case n:e=(r-a)/h+(r<a?6:0);break;case r:e=(a-n)/h+2;break;case a:e=(n-r)/h+4}e/=6}return t.h=e,t.s=i,t.l=c,t},getStyle:function(){return"rgb("+(255*this.r|0)+","+(255*this.g|0)+","+(255*this.b|0)+")"},offsetHSL:(z={},function(t,e,i){return this.getHSL(z),z.h+=t,z.s+=e,z.l+=i,this.setHSL(z.h,z.s,z.l),this}),add:function(t){return this.r+=t.r,this.g+=t.g,this.b+=t.b,this},addColors:function(t,e){return this.r=t.r+e.r,this.g=t.g+e.g,this.b=t.b+e.b,this},addScalar:function(t){return this.r+=t,this.g+=t,this.b+=t,this},sub:function(t){return this.r=Math.max(0,this.r-t.r),this.g=Math.max(0,this.g-t.g),this.b=Math.max(0,this.b-t.b),this},multiply:function(t){return this.r*=t.r,this.g*=t.g,this.b*=t.b,this},multiplyScalar:function(t){return this.r*=t,this.g*=t,this.b*=t,this},lerp:function(t,e){return this.r+=(t.r-this.r)*e,this.g+=(t.g-this.g)*e,this.b+=(t.b-this.b)*e,this},equals:function(t){return t.r===this.r&&t.g===this.g&&t.b===this.b},fromArray:function(t,e){return void 0===e&&(e=0),this.r=t[e],this.g=t[e+1],this.b=t[e+2],this},toArray:function(t,e){return void 0===t&&(t=[]),void 0===e&&(e=0),t[e]=this.r,t[e+1]=this.g,t[e+2]=this.b,t},toJSON:function(){return this.getHex()}});var k,V={common:{diffuse:{value:new H(15658734)},opacity:{value:1},map:{value:null},uvTransform:{value:new b},alphaMap:{value:null}},specularmap:{specularMap:{value:null}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},refractionRatio:{value:.98},maxMipLevel:{value:0}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1}},emissivemap:{emissiveMap:{value:null}},bumpmap:{bumpMap:{value:null},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalScale:{value:new v(1,1)}},displacementmap:{displacementMap:{value:null},displacementScale:{value:1},displacementBias:{value:0}},roughnessmap:{roughnessMap:{value:null}},metalnessmap:{metalnessMap:{value:null}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new H(16777215)}},lights:{ambientLightColor:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{}}},spotShadowMap:{value:[]},spotShadowMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}}},points:{diffuse:{value:new H(15658734)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},uvTransform:{value:new b}}},j={basic:{uniforms:F.merge([V.common,V.specularmap,V.envmap,V.aomap,V.lightmap,V.fog]),vertexShader:B.meshbasic_vert,fragmentShader:B.meshbasic_frag},lambert:{uniforms:F.merge([V.common,V.specularmap,V.envmap,V.aomap,V.lightmap,V.emissivemap,V.fog,V.lights,{emissive:{value:new H(0)}}]),vertexShader:B.meshlambert_vert,fragmentShader:B.meshlambert_frag},phong:{uniforms:F.merge([V.common,V.specularmap,V.envmap,V.aomap,V.lightmap,V.emissivemap,V.bumpmap,V.normalmap,V.displacementmap,V.gradientmap,V.fog,V.lights,{emissive:{value:new H(0)},specular:{value:new H(1118481)},shininess:{value:30}}]),vertexShader:B.meshphong_vert,fragmentShader:B.meshphong_frag},standard:{uniforms:F.merge([V.common,V.envmap,V.aomap,V.lightmap,V.emissivemap,V.bumpmap,V.normalmap,V.displacementmap,V.roughnessmap,V.metalnessmap,V.fog,V.lights,{emissive:{value:new H(0)},roughness:{value:.5},metalness:{value:.5},envMapIntensity:{value:1}}]),vertexShader:B.meshphysical_vert,fragmentShader:B.meshphysical_frag},points:{uniforms:F.merge([V.points,V.fog]),vertexShader:B.points_vert,fragmentShader:B.points_frag},dashed:{uniforms:F.merge([V.common,V.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:B.linedashed_vert,fragmentShader:B.linedashed_frag},depth:{uniforms:F.merge([V.common,V.displacementmap]),vertexShader:B.depth_vert,fragmentShader:B.depth_frag},normal:{uniforms:F.merge([V.common,V.bumpmap,V.normalmap,V.displacementmap,{opacity:{value:1}}]),vertexShader:B.normal_vert,fragmentShader:B.normal_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:B.cube_vert,fragmentShader:B.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:B.equirect_vert,fragmentShader:B.equirect_frag},distanceRGBA:{uniforms:F.merge([V.common,V.displacementmap,{referencePosition:{value:new _},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:B.distanceRGBA_vert,fragmentShader:B.distanceRGBA_frag},shadow:{uniforms:F.merge([V.lights,V.fog,{color:{value:new H(0)},opacity:{value:1}}]),vertexShader:B.shadow_vert,fragmentShader:B.shadow_frag}};function W(){var t=null,e=!1,i=null;function n(r,a){!1!==e&&(i(r,a),t.requestAnimationFrame(n))}return{start:function(){!0!==e&&null!==i&&(t.requestAnimationFrame(n),e=!0)},stop:function(){e=!1},setAnimationLoop:function(t){i=t},setContext:function(e){t=e}}}function X(t){var e=new WeakMap;return{get:function(t){return t.isInterleavedBufferAttribute&&(t=t.data),e.get(t)},remove:function(i){i.isInterleavedBufferAttribute&&(i=i.data);var n=e.get(i);n&&(t.deleteBuffer(n.buffer),e.delete(i))},update:function(i,n){i.isInterleavedBufferAttribute&&(i=i.data);var r=e.get(i);void 0===r?e.set(i,function(e,i){var n=e.array,r=e.dynamic?t.DYNAMIC_DRAW:t.STATIC_DRAW,a=t.createBuffer();t.bindBuffer(i,a),t.bufferData(i,n,r),e.onUploadCallback();var o=t.FLOAT;return n instanceof Float32Array?o=t.FLOAT:n instanceof Float64Array?console.warn("THREE.WebGLAttributes: Unsupported data buffer format: Float64Array."):n instanceof Uint16Array?o=t.UNSIGNED_SHORT:n instanceof Int16Array?o=t.SHORT:n instanceof Uint32Array?o=t.UNSIGNED_INT:n instanceof Int32Array?o=t.INT:n instanceof Int8Array?o=t.BYTE:n instanceof Uint8Array&&(o=t.UNSIGNED_BYTE),{buffer:a,type:o,bytesPerElement:n.BYTES_PER_ELEMENT,version:e.version}}(i,n)):r.version<i.version&&(!function(e,i,n){var r=i.array,a=i.updateRange;t.bindBuffer(n,e),!1===i.dynamic?t.bufferData(n,r,t.STATIC_DRAW):-1===a.count?t.bufferSubData(n,0,r):0===a.count?console.error("THREE.WebGLObjects.updateBuffer: dynamic THREE.BufferAttribute marked as needsUpdate but updateRange.count is 0, ensure you are using set methods or updating manually."):(t.bufferSubData(n,a.offset*r.BYTES_PER_ELEMENT,r.subarray(a.offset,a.offset+a.count)),a.count=-1)}(r.buffer,i,n),r.version=i.version)}}}function q(t,e,i,n){this._x=t||0,this._y=e||0,this._z=i||0,this._order=n||q.DefaultOrder}function Y(){this.mask=1}j.physical={uniforms:F.merge([j.standard.uniforms,{clearCoat:{value:0},clearCoatRoughness:{value:0}}]),vertexShader:B.meshphysical_vert,fragmentShader:B.meshphysical_frag},q.RotationOrders=["XYZ","YZX","ZXY","XZY","YXZ","ZYX"],q.DefaultOrder="XYZ",Object.defineProperties(q.prototype,{x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback()}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback()}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback()}},order:{get:function(){return this._order},set:function(t){this._order=t,this.onChangeCallback()}}}),Object.assign(q.prototype,{isEuler:!0,set:function(t,e,i,n){return this._x=t,this._y=e,this._z=i,this._order=n||this._order,this.onChangeCallback(),this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._order)},copy:function(t){return this._x=t._x,this._y=t._y,this._z=t._z,this._order=t._order,this.onChangeCallback(),this},setFromRotationMatrix:function(t,e,i){var n=g.clamp,r=t.elements,a=r[0],o=r[4],s=r[8],c=r[1],h=r[5],l=r[9],u=r[2],p=r[6],d=r[10];return"XYZ"===(e=e||this._order)?(this._y=Math.asin(n(s,-1,1)),Math.abs(s)<.99999?(this._x=Math.atan2(-l,d),this._z=Math.atan2(-o,a)):(this._x=Math.atan2(p,h),this._z=0)):"YXZ"===e?(this._x=Math.asin(-n(l,-1,1)),Math.abs(l)<.99999?(this._y=Math.atan2(s,d),this._z=Math.atan2(c,h)):(this._y=Math.atan2(-u,a),this._z=0)):"ZXY"===e?(this._x=Math.asin(n(p,-1,1)),Math.abs(p)<.99999?(this._y=Math.atan2(-u,d),this._z=Math.atan2(-o,h)):(this._y=0,this._z=Math.atan2(c,a))):"ZYX"===e?(this._y=Math.asin(-n(u,-1,1)),Math.abs(u)<.99999?(this._x=Math.atan2(p,d),this._z=Math.atan2(c,a)):(this._x=0,this._z=Math.atan2(-o,h))):"YZX"===e?(this._z=Math.asin(n(c,-1,1)),Math.abs(c)<.99999?(this._x=Math.atan2(-l,h),this._y=Math.atan2(-u,a)):(this._x=0,this._y=Math.atan2(s,d))):"XZY"===e?(this._z=Math.asin(-n(o,-1,1)),Math.abs(o)<.99999?(this._x=Math.atan2(p,h),this._y=Math.atan2(s,a)):(this._x=Math.atan2(-l,d),this._y=0)):console.warn("THREE.Euler: .setFromRotationMatrix() given unsupported order: "+e),this._order=e,!1!==i&&this.onChangeCallback(),this},setFromQuaternion:function(){var t=new y;return function(e,i,n){return t.makeRotationFromQuaternion(e),this.setFromRotationMatrix(t,i,n)}}(),setFromVector3:function(t,e){return this.set(t.x,t.y,t.z,e||this._order)},reorder:(k=new x,function(t){return k.setFromEuler(this),this.setFromQuaternion(k,t)}),equals:function(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._order===this._order},fromArray:function(t){return this._x=t[0],this._y=t[1],this._z=t[2],void 0!==t[3]&&(this._order=t[3]),this.onChangeCallback(),this},toArray:function(t,e){return void 0===t&&(t=[]),void 0===e&&(e=0),t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._order,t},toVector3:function(t){return t?t.set(this._x,this._y,this._z):new _(this._x,this._y,this._z)},onChange:function(t){return this.onChangeCallback=t,this},onChangeCallback:function(){}}),Object.assign(Y.prototype,{set:function(t){this.mask=1<<t|0},enable:function(t){this.mask|=1<<t|0},toggle:function(t){this.mask^=1<<t|0},disable:function(t){this.mask&=~(1<<t|0)},test:function(t){return 0!=(this.mask&t.mask)}});var Z,J,Q,K,$=0;function tt(){Object.defineProperty(this,"id",{value:$++}),this.uuid=g.generateUUID(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=tt.DefaultUp.clone();var t=new _,e=new q,i=new x,n=new _(1,1,1);e.onChange((function(){i.setFromEuler(e,!1)})),i.onChange((function(){e.setFromQuaternion(i,void 0,!1)})),Object.defineProperties(this,{position:{enumerable:!0,value:t},rotation:{enumerable:!0,value:e},quaternion:{enumerable:!0,value:i},scale:{enumerable:!0,value:n},modelViewMatrix:{value:new y},normalMatrix:{value:new b}}),this.matrix=new y,this.matrixWorld=new y,this.matrixAutoUpdate=tt.DefaultMatrixAutoUpdate,this.matrixWorldNeedsUpdate=!1,this.layers=new Y,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.userData={}}function et(){tt.call(this),this.type="Camera",this.matrixWorldInverse=new y,this.projectionMatrix=new y}function it(t,e,i,n,r,a){et.call(this),this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=t,this.right=e,this.top=i,this.bottom=n,this.near=void 0!==r?r:.1,this.far=void 0!==a?a:2e3,this.updateProjectionMatrix()}function nt(t,e,i,n,r,a){this.a=t,this.b=e,this.c=i,this.normal=n&&n.isVector3?n:new _,this.vertexNormals=Array.isArray(n)?n:[],this.color=r&&r.isColor?r:new H,this.vertexColors=Array.isArray(r)?r:[],this.materialIndex=void 0!==a?a:0}tt.DefaultUp=new _(0,1,0),tt.DefaultMatrixAutoUpdate=!0,tt.prototype=Object.assign(Object.create(r.prototype),{constructor:tt,isObject3D:!0,onBeforeRender:function(){},onAfterRender:function(){},applyMatrix:function(t){this.matrix.multiplyMatrices(t,this.matrix),this.matrix.decompose(this.position,this.quaternion,this.scale)},applyQuaternion:function(t){return this.quaternion.premultiply(t),this},setRotationFromAxisAngle:function(t,e){this.quaternion.setFromAxisAngle(t,e)},setRotationFromEuler:function(t){this.quaternion.setFromEuler(t,!0)},setRotationFromMatrix:function(t){this.quaternion.setFromRotationMatrix(t)},setRotationFromQuaternion:function(t){this.quaternion.copy(t)},rotateOnAxis:(K=new x,function(t,e){return K.setFromAxisAngle(t,e),this.quaternion.multiply(K),this}),rotateOnWorldAxis:function(){var t=new x;return function(e,i){return t.setFromAxisAngle(e,i),this.quaternion.premultiply(t),this}}(),rotateX:function(){var t=new _(1,0,0);return function(e){return this.rotateOnAxis(t,e)}}(),rotateY:function(){var t=new _(0,1,0);return function(e){return this.rotateOnAxis(t,e)}}(),rotateZ:function(){var t=new _(0,0,1);return function(e){return this.rotateOnAxis(t,e)}}(),translateOnAxis:function(){var t=new _;return function(e,i){return t.copy(e).applyQuaternion(this.quaternion),this.position.add(t.multiplyScalar(i)),this}}(),translateX:function(){var t=new _(1,0,0);return function(e){return this.translateOnAxis(t,e)}}(),translateY:function(){var t=new _(0,1,0);return function(e){return this.translateOnAxis(t,e)}}(),translateZ:function(){var t=new _(0,0,1);return function(e){return this.translateOnAxis(t,e)}}(),localToWorld:function(t){return t.applyMatrix4(this.matrixWorld)},worldToLocal:(Q=new y,function(t){return t.applyMatrix4(Q.getInverse(this.matrixWorld))}),lookAt:function(){var t=new y,e=new _;return function(i,n,r){i.isVector3?e.copy(i):e.set(i,n,r),this.isCamera?t.lookAt(this.position,e,this.up):t.lookAt(e,this.position,this.up),this.quaternion.setFromRotationMatrix(t)}}(),add:function(t){if(arguments.length>1){for(var e=0;e<arguments.length;e++)this.add(arguments[e]);return this}return t===this?(console.error("THREE.Object3D.add: object can't be added as a child of itself.",t),this):(t&&t.isObject3D?(null!==t.parent&&t.parent.remove(t),t.parent=this,t.dispatchEvent({type:"added"}),this.children.push(t)):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",t),this)},remove:function(t){if(arguments.length>1){for(var e=0;e<arguments.length;e++)this.remove(arguments[e]);return this}var i=this.children.indexOf(t);return-1!==i&&(t.parent=null,t.dispatchEvent({type:"removed"}),this.children.splice(i,1)),this},getObjectById:function(t){return this.getObjectByProperty("id",t)},getObjectByName:function(t){return this.getObjectByProperty("name",t)},getObjectByProperty:function(t,e){if(this[t]===e)return this;for(var i=0,n=this.children.length;i<n;i++){var r=this.children[i].getObjectByProperty(t,e);if(void 0!==r)return r}},getWorldPosition:function(t){return void 0===t&&(console.warn("THREE.Object3D: .getWorldPosition() target is now required"),t=new _),this.updateMatrixWorld(!0),t.setFromMatrixPosition(this.matrixWorld)},getWorldQuaternion:(Z=new _,J=new _,function(t){return void 0===t&&(console.warn("THREE.Object3D: .getWorldQuaternion() target is now required"),t=new x),this.updateMatrixWorld(!0),this.matrixWorld.decompose(Z,t,J),t}),getWorldScale:function(){var t=new _,e=new x;return function(i){return void 0===i&&(console.warn("THREE.Object3D: .getWorldScale() target is now required"),i=new _),this.updateMatrixWorld(!0),this.matrixWorld.decompose(t,e,i),i}}(),getWorldDirection:function(){var t=new x;return function(e){return void 0===e&&(console.warn("THREE.Object3D: .getWorldDirection() target is now required"),e=new _),this.getWorldQuaternion(t),e.set(0,0,1).applyQuaternion(t)}}(),raycast:function(){},traverse:function(t){t(this);for(var e=this.children,i=0,n=e.length;i<n;i++)e[i].traverse(t)},traverseVisible:function(t){if(!1!==this.visible){t(this);for(var e=this.children,i=0,n=e.length;i<n;i++)e[i].traverseVisible(t)}},traverseAncestors:function(t){var e=this.parent;null!==e&&(t(e),e.traverseAncestors(t))},updateMatrix:function(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0},updateMatrixWorld:function(t){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||t)&&(null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorldNeedsUpdate=!1,t=!0);for(var e=this.children,i=0,n=e.length;i<n;i++)e[i].updateMatrixWorld(t)},toJSON:function(t){var e=void 0===t||"string"==typeof t,i={};e&&(t={geometries:{},materials:{},textures:{},images:{},shapes:{}},i.metadata={version:4.5,type:"Object",generator:"Object3D.toJSON"});var n={};function r(e,i){return void 0===e[i.uuid]&&(e[i.uuid]=i.toJSON(t)),i.uuid}if(n.uuid=this.uuid,n.type=this.type,""!==this.name&&(n.name=this.name),!0===this.castShadow&&(n.castShadow=!0),!0===this.receiveShadow&&(n.receiveShadow=!0),!1===this.visible&&(n.visible=!1),!1===this.frustumCulled&&(n.frustumCulled=!1),0!==this.renderOrder&&(n.renderOrder=this.renderOrder),"{}"!==JSON.stringify(this.userData)&&(n.userData=this.userData),n.matrix=this.matrix.toArray(),!1===this.matrixAutoUpdate&&(n.matrixAutoUpdate=!1),void 0!==this.geometry){n.geometry=r(t.geometries,this.geometry);var a=this.geometry.parameters;if(void 0!==a&&void 0!==a.shapes){var o=a.shapes;if(Array.isArray(o))for(var s=0,c=o.length;s<c;s++){var h=o[s];r(t.shapes,h)}else r(t.shapes,o)}}if(void 0!==this.material)if(Array.isArray(this.material)){var l=[];for(s=0,c=this.material.length;s<c;s++)l.push(r(t.materials,this.material[s]));n.material=l}else n.material=r(t.materials,this.material);if(this.children.length>0){n.children=[];for(s=0;s<this.children.length;s++)n.children.push(this.children[s].toJSON(t).object)}if(e){var u=m(t.geometries),p=m(t.materials),d=m(t.textures),f=m(t.images);o=m(t.shapes);u.length>0&&(i.geometries=u),p.length>0&&(i.materials=p),d.length>0&&(i.textures=d),f.length>0&&(i.images=f),o.length>0&&(i.shapes=o)}return i.object=n,i;function m(t){var e=[];for(var i in t){var n=t[i];delete n.metadata,e.push(n)}return e}},clone:function(t){return(new this.constructor).copy(this,t)},copy:function(t,e){if(void 0===e&&(e=!0),this.name=t.name,this.up.copy(t.up),this.position.copy(t.position),this.quaternion.copy(t.quaternion),this.scale.copy(t.scale),this.matrix.copy(t.matrix),this.matrixWorld.copy(t.matrixWorld),this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrixWorldNeedsUpdate=t.matrixWorldNeedsUpdate,this.layers.mask=t.layers.mask,this.visible=t.visible,this.castShadow=t.castShadow,this.receiveShadow=t.receiveShadow,this.frustumCulled=t.frustumCulled,this.renderOrder=t.renderOrder,this.userData=JSON.parse(JSON.stringify(t.userData)),!0===e)for(var i=0;i<t.children.length;i++){var n=t.children[i];this.add(n.clone())}return this}}),et.prototype=Object.assign(Object.create(tt.prototype),{constructor:et,isCamera:!0,copy:function(t,e){return tt.prototype.copy.call(this,t,e),this.matrixWorldInverse.copy(t.matrixWorldInverse),this.projectionMatrix.copy(t.projectionMatrix),this},getWorldDirection:function(){var t=new x;return function(e){return void 0===e&&(console.warn("THREE.Camera: .getWorldDirection() target is now required"),e=new _),this.getWorldQuaternion(t),e.set(0,0,-1).applyQuaternion(t)}}(),updateMatrixWorld:function(t){tt.prototype.updateMatrixWorld.call(this,t),this.matrixWorldInverse.getInverse(this.matrixWorld)},clone:function(){return(new this.constructor).copy(this)}}),it.prototype=Object.assign(Object.create(et.prototype),{constructor:it,isOrthographicCamera:!0,copy:function(t,e){return et.prototype.copy.call(this,t,e),this.left=t.left,this.right=t.right,this.top=t.top,this.bottom=t.bottom,this.near=t.near,this.far=t.far,this.zoom=t.zoom,this.view=null===t.view?null:Object.assign({},t.view),this},setViewOffset:function(t,e,i,n,r,a){null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=e,this.view.offsetX=i,this.view.offsetY=n,this.view.width=r,this.view.height=a,this.updateProjectionMatrix()},clearViewOffset:function(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()},updateProjectionMatrix:function(){var t=(this.right-this.left)/(2*this.zoom),e=(this.top-this.bottom)/(2*this.zoom),i=(this.right+this.left)/2,n=(this.top+this.bottom)/2,r=i-t,a=i+t,o=n+e,s=n-e;if(null!==this.view&&this.view.enabled){var c=this.zoom/(this.view.width/this.view.fullWidth),h=this.zoom/(this.view.height/this.view.fullHeight),l=(this.right-this.left)/this.view.width,u=(this.top-this.bottom)/this.view.height;a=(r+=l*(this.view.offsetX/c))+l*(this.view.width/c),s=(o-=u*(this.view.offsetY/h))-u*(this.view.height/h)}this.projectionMatrix.makeOrthographic(r,a,o,s,this.near,this.far)},toJSON:function(t){var e=tt.prototype.toJSON.call(this,t);return e.object.zoom=this.zoom,e.object.left=this.left,e.object.right=this.right,e.object.top=this.top,e.object.bottom=this.bottom,e.object.near=this.near,e.object.far=this.far,null!==this.view&&(e.object.view=Object.assign({},this.view)),e}}),Object.assign(nt.prototype,{clone:function(){return(new this.constructor).copy(this)},copy:function(t){this.a=t.a,this.b=t.b,this.c=t.c,this.normal.copy(t.normal),this.color.copy(t.color),this.materialIndex=t.materialIndex;for(var e=0,i=t.vertexNormals.length;e<i;e++)this.vertexNormals[e]=t.vertexNormals[e].clone();for(e=0,i=t.vertexColors.length;e<i;e++)this.vertexColors[e]=t.vertexColors[e].clone();return this}});var rt,at,ot=0;function st(){Object.defineProperty(this,"id",{value:ot+=2}),this.uuid=g.generateUUID(),this.name="",this.type="Geometry",this.vertices=[],this.colors=[],this.faces=[],this.faceVertexUvs=[[]],this.morphTargets=[],this.morphNormals=[],this.skinWeights=[],this.skinIndices=[],this.lineDistances=[],this.boundingBox=null,this.boundingSphere=null,this.elementsNeedUpdate=!1,this.verticesNeedUpdate=!1,this.uvsNeedUpdate=!1,this.normalsNeedUpdate=!1,this.colorsNeedUpdate=!1,this.lineDistancesNeedUpdate=!1,this.groupsNeedUpdate=!1}function ct(t,e,i){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.name="",this.array=t,this.itemSize=e,this.count=void 0!==t?t.length/e:0,this.normalized=!0===i,this.dynamic=!1,this.updateRange={offset:0,count:-1},this.version=0}function ht(t,e,i){ct.call(this,new Int8Array(t),e,i)}function lt(t,e,i){ct.call(this,new Uint8Array(t),e,i)}function ut(t,e,i){ct.call(this,new Uint8ClampedArray(t),e,i)}function pt(t,e,i){ct.call(this,new Int16Array(t),e,i)}function dt(t,e,i){ct.call(this,new Uint16Array(t),e,i)}function ft(t,e,i){ct.call(this,new Int32Array(t),e,i)}function mt(t,e,i){ct.call(this,new Uint32Array(t),e,i)}function gt(t,e,i){ct.call(this,new Float32Array(t),e,i)}function vt(t,e,i){ct.call(this,new Float64Array(t),e,i)}function yt(){this.vertices=[],this.normals=[],this.colors=[],this.uvs=[],this.uvs2=[],this.groups=[],this.morphTargets={},this.skinWeights=[],this.skinIndices=[],this.boundingBox=null,this.boundingSphere=null,this.verticesNeedUpdate=!1,this.normalsNeedUpdate=!1,this.colorsNeedUpdate=!1,this.uvsNeedUpdate=!1,this.groupsNeedUpdate=!1}function xt(t){if(0===t.length)return-1/0;for(var e=t[0],i=1,n=t.length;i<n;++i)t[i]>e&&(e=t[i]);return e}st.prototype=Object.assign(Object.create(r.prototype),{constructor:st,isGeometry:!0,applyMatrix:function(t){for(var e=(new b).getNormalMatrix(t),i=0,n=this.vertices.length;i<n;i++){this.vertices[i].applyMatrix4(t)}for(i=0,n=this.faces.length;i<n;i++){var r=this.faces[i];r.normal.applyMatrix3(e).normalize();for(var a=0,o=r.vertexNormals.length;a<o;a++)r.vertexNormals[a].applyMatrix3(e).normalize()}return null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this.verticesNeedUpdate=!0,this.normalsNeedUpdate=!0,this},rotateX:function(){var t=new y;return function(e){return t.makeRotationX(e),this.applyMatrix(t),this}}(),rotateY:function(){var t=new y;return function(e){return t.makeRotationY(e),this.applyMatrix(t),this}}(),rotateZ:function(){var t=new y;return function(e){return t.makeRotationZ(e),this.applyMatrix(t),this}}(),translate:function(){var t=new y;return function(e,i,n){return t.makeTranslation(e,i,n),this.applyMatrix(t),this}}(),scale:function(){var t=new y;return function(e,i,n){return t.makeScale(e,i,n),this.applyMatrix(t),this}}(),lookAt:(at=new tt,function(t){at.lookAt(t),at.updateMatrix(),this.applyMatrix(at.matrix)}),fromBufferGeometry:function(t){var e=this,i=null!==t.index?t.index.array:void 0,n=t.attributes,r=n.position.array,a=void 0!==n.normal?n.normal.array:void 0,o=void 0!==n.color?n.color.array:void 0,s=void 0!==n.uv?n.uv.array:void 0,c=void 0!==n.uv2?n.uv2.array:void 0;void 0!==c&&(this.faceVertexUvs[1]=[]);for(var h=[],l=[],u=[],p=0,d=0;p<r.length;p+=3,d+=2)e.vertices.push(new _(r[p],r[p+1],r[p+2])),void 0!==a&&h.push(new _(a[p],a[p+1],a[p+2])),void 0!==o&&e.colors.push(new H(o[p],o[p+1],o[p+2])),void 0!==s&&l.push(new v(s[d],s[d+1])),void 0!==c&&u.push(new v(c[d],c[d+1]));function f(t,i,n,r){var p=new nt(t,i,n,void 0!==a?[h[t].clone(),h[i].clone(),h[n].clone()]:[],void 0!==o?[e.colors[t].clone(),e.colors[i].clone(),e.colors[n].clone()]:[],r);e.faces.push(p),void 0!==s&&e.faceVertexUvs[0].push([l[t].clone(),l[i].clone(),l[n].clone()]),void 0!==c&&e.faceVertexUvs[1].push([u[t].clone(),u[i].clone(),u[n].clone()])}var m=t.groups;if(m.length>0)for(p=0;p<m.length;p++)for(var g=m[p],y=g.start,x=(d=y,y+g.count);d<x;d+=3)void 0!==i?f(i[d],i[d+1],i[d+2],g.materialIndex):f(d,d+1,d+2,g.materialIndex);else if(void 0!==i)for(p=0;p<i.length;p+=3)f(i[p],i[p+1],i[p+2]);else for(p=0;p<r.length/3;p+=3)f(p,p+1,p+2);return this.computeFaceNormals(),null!==t.boundingBox&&(this.boundingBox=t.boundingBox.clone()),null!==t.boundingSphere&&(this.boundingSphere=t.boundingSphere.clone()),this},center:(rt=new _,function(){return this.computeBoundingBox(),this.boundingBox.getCenter(rt).negate(),this.translate(rt.x,rt.y,rt.z),this}),normalize:function(){this.computeBoundingSphere();var t=this.boundingSphere.center,e=this.boundingSphere.radius,i=0===e?1:1/e,n=new y;return n.set(i,0,0,-i*t.x,0,i,0,-i*t.y,0,0,i,-i*t.z,0,0,0,1),this.applyMatrix(n),this},computeFaceNormals:function(){for(var t=new _,e=new _,i=0,n=this.faces.length;i<n;i++){var r=this.faces[i],a=this.vertices[r.a],o=this.vertices[r.b],s=this.vertices[r.c];t.subVectors(s,o),e.subVectors(a,o),t.cross(e),t.normalize(),r.normal.copy(t)}},computeVertexNormals:function(t){var e,i,n,r,a,o;for(void 0===t&&(t=!0),o=new Array(this.vertices.length),e=0,i=this.vertices.length;e<i;e++)o[e]=new _;if(t){var s,c,h,l=new _,u=new _;for(n=0,r=this.faces.length;n<r;n++)a=this.faces[n],s=this.vertices[a.a],c=this.vertices[a.b],h=this.vertices[a.c],l.subVectors(h,c),u.subVectors(s,c),l.cross(u),o[a.a].add(l),o[a.b].add(l),o[a.c].add(l)}else for(this.computeFaceNormals(),n=0,r=this.faces.length;n<r;n++)o[(a=this.faces[n]).a].add(a.normal),o[a.b].add(a.normal),o[a.c].add(a.normal);for(e=0,i=this.vertices.length;e<i;e++)o[e].normalize();for(n=0,r=this.faces.length;n<r;n++){var p=(a=this.faces[n]).vertexNormals;3===p.length?(p[0].copy(o[a.a]),p[1].copy(o[a.b]),p[2].copy(o[a.c])):(p[0]=o[a.a].clone(),p[1]=o[a.b].clone(),p[2]=o[a.c].clone())}this.faces.length>0&&(this.normalsNeedUpdate=!0)},computeFlatVertexNormals:function(){var t,e,i;for(this.computeFaceNormals(),t=0,e=this.faces.length;t<e;t++){var n=(i=this.faces[t]).vertexNormals;3===n.length?(n[0].copy(i.normal),n[1].copy(i.normal),n[2].copy(i.normal)):(n[0]=i.normal.clone(),n[1]=i.normal.clone(),n[2]=i.normal.clone())}this.faces.length>0&&(this.normalsNeedUpdate=!0)},computeMorphNormals:function(){var t,e,i,n,r;for(i=0,n=this.faces.length;i<n;i++)for((r=this.faces[i]).__originalFaceNormal?r.__originalFaceNormal.copy(r.normal):r.__originalFaceNormal=r.normal.clone(),r.__originalVertexNormals||(r.__originalVertexNormals=[]),t=0,e=r.vertexNormals.length;t<e;t++)r.__originalVertexNormals[t]?r.__originalVertexNormals[t].copy(r.vertexNormals[t]):r.__originalVertexNormals[t]=r.vertexNormals[t].clone();var a=new st;for(a.faces=this.faces,t=0,e=this.morphTargets.length;t<e;t++){if(!this.morphNormals[t]){this.morphNormals[t]={},this.morphNormals[t].faceNormals=[],this.morphNormals[t].vertexNormals=[];var o=this.morphNormals[t].faceNormals,s=this.morphNormals[t].vertexNormals;for(i=0,n=this.faces.length;i<n;i++)c=new _,h={a:new _,b:new _,c:new _},o.push(c),s.push(h)}var c,h,l=this.morphNormals[t];for(a.vertices=this.morphTargets[t].vertices,a.computeFaceNormals(),a.computeVertexNormals(),i=0,n=this.faces.length;i<n;i++)r=this.faces[i],c=l.faceNormals[i],h=l.vertexNormals[i],c.copy(r.normal),h.a.copy(r.vertexNormals[0]),h.b.copy(r.vertexNormals[1]),h.c.copy(r.vertexNormals[2])}for(i=0,n=this.faces.length;i<n;i++)(r=this.faces[i]).normal=r.__originalFaceNormal,r.vertexNormals=r.__originalVertexNormals},computeBoundingBox:function(){null===this.boundingBox&&(this.boundingBox=new I),this.boundingBox.setFromPoints(this.vertices)},computeBoundingSphere:function(){null===this.boundingSphere&&(this.boundingSphere=new N),this.boundingSphere.setFromPoints(this.vertices)},merge:function(t,e,i){if(t&&t.isGeometry){var n,r=this.vertices.length,a=this.vertices,o=t.vertices,s=this.faces,c=t.faces,h=this.faceVertexUvs[0],l=t.faceVertexUvs[0],u=this.colors,p=t.colors;void 0===i&&(i=0),void 0!==e&&(n=(new b).getNormalMatrix(e));for(var d=0,f=o.length;d<f;d++){var m=o[d].clone();void 0!==e&&m.applyMatrix4(e),a.push(m)}for(d=0,f=p.length;d<f;d++)u.push(p[d].clone());for(d=0,f=c.length;d<f;d++){var g,v,y,x=c[d],_=x.vertexNormals,w=x.vertexColors;(g=new nt(x.a+r,x.b+r,x.c+r)).normal.copy(x.normal),void 0!==n&&g.normal.applyMatrix3(n).normalize();for(var M=0,E=_.length;M<E;M++)v=_[M].clone(),void 0!==n&&v.applyMatrix3(n).normalize(),g.vertexNormals.push(v);g.color.copy(x.color);for(M=0,E=w.length;M<E;M++)y=w[M],g.vertexColors.push(y.clone());g.materialIndex=x.materialIndex+i,s.push(g)}for(d=0,f=l.length;d<f;d++){var T=l[d],S=[];if(void 0!==T){for(M=0,E=T.length;M<E;M++)S.push(T[M].clone());h.push(S)}}}else console.error("THREE.Geometry.merge(): geometry not an instance of THREE.Geometry.",t)},mergeMesh:function(t){t&&t.isMesh?(t.matrixAutoUpdate&&t.updateMatrix(),this.merge(t.geometry,t.matrix)):console.error("THREE.Geometry.mergeMesh(): mesh not an instance of THREE.Mesh.",t)},mergeVertices:function(){var t,e,i,n,r,a,o,s,c={},h=[],l=[],u=Math.pow(10,4);for(i=0,n=this.vertices.length;i<n;i++)t=this.vertices[i],void 0===c[e=Math.round(t.x*u)+"_"+Math.round(t.y*u)+"_"+Math.round(t.z*u)]?(c[e]=i,h.push(this.vertices[i]),l[i]=h.length-1):l[i]=l[c[e]];var p=[];for(i=0,n=this.faces.length;i<n;i++){(r=this.faces[i]).a=l[r.a],r.b=l[r.b],r.c=l[r.c],a=[r.a,r.b,r.c];for(var d=0;d<3;d++)if(a[d]===a[(d+1)%3]){p.push(i);break}}for(i=p.length-1;i>=0;i--){var f=p[i];for(this.faces.splice(f,1),o=0,s=this.faceVertexUvs.length;o<s;o++)this.faceVertexUvs[o].splice(f,1)}var m=this.vertices.length-h.length;return this.vertices=h,m},setFromPoints:function(t){this.vertices=[];for(var e=0,i=t.length;e<i;e++){var n=t[e];this.vertices.push(new _(n.x,n.y,n.z||0))}return this},sortFacesByMaterialIndex:function(){for(var t=this.faces,e=t.length,i=0;i<e;i++)t[i]._id=i;t.sort((function(t,e){return t.materialIndex-e.materialIndex}));var n,r,a=this.faceVertexUvs[0],o=this.faceVertexUvs[1];a&&a.length===e&&(n=[]),o&&o.length===e&&(r=[]);for(i=0;i<e;i++){var s=t[i]._id;n&&n.push(a[s]),r&&r.push(o[s])}n&&(this.faceVertexUvs[0]=n),r&&(this.faceVertexUvs[1]=r)},toJSON:function(){var t={metadata:{version:4.5,type:"Geometry",generator:"Geometry.toJSON"}};if(t.uuid=this.uuid,t.type=this.type,""!==this.name&&(t.name=this.name),void 0!==this.parameters){var e=this.parameters;for(var i in e)void 0!==e[i]&&(t[i]=e[i]);return t}for(var n=[],r=0;r<this.vertices.length;r++){var a=this.vertices[r];n.push(a.x,a.y,a.z)}var o=[],s=[],c={},h=[],l={},u=[],p={};for(r=0;r<this.faces.length;r++){var d=this.faces[r],f=void 0!==this.faceVertexUvs[0][r],m=d.normal.length()>0,g=d.vertexNormals.length>0,v=1!==d.color.r||1!==d.color.g||1!==d.color.b,y=d.vertexColors.length>0,x=0;if(x=M(x,0,0),x=M(x,1,!0),x=M(x,2,!1),x=M(x,3,f),x=M(x,4,m),x=M(x,5,g),x=M(x,6,v),x=M(x,7,y),o.push(x),o.push(d.a,d.b,d.c),o.push(d.materialIndex),f){var _=this.faceVertexUvs[0][r];o.push(S(_[0]),S(_[1]),S(_[2]))}if(m&&o.push(E(d.normal)),g){var b=d.vertexNormals;o.push(E(b[0]),E(b[1]),E(b[2]))}if(v&&o.push(T(d.color)),y){var w=d.vertexColors;o.push(T(w[0]),T(w[1]),T(w[2]))}}function M(t,e,i){return i?t|1<<e:t&~(1<<e)}function E(t){var e=t.x.toString()+t.y.toString()+t.z.toString();return void 0!==c[e]||(c[e]=s.length/3,s.push(t.x,t.y,t.z)),c[e]}function T(t){var e=t.r.toString()+t.g.toString()+t.b.toString();return void 0!==l[e]||(l[e]=h.length,h.push(t.getHex())),l[e]}function S(t){var e=t.x.toString()+t.y.toString();return void 0!==p[e]||(p[e]=u.length/2,u.push(t.x,t.y)),p[e]}return t.data={},t.data.vertices=n,t.data.normals=s,h.length>0&&(t.data.colors=h),u.length>0&&(t.data.uvs=[u]),t.data.faces=o,t},clone:function(){return(new st).copy(this)},copy:function(t){var e,i,n,r,a,o;this.vertices=[],this.colors=[],this.faces=[],this.faceVertexUvs=[[]],this.morphTargets=[],this.morphNormals=[],this.skinWeights=[],this.skinIndices=[],this.lineDistances=[],this.boundingBox=null,this.boundingSphere=null,this.name=t.name;var s=t.vertices;for(e=0,i=s.length;e<i;e++)this.vertices.push(s[e].clone());var c=t.colors;for(e=0,i=c.length;e<i;e++)this.colors.push(c[e].clone());var h=t.faces;for(e=0,i=h.length;e<i;e++)this.faces.push(h[e].clone());for(e=0,i=t.faceVertexUvs.length;e<i;e++){var l=t.faceVertexUvs[e];for(void 0===this.faceVertexUvs[e]&&(this.faceVertexUvs[e]=[]),n=0,r=l.length;n<r;n++){var u=l[n],p=[];for(a=0,o=u.length;a<o;a++){var d=u[a];p.push(d.clone())}this.faceVertexUvs[e].push(p)}}var f=t.morphTargets;for(e=0,i=f.length;e<i;e++){var m={};if(m.name=f[e].name,void 0!==f[e].vertices)for(m.vertices=[],n=0,r=f[e].vertices.length;n<r;n++)m.vertices.push(f[e].vertices[n].clone());if(void 0!==f[e].normals)for(m.normals=[],n=0,r=f[e].normals.length;n<r;n++)m.normals.push(f[e].normals[n].clone());this.morphTargets.push(m)}var g=t.morphNormals;for(e=0,i=g.length;e<i;e++){var v={};if(void 0!==g[e].vertexNormals)for(v.vertexNormals=[],n=0,r=g[e].vertexNormals.length;n<r;n++){var y=g[e].vertexNormals[n],x={};x.a=y.a.clone(),x.b=y.b.clone(),x.c=y.c.clone(),v.vertexNormals.push(x)}if(void 0!==g[e].faceNormals)for(v.faceNormals=[],n=0,r=g[e].faceNormals.length;n<r;n++)v.faceNormals.push(g[e].faceNormals[n].clone());this.morphNormals.push(v)}var _=t.skinWeights;for(e=0,i=_.length;e<i;e++)this.skinWeights.push(_[e].clone());var b=t.skinIndices;for(e=0,i=b.length;e<i;e++)this.skinIndices.push(b[e].clone());var w=t.lineDistances;for(e=0,i=w.length;e<i;e++)this.lineDistances.push(w[e]);var M=t.boundingBox;null!==M&&(this.boundingBox=M.clone());var E=t.boundingSphere;return null!==E&&(this.boundingSphere=E.clone()),this.elementsNeedUpdate=t.elementsNeedUpdate,this.verticesNeedUpdate=t.verticesNeedUpdate,this.uvsNeedUpdate=t.uvsNeedUpdate,this.normalsNeedUpdate=t.normalsNeedUpdate,this.colorsNeedUpdate=t.colorsNeedUpdate,this.lineDistancesNeedUpdate=t.lineDistancesNeedUpdate,this.groupsNeedUpdate=t.groupsNeedUpdate,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),Object.defineProperty(ct.prototype,"needsUpdate",{set:function(t){!0===t&&this.version++}}),Object.assign(ct.prototype,{isBufferAttribute:!0,onUploadCallback:function(){},setArray:function(t){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");return this.count=void 0!==t?t.length/this.itemSize:0,this.array=t,this},setDynamic:function(t){return this.dynamic=t,this},copy:function(t){return this.name=t.name,this.array=new t.array.constructor(t.array),this.itemSize=t.itemSize,this.count=t.count,this.normalized=t.normalized,this.dynamic=t.dynamic,this},copyAt:function(t,e,i){t*=this.itemSize,i*=e.itemSize;for(var n=0,r=this.itemSize;n<r;n++)this.array[t+n]=e.array[i+n];return this},copyArray:function(t){return this.array.set(t),this},copyColorsArray:function(t){for(var e=this.array,i=0,n=0,r=t.length;n<r;n++){var a=t[n];void 0===a&&(console.warn("THREE.BufferAttribute.copyColorsArray(): color is undefined",n),a=new H),e[i++]=a.r,e[i++]=a.g,e[i++]=a.b}return this},copyVector2sArray:function(t){for(var e=this.array,i=0,n=0,r=t.length;n<r;n++){var a=t[n];void 0===a&&(console.warn("THREE.BufferAttribute.copyVector2sArray(): vector is undefined",n),a=new v),e[i++]=a.x,e[i++]=a.y}return this},copyVector3sArray:function(t){for(var e=this.array,i=0,n=0,r=t.length;n<r;n++){var a=t[n];void 0===a&&(console.warn("THREE.BufferAttribute.copyVector3sArray(): vector is undefined",n),a=new _),e[i++]=a.x,e[i++]=a.y,e[i++]=a.z}return this},copyVector4sArray:function(t){for(var e=this.array,i=0,n=0,r=t.length;n<r;n++){var a=t[n];void 0===a&&(console.warn("THREE.BufferAttribute.copyVector4sArray(): vector is undefined",n),a=new L),e[i++]=a.x,e[i++]=a.y,e[i++]=a.z,e[i++]=a.w}return this},set:function(t,e){return void 0===e&&(e=0),this.array.set(t,e),this},getX:function(t){return this.array[t*this.itemSize]},setX:function(t,e){return this.array[t*this.itemSize]=e,this},getY:function(t){return this.array[t*this.itemSize+1]},setY:function(t,e){return this.array[t*this.itemSize+1]=e,this},getZ:function(t){return this.array[t*this.itemSize+2]},setZ:function(t,e){return this.array[t*this.itemSize+2]=e,this},getW:function(t){return this.array[t*this.itemSize+3]},setW:function(t,e){return this.array[t*this.itemSize+3]=e,this},setXY:function(t,e,i){return t*=this.itemSize,this.array[t+0]=e,this.array[t+1]=i,this},setXYZ:function(t,e,i,n){return t*=this.itemSize,this.array[t+0]=e,this.array[t+1]=i,this.array[t+2]=n,this},setXYZW:function(t,e,i,n,r){return t*=this.itemSize,this.array[t+0]=e,this.array[t+1]=i,this.array[t+2]=n,this.array[t+3]=r,this},onUpload:function(t){return this.onUploadCallback=t,this},clone:function(){return new this.constructor(this.array,this.itemSize).copy(this)}}),ht.prototype=Object.create(ct.prototype),ht.prototype.constructor=ht,lt.prototype=Object.create(ct.prototype),lt.prototype.constructor=lt,ut.prototype=Object.create(ct.prototype),ut.prototype.constructor=ut,pt.prototype=Object.create(ct.prototype),pt.prototype.constructor=pt,dt.prototype=Object.create(ct.prototype),dt.prototype.constructor=dt,ft.prototype=Object.create(ct.prototype),ft.prototype.constructor=ft,mt.prototype=Object.create(ct.prototype),mt.prototype.constructor=mt,gt.prototype=Object.create(ct.prototype),gt.prototype.constructor=gt,vt.prototype=Object.create(ct.prototype),vt.prototype.constructor=vt,Object.assign(yt.prototype,{computeGroups:function(t){for(var e,i=[],n=void 0,r=t.faces,a=0;a<r.length;a++){var o=r[a];o.materialIndex!==n&&(n=o.materialIndex,void 0!==e&&(e.count=3*a-e.start,i.push(e)),e={start:3*a,materialIndex:n})}void 0!==e&&(e.count=3*a-e.start,i.push(e)),this.groups=i},fromGeometry:function(t){var e,i=t.faces,n=t.vertices,r=t.faceVertexUvs,a=r[0]&&r[0].length>0,o=r[1]&&r[1].length>0,s=t.morphTargets,c=s.length;if(c>0){e=[];for(var h=0;h<c;h++)e[h]=[];this.morphTargets.position=e}var l,u=t.morphNormals,p=u.length;if(p>0){l=[];for(h=0;h<p;h++)l[h]=[];this.morphTargets.normal=l}var d=t.skinIndices,f=t.skinWeights,m=d.length===n.length,g=f.length===n.length;0===i.length&&console.error("THREE.DirectGeometry: Faceless geometries are not supported.");for(h=0;h<i.length;h++){var y=i[h];this.vertices.push(n[y.a],n[y.b],n[y.c]);var x=y.vertexNormals;if(3===x.length)this.normals.push(x[0],x[1],x[2]);else{var _=y.normal;this.normals.push(_,_,_)}var b,w=y.vertexColors;if(3===w.length)this.colors.push(w[0],w[1],w[2]);else{var M=y.color;this.colors.push(M,M,M)}if(!0===a)void 0!==(b=r[0][h])?this.uvs.push(b[0],b[1],b[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv ",h),this.uvs.push(new v,new v,new v));if(!0===o)void 0!==(b=r[1][h])?this.uvs2.push(b[0],b[1],b[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv2 ",h),this.uvs2.push(new v,new v,new v));for(var E=0;E<c;E++){var T=s[E].vertices;e[E].push(T[y.a],T[y.b],T[y.c])}for(E=0;E<p;E++){var S=u[E].vertexNormals[h];l[E].push(S.a,S.b,S.c)}m&&this.skinIndices.push(d[y.a],d[y.b],d[y.c]),g&&this.skinWeights.push(f[y.a],f[y.b],f[y.c])}return this.computeGroups(t),this.verticesNeedUpdate=t.verticesNeedUpdate,this.normalsNeedUpdate=t.normalsNeedUpdate,this.colorsNeedUpdate=t.colorsNeedUpdate,this.uvsNeedUpdate=t.uvsNeedUpdate,this.groupsNeedUpdate=t.groupsNeedUpdate,this}});var _t=1;function bt(){Object.defineProperty(this,"id",{value:_t+=2}),this.uuid=g.generateUUID(),this.name="",this.type="BufferGeometry",this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0},this.userData={}}function wt(t,e,i,n,r,a){st.call(this),this.type="BoxGeometry",this.parameters={width:t,height:e,depth:i,widthSegments:n,heightSegments:r,depthSegments:a},this.fromBufferGeometry(new Mt(t,e,i,n,r,a)),this.mergeVertices()}function Mt(t,e,i,n,r,a){bt.call(this),this.type="BoxBufferGeometry",this.parameters={width:t,height:e,depth:i,widthSegments:n,heightSegments:r,depthSegments:a};var o=this;t=t||1,e=e||1,i=i||1,n=Math.floor(n)||1,r=Math.floor(r)||1,a=Math.floor(a)||1;var s=[],c=[],h=[],l=[],u=0,p=0;function d(t,e,i,n,r,a,d,f,m,g,v){var y,x,b=a/m,w=d/g,M=a/2,E=d/2,T=f/2,S=m+1,A=g+1,R=0,L=0,P=new _;for(x=0;x<A;x++){var C=x*w-E;for(y=0;y<S;y++){var O=y*b-M;P[t]=O*n,P[e]=C*r,P[i]=T,c.push(P.x,P.y,P.z),P[t]=0,P[e]=0,P[i]=f>0?1:-1,h.push(P.x,P.y,P.z),l.push(y/m),l.push(1-x/g),R+=1}}for(x=0;x<g;x++)for(y=0;y<m;y++){var I=u+y+S*x,N=u+y+S*(x+1),D=u+(y+1)+S*(x+1),U=u+(y+1)+S*x;s.push(I,N,U),s.push(N,D,U),L+=6}o.addGroup(p,L,v),p+=L,u+=R}d("z","y","x",-1,-1,i,e,t,a,r,0),d("z","y","x",1,-1,i,e,-t,a,r,1),d("x","z","y",1,1,t,i,e,n,a,2),d("x","z","y",1,-1,t,i,-e,n,a,3),d("x","y","z",1,-1,t,e,i,n,r,4),d("x","y","z",-1,-1,t,e,-i,n,r,5),this.setIndex(s),this.addAttribute("position",new gt(c,3)),this.addAttribute("normal",new gt(h,3)),this.addAttribute("uv",new gt(l,2))}function Et(t,e,i,n){st.call(this),this.type="PlaneGeometry",this.parameters={width:t,height:e,widthSegments:i,heightSegments:n},this.fromBufferGeometry(new Tt(t,e,i,n)),this.mergeVertices()}function Tt(t,e,i,n){bt.call(this),this.type="PlaneBufferGeometry",this.parameters={width:t,height:e,widthSegments:i,heightSegments:n};var r,a,o=(t=t||1)/2,s=(e=e||1)/2,c=Math.floor(i)||1,h=Math.floor(n)||1,l=c+1,u=h+1,p=t/c,d=e/h,f=[],m=[],g=[],v=[];for(a=0;a<u;a++){var y=a*d-s;for(r=0;r<l;r++){var x=r*p-o;m.push(x,-y,0),g.push(0,0,1),v.push(r/c),v.push(1-a/h)}}for(a=0;a<h;a++)for(r=0;r<c;r++){var _=r+l*a,b=r+l*(a+1),w=r+1+l*(a+1),M=r+1+l*a;f.push(_,b,M),f.push(b,w,M)}this.setIndex(f),this.addAttribute("position",new gt(m,3)),this.addAttribute("normal",new gt(g,3)),this.addAttribute("uv",new gt(v,2))}bt.prototype=Object.assign(Object.create(r.prototype),{constructor:bt,isBufferGeometry:!0,getIndex:function(){return this.index},setIndex:function(t){Array.isArray(t)?this.index=new(xt(t)>65535?mt:dt)(t,1):this.index=t},addAttribute:function(t,e){return e&&e.isBufferAttribute||e&&e.isInterleavedBufferAttribute?"index"===t?(console.warn("THREE.BufferGeometry.addAttribute: Use .setIndex() for index attribute."),this.setIndex(e),this):(this.attributes[t]=e,this):(console.warn("THREE.BufferGeometry: .addAttribute() now expects ( name, attribute )."),this.addAttribute(t,new ct(arguments[1],arguments[2])))},getAttribute:function(t){return this.attributes[t]},removeAttribute:function(t){return delete this.attributes[t],this},addGroup:function(t,e,i){this.groups.push({start:t,count:e,materialIndex:void 0!==i?i:0})},clearGroups:function(){this.groups=[]},setDrawRange:function(t,e){this.drawRange.start=t,this.drawRange.count=e},applyMatrix:function(t){var e=this.attributes.position;void 0!==e&&(t.applyToBufferAttribute(e),e.needsUpdate=!0);var i=this.attributes.normal;void 0!==i&&((new b).getNormalMatrix(t).applyToBufferAttribute(i),i.needsUpdate=!0);return null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this},rotateX:function(){var t=new y;return function(e){return t.makeRotationX(e),this.applyMatrix(t),this}}(),rotateY:function(){var t=new y;return function(e){return t.makeRotationY(e),this.applyMatrix(t),this}}(),rotateZ:function(){var t=new y;return function(e){return t.makeRotationZ(e),this.applyMatrix(t),this}}(),translate:function(){var t=new y;return function(e,i,n){return t.makeTranslation(e,i,n),this.applyMatrix(t),this}}(),scale:function(){var t=new y;return function(e,i,n){return t.makeScale(e,i,n),this.applyMatrix(t),this}}(),lookAt:function(){var t=new tt;return function(e){t.lookAt(e),t.updateMatrix(),this.applyMatrix(t.matrix)}}(),center:function(){var t=new _;return function(){return this.computeBoundingBox(),this.boundingBox.getCenter(t).negate(),this.translate(t.x,t.y,t.z),this}}(),setFromObject:function(t){var e=t.geometry;if(t.isPoints||t.isLine){var i=new gt(3*e.vertices.length,3),n=new gt(3*e.colors.length,3);if(this.addAttribute("position",i.copyVector3sArray(e.vertices)),this.addAttribute("color",n.copyColorsArray(e.colors)),e.lineDistances&&e.lineDistances.length===e.vertices.length){var r=new gt(e.lineDistances.length,1);this.addAttribute("lineDistance",r.copyArray(e.lineDistances))}null!==e.boundingSphere&&(this.boundingSphere=e.boundingSphere.clone()),null!==e.boundingBox&&(this.boundingBox=e.boundingBox.clone())}else t.isMesh&&e&&e.isGeometry&&this.fromGeometry(e);return this},setFromPoints:function(t){for(var e=[],i=0,n=t.length;i<n;i++){var r=t[i];e.push(r.x,r.y,r.z||0)}return this.addAttribute("position",new gt(e,3)),this},updateFromObject:function(t){var e,i=t.geometry;if(t.isMesh){var n=i.__directGeometry;if(!0===i.elementsNeedUpdate&&(n=void 0,i.elementsNeedUpdate=!1),void 0===n)return this.fromGeometry(i);n.verticesNeedUpdate=i.verticesNeedUpdate,n.normalsNeedUpdate=i.normalsNeedUpdate,n.colorsNeedUpdate=i.colorsNeedUpdate,n.uvsNeedUpdate=i.uvsNeedUpdate,n.groupsNeedUpdate=i.groupsNeedUpdate,i.verticesNeedUpdate=!1,i.normalsNeedUpdate=!1,i.colorsNeedUpdate=!1,i.uvsNeedUpdate=!1,i.groupsNeedUpdate=!1,i=n}return!0===i.verticesNeedUpdate&&(void 0!==(e=this.attributes.position)&&(e.copyVector3sArray(i.vertices),e.needsUpdate=!0),i.verticesNeedUpdate=!1),!0===i.normalsNeedUpdate&&(void 0!==(e=this.attributes.normal)&&(e.copyVector3sArray(i.normals),e.needsUpdate=!0),i.normalsNeedUpdate=!1),!0===i.colorsNeedUpdate&&(void 0!==(e=this.attributes.color)&&(e.copyColorsArray(i.colors),e.needsUpdate=!0),i.colorsNeedUpdate=!1),i.uvsNeedUpdate&&(void 0!==(e=this.attributes.uv)&&(e.copyVector2sArray(i.uvs),e.needsUpdate=!0),i.uvsNeedUpdate=!1),i.lineDistancesNeedUpdate&&(void 0!==(e=this.attributes.lineDistance)&&(e.copyArray(i.lineDistances),e.needsUpdate=!0),i.lineDistancesNeedUpdate=!1),i.groupsNeedUpdate&&(i.computeGroups(t.geometry),this.groups=i.groups,i.groupsNeedUpdate=!1),this},fromGeometry:function(t){return t.__directGeometry=(new yt).fromGeometry(t),this.fromDirectGeometry(t.__directGeometry)},fromDirectGeometry:function(t){var e=new Float32Array(3*t.vertices.length);if(this.addAttribute("position",new ct(e,3).copyVector3sArray(t.vertices)),t.normals.length>0){var i=new Float32Array(3*t.normals.length);this.addAttribute("normal",new ct(i,3).copyVector3sArray(t.normals))}if(t.colors.length>0){var n=new Float32Array(3*t.colors.length);this.addAttribute("color",new ct(n,3).copyColorsArray(t.colors))}if(t.uvs.length>0){var r=new Float32Array(2*t.uvs.length);this.addAttribute("uv",new ct(r,2).copyVector2sArray(t.uvs))}if(t.uvs2.length>0){var a=new Float32Array(2*t.uvs2.length);this.addAttribute("uv2",new ct(a,2).copyVector2sArray(t.uvs2))}for(var o in this.groups=t.groups,t.morphTargets){for(var s=[],c=t.morphTargets[o],h=0,l=c.length;h<l;h++){var u=c[h],p=new gt(3*u.length,3);s.push(p.copyVector3sArray(u))}this.morphAttributes[o]=s}if(t.skinIndices.length>0){var d=new gt(4*t.skinIndices.length,4);this.addAttribute("skinIndex",d.copyVector4sArray(t.skinIndices))}if(t.skinWeights.length>0){var f=new gt(4*t.skinWeights.length,4);this.addAttribute("skinWeight",f.copyVector4sArray(t.skinWeights))}return null!==t.boundingSphere&&(this.boundingSphere=t.boundingSphere.clone()),null!==t.boundingBox&&(this.boundingBox=t.boundingBox.clone()),this},computeBoundingBox:function(){null===this.boundingBox&&(this.boundingBox=new I);var t=this.attributes.position;void 0!==t?this.boundingBox.setFromBufferAttribute(t):this.boundingBox.makeEmpty(),(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&console.error('THREE.BufferGeometry.computeBoundingBox: Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)},computeBoundingSphere:function(){var t=new I,e=new _;return function(){null===this.boundingSphere&&(this.boundingSphere=new N);var i=this.attributes.position;if(i){var n=this.boundingSphere.center;t.setFromBufferAttribute(i),t.getCenter(n);for(var r=0,a=0,o=i.count;a<o;a++)e.x=i.getX(a),e.y=i.getY(a),e.z=i.getZ(a),r=Math.max(r,n.distanceToSquared(e));this.boundingSphere.radius=Math.sqrt(r),isNaN(this.boundingSphere.radius)&&console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}}}(),computeFaceNormals:function(){},computeVertexNormals:function(){var t=this.index,e=this.attributes,i=this.groups;if(e.position){var n=e.position.array;if(void 0===e.normal)this.addAttribute("normal",new ct(new Float32Array(n.length),3));else for(var r=e.normal.array,a=0,o=r.length;a<o;a++)r[a]=0;var s,c,h,l=e.normal.array,u=new _,p=new _,d=new _,f=new _,m=new _;if(t){var g=t.array;0===i.length&&this.addGroup(0,g.length);for(var v=0,y=i.length;v<y;++v){var x=i[v],b=x.start;for(a=b,o=b+x.count;a<o;a+=3)s=3*g[a+0],c=3*g[a+1],h=3*g[a+2],u.fromArray(n,s),p.fromArray(n,c),d.fromArray(n,h),f.subVectors(d,p),m.subVectors(u,p),f.cross(m),l[s]+=f.x,l[s+1]+=f.y,l[s+2]+=f.z,l[c]+=f.x,l[c+1]+=f.y,l[c+2]+=f.z,l[h]+=f.x,l[h+1]+=f.y,l[h+2]+=f.z}}else for(a=0,o=n.length;a<o;a+=9)u.fromArray(n,a),p.fromArray(n,a+3),d.fromArray(n,a+6),f.subVectors(d,p),m.subVectors(u,p),f.cross(m),l[a]=f.x,l[a+1]=f.y,l[a+2]=f.z,l[a+3]=f.x,l[a+4]=f.y,l[a+5]=f.z,l[a+6]=f.x,l[a+7]=f.y,l[a+8]=f.z;this.normalizeNormals(),e.normal.needsUpdate=!0}},merge:function(t,e){if(t&&t.isBufferGeometry){void 0===e&&(e=0,console.warn("THREE.BufferGeometry.merge(): Overwriting original geometry, starting at offset=0. Use BufferGeometryUtils.mergeBufferGeometries() for lossless merge."));var i=this.attributes;for(var n in i)if(void 0!==t.attributes[n])for(var r=i[n].array,a=t.attributes[n],o=a.array,s=0,c=a.itemSize*e;s<o.length;s++,c++)r[c]=o[s];return this}console.error("THREE.BufferGeometry.merge(): geometry not an instance of THREE.BufferGeometry.",t)},normalizeNormals:function(){var t=new _;return function(){for(var e=this.attributes.normal,i=0,n=e.count;i<n;i++)t.x=e.getX(i),t.y=e.getY(i),t.z=e.getZ(i),t.normalize(),e.setXYZ(i,t.x,t.y,t.z)}}(),toNonIndexed:function(){if(null===this.index)return console.warn("THREE.BufferGeometry.toNonIndexed(): Geometry is already non-indexed."),this;var t=new bt,e=this.index.array,i=this.attributes;for(var n in i){for(var r=i[n],a=r.array,o=r.itemSize,s=new a.constructor(e.length*o),c=0,h=0,l=0,u=e.length;l<u;l++){c=e[l]*o;for(var p=0;p<o;p++)s[h++]=a[c++]}t.addAttribute(n,new ct(s,o))}var d=this.groups;for(l=0,u=d.length;l<u;l++){var f=d[l];t.addGroup(f.start,f.count,f.materialIndex)}return t},toJSON:function(){var t={metadata:{version:4.5,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(t.uuid=this.uuid,t.type=this.type,""!==this.name&&(t.name=this.name),Object.keys(this.userData).length>0&&(t.userData=this.userData),void 0!==this.parameters){var e=this.parameters;for(var i in e)void 0!==e[i]&&(t[i]=e[i]);return t}t.data={attributes:{}};var n=this.index;if(null!==n){var r=Array.prototype.slice.call(n.array);t.data.index={type:n.array.constructor.name,array:r}}var a=this.attributes;for(var i in a){var o=a[i];r=Array.prototype.slice.call(o.array);t.data.attributes[i]={itemSize:o.itemSize,type:o.array.constructor.name,array:r,normalized:o.normalized}}var s=this.groups;s.length>0&&(t.data.groups=JSON.parse(JSON.stringify(s)));var c=this.boundingSphere;return null!==c&&(t.data.boundingSphere={center:c.center.toArray(),radius:c.radius}),t},clone:function(){return(new bt).copy(this)},copy:function(t){var e,i,n;this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.name=t.name;var r=t.index;null!==r&&this.setIndex(r.clone());var a=t.attributes;for(e in a){var o=a[e];this.addAttribute(e,o.clone())}var s=t.morphAttributes;for(e in s){var c=[],h=s[e];for(i=0,n=h.length;i<n;i++)c.push(h[i].clone());this.morphAttributes[e]=c}var l=t.groups;for(i=0,n=l.length;i<n;i++){var u=l[i];this.addGroup(u.start,u.count,u.materialIndex)}var p=t.boundingBox;null!==p&&(this.boundingBox=p.clone());var d=t.boundingSphere;return null!==d&&(this.boundingSphere=d.clone()),this.drawRange.start=t.drawRange.start,this.drawRange.count=t.drawRange.count,this.userData=t.userData,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),wt.prototype=Object.create(st.prototype),wt.prototype.constructor=wt,Mt.prototype=Object.create(bt.prototype),Mt.prototype.constructor=Mt,Et.prototype=Object.create(st.prototype),Et.prototype.constructor=Et,Tt.prototype=Object.create(bt.prototype),Tt.prototype.constructor=Tt;var St,At,Rt,Lt,Pt,Ct,Ot,It=0;function Nt(){Object.defineProperty(this,"id",{value:It++}),this.uuid=g.generateUUID(),this.name="",this.type="Material",this.fog=!0,this.lights=!0,this.blending=1,this.side=0,this.flatShading=!1,this.vertexColors=0,this.opacity=1,this.transparent=!1,this.blendSrc=204,this.blendDst=205,this.blendEquation=100,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.depthFunc=3,this.depthTest=!0,this.depthWrite=!0,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaTest=0,this.premultipliedAlpha=!1,this.overdraw=0,this.visible=!0,this.userData={},this.needsUpdate=!0}function Dt(t){Nt.call(this),this.type="MeshBasicMaterial",this.color=new H(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=0,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.lights=!1,this.setValues(t)}function Ut(t){Nt.call(this),this.type="ShaderMaterial",this.defines={},this.uniforms={},this.vertexShader="void main() {\n\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}",this.fragmentShader="void main() {\n\tgl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\n}",this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.extensions={derivatives:!1,fragDepth:!1,drawBuffers:!1,shaderTextureLOD:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv2:[0,0]},this.index0AttributeName=void 0,this.uniformsNeedUpdate=!1,void 0!==t&&(void 0!==t.attributes&&console.error("THREE.ShaderMaterial: attributes should now be defined in THREE.BufferGeometry instead."),this.setValues(t))}function zt(t,e){this.origin=void 0!==t?t:new _,this.direction=void 0!==e?e:new _}function Bt(t,e){this.start=void 0!==t?t:new _,this.end=void 0!==e?e:new _}function Ft(t,e,i){this.a=void 0!==t?t:new _,this.b=void 0!==e?e:new _,this.c=void 0!==i?i:new _}function Gt(t,e){tt.call(this),this.type="Mesh",this.geometry=void 0!==t?t:new bt,this.material=void 0!==e?e:new Dt({color:16777215*Math.random()}),this.drawMode=0,this.updateMorphTargets()}function Ht(t,e,i,n){var r,a,o,s=new H(0),c=0;function h(t,i){e.buffers.color.setClear(t.r,t.g,t.b,i,n)}return{getClearColor:function(){return s},setClearColor:function(t,e){s.set(t),h(s,c=void 0!==e?e:1)},getClearAlpha:function(){return c},setClearAlpha:function(t){h(s,c=t)},render:function(e,n,l,u){var p=n.background;null===p?h(s,c):p&&p.isColor&&(h(p,1),u=!0),(t.autoClear||u)&&t.clear(t.autoClearColor,t.autoClearDepth,t.autoClearStencil),p&&p.isCubeTexture?(void 0===o&&((o=new Gt(new Mt(1,1,1),new Ut({uniforms:j.cube.uniforms,vertexShader:j.cube.vertexShader,fragmentShader:j.cube.fragmentShader,side:1,depthTest:!0,depthWrite:!1,fog:!1}))).geometry.removeAttribute("normal"),o.geometry.removeAttribute("uv"),o.onBeforeRender=function(t,e,i){this.matrixWorld.copyPosition(i.matrixWorld)},i.update(o)),o.material.uniforms.tCube.value=p,e.push(o,o.geometry,o.material,0,null)):p&&p.isTexture&&(void 0===r&&(r=new it(-1,1,1,-1,0,1),a=new Gt(new Tt(2,2),new Dt({depthTest:!1,depthWrite:!1,fog:!1})),i.update(a)),a.material.map=p,t.renderBufferDirect(r,null,a.geometry,a.material,a,null))}}}function kt(t,e,i){var n;this.setMode=function(t){n=t},this.render=function(e,r){t.drawArrays(n,e,r),i.update(r,n)},this.renderInstances=function(t,r,a){var o=e.get("ANGLE_instanced_arrays");null!==o?(o.drawArraysInstancedANGLE(n,r,a,t.maxInstancedCount),i.update(a,n,t.maxInstancedCount)):console.error("THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.")}}function Vt(t,e,i){var n;function r(e){if("highp"===e){if(t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.HIGH_FLOAT).precision>0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.HIGH_FLOAT).precision>0)return"highp";e="mediump"}return"mediump"===e&&t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.MEDIUM_FLOAT).precision>0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}var a=void 0!==i.precision?i.precision:"highp",o=r(a);o!==a&&(console.warn("THREE.WebGLRenderer:",a,"not supported, using",o,"instead."),a=o);var s=!0===i.logarithmicDepthBuffer,c=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS),h=t.getParameter(t.MAX_VERTEX_TEXTURE_IMAGE_UNITS),l=t.getParameter(t.MAX_TEXTURE_SIZE),u=t.getParameter(t.MAX_CUBE_MAP_TEXTURE_SIZE),p=t.getParameter(t.MAX_VERTEX_ATTRIBS),d=t.getParameter(t.MAX_VERTEX_UNIFORM_VECTORS),f=t.getParameter(t.MAX_VARYING_VECTORS),m=t.getParameter(t.MAX_FRAGMENT_UNIFORM_VECTORS),g=h>0,v=!!e.get("OES_texture_float");return{getMaxAnisotropy:function(){if(void 0!==n)return n;var i=e.get("EXT_texture_filter_anisotropic");return n=null!==i?t.getParameter(i.MAX_TEXTURE_MAX_ANISOTROPY_EXT):0},getMaxPrecision:r,precision:a,logarithmicDepthBuffer:s,maxTextures:c,maxVertexTextures:h,maxTextureSize:l,maxCubemapSize:u,maxAttributes:p,maxVertexUniforms:d,maxVaryings:f,maxFragmentUniforms:m,vertexTextures:g,floatFragmentTextures:v,floatVertexTextures:g&&v}}function jt(){var t=this,e=null,i=0,n=!1,r=!1,a=new D,o=new b,s={value:null,needsUpdate:!1};function c(){s.value!==e&&(s.value=e,s.needsUpdate=i>0),t.numPlanes=i,t.numIntersection=0}function h(e,i,n,r){var c=null!==e?e.length:0,h=null;if(0!==c){if(h=s.value,!0!==r||null===h){var l=n+4*c,u=i.matrixWorldInverse;o.getNormalMatrix(u),(null===h||h.length<l)&&(h=new Float32Array(l));for(var p=0,d=n;p!==c;++p,d+=4)a.copy(e[p]).applyMatrix4(u,o),a.normal.toArray(h,d),h[d+3]=a.constant}s.value=h,s.needsUpdate=!0}return t.numPlanes=c,h}this.uniform=s,this.numPlanes=0,this.numIntersection=0,this.init=function(t,r,a){var o=0!==t.length||r||0!==i||n;return n=r,e=h(t,a,0),i=t.length,o},this.beginShadows=function(){r=!0,h(null)},this.endShadows=function(){r=!1,c()},this.setState=function(t,a,o,l,u,p){if(!n||null===t||0===t.length||r&&!o)r?h(null):c();else{var d=r?0:i,f=4*d,m=u.clippingState||null;s.value=m,m=h(t,l,f,p);for(var g=0;g!==f;++g)m[g]=e[g];u.clippingState=m,this.numIntersection=a?this.numPlanes:0,this.numPlanes+=d}}}function Wt(t){var e={};return{get:function(i){if(void 0!==e[i])return e[i];var n;switch(i){case"WEBGL_depth_texture":n=t.getExtension("WEBGL_depth_texture")||t.getExtension("MOZ_WEBGL_depth_texture")||t.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":n=t.getExtension("EXT_texture_filter_anisotropic")||t.getExtension("MOZ_EXT_texture_filter_anisotropic")||t.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case"WEBGL_compressed_texture_s3tc":n=t.getExtension("WEBGL_compressed_texture_s3tc")||t.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||t.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");break;case"WEBGL_compressed_texture_pvrtc":n=t.getExtension("WEBGL_compressed_texture_pvrtc")||t.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:n=t.getExtension(i)}return null===n&&console.warn("THREE.WebGLRenderer: "+i+" extension not supported."),e[i]=n,n}}}function Xt(t,e,i){var n={},r={};function a(t){var o=t.target,s=n[o.id];for(var c in null!==s.index&&e.remove(s.index),s.attributes)e.remove(s.attributes[c]);o.removeEventListener("dispose",a),delete n[o.id];var h=r[o.id];h&&(e.remove(h),delete r[o.id]),(h=r[s.id])&&(e.remove(h),delete r[s.id]),i.memory.geometries--}return{get:function(t,e){var r=n[e.id];return r||(e.addEventListener("dispose",a),e.isBufferGeometry?r=e:e.isGeometry&&(void 0===e._bufferGeometry&&(e._bufferGeometry=(new bt).setFromObject(t)),r=e._bufferGeometry),n[e.id]=r,i.memory.geometries++,r)},update:function(i){var n=i.index,r=i.attributes;for(var a in null!==n&&e.update(n,t.ELEMENT_ARRAY_BUFFER),r)e.update(r[a],t.ARRAY_BUFFER);var o=i.morphAttributes;for(var a in o)for(var s=o[a],c=0,h=s.length;c<h;c++)e.update(s[c],t.ARRAY_BUFFER)},getWireframeAttribute:function(i){var n=r[i.id];if(n)return n;var a,o=[],s=i.index,c=i.attributes;if(null!==s)for(var h=0,l=(a=s.array).length;h<l;h+=3){var u=a[h+0],p=a[h+1],d=a[h+2];o.push(u,p,p,d,d,u)}else for(h=0,l=(a=c.position.array).length/3-1;h<l;h+=3){u=h+0,p=h+1,d=h+2;o.push(u,p,p,d,d,u)}return n=new(xt(o)>65535?mt:dt)(o,1),e.update(n,t.ELEMENT_ARRAY_BUFFER),r[i.id]=n,n}}}function qt(t,e,i){var n,r,a;this.setMode=function(t){n=t},this.setIndex=function(t){r=t.type,a=t.bytesPerElement},this.render=function(e,o){t.drawElements(n,o,r,e*a),i.update(o,n)},this.renderInstances=function(t,o,s){var c=e.get("ANGLE_instanced_arrays");null!==c?(c.drawElementsInstancedANGLE(n,s,r,o*a,t.maxInstancedCount),i.update(s,n,t.maxInstancedCount)):console.error("THREE.WebGLIndexedBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.")}}function Yt(t){var e={frame:0,calls:0,triangles:0,points:0,lines:0};return{memory:{geometries:0,textures:0},render:e,programs:null,autoReset:!0,reset:function(){e.frame++,e.calls=0,e.triangles=0,e.points=0,e.lines=0},update:function(i,n,r){switch(r=r||1,e.calls++,n){case t.TRIANGLES:e.triangles+=r*(i/3);break;case t.TRIANGLE_STRIP:case t.TRIANGLE_FAN:e.triangles+=r*(i-2);break;case t.LINES:e.lines+=r*(i/2);break;case t.LINE_STRIP:e.lines+=r*(i-1);break;case t.LINE_LOOP:e.lines+=r*i;break;case t.POINTS:e.points+=r*i;break;default:console.error("THREE.WebGLInfo: Unknown draw mode:",n)}}}}function Zt(t,e){return Math.abs(e[1])-Math.abs(t[1])}function Jt(t){var e={},i=new Float32Array(8);return{update:function(n,r,a,o){var s=n.morphTargetInfluences,c=s.length,h=e[r.id];if(void 0===h){h=[];for(var l=0;l<c;l++)h[l]=[l,0];e[r.id]=h}var u=a.morphTargets&&r.morphAttributes.position,p=a.morphNormals&&r.morphAttributes.normal;for(l=0;l<c;l++){0!==(d=h[l])[1]&&(u&&r.removeAttribute("morphTarget"+l),p&&r.removeAttribute("morphNormal"+l))}for(l=0;l<c;l++){(d=h[l])[0]=l,d[1]=s[l]}for(h.sort(Zt),l=0;l<8;l++){var d;if(d=h[l]){var f=d[0],m=d[1];if(m){u&&r.addAttribute("morphTarget"+l,u[f]),p&&r.addAttribute("morphNormal"+l,p[f]),i[l]=m;continue}}i[l]=0}o.getUniforms().setValue(t,"morphTargetInfluences",i)}}}function Qt(t,e){var i={};return{update:function(n){var r=e.render.frame,a=n.geometry,o=t.get(n,a);return i[o.id]!==r&&(a.isGeometry&&o.updateFromObject(n),t.update(o),i[o.id]=r),o},dispose:function(){i={}}}}function Kt(t,e,i,n,r,a,o,s,c,h){t=void 0!==t?t:[],e=void 0!==e?e:301,R.call(this,t,e,i,n,r,a,o,s,c,h),this.flipY=!1}Nt.prototype=Object.assign(Object.create(r.prototype),{constructor:Nt,isMaterial:!0,onBeforeCompile:function(){},setValues:function(t){if(void 0!==t)for(var e in t){var i=t[e];if(void 0!==i)if("shading"!==e){var n=this[e];void 0!==n?n&&n.isColor?n.set(i):n&&n.isVector3&&i&&i.isVector3?n.copy(i):this[e]="overdraw"===e?Number(i):i:console.warn("THREE."+this.type+": '"+e+"' is not a property of this material.")}else console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=1===i;else console.warn("THREE.Material: '"+e+"' parameter is undefined.")}},toJSON:function(t){var e=void 0===t||"string"==typeof t;e&&(t={textures:{},images:{}});var i={metadata:{version:4.5,type:"Material",generator:"Material.toJSON"}};function n(t){var e=[];for(var i in t){var n=t[i];delete n.metadata,e.push(n)}return e}if(i.uuid=this.uuid,i.type=this.type,""!==this.name&&(i.name=this.name),this.color&&this.color.isColor&&(i.color=this.color.getHex()),void 0!==this.roughness&&(i.roughness=this.roughness),void 0!==this.metalness&&(i.metalness=this.metalness),this.emissive&&this.emissive.isColor&&(i.emissive=this.emissive.getHex()),1!==this.emissiveIntensity&&(i.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(i.specular=this.specular.getHex()),void 0!==this.shininess&&(i.shininess=this.shininess),void 0!==this.clearCoat&&(i.clearCoat=this.clearCoat),void 0!==this.clearCoatRoughness&&(i.clearCoatRoughness=this.clearCoatRoughness),this.map&&this.map.isTexture&&(i.map=this.map.toJSON(t).uuid),this.alphaMap&&this.alphaMap.isTexture&&(i.alphaMap=this.alphaMap.toJSON(t).uuid),this.lightMap&&this.lightMap.isTexture&&(i.lightMap=this.lightMap.toJSON(t).uuid),this.aoMap&&this.aoMap.isTexture&&(i.aoMap=this.aoMap.toJSON(t).uuid,i.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(i.bumpMap=this.bumpMap.toJSON(t).uuid,i.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(i.normalMap=this.normalMap.toJSON(t).uuid,i.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(i.displacementMap=this.displacementMap.toJSON(t).uuid,i.displacementScale=this.displacementScale,i.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(i.roughnessMap=this.roughnessMap.toJSON(t).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(i.metalnessMap=this.metalnessMap.toJSON(t).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(i.emissiveMap=this.emissiveMap.toJSON(t).uuid),this.specularMap&&this.specularMap.isTexture&&(i.specularMap=this.specularMap.toJSON(t).uuid),this.envMap&&this.envMap.isTexture&&(i.envMap=this.envMap.toJSON(t).uuid,i.reflectivity=this.reflectivity),this.gradientMap&&this.gradientMap.isTexture&&(i.gradientMap=this.gradientMap.toJSON(t).uuid),void 0!==this.size&&(i.size=this.size),void 0!==this.sizeAttenuation&&(i.sizeAttenuation=this.sizeAttenuation),1!==this.blending&&(i.blending=this.blending),!0===this.flatShading&&(i.flatShading=this.flatShading),0!==this.side&&(i.side=this.side),0!==this.vertexColors&&(i.vertexColors=this.vertexColors),this.opacity<1&&(i.opacity=this.opacity),!0===this.transparent&&(i.transparent=this.transparent),i.depthFunc=this.depthFunc,i.depthTest=this.depthTest,i.depthWrite=this.depthWrite,0!==this.rotation&&(i.rotation=this.rotation),1!==this.linewidth&&(i.linewidth=this.linewidth),void 0!==this.dashSize&&(i.dashSize=this.dashSize),void 0!==this.gapSize&&(i.gapSize=this.gapSize),void 0!==this.scale&&(i.scale=this.scale),!0===this.dithering&&(i.dithering=!0),this.alphaTest>0&&(i.alphaTest=this.alphaTest),!0===this.premultipliedAlpha&&(i.premultipliedAlpha=this.premultipliedAlpha),!0===this.wireframe&&(i.wireframe=this.wireframe),this.wireframeLinewidth>1&&(i.wireframeLinewidth=this.wireframeLinewidth),"round"!==this.wireframeLinecap&&(i.wireframeLinecap=this.wireframeLinecap),"round"!==this.wireframeLinejoin&&(i.wireframeLinejoin=this.wireframeLinejoin),!0===this.morphTargets&&(i.morphTargets=!0),!0===this.skinning&&(i.skinning=!0),!1===this.visible&&(i.visible=!1),"{}"!==JSON.stringify(this.userData)&&(i.userData=this.userData),e){var r=n(t.textures),a=n(t.images);r.length>0&&(i.textures=r),a.length>0&&(i.images=a)}return i},clone:function(){return(new this.constructor).copy(this)},copy:function(t){this.name=t.name,this.fog=t.fog,this.lights=t.lights,this.blending=t.blending,this.side=t.side,this.flatShading=t.flatShading,this.vertexColors=t.vertexColors,this.opacity=t.opacity,this.transparent=t.transparent,this.blendSrc=t.blendSrc,this.blendDst=t.blendDst,this.blendEquation=t.blendEquation,this.blendSrcAlpha=t.blendSrcAlpha,this.blendDstAlpha=t.blendDstAlpha,this.blendEquationAlpha=t.blendEquationAlpha,this.depthFunc=t.depthFunc,this.depthTest=t.depthTest,this.depthWrite=t.depthWrite,this.colorWrite=t.colorWrite,this.precision=t.precision,this.polygonOffset=t.polygonOffset,this.polygonOffsetFactor=t.polygonOffsetFactor,this.polygonOffsetUnits=t.polygonOffsetUnits,this.dithering=t.dithering,this.alphaTest=t.alphaTest,this.premultipliedAlpha=t.premultipliedAlpha,this.overdraw=t.overdraw,this.visible=t.visible,this.userData=JSON.parse(JSON.stringify(t.userData)),this.clipShadows=t.clipShadows,this.clipIntersection=t.clipIntersection;var e=t.clippingPlanes,i=null;if(null!==e){var n=e.length;i=new Array(n);for(var r=0;r!==n;++r)i[r]=e[r].clone()}return this.clippingPlanes=i,this.shadowSide=t.shadowSide,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),Dt.prototype=Object.create(Nt.prototype),Dt.prototype.constructor=Dt,Dt.prototype.isMeshBasicMaterial=!0,Dt.prototype.copy=function(t){return Nt.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this},Ut.prototype=Object.create(Nt.prototype),Ut.prototype.constructor=Ut,Ut.prototype.isShaderMaterial=!0,Ut.prototype.copy=function(t){return Nt.prototype.copy.call(this,t),this.fragmentShader=t.fragmentShader,this.vertexShader=t.vertexShader,this.uniforms=F.clone(t.uniforms),this.defines=Object.assign({},t.defines),this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.lights=t.lights,this.clipping=t.clipping,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this.extensions=t.extensions,this},Ut.prototype.toJSON=function(t){var e=Nt.prototype.toJSON.call(this,t);return e.uniforms=this.uniforms,e.vertexShader=this.vertexShader,e.fragmentShader=this.fragmentShader,e},Object.assign(zt.prototype,{set:function(t,e){return this.origin.copy(t),this.direction.copy(e),this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.origin.copy(t.origin),this.direction.copy(t.direction),this},at:function(t,e){return void 0===e&&(console.warn("THREE.Ray: .at() target is now required"),e=new _),e.copy(this.direction).multiplyScalar(t).add(this.origin)},lookAt:function(t){return this.direction.copy(t).sub(this.origin).normalize(),this},recast:function(){var t=new _;return function(e){return this.origin.copy(this.at(e,t)),this}}(),closestPointToPoint:function(t,e){void 0===e&&(console.warn("THREE.Ray: .closestPointToPoint() target is now required"),e=new _),e.subVectors(t,this.origin);var i=e.dot(this.direction);return i<0?e.copy(this.origin):e.copy(this.direction).multiplyScalar(i).add(this.origin)},distanceToPoint:function(t){return Math.sqrt(this.distanceSqToPoint(t))},distanceSqToPoint:function(){var t=new _;return function(e){var i=t.subVectors(e,this.origin).dot(this.direction);return i<0?this.origin.distanceToSquared(e):(t.copy(this.direction).multiplyScalar(i).add(this.origin),t.distanceToSquared(e))}}(),distanceSqToSegment:(At=new _,Rt=new _,Lt=new _,function(t,e,i,n){At.copy(t).add(e).multiplyScalar(.5),Rt.copy(e).sub(t).normalize(),Lt.copy(this.origin).sub(At);var r,a,o,s,c=.5*t.distanceTo(e),h=-this.direction.dot(Rt),l=Lt.dot(this.direction),u=-Lt.dot(Rt),p=Lt.lengthSq(),d=Math.abs(1-h*h);if(d>0)if(a=h*l-u,s=c*d,(r=h*u-l)>=0)if(a>=-s)if(a<=s){var f=1/d;o=(r*=f)*(r+h*(a*=f)+2*l)+a*(h*r+a+2*u)+p}else a=c,o=-(r=Math.max(0,-(h*a+l)))*r+a*(a+2*u)+p;else a=-c,o=-(r=Math.max(0,-(h*a+l)))*r+a*(a+2*u)+p;else a<=-s?o=-(r=Math.max(0,-(-h*c+l)))*r+(a=r>0?-c:Math.min(Math.max(-c,-u),c))*(a+2*u)+p:a<=s?(r=0,o=(a=Math.min(Math.max(-c,-u),c))*(a+2*u)+p):o=-(r=Math.max(0,-(h*c+l)))*r+(a=r>0?c:Math.min(Math.max(-c,-u),c))*(a+2*u)+p;else a=h>0?-c:c,o=-(r=Math.max(0,-(h*a+l)))*r+a*(a+2*u)+p;return i&&i.copy(this.direction).multiplyScalar(r).add(this.origin),n&&n.copy(Rt).multiplyScalar(a).add(At),o}),intersectSphere:function(){var t=new _;return function(e,i){t.subVectors(e.center,this.origin);var n=t.dot(this.direction),r=t.dot(t)-n*n,a=e.radius*e.radius;if(r>a)return null;var o=Math.sqrt(a-r),s=n-o,c=n+o;return s<0&&c<0?null:s<0?this.at(c,i):this.at(s,i)}}(),intersectsSphere:function(t){return this.distanceToPoint(t.center)<=t.radius},distanceToPlane:function(t){var e=t.normal.dot(this.direction);if(0===e)return 0===t.distanceToPoint(this.origin)?0:null;var i=-(this.origin.dot(t.normal)+t.constant)/e;return i>=0?i:null},intersectPlane:function(t,e){var i=this.distanceToPlane(t);return null===i?null:this.at(i,e)},intersectsPlane:function(t){var e=t.distanceToPoint(this.origin);return 0===e||t.normal.dot(this.direction)*e<0},intersectBox:function(t,e){var i,n,r,a,o,s,c=1/this.direction.x,h=1/this.direction.y,l=1/this.direction.z,u=this.origin;return c>=0?(i=(t.min.x-u.x)*c,n=(t.max.x-u.x)*c):(i=(t.max.x-u.x)*c,n=(t.min.x-u.x)*c),h>=0?(r=(t.min.y-u.y)*h,a=(t.max.y-u.y)*h):(r=(t.max.y-u.y)*h,a=(t.min.y-u.y)*h),i>a||r>n?null:((r>i||i!=i)&&(i=r),(a<n||n!=n)&&(n=a),l>=0?(o=(t.min.z-u.z)*l,s=(t.max.z-u.z)*l):(o=(t.max.z-u.z)*l,s=(t.min.z-u.z)*l),i>s||o>n?null:((o>i||i!=i)&&(i=o),(s<n||n!=n)&&(n=s),n<0?null:this.at(i>=0?i:n,e)))},intersectsBox:(St=new _,function(t){return null!==this.intersectBox(t,St)}),intersectTriangle:function(){var t=new _,e=new _,i=new _,n=new _;return function(r,a,o,s,c){e.subVectors(a,r),i.subVectors(o,r),n.crossVectors(e,i);var h,l=this.direction.dot(n);if(l>0){if(s)return null;h=1}else{if(!(l<0))return null;h=-1,l=-l}t.subVectors(this.origin,r);var u=h*this.direction.dot(i.crossVectors(t,i));if(u<0)return null;var p=h*this.direction.dot(e.cross(t));if(p<0)return null;if(u+p>l)return null;var d=-h*t.dot(n);return d<0?null:this.at(d/l,c)}}(),applyMatrix4:function(t){return this.origin.applyMatrix4(t),this.direction.transformDirection(t),this},equals:function(t){return t.origin.equals(this.origin)&&t.direction.equals(this.direction)}}),Object.assign(Bt.prototype,{set:function(t,e){return this.start.copy(t),this.end.copy(e),this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.start.copy(t.start),this.end.copy(t.end),this},getCenter:function(t){return void 0===t&&(console.warn("THREE.Line3: .getCenter() target is now required"),t=new _),t.addVectors(this.start,this.end).multiplyScalar(.5)},delta:function(t){return void 0===t&&(console.warn("THREE.Line3: .delta() target is now required"),t=new _),t.subVectors(this.end,this.start)},distanceSq:function(){return this.start.distanceToSquared(this.end)},distance:function(){return this.start.distanceTo(this.end)},at:function(t,e){return void 0===e&&(console.warn("THREE.Line3: .at() target is now required"),e=new _),this.delta(e).multiplyScalar(t).add(this.start)},closestPointToPointParameter:(Pt=new _,Ct=new _,function(t,e){Pt.subVectors(t,this.start),Ct.subVectors(this.end,this.start);var i=Ct.dot(Ct),n=Ct.dot(Pt)/i;return e&&(n=g.clamp(n,0,1)),n}),closestPointToPoint:function(t,e,i){var n=this.closestPointToPointParameter(t,e);return void 0===i&&(console.warn("THREE.Line3: .closestPointToPoint() target is now required"),i=new _),this.delta(i).multiplyScalar(n).add(this.start)},applyMatrix4:function(t){return this.start.applyMatrix4(t),this.end.applyMatrix4(t),this},equals:function(t){return t.start.equals(this.start)&&t.end.equals(this.end)}}),Object.assign(Ft,{getNormal:(Ot=new _,function(t,e,i,n){void 0===n&&(console.warn("THREE.Triangle: .getNormal() target is now required"),n=new _),n.subVectors(i,e),Ot.subVectors(t,e),n.cross(Ot);var r=n.lengthSq();return r>0?n.multiplyScalar(1/Math.sqrt(r)):n.set(0,0,0)}),getBarycoord:function(){var t=new _,e=new _,i=new _;return function(n,r,a,o,s){t.subVectors(o,r),e.subVectors(a,r),i.subVectors(n,r);var c=t.dot(t),h=t.dot(e),l=t.dot(i),u=e.dot(e),p=e.dot(i),d=c*u-h*h;if(void 0===s&&(console.warn("THREE.Triangle: .getBarycoord() target is now required"),s=new _),0===d)return s.set(-2,-1,-1);var f=1/d,m=(u*l-h*p)*f,g=(c*p-h*l)*f;return s.set(1-m-g,g,m)}}(),containsPoint:function(){var t=new _;return function(e,i,n,r){return Ft.getBarycoord(e,i,n,r,t),t.x>=0&&t.y>=0&&t.x+t.y<=1}}()}),Object.assign(Ft.prototype,{set:function(t,e,i){return this.a.copy(t),this.b.copy(e),this.c.copy(i),this},setFromPointsAndIndices:function(t,e,i,n){return this.a.copy(t[e]),this.b.copy(t[i]),this.c.copy(t[n]),this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.a.copy(t.a),this.b.copy(t.b),this.c.copy(t.c),this},getArea:function(){var t=new _,e=new _;return function(){return t.subVectors(this.c,this.b),e.subVectors(this.a,this.b),.5*t.cross(e).length()}}(),getMidpoint:function(t){return void 0===t&&(console.warn("THREE.Triangle: .getMidpoint() target is now required"),t=new _),t.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)},getNormal:function(t){return Ft.getNormal(this.a,this.b,this.c,t)},getPlane:function(t){return void 0===t&&(console.warn("THREE.Triangle: .getPlane() target is now required"),t=new _),t.setFromCoplanarPoints(this.a,this.b,this.c)},getBarycoord:function(t,e){return Ft.getBarycoord(t,this.a,this.b,this.c,e)},containsPoint:function(t){return Ft.containsPoint(t,this.a,this.b,this.c)},intersectsBox:function(t){return t.intersectsTriangle(this)},closestPointToPoint:function(){var t=new D,e=[new Bt,new Bt,new Bt],i=new _,n=new _;return function(r,a){void 0===a&&(console.warn("THREE.Triangle: .closestPointToPoint() target is now required"),a=new _);var o=1/0;if(t.setFromCoplanarPoints(this.a,this.b,this.c),t.projectPoint(r,i),!0===this.containsPoint(i))a.copy(i);else{e[0].set(this.a,this.b),e[1].set(this.b,this.c),e[2].set(this.c,this.a);for(var s=0;s<e.length;s++){e[s].closestPointToPoint(i,!0,n);var c=i.distanceToSquared(n);c<o&&(o=c,a.copy(n))}}return a}}(),equals:function(t){return t.a.equals(this.a)&&t.b.equals(this.b)&&t.c.equals(this.c)}}),Gt.prototype=Object.assign(Object.create(tt.prototype),{constructor:Gt,isMesh:!0,setDrawMode:function(t){this.drawMode=t},copy:function(t){return tt.prototype.copy.call(this,t),this.drawMode=t.drawMode,void 0!==t.morphTargetInfluences&&(this.morphTargetInfluences=t.morphTargetInfluences.slice()),void 0!==t.morphTargetDictionary&&(this.morphTargetDictionary=Object.assign({},t.morphTargetDictionary)),this},updateMorphTargets:function(){var t,e,i,n=this.geometry;if(n.isBufferGeometry){var r=n.morphAttributes,a=Object.keys(r);if(a.length>0){var o=r[a[0]];if(void 0!==o)for(this.morphTargetInfluences=[],this.morphTargetDictionary={},t=0,e=o.length;t<e;t++)i=o[t].name||String(t),this.morphTargetInfluences.push(0),this.morphTargetDictionary[i]=t}}else{var s=n.morphTargets;if(void 0!==s&&s.length>0)for(this.morphTargetInfluences=[],this.morphTargetDictionary={},t=0,e=s.length;t<e;t++)i=s[t].name||String(t),this.morphTargetInfluences.push(0),this.morphTargetDictionary[i]=t}},raycast:function(){var t=new y,e=new zt,i=new N,n=new _,r=new _,a=new _,o=new _,s=new _,c=new _,h=new v,l=new v,u=new v,p=new _,d=new _,f=new _;function m(t,e,i,n,r,a,o){return Ft.getBarycoord(t,e,i,n,p),r.multiplyScalar(p.x),a.multiplyScalar(p.y),o.multiplyScalar(p.z),r.add(a).add(o),r.clone()}function g(t,e,i,n,r,a,o,s){if(null===(1===e.side?n.intersectTriangle(o,a,r,!0,s):n.intersectTriangle(r,a,o,2!==e.side,s)))return null;f.copy(s),f.applyMatrix4(t.matrixWorld);var c=i.ray.origin.distanceTo(f);return c<i.near||c>i.far?null:{distance:c,point:f.clone(),object:t}}function x(t,e,i,o,s,c,p,f){n.fromBufferAttribute(o,c),r.fromBufferAttribute(o,p),a.fromBufferAttribute(o,f);var v=g(t,t.material,e,i,n,r,a,d);if(v){s&&(h.fromBufferAttribute(s,c),l.fromBufferAttribute(s,p),u.fromBufferAttribute(s,f),v.uv=m(d,n,r,a,h,l,u));var y=new nt(c,p,f);Ft.getNormal(n,r,a,y.normal),v.face=y}return v}return function(p,f){var v,y=this.geometry,_=this.material,b=this.matrixWorld;if(void 0!==_&&(null===y.boundingSphere&&y.computeBoundingSphere(),i.copy(y.boundingSphere),i.applyMatrix4(b),!1!==p.ray.intersectsSphere(i)&&(t.getInverse(b),e.copy(p.ray).applyMatrix4(t),null===y.boundingBox||!1!==e.intersectsBox(y.boundingBox))))if(y.isBufferGeometry){var w,M,E,T,S,A=y.index,R=y.attributes.position,L=y.attributes.uv;if(null!==A)for(T=0,S=A.count;T<S;T+=3)w=A.getX(T),M=A.getX(T+1),E=A.getX(T+2),(v=x(this,p,e,R,L,w,M,E))&&(v.faceIndex=Math.floor(T/3),f.push(v));else if(void 0!==R)for(T=0,S=R.count;T<S;T+=3)(v=x(this,p,e,R,L,w=T,M=T+1,E=T+2))&&(v.faceIndex=Math.floor(T/3),f.push(v))}else if(y.isGeometry){var P,C,O,I,N=Array.isArray(_),D=y.vertices,U=y.faces,z=y.faceVertexUvs[0];z.length>0&&(I=z);for(var B=0,F=U.length;B<F;B++){var G=U[B],H=N?_[G.materialIndex]:_;if(void 0!==H){if(P=D[G.a],C=D[G.b],O=D[G.c],!0===H.morphTargets){var k=y.morphTargets,V=this.morphTargetInfluences;n.set(0,0,0),r.set(0,0,0),a.set(0,0,0);for(var j=0,W=k.length;j<W;j++){var X=V[j];if(0!==X){var q=k[j].vertices;n.addScaledVector(o.subVectors(q[G.a],P),X),r.addScaledVector(s.subVectors(q[G.b],C),X),a.addScaledVector(c.subVectors(q[G.c],O),X)}}n.add(P),r.add(C),a.add(O),P=n,C=r,O=a}if(v=g(this,H,p,e,P,C,O,d)){if(I&&I[B]){var Y=I[B];h.copy(Y[0]),l.copy(Y[1]),u.copy(Y[2]),v.uv=m(d,P,C,O,h,l,u)}v.face=G,v.faceIndex=B,f.push(v)}}}}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),Kt.prototype=Object.create(R.prototype),Kt.prototype.constructor=Kt,Kt.prototype.isCubeTexture=!0,Object.defineProperty(Kt.prototype,"images",{get:function(){return this.image},set:function(t){this.image=t}});var $t=new R,te=new Kt;function ee(){this.seq=[],this.map={}}var ie=[],ne=[],re=new Float32Array(16),ae=new Float32Array(9),oe=new Float32Array(4);function se(t,e,i){var n=t[0];if(n<=0||n>0)return t;var r=e*i,a=ie[r];if(void 0===a&&(a=new Float32Array(r),ie[r]=a),0!==e){n.toArray(a,0);for(var o=1,s=0;o!==e;++o)s+=i,t[o].toArray(a,s)}return a}function ce(t,e){if(t.length!==e.length)return!1;for(var i=0,n=t.length;i<n;i++)if(t[i]!==e[i])return!1;return!0}function he(t,e){for(var i=0,n=e.length;i<n;i++)t[i]=e[i]}function le(t,e){var i=ne[e];void 0===i&&(i=new Int32Array(e),ne[e]=i);for(var n=0;n!==e;++n)i[n]=t.allocTextureUnit();return i}function ue(t,e){var i=this.cache;i[0]!==e&&(t.uniform1f(this.addr,e),i[0]=e)}function pe(t,e){var i=this.cache;i[0]!==e&&(t.uniform1i(this.addr,e),i[0]=e)}function de(t,e){var i=this.cache;if(void 0!==e.x)i[0]===e.x&&i[1]===e.y||(t.uniform2f(this.addr,e.x,e.y),i[0]=e.x,i[1]=e.y);else{if(ce(i,e))return;t.uniform2fv(this.addr,e),he(i,e)}}function fe(t,e){var i=this.cache;if(void 0!==e.x)i[0]===e.x&&i[1]===e.y&&i[2]===e.z||(t.uniform3f(this.addr,e.x,e.y,e.z),i[0]=e.x,i[1]=e.y,i[2]=e.z);else if(void 0!==e.r)i[0]===e.r&&i[1]===e.g&&i[2]===e.b||(t.uniform3f(this.addr,e.r,e.g,e.b),i[0]=e.r,i[1]=e.g,i[2]=e.b);else{if(ce(i,e))return;t.uniform3fv(this.addr,e),he(i,e)}}function me(t,e){var i=this.cache;if(void 0!==e.x)i[0]===e.x&&i[1]===e.y&&i[2]===e.z&&i[3]===e.w||(t.uniform4f(this.addr,e.x,e.y,e.z,e.w),i[0]=e.x,i[1]=e.y,i[2]=e.z,i[3]=e.w);else{if(ce(i,e))return;t.uniform4fv(this.addr,e),he(i,e)}}function ge(t,e){var i=this.cache,n=e.elements;if(void 0===n){if(ce(i,e))return;t.uniformMatrix2fv(this.addr,!1,e),he(i,e)}else{if(ce(i,n))return;oe.set(n),t.uniformMatrix2fv(this.addr,!1,oe),he(i,n)}}function ve(t,e){var i=this.cache,n=e.elements;if(void 0===n){if(ce(i,e))return;t.uniformMatrix3fv(this.addr,!1,e),he(i,e)}else{if(ce(i,n))return;ae.set(n),t.uniformMatrix3fv(this.addr,!1,ae),he(i,n)}}function ye(t,e){var i=this.cache,n=e.elements;if(void 0===n){if(ce(i,e))return;t.uniformMatrix4fv(this.addr,!1,e),he(i,e)}else{if(ce(i,n))return;re.set(n),t.uniformMatrix4fv(this.addr,!1,re),he(i,n)}}function xe(t,e,i){var n=this.cache,r=i.allocTextureUnit();n[0]!==r&&(t.uniform1i(this.addr,r),n[0]=r),i.setTexture2D(e||$t,r)}function _e(t,e,i){var n=this.cache,r=i.allocTextureUnit();n[0]!==r&&(t.uniform1i(this.addr,r),n[0]=r),i.setTextureCube(e||te,r)}function be(t,e){var i=this.cache;ce(i,e)||(t.uniform2iv(this.addr,e),he(i,e))}function we(t,e){var i=this.cache;ce(i,e)||(t.uniform3iv(this.addr,e),he(i,e))}function Me(t,e){var i=this.cache;ce(i,e)||(t.uniform4iv(this.addr,e),he(i,e))}function Ee(t,e){var i=this.cache;ce(i,e)||(t.uniform1fv(this.addr,e),he(i,e))}function Te(t,e){var i=this.cache;ce(i,e)||(t.uniform1iv(this.addr,e),he(i,e))}function Se(t,e){var i=this.cache,n=se(e,this.size,2);ce(i,n)||(t.uniform2fv(this.addr,n),this.updateCache(n))}function Ae(t,e){var i=this.cache,n=se(e,this.size,3);ce(i,n)||(t.uniform3fv(this.addr,n),this.updateCache(n))}function Re(t,e){var i=this.cache,n=se(e,this.size,4);ce(i,n)||(t.uniform4fv(this.addr,n),this.updateCache(n))}function Le(t,e){var i=this.cache,n=se(e,this.size,4);ce(i,n)||(t.uniformMatrix2fv(this.addr,!1,n),this.updateCache(n))}function Pe(t,e){var i=this.cache,n=se(e,this.size,9);ce(i,n)||(t.uniformMatrix3fv(this.addr,!1,n),this.updateCache(n))}function Ce(t,e){var i=this.cache,n=se(e,this.size,16);ce(i,n)||(t.uniformMatrix4fv(this.addr,!1,n),this.updateCache(n))}function Oe(t,e,i){var n=this.cache,r=e.length,a=le(i,r);!1===ce(n,a)&&(t.uniform1iv(this.addr,a),he(n,a));for(var o=0;o!==r;++o)i.setTexture2D(e[o]||$t,a[o])}function Ie(t,e,i){var n=this.cache,r=e.length,a=le(i,r);!1===ce(n,a)&&(t.uniform1iv(this.addr,a),he(n,a));for(var o=0;o!==r;++o)i.setTextureCube(e[o]||te,a[o])}function Ne(t,e,i){this.id=t,this.addr=i,this.cache=[],this.setValue=function(t){switch(t){case 5126:return ue;case 35664:return de;case 35665:return fe;case 35666:return me;case 35674:return ge;case 35675:return ve;case 35676:return ye;case 35678:case 36198:return xe;case 35680:return _e;case 5124:case 35670:return pe;case 35667:case 35671:return be;case 35668:case 35672:return we;case 35669:case 35673:return Me}}(e.type)}function De(t,e,i){this.id=t,this.addr=i,this.cache=[],this.size=e.size,this.setValue=function(t){switch(t){case 5126:return Ee;case 35664:return Se;case 35665:return Ae;case 35666:return Re;case 35674:return Le;case 35675:return Pe;case 35676:return Ce;case 35678:return Oe;case 35680:return Ie;case 5124:case 35670:return Te;case 35667:case 35671:return be;case 35668:case 35672:return we;case 35669:case 35673:return Me}}(e.type)}function Ue(t){this.id=t,ee.call(this)}De.prototype.updateCache=function(t){var e=this.cache;t instanceof Float32Array&&e.length!==t.length&&(this.cache=new Float32Array(t.length)),he(e,t)},Ue.prototype.setValue=function(t,e){for(var i=this.seq,n=0,r=i.length;n!==r;++n){var a=i[n];a.setValue(t,e[a.id])}};var ze=/([\w\d_]+)(\])?(\[|\.)?/g;function Be(t,e){t.seq.push(e),t.map[e.id]=e}function Fe(t,e,i){var n=t.name,r=n.length;for(ze.lastIndex=0;;){var a=ze.exec(n),o=ze.lastIndex,s=a[1],c="]"===a[2],h=a[3];if(c&&(s|=0),void 0===h||"["===h&&o+2===r){Be(i,void 0===h?new Ne(s,t,e):new De(s,t,e));break}var l=i.map[s];void 0===l&&Be(i,l=new Ue(s)),i=l}}function Ge(t,e,i){ee.call(this),this.renderer=i;for(var n=t.getProgramParameter(e,t.ACTIVE_UNIFORMS),r=0;r<n;++r){var a=t.getActiveUniform(e,r);Fe(a,t.getUniformLocation(e,a.name),this)}}function He(t,e,i){var n=t.createShader(e);return t.shaderSource(n,i),t.compileShader(n),!1===t.getShaderParameter(n,t.COMPILE_STATUS)&&console.error("THREE.WebGLShader: Shader couldn't compile."),""!==t.getShaderInfoLog(n)&&console.warn("THREE.WebGLShader: gl.getShaderInfoLog()",e===t.VERTEX_SHADER?"vertex":"fragment",t.getShaderInfoLog(n),function(t){for(var e=t.split("\n"),i=0;i<e.length;i++)e[i]=i+1+": "+e[i];return e.join("\n")}(i)),n}Ge.prototype.setValue=function(t,e,i){var n=this.map[e];void 0!==n&&n.setValue(t,i,this.renderer)},Ge.prototype.setOptional=function(t,e,i){var n=e[i];void 0!==n&&this.setValue(t,i,n)},Ge.upload=function(t,e,i,n){for(var r=0,a=e.length;r!==a;++r){var o=e[r],s=i[o.id];!1!==s.needsUpdate&&o.setValue(t,s.value,n)}},Ge.seqWithValue=function(t,e){for(var i=[],n=0,r=t.length;n!==r;++n){var a=t[n];a.id in e&&i.push(a)}return i};var ke=0;function Ve(t){switch(t){case 3e3:return["Linear","( value )"];case 3001:return["sRGB","( value )"];case 3002:return["RGBE","( value )"];case 3004:return["RGBM","( value, 7.0 )"];case 3005:return["RGBM","( value, 16.0 )"];case 3006:return["RGBD","( value, 256.0 )"];case 3007:return["Gamma","( value, float( GAMMA_FACTOR ) )"];default:throw new Error("unsupported encoding: "+t)}}function je(t,e){var i=Ve(e);return"vec4 "+t+"( vec4 value ) { return "+i[0]+"ToLinear"+i[1]+"; }"}function We(t,e){var i;switch(e){case 1:i="Linear";break;case 2:i="Reinhard";break;case 3:i="Uncharted2";break;case 4:i="OptimizedCineon";break;default:throw new Error("unsupported toneMapping: "+e)}return"vec3 "+t+"( vec3 color ) { return "+i+"ToneMapping( color ); }"}function Xe(t){return""!==t}function qe(t,e){return t.replace(/NUM_DIR_LIGHTS/g,e.numDirLights).replace(/NUM_SPOT_LIGHTS/g,e.numSpotLights).replace(/NUM_RECT_AREA_LIGHTS/g,e.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,e.numPointLights).replace(/NUM_HEMI_LIGHTS/g,e.numHemiLights)}function Ye(t,e){return t.replace(/NUM_CLIPPING_PLANES/g,e.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,e.numClippingPlanes-e.numClipIntersection)}function Ze(t){return t.replace(/^[ \t]*#include +<([\w\d.]+)>/gm,(function(t,e){var i=B[e];if(void 0===i)throw new Error("Can not resolve #include <"+e+">");return Ze(i)}))}function Je(t){return t.replace(/#pragma unroll_loop[\s]+?for \( int i \= (\d+)\; i < (\d+)\; i \+\+ \) \{([\s\S]+?)(?=\})\}/g,(function(t,e,i,n){for(var r="",a=parseInt(e);a<parseInt(i);a++)r+=n.replace(/\[ i \]/g,"[ "+a+" ]");return r}))}function Qe(t,e,i,n,r,a){var o=t.context,s=n.defines,c=r.vertexShader,h=r.fragmentShader,l="SHADOWMAP_TYPE_BASIC";1===a.shadowMapType?l="SHADOWMAP_TYPE_PCF":2===a.shadowMapType&&(l="SHADOWMAP_TYPE_PCF_SOFT");var u="ENVMAP_TYPE_CUBE",p="ENVMAP_MODE_REFLECTION",d="ENVMAP_BLENDING_MULTIPLY";if(a.envMap){switch(n.envMap.mapping){case 301:case 302:u="ENVMAP_TYPE_CUBE";break;case 306:case 307:u="ENVMAP_TYPE_CUBE_UV";break;case 303:case 304:u="ENVMAP_TYPE_EQUIREC";break;case 305:u="ENVMAP_TYPE_SPHERE"}switch(n.envMap.mapping){case 302:case 304:p="ENVMAP_MODE_REFRACTION"}switch(n.combine){case 0:d="ENVMAP_BLENDING_MULTIPLY";break;case 1:d="ENVMAP_BLENDING_MIX";break;case 2:d="ENVMAP_BLENDING_ADD"}}var f,m,g,v,y,x=t.gammaFactor>0?t.gammaFactor:1,_=function(t,e,i){return[(t=t||{}).derivatives||e.envMapCubeUV||e.bumpMap||e.normalMap||e.flatShading?"#extension GL_OES_standard_derivatives : enable":"",(t.fragDepth||e.logarithmicDepthBuffer)&&i.get("EXT_frag_depth")?"#extension GL_EXT_frag_depth : enable":"",t.drawBuffers&&i.get("WEBGL_draw_buffers")?"#extension GL_EXT_draw_buffers : require":"",(t.shaderTextureLOD||e.envMap)&&i.get("EXT_shader_texture_lod")?"#extension GL_EXT_shader_texture_lod : enable":""].filter(Xe).join("\n")}(n.extensions,a,e),b=function(t){var e=[];for(var i in t){var n=t[i];!1!==n&&e.push("#define "+i+" "+n)}return e.join("\n")}(s),w=o.createProgram();n.isRawShaderMaterial?((f=[b].filter(Xe).join("\n")).length>0&&(f+="\n"),(m=[_,b].filter(Xe).join("\n")).length>0&&(m+="\n")):(f=["precision "+a.precision+" float;","precision "+a.precision+" int;","#define SHADER_NAME "+r.name,b,a.supportsVertexTextures?"#define VERTEX_TEXTURES":"","#define GAMMA_FACTOR "+x,"#define MAX_BONES "+a.maxBones,a.useFog&&a.fog?"#define USE_FOG":"",a.useFog&&a.fogExp?"#define FOG_EXP2":"",a.map?"#define USE_MAP":"",a.envMap?"#define USE_ENVMAP":"",a.envMap?"#define "+p:"",a.lightMap?"#define USE_LIGHTMAP":"",a.aoMap?"#define USE_AOMAP":"",a.emissiveMap?"#define USE_EMISSIVEMAP":"",a.bumpMap?"#define USE_BUMPMAP":"",a.normalMap?"#define USE_NORMALMAP":"",a.displacementMap&&a.supportsVertexTextures?"#define USE_DISPLACEMENTMAP":"",a.specularMap?"#define USE_SPECULARMAP":"",a.roughnessMap?"#define USE_ROUGHNESSMAP":"",a.metalnessMap?"#define USE_METALNESSMAP":"",a.alphaMap?"#define USE_ALPHAMAP":"",a.vertexColors?"#define USE_COLOR":"",a.flatShading?"#define FLAT_SHADED":"",a.skinning?"#define USE_SKINNING":"",a.useVertexTexture?"#define BONE_TEXTURE":"",a.morphTargets?"#define USE_MORPHTARGETS":"",a.morphNormals&&!1===a.flatShading?"#define USE_MORPHNORMALS":"",a.doubleSided?"#define DOUBLE_SIDED":"",a.flipSided?"#define FLIP_SIDED":"",a.shadowMapEnabled?"#define USE_SHADOWMAP":"",a.shadowMapEnabled?"#define "+l:"",a.sizeAttenuation?"#define USE_SIZEATTENUATION":"",a.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",a.logarithmicDepthBuffer&&e.get("EXT_frag_depth")?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_COLOR","\tattribute vec3 color;","#endif","#ifdef USE_MORPHTARGETS","\tattribute vec3 morphTarget0;","\tattribute vec3 morphTarget1;","\tattribute vec3 morphTarget2;","\tattribute vec3 morphTarget3;","\t#ifdef USE_MORPHNORMALS","\t\tattribute vec3 morphNormal0;","\t\tattribute vec3 morphNormal1;","\t\tattribute vec3 morphNormal2;","\t\tattribute vec3 morphNormal3;","\t#else","\t\tattribute vec3 morphTarget4;","\t\tattribute vec3 morphTarget5;","\t\tattribute vec3 morphTarget6;","\t\tattribute vec3 morphTarget7;","\t#endif","#endif","#ifdef USE_SKINNING","\tattribute vec4 skinIndex;","\tattribute vec4 skinWeight;","#endif","\n"].filter(Xe).join("\n"),m=[_,"precision "+a.precision+" float;","precision "+a.precision+" int;","#define SHADER_NAME "+r.name,b,a.alphaTest?"#define ALPHATEST "+a.alphaTest+(a.alphaTest%1?"":".0"):"","#define GAMMA_FACTOR "+x,a.useFog&&a.fog?"#define USE_FOG":"",a.useFog&&a.fogExp?"#define FOG_EXP2":"",a.map?"#define USE_MAP":"",a.envMap?"#define USE_ENVMAP":"",a.envMap?"#define "+u:"",a.envMap?"#define "+p:"",a.envMap?"#define "+d:"",a.lightMap?"#define USE_LIGHTMAP":"",a.aoMap?"#define USE_AOMAP":"",a.emissiveMap?"#define USE_EMISSIVEMAP":"",a.bumpMap?"#define USE_BUMPMAP":"",a.normalMap?"#define USE_NORMALMAP":"",a.specularMap?"#define USE_SPECULARMAP":"",a.roughnessMap?"#define USE_ROUGHNESSMAP":"",a.metalnessMap?"#define USE_METALNESSMAP":"",a.alphaMap?"#define USE_ALPHAMAP":"",a.vertexColors?"#define USE_COLOR":"",a.gradientMap?"#define USE_GRADIENTMAP":"",a.flatShading?"#define FLAT_SHADED":"",a.doubleSided?"#define DOUBLE_SIDED":"",a.flipSided?"#define FLIP_SIDED":"",a.shadowMapEnabled?"#define USE_SHADOWMAP":"",a.shadowMapEnabled?"#define "+l:"",a.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",a.physicallyCorrectLights?"#define PHYSICALLY_CORRECT_LIGHTS":"",a.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",a.logarithmicDepthBuffer&&e.get("EXT_frag_depth")?"#define USE_LOGDEPTHBUF_EXT":"",a.envMap&&e.get("EXT_shader_texture_lod")?"#define TEXTURE_LOD_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;",0!==a.toneMapping?"#define TONE_MAPPING":"",0!==a.toneMapping?B.tonemapping_pars_fragment:"",0!==a.toneMapping?We("toneMapping",a.toneMapping):"",a.dithering?"#define DITHERING":"",a.outputEncoding||a.mapEncoding||a.envMapEncoding||a.emissiveMapEncoding?B.encodings_pars_fragment:"",a.mapEncoding?je("mapTexelToLinear",a.mapEncoding):"",a.envMapEncoding?je("envMapTexelToLinear",a.envMapEncoding):"",a.emissiveMapEncoding?je("emissiveMapTexelToLinear",a.emissiveMapEncoding):"",a.outputEncoding?(g="linearToOutputTexel",v=a.outputEncoding,y=Ve(v),"vec4 "+g+"( vec4 value ) { return LinearTo"+y[0]+y[1]+"; }"):"",a.depthPacking?"#define DEPTH_PACKING "+n.depthPacking:"","\n"].filter(Xe).join("\n")),c=Ye(c=qe(c=Ze(c),a),a),h=Ye(h=qe(h=Ze(h),a),a);var M=f+(c=Je(c)),E=m+(h=Je(h)),T=He(o,o.VERTEX_SHADER,M),S=He(o,o.FRAGMENT_SHADER,E);o.attachShader(w,T),o.attachShader(w,S),void 0!==n.index0AttributeName?o.bindAttribLocation(w,0,n.index0AttributeName):!0===a.morphTargets&&o.bindAttribLocation(w,0,"position"),o.linkProgram(w);var A,R,L=o.getProgramInfoLog(w).trim(),P=o.getShaderInfoLog(T).trim(),C=o.getShaderInfoLog(S).trim(),O=!0,I=!0;return!1===o.getProgramParameter(w,o.LINK_STATUS)?(O=!1,console.error("THREE.WebGLProgram: shader error: ",o.getError(),"gl.VALIDATE_STATUS",o.getProgramParameter(w,o.VALIDATE_STATUS),"gl.getProgramInfoLog",L,P,C)):""!==L?console.warn("THREE.WebGLProgram: gl.getProgramInfoLog()",L):""!==P&&""!==C||(I=!1),I&&(this.diagnostics={runnable:O,material:n,programLog:L,vertexShader:{log:P,prefix:f},fragmentShader:{log:C,prefix:m}}),o.deleteShader(T),o.deleteShader(S),this.getUniforms=function(){return void 0===A&&(A=new Ge(o,w,t)),A},this.getAttributes=function(){return void 0===R&&(R=function(t,e){for(var i={},n=t.getProgramParameter(e,t.ACTIVE_ATTRIBUTES),r=0;r<n;r++){var a=t.getActiveAttrib(e,r).name;i[a]=t.getAttribLocation(e,a)}return i}(o,w)),R},this.destroy=function(){o.deleteProgram(w),this.program=void 0},Object.defineProperties(this,{uniforms:{get:function(){return console.warn("THREE.WebGLProgram: .uniforms is now .getUniforms()."),this.getUniforms()}},attributes:{get:function(){return console.warn("THREE.WebGLProgram: .attributes is now .getAttributes()."),this.getAttributes()}}}),this.name=r.name,this.id=ke++,this.code=i,this.usedTimes=1,this.program=w,this.vertexShader=T,this.fragmentShader=S,this}function Ke(t,e,i){var n=[],r={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"phong",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow"},a=["precision","supportsVertexTextures","map","mapEncoding","envMap","envMapMode","envMapEncoding","lightMap","aoMap","emissiveMap","emissiveMapEncoding","bumpMap","normalMap","displacementMap","specularMap","roughnessMap","metalnessMap","gradientMap","alphaMap","combine","vertexColors","fog","useFog","fogExp","flatShading","sizeAttenuation","logarithmicDepthBuffer","skinning","maxBones","useVertexTexture","morphTargets","morphNormals","maxMorphTargets","maxMorphNormals","premultipliedAlpha","numDirLights","numPointLights","numSpotLights","numHemiLights","numRectAreaLights","shadowMapEnabled","shadowMapType","toneMapping","physicallyCorrectLights","alphaTest","doubleSided","flipSided","numClippingPlanes","numClipIntersection","depthPacking","dithering"];function o(t,e){var i;return t?t.isTexture?i=t.encoding:t.isWebGLRenderTarget&&(console.warn("THREE.WebGLPrograms.getTextureEncodingFromMap: don't use render targets as textures. Use their .texture property instead."),i=t.texture.encoding):i=3e3,3e3===i&&e&&(i=3007),i}this.getParameters=function(e,n,a,s,c,h,l){var u=r[e.type],p=l.isSkinnedMesh?function(t){var e=t.skeleton.bones;if(i.floatVertexTextures)return 1024;var n=i.maxVertexUniforms,r=Math.floor((n-20)/4),a=Math.min(r,e.length);return a<e.length?(console.warn("THREE.WebGLRenderer: Skeleton has "+e.length+" bones. This GPU supports "+a+"."),0):a}(l):0,d=i.precision;null!==e.precision&&(d=i.getMaxPrecision(e.precision))!==e.precision&&console.warn("THREE.WebGLProgram.getParameters:",e.precision,"not supported, using",d,"instead.");var f=t.getRenderTarget();return{shaderID:u,precision:d,supportsVertexTextures:i.vertexTextures,outputEncoding:o(f?f.texture:null,t.gammaOutput),map:!!e.map,mapEncoding:o(e.map,t.gammaInput),envMap:!!e.envMap,envMapMode:e.envMap&&e.envMap.mapping,envMapEncoding:o(e.envMap,t.gammaInput),envMapCubeUV:!!e.envMap&&(306===e.envMap.mapping||307===e.envMap.mapping),lightMap:!!e.lightMap,aoMap:!!e.aoMap,emissiveMap:!!e.emissiveMap,emissiveMapEncoding:o(e.emissiveMap,t.gammaInput),bumpMap:!!e.bumpMap,normalMap:!!e.normalMap,displacementMap:!!e.displacementMap,roughnessMap:!!e.roughnessMap,metalnessMap:!!e.metalnessMap,specularMap:!!e.specularMap,alphaMap:!!e.alphaMap,gradientMap:!!e.gradientMap,combine:e.combine,vertexColors:e.vertexColors,fog:!!s,useFog:e.fog,fogExp:s&&s.isFogExp2,flatShading:e.flatShading,sizeAttenuation:e.sizeAttenuation,logarithmicDepthBuffer:i.logarithmicDepthBuffer,skinning:e.skinning&&p>0,maxBones:p,useVertexTexture:i.floatVertexTextures,morphTargets:e.morphTargets,morphNormals:e.morphNormals,maxMorphTargets:t.maxMorphTargets,maxMorphNormals:t.maxMorphNormals,numDirLights:n.directional.length,numPointLights:n.point.length,numSpotLights:n.spot.length,numRectAreaLights:n.rectArea.length,numHemiLights:n.hemi.length,numClippingPlanes:c,numClipIntersection:h,dithering:e.dithering,shadowMapEnabled:t.shadowMap.enabled&&l.receiveShadow&&a.length>0,shadowMapType:t.shadowMap.type,toneMapping:t.toneMapping,physicallyCorrectLights:t.physicallyCorrectLights,premultipliedAlpha:e.premultipliedAlpha,alphaTest:e.alphaTest,doubleSided:2===e.side,flipSided:1===e.side,depthPacking:void 0!==e.depthPacking&&e.depthPacking}},this.getProgramCode=function(e,i){var n=[];if(i.shaderID?n.push(i.shaderID):(n.push(e.fragmentShader),n.push(e.vertexShader)),void 0!==e.defines)for(var r in e.defines)n.push(r),n.push(e.defines[r]);for(var o=0;o<a.length;o++)n.push(i[a[o]]);return n.push(e.onBeforeCompile.toString()),n.push(t.gammaOutput),n.join()},this.acquireProgram=function(i,r,a,o){for(var s,c=0,h=n.length;c<h;c++){var l=n[c];if(l.code===o){++(s=l).usedTimes;break}}return void 0===s&&(s=new Qe(t,e,o,i,r,a),n.push(s)),s},this.releaseProgram=function(t){if(0==--t.usedTimes){var e=n.indexOf(t);n[e]=n[n.length-1],n.pop(),t.destroy()}},this.programs=n}function $e(){var t=new WeakMap;return{get:function(e){var i=t.get(e);return void 0===i&&(i={},t.set(e,i)),i},remove:function(e){t.delete(e)},update:function(e,i,n){t.get(e)[i]=n},dispose:function(){t=new WeakMap}}}function ti(t,e){return t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.program&&e.program&&t.program!==e.program?t.program.id-e.program.id:t.material.id!==e.material.id?t.material.id-e.material.id:t.z!==e.z?t.z-e.z:t.id-e.id}function ei(t,e){return t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.z!==e.z?e.z-t.z:t.id-e.id}function ii(){var t=[],e=0,i=[],n=[];return{opaque:i,transparent:n,init:function(){e=0,i.length=0,n.length=0},push:function(r,a,o,s,c){var h=t[e];void 0===h?(h={id:r.id,object:r,geometry:a,material:o,program:o.program,renderOrder:r.renderOrder,z:s,group:c},t[e]=h):(h.id=r.id,h.object=r,h.geometry=a,h.material=o,h.program=o.program,h.renderOrder=r.renderOrder,h.z=s,h.group=c),(!0===o.transparent?n:i).push(h),e++},sort:function(){i.length>1&&i.sort(ti),n.length>1&&n.sort(ei)}}}function ni(){var t={};return{get:function(e,i){var n=e.id+","+i.id,r=t[n];return void 0===r&&(r=new ii,t[n]=r),r},dispose:function(){t={}}}}function ri(){var t={};return{get:function(e){if(void 0!==t[e.id])return t[e.id];var i;switch(e.type){case"DirectionalLight":i={direction:new _,color:new H,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new v};break;case"SpotLight":i={position:new _,direction:new _,color:new H,distance:0,coneCos:0,penumbraCos:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new v};break;case"PointLight":i={position:new _,color:new H,distance:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new v,shadowCameraNear:1,shadowCameraFar:1e3};break;case"HemisphereLight":i={direction:new _,skyColor:new H,groundColor:new H};break;case"RectAreaLight":i={color:new H,position:new _,halfWidth:new _,halfHeight:new _}}return t[e.id]=i,i}}}var ai,oi,si,ci,hi,li,ui,pi,di=0;function fi(){var t=new ri,e={id:di++,hash:"",ambient:[0,0,0],directional:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotShadowMap:[],spotShadowMatrix:[],rectArea:[],point:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[]},i=new _,n=new y,r=new y;return{setup:function(a,o,s){for(var c=0,h=0,l=0,u=0,p=0,d=0,f=0,m=0,g=s.matrixWorldInverse,v=0,y=a.length;v<y;v++){var x=a[v],_=x.color,b=x.intensity,w=x.distance,M=x.shadow&&x.shadow.map?x.shadow.map.texture:null;if(x.isAmbientLight)c+=_.r*b,h+=_.g*b,l+=_.b*b;else if(x.isDirectionalLight){if((T=t.get(x)).color.copy(x.color).multiplyScalar(x.intensity),T.direction.setFromMatrixPosition(x.matrixWorld),i.setFromMatrixPosition(x.target.matrixWorld),T.direction.sub(i),T.direction.transformDirection(g),T.shadow=x.castShadow,x.castShadow){var E=x.shadow;T.shadowBias=E.bias,T.shadowRadius=E.radius,T.shadowMapSize=E.mapSize}e.directionalShadowMap[u]=M,e.directionalShadowMatrix[u]=x.shadow.matrix,e.directional[u]=T,u++}else if(x.isSpotLight){if((T=t.get(x)).position.setFromMatrixPosition(x.matrixWorld),T.position.applyMatrix4(g),T.color.copy(_).multiplyScalar(b),T.distance=w,T.direction.setFromMatrixPosition(x.matrixWorld),i.setFromMatrixPosition(x.target.matrixWorld),T.direction.sub(i),T.direction.transformDirection(g),T.coneCos=Math.cos(x.angle),T.penumbraCos=Math.cos(x.angle*(1-x.penumbra)),T.decay=0===x.distance?0:x.decay,T.shadow=x.castShadow,x.castShadow){E=x.shadow;T.shadowBias=E.bias,T.shadowRadius=E.radius,T.shadowMapSize=E.mapSize}e.spotShadowMap[d]=M,e.spotShadowMatrix[d]=x.shadow.matrix,e.spot[d]=T,d++}else if(x.isRectAreaLight){(T=t.get(x)).color.copy(_).multiplyScalar(b),T.position.setFromMatrixPosition(x.matrixWorld),T.position.applyMatrix4(g),r.identity(),n.copy(x.matrixWorld),n.premultiply(g),r.extractRotation(n),T.halfWidth.set(.5*x.width,0,0),T.halfHeight.set(0,.5*x.height,0),T.halfWidth.applyMatrix4(r),T.halfHeight.applyMatrix4(r),e.rectArea[f]=T,f++}else if(x.isPointLight){if((T=t.get(x)).position.setFromMatrixPosition(x.matrixWorld),T.position.applyMatrix4(g),T.color.copy(x.color).multiplyScalar(x.intensity),T.distance=x.distance,T.decay=0===x.distance?0:x.decay,T.shadow=x.castShadow,x.castShadow){E=x.shadow;T.shadowBias=E.bias,T.shadowRadius=E.radius,T.shadowMapSize=E.mapSize,T.shadowCameraNear=E.camera.near,T.shadowCameraFar=E.camera.far}e.pointShadowMap[p]=M,e.pointShadowMatrix[p]=x.shadow.matrix,e.point[p]=T,p++}else if(x.isHemisphereLight){var T;(T=t.get(x)).direction.setFromMatrixPosition(x.matrixWorld),T.direction.transformDirection(g),T.direction.normalize(),T.skyColor.copy(x.color).multiplyScalar(b),T.groundColor.copy(x.groundColor).multiplyScalar(b),e.hemi[m]=T,m++}}e.ambient[0]=c,e.ambient[1]=h,e.ambient[2]=l,e.directional.length=u,e.spot.length=d,e.rectArea.length=f,e.point.length=p,e.hemi.length=m,e.hash=e.id+","+u+","+p+","+d+","+f+","+m+","+o.length},state:e}}function mi(){var t=new fi,e=[],i=[],n=[];return{init:function(){e.length=0,i.length=0,n.length=0},state:{lightsArray:e,shadowsArray:i,spritesArray:n,lights:t},setupLights:function(n){t.setup(e,i,n)},pushLight:function(t){e.push(t)},pushShadow:function(t){i.push(t)},pushSprite:function(t){n.push(t)}}}function gi(){var t={};return{get:function(e,i){var n=e.id+","+i.id,r=t[n];return void 0===r&&(r=new mi,t[n]=r),r},dispose:function(){t={}}}}function vi(t){Nt.call(this),this.type="MeshDepthMaterial",this.depthPacking=3200,this.skinning=!1,this.morphTargets=!1,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.setValues(t)}function yi(t){Nt.call(this),this.type="MeshDistanceMaterial",this.referencePosition=new _,this.nearDistance=1,this.farDistance=1e3,this.skinning=!1,this.morphTargets=!1,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.fog=!1,this.lights=!1,this.setValues(t)}function xi(t,e,i){for(var n=new U,r=new y,a=new v,o=new v(i,i),s=new _,c=new _,h=new Array(4),l=new Array(4),u={},p={0:1,1:0,2:2},d=[new _(1,0,0),new _(-1,0,0),new _(0,0,1),new _(0,0,-1),new _(0,1,0),new _(0,-1,0)],f=[new _(0,1,0),new _(0,1,0),new _(0,1,0),new _(0,1,0),new _(0,0,1),new _(0,0,-1)],m=[new L,new L,new L,new L,new L,new L],g=0;4!==g;++g){var x=0!=(1&g),b=0!=(2&g),w=new vi({depthPacking:3201,morphTargets:x,skinning:b});h[g]=w;var M=new yi({morphTargets:x,skinning:b});l[g]=M}var E=this;function T(e,i,n,r,a,o){var s=e.geometry,c=null,d=h,f=e.customDepthMaterial;if(n&&(d=l,f=e.customDistanceMaterial),f)c=f;else{var m=!1;i.morphTargets&&(s&&s.isBufferGeometry?m=s.morphAttributes&&s.morphAttributes.position&&s.morphAttributes.position.length>0:s&&s.isGeometry&&(m=s.morphTargets&&s.morphTargets.length>0)),e.isSkinnedMesh&&!1===i.skinning&&console.warn("THREE.WebGLShadowMap: THREE.SkinnedMesh with material.skinning set to false:",e);var g=0;m&&(g|=1),e.isSkinnedMesh&&i.skinning&&(g|=2),c=d[g]}if(t.localClippingEnabled&&!0===i.clipShadows&&0!==i.clippingPlanes.length){var v=c.uuid,y=i.uuid,x=u[v];void 0===x&&(x={},u[v]=x);var _=x[y];void 0===_&&(_=c.clone(),x[y]=_),c=_}return c.visible=i.visible,c.wireframe=i.wireframe,c.side=null!=i.shadowSide?i.shadowSide:p[i.side],c.clipShadows=i.clipShadows,c.clippingPlanes=i.clippingPlanes,c.clipIntersection=i.clipIntersection,c.wireframeLinewidth=i.wireframeLinewidth,c.linewidth=i.linewidth,n&&c.isMeshDistanceMaterial&&(c.referencePosition.copy(r),c.nearDistance=a,c.farDistance=o),c}function S(i,r,a,o){if(!1!==i.visible){if(i.layers.test(r.layers)&&(i.isMesh||i.isLine||i.isPoints)&&i.castShadow&&(!i.frustumCulled||n.intersectsObject(i))){i.modelViewMatrix.multiplyMatrices(a.matrixWorldInverse,i.matrixWorld);var s=e.update(i),h=i.material;if(Array.isArray(h))for(var l=s.groups,u=0,p=l.length;u<p;u++){var d=l[u],f=h[d.materialIndex];if(f&&f.visible){var m=T(i,f,o,c,a.near,a.far);t.renderBufferDirect(a,null,s,m,i,d)}}else if(h.visible){m=T(i,h,o,c,a.near,a.far);t.renderBufferDirect(a,null,s,m,i,null)}}for(var g=i.children,v=0,y=g.length;v<y;v++)S(g[v],r,a,o)}}this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=1,this.render=function(e,i,h){if(!1!==E.enabled&&(!1!==E.autoUpdate||!1!==E.needsUpdate)&&0!==e.length){var l,u=t.context,p=t.state;p.disable(u.BLEND),p.buffers.color.setClear(1,1,1,1),p.buffers.depth.setTest(!0),p.setScissorTest(!1);for(var g=0,v=e.length;g<v;g++){var y=e[g],x=y.shadow,_=y&&y.isPointLight;if(void 0!==x){var b=x.camera;if(a.copy(x.mapSize),a.min(o),_){var w=a.x,M=a.y;m[0].set(2*w,M,w,M),m[1].set(0,M,w,M),m[2].set(3*w,M,w,M),m[3].set(w,M,w,M),m[4].set(3*w,0,w,M),m[5].set(w,0,w,M),a.x*=4,a.y*=2}if(null===x.map){var T={minFilter:1003,magFilter:1003,format:1023};x.map=new P(a.x,a.y,T),x.map.texture.name=y.name+".shadowMap",b.updateProjectionMatrix()}x.isSpotLightShadow&&x.update(y);var A=x.map,R=x.matrix;c.setFromMatrixPosition(y.matrixWorld),b.position.copy(c),_?(l=6,R.makeTranslation(-c.x,-c.y,-c.z)):(l=1,s.setFromMatrixPosition(y.target.matrixWorld),b.lookAt(s),b.updateMatrixWorld(),R.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),R.multiply(b.projectionMatrix),R.multiply(b.matrixWorldInverse)),t.setRenderTarget(A),t.clear();for(var L=0;L<l;L++){if(_){s.copy(b.position),s.add(d[L]),b.up.copy(f[L]),b.lookAt(s),b.updateMatrixWorld();var C=m[L];p.viewport(C)}r.multiplyMatrices(b.projectionMatrix,b.matrixWorldInverse),n.setFromMatrix(r),S(i,h,b,_)}}else console.warn("THREE.WebGLShadowMap:",y,"has no shadow.")}E.needsUpdate=!1}}}function _i(t,e,i,n,r,a,o,s,c){R.call(this,t,e,i,n,r,a,o,s,c),this.needsUpdate=!0}function bi(t,e,i,n,r){var a,o,s,c,h,l,u=new _,p=new x,d=new _;function f(){var t=new Float32Array([-.5,-.5,0,0,.5,-.5,1,0,.5,.5,1,1,-.5,.5,0,1]),i=new Uint16Array([0,1,2,0,2,3]);a=e.createBuffer(),o=e.createBuffer(),e.bindBuffer(e.ARRAY_BUFFER,a),e.bufferData(e.ARRAY_BUFFER,t,e.STATIC_DRAW),e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,o),e.bufferData(e.ELEMENT_ARRAY_BUFFER,i,e.STATIC_DRAW),s=function(){var t=e.createProgram(),i=e.createShader(e.VERTEX_SHADER),n=e.createShader(e.FRAGMENT_SHADER);return e.shaderSource(i,["precision "+r.precision+" float;","#define SHADER_NAME SpriteMaterial","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform float rotation;","uniform vec2 center;","uniform vec2 scale;","uniform vec2 uvOffset;","uniform vec2 uvScale;","attribute vec2 position;","attribute vec2 uv;","varying vec2 vUV;","varying float fogDepth;","void main() {","\tvUV = uvOffset + uv * uvScale;","\tvec2 alignedPosition = ( position - center ) * scale;","\tvec2 rotatedPosition;","\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;","\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;","\tvec4 mvPosition;","\tmvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );","\tmvPosition.xy += rotatedPosition;","\tgl_Position = projectionMatrix * mvPosition;","\tfogDepth = - mvPosition.z;","}"].join("\n")),e.shaderSource(n,["precision "+r.precision+" float;","#define SHADER_NAME SpriteMaterial","uniform vec3 color;","uniform sampler2D map;","uniform float opacity;","uniform int fogType;","uniform vec3 fogColor;","uniform float fogDensity;","uniform float fogNear;","uniform float fogFar;","uniform float alphaTest;","varying vec2 vUV;","varying float fogDepth;","void main() {","\tvec4 texture = texture2D( map, vUV );","\tgl_FragColor = vec4( color * texture.xyz, texture.a * opacity );","\tif ( gl_FragColor.a < alphaTest ) discard;","\tif ( fogType > 0 ) {","\t\tfloat fogFactor = 0.0;","\t\tif ( fogType == 1 ) {","\t\t\tfogFactor = smoothstep( fogNear, fogFar, fogDepth );","\t\t} else {","\t\t\tconst float LOG2 = 1.442695;","\t\t\tfogFactor = exp2( - fogDensity * fogDensity * fogDepth * fogDepth * LOG2 );","\t\t\tfogFactor = 1.0 - clamp( fogFactor, 0.0, 1.0 );","\t\t}","\t\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );","\t}","}"].join("\n")),e.compileShader(i),e.compileShader(n),e.attachShader(t,i),e.attachShader(t,n),e.linkProgram(t),t}(),c={position:e.getAttribLocation(s,"position"),uv:e.getAttribLocation(s,"uv")},h={uvOffset:e.getUniformLocation(s,"uvOffset"),uvScale:e.getUniformLocation(s,"uvScale"),rotation:e.getUniformLocation(s,"rotation"),center:e.getUniformLocation(s,"center"),scale:e.getUniformLocation(s,"scale"),color:e.getUniformLocation(s,"color"),map:e.getUniformLocation(s,"map"),opacity:e.getUniformLocation(s,"opacity"),modelViewMatrix:e.getUniformLocation(s,"modelViewMatrix"),projectionMatrix:e.getUniformLocation(s,"projectionMatrix"),fogType:e.getUniformLocation(s,"fogType"),fogDensity:e.getUniformLocation(s,"fogDensity"),fogNear:e.getUniformLocation(s,"fogNear"),fogFar:e.getUniformLocation(s,"fogFar"),fogColor:e.getUniformLocation(s,"fogColor"),fogDepth:e.getUniformLocation(s,"fogDepth"),alphaTest:e.getUniformLocation(s,"alphaTest")};var n=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");n.width=8,n.height=8;var u=n.getContext("2d");u.fillStyle="white",u.fillRect(0,0,8,8),l=new _i(n)}function m(t,e){return t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.z!==e.z?e.z-t.z:e.id-t.id}this.render=function(r,g,v){if(0!==r.length){void 0===s&&f(),i.useProgram(s),i.initAttributes(),i.enableAttribute(c.position),i.enableAttribute(c.uv),i.disableUnusedAttributes(),i.disable(e.CULL_FACE),i.enable(e.BLEND),e.bindBuffer(e.ARRAY_BUFFER,a),e.vertexAttribPointer(c.position,2,e.FLOAT,!1,16,0),e.vertexAttribPointer(c.uv,2,e.FLOAT,!1,16,8),e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,o),e.uniformMatrix4fv(h.projectionMatrix,!1,v.projectionMatrix.elements),i.activeTexture(e.TEXTURE0),e.uniform1i(h.map,0);var y=0,x=0,_=g.fog;_?(e.uniform3f(h.fogColor,_.color.r,_.color.g,_.color.b),_.isFog?(e.uniform1f(h.fogNear,_.near),e.uniform1f(h.fogFar,_.far),e.uniform1i(h.fogType,1),y=1,x=1):_.isFogExp2&&(e.uniform1f(h.fogDensity,_.density),e.uniform1i(h.fogType,2),y=2,x=2)):(e.uniform1i(h.fogType,0),y=0,x=0);for(var b=0,w=r.length;b<w;b++){(T=r[b]).modelViewMatrix.multiplyMatrices(v.matrixWorldInverse,T.matrixWorld),T.z=-T.modelViewMatrix.elements[14]}r.sort(m);var M=[],E=[];for(b=0,w=r.length;b<w;b++){var T,S=(T=r[b]).material;if(!1!==S.visible){T.onBeforeRender(t,g,v,void 0,S,void 0),e.uniform1f(h.alphaTest,S.alphaTest),e.uniformMatrix4fv(h.modelViewMatrix,!1,T.modelViewMatrix.elements),T.matrixWorld.decompose(u,p,d),M[0]=d.x,M[1]=d.y,E[0]=T.center.x-.5,E[1]=T.center.y-.5;var A=0;g.fog&&S.fog&&(A=x),y!==A&&(e.uniform1i(h.fogType,A),y=A),null!==S.map?(e.uniform2f(h.uvOffset,S.map.offset.x,S.map.offset.y),e.uniform2f(h.uvScale,S.map.repeat.x,S.map.repeat.y)):(e.uniform2f(h.uvOffset,0,0),e.uniform2f(h.uvScale,1,1)),e.uniform1f(h.opacity,S.opacity),e.uniform3f(h.color,S.color.r,S.color.g,S.color.b),e.uniform1f(h.rotation,S.rotation),e.uniform2fv(h.center,E),e.uniform2fv(h.scale,M),i.setBlending(S.blending,S.blendEquation,S.blendSrc,S.blendDst,S.blendEquationAlpha,S.blendSrcAlpha,S.blendDstAlpha,S.premultipliedAlpha),i.buffers.depth.setTest(S.depthTest),i.buffers.depth.setMask(S.depthWrite),i.buffers.color.setMask(S.colorWrite),n.setTexture2D(S.map||l,0),e.drawElements(e.TRIANGLES,6,e.UNSIGNED_SHORT,0),T.onAfterRender(t,g,v,void 0,S,void 0)}}i.enable(e.CULL_FACE),i.reset()}}}function wi(t,e,i){var n=new function(){var e=!1,i=new L,n=null,r=new L(0,0,0,0);return{setMask:function(i){n===i||e||(t.colorMask(i,i,i,i),n=i)},setLocked:function(t){e=t},setClear:function(e,n,a,o,s){!0===s&&(e*=o,n*=o,a*=o),i.set(e,n,a,o),!1===r.equals(i)&&(t.clearColor(e,n,a,o),r.copy(i))},reset:function(){e=!1,n=null,r.set(-1,0,0,0)}}},r=new function(){var e=!1,i=null,n=null,r=null;return{setTest:function(e){e?B(t.DEPTH_TEST):F(t.DEPTH_TEST)},setMask:function(n){i===n||e||(t.depthMask(n),i=n)},setFunc:function(e){if(n!==e){if(e)switch(e){case 0:t.depthFunc(t.NEVER);break;case 1:t.depthFunc(t.ALWAYS);break;case 2:t.depthFunc(t.LESS);break;case 3:t.depthFunc(t.LEQUAL);break;case 4:t.depthFunc(t.EQUAL);break;case 5:t.depthFunc(t.GEQUAL);break;case 6:t.depthFunc(t.GREATER);break;case 7:t.depthFunc(t.NOTEQUAL);break;default:t.depthFunc(t.LEQUAL)}else t.depthFunc(t.LEQUAL);n=e}},setLocked:function(t){e=t},setClear:function(e){r!==e&&(t.clearDepth(e),r=e)},reset:function(){e=!1,i=null,n=null,r=null}}},a=new function(){var e=!1,i=null,n=null,r=null,a=null,o=null,s=null,c=null,h=null;return{setTest:function(e){e?B(t.STENCIL_TEST):F(t.STENCIL_TEST)},setMask:function(n){i===n||e||(t.stencilMask(n),i=n)},setFunc:function(e,i,o){n===e&&r===i&&a===o||(t.stencilFunc(e,i,o),n=e,r=i,a=o)},setOp:function(e,i,n){o===e&&s===i&&c===n||(t.stencilOp(e,i,n),o=e,s=i,c=n)},setLocked:function(t){e=t},setClear:function(e){h!==e&&(t.clearStencil(e),h=e)},reset:function(){e=!1,i=null,n=null,r=null,a=null,o=null,s=null,c=null,h=null}}},o=t.getParameter(t.MAX_VERTEX_ATTRIBS),s=new Uint8Array(o),c=new Uint8Array(o),h=new Uint8Array(o),l={},u=null,p=null,d=null,f=null,m=null,g=null,v=null,y=null,x=null,_=!1,b=null,w=null,M=null,E=null,T=null,S=t.getParameter(t.MAX_COMBINED_TEXTURE_IMAGE_UNITS),A=!1,R=0,P=t.getParameter(t.VERSION);-1!==P.indexOf("WebGL")?(R=parseFloat(/^WebGL\ ([0-9])/.exec(P)[1]),A=R>=1):-1!==P.indexOf("OpenGL ES")&&(R=parseFloat(/^OpenGL\ ES\ ([0-9])/.exec(P)[1]),A=R>=2);var C=null,O={},I=new L,N=new L;function D(e,i,n){var r=new Uint8Array(4),a=t.createTexture();t.bindTexture(e,a),t.texParameteri(e,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(e,t.TEXTURE_MAG_FILTER,t.NEAREST);for(var o=0;o<n;o++)t.texImage2D(i+o,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,r);return a}var U={};function z(i,n){(s[i]=1,0===c[i]&&(t.enableVertexAttribArray(i),c[i]=1),h[i]!==n)&&(e.get("ANGLE_instanced_arrays").vertexAttribDivisorANGLE(i,n),h[i]=n)}function B(e){!0!==l[e]&&(t.enable(e),l[e]=!0)}function F(e){!1!==l[e]&&(t.disable(e),l[e]=!1)}function G(e,n,r,a,o,s,c,h){if(0!==e?B(t.BLEND):F(t.BLEND),5!==e){if(e!==d||h!==_)switch(e){case 2:h?(t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.ONE,t.ONE,t.ONE,t.ONE)):(t.blendEquation(t.FUNC_ADD),t.blendFunc(t.SRC_ALPHA,t.ONE));break;case 3:h?(t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.ZERO,t.ZERO,t.ONE_MINUS_SRC_COLOR,t.ONE_MINUS_SRC_ALPHA)):(t.blendEquation(t.FUNC_ADD),t.blendFunc(t.ZERO,t.ONE_MINUS_SRC_COLOR));break;case 4:h?(t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.ZERO,t.SRC_COLOR,t.ZERO,t.SRC_ALPHA)):(t.blendEquation(t.FUNC_ADD),t.blendFunc(t.ZERO,t.SRC_COLOR));break;default:h?(t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.ONE,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA)):(t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.SRC_ALPHA,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA))}f=null,m=null,g=null,v=null,y=null,x=null}else o=o||n,s=s||r,c=c||a,n===f&&o===v||(t.blendEquationSeparate(i.convert(n),i.convert(o)),f=n,v=o),r===m&&a===g&&s===y&&c===x||(t.blendFuncSeparate(i.convert(r),i.convert(a),i.convert(s),i.convert(c)),m=r,g=a,y=s,x=c);d=e,_=h}function H(e){b!==e&&(e?t.frontFace(t.CW):t.frontFace(t.CCW),b=e)}function k(e){0!==e?(B(t.CULL_FACE),e!==w&&(1===e?t.cullFace(t.BACK):2===e?t.cullFace(t.FRONT):t.cullFace(t.FRONT_AND_BACK))):F(t.CULL_FACE),w=e}function V(e,i,n){e?(B(t.POLYGON_OFFSET_FILL),E===i&&T===n||(t.polygonOffset(i,n),E=i,T=n)):F(t.POLYGON_OFFSET_FILL)}function j(e){void 0===e&&(e=t.TEXTURE0+S-1),C!==e&&(t.activeTexture(e),C=e)}return U[t.TEXTURE_2D]=D(t.TEXTURE_2D,t.TEXTURE_2D,1),U[t.TEXTURE_CUBE_MAP]=D(t.TEXTURE_CUBE_MAP,t.TEXTURE_CUBE_MAP_POSITIVE_X,6),n.setClear(0,0,0,1),r.setClear(1),a.setClear(0),B(t.DEPTH_TEST),r.setFunc(3),H(!1),k(1),B(t.CULL_FACE),B(t.BLEND),G(1),{buffers:{color:n,depth:r,stencil:a},initAttributes:function(){for(var t=0,e=s.length;t<e;t++)s[t]=0},enableAttribute:function(t){z(t,0)},enableAttributeAndDivisor:z,disableUnusedAttributes:function(){for(var e=0,i=c.length;e!==i;++e)c[e]!==s[e]&&(t.disableVertexAttribArray(e),c[e]=0)},enable:B,disable:F,getCompressedTextureFormats:function(){if(null===u&&(u=[],e.get("WEBGL_compressed_texture_pvrtc")||e.get("WEBGL_compressed_texture_s3tc")||e.get("WEBGL_compressed_texture_etc1")||e.get("WEBGL_compressed_texture_astc")))for(var i=t.getParameter(t.COMPRESSED_TEXTURE_FORMATS),n=0;n<i.length;n++)u.push(i[n]);return u},useProgram:function(e){return p!==e&&(t.useProgram(e),p=e,!0)},setBlending:G,setMaterial:function(e,i){2===e.side?F(t.CULL_FACE):B(t.CULL_FACE);var a=1===e.side;i&&(a=!a),H(a),!0===e.transparent?G(e.blending,e.blendEquation,e.blendSrc,e.blendDst,e.blendEquationAlpha,e.blendSrcAlpha,e.blendDstAlpha,e.premultipliedAlpha):G(0),r.setFunc(e.depthFunc),r.setTest(e.depthTest),r.setMask(e.depthWrite),n.setMask(e.colorWrite),V(e.polygonOffset,e.polygonOffsetFactor,e.polygonOffsetUnits)},setFlipSided:H,setCullFace:k,setLineWidth:function(e){e!==M&&(A&&t.lineWidth(e),M=e)},setPolygonOffset:V,setScissorTest:function(e){e?B(t.SCISSOR_TEST):F(t.SCISSOR_TEST)},activeTexture:j,bindTexture:function(e,i){null===C&&j();var n=O[C];void 0===n&&(n={type:void 0,texture:void 0},O[C]=n),n.type===e&&n.texture===i||(t.bindTexture(e,i||U[e]),n.type=e,n.texture=i)},compressedTexImage2D:function(){try{t.compressedTexImage2D.apply(t,arguments)}catch(t){console.error("THREE.WebGLState:",t)}},texImage2D:function(){try{t.texImage2D.apply(t,arguments)}catch(t){console.error("THREE.WebGLState:",t)}},scissor:function(e){!1===I.equals(e)&&(t.scissor(e.x,e.y,e.z,e.w),I.copy(e))},viewport:function(e){!1===N.equals(e)&&(t.viewport(e.x,e.y,e.z,e.w),N.copy(e))},reset:function(){for(var e=0;e<c.length;e++)1===c[e]&&(t.disableVertexAttribArray(e),c[e]=0);l={},u=null,C=null,O={},p=null,d=null,b=null,w=null,n.reset(),r.reset(),a.reset()}}}function Mi(t,e,i,n,r,a,o){var s,c="undefined"!=typeof WebGL2RenderingContext&&t instanceof WebGL2RenderingContext,h={};function l(t,e){if(t.width>e||t.height>e){if("data"in t)return void console.warn("THREE.WebGLRenderer: image in DataTexture is too big ("+t.width+"x"+t.height+").");var i=e/Math.max(t.width,t.height),n=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");return n.width=Math.floor(t.width*i),n.height=Math.floor(t.height*i),n.getContext("2d").drawImage(t,0,0,t.width,t.height,0,0,n.width,n.height),console.warn("THREE.WebGLRenderer: image is too big ("+t.width+"x"+t.height+"). Resized to "+n.width+"x"+n.height,t),n}return t}function u(t){return g.isPowerOfTwo(t.width)&&g.isPowerOfTwo(t.height)}function p(t,e){return t.generateMipmaps&&e&&1003!==t.minFilter&&1006!==t.minFilter}function d(e,i,r,a){t.generateMipmap(e),n.get(i).__maxMipLevel=Math.log(Math.max(r,a))*Math.LOG2E}function f(e){return 1003===e||1004===e||1005===e?t.NEAREST:t.LINEAR}function m(e){var i=e.target;i.removeEventListener("dispose",m),function(e){var i=n.get(e);if(e.image&&i.__image__webglTextureCube)t.deleteTexture(i.__image__webglTextureCube);else{if(void 0===i.__webglInit)return;t.deleteTexture(i.__webglTexture)}n.remove(e)}(i),i.isVideoTexture&&delete h[i.id],o.memory.textures--}function v(e){var i=e.target;i.removeEventListener("dispose",v),function(e){var i=n.get(e),r=n.get(e.texture);if(!e)return;void 0!==r.__webglTexture&&t.deleteTexture(r.__webglTexture);e.depthTexture&&e.depthTexture.dispose();if(e.isWebGLRenderTargetCube)for(var a=0;a<6;a++)t.deleteFramebuffer(i.__webglFramebuffer[a]),i.__webglDepthbuffer&&t.deleteRenderbuffer(i.__webglDepthbuffer[a]);else t.deleteFramebuffer(i.__webglFramebuffer),i.__webglDepthbuffer&&t.deleteRenderbuffer(i.__webglDepthbuffer);n.remove(e.texture),n.remove(e)}(i),o.memory.textures--}function y(e,f){var v=n.get(e);if(e.isVideoTexture&&function(t){var e=t.id,i=o.render.frame;h[e]!==i&&(h[e]=i,t.update())}(e),e.version>0&&v.__version!==e.version){var y=e.image;if(void 0===y)console.warn("THREE.WebGLRenderer: Texture marked for update but image is undefined",e);else{if(!1!==y.complete)return void function(e,n,h){void 0===e.__webglInit&&(e.__webglInit=!0,n.addEventListener("dispose",m),e.__webglTexture=t.createTexture(),o.memory.textures++);i.activeTexture(t.TEXTURE0+h),i.bindTexture(t.TEXTURE_2D,e.__webglTexture),t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,n.flipY),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,n.premultiplyAlpha),t.pixelStorei(t.UNPACK_ALIGNMENT,n.unpackAlignment);var f=l(n.image,r.maxTextureSize);(function(t){return 1001!==t.wrapS||1001!==t.wrapT||1003!==t.minFilter&&1006!==t.minFilter})(n)&&!1===u(f)&&(f=function(t){return t instanceof HTMLImageElement||t instanceof HTMLCanvasElement||t instanceof ImageBitmap?(void 0===s&&(s=document.createElementNS("http://www.w3.org/1999/xhtml","canvas")),s.width=g.floorPowerOfTwo(t.width),s.height=g.floorPowerOfTwo(t.height),s.getContext("2d").drawImage(t,0,0,s.width,s.height),console.warn("THREE.WebGLRenderer: image is not power of two ("+t.width+"x"+t.height+"). Resized to "+s.width+"x"+s.height,t),s):t}(f));var v=u(f),y=a.convert(n.format),_=a.convert(n.type);x(t.TEXTURE_2D,n,v);var b,w=n.mipmaps;if(n.isDepthTexture){var M=t.DEPTH_COMPONENT;if(1015===n.type){if(!c)throw new Error("Float Depth Texture only supported in WebGL2.0");M=t.DEPTH_COMPONENT32F}else c&&(M=t.DEPTH_COMPONENT16);1026===n.format&&M===t.DEPTH_COMPONENT&&1012!==n.type&&1014!==n.type&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),n.type=1012,_=a.convert(n.type)),1027===n.format&&(M=t.DEPTH_STENCIL,1020!==n.type&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),n.type=1020,_=a.convert(n.type))),i.texImage2D(t.TEXTURE_2D,0,M,f.width,f.height,0,y,_,null)}else if(n.isDataTexture)if(w.length>0&&v){for(var E=0,T=w.length;E<T;E++)b=w[E],i.texImage2D(t.TEXTURE_2D,E,y,b.width,b.height,0,y,_,b.data);n.generateMipmaps=!1,e.__maxMipLevel=w.length-1}else i.texImage2D(t.TEXTURE_2D,0,y,f.width,f.height,0,y,_,f.data),e.__maxMipLevel=0;else if(n.isCompressedTexture){for(E=0,T=w.length;E<T;E++)b=w[E],1023!==n.format&&1022!==n.format?i.getCompressedTextureFormats().indexOf(y)>-1?i.compressedTexImage2D(t.TEXTURE_2D,E,y,b.width,b.height,0,b.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):i.texImage2D(t.TEXTURE_2D,E,y,b.width,b.height,0,y,_,b.data);e.__maxMipLevel=w.length-1}else if(w.length>0&&v){for(E=0,T=w.length;E<T;E++)b=w[E],i.texImage2D(t.TEXTURE_2D,E,y,y,_,b);n.generateMipmaps=!1,e.__maxMipLevel=w.length-1}else i.texImage2D(t.TEXTURE_2D,0,y,y,_,f),e.__maxMipLevel=0;p(n,v)&&d(t.TEXTURE_2D,n,f.width,f.height);e.__version=n.version,n.onUpdate&&n.onUpdate(n)}(v,e,f);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete",e)}}i.activeTexture(t.TEXTURE0+f),i.bindTexture(t.TEXTURE_2D,v.__webglTexture)}function x(i,o,s){var c;if(s?(t.texParameteri(i,t.TEXTURE_WRAP_S,a.convert(o.wrapS)),t.texParameteri(i,t.TEXTURE_WRAP_T,a.convert(o.wrapT)),t.texParameteri(i,t.TEXTURE_MAG_FILTER,a.convert(o.magFilter)),t.texParameteri(i,t.TEXTURE_MIN_FILTER,a.convert(o.minFilter))):(t.texParameteri(i,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(i,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),1001===o.wrapS&&1001===o.wrapT||console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping.",o),t.texParameteri(i,t.TEXTURE_MAG_FILTER,f(o.magFilter)),t.texParameteri(i,t.TEXTURE_MIN_FILTER,f(o.minFilter)),1003!==o.minFilter&&1006!==o.minFilter&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.",o)),c=e.get("EXT_texture_filter_anisotropic")){if(1015===o.type&&null===e.get("OES_texture_float_linear"))return;if(1016===o.type&&null===e.get("OES_texture_half_float_linear"))return;(o.anisotropy>1||n.get(o).__currentAnisotropy)&&(t.texParameterf(i,c.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(o.anisotropy,r.getMaxAnisotropy())),n.get(o).__currentAnisotropy=o.anisotropy)}}function _(e,r,o,s){var c=a.convert(r.texture.format),h=a.convert(r.texture.type);i.texImage2D(s,0,c,r.width,r.height,0,c,h,null),t.bindFramebuffer(t.FRAMEBUFFER,e),t.framebufferTexture2D(t.FRAMEBUFFER,o,s,n.get(r.texture).__webglTexture,0),t.bindFramebuffer(t.FRAMEBUFFER,null)}function b(e,i){t.bindRenderbuffer(t.RENDERBUFFER,e),i.depthBuffer&&!i.stencilBuffer?(t.renderbufferStorage(t.RENDERBUFFER,t.DEPTH_COMPONENT16,i.width,i.height),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.RENDERBUFFER,e)):i.depthBuffer&&i.stencilBuffer?(t.renderbufferStorage(t.RENDERBUFFER,t.DEPTH_STENCIL,i.width,i.height),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.RENDERBUFFER,e)):t.renderbufferStorage(t.RENDERBUFFER,t.RGBA4,i.width,i.height),t.bindRenderbuffer(t.RENDERBUFFER,null)}function w(e){var i=n.get(e),r=!0===e.isWebGLRenderTargetCube;if(e.depthTexture){if(r)throw new Error("target.depthTexture not supported in Cube render targets");!function(e,i){if(i&&i.isWebGLRenderTargetCube)throw new Error("Depth Texture with cube render targets is not supported");if(t.bindFramebuffer(t.FRAMEBUFFER,e),!i.depthTexture||!i.depthTexture.isDepthTexture)throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");n.get(i.depthTexture).__webglTexture&&i.depthTexture.image.width===i.width&&i.depthTexture.image.height===i.height||(i.depthTexture.image.width=i.width,i.depthTexture.image.height=i.height,i.depthTexture.needsUpdate=!0),y(i.depthTexture,0);var r=n.get(i.depthTexture).__webglTexture;if(1026===i.depthTexture.format)t.framebufferTexture2D(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.TEXTURE_2D,r,0);else{if(1027!==i.depthTexture.format)throw new Error("Unknown depthTexture format");t.framebufferTexture2D(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.TEXTURE_2D,r,0)}}(i.__webglFramebuffer,e)}else if(r){i.__webglDepthbuffer=[];for(var a=0;a<6;a++)t.bindFramebuffer(t.FRAMEBUFFER,i.__webglFramebuffer[a]),i.__webglDepthbuffer[a]=t.createRenderbuffer(),b(i.__webglDepthbuffer[a],e)}else t.bindFramebuffer(t.FRAMEBUFFER,i.__webglFramebuffer),i.__webglDepthbuffer=t.createRenderbuffer(),b(i.__webglDepthbuffer,e);t.bindFramebuffer(t.FRAMEBUFFER,null)}this.setTexture2D=y,this.setTextureCube=function(e,s){var c=n.get(e);if(6===e.image.length)if(e.version>0&&c.__version!==e.version){c.__image__webglTextureCube||(e.addEventListener("dispose",m),c.__image__webglTextureCube=t.createTexture(),o.memory.textures++),i.activeTexture(t.TEXTURE0+s),i.bindTexture(t.TEXTURE_CUBE_MAP,c.__image__webglTextureCube),t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,e.flipY);for(var h=e&&e.isCompressedTexture,f=e.image[0]&&e.image[0].isDataTexture,g=[],v=0;v<6;v++)g[v]=h||f?f?e.image[v].image:e.image[v]:l(e.image[v],r.maxCubemapSize);var y=g[0],_=u(y),b=a.convert(e.format),w=a.convert(e.type);x(t.TEXTURE_CUBE_MAP,e,_);for(v=0;v<6;v++)if(h)for(var M,E=g[v].mipmaps,T=0,S=E.length;T<S;T++)M=E[T],1023!==e.format&&1022!==e.format?i.getCompressedTextureFormats().indexOf(b)>-1?i.compressedTexImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+v,T,b,M.width,M.height,0,M.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):i.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+v,T,b,M.width,M.height,0,b,w,M.data);else f?i.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+v,0,b,g[v].width,g[v].height,0,b,w,g[v].data):i.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+v,0,b,b,w,g[v]);c.__maxMipLevel=h?E.length-1:0,p(e,_)&&d(t.TEXTURE_CUBE_MAP,e,y.width,y.height),c.__version=e.version,e.onUpdate&&e.onUpdate(e)}else i.activeTexture(t.TEXTURE0+s),i.bindTexture(t.TEXTURE_CUBE_MAP,c.__image__webglTextureCube)},this.setTextureCubeDynamic=function(e,r){i.activeTexture(t.TEXTURE0+r),i.bindTexture(t.TEXTURE_CUBE_MAP,n.get(e).__webglTexture)},this.setupRenderTarget=function(e){var r=n.get(e),a=n.get(e.texture);e.addEventListener("dispose",v),a.__webglTexture=t.createTexture(),o.memory.textures++;var s=!0===e.isWebGLRenderTargetCube,c=u(e);if(s){r.__webglFramebuffer=[];for(var h=0;h<6;h++)r.__webglFramebuffer[h]=t.createFramebuffer()}else r.__webglFramebuffer=t.createFramebuffer();if(s){i.bindTexture(t.TEXTURE_CUBE_MAP,a.__webglTexture),x(t.TEXTURE_CUBE_MAP,e.texture,c);for(h=0;h<6;h++)_(r.__webglFramebuffer[h],e,t.COLOR_ATTACHMENT0,t.TEXTURE_CUBE_MAP_POSITIVE_X+h);p(e.texture,c)&&d(t.TEXTURE_CUBE_MAP,e.texture,e.width,e.height),i.bindTexture(t.TEXTURE_CUBE_MAP,null)}else i.bindTexture(t.TEXTURE_2D,a.__webglTexture),x(t.TEXTURE_2D,e.texture,c),_(r.__webglFramebuffer,e,t.COLOR_ATTACHMENT0,t.TEXTURE_2D),p(e.texture,c)&&d(t.TEXTURE_2D,e.texture,e.width,e.height),i.bindTexture(t.TEXTURE_2D,null);e.depthBuffer&&w(e)},this.updateRenderTargetMipmap=function(e){var r=e.texture;if(p(r,u(e))){var a=e.isWebGLRenderTargetCube?t.TEXTURE_CUBE_MAP:t.TEXTURE_2D,o=n.get(r).__webglTexture;i.bindTexture(a,o),d(a,r,e.width,e.height),i.bindTexture(a,null)}}}function Ei(t,e){return{convert:function(i){var n;if(1e3===i)return t.REPEAT;if(1001===i)return t.CLAMP_TO_EDGE;if(1002===i)return t.MIRRORED_REPEAT;if(1003===i)return t.NEAREST;if(1004===i)return t.NEAREST_MIPMAP_NEAREST;if(1005===i)return t.NEAREST_MIPMAP_LINEAR;if(1006===i)return t.LINEAR;if(1007===i)return t.LINEAR_MIPMAP_NEAREST;if(1008===i)return t.LINEAR_MIPMAP_LINEAR;if(1009===i)return t.UNSIGNED_BYTE;if(1017===i)return t.UNSIGNED_SHORT_4_4_4_4;if(1018===i)return t.UNSIGNED_SHORT_5_5_5_1;if(1019===i)return t.UNSIGNED_SHORT_5_6_5;if(1010===i)return t.BYTE;if(1011===i)return t.SHORT;if(1012===i)return t.UNSIGNED_SHORT;if(1013===i)return t.INT;if(1014===i)return t.UNSIGNED_INT;if(1015===i)return t.FLOAT;if(1016===i&&null!==(n=e.get("OES_texture_half_float")))return n.HALF_FLOAT_OES;if(1021===i)return t.ALPHA;if(1022===i)return t.RGB;if(1023===i)return t.RGBA;if(1024===i)return t.LUMINANCE;if(1025===i)return t.LUMINANCE_ALPHA;if(1026===i)return t.DEPTH_COMPONENT;if(1027===i)return t.DEPTH_STENCIL;if(100===i)return t.FUNC_ADD;if(101===i)return t.FUNC_SUBTRACT;if(102===i)return t.FUNC_REVERSE_SUBTRACT;if(200===i)return t.ZERO;if(201===i)return t.ONE;if(202===i)return t.SRC_COLOR;if(203===i)return t.ONE_MINUS_SRC_COLOR;if(204===i)return t.SRC_ALPHA;if(205===i)return t.ONE_MINUS_SRC_ALPHA;if(206===i)return t.DST_ALPHA;if(207===i)return t.ONE_MINUS_DST_ALPHA;if(208===i)return t.DST_COLOR;if(209===i)return t.ONE_MINUS_DST_COLOR;if(210===i)return t.SRC_ALPHA_SATURATE;if((33776===i||33777===i||33778===i||33779===i)&&null!==(n=e.get("WEBGL_compressed_texture_s3tc"))){if(33776===i)return n.COMPRESSED_RGB_S3TC_DXT1_EXT;if(33777===i)return n.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(33778===i)return n.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(33779===i)return n.COMPRESSED_RGBA_S3TC_DXT5_EXT}if((35840===i||35841===i||35842===i||35843===i)&&null!==(n=e.get("WEBGL_compressed_texture_pvrtc"))){if(35840===i)return n.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(35841===i)return n.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(35842===i)return n.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(35843===i)return n.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}if(36196===i&&null!==(n=e.get("WEBGL_compressed_texture_etc1")))return n.COMPRESSED_RGB_ETC1_WEBGL;if((37808===i||37809===i||37810===i||37811===i||37812===i||37813===i||37814===i||37815===i||37816===i||37817===i||37818===i||37819===i||37820===i||37821===i)&&null!==(n=e.get("WEBGL_compressed_texture_astc")))return i;if((103===i||104===i)&&null!==(n=e.get("EXT_blend_minmax"))){if(103===i)return n.MIN_EXT;if(104===i)return n.MAX_EXT}return 1020===i&&null!==(n=e.get("WEBGL_depth_texture"))?n.UNSIGNED_INT_24_8_WEBGL:0}}}function Ti(t,e,i,n){et.call(this),this.type="PerspectiveCamera",this.fov=void 0!==t?t:50,this.zoom=1,this.near=void 0!==i?i:.1,this.far=void 0!==n?n:2e3,this.focus=10,this.aspect=void 0!==e?e:1,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}function Si(t){Ti.call(this),this.cameras=t||[]}function Ai(t){var e=this,i=null,n=null,r=null,a=new y,o=new y;"undefined"!=typeof window&&"VRFrameData"in window&&(n=new window.VRFrameData,window.addEventListener("vrdisplaypresentchange",g,!1));var s=new y,c=new x,h=new _,l=new Ti;l.bounds=new L(0,0,.5,1),l.layers.enable(1);var u=new Ti;u.bounds=new L(.5,0,.5,1),u.layers.enable(2);var p,d,f=new Si([l,u]);function m(){return null!==i&&!0===i.isPresenting}function g(){if(m()){var n=i.getEyeParameters("left"),r=n.renderWidth,a=n.renderHeight;d=t.getPixelRatio(),p=t.getSize(),t.setDrawingBufferSize(2*r,a,1),v.start()}else e.enabled&&(t.setDrawingBufferSize(p.width,p.height,d),v.stop())}f.layers.enable(1),f.layers.enable(2),this.enabled=!1,this.userHeight=1.6,this.getDevice=function(){return i},this.setDevice=function(t){void 0!==t&&(i=t),v.setContext(t)},this.setPoseTarget=function(t){void 0!==t&&(r=t)},this.getCamera=function(t){if(null===i)return t;i.depthNear=t.near,i.depthFar=t.far,i.getFrameData(n);var p=i.stageParameters;p?a.fromArray(p.sittingToStandingTransform):a.makeTranslation(0,e.userHeight,0);var d=n.pose,m=null!==r?r:t;if(m.matrix.copy(a),m.matrix.decompose(m.position,m.quaternion,m.scale),null!==d.orientation&&(c.fromArray(d.orientation),m.quaternion.multiply(c)),null!==d.position&&(c.setFromRotationMatrix(a),h.fromArray(d.position),h.applyQuaternion(c),m.position.add(h)),m.updateMatrixWorld(),!1===i.isPresenting)return t;l.near=t.near,u.near=t.near,l.far=t.far,u.far=t.far,f.matrixWorld.copy(t.matrixWorld),f.matrixWorldInverse.copy(t.matrixWorldInverse),l.matrixWorldInverse.fromArray(n.leftViewMatrix),u.matrixWorldInverse.fromArray(n.rightViewMatrix),o.getInverse(a),l.matrixWorldInverse.multiply(o),u.matrixWorldInverse.multiply(o);var g=m.parent;null!==g&&(s.getInverse(g.matrixWorld),l.matrixWorldInverse.multiply(s),u.matrixWorldInverse.multiply(s)),l.matrixWorld.getInverse(l.matrixWorldInverse),u.matrixWorld.getInverse(u.matrixWorldInverse),l.projectionMatrix.fromArray(n.leftProjectionMatrix),u.projectionMatrix.fromArray(n.rightProjectionMatrix),f.projectionMatrix.copy(l.projectionMatrix);var v=i.getLayers();if(v.length){var y=v[0];null!==y.leftBounds&&4===y.leftBounds.length&&l.bounds.fromArray(y.leftBounds),null!==y.rightBounds&&4===y.rightBounds.length&&u.bounds.fromArray(y.rightBounds)}return f},this.getStandingMatrix=function(){return a},this.isPresenting=m;var v=new W;this.setAnimationLoop=function(t){v.setAnimationLoop(t)},this.submitFrame=function(){m()&&i.submitFrame()},this.dispose=function(){"undefined"!=typeof window&&window.removeEventListener("vrdisplaypresentchange",g)}}function Ri(t){var e=t.context,i=null,n=null,r=null,a=null;function o(){return null!==n&&null!==r}var s=new Ti;s.layers.enable(1),s.viewport=new L;var c=new Ti;c.layers.enable(2),c.viewport=new L;var h=new Si([s,c]);function l(t,e){null===e?t.matrixWorld.copy(t.matrix):t.matrixWorld.multiplyMatrices(e.matrixWorld,t.matrix),t.matrixWorldInverse.getInverse(t.matrixWorld)}h.layers.enable(1),h.layers.enable(2),this.enabled=!1,this.getDevice=function(){return i},this.setDevice=function(t){void 0!==t&&(i=t),e.setCompatibleXRDevice(t)},this.setSession=function(i,a){null!==(n=i)&&(n.addEventListener("end",(function(){t.setFramebuffer(null),p.stop()})),n.baseLayer=new XRWebGLLayer(n,e),n.requestFrameOfReference(a.frameOfReferenceType).then((function(e){r=e,t.setFramebuffer(n.baseLayer.framebuffer),p.setContext(n),p.start()})))},this.getCamera=function(t){if(o()){var e=t.parent,i=h.cameras;l(h,e);for(var n=0;n<i.length;n++)l(i[n],e);t.matrixWorld.copy(h.matrixWorld);for(var r=t.children,a=(n=0,r.length);n<a;n++)r[n].updateMatrixWorld(!0);return h}return t},this.isPresenting=o;var u=null;var p=new W;p.setAnimationLoop((function(t,e){a=e.getDevicePose(r);for(var i=n.baseLayer,o=e.views,s=0;s<o.length;s++){var c=o[s],l=i.getViewport(c),p=a.getViewMatrix(c),d=h.cameras[s];d.matrix.fromArray(p).getInverse(d.matrix),d.projectionMatrix.fromArray(c.projectionMatrix),d.viewport.set(l.x,l.y,l.width,l.height),0===s&&(h.matrix.copy(d.matrix),h.projectionMatrix.copy(d.projectionMatrix))}u&&u()})),this.setAnimationLoop=function(t){u=t},this.getStandingMatrix=function(){return console.warn("THREE.WebXRManager: getStandingMatrix() is no longer needed."),new THREE.Matrix4},this.submitFrame=function(){}}function Li(t){console.log("THREE.WebGLRenderer","93");var e=void 0!==(t=t||{}).canvas?t.canvas:document.createElementNS("http://www.w3.org/1999/xhtml","canvas"),i=void 0!==t.context?t.context:null,n=void 0!==t.alpha&&t.alpha,r=void 0===t.depth||t.depth,a=void 0===t.stencil||t.stencil,o=void 0!==t.antialias&&t.antialias,s=void 0===t.premultipliedAlpha||t.premultipliedAlpha,c=void 0!==t.preserveDrawingBuffer&&t.preserveDrawingBuffer,h=void 0!==t.powerPreference?t.powerPreference:"default",l=null,u=null;this.domElement=e,this.context=null,this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.gammaFactor=2,this.gammaInput=!1,this.gammaOutput=!1,this.physicallyCorrectLights=!1,this.toneMapping=1,this.toneMappingExposure=1,this.toneMappingWhitePoint=1,this.maxMorphTargets=8,this.maxMorphNormals=4;var p,d,f,m,v,x,b,w,M,E,T,S,A,R,P,C,I,N,D,z=this,B=!1,G=null,H=null,k=null,q=-1,Y="",Z=null,J=null,Q=new L,K=new L,$=null,tt=0,et=e.width,it=e.height,nt=1,rt=new L(0,0,et,it),at=new L(0,0,et,it),ot=!1,st=new U,ct=new jt,ht=!1,lt=!1,ut=new y,pt=new _;function dt(){return null===H?nt:1}try{var ft={alpha:n,depth:r,stencil:a,antialias:o,premultipliedAlpha:s,preserveDrawingBuffer:c,powerPreference:h};if(e.addEventListener("webglcontextlost",yt,!1),e.addEventListener("webglcontextrestored",xt,!1),null===(p=i||e.getContext("webgl",ft)||e.getContext("experimental-webgl",ft)))throw null!==e.getContext("webgl")?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.");void 0===p.getShaderPrecisionFormat&&(p.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}})}catch(t){console.error("THREE.WebGLRenderer: "+t.message)}function mt(){(d=new Wt(p)).get("WEBGL_depth_texture"),d.get("OES_texture_float"),d.get("OES_texture_float_linear"),d.get("OES_texture_half_float"),d.get("OES_texture_half_float_linear"),d.get("OES_standard_derivatives"),d.get("OES_element_index_uint"),d.get("ANGLE_instanced_arrays"),D=new Ei(p,d),f=new Vt(p,d,t),(m=new wi(p,d,D)).scissor(K.copy(at).multiplyScalar(nt)),m.viewport(Q.copy(rt).multiplyScalar(nt)),v=new Yt(p),x=new $e,b=new Mi(p,d,m,x,f,D,v),w=new X(p),M=new Xt(p,w,v),E=new Qt(M,v),P=new Jt(p),T=new Ke(z,d,f),S=new ni,A=new gi,R=new Ht(z,m,E,s),C=new kt(p,d,v),I=new qt(p,d,v),N=new bi(z,p,m,b,f),v.programs=T.programs,z.context=p,z.capabilities=f,z.extensions=d,z.properties=x,z.renderLists=S,z.state=m,z.info=v}mt();var gt="xr"in navigator?new Ri(z):new Ai(z);this.vr=gt;var vt=new xi(z,E,f.maxTextureSize);function yt(t){t.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),B=!0}function xt(){console.log("THREE.WebGLRenderer: Context Restored."),B=!1,mt()}function _t(t){var e=t.target;e.removeEventListener("dispose",_t),function(t){bt(t),x.remove(t)}(e)}function bt(t){var e=x.get(t).program;t.program=void 0,void 0!==e&&T.releaseProgram(e)}this.shadowMap=vt,this.getContext=function(){return p},this.getContextAttributes=function(){return p.getContextAttributes()},this.forceContextLoss=function(){var t=d.get("WEBGL_lose_context");t&&t.loseContext()},this.forceContextRestore=function(){var t=d.get("WEBGL_lose_context");t&&t.restoreContext()},this.getPixelRatio=function(){return nt},this.setPixelRatio=function(t){void 0!==t&&(nt=t,this.setSize(et,it,!1))},this.getSize=function(){return{width:et,height:it}},this.setSize=function(t,i,n){gt.isPresenting()?console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting."):(et=t,it=i,e.width=t*nt,e.height=i*nt,!1!==n&&(e.style.width=t+"px",e.style.height=i+"px"),this.setViewport(0,0,t,i))},this.getDrawingBufferSize=function(){return{width:et*nt,height:it*nt}},this.setDrawingBufferSize=function(t,i,n){et=t,it=i,nt=n,e.width=t*n,e.height=i*n,this.setViewport(0,0,t,i)},this.getCurrentViewport=function(){return Q},this.setViewport=function(t,e,i,n){rt.set(t,it-e-n,i,n),m.viewport(Q.copy(rt).multiplyScalar(nt))},this.setScissor=function(t,e,i,n){at.set(t,it-e-n,i,n),m.scissor(K.copy(at).multiplyScalar(nt))},this.setScissorTest=function(t){m.setScissorTest(ot=t)},this.getClearColor=function(){return R.getClearColor()},this.setClearColor=function(){R.setClearColor.apply(R,arguments)},this.getClearAlpha=function(){return R.getClearAlpha()},this.setClearAlpha=function(){R.setClearAlpha.apply(R,arguments)},this.clear=function(t,e,i){var n=0;(void 0===t||t)&&(n|=p.COLOR_BUFFER_BIT),(void 0===e||e)&&(n|=p.DEPTH_BUFFER_BIT),(void 0===i||i)&&(n|=p.STENCIL_BUFFER_BIT),p.clear(n)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.clearTarget=function(t,e,i,n){this.setRenderTarget(t),this.clear(e,i,n)},this.dispose=function(){e.removeEventListener("webglcontextlost",yt,!1),e.removeEventListener("webglcontextrestored",xt,!1),S.dispose(),A.dispose(),x.dispose(),E.dispose(),gt.dispose(),Et.stop()},this.renderBufferImmediate=function(t,e,i){m.initAttributes();var n=x.get(t);t.hasPositions&&!n.position&&(n.position=p.createBuffer()),t.hasNormals&&!n.normal&&(n.normal=p.createBuffer()),t.hasUvs&&!n.uv&&(n.uv=p.createBuffer()),t.hasColors&&!n.color&&(n.color=p.createBuffer());var r=e.getAttributes();if(t.hasPositions&&(p.bindBuffer(p.ARRAY_BUFFER,n.position),p.bufferData(p.ARRAY_BUFFER,t.positionArray,p.DYNAMIC_DRAW),m.enableAttribute(r.position),p.vertexAttribPointer(r.position,3,p.FLOAT,!1,0,0)),t.hasNormals){if(p.bindBuffer(p.ARRAY_BUFFER,n.normal),!i.isMeshPhongMaterial&&!i.isMeshStandardMaterial&&!i.isMeshNormalMaterial&&!0===i.flatShading)for(var a=0,o=3*t.count;a<o;a+=9){var s=t.normalArray,c=(s[a+0]+s[a+3]+s[a+6])/3,h=(s[a+1]+s[a+4]+s[a+7])/3,l=(s[a+2]+s[a+5]+s[a+8])/3;s[a+0]=c,s[a+1]=h,s[a+2]=l,s[a+3]=c,s[a+4]=h,s[a+5]=l,s[a+6]=c,s[a+7]=h,s[a+8]=l}p.bufferData(p.ARRAY_BUFFER,t.normalArray,p.DYNAMIC_DRAW),m.enableAttribute(r.normal),p.vertexAttribPointer(r.normal,3,p.FLOAT,!1,0,0)}t.hasUvs&&i.map&&(p.bindBuffer(p.ARRAY_BUFFER,n.uv),p.bufferData(p.ARRAY_BUFFER,t.uvArray,p.DYNAMIC_DRAW),m.enableAttribute(r.uv),p.vertexAttribPointer(r.uv,2,p.FLOAT,!1,0,0)),t.hasColors&&0!==i.vertexColors&&(p.bindBuffer(p.ARRAY_BUFFER,n.color),p.bufferData(p.ARRAY_BUFFER,t.colorArray,p.DYNAMIC_DRAW),m.enableAttribute(r.color),p.vertexAttribPointer(r.color,3,p.FLOAT,!1,0,0)),m.disableUnusedAttributes(),p.drawArrays(p.TRIANGLES,0,t.count),t.count=0},this.renderBufferDirect=function(t,e,i,n,r,a){var o=r.isMesh&&r.matrixWorld.determinant()<0;m.setMaterial(n,o);var s=Rt(t,e,n,r),c=i.id+"_"+s.id+"_"+(!0===n.wireframe),h=!1;c!==Y&&(Y=c,h=!0),r.morphTargetInfluences&&(P.update(r,i,n,s),h=!0);var l,u=i.index,f=i.attributes.position,g=1;!0===n.wireframe&&(u=M.getWireframeAttribute(i),g=2);var v=C;null!==u&&(l=w.get(u),(v=I).setIndex(l)),h&&(!function(t,e,i){if(i&&i.isInstancedBufferGeometry&&null===d.get("ANGLE_instanced_arrays"))return void console.error("THREE.WebGLRenderer.setupVertexAttributes: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");m.initAttributes();var n=i.attributes,r=e.getAttributes(),a=t.defaultAttributeValues;for(var o in r){var s=r[o];if(s>=0){var c=n[o];if(void 0!==c){var h=c.normalized,l=c.itemSize,u=w.get(c);if(void 0===u)continue;var f=u.buffer,g=u.type,v=u.bytesPerElement;if(c.isInterleavedBufferAttribute){var y=c.data,x=y.stride,_=c.offset;y&&y.isInstancedInterleavedBuffer?(m.enableAttributeAndDivisor(s,y.meshPerAttribute),void 0===i.maxInstancedCount&&(i.maxInstancedCount=y.meshPerAttribute*y.count)):m.enableAttribute(s),p.bindBuffer(p.ARRAY_BUFFER,f),p.vertexAttribPointer(s,l,g,h,x*v,_*v)}else c.isInstancedBufferAttribute?(m.enableAttributeAndDivisor(s,c.meshPerAttribute),void 0===i.maxInstancedCount&&(i.maxInstancedCount=c.meshPerAttribute*c.count)):m.enableAttribute(s),p.bindBuffer(p.ARRAY_BUFFER,f),p.vertexAttribPointer(s,l,g,h,0,0)}else if(void 0!==a){var b=a[o];if(void 0!==b)switch(b.length){case 2:p.vertexAttrib2fv(s,b);break;case 3:p.vertexAttrib3fv(s,b);break;case 4:p.vertexAttrib4fv(s,b);break;default:p.vertexAttrib1fv(s,b)}}}}m.disableUnusedAttributes()}(n,s,i),null!==u&&p.bindBuffer(p.ELEMENT_ARRAY_BUFFER,l.buffer));var y=1/0;null!==u?y=u.count:void 0!==f&&(y=f.count);var x=i.drawRange.start*g,_=i.drawRange.count*g,b=null!==a?a.start*g:0,E=null!==a?a.count*g:1/0,T=Math.max(x,b),S=Math.min(y,x+_,b+E)-1,A=Math.max(0,S-T+1);if(0!==A){if(r.isMesh)if(!0===n.wireframe)m.setLineWidth(n.wireframeLinewidth*dt()),v.setMode(p.LINES);else switch(r.drawMode){case 0:v.setMode(p.TRIANGLES);break;case 1:v.setMode(p.TRIANGLE_STRIP);break;case 2:v.setMode(p.TRIANGLE_FAN)}else if(r.isLine){var R=n.linewidth;void 0===R&&(R=1),m.setLineWidth(R*dt()),r.isLineSegments?v.setMode(p.LINES):r.isLineLoop?v.setMode(p.LINE_LOOP):v.setMode(p.LINE_STRIP)}else r.isPoints&&v.setMode(p.POINTS);i&&i.isInstancedBufferGeometry?i.maxInstancedCount>0&&v.renderInstances(i,T,A):v.render(T,A)}},this.compile=function(t,e){(u=A.get(t,e)).init(),t.traverse((function(t){t.isLight&&(u.pushLight(t),t.castShadow&&u.pushShadow(t))})),u.setupLights(e),t.traverse((function(e){if(e.material)if(Array.isArray(e.material))for(var i=0;i<e.material.length;i++)At(e.material[i],t.fog,e);else At(e.material,t.fog,e)}))};var wt=null;var Mt,Et=new W;function Tt(t,e,i,n){for(var r=0,a=t.length;r<a;r++){var o=t[r],s=o.object,c=o.geometry,h=void 0===n?o.material:n,l=o.group;if(i.isArrayCamera){J=i;for(var u=i.cameras,p=0,d=u.length;p<d;p++){var f=u[p];if(s.layers.test(f.layers)){if("viewport"in f)m.viewport(Q.copy(f.viewport));else{var g=f.bounds,v=g.x*et,y=g.y*it,x=g.z*et,_=g.w*it;m.viewport(Q.set(v,y,x,_).multiplyScalar(nt))}St(s,e,f,c,h,l)}}}else J=null,St(s,e,i,c,h,l)}}function St(t,e,i,n,r,a){if(t.onBeforeRender(z,e,i,n,r,a),u=A.get(e,J||i),t.modelViewMatrix.multiplyMatrices(i.matrixWorldInverse,t.matrixWorld),t.normalMatrix.getNormalMatrix(t.modelViewMatrix),t.isImmediateRenderObject){var o=t.isMesh&&t.matrixWorld.determinant()<0;m.setMaterial(r,o);var s=Rt(i,e.fog,r,t);Y="",function(t,e,i){t.render((function(t){z.renderBufferImmediate(t,e,i)}))}(t,s,r)}else z.renderBufferDirect(i,e.fog,n,r,t,a);t.onAfterRender(z,e,i,n,r,a),u=A.get(e,J||i)}function At(t,e,i){var n=x.get(t),r=u.state.lights,a=u.state.shadowsArray,o=T.getParameters(t,r.state,a,e,ct.numPlanes,ct.numIntersection,i),s=T.getProgramCode(t,o),c=n.program,h=!0;if(void 0===c)t.addEventListener("dispose",_t);else if(c.code!==s)bt(t);else if(n.lightsHash!==r.state.hash)x.update(t,"lightsHash",r.state.hash),h=!1;else{if(void 0!==o.shaderID)return;h=!1}if(h){if(o.shaderID){var l=j[o.shaderID];n.shader={name:t.type,uniforms:F.clone(l.uniforms),vertexShader:l.vertexShader,fragmentShader:l.fragmentShader}}else n.shader={name:t.type,uniforms:t.uniforms,vertexShader:t.vertexShader,fragmentShader:t.fragmentShader};t.onBeforeCompile(n.shader,z),c=T.acquireProgram(t,n.shader,o,s),n.program=c,t.program=c}var p=c.getAttributes();if(t.morphTargets){t.numSupportedMorphTargets=0;for(var d=0;d<z.maxMorphTargets;d++)p["morphTarget"+d]>=0&&t.numSupportedMorphTargets++}if(t.morphNormals){t.numSupportedMorphNormals=0;for(d=0;d<z.maxMorphNormals;d++)p["morphNormal"+d]>=0&&t.numSupportedMorphNormals++}var f=n.shader.uniforms;(t.isShaderMaterial||t.isRawShaderMaterial)&&!0!==t.clipping||(n.numClippingPlanes=ct.numPlanes,n.numIntersection=ct.numIntersection,f.clippingPlanes=ct.uniform),n.fog=e,n.lightsHash=r.state.hash,t.lights&&(f.ambientLightColor.value=r.state.ambient,f.directionalLights.value=r.state.directional,f.spotLights.value=r.state.spot,f.rectAreaLights.value=r.state.rectArea,f.pointLights.value=r.state.point,f.hemisphereLights.value=r.state.hemi,f.directionalShadowMap.value=r.state.directionalShadowMap,f.directionalShadowMatrix.value=r.state.directionalShadowMatrix,f.spotShadowMap.value=r.state.spotShadowMap,f.spotShadowMatrix.value=r.state.spotShadowMatrix,f.pointShadowMap.value=r.state.pointShadowMap,f.pointShadowMatrix.value=r.state.pointShadowMatrix);var m=n.program.getUniforms(),g=Ge.seqWithValue(m.seq,f);n.uniformsList=g}function Rt(t,e,i,n){tt=0;var r=x.get(i),a=u.state.lights;if(ht&&(lt||t!==Z)){var o=t===Z&&i.id===q;ct.setState(i.clippingPlanes,i.clipIntersection,i.clipShadows,t,r,o)}!1===i.needsUpdate&&(void 0===r.program||i.fog&&r.fog!==e||i.lights&&r.lightsHash!==a.state.hash?i.needsUpdate=!0:void 0===r.numClippingPlanes||r.numClippingPlanes===ct.numPlanes&&r.numIntersection===ct.numIntersection||(i.needsUpdate=!0)),i.needsUpdate&&(At(i,e,n),i.needsUpdate=!1);var s,c,h=!1,l=!1,d=!1,v=r.program,y=v.getUniforms(),_=r.shader.uniforms;if(m.useProgram(v.program)&&(h=!0,l=!0,d=!0),i.id!==q&&(q=i.id,l=!0),h||t!==Z){if(y.setValue(p,"projectionMatrix",t.projectionMatrix),f.logarithmicDepthBuffer&&y.setValue(p,"logDepthBufFC",2/(Math.log(t.far+1)/Math.LN2)),Z!==(J||t)&&(Z=J||t,l=!0,d=!0),i.isShaderMaterial||i.isMeshPhongMaterial||i.isMeshStandardMaterial||i.envMap){var b=y.map.cameraPosition;void 0!==b&&b.setValue(p,pt.setFromMatrixPosition(t.matrixWorld))}(i.isMeshPhongMaterial||i.isMeshLambertMaterial||i.isMeshBasicMaterial||i.isMeshStandardMaterial||i.isShaderMaterial||i.skinning)&&y.setValue(p,"viewMatrix",t.matrixWorldInverse)}if(i.skinning){y.setOptional(p,n,"bindMatrix"),y.setOptional(p,n,"bindMatrixInverse");var w=n.skeleton;if(w){var M=w.bones;if(f.floatVertexTextures){if(void 0===w.boneTexture){var E=Math.sqrt(4*M.length);E=g.ceilPowerOfTwo(E),E=Math.max(E,4);var T=new Float32Array(E*E*4);T.set(w.boneMatrices);var S=new O(T,E,E,1023,1015);S.needsUpdate=!0,w.boneMatrices=T,w.boneTexture=S,w.boneTextureSize=E}y.setValue(p,"boneTexture",w.boneTexture),y.setValue(p,"boneTextureSize",w.boneTextureSize)}else y.setOptional(p,w,"boneMatrices")}}return l&&(y.setValue(p,"toneMappingExposure",z.toneMappingExposure),y.setValue(p,"toneMappingWhitePoint",z.toneMappingWhitePoint),i.lights&&(c=d,(s=_).ambientLightColor.needsUpdate=c,s.directionalLights.needsUpdate=c,s.pointLights.needsUpdate=c,s.spotLights.needsUpdate=c,s.rectAreaLights.needsUpdate=c,s.hemisphereLights.needsUpdate=c),e&&i.fog&&function(t,e){t.fogColor.value=e.color,e.isFog?(t.fogNear.value=e.near,t.fogFar.value=e.far):e.isFogExp2&&(t.fogDensity.value=e.density)}(_,e),i.isMeshBasicMaterial?Lt(_,i):i.isMeshLambertMaterial?(Lt(_,i),function(t,e){e.emissiveMap&&(t.emissiveMap.value=e.emissiveMap)}(_,i)):i.isMeshPhongMaterial?(Lt(_,i),i.isMeshToonMaterial?function(t,e){Pt(t,e),e.gradientMap&&(t.gradientMap.value=e.gradientMap)}(_,i):Pt(_,i)):i.isMeshStandardMaterial?(Lt(_,i),i.isMeshPhysicalMaterial?function(t,e){t.clearCoat.value=e.clearCoat,t.clearCoatRoughness.value=e.clearCoatRoughness,Ct(t,e)}(_,i):Ct(_,i)):i.isMeshDepthMaterial?(Lt(_,i),function(t,e){e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias)}(_,i)):i.isMeshDistanceMaterial?(Lt(_,i),function(t,e){e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias);t.referencePosition.value.copy(e.referencePosition),t.nearDistance.value=e.nearDistance,t.farDistance.value=e.farDistance}(_,i)):i.isMeshNormalMaterial?(Lt(_,i),function(t,e){e.bumpMap&&(t.bumpMap.value=e.bumpMap,t.bumpScale.value=e.bumpScale,1===e.side&&(t.bumpScale.value*=-1));e.normalMap&&(t.normalMap.value=e.normalMap,t.normalScale.value.copy(e.normalScale),1===e.side&&t.normalScale.value.negate());e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias)}(_,i)):i.isLineBasicMaterial?(function(t,e){t.diffuse.value=e.color,t.opacity.value=e.opacity}(_,i),i.isLineDashedMaterial&&function(t,e){t.dashSize.value=e.dashSize,t.totalSize.value=e.dashSize+e.gapSize,t.scale.value=e.scale}(_,i)):i.isPointsMaterial?function(t,e){t.diffuse.value=e.color,t.opacity.value=e.opacity,t.size.value=e.size*nt,t.scale.value=.5*it,t.map.value=e.map,null!==e.map&&(!0===e.map.matrixAutoUpdate&&e.map.updateMatrix(),t.uvTransform.value.copy(e.map.matrix))}(_,i):i.isShadowMaterial&&(_.color.value=i.color,_.opacity.value=i.opacity),void 0!==_.ltc_1&&(_.ltc_1.value=V.LTC_1),void 0!==_.ltc_2&&(_.ltc_2.value=V.LTC_2),Ge.upload(p,r.uniformsList,_,z)),i.isShaderMaterial&&!0===i.uniformsNeedUpdate&&(Ge.upload(p,r.uniformsList,_,z),i.uniformsNeedUpdate=!1),y.setValue(p,"modelViewMatrix",n.modelViewMatrix),y.setValue(p,"normalMatrix",n.normalMatrix),y.setValue(p,"modelMatrix",n.matrixWorld),v}function Lt(t,e){var i;t.opacity.value=e.opacity,e.color&&(t.diffuse.value=e.color),e.emissive&&t.emissive.value.copy(e.emissive).multiplyScalar(e.emissiveIntensity),e.map&&(t.map.value=e.map),e.alphaMap&&(t.alphaMap.value=e.alphaMap),e.specularMap&&(t.specularMap.value=e.specularMap),e.envMap&&(t.envMap.value=e.envMap,t.flipEnvMap.value=e.envMap&&e.envMap.isCubeTexture?-1:1,t.reflectivity.value=e.reflectivity,t.refractionRatio.value=e.refractionRatio,t.maxMipLevel.value=x.get(e.envMap).__maxMipLevel),e.lightMap&&(t.lightMap.value=e.lightMap,t.lightMapIntensity.value=e.lightMapIntensity),e.aoMap&&(t.aoMap.value=e.aoMap,t.aoMapIntensity.value=e.aoMapIntensity),e.map?i=e.map:e.specularMap?i=e.specularMap:e.displacementMap?i=e.displacementMap:e.normalMap?i=e.normalMap:e.bumpMap?i=e.bumpMap:e.roughnessMap?i=e.roughnessMap:e.metalnessMap?i=e.metalnessMap:e.alphaMap?i=e.alphaMap:e.emissiveMap&&(i=e.emissiveMap),void 0!==i&&(i.isWebGLRenderTarget&&(i=i.texture),!0===i.matrixAutoUpdate&&i.updateMatrix(),t.uvTransform.value.copy(i.matrix))}function Pt(t,e){t.specular.value=e.specular,t.shininess.value=Math.max(e.shininess,1e-4),e.emissiveMap&&(t.emissiveMap.value=e.emissiveMap),e.bumpMap&&(t.bumpMap.value=e.bumpMap,t.bumpScale.value=e.bumpScale,1===e.side&&(t.bumpScale.value*=-1)),e.normalMap&&(t.normalMap.value=e.normalMap,t.normalScale.value.copy(e.normalScale),1===e.side&&t.normalScale.value.negate()),e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias)}function Ct(t,e){t.roughness.value=e.roughness,t.metalness.value=e.metalness,e.roughnessMap&&(t.roughnessMap.value=e.roughnessMap),e.metalnessMap&&(t.metalnessMap.value=e.metalnessMap),e.emissiveMap&&(t.emissiveMap.value=e.emissiveMap),e.bumpMap&&(t.bumpMap.value=e.bumpMap,t.bumpScale.value=e.bumpScale,1===e.side&&(t.bumpScale.value*=-1)),e.normalMap&&(t.normalMap.value=e.normalMap,t.normalScale.value.copy(e.normalScale),1===e.side&&t.normalScale.value.negate()),e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias),e.envMap&&(t.envMapIntensity.value=e.envMapIntensity)}Et.setAnimationLoop((function(){gt.isPresenting()||wt&&wt()})),Et.setContext(window),this.setAnimationLoop=function(t){wt=t,gt.setAnimationLoop(t),Et.start()},this.render=function(t,e,i,n){if(e&&e.isCamera){if(!B){Y="",q=-1,Z=null,!0===t.autoUpdate&&t.updateMatrixWorld(),null===e.parent&&e.updateMatrixWorld(),gt.enabled&&(e=gt.getCamera(e)),(u=A.get(t,e)).init(),t.onBeforeRender(z,t,e,i),ut.multiplyMatrices(e.projectionMatrix,e.matrixWorldInverse),st.setFromMatrix(ut),lt=this.localClippingEnabled,ht=ct.init(this.clippingPlanes,lt,e),(l=S.get(t,e)).init(),function t(e,i,n){if(!1===e.visible)return;if(e.layers.test(i.layers))if(e.isLight)u.pushLight(e),e.castShadow&&u.pushShadow(e);else if(e.isSprite)e.frustumCulled&&!st.intersectsSprite(e)||u.pushSprite(e);else if(e.isImmediateRenderObject)n&&pt.setFromMatrixPosition(e.matrixWorld).applyMatrix4(ut),l.push(e,null,e.material,pt.z,null);else if((e.isMesh||e.isLine||e.isPoints)&&(e.isSkinnedMesh&&e.skeleton.update(),!e.frustumCulled||st.intersectsObject(e))){n&&pt.setFromMatrixPosition(e.matrixWorld).applyMatrix4(ut);var r=E.update(e),a=e.material;if(Array.isArray(a))for(var o=r.groups,s=0,c=o.length;s<c;s++){var h=o[s],p=a[h.materialIndex];p&&p.visible&&l.push(e,r,p,pt.z,h)}else a.visible&&l.push(e,r,a,pt.z,null)}var d=e.children;for(s=0,c=d.length;s<c;s++)t(d[s],i,n)}(t,e,z.sortObjects),!0===z.sortObjects&&l.sort(),ht&&ct.beginShadows();var r=u.state.shadowsArray;vt.render(r,t,e),u.setupLights(e),ht&&ct.endShadows(),this.info.autoReset&&this.info.reset(),void 0===i&&(i=null),this.setRenderTarget(i),R.render(l,t,e,n);var a=l.opaque,o=l.transparent;if(t.overrideMaterial){var s=t.overrideMaterial;a.length&&Tt(a,t,e,s),o.length&&Tt(o,t,e,s)}else a.length&&Tt(a,t,e),o.length&&Tt(o,t,e);var c=u.state.spritesArray;N.render(c,t,e),i&&b.updateRenderTargetMipmap(i),m.buffers.depth.setTest(!0),m.buffers.depth.setMask(!0),m.buffers.color.setMask(!0),m.setPolygonOffset(!1),t.onAfterRender(z,t,e),gt.enabled&&gt.submitFrame(),l=null,u=null}}else console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.")},this.allocTextureUnit=function(){var t=tt;return t>=f.maxTextures&&console.warn("THREE.WebGLRenderer: Trying to use "+t+" texture units while this GPU supports only "+f.maxTextures),tt+=1,t},this.setTexture2D=(Mt=!1,function(t,e){t&&t.isWebGLRenderTarget&&(Mt||(console.warn("THREE.WebGLRenderer.setTexture2D: don't use render targets as textures. Use their .texture property instead."),Mt=!0),t=t.texture),b.setTexture2D(t,e)}),this.setTexture=function(){var t=!1;return function(e,i){t||(console.warn("THREE.WebGLRenderer: .setTexture is deprecated, use setTexture2D instead."),t=!0),b.setTexture2D(e,i)}}(),this.setTextureCube=function(){var t=!1;return function(e,i){e&&e.isWebGLRenderTargetCube&&(t||(console.warn("THREE.WebGLRenderer.setTextureCube: don't use cube render targets as textures. Use their .texture property instead."),t=!0),e=e.texture),e&&e.isCubeTexture||Array.isArray(e.image)&&6===e.image.length?b.setTextureCube(e,i):b.setTextureCubeDynamic(e,i)}}(),this.setFramebuffer=function(t){G=t},this.getRenderTarget=function(){return H},this.setRenderTarget=function(t){H=t,t&&void 0===x.get(t).__webglFramebuffer&&b.setupRenderTarget(t);var e=G,i=!1;if(t){var n=x.get(t).__webglFramebuffer;t.isWebGLRenderTargetCube?(e=n[t.activeCubeFace],i=!0):e=n,Q.copy(t.viewport),K.copy(t.scissor),$=t.scissorTest}else Q.copy(rt).multiplyScalar(nt),K.copy(at).multiplyScalar(nt),$=ot;if(k!==e&&(p.bindFramebuffer(p.FRAMEBUFFER,e),k=e),m.viewport(Q),m.scissor(K),m.setScissorTest($),i){var r=x.get(t.texture);p.framebufferTexture2D(p.FRAMEBUFFER,p.COLOR_ATTACHMENT0,p.TEXTURE_CUBE_MAP_POSITIVE_X+t.activeCubeFace,r.__webglTexture,t.activeMipMapLevel)}},this.readRenderTargetPixels=function(t,e,i,n,r,a){if(t&&t.isWebGLRenderTarget){var o=x.get(t).__webglFramebuffer;if(o){var s=!1;o!==k&&(p.bindFramebuffer(p.FRAMEBUFFER,o),s=!0);try{var c=t.texture,h=c.format,l=c.type;if(1023!==h&&D.convert(h)!==p.getParameter(p.IMPLEMENTATION_COLOR_READ_FORMAT))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");if(!(1009===l||D.convert(l)===p.getParameter(p.IMPLEMENTATION_COLOR_READ_TYPE)||1015===l&&(d.get("OES_texture_float")||d.get("WEBGL_color_buffer_float"))||1016===l&&d.get("EXT_color_buffer_half_float")))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");p.checkFramebufferStatus(p.FRAMEBUFFER)===p.FRAMEBUFFER_COMPLETE?e>=0&&e<=t.width-n&&i>=0&&i<=t.height-r&&p.readPixels(e,i,n,r,D.convert(h),D.convert(l),a):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete.")}finally{s&&p.bindFramebuffer(p.FRAMEBUFFER,k)}}}else console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.")},this.copyFramebufferToTexture=function(t,e,i){var n=e.image.width,r=e.image.height,a=D.convert(e.format);this.setTexture2D(e,0),p.copyTexImage2D(p.TEXTURE_2D,i||0,a,t.x,t.y,n,r,0)},this.copyTextureToTexture=function(t,e,i,n){var r=e.image.width,a=e.image.height,o=D.convert(i.format),s=D.convert(i.type);this.setTexture2D(i,0),e.isDataTexture?p.texSubImage2D(p.TEXTURE_2D,n||0,t.x,t.y,r,a,o,s,e.image.data):p.texSubImage2D(p.TEXTURE_2D,n||0,t.x,t.y,o,s,e.image)}}function Pi(t,e){this.name="",this.color=new H(t),this.density=void 0!==e?e:25e-5}function Ci(t,e,i){this.name="",this.color=new H(t),this.near=void 0!==e?e:1,this.far=void 0!==i?i:1e3}function Oi(){tt.call(this),this.type="Scene",this.background=null,this.fog=null,this.overrideMaterial=null,this.autoUpdate=!0}function Ii(t){Nt.call(this),this.type="SpriteMaterial",this.color=new H(16777215),this.map=null,this.rotation=0,this.fog=!1,this.lights=!1,this.setValues(t)}function Ni(t){tt.call(this),this.type="Sprite",this.material=void 0!==t?t:new Ii,this.center=new v(.5,.5)}function Di(){tt.call(this),this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]}})}function Ui(t,e){if(t=t||[],this.bones=t.slice(0),this.boneMatrices=new Float32Array(16*this.bones.length),void 0===e)this.calculateInverses();else if(this.bones.length===e.length)this.boneInverses=e.slice(0);else{console.warn("THREE.Skeleton boneInverses is the wrong length."),this.boneInverses=[];for(var i=0,n=this.bones.length;i<n;i++)this.boneInverses.push(new y)}}function zi(){tt.call(this),this.type="Bone"}function Bi(t,e){Gt.call(this,t,e),this.type="SkinnedMesh",this.bindMode="attached",this.bindMatrix=new y,this.bindMatrixInverse=new y;var i=new Ui(this.initBones());this.bind(i,this.matrixWorld),this.normalizeSkinWeights()}function Fi(t){Nt.call(this),this.type="LineBasicMaterial",this.color=new H(16777215),this.linewidth=1,this.linecap="round",this.linejoin="round",this.lights=!1,this.setValues(t)}function Gi(t,e,i){if(1===i)return console.warn("THREE.Line: parameter THREE.LinePieces no longer supported. Created THREE.LineSegments instead."),new Hi(t,e);tt.call(this),this.type="Line",this.geometry=void 0!==t?t:new bt,this.material=void 0!==e?e:new Fi({color:16777215*Math.random()})}function Hi(t,e){Gi.call(this,t,e),this.type="LineSegments"}function ki(t,e){Gi.call(this,t,e),this.type="LineLoop"}function Vi(t){Nt.call(this),this.type="PointsMaterial",this.color=new H(16777215),this.map=null,this.size=1,this.sizeAttenuation=!0,this.morphTargets=!1,this.lights=!1,this.setValues(t)}function ji(t,e){tt.call(this),this.type="Points",this.geometry=void 0!==t?t:new bt,this.material=void 0!==e?e:new Vi({color:16777215*Math.random()})}function Wi(){tt.call(this),this.type="Group"}function Xi(t,e,i,n,r,a,o,s,c){R.call(this,t,e,i,n,r,a,o,s,c),this.generateMipmaps=!1}function qi(t,e,i,n,r,a,o,s,c,h,l,u){R.call(this,null,a,o,s,c,h,n,r,l,u),this.image={width:e,height:i},this.mipmaps=t,this.flipY=!1,this.generateMipmaps=!1}function Yi(t,e,i,n,r,a,o,s,c,h){if(1026!==(h=void 0!==h?h:1026)&&1027!==h)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");void 0===i&&1026===h&&(i=1012),void 0===i&&1027===h&&(i=1020),R.call(this,null,n,r,a,o,s,h,i,c),this.image={width:t,height:e},this.magFilter=void 0!==o?o:1003,this.minFilter=void 0!==s?s:1003,this.flipY=!1,this.generateMipmaps=!1}function Zi(t){bt.call(this),this.type="WireframeGeometry";var e,i,n,r,a,o,s,c,h,l,u=[],p=[0,0],d={},f=["a","b","c"];if(t&&t.isGeometry){var m=t.faces;for(e=0,n=m.length;e<n;e++){var g=m[e];for(i=0;i<3;i++)s=g[f[i]],c=g[f[(i+1)%3]],p[0]=Math.min(s,c),p[1]=Math.max(s,c),void 0===d[h=p[0]+","+p[1]]&&(d[h]={index1:p[0],index2:p[1]})}for(h in d)o=d[h],l=t.vertices[o.index1],u.push(l.x,l.y,l.z),l=t.vertices[o.index2],u.push(l.x,l.y,l.z)}else if(t&&t.isBufferGeometry){var v,y,x,b,w,M,E;if(l=new _,null!==t.index){for(v=t.attributes.position,y=t.index,0===(x=t.groups).length&&(x=[{start:0,count:y.count,materialIndex:0}]),r=0,a=x.length;r<a;++r)for(e=w=(b=x[r]).start,n=w+b.count;e<n;e+=3)for(i=0;i<3;i++)s=y.getX(e+i),c=y.getX(e+(i+1)%3),p[0]=Math.min(s,c),p[1]=Math.max(s,c),void 0===d[h=p[0]+","+p[1]]&&(d[h]={index1:p[0],index2:p[1]});for(h in d)o=d[h],l.fromBufferAttribute(v,o.index1),u.push(l.x,l.y,l.z),l.fromBufferAttribute(v,o.index2),u.push(l.x,l.y,l.z)}else for(e=0,n=(v=t.attributes.position).count/3;e<n;e++)for(i=0;i<3;i++)M=3*e+i,l.fromBufferAttribute(v,M),u.push(l.x,l.y,l.z),E=3*e+(i+1)%3,l.fromBufferAttribute(v,E),u.push(l.x,l.y,l.z)}this.addAttribute("position",new gt(u,3))}function Ji(t,e,i){st.call(this),this.type="ParametricGeometry",this.parameters={func:t,slices:e,stacks:i},this.fromBufferGeometry(new Qi(t,e,i)),this.mergeVertices()}function Qi(t,e,i){bt.call(this),this.type="ParametricBufferGeometry",this.parameters={func:t,slices:e,stacks:i};var n,r,a=[],o=[],s=[],c=[],h=1e-5,l=new _,u=new _,p=new _,d=new _,f=new _;t.length<3&&console.error("THREE.ParametricGeometry: Function must now modify a Vector3 as third parameter.");var m=e+1;for(n=0;n<=i;n++){var g=n/i;for(r=0;r<=e;r++){var v=r/e;t(v,g,u),o.push(u.x,u.y,u.z),v-h>=0?(t(v-h,g,p),d.subVectors(u,p)):(t(v+h,g,p),d.subVectors(p,u)),g-h>=0?(t(v,g-h,p),f.subVectors(u,p)):(t(v,g+h,p),f.subVectors(p,u)),l.crossVectors(d,f).normalize(),s.push(l.x,l.y,l.z),c.push(v,g)}}for(n=0;n<i;n++)for(r=0;r<e;r++){var y=n*m+r,x=n*m+r+1,b=(n+1)*m+r+1,w=(n+1)*m+r;a.push(y,x,w),a.push(x,b,w)}this.setIndex(a),this.addAttribute("position",new gt(o,3)),this.addAttribute("normal",new gt(s,3)),this.addAttribute("uv",new gt(c,2))}function Ki(t,e,i,n){st.call(this),this.type="PolyhedronGeometry",this.parameters={vertices:t,indices:e,radius:i,detail:n},this.fromBufferGeometry(new $i(t,e,i,n)),this.mergeVertices()}function $i(t,e,i,n){bt.call(this),this.type="PolyhedronBufferGeometry",this.parameters={vertices:t,indices:e,radius:i,detail:n},i=i||1;var r=[],a=[];function o(t,e,i,n){var r,a,o=Math.pow(2,n),c=[];for(r=0;r<=o;r++){c[r]=[];var h=t.clone().lerp(i,r/o),l=e.clone().lerp(i,r/o),u=o-r;for(a=0;a<=u;a++)c[r][a]=0===a&&r===o?h:h.clone().lerp(l,a/u)}for(r=0;r<o;r++)for(a=0;a<2*(o-r)-1;a++){var p=Math.floor(a/2);a%2==0?(s(c[r][p+1]),s(c[r+1][p]),s(c[r][p])):(s(c[r][p+1]),s(c[r+1][p+1]),s(c[r+1][p]))}}function s(t){r.push(t.x,t.y,t.z)}function c(e,i){var n=3*e;i.x=t[n+0],i.y=t[n+1],i.z=t[n+2]}function h(t,e,i,n){n<0&&1===t.x&&(a[e]=t.x-1),0===i.x&&0===i.z&&(a[e]=n/2/Math.PI+.5)}function l(t){return Math.atan2(t.z,-t.x)}function u(t){return Math.atan2(-t.y,Math.sqrt(t.x*t.x+t.z*t.z))}!function(t){for(var i=new _,n=new _,r=new _,a=0;a<e.length;a+=3)c(e[a+0],i),c(e[a+1],n),c(e[a+2],r),o(i,n,r,t)}(n=n||0),function(t){for(var e=new _,i=0;i<r.length;i+=3)e.x=r[i+0],e.y=r[i+1],e.z=r[i+2],e.normalize().multiplyScalar(t),r[i+0]=e.x,r[i+1]=e.y,r[i+2]=e.z}(i),function(){for(var t=new _,e=0;e<r.length;e+=3){t.x=r[e+0],t.y=r[e+1],t.z=r[e+2];var i=l(t)/2/Math.PI+.5,n=u(t)/Math.PI+.5;a.push(i,1-n)}(function(){for(var t=new _,e=new _,i=new _,n=new _,o=new v,s=new v,c=new v,u=0,p=0;u<r.length;u+=9,p+=6){t.set(r[u+0],r[u+1],r[u+2]),e.set(r[u+3],r[u+4],r[u+5]),i.set(r[u+6],r[u+7],r[u+8]),o.set(a[p+0],a[p+1]),s.set(a[p+2],a[p+3]),c.set(a[p+4],a[p+5]),n.copy(t).add(e).add(i).divideScalar(3);var d=l(n);h(o,p+0,t,d),h(s,p+2,e,d),h(c,p+4,i,d)}})(),function(){for(var t=0;t<a.length;t+=6){var e=a[t+0],i=a[t+2],n=a[t+4],r=Math.max(e,i,n),o=Math.min(e,i,n);r>.9&&o<.1&&(e<.2&&(a[t+0]+=1),i<.2&&(a[t+2]+=1),n<.2&&(a[t+4]+=1))}}()}(),this.addAttribute("position",new gt(r,3)),this.addAttribute("normal",new gt(r.slice(),3)),this.addAttribute("uv",new gt(a,2)),0===n?this.computeVertexNormals():this.normalizeNormals()}function tn(t,e){st.call(this),this.type="TetrahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new en(t,e)),this.mergeVertices()}function en(t,e){$i.call(this,[1,1,1,-1,-1,1,-1,1,-1,1,-1,-1],[2,1,0,0,3,2,1,3,0,2,3,1],t,e),this.type="TetrahedronBufferGeometry",this.parameters={radius:t,detail:e}}function nn(t,e){st.call(this),this.type="OctahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new rn(t,e)),this.mergeVertices()}function rn(t,e){$i.call(this,[1,0,0,-1,0,0,0,1,0,0,-1,0,0,0,1,0,0,-1],[0,2,4,0,4,3,0,3,5,0,5,2,1,2,5,1,5,3,1,3,4,1,4,2],t,e),this.type="OctahedronBufferGeometry",this.parameters={radius:t,detail:e}}function an(t,e){st.call(this),this.type="IcosahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new on(t,e)),this.mergeVertices()}function on(t,e){var i=(1+Math.sqrt(5))/2,n=[-1,i,0,1,i,0,-1,-i,0,1,-i,0,0,-1,i,0,1,i,0,-1,-i,0,1,-i,i,0,-1,i,0,1,-i,0,-1,-i,0,1];$i.call(this,n,[0,11,5,0,5,1,0,1,7,0,7,10,0,10,11,1,5,9,5,11,4,11,10,2,10,7,6,7,1,8,3,9,4,3,4,2,3,2,6,3,6,8,3,8,9,4,9,5,2,4,11,6,2,10,8,6,7,9,8,1],t,e),this.type="IcosahedronBufferGeometry",this.parameters={radius:t,detail:e}}function sn(t,e){st.call(this),this.type="DodecahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new cn(t,e)),this.mergeVertices()}function cn(t,e){var i=(1+Math.sqrt(5))/2,n=1/i,r=[-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,0,-n,-i,0,-n,i,0,n,-i,0,n,i,-n,-i,0,-n,i,0,n,-i,0,n,i,0,-i,0,-n,i,0,-n,-i,0,n,i,0,n];$i.call(this,r,[3,11,7,3,7,15,3,15,13,7,19,17,7,17,6,7,6,15,17,4,8,17,8,10,17,10,6,8,0,16,8,16,2,8,2,10,0,12,1,0,1,18,0,18,16,6,10,2,6,2,13,6,13,15,2,16,18,2,18,3,2,3,13,18,1,9,18,9,11,18,11,3,4,14,12,4,12,0,4,0,8,11,9,5,11,5,19,11,19,7,19,5,14,19,14,4,19,4,17,1,12,14,1,14,5,1,5,9],t,e),this.type="DodecahedronBufferGeometry",this.parameters={radius:t,detail:e}}function hn(t,e,i,n,r,a){st.call(this),this.type="TubeGeometry",this.parameters={path:t,tubularSegments:e,radius:i,radialSegments:n,closed:r},void 0!==a&&console.warn("THREE.TubeGeometry: taper has been removed.");var o=new ln(t,e,i,n,r);this.tangents=o.tangents,this.normals=o.normals,this.binormals=o.binormals,this.fromBufferGeometry(o),this.mergeVertices()}function ln(t,e,i,n,r){bt.call(this),this.type="TubeBufferGeometry",this.parameters={path:t,tubularSegments:e,radius:i,radialSegments:n,closed:r},e=e||64,i=i||1,n=n||8,r=r||!1;var a=t.computeFrenetFrames(e,r);this.tangents=a.tangents,this.normals=a.normals,this.binormals=a.binormals;var o,s,c=new _,h=new _,l=new v,u=new _,p=[],d=[],f=[],m=[];function g(r){u=t.getPointAt(r/e,u);var o=a.normals[r],l=a.binormals[r];for(s=0;s<=n;s++){var f=s/n*Math.PI*2,m=Math.sin(f),g=-Math.cos(f);h.x=g*o.x+m*l.x,h.y=g*o.y+m*l.y,h.z=g*o.z+m*l.z,h.normalize(),d.push(h.x,h.y,h.z),c.x=u.x+i*h.x,c.y=u.y+i*h.y,c.z=u.z+i*h.z,p.push(c.x,c.y,c.z)}}!function(){for(o=0;o<e;o++)g(o);g(!1===r?e:0),function(){for(o=0;o<=e;o++)for(s=0;s<=n;s++)l.x=o/e,l.y=s/n,f.push(l.x,l.y)}(),function(){for(s=1;s<=e;s++)for(o=1;o<=n;o++){var t=(n+1)*(s-1)+(o-1),i=(n+1)*s+(o-1),r=(n+1)*s+o,a=(n+1)*(s-1)+o;m.push(t,i,a),m.push(i,r,a)}}()}(),this.setIndex(m),this.addAttribute("position",new gt(p,3)),this.addAttribute("normal",new gt(d,3)),this.addAttribute("uv",new gt(f,2))}function un(t,e,i,n,r,a,o){st.call(this),this.type="TorusKnotGeometry",this.parameters={radius:t,tube:e,tubularSegments:i,radialSegments:n,p:r,q:a},void 0!==o&&console.warn("THREE.TorusKnotGeometry: heightScale has been deprecated. Use .scale( x, y, z ) instead."),this.fromBufferGeometry(new pn(t,e,i,n,r,a)),this.mergeVertices()}function pn(t,e,i,n,r,a){bt.call(this),this.type="TorusKnotBufferGeometry",this.parameters={radius:t,tube:e,tubularSegments:i,radialSegments:n,p:r,q:a},t=t||1,e=e||.4,i=Math.floor(i)||64,n=Math.floor(n)||8,r=r||2,a=a||3;var o,s,c=[],h=[],l=[],u=[],p=new _,d=new _,f=new _,m=new _,g=new _,v=new _,y=new _;for(o=0;o<=i;++o){var x=o/i*r*Math.PI*2;for(R(x,r,a,t,f),R(x+.01,r,a,t,m),v.subVectors(m,f),y.addVectors(m,f),g.crossVectors(v,y),y.crossVectors(g,v),g.normalize(),y.normalize(),s=0;s<=n;++s){var b=s/n*Math.PI*2,w=-e*Math.cos(b),M=e*Math.sin(b);p.x=f.x+(w*y.x+M*g.x),p.y=f.y+(w*y.y+M*g.y),p.z=f.z+(w*y.z+M*g.z),h.push(p.x,p.y,p.z),d.subVectors(p,f).normalize(),l.push(d.x,d.y,d.z),u.push(o/i),u.push(s/n)}}for(s=1;s<=i;s++)for(o=1;o<=n;o++){var E=(n+1)*(s-1)+(o-1),T=(n+1)*s+(o-1),S=(n+1)*s+o,A=(n+1)*(s-1)+o;c.push(E,T,A),c.push(T,S,A)}function R(t,e,i,n,r){var a=Math.cos(t),o=Math.sin(t),s=i/e*t,c=Math.cos(s);r.x=n*(2+c)*.5*a,r.y=n*(2+c)*o*.5,r.z=n*Math.sin(s)*.5}this.setIndex(c),this.addAttribute("position",new gt(h,3)),this.addAttribute("normal",new gt(l,3)),this.addAttribute("uv",new gt(u,2))}function dn(t,e,i,n,r){st.call(this),this.type="TorusGeometry",this.parameters={radius:t,tube:e,radialSegments:i,tubularSegments:n,arc:r},this.fromBufferGeometry(new fn(t,e,i,n,r)),this.mergeVertices()}function fn(t,e,i,n,r){bt.call(this),this.type="TorusBufferGeometry",this.parameters={radius:t,tube:e,radialSegments:i,tubularSegments:n,arc:r},t=t||1,e=e||.4,i=Math.floor(i)||8,n=Math.floor(n)||6,r=r||2*Math.PI;var a,o,s=[],c=[],h=[],l=[],u=new _,p=new _,d=new _;for(a=0;a<=i;a++)for(o=0;o<=n;o++){var f=o/n*r,m=a/i*Math.PI*2;p.x=(t+e*Math.cos(m))*Math.cos(f),p.y=(t+e*Math.cos(m))*Math.sin(f),p.z=e*Math.sin(m),c.push(p.x,p.y,p.z),u.x=t*Math.cos(f),u.y=t*Math.sin(f),d.subVectors(p,u).normalize(),h.push(d.x,d.y,d.z),l.push(o/n),l.push(a/i)}for(a=1;a<=i;a++)for(o=1;o<=n;o++){var g=(n+1)*a+o-1,v=(n+1)*(a-1)+o-1,y=(n+1)*(a-1)+o,x=(n+1)*a+o;s.push(g,v,x),s.push(v,y,x)}this.setIndex(s),this.addAttribute("position",new gt(c,3)),this.addAttribute("normal",new gt(h,3)),this.addAttribute("uv",new gt(l,2))}vi.prototype=Object.create(Nt.prototype),vi.prototype.constructor=vi,vi.prototype.isMeshDepthMaterial=!0,vi.prototype.copy=function(t){return Nt.prototype.copy.call(this,t),this.depthPacking=t.depthPacking,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this},yi.prototype=Object.create(Nt.prototype),yi.prototype.constructor=yi,yi.prototype.isMeshDistanceMaterial=!0,yi.prototype.copy=function(t){return Nt.prototype.copy.call(this,t),this.referencePosition.copy(t.referencePosition),this.nearDistance=t.nearDistance,this.farDistance=t.farDistance,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this},_i.prototype=Object.create(R.prototype),_i.prototype.constructor=_i,_i.prototype.isCanvasTexture=!0,Ti.prototype=Object.assign(Object.create(et.prototype),{constructor:Ti,isPerspectiveCamera:!0,copy:function(t,e){return et.prototype.copy.call(this,t,e),this.fov=t.fov,this.zoom=t.zoom,this.near=t.near,this.far=t.far,this.focus=t.focus,this.aspect=t.aspect,this.view=null===t.view?null:Object.assign({},t.view),this.filmGauge=t.filmGauge,this.filmOffset=t.filmOffset,this},setFocalLength:function(t){var e=.5*this.getFilmHeight()/t;this.fov=2*g.RAD2DEG*Math.atan(e),this.updateProjectionMatrix()},getFocalLength:function(){var t=Math.tan(.5*g.DEG2RAD*this.fov);return.5*this.getFilmHeight()/t},getEffectiveFOV:function(){return 2*g.RAD2DEG*Math.atan(Math.tan(.5*g.DEG2RAD*this.fov)/this.zoom)},getFilmWidth:function(){return this.filmGauge*Math.min(this.aspect,1)},getFilmHeight:function(){return this.filmGauge/Math.max(this.aspect,1)},setViewOffset:function(t,e,i,n,r,a){this.aspect=t/e,null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=e,this.view.offsetX=i,this.view.offsetY=n,this.view.width=r,this.view.height=a,this.updateProjectionMatrix()},clearViewOffset:function(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()},updateProjectionMatrix:function(){var t=this.near,e=t*Math.tan(.5*g.DEG2RAD*this.fov)/this.zoom,i=2*e,n=this.aspect*i,r=-.5*n,a=this.view;if(null!==this.view&&this.view.enabled){var o=a.fullWidth,s=a.fullHeight;r+=a.offsetX*n/o,e-=a.offsetY*i/s,n*=a.width/o,i*=a.height/s}var c=this.filmOffset;0!==c&&(r+=t*c/this.getFilmWidth()),this.projectionMatrix.makePerspective(r,r+n,e,e-i,t,this.far)},toJSON:function(t){var e=tt.prototype.toJSON.call(this,t);return e.object.fov=this.fov,e.object.zoom=this.zoom,e.object.near=this.near,e.object.far=this.far,e.object.focus=this.focus,e.object.aspect=this.aspect,null!==this.view&&(e.object.view=Object.assign({},this.view)),e.object.filmGauge=this.filmGauge,e.object.filmOffset=this.filmOffset,e}}),Si.prototype=Object.assign(Object.create(Ti.prototype),{constructor:Si,isArrayCamera:!0}),Pi.prototype.isFogExp2=!0,Pi.prototype.clone=function(){return new Pi(this.color,this.density)},Pi.prototype.toJSON=function(){return{type:"FogExp2",color:this.color.getHex(),density:this.density}},Ci.prototype.isFog=!0,Ci.prototype.clone=function(){return new Ci(this.color,this.near,this.far)},Ci.prototype.toJSON=function(){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}},Oi.prototype=Object.assign(Object.create(tt.prototype),{constructor:Oi,copy:function(t,e){return tt.prototype.copy.call(this,t,e),null!==t.background&&(this.background=t.background.clone()),null!==t.fog&&(this.fog=t.fog.clone()),null!==t.overrideMaterial&&(this.overrideMaterial=t.overrideMaterial.clone()),this.autoUpdate=t.autoUpdate,this.matrixAutoUpdate=t.matrixAutoUpdate,this},toJSON:function(t){var e=tt.prototype.toJSON.call(this,t);return null!==this.background&&(e.object.background=this.background.toJSON(t)),null!==this.fog&&(e.object.fog=this.fog.toJSON()),e}}),Ii.prototype=Object.create(Nt.prototype),Ii.prototype.constructor=Ii,Ii.prototype.isSpriteMaterial=!0,Ii.prototype.copy=function(t){return Nt.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.rotation=t.rotation,this},Ni.prototype=Object.assign(Object.create(tt.prototype),{constructor:Ni,isSprite:!0,raycast:(ai=new _,oi=new _,si=new _,function(t,e){oi.setFromMatrixPosition(this.matrixWorld),t.ray.closestPointToPoint(oi,ai),si.setFromMatrixScale(this.matrixWorld);var i=si.x*si.y/4;if(!(oi.distanceToSquared(ai)>i)){var n=t.ray.origin.distanceTo(ai);n<t.near||n>t.far||e.push({distance:n,point:ai.clone(),face:null,object:this})}}),clone:function(){return new this.constructor(this.material).copy(this)},copy:function(t){return tt.prototype.copy.call(this,t),void 0!==t.center&&this.center.copy(t.center),this}}),Di.prototype=Object.assign(Object.create(tt.prototype),{constructor:Di,copy:function(t){tt.prototype.copy.call(this,t,!1);for(var e=t.levels,i=0,n=e.length;i<n;i++){var r=e[i];this.addLevel(r.object.clone(),r.distance)}return this},addLevel:function(t,e){void 0===e&&(e=0),e=Math.abs(e);for(var i=this.levels,n=0;n<i.length&&!(e<i[n].distance);n++);i.splice(n,0,{distance:e,object:t}),this.add(t)},getObjectForDistance:function(t){for(var e=this.levels,i=1,n=e.length;i<n&&!(t<e[i].distance);i++);return e[i-1].object},raycast:(ci=new _,function(t,e){ci.setFromMatrixPosition(this.matrixWorld);var i=t.ray.origin.distanceTo(ci);this.getObjectForDistance(i).raycast(t,e)}),update:function(){var t=new _,e=new _;return function(i){var n=this.levels;if(n.length>1){t.setFromMatrixPosition(i.matrixWorld),e.setFromMatrixPosition(this.matrixWorld);var r=t.distanceTo(e);n[0].object.visible=!0;for(var a=1,o=n.length;a<o&&r>=n[a].distance;a++)n[a-1].object.visible=!1,n[a].object.visible=!0;for(;a<o;a++)n[a].object.visible=!1}}}(),toJSON:function(t){var e=tt.prototype.toJSON.call(this,t);e.object.levels=[];for(var i=this.levels,n=0,r=i.length;n<r;n++){var a=i[n];e.object.levels.push({object:a.object.uuid,distance:a.distance})}return e}}),Object.assign(Ui.prototype,{calculateInverses:function(){this.boneInverses=[];for(var t=0,e=this.bones.length;t<e;t++){var i=new y;this.bones[t]&&i.getInverse(this.bones[t].matrixWorld),this.boneInverses.push(i)}},pose:function(){var t,e,i;for(e=0,i=this.bones.length;e<i;e++)(t=this.bones[e])&&t.matrixWorld.getInverse(this.boneInverses[e]);for(e=0,i=this.bones.length;e<i;e++)(t=this.bones[e])&&(t.parent&&t.parent.isBone?(t.matrix.getInverse(t.parent.matrixWorld),t.matrix.multiply(t.matrixWorld)):t.matrix.copy(t.matrixWorld),t.matrix.decompose(t.position,t.quaternion,t.scale))},update:(hi=new y,li=new y,function(){for(var t=this.bones,e=this.boneInverses,i=this.boneMatrices,n=this.boneTexture,r=0,a=t.length;r<a;r++){var o=t[r]?t[r].matrixWorld:li;hi.multiplyMatrices(o,e[r]),hi.toArray(i,16*r)}void 0!==n&&(n.needsUpdate=!0)}),clone:function(){return new Ui(this.bones,this.boneInverses)},getBoneByName:function(t){for(var e=0,i=this.bones.length;e<i;e++){var n=this.bones[e];if(n.name===t)return n}}}),zi.prototype=Object.assign(Object.create(tt.prototype),{constructor:zi,isBone:!0}),Bi.prototype=Object.assign(Object.create(Gt.prototype),{constructor:Bi,isSkinnedMesh:!0,initBones:function(){var t,e,i,n,r=[];if(this.geometry&&void 0!==this.geometry.bones){for(i=0,n=this.geometry.bones.length;i<n;i++)e=this.geometry.bones[i],t=new zi,r.push(t),t.name=e.name,t.position.fromArray(e.pos),t.quaternion.fromArray(e.rotq),void 0!==e.scl&&t.scale.fromArray(e.scl);for(i=0,n=this.geometry.bones.length;i<n;i++)-1!==(e=this.geometry.bones[i]).parent&&null!==e.parent&&void 0!==r[e.parent]?r[e.parent].add(r[i]):this.add(r[i])}return this.updateMatrixWorld(!0),r},bind:function(t,e){this.skeleton=t,void 0===e&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),e=this.matrixWorld),this.bindMatrix.copy(e),this.bindMatrixInverse.getInverse(e)},pose:function(){this.skeleton.pose()},normalizeSkinWeights:function(){var t,e;if(this.geometry&&this.geometry.isGeometry)for(e=0;e<this.geometry.skinWeights.length;e++){var i=this.geometry.skinWeights[e];(t=1/i.manhattanLength())!==1/0?i.multiplyScalar(t):i.set(1,0,0,0)}else if(this.geometry&&this.geometry.isBufferGeometry){var n=new L,r=this.geometry.attributes.skinWeight;for(e=0;e<r.count;e++)n.x=r.getX(e),n.y=r.getY(e),n.z=r.getZ(e),n.w=r.getW(e),(t=1/n.manhattanLength())!==1/0?n.multiplyScalar(t):n.set(1,0,0,0),r.setXYZW(e,n.x,n.y,n.z,n.w)}},updateMatrixWorld:function(t){Gt.prototype.updateMatrixWorld.call(this,t),"attached"===this.bindMode?this.bindMatrixInverse.getInverse(this.matrixWorld):"detached"===this.bindMode?this.bindMatrixInverse.getInverse(this.bindMatrix):console.warn("THREE.SkinnedMesh: Unrecognized bindMode: "+this.bindMode)},clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),Fi.prototype=Object.create(Nt.prototype),Fi.prototype.constructor=Fi,Fi.prototype.isLineBasicMaterial=!0,Fi.prototype.copy=function(t){return Nt.prototype.copy.call(this,t),this.color.copy(t.color),this.linewidth=t.linewidth,this.linecap=t.linecap,this.linejoin=t.linejoin,this},Gi.prototype=Object.assign(Object.create(tt.prototype),{constructor:Gi,isLine:!0,computeLineDistances:(ui=new _,pi=new _,function(){var t=this.geometry;if(t.isBufferGeometry)if(null===t.index){for(var e=t.attributes.position,i=[0],n=1,r=e.count;n<r;n++)ui.fromBufferAttribute(e,n-1),pi.fromBufferAttribute(e,n),i[n]=i[n-1],i[n]+=ui.distanceTo(pi);t.addAttribute("lineDistance",new gt(i,1))}else console.warn("THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else if(t.isGeometry){var a=t.vertices;for((i=t.lineDistances)[0]=0,n=1,r=a.length;n<r;n++)i[n]=i[n-1],i[n]+=a[n-1].distanceTo(a[n])}return this}),raycast:function(){var t=new y,e=new zt,i=new N;return function(n,r){var a=n.linePrecision,o=a*a,s=this.geometry,c=this.matrixWorld;if(null===s.boundingSphere&&s.computeBoundingSphere(),i.copy(s.boundingSphere),i.applyMatrix4(c),!1!==n.ray.intersectsSphere(i)){t.getInverse(c),e.copy(n.ray).applyMatrix4(t);var h=new _,l=new _,u=new _,p=new _,d=this&&this.isLineSegments?2:1;if(s.isBufferGeometry){var f=s.index,m=s.attributes.position.array;if(null!==f)for(var g=f.array,v=0,y=g.length-1;v<y;v+=d){var x=g[v],b=g[v+1];if(h.fromArray(m,3*x),l.fromArray(m,3*b),!(e.distanceSqToSegment(h,l,p,u)>o))p.applyMatrix4(this.matrixWorld),(E=n.ray.origin.distanceTo(p))<n.near||E>n.far||r.push({distance:E,point:u.clone().applyMatrix4(this.matrixWorld),index:v,face:null,faceIndex:null,object:this})}else for(v=0,y=m.length/3-1;v<y;v+=d){if(h.fromArray(m,3*v),l.fromArray(m,3*v+3),!(e.distanceSqToSegment(h,l,p,u)>o))p.applyMatrix4(this.matrixWorld),(E=n.ray.origin.distanceTo(p))<n.near||E>n.far||r.push({distance:E,point:u.clone().applyMatrix4(this.matrixWorld),index:v,face:null,faceIndex:null,object:this})}}else if(s.isGeometry){var w=s.vertices,M=w.length;for(v=0;v<M-1;v+=d){var E;if(!(e.distanceSqToSegment(w[v],w[v+1],p,u)>o))p.applyMatrix4(this.matrixWorld),(E=n.ray.origin.distanceTo(p))<n.near||E>n.far||r.push({distance:E,point:u.clone().applyMatrix4(this.matrixWorld),index:v,face:null,faceIndex:null,object:this})}}}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),Hi.prototype=Object.assign(Object.create(Gi.prototype),{constructor:Hi,isLineSegments:!0,computeLineDistances:function(){var t=new _,e=new _;return function(){var i=this.geometry;if(i.isBufferGeometry)if(null===i.index){for(var n=i.attributes.position,r=[],a=0,o=n.count;a<o;a+=2)t.fromBufferAttribute(n,a),e.fromBufferAttribute(n,a+1),r[a]=0===a?0:r[a-1],r[a+1]=r[a]+t.distanceTo(e);i.addAttribute("lineDistance",new gt(r,1))}else console.warn("THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else if(i.isGeometry){var s=i.vertices;for(r=i.lineDistances,a=0,o=s.length;a<o;a+=2)t.copy(s[a]),e.copy(s[a+1]),r[a]=0===a?0:r[a-1],r[a+1]=r[a]+t.distanceTo(e)}return this}}()}),ki.prototype=Object.assign(Object.create(Gi.prototype),{constructor:ki,isLineLoop:!0}),Vi.prototype=Object.create(Nt.prototype),Vi.prototype.constructor=Vi,Vi.prototype.isPointsMaterial=!0,Vi.prototype.copy=function(t){return Nt.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.size=t.size,this.sizeAttenuation=t.sizeAttenuation,this.morphTargets=t.morphTargets,this},ji.prototype=Object.assign(Object.create(tt.prototype),{constructor:ji,isPoints:!0,raycast:function(){var t=new y,e=new zt,i=new N;return function(n,r){var a=this,o=this.geometry,s=this.matrixWorld,c=n.params.Points.threshold;if(null===o.boundingSphere&&o.computeBoundingSphere(),i.copy(o.boundingSphere),i.applyMatrix4(s),i.radius+=c,!1!==n.ray.intersectsSphere(i)){t.getInverse(s),e.copy(n.ray).applyMatrix4(t);var h=c/((this.scale.x+this.scale.y+this.scale.z)/3),l=h*h,u=new _,p=new _;if(o.isBufferGeometry){var d=o.index,f=o.attributes.position.array;if(null!==d)for(var m=d.array,g=0,v=m.length;g<v;g++){var y=m[g];u.fromArray(f,3*y),w(u,y)}else{g=0;for(var x=f.length/3;g<x;g++)u.fromArray(f,3*g),w(u,g)}}else{var b=o.vertices;for(g=0,x=b.length;g<x;g++)w(b[g],g)}}function w(t,i){var o=e.distanceSqToPoint(t);if(o<l){e.closestPointToPoint(t,p),p.applyMatrix4(s);var c=n.ray.origin.distanceTo(p);if(c<n.near||c>n.far)return;r.push({distance:c,distanceToRay:Math.sqrt(o),point:p.clone(),index:i,face:null,object:a})}}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),Wi.prototype=Object.assign(Object.create(tt.prototype),{constructor:Wi,isGroup:!0}),Xi.prototype=Object.assign(Object.create(R.prototype),{constructor:Xi,isVideoTexture:!0,update:function(){var t=this.image;t.readyState>=t.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}),qi.prototype=Object.create(R.prototype),qi.prototype.constructor=qi,qi.prototype.isCompressedTexture=!0,Yi.prototype=Object.create(R.prototype),Yi.prototype.constructor=Yi,Yi.prototype.isDepthTexture=!0,Zi.prototype=Object.create(bt.prototype),Zi.prototype.constructor=Zi,Ji.prototype=Object.create(st.prototype),Ji.prototype.constructor=Ji,Qi.prototype=Object.create(bt.prototype),Qi.prototype.constructor=Qi,Ki.prototype=Object.create(st.prototype),Ki.prototype.constructor=Ki,$i.prototype=Object.create(bt.prototype),$i.prototype.constructor=$i,tn.prototype=Object.create(st.prototype),tn.prototype.constructor=tn,en.prototype=Object.create($i.prototype),en.prototype.constructor=en,nn.prototype=Object.create(st.prototype),nn.prototype.constructor=nn,rn.prototype=Object.create($i.prototype),rn.prototype.constructor=rn,an.prototype=Object.create(st.prototype),an.prototype.constructor=an,on.prototype=Object.create($i.prototype),on.prototype.constructor=on,sn.prototype=Object.create(st.prototype),sn.prototype.constructor=sn,cn.prototype=Object.create($i.prototype),cn.prototype.constructor=cn,hn.prototype=Object.create(st.prototype),hn.prototype.constructor=hn,ln.prototype=Object.create(bt.prototype),ln.prototype.constructor=ln,un.prototype=Object.create(st.prototype),un.prototype.constructor=un,pn.prototype=Object.create(bt.prototype),pn.prototype.constructor=pn,dn.prototype=Object.create(st.prototype),dn.prototype.constructor=dn,fn.prototype=Object.create(bt.prototype),fn.prototype.constructor=fn;var mn=function(t,e,i){i=i||2;var n,r,a,o,s,c,h,l=e&&e.length,u=l?e[0]*i:t.length,p=gn(t,0,u,i,!0),d=[];if(!p)return d;if(l&&(p=function(t,e,i,n){var r,a,o,s,c,h=[];for(r=0,a=e.length;r<a;r++)o=e[r]*n,s=r<a-1?e[r+1]*n:t.length,(c=gn(t,o,s,n,!1))===c.next&&(c.steiner=!0),h.push(Sn(c));for(h.sort(Mn),r=0;r<h.length;r++)En(h[r],i),i=vn(i,i.next);return i}(t,e,p,i)),t.length>80*i){n=a=t[0],r=o=t[1];for(var f=i;f<u;f+=i)(s=t[f])<n&&(n=s),(c=t[f+1])<r&&(r=c),s>a&&(a=s),c>o&&(o=c);h=0!==(h=Math.max(a-n,o-r))?1/h:0}return yn(p,d,i,n,r,h),d};function gn(t,e,i,n,r){var a,o;if(r===function(t,e,i,n){for(var r=0,a=e,o=i-n;a<i;a+=n)r+=(t[o]-t[a])*(t[a+1]+t[o+1]),o=a;return r}(t,e,i,n)>0)for(a=e;a<i;a+=n)o=Nn(a,t[a],t[a+1],o);else for(a=i-n;a>=e;a-=n)o=Nn(a,t[a],t[a+1],o);return o&&Pn(o,o.next)&&(Dn(o),o=o.next),o}function vn(t,e){if(!t)return t;e||(e=t);var i,n=t;do{if(i=!1,n.steiner||!Pn(n,n.next)&&0!==Ln(n.prev,n,n.next))n=n.next;else{if(Dn(n),(n=e=n.prev)===n.next)break;i=!0}}while(i||n!==e);return e}function yn(t,e,i,n,r,a,o){if(t){!o&&a&&function(t,e,i,n){var r=t;do{null===r.z&&(r.z=Tn(r.x,r.y,e,i,n)),r.prevZ=r.prev,r.nextZ=r.next,r=r.next}while(r!==t);r.prevZ.nextZ=null,r.prevZ=null,function(t){var e,i,n,r,a,o,s,c,h=1;do{for(i=t,t=null,a=null,o=0;i;){for(o++,n=i,s=0,e=0;e<h&&(s++,n=n.nextZ);e++);for(c=h;s>0||c>0&&n;)0!==s&&(0===c||!n||i.z<=n.z)?(r=i,i=i.nextZ,s--):(r=n,n=n.nextZ,c--),a?a.nextZ=r:t=r,r.prevZ=a,a=r;i=n}a.nextZ=null,h*=2}while(o>1)}(r)}(t,n,r,a);for(var s,c,h=t;t.prev!==t.next;)if(s=t.prev,c=t.next,a?_n(t,n,r,a):xn(t))e.push(s.i/i),e.push(t.i/i),e.push(c.i/i),Dn(t),t=c.next,h=c.next;else if((t=c)===h){o?1===o?yn(t=bn(t,e,i),e,i,n,r,a,2):2===o&&wn(t,e,i,n,r,a):yn(vn(t),e,i,n,r,a,1);break}}}function xn(t){var e=t.prev,i=t,n=t.next;if(Ln(e,i,n)>=0)return!1;for(var r=t.next.next;r!==t.prev;){if(An(e.x,e.y,i.x,i.y,n.x,n.y,r.x,r.y)&&Ln(r.prev,r,r.next)>=0)return!1;r=r.next}return!0}function _n(t,e,i,n){var r=t.prev,a=t,o=t.next;if(Ln(r,a,o)>=0)return!1;for(var s=r.x<a.x?r.x<o.x?r.x:o.x:a.x<o.x?a.x:o.x,c=r.y<a.y?r.y<o.y?r.y:o.y:a.y<o.y?a.y:o.y,h=r.x>a.x?r.x>o.x?r.x:o.x:a.x>o.x?a.x:o.x,l=r.y>a.y?r.y>o.y?r.y:o.y:a.y>o.y?a.y:o.y,u=Tn(s,c,e,i,n),p=Tn(h,l,e,i,n),d=t.nextZ;d&&d.z<=p;){if(d!==t.prev&&d!==t.next&&An(r.x,r.y,a.x,a.y,o.x,o.y,d.x,d.y)&&Ln(d.prev,d,d.next)>=0)return!1;d=d.nextZ}for(d=t.prevZ;d&&d.z>=u;){if(d!==t.prev&&d!==t.next&&An(r.x,r.y,a.x,a.y,o.x,o.y,d.x,d.y)&&Ln(d.prev,d,d.next)>=0)return!1;d=d.prevZ}return!0}function bn(t,e,i){var n=t;do{var r=n.prev,a=n.next.next;!Pn(r,a)&&Cn(r,n,n.next,a)&&On(r,a)&&On(a,r)&&(e.push(r.i/i),e.push(n.i/i),e.push(a.i/i),Dn(n),Dn(n.next),n=t=a),n=n.next}while(n!==t);return n}function wn(t,e,i,n,r,a){var o=t;do{for(var s=o.next.next;s!==o.prev;){if(o.i!==s.i&&Rn(o,s)){var c=In(o,s);return o=vn(o,o.next),c=vn(c,c.next),yn(o,e,i,n,r,a),void yn(c,e,i,n,r,a)}s=s.next}o=o.next}while(o!==t)}function Mn(t,e){return t.x-e.x}function En(t,e){if(e=function(t,e){var i,n=e,r=t.x,a=t.y,o=-1/0;do{if(a<=n.y&&a>=n.next.y&&n.next.y!==n.y){var s=n.x+(a-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(s<=r&&s>o){if(o=s,s===r){if(a===n.y)return n;if(a===n.next.y)return n.next}i=n.x<n.next.x?n:n.next}}n=n.next}while(n!==e);if(!i)return null;if(r===o)return i.prev;var c,h=i,l=i.x,u=i.y,p=1/0;n=i.next;for(;n!==h;)r>=n.x&&n.x>=l&&r!==n.x&&An(a<u?r:o,a,l,u,a<u?o:r,a,n.x,n.y)&&((c=Math.abs(a-n.y)/(r-n.x))<p||c===p&&n.x>i.x)&&On(n,t)&&(i=n,p=c),n=n.next;return i}(t,e)){var i=In(e,t);vn(i,i.next)}}function Tn(t,e,i,n,r){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-i)*r)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)*r)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function Sn(t){var e=t,i=t;do{e.x<i.x&&(i=e),e=e.next}while(e!==t);return i}function An(t,e,i,n,r,a,o,s){return(r-o)*(e-s)-(t-o)*(a-s)>=0&&(t-o)*(n-s)-(i-o)*(e-s)>=0&&(i-o)*(a-s)-(r-o)*(n-s)>=0}function Rn(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var i=t;do{if(i.i!==t.i&&i.next.i!==t.i&&i.i!==e.i&&i.next.i!==e.i&&Cn(i,i.next,t,e))return!0;i=i.next}while(i!==t);return!1}(t,e)&&On(t,e)&&On(e,t)&&function(t,e){var i=t,n=!1,r=(t.x+e.x)/2,a=(t.y+e.y)/2;do{i.y>a!=i.next.y>a&&i.next.y!==i.y&&r<(i.next.x-i.x)*(a-i.y)/(i.next.y-i.y)+i.x&&(n=!n),i=i.next}while(i!==t);return n}(t,e)}function Ln(t,e,i){return(e.y-t.y)*(i.x-e.x)-(e.x-t.x)*(i.y-e.y)}function Pn(t,e){return t.x===e.x&&t.y===e.y}function Cn(t,e,i,n){return!!(Pn(t,e)&&Pn(i,n)||Pn(t,n)&&Pn(i,e))||Ln(t,e,i)>0!=Ln(t,e,n)>0&&Ln(i,n,t)>0!=Ln(i,n,e)>0}function On(t,e){return Ln(t.prev,t,t.next)<0?Ln(t,e,t.next)>=0&&Ln(t,t.prev,e)>=0:Ln(t,e,t.prev)<0||Ln(t,t.next,e)<0}function In(t,e){var i=new Un(t.i,t.x,t.y),n=new Un(e.i,e.x,e.y),r=t.next,a=e.prev;return t.next=e,e.prev=t,i.next=r,r.prev=i,n.next=i,i.prev=n,a.next=n,n.prev=a,n}function Nn(t,e,i,n){var r=new Un(t,e,i);return n?(r.next=n.next,r.prev=n,n.next.prev=r,n.next=r):(r.prev=r,r.next=r),r}function Dn(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function Un(t,e,i){this.i=t,this.x=e,this.y=i,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}var zn={area:function(t){for(var e=t.length,i=0,n=e-1,r=0;r<e;n=r++)i+=t[n].x*t[r].y-t[r].x*t[n].y;return.5*i},isClockWise:function(t){return zn.area(t)<0},triangulateShape:function(t,e){var i=[],n=[],r=[];Bn(t),Fn(i,t);var a=t.length;e.forEach(Bn);for(var o=0;o<e.length;o++)n.push(a),a+=e[o].length,Fn(i,e[o]);var s=mn(i,n);for(o=0;o<s.length;o+=3)r.push(s.slice(o,o+3));return r}};function Bn(t){var e=t.length;e>2&&t[e-1].equals(t[0])&&t.pop()}function Fn(t,e){for(var i=0;i<e.length;i++)t.push(e[i].x),t.push(e[i].y)}function Gn(t,e){st.call(this),this.type="ExtrudeGeometry",this.parameters={shapes:t,options:e},this.fromBufferGeometry(new Hn(t,e)),this.mergeVertices()}function Hn(t,e){bt.call(this),this.type="ExtrudeBufferGeometry",this.parameters={shapes:t,options:e},t=Array.isArray(t)?t:[t];for(var i=this,n=[],r=[],a=0,o=t.length;a<o;a++){s(t[a])}function s(t){var a=[],o=void 0!==e.curveSegments?e.curveSegments:12,s=void 0!==e.steps?e.steps:1,c=void 0!==e.depth?e.depth:100,h=void 0===e.bevelEnabled||e.bevelEnabled,l=void 0!==e.bevelThickness?e.bevelThickness:6,u=void 0!==e.bevelSize?e.bevelSize:l-2,p=void 0!==e.bevelSegments?e.bevelSegments:3,d=e.extrudePath,f=void 0!==e.UVGenerator?e.UVGenerator:kn;void 0!==e.amount&&(console.warn("THREE.ExtrudeBufferGeometry: amount has been renamed to depth."),c=e.amount);var m,g,y,x,b,w,M,E,T=!1;d&&(m=d.getSpacedPoints(s),T=!0,h=!1,g=d.computeFrenetFrames(s,!1),y=new _,x=new _,b=new _),h||(p=0,l=0,u=0);var S=t.extractPoints(o),A=S.shape,R=S.holes;if(!zn.isClockWise(A))for(A=A.reverse(),M=0,E=R.length;M<E;M++)w=R[M],zn.isClockWise(w)&&(R[M]=w.reverse());var L=zn.triangulateShape(A,R),P=A;for(M=0,E=R.length;M<E;M++)w=R[M],A=A.concat(w);function C(t,e,i){return e||console.error("THREE.ExtrudeGeometry: vec does not exist"),e.clone().multiplyScalar(i).add(t)}var O,I,N,D,U,z,B=A.length,F=L.length;function G(t,e,i){var n,r,a,o=t.x-e.x,s=t.y-e.y,c=i.x-t.x,h=i.y-t.y,l=o*o+s*s,u=o*h-s*c;if(Math.abs(u)>Number.EPSILON){var p=Math.sqrt(l),d=Math.sqrt(c*c+h*h),f=e.x-s/p,m=e.y+o/p,g=((i.x-h/d-f)*h-(i.y+c/d-m)*c)/(o*h-s*c),y=(n=f+o*g-t.x)*n+(r=m+s*g-t.y)*r;if(y<=2)return new v(n,r);a=Math.sqrt(y/2)}else{var x=!1;o>Number.EPSILON?c>Number.EPSILON&&(x=!0):o<-Number.EPSILON?c<-Number.EPSILON&&(x=!0):Math.sign(s)===Math.sign(h)&&(x=!0),x?(n=-s,r=o,a=Math.sqrt(l)):(n=o,r=s,a=Math.sqrt(l/2))}return new v(n/a,r/a)}for(var H=[],k=0,V=P.length,j=V-1,W=k+1;k<V;k++,j++,W++)j===V&&(j=0),W===V&&(W=0),H[k]=G(P[k],P[j],P[W]);var X,q,Y=[],Z=H.concat();for(M=0,E=R.length;M<E;M++){for(w=R[M],X=[],k=0,j=(V=w.length)-1,W=k+1;k<V;k++,j++,W++)j===V&&(j=0),W===V&&(W=0),X[k]=G(w[k],w[j],w[W]);Y.push(X),Z=Z.concat(X)}for(O=0;O<p;O++){for(N=O/p,D=l*Math.cos(N*Math.PI/2),I=u*Math.sin(N*Math.PI/2),k=0,V=P.length;k<V;k++)Q((U=C(P[k],H[k],I)).x,U.y,-D);for(M=0,E=R.length;M<E;M++)for(w=R[M],X=Y[M],k=0,V=w.length;k<V;k++)Q((U=C(w[k],X[k],I)).x,U.y,-D)}for(I=u,k=0;k<B;k++)U=h?C(A[k],Z[k],I):A[k],T?(x.copy(g.normals[0]).multiplyScalar(U.x),y.copy(g.binormals[0]).multiplyScalar(U.y),b.copy(m[0]).add(x).add(y),Q(b.x,b.y,b.z)):Q(U.x,U.y,0);for(q=1;q<=s;q++)for(k=0;k<B;k++)U=h?C(A[k],Z[k],I):A[k],T?(x.copy(g.normals[q]).multiplyScalar(U.x),y.copy(g.binormals[q]).multiplyScalar(U.y),b.copy(m[q]).add(x).add(y),Q(b.x,b.y,b.z)):Q(U.x,U.y,c/s*q);for(O=p-1;O>=0;O--){for(N=O/p,D=l*Math.cos(N*Math.PI/2),I=u*Math.sin(N*Math.PI/2),k=0,V=P.length;k<V;k++)Q((U=C(P[k],H[k],I)).x,U.y,c+D);for(M=0,E=R.length;M<E;M++)for(w=R[M],X=Y[M],k=0,V=w.length;k<V;k++)U=C(w[k],X[k],I),T?Q(U.x,U.y+m[s-1].y,m[s-1].x+D):Q(U.x,U.y,c+D)}function J(t,e){var i,n;for(k=t.length;--k>=0;){i=k,(n=k-1)<0&&(n=t.length-1);var r=0,a=s+2*p;for(r=0;r<a;r++){var o=B*r,c=B*(r+1);$(e+i+o,e+n+o,e+n+c,e+i+c)}}}function Q(t,e,i){a.push(t),a.push(e),a.push(i)}function K(t,e,r){tt(t),tt(e),tt(r);var a=n.length/3,o=f.generateTopUV(i,n,a-3,a-2,a-1);et(o[0]),et(o[1]),et(o[2])}function $(t,e,r,a){tt(t),tt(e),tt(a),tt(e),tt(r),tt(a);var o=n.length/3,s=f.generateSideWallUV(i,n,o-6,o-3,o-2,o-1);et(s[0]),et(s[1]),et(s[3]),et(s[1]),et(s[2]),et(s[3])}function tt(t){n.push(a[3*t+0]),n.push(a[3*t+1]),n.push(a[3*t+2])}function et(t){r.push(t.x),r.push(t.y)}!function(){var t=n.length/3;if(h){var e=0,r=B*e;for(k=0;k<F;k++)K((z=L[k])[2]+r,z[1]+r,z[0]+r);for(r=B*(e=s+2*p),k=0;k<F;k++)K((z=L[k])[0]+r,z[1]+r,z[2]+r)}else{for(k=0;k<F;k++)K((z=L[k])[2],z[1],z[0]);for(k=0;k<F;k++)K((z=L[k])[0]+B*s,z[1]+B*s,z[2]+B*s)}i.addGroup(t,n.length/3-t,0)}(),function(){var t=n.length/3,e=0;for(J(P,e),e+=P.length,M=0,E=R.length;M<E;M++)J(w=R[M],e),e+=w.length;i.addGroup(t,n.length/3-t,1)}()}this.addAttribute("position",new gt(n,3)),this.addAttribute("uv",new gt(r,2)),this.computeVertexNormals()}Gn.prototype=Object.create(st.prototype),Gn.prototype.constructor=Gn,Gn.prototype.toJSON=function(){var t=st.prototype.toJSON.call(this);return Vn(this.parameters.shapes,this.parameters.options,t)},Hn.prototype=Object.create(bt.prototype),Hn.prototype.constructor=Hn,Hn.prototype.toJSON=function(){var t=bt.prototype.toJSON.call(this);return Vn(this.parameters.shapes,this.parameters.options,t)};var kn={generateTopUV:function(t,e,i,n,r){var a=e[3*i],o=e[3*i+1],s=e[3*n],c=e[3*n+1],h=e[3*r],l=e[3*r+1];return[new v(a,o),new v(s,c),new v(h,l)]},generateSideWallUV:function(t,e,i,n,r,a){var o=e[3*i],s=e[3*i+1],c=e[3*i+2],h=e[3*n],l=e[3*n+1],u=e[3*n+2],p=e[3*r],d=e[3*r+1],f=e[3*r+2],m=e[3*a],g=e[3*a+1],y=e[3*a+2];return Math.abs(s-l)<.01?[new v(o,1-c),new v(h,1-u),new v(p,1-f),new v(m,1-y)]:[new v(s,1-c),new v(l,1-u),new v(d,1-f),new v(g,1-y)]}};function Vn(t,e,i){if(i.shapes=[],Array.isArray(t))for(var n=0,r=t.length;n<r;n++){var a=t[n];i.shapes.push(a.uuid)}else i.shapes.push(t.uuid);return void 0!==e.extrudePath&&(i.options.extrudePath=e.extrudePath.toJSON()),i}function jn(t,e){st.call(this),this.type="TextGeometry",this.parameters={text:t,parameters:e},this.fromBufferGeometry(new Wn(t,e)),this.mergeVertices()}function Wn(t,e){var i=(e=e||{}).font;if(!i||!i.isFont)return console.error("THREE.TextGeometry: font parameter is not an instance of THREE.Font."),new st;var n=i.generateShapes(t,e.size,e.curveSegments);e.depth=void 0!==e.height?e.height:50,void 0===e.bevelThickness&&(e.bevelThickness=10),void 0===e.bevelSize&&(e.bevelSize=8),void 0===e.bevelEnabled&&(e.bevelEnabled=!1),Hn.call(this,n,e),this.type="TextBufferGeometry"}function Xn(t,e,i,n,r,a,o){st.call(this),this.type="SphereGeometry",this.parameters={radius:t,widthSegments:e,heightSegments:i,phiStart:n,phiLength:r,thetaStart:a,thetaLength:o},this.fromBufferGeometry(new qn(t,e,i,n,r,a,o)),this.mergeVertices()}function qn(t,e,i,n,r,a,o){bt.call(this),this.type="SphereBufferGeometry",this.parameters={radius:t,widthSegments:e,heightSegments:i,phiStart:n,phiLength:r,thetaStart:a,thetaLength:o},t=t||1,e=Math.max(3,Math.floor(e)||8),i=Math.max(2,Math.floor(i)||6),n=void 0!==n?n:0,r=void 0!==r?r:2*Math.PI;var s,c,h=(a=void 0!==a?a:0)+(o=void 0!==o?o:Math.PI),l=0,u=[],p=new _,d=new _,f=[],m=[],g=[],v=[];for(c=0;c<=i;c++){var y=[],x=c/i;for(s=0;s<=e;s++){var b=s/e;p.x=-t*Math.cos(n+b*r)*Math.sin(a+x*o),p.y=t*Math.cos(a+x*o),p.z=t*Math.sin(n+b*r)*Math.sin(a+x*o),m.push(p.x,p.y,p.z),d.set(p.x,p.y,p.z).normalize(),g.push(d.x,d.y,d.z),v.push(b,1-x),y.push(l++)}u.push(y)}for(c=0;c<i;c++)for(s=0;s<e;s++){var w=u[c][s+1],M=u[c][s],E=u[c+1][s],T=u[c+1][s+1];(0!==c||a>0)&&f.push(w,M,T),(c!==i-1||h<Math.PI)&&f.push(M,E,T)}this.setIndex(f),this.addAttribute("position",new gt(m,3)),this.addAttribute("normal",new gt(g,3)),this.addAttribute("uv",new gt(v,2))}function Yn(t,e,i,n,r,a){st.call(this),this.type="RingGeometry",this.parameters={innerRadius:t,outerRadius:e,thetaSegments:i,phiSegments:n,thetaStart:r,thetaLength:a},this.fromBufferGeometry(new Zn(t,e,i,n,r,a)),this.mergeVertices()}function Zn(t,e,i,n,r,a){bt.call(this),this.type="RingBufferGeometry",this.parameters={innerRadius:t,outerRadius:e,thetaSegments:i,phiSegments:n,thetaStart:r,thetaLength:a},t=t||.5,e=e||1,r=void 0!==r?r:0,a=void 0!==a?a:2*Math.PI,i=void 0!==i?Math.max(3,i):8;var o,s,c,h=[],l=[],u=[],p=[],d=t,f=(e-t)/(n=void 0!==n?Math.max(1,n):1),m=new _,g=new v;for(s=0;s<=n;s++){for(c=0;c<=i;c++)o=r+c/i*a,m.x=d*Math.cos(o),m.y=d*Math.sin(o),l.push(m.x,m.y,m.z),u.push(0,0,1),g.x=(m.x/e+1)/2,g.y=(m.y/e+1)/2,p.push(g.x,g.y);d+=f}for(s=0;s<n;s++){var y=s*(i+1);for(c=0;c<i;c++){var x=o=c+y,b=o+i+1,w=o+i+2,M=o+1;h.push(x,b,M),h.push(b,w,M)}}this.setIndex(h),this.addAttribute("position",new gt(l,3)),this.addAttribute("normal",new gt(u,3)),this.addAttribute("uv",new gt(p,2))}function Jn(t,e,i,n){st.call(this),this.type="LatheGeometry",this.parameters={points:t,segments:e,phiStart:i,phiLength:n},this.fromBufferGeometry(new Qn(t,e,i,n)),this.mergeVertices()}function Qn(t,e,i,n){bt.call(this),this.type="LatheBufferGeometry",this.parameters={points:t,segments:e,phiStart:i,phiLength:n},e=Math.floor(e)||12,i=i||0,n=n||2*Math.PI,n=g.clamp(n,0,2*Math.PI);var r,a,o,s=[],c=[],h=[],l=1/e,u=new _,p=new v;for(a=0;a<=e;a++){var d=i+a*l*n,f=Math.sin(d),m=Math.cos(d);for(o=0;o<=t.length-1;o++)u.x=t[o].x*f,u.y=t[o].y,u.z=t[o].x*m,c.push(u.x,u.y,u.z),p.x=a/e,p.y=o/(t.length-1),h.push(p.x,p.y)}for(a=0;a<e;a++)for(o=0;o<t.length-1;o++){var y=r=o+a*t.length,x=r+t.length,b=r+t.length+1,w=r+1;s.push(y,x,w),s.push(x,b,w)}if(this.setIndex(s),this.addAttribute("position",new gt(c,3)),this.addAttribute("uv",new gt(h,2)),this.computeVertexNormals(),n===2*Math.PI){var M=this.attributes.normal.array,E=new _,T=new _,S=new _;for(r=e*t.length*3,a=0,o=0;a<t.length;a++,o+=3)E.x=M[o+0],E.y=M[o+1],E.z=M[o+2],T.x=M[r+o+0],T.y=M[r+o+1],T.z=M[r+o+2],S.addVectors(E,T).normalize(),M[o+0]=M[r+o+0]=S.x,M[o+1]=M[r+o+1]=S.y,M[o+2]=M[r+o+2]=S.z}}function Kn(t,e){st.call(this),this.type="ShapeGeometry","object"==typeof e&&(console.warn("THREE.ShapeGeometry: Options parameter has been removed."),e=e.curveSegments),this.parameters={shapes:t,curveSegments:e},this.fromBufferGeometry(new $n(t,e)),this.mergeVertices()}function $n(t,e){bt.call(this),this.type="ShapeBufferGeometry",this.parameters={shapes:t,curveSegments:e},e=e||12;var i=[],n=[],r=[],a=[],o=0,s=0;if(!1===Array.isArray(t))h(t);else for(var c=0;c<t.length;c++)h(t[c]),this.addGroup(o,s,c),o+=s,s=0;function h(t){var o,c,h,l=n.length/3,u=t.extractPoints(e),p=u.shape,d=u.holes;if(!1===zn.isClockWise(p))for(p=p.reverse(),o=0,c=d.length;o<c;o++)h=d[o],!0===zn.isClockWise(h)&&(d[o]=h.reverse());var f=zn.triangulateShape(p,d);for(o=0,c=d.length;o<c;o++)h=d[o],p=p.concat(h);for(o=0,c=p.length;o<c;o++){var m=p[o];n.push(m.x,m.y,0),r.push(0,0,1),a.push(m.x,m.y)}for(o=0,c=f.length;o<c;o++){var g=f[o],v=g[0]+l,y=g[1]+l,x=g[2]+l;i.push(v,y,x),s+=3}}this.setIndex(i),this.addAttribute("position",new gt(n,3)),this.addAttribute("normal",new gt(r,3)),this.addAttribute("uv",new gt(a,2))}function tr(t,e){if(e.shapes=[],Array.isArray(t))for(var i=0,n=t.length;i<n;i++){var r=t[i];e.shapes.push(r.uuid)}else e.shapes.push(t.uuid);return e}function er(t,e){bt.call(this),this.type="EdgesGeometry",this.parameters={thresholdAngle:e},e=void 0!==e?e:1;var i,n,r,a,o=[],s=Math.cos(g.DEG2RAD*e),c=[0,0],h={},l=["a","b","c"];t.isBufferGeometry?(a=new st).fromBufferGeometry(t):a=t.clone(),a.mergeVertices(),a.computeFaceNormals();for(var u=a.vertices,p=a.faces,d=0,f=p.length;d<f;d++)for(var m=p[d],v=0;v<3;v++)i=m[l[v]],n=m[l[(v+1)%3]],c[0]=Math.min(i,n),c[1]=Math.max(i,n),void 0===h[r=c[0]+","+c[1]]?h[r]={index1:c[0],index2:c[1],face1:d,face2:void 0}:h[r].face2=d;for(r in h){var y=h[r];if(void 0===y.face2||p[y.face1].normal.dot(p[y.face2].normal)<=s){var x=u[y.index1];o.push(x.x,x.y,x.z),x=u[y.index2],o.push(x.x,x.y,x.z)}}this.addAttribute("position",new gt(o,3))}function ir(t,e,i,n,r,a,o,s){st.call(this),this.type="CylinderGeometry",this.parameters={radiusTop:t,radiusBottom:e,height:i,radialSegments:n,heightSegments:r,openEnded:a,thetaStart:o,thetaLength:s},this.fromBufferGeometry(new nr(t,e,i,n,r,a,o,s)),this.mergeVertices()}function nr(t,e,i,n,r,a,o,s){bt.call(this),this.type="CylinderBufferGeometry",this.parameters={radiusTop:t,radiusBottom:e,height:i,radialSegments:n,heightSegments:r,openEnded:a,thetaStart:o,thetaLength:s};var c=this;t=void 0!==t?t:1,e=void 0!==e?e:1,i=i||1,n=Math.floor(n)||8,r=Math.floor(r)||1,a=void 0!==a&&a,o=void 0!==o?o:0,s=void 0!==s?s:2*Math.PI;var h=[],l=[],u=[],p=[],d=0,f=[],m=i/2,g=0;function y(i){var r,a,f,y=new v,x=new _,b=0,w=!0===i?t:e,M=!0===i?1:-1;for(a=d,r=1;r<=n;r++)l.push(0,m*M,0),u.push(0,M,0),p.push(.5,.5),d++;for(f=d,r=0;r<=n;r++){var E=r/n*s+o,T=Math.cos(E),S=Math.sin(E);x.x=w*S,x.y=m*M,x.z=w*T,l.push(x.x,x.y,x.z),u.push(0,M,0),y.x=.5*T+.5,y.y=.5*S*M+.5,p.push(y.x,y.y),d++}for(r=0;r<n;r++){var A=a+r,R=f+r;!0===i?h.push(R,R+1,A):h.push(R+1,R,A),b+=3}c.addGroup(g,b,!0===i?1:2),g+=b}!function(){var a,v,y=new _,x=new _,b=0,w=(e-t)/i;for(v=0;v<=r;v++){var M=[],E=v/r,T=E*(e-t)+t;for(a=0;a<=n;a++){var S=a/n,A=S*s+o,R=Math.sin(A),L=Math.cos(A);x.x=T*R,x.y=-E*i+m,x.z=T*L,l.push(x.x,x.y,x.z),y.set(R,w,L).normalize(),u.push(y.x,y.y,y.z),p.push(S,1-E),M.push(d++)}f.push(M)}for(a=0;a<n;a++)for(v=0;v<r;v++){var P=f[v][a],C=f[v+1][a],O=f[v+1][a+1],I=f[v][a+1];h.push(P,C,I),h.push(C,O,I),b+=6}c.addGroup(g,b,0),g+=b}(),!1===a&&(t>0&&y(!0),e>0&&y(!1)),this.setIndex(h),this.addAttribute("position",new gt(l,3)),this.addAttribute("normal",new gt(u,3)),this.addAttribute("uv",new gt(p,2))}function rr(t,e,i,n,r,a,o){ir.call(this,0,t,e,i,n,r,a,o),this.type="ConeGeometry",this.parameters={radius:t,height:e,radialSegments:i,heightSegments:n,openEnded:r,thetaStart:a,thetaLength:o}}function ar(t,e,i,n,r,a,o){nr.call(this,0,t,e,i,n,r,a,o),this.type="ConeBufferGeometry",this.parameters={radius:t,height:e,radialSegments:i,heightSegments:n,openEnded:r,thetaStart:a,thetaLength:o}}function or(t,e,i,n){st.call(this),this.type="CircleGeometry",this.parameters={radius:t,segments:e,thetaStart:i,thetaLength:n},this.fromBufferGeometry(new sr(t,e,i,n)),this.mergeVertices()}function sr(t,e,i,n){bt.call(this),this.type="CircleBufferGeometry",this.parameters={radius:t,segments:e,thetaStart:i,thetaLength:n},t=t||1,e=void 0!==e?Math.max(3,e):8,i=void 0!==i?i:0,n=void 0!==n?n:2*Math.PI;var r,a,o=[],s=[],c=[],h=[],l=new _,u=new v;for(s.push(0,0,0),c.push(0,0,1),h.push(.5,.5),a=0,r=3;a<=e;a++,r+=3){var p=i+a/e*n;l.x=t*Math.cos(p),l.y=t*Math.sin(p),s.push(l.x,l.y,l.z),c.push(0,0,1),u.x=(s[r]/t+1)/2,u.y=(s[r+1]/t+1)/2,h.push(u.x,u.y)}for(r=1;r<=e;r++)o.push(r,r+1,0);this.setIndex(o),this.addAttribute("position",new gt(s,3)),this.addAttribute("normal",new gt(c,3)),this.addAttribute("uv",new gt(h,2))}jn.prototype=Object.create(st.prototype),jn.prototype.constructor=jn,Wn.prototype=Object.create(Hn.prototype),Wn.prototype.constructor=Wn,Xn.prototype=Object.create(st.prototype),Xn.prototype.constructor=Xn,qn.prototype=Object.create(bt.prototype),qn.prototype.constructor=qn,Yn.prototype=Object.create(st.prototype),Yn.prototype.constructor=Yn,Zn.prototype=Object.create(bt.prototype),Zn.prototype.constructor=Zn,Jn.prototype=Object.create(st.prototype),Jn.prototype.constructor=Jn,Qn.prototype=Object.create(bt.prototype),Qn.prototype.constructor=Qn,Kn.prototype=Object.create(st.prototype),Kn.prototype.constructor=Kn,Kn.prototype.toJSON=function(){var t=st.prototype.toJSON.call(this);return tr(this.parameters.shapes,t)},$n.prototype=Object.create(bt.prototype),$n.prototype.constructor=$n,$n.prototype.toJSON=function(){var t=bt.prototype.toJSON.call(this);return tr(this.parameters.shapes,t)},er.prototype=Object.create(bt.prototype),er.prototype.constructor=er,ir.prototype=Object.create(st.prototype),ir.prototype.constructor=ir,nr.prototype=Object.create(bt.prototype),nr.prototype.constructor=nr,rr.prototype=Object.create(ir.prototype),rr.prototype.constructor=rr,ar.prototype=Object.create(nr.prototype),ar.prototype.constructor=ar,or.prototype=Object.create(st.prototype),or.prototype.constructor=or,sr.prototype=Object.create(bt.prototype),sr.prototype.constructor=sr;var cr=Object.freeze({WireframeGeometry:Zi,ParametricGeometry:Ji,ParametricBufferGeometry:Qi,TetrahedronGeometry:tn,TetrahedronBufferGeometry:en,OctahedronGeometry:nn,OctahedronBufferGeometry:rn,IcosahedronGeometry:an,IcosahedronBufferGeometry:on,DodecahedronGeometry:sn,DodecahedronBufferGeometry:cn,PolyhedronGeometry:Ki,PolyhedronBufferGeometry:$i,TubeGeometry:hn,TubeBufferGeometry:ln,TorusKnotGeometry:un,TorusKnotBufferGeometry:pn,TorusGeometry:dn,TorusBufferGeometry:fn,TextGeometry:jn,TextBufferGeometry:Wn,SphereGeometry:Xn,SphereBufferGeometry:qn,RingGeometry:Yn,RingBufferGeometry:Zn,PlaneGeometry:Et,PlaneBufferGeometry:Tt,LatheGeometry:Jn,LatheBufferGeometry:Qn,ShapeGeometry:Kn,ShapeBufferGeometry:$n,ExtrudeGeometry:Gn,ExtrudeBufferGeometry:Hn,EdgesGeometry:er,ConeGeometry:rr,ConeBufferGeometry:ar,CylinderGeometry:ir,CylinderBufferGeometry:nr,CircleGeometry:or,CircleBufferGeometry:sr,BoxGeometry:wt,BoxBufferGeometry:Mt});function hr(t){Nt.call(this),this.type="ShadowMaterial",this.color=new H(0),this.transparent=!0,this.setValues(t)}function lr(t){Ut.call(this,t),this.type="RawShaderMaterial"}function ur(t){Nt.call(this),this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new H(16777215),this.roughness=.5,this.metalness=.5,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new H(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalScale=new v(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.roughnessMap=null,this.metalnessMap=null,this.alphaMap=null,this.envMap=null,this.envMapIntensity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(t)}function pr(t){ur.call(this),this.defines={PHYSICAL:""},this.type="MeshPhysicalMaterial",this.reflectivity=.5,this.clearCoat=0,this.clearCoatRoughness=0,this.setValues(t)}function dr(t){Nt.call(this),this.type="MeshPhongMaterial",this.color=new H(16777215),this.specular=new H(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new H(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalScale=new v(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=0,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(t)}function fr(t){dr.call(this),this.defines={TOON:""},this.type="MeshToonMaterial",this.gradientMap=null,this.setValues(t)}function mr(t){Nt.call(this),this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalScale=new v(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(t)}function gr(t){Nt.call(this),this.type="MeshLambertMaterial",this.color=new H(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new H(0),this.emissiveIntensity=1,this.emissiveMap=null,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=0,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(t)}function vr(t){Fi.call(this),this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(t)}hr.prototype=Object.create(Nt.prototype),hr.prototype.constructor=hr,hr.prototype.isShadowMaterial=!0,hr.prototype.copy=function(t){return Nt.prototype.copy.call(this,t),this.color.copy(t.color),this},lr.prototype=Object.create(Ut.prototype),lr.prototype.constructor=lr,lr.prototype.isRawShaderMaterial=!0,ur.prototype=Object.create(Nt.prototype),ur.prototype.constructor=ur,ur.prototype.isMeshStandardMaterial=!0,ur.prototype.copy=function(t){return Nt.prototype.copy.call(this,t),this.defines={STANDARD:""},this.color.copy(t.color),this.roughness=t.roughness,this.metalness=t.metalness,this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.roughnessMap=t.roughnessMap,this.metalnessMap=t.metalnessMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.envMapIntensity=t.envMapIntensity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},pr.prototype=Object.create(ur.prototype),pr.prototype.constructor=pr,pr.prototype.isMeshPhysicalMaterial=!0,pr.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.defines={PHYSICAL:""},this.reflectivity=t.reflectivity,this.clearCoat=t.clearCoat,this.clearCoatRoughness=t.clearCoatRoughness,this},dr.prototype=Object.create(Nt.prototype),dr.prototype.constructor=dr,dr.prototype.isMeshPhongMaterial=!0,dr.prototype.copy=function(t){return Nt.prototype.copy.call(this,t),this.color.copy(t.color),this.specular.copy(t.specular),this.shininess=t.shininess,this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},fr.prototype=Object.create(dr.prototype),fr.prototype.constructor=fr,fr.prototype.isMeshToonMaterial=!0,fr.prototype.copy=function(t){return dr.prototype.copy.call(this,t),this.gradientMap=t.gradientMap,this},mr.prototype=Object.create(Nt.prototype),mr.prototype.constructor=mr,mr.prototype.isMeshNormalMaterial=!0,mr.prototype.copy=function(t){return Nt.prototype.copy.call(this,t),this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},gr.prototype=Object.create(Nt.prototype),gr.prototype.constructor=gr,gr.prototype.isMeshLambertMaterial=!0,gr.prototype.copy=function(t){return Nt.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},vr.prototype=Object.create(Fi.prototype),vr.prototype.constructor=vr,vr.prototype.isLineDashedMaterial=!0,vr.prototype.copy=function(t){return Fi.prototype.copy.call(this,t),this.scale=t.scale,this.dashSize=t.dashSize,this.gapSize=t.gapSize,this};var yr=Object.freeze({ShadowMaterial:hr,SpriteMaterial:Ii,RawShaderMaterial:lr,ShaderMaterial:Ut,PointsMaterial:Vi,MeshPhysicalMaterial:pr,MeshStandardMaterial:ur,MeshPhongMaterial:dr,MeshToonMaterial:fr,MeshNormalMaterial:mr,MeshLambertMaterial:gr,MeshDepthMaterial:vi,MeshDistanceMaterial:yi,MeshBasicMaterial:Dt,LineDashedMaterial:vr,LineBasicMaterial:Fi,Material:Nt}),xr={enabled:!1,files:{},add:function(t,e){!1!==this.enabled&&(this.files[t]=e)},get:function(t){if(!1!==this.enabled)return this.files[t]},remove:function(t){delete this.files[t]},clear:function(){this.files={}}};function _r(t,e,i){var n=this,r=!1,a=0,o=0,s=void 0;this.onStart=void 0,this.onLoad=t,this.onProgress=e,this.onError=i,this.itemStart=function(t){o++,!1===r&&void 0!==n.onStart&&n.onStart(t,a,o),r=!0},this.itemEnd=function(t){a++,void 0!==n.onProgress&&n.onProgress(t,a,o),a===o&&(r=!1,void 0!==n.onLoad&&n.onLoad())},this.itemError=function(t){void 0!==n.onError&&n.onError(t)},this.resolveURL=function(t){return s?s(t):t},this.setURLModifier=function(t){return s=t,this}}var br=new _r,wr={};function Mr(t){this.manager=void 0!==t?t:br}function Er(t){this.manager=void 0!==t?t:br,this._parser=null}function Tr(t){this.manager=void 0!==t?t:br}function Sr(t){this.manager=void 0!==t?t:br}function Ar(t){this.manager=void 0!==t?t:br}function Rr(){this.type="Curve",this.arcLengthDivisions=200}function Lr(t,e,i,n,r,a,o,s){Rr.call(this),this.type="EllipseCurve",this.aX=t||0,this.aY=e||0,this.xRadius=i||1,this.yRadius=n||1,this.aStartAngle=r||0,this.aEndAngle=a||2*Math.PI,this.aClockwise=o||!1,this.aRotation=s||0}function Pr(t,e,i,n,r,a){Lr.call(this,t,e,i,i,n,r,a),this.type="ArcCurve"}function Cr(){var t=0,e=0,i=0,n=0;function r(r,a,o,s){t=r,e=o,i=-3*r+3*a-2*o-s,n=2*r-2*a+o+s}return{initCatmullRom:function(t,e,i,n,a){r(e,i,a*(i-t),a*(n-e))},initNonuniformCatmullRom:function(t,e,i,n,a,o,s){var c=(e-t)/a-(i-t)/(a+o)+(i-e)/o,h=(i-e)/o-(n-e)/(o+s)+(n-i)/s;r(e,i,c*=o,h*=o)},calc:function(r){var a=r*r;return t+e*r+i*a+n*(a*r)}}}Object.assign(Mr.prototype,{load:function(t,e,i,n){void 0===t&&(t=""),void 0!==this.path&&(t=this.path+t),t=this.manager.resolveURL(t);var r=this,a=xr.get(t);if(void 0!==a)return r.manager.itemStart(t),setTimeout((function(){e&&e(a),r.manager.itemEnd(t)}),0),a;if(void 0===wr[t]){var o=t.match(/^data:(.*?)(;base64)?,(.*)$/);if(o){var s=o[1],c=!!o[2],h=o[3];h=window.decodeURIComponent(h),c&&(h=window.atob(h));try{var l,u=(this.responseType||"").toLowerCase();switch(u){case"arraybuffer":case"blob":for(var p=new Uint8Array(h.length),d=0;d<h.length;d++)p[d]=h.charCodeAt(d);l="blob"===u?new Blob([p.buffer],{type:s}):p.buffer;break;case"document":var f=new DOMParser;l=f.parseFromString(h,s);break;case"json":l=JSON.parse(h);break;default:l=h}window.setTimeout((function(){e&&e(l),r.manager.itemEnd(t)}),0)}catch(e){window.setTimeout((function(){n&&n(e),r.manager.itemEnd(t),r.manager.itemError(t)}),0)}}else{wr[t]=[],wr[t].push({onLoad:e,onProgress:i,onError:n});var m=new XMLHttpRequest;for(var g in m.open("GET",t,!0),m.addEventListener("load",(function(e){var i=this.response;xr.add(t,i);var n=wr[t];if(delete wr[t],200===this.status||0===this.status){0===this.status&&console.warn("THREE.FileLoader: HTTP Status 0 received.");for(var a=0,o=n.length;a<o;a++){(s=n[a]).onLoad&&s.onLoad(i)}r.manager.itemEnd(t)}else{for(a=0,o=n.length;a<o;a++){var s;(s=n[a]).onError&&s.onError(e)}r.manager.itemEnd(t),r.manager.itemError(t)}}),!1),m.addEventListener("progress",(function(e){for(var i=wr[t],n=0,r=i.length;n<r;n++){var a=i[n];a.onProgress&&a.onProgress(e)}}),!1),m.addEventListener("error",(function(e){var i=wr[t];delete wr[t];for(var n=0,a=i.length;n<a;n++){var o=i[n];o.onError&&o.onError(e)}r.manager.itemEnd(t),r.manager.itemError(t)}),!1),void 0!==this.responseType&&(m.responseType=this.responseType),void 0!==this.withCredentials&&(m.withCredentials=this.withCredentials),m.overrideMimeType&&m.overrideMimeType(void 0!==this.mimeType?this.mimeType:"text/plain"),this.requestHeader)m.setRequestHeader(g,this.requestHeader[g]);m.send(null)}return r.manager.itemStart(t),m}wr[t].push({onLoad:e,onProgress:i,onError:n})},setPath:function(t){return this.path=t,this},setResponseType:function(t){return this.responseType=t,this},setWithCredentials:function(t){return this.withCredentials=t,this},setMimeType:function(t){return this.mimeType=t,this},setRequestHeader:function(t){return this.requestHeader=t,this}}),Object.assign(function(t){this.manager=void 0!==t?t:br,this._parser=null}.prototype,{load:function(t,e,i,n){var r=this,a=[],o=new qi;o.image=a;var s=new Mr(this.manager);function c(c){s.load(t[c],(function(t){var i=r._parser(t,!0);a[c]={width:i.width,height:i.height,format:i.format,mipmaps:i.mipmaps},6===(h+=1)&&(1===i.mipmapCount&&(o.minFilter=1006),o.format=i.format,o.needsUpdate=!0,e&&e(o))}),i,n)}if(s.setPath(this.path),s.setResponseType("arraybuffer"),Array.isArray(t))for(var h=0,l=0,u=t.length;l<u;++l)c(l);else s.load(t,(function(t){var i=r._parser(t,!0);if(i.isCubemap)for(var n=i.mipmaps.length/i.mipmapCount,s=0;s<n;s++){a[s]={mipmaps:[]};for(var c=0;c<i.mipmapCount;c++)a[s].mipmaps.push(i.mipmaps[s*i.mipmapCount+c]),a[s].format=i.format,a[s].width=i.width,a[s].height=i.height}else o.image.width=i.width,o.image.height=i.height,o.mipmaps=i.mipmaps;1===i.mipmapCount&&(o.minFilter=1006),o.format=i.format,o.needsUpdate=!0,e&&e(o)}),i,n);return o},setPath:function(t){return this.path=t,this}}),Object.assign(Er.prototype,{load:function(t,e,i,n){var r=this,a=new O,o=new Mr(this.manager);return o.setResponseType("arraybuffer"),o.load(t,(function(t){var i=r._parser(t);i&&(void 0!==i.image?a.image=i.image:void 0!==i.data&&(a.image.width=i.width,a.image.height=i.height,a.image.data=i.data),a.wrapS=void 0!==i.wrapS?i.wrapS:1001,a.wrapT=void 0!==i.wrapT?i.wrapT:1001,a.magFilter=void 0!==i.magFilter?i.magFilter:1006,a.minFilter=void 0!==i.minFilter?i.minFilter:1008,a.anisotropy=void 0!==i.anisotropy?i.anisotropy:1,void 0!==i.format&&(a.format=i.format),void 0!==i.type&&(a.type=i.type),void 0!==i.mipmaps&&(a.mipmaps=i.mipmaps),1===i.mipmapCount&&(a.minFilter=1006),a.needsUpdate=!0,e&&e(a,i))}),i,n),a}}),Object.assign(Tr.prototype,{crossOrigin:"Anonymous",load:function(t,e,i,n){void 0===t&&(t=""),void 0!==this.path&&(t=this.path+t),t=this.manager.resolveURL(t);var r=this,a=xr.get(t);if(void 0!==a)return r.manager.itemStart(t),setTimeout((function(){e&&e(a),r.manager.itemEnd(t)}),0),a;var o=document.createElementNS("http://www.w3.org/1999/xhtml","img");function s(){o.removeEventListener("load",s,!1),o.removeEventListener("error",c,!1),xr.add(t,this),e&&e(this),r.manager.itemEnd(t)}function c(e){o.removeEventListener("load",s,!1),o.removeEventListener("error",c,!1),n&&n(e),r.manager.itemEnd(t),r.manager.itemError(t)}return o.addEventListener("load",s,!1),o.addEventListener("error",c,!1),"data:"!==t.substr(0,5)&&void 0!==this.crossOrigin&&(o.crossOrigin=this.crossOrigin),r.manager.itemStart(t),o.src=t,o},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this}}),Object.assign(Sr.prototype,{crossOrigin:"Anonymous",load:function(t,e,i,n){var r=new Kt,a=new Tr(this.manager);a.setCrossOrigin(this.crossOrigin),a.setPath(this.path);var o=0;function s(i){a.load(t[i],(function(t){r.images[i]=t,6===++o&&(r.needsUpdate=!0,e&&e(r))}),void 0,n)}for(var c=0;c<t.length;++c)s(c);return r},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this}}),Object.assign(Ar.prototype,{crossOrigin:"Anonymous",load:function(t,e,i,n){var r=new R,a=new Tr(this.manager);return a.setCrossOrigin(this.crossOrigin),a.setPath(this.path),a.load(t,(function(i){r.image=i;var n=t.search(/\.(jpg|jpeg)$/)>0||0===t.search(/^data\:image\/jpeg/);r.format=n?1022:1023,r.needsUpdate=!0,void 0!==e&&e(r)}),i,n),r},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this}}),Object.assign(Rr.prototype,{getPoint:function(){return console.warn("THREE.Curve: .getPoint() not implemented."),null},getPointAt:function(t,e){var i=this.getUtoTmapping(t);return this.getPoint(i,e)},getPoints:function(t){void 0===t&&(t=5);for(var e=[],i=0;i<=t;i++)e.push(this.getPoint(i/t));return e},getSpacedPoints:function(t){void 0===t&&(t=5);for(var e=[],i=0;i<=t;i++)e.push(this.getPointAt(i/t));return e},getLength:function(){var t=this.getLengths();return t[t.length-1]},getLengths:function(t){if(void 0===t&&(t=this.arcLengthDivisions),this.cacheArcLengths&&this.cacheArcLengths.length===t+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var e,i,n=[],r=this.getPoint(0),a=0;for(n.push(0),i=1;i<=t;i++)a+=(e=this.getPoint(i/t)).distanceTo(r),n.push(a),r=e;return this.cacheArcLengths=n,n},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()},getUtoTmapping:function(t,e){var i,n=this.getLengths(),r=0,a=n.length;i=e||t*n[a-1];for(var o,s=0,c=a-1;s<=c;)if((o=n[r=Math.floor(s+(c-s)/2)]-i)<0)s=r+1;else{if(!(o>0)){c=r;break}c=r-1}if(n[r=c]===i)return r/(a-1);var h=n[r];return(r+(i-h)/(n[r+1]-h))/(a-1)},getTangent:function(t){var e=t-1e-4,i=t+1e-4;e<0&&(e=0),i>1&&(i=1);var n=this.getPoint(e);return this.getPoint(i).clone().sub(n).normalize()},getTangentAt:function(t){var e=this.getUtoTmapping(t);return this.getTangent(e)},computeFrenetFrames:function(t,e){var i,n,r,a=new _,o=[],s=[],c=[],h=new _,l=new y;for(i=0;i<=t;i++)n=i/t,o[i]=this.getTangentAt(n),o[i].normalize();s[0]=new _,c[0]=new _;var u=Number.MAX_VALUE,p=Math.abs(o[0].x),d=Math.abs(o[0].y),f=Math.abs(o[0].z);for(p<=u&&(u=p,a.set(1,0,0)),d<=u&&(u=d,a.set(0,1,0)),f<=u&&a.set(0,0,1),h.crossVectors(o[0],a).normalize(),s[0].crossVectors(o[0],h),c[0].crossVectors(o[0],s[0]),i=1;i<=t;i++)s[i]=s[i-1].clone(),c[i]=c[i-1].clone(),h.crossVectors(o[i-1],o[i]),h.length()>Number.EPSILON&&(h.normalize(),r=Math.acos(g.clamp(o[i-1].dot(o[i]),-1,1)),s[i].applyMatrix4(l.makeRotationAxis(h,r))),c[i].crossVectors(o[i],s[i]);if(!0===e)for(r=Math.acos(g.clamp(s[0].dot(s[t]),-1,1)),r/=t,o[0].dot(h.crossVectors(s[0],s[t]))>0&&(r=-r),i=1;i<=t;i++)s[i].applyMatrix4(l.makeRotationAxis(o[i],r*i)),c[i].crossVectors(o[i],s[i]);return{tangents:o,normals:s,binormals:c}},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.arcLengthDivisions=t.arcLengthDivisions,this},toJSON:function(){var t={metadata:{version:4.5,type:"Curve",generator:"Curve.toJSON"}};return t.arcLengthDivisions=this.arcLengthDivisions,t.type=this.type,t},fromJSON:function(t){return this.arcLengthDivisions=t.arcLengthDivisions,this}}),Lr.prototype=Object.create(Rr.prototype),Lr.prototype.constructor=Lr,Lr.prototype.isEllipseCurve=!0,Lr.prototype.getPoint=function(t,e){for(var i=e||new v,n=2*Math.PI,r=this.aEndAngle-this.aStartAngle,a=Math.abs(r)<Number.EPSILON;r<0;)r+=n;for(;r>n;)r-=n;r<Number.EPSILON&&(r=a?0:n),!0!==this.aClockwise||a||(r===n?r=-n:r-=n);var o=this.aStartAngle+t*r,s=this.aX+this.xRadius*Math.cos(o),c=this.aY+this.yRadius*Math.sin(o);if(0!==this.aRotation){var h=Math.cos(this.aRotation),l=Math.sin(this.aRotation),u=s-this.aX,p=c-this.aY;s=u*h-p*l+this.aX,c=u*l+p*h+this.aY}return i.set(s,c)},Lr.prototype.copy=function(t){return Rr.prototype.copy.call(this,t),this.aX=t.aX,this.aY=t.aY,this.xRadius=t.xRadius,this.yRadius=t.yRadius,this.aStartAngle=t.aStartAngle,this.aEndAngle=t.aEndAngle,this.aClockwise=t.aClockwise,this.aRotation=t.aRotation,this},Lr.prototype.toJSON=function(){var t=Rr.prototype.toJSON.call(this);return t.aX=this.aX,t.aY=this.aY,t.xRadius=this.xRadius,t.yRadius=this.yRadius,t.aStartAngle=this.aStartAngle,t.aEndAngle=this.aEndAngle,t.aClockwise=this.aClockwise,t.aRotation=this.aRotation,t},Lr.prototype.fromJSON=function(t){return Rr.prototype.fromJSON.call(this,t),this.aX=t.aX,this.aY=t.aY,this.xRadius=t.xRadius,this.yRadius=t.yRadius,this.aStartAngle=t.aStartAngle,this.aEndAngle=t.aEndAngle,this.aClockwise=t.aClockwise,this.aRotation=t.aRotation,this},Pr.prototype=Object.create(Lr.prototype),Pr.prototype.constructor=Pr,Pr.prototype.isArcCurve=!0;var Or=new _,Ir=new Cr,Nr=new Cr,Dr=new Cr;function Ur(t,e,i,n){Rr.call(this),this.type="CatmullRomCurve3",this.points=t||[],this.closed=e||!1,this.curveType=i||"centripetal",this.tension=n||.5}function zr(t,e,i,n,r){var a=.5*(n-e),o=.5*(r-i),s=t*t;return(2*i-2*n+a+o)*(t*s)+(-3*i+3*n-2*a-o)*s+a*t+i}function Br(t,e,i,n){return function(t,e){var i=1-t;return i*i*e}(t,e)+function(t,e){return 2*(1-t)*t*e}(t,i)+function(t,e){return t*t*e}(t,n)}function Fr(t,e,i,n,r){return function(t,e){var i=1-t;return i*i*i*e}(t,e)+function(t,e){var i=1-t;return 3*i*i*t*e}(t,i)+function(t,e){return 3*(1-t)*t*t*e}(t,n)+function(t,e){return t*t*t*e}(t,r)}function Gr(t,e,i,n){Rr.call(this),this.type="CubicBezierCurve",this.v0=t||new v,this.v1=e||new v,this.v2=i||new v,this.v3=n||new v}function Hr(t,e,i,n){Rr.call(this),this.type="CubicBezierCurve3",this.v0=t||new _,this.v1=e||new _,this.v2=i||new _,this.v3=n||new _}function kr(t,e){Rr.call(this),this.type="LineCurve",this.v1=t||new v,this.v2=e||new v}function Vr(t,e){Rr.call(this),this.type="LineCurve3",this.v1=t||new _,this.v2=e||new _}function jr(t,e,i){Rr.call(this),this.type="QuadraticBezierCurve",this.v0=t||new v,this.v1=e||new v,this.v2=i||new v}function Wr(t,e,i){Rr.call(this),this.type="QuadraticBezierCurve3",this.v0=t||new _,this.v1=e||new _,this.v2=i||new _}function Xr(t){Rr.call(this),this.type="SplineCurve",this.points=t||[]}Ur.prototype=Object.create(Rr.prototype),Ur.prototype.constructor=Ur,Ur.prototype.isCatmullRomCurve3=!0,Ur.prototype.getPoint=function(t,e){var i,n,r,a,o=e||new _,s=this.points,c=s.length,h=(c-(this.closed?0:1))*t,l=Math.floor(h),u=h-l;if(this.closed?l+=l>0?0:(Math.floor(Math.abs(l)/c)+1)*c:0===u&&l===c-1&&(l=c-2,u=1),this.closed||l>0?i=s[(l-1)%c]:(Or.subVectors(s[0],s[1]).add(s[0]),i=Or),n=s[l%c],r=s[(l+1)%c],this.closed||l+2<c?a=s[(l+2)%c]:(Or.subVectors(s[c-1],s[c-2]).add(s[c-1]),a=Or),"centripetal"===this.curveType||"chordal"===this.curveType){var p="chordal"===this.curveType?.5:.25,d=Math.pow(i.distanceToSquared(n),p),f=Math.pow(n.distanceToSquared(r),p),m=Math.pow(r.distanceToSquared(a),p);f<1e-4&&(f=1),d<1e-4&&(d=f),m<1e-4&&(m=f),Ir.initNonuniformCatmullRom(i.x,n.x,r.x,a.x,d,f,m),Nr.initNonuniformCatmullRom(i.y,n.y,r.y,a.y,d,f,m),Dr.initNonuniformCatmullRom(i.z,n.z,r.z,a.z,d,f,m)}else"catmullrom"===this.curveType&&(Ir.initCatmullRom(i.x,n.x,r.x,a.x,this.tension),Nr.initCatmullRom(i.y,n.y,r.y,a.y,this.tension),Dr.initCatmullRom(i.z,n.z,r.z,a.z,this.tension));return o.set(Ir.calc(u),Nr.calc(u),Dr.calc(u)),o},Ur.prototype.copy=function(t){Rr.prototype.copy.call(this,t),this.points=[];for(var e=0,i=t.points.length;e<i;e++){var n=t.points[e];this.points.push(n.clone())}return this.closed=t.closed,this.curveType=t.curveType,this.tension=t.tension,this},Ur.prototype.toJSON=function(){var t=Rr.prototype.toJSON.call(this);t.points=[];for(var e=0,i=this.points.length;e<i;e++){var n=this.points[e];t.points.push(n.toArray())}return t.closed=this.closed,t.curveType=this.curveType,t.tension=this.tension,t},Ur.prototype.fromJSON=function(t){Rr.prototype.fromJSON.call(this,t),this.points=[];for(var e=0,i=t.points.length;e<i;e++){var n=t.points[e];this.points.push((new _).fromArray(n))}return this.closed=t.closed,this.curveType=t.curveType,this.tension=t.tension,this},Gr.prototype=Object.create(Rr.prototype),Gr.prototype.constructor=Gr,Gr.prototype.isCubicBezierCurve=!0,Gr.prototype.getPoint=function(t,e){var i=e||new v,n=this.v0,r=this.v1,a=this.v2,o=this.v3;return i.set(Fr(t,n.x,r.x,a.x,o.x),Fr(t,n.y,r.y,a.y,o.y)),i},Gr.prototype.copy=function(t){return Rr.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this.v3.copy(t.v3),this},Gr.prototype.toJSON=function(){var t=Rr.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t.v3=this.v3.toArray(),t},Gr.prototype.fromJSON=function(t){return Rr.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this.v3.fromArray(t.v3),this},Hr.prototype=Object.create(Rr.prototype),Hr.prototype.constructor=Hr,Hr.prototype.isCubicBezierCurve3=!0,Hr.prototype.getPoint=function(t,e){var i=e||new _,n=this.v0,r=this.v1,a=this.v2,o=this.v3;return i.set(Fr(t,n.x,r.x,a.x,o.x),Fr(t,n.y,r.y,a.y,o.y),Fr(t,n.z,r.z,a.z,o.z)),i},Hr.prototype.copy=function(t){return Rr.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this.v3.copy(t.v3),this},Hr.prototype.toJSON=function(){var t=Rr.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t.v3=this.v3.toArray(),t},Hr.prototype.fromJSON=function(t){return Rr.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this.v3.fromArray(t.v3),this},kr.prototype=Object.create(Rr.prototype),kr.prototype.constructor=kr,kr.prototype.isLineCurve=!0,kr.prototype.getPoint=function(t,e){var i=e||new v;return 1===t?i.copy(this.v2):(i.copy(this.v2).sub(this.v1),i.multiplyScalar(t).add(this.v1)),i},kr.prototype.getPointAt=function(t,e){return this.getPoint(t,e)},kr.prototype.getTangent=function(){return this.v2.clone().sub(this.v1).normalize()},kr.prototype.copy=function(t){return Rr.prototype.copy.call(this,t),this.v1.copy(t.v1),this.v2.copy(t.v2),this},kr.prototype.toJSON=function(){var t=Rr.prototype.toJSON.call(this);return t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},kr.prototype.fromJSON=function(t){return Rr.prototype.fromJSON.call(this,t),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},Vr.prototype=Object.create(Rr.prototype),Vr.prototype.constructor=Vr,Vr.prototype.isLineCurve3=!0,Vr.prototype.getPoint=function(t,e){var i=e||new _;return 1===t?i.copy(this.v2):(i.copy(this.v2).sub(this.v1),i.multiplyScalar(t).add(this.v1)),i},Vr.prototype.getPointAt=function(t,e){return this.getPoint(t,e)},Vr.prototype.copy=function(t){return Rr.prototype.copy.call(this,t),this.v1.copy(t.v1),this.v2.copy(t.v2),this},Vr.prototype.toJSON=function(){var t=Rr.prototype.toJSON.call(this);return t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},Vr.prototype.fromJSON=function(t){return Rr.prototype.fromJSON.call(this,t),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},jr.prototype=Object.create(Rr.prototype),jr.prototype.constructor=jr,jr.prototype.isQuadraticBezierCurve=!0,jr.prototype.getPoint=function(t,e){var i=e||new v,n=this.v0,r=this.v1,a=this.v2;return i.set(Br(t,n.x,r.x,a.x),Br(t,n.y,r.y,a.y)),i},jr.prototype.copy=function(t){return Rr.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this},jr.prototype.toJSON=function(){var t=Rr.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},jr.prototype.fromJSON=function(t){return Rr.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},Wr.prototype=Object.create(Rr.prototype),Wr.prototype.constructor=Wr,Wr.prototype.isQuadraticBezierCurve3=!0,Wr.prototype.getPoint=function(t,e){var i=e||new _,n=this.v0,r=this.v1,a=this.v2;return i.set(Br(t,n.x,r.x,a.x),Br(t,n.y,r.y,a.y),Br(t,n.z,r.z,a.z)),i},Wr.prototype.copy=function(t){return Rr.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this},Wr.prototype.toJSON=function(){var t=Rr.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},Wr.prototype.fromJSON=function(t){return Rr.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},Xr.prototype=Object.create(Rr.prototype),Xr.prototype.constructor=Xr,Xr.prototype.isSplineCurve=!0,Xr.prototype.getPoint=function(t,e){var i=e||new v,n=this.points,r=(n.length-1)*t,a=Math.floor(r),o=r-a,s=n[0===a?a:a-1],c=n[a],h=n[a>n.length-2?n.length-1:a+1],l=n[a>n.length-3?n.length-1:a+2];return i.set(zr(o,s.x,c.x,h.x,l.x),zr(o,s.y,c.y,h.y,l.y)),i},Xr.prototype.copy=function(t){Rr.prototype.copy.call(this,t),this.points=[];for(var e=0,i=t.points.length;e<i;e++){var n=t.points[e];this.points.push(n.clone())}return this},Xr.prototype.toJSON=function(){var t=Rr.prototype.toJSON.call(this);t.points=[];for(var e=0,i=this.points.length;e<i;e++){var n=this.points[e];t.points.push(n.toArray())}return t},Xr.prototype.fromJSON=function(t){Rr.prototype.fromJSON.call(this,t),this.points=[];for(var e=0,i=t.points.length;e<i;e++){var n=t.points[e];this.points.push((new v).fromArray(n))}return this};var qr=Object.freeze({ArcCurve:Pr,CatmullRomCurve3:Ur,CubicBezierCurve:Gr,CubicBezierCurve3:Hr,EllipseCurve:Lr,LineCurve:kr,LineCurve3:Vr,QuadraticBezierCurve:jr,QuadraticBezierCurve3:Wr,SplineCurve:Xr});function Yr(){Rr.call(this),this.type="CurvePath",this.curves=[],this.autoClose=!1}function Zr(t){Yr.call(this),this.type="Path",this.currentPoint=new v,t&&this.setFromPoints(t)}function Jr(t){Zr.call(this,t),this.uuid=g.generateUUID(),this.type="Shape",this.holes=[]}function Qr(t,e){tt.call(this),this.type="Light",this.color=new H(t),this.intensity=void 0!==e?e:1,this.receiveShadow=void 0}function Kr(t,e,i){Qr.call(this,t,i),this.type="HemisphereLight",this.castShadow=void 0,this.position.copy(tt.DefaultUp),this.updateMatrix(),this.groundColor=new H(e)}function $r(t){this.camera=t,this.bias=0,this.radius=1,this.mapSize=new v(512,512),this.map=null,this.matrix=new y}function ta(){$r.call(this,new Ti(50,1,.5,500))}function ea(t,e,i,n,r,a){Qr.call(this,t,e),this.type="SpotLight",this.position.copy(tt.DefaultUp),this.updateMatrix(),this.target=new tt,Object.defineProperty(this,"power",{get:function(){return this.intensity*Math.PI},set:function(t){this.intensity=t/Math.PI}}),this.distance=void 0!==i?i:0,this.angle=void 0!==n?n:Math.PI/3,this.penumbra=void 0!==r?r:0,this.decay=void 0!==a?a:1,this.shadow=new ta}function ia(t,e,i,n){Qr.call(this,t,e),this.type="PointLight",Object.defineProperty(this,"power",{get:function(){return 4*this.intensity*Math.PI},set:function(t){this.intensity=t/(4*Math.PI)}}),this.distance=void 0!==i?i:0,this.decay=void 0!==n?n:1,this.shadow=new $r(new Ti(90,1,.5,500))}function na(){$r.call(this,new it(-5,5,5,-5,.5,500))}function ra(t,e){Qr.call(this,t,e),this.type="DirectionalLight",this.position.copy(tt.DefaultUp),this.updateMatrix(),this.target=new tt,this.shadow=new na}function aa(t,e){Qr.call(this,t,e),this.type="AmbientLight",this.castShadow=void 0}function oa(t,e,i,n){Qr.call(this,t,e),this.type="RectAreaLight",this.width=void 0!==i?i:10,this.height=void 0!==n?n:10}function sa(t,e,i,n){ya.call(this,t,e,i,n)}function ca(t,e,i){ya.call(this,t,e,i)}function ha(t,e,i,n){this.parameterPositions=t,this._cachedIndex=0,this.resultBuffer=void 0!==n?n:new e.constructor(i),this.sampleValues=e,this.valueSize=i}function la(t,e,i,n){ha.call(this,t,e,i,n)}function ua(t,e,i,n){ya.call(this,t,e,i,n)}function pa(t,e,i,n){ya.call(this,t,e,i,n)}function da(t,e,i,n){ya.call(this,t,e,i,n)}function fa(t,e,i,n){ha.call(this,t,e,i,n),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0}function ma(t,e,i,n){ha.call(this,t,e,i,n)}function ga(t,e,i,n){ha.call(this,t,e,i,n)}Yr.prototype=Object.assign(Object.create(Rr.prototype),{constructor:Yr,add:function(t){this.curves.push(t)},closePath:function(){var t=this.curves[0].getPoint(0),e=this.curves[this.curves.length-1].getPoint(1);t.equals(e)||this.curves.push(new kr(e,t))},getPoint:function(t){for(var e=t*this.getLength(),i=this.getCurveLengths(),n=0;n<i.length;){if(i[n]>=e){var r=i[n]-e,a=this.curves[n],o=a.getLength(),s=0===o?0:1-r/o;return a.getPointAt(s)}n++}return null},getLength:function(){var t=this.getCurveLengths();return t[t.length-1]},updateArcLengths:function(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()},getCurveLengths:function(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;for(var t=[],e=0,i=0,n=this.curves.length;i<n;i++)e+=this.curves[i].getLength(),t.push(e);return this.cacheLengths=t,t},getSpacedPoints:function(t){void 0===t&&(t=40);for(var e=[],i=0;i<=t;i++)e.push(this.getPoint(i/t));return this.autoClose&&e.push(e[0]),e},getPoints:function(t){t=t||12;for(var e,i=[],n=0,r=this.curves;n<r.length;n++)for(var a=r[n],o=a&&a.isEllipseCurve?2*t:a&&a.isLineCurve?1:a&&a.isSplineCurve?t*a.points.length:t,s=a.getPoints(o),c=0;c<s.length;c++){var h=s[c];e&&e.equals(h)||(i.push(h),e=h)}return this.autoClose&&i.length>1&&!i[i.length-1].equals(i[0])&&i.push(i[0]),i},copy:function(t){Rr.prototype.copy.call(this,t),this.curves=[];for(var e=0,i=t.curves.length;e<i;e++){var n=t.curves[e];this.curves.push(n.clone())}return this.autoClose=t.autoClose,this},toJSON:function(){var t=Rr.prototype.toJSON.call(this);t.autoClose=this.autoClose,t.curves=[];for(var e=0,i=this.curves.length;e<i;e++){var n=this.curves[e];t.curves.push(n.toJSON())}return t},fromJSON:function(t){Rr.prototype.fromJSON.call(this,t),this.autoClose=t.autoClose,this.curves=[];for(var e=0,i=t.curves.length;e<i;e++){var n=t.curves[e];this.curves.push((new qr[n.type]).fromJSON(n))}return this}}),Zr.prototype=Object.assign(Object.create(Yr.prototype),{constructor:Zr,setFromPoints:function(t){this.moveTo(t[0].x,t[0].y);for(var e=1,i=t.length;e<i;e++)this.lineTo(t[e].x,t[e].y)},moveTo:function(t,e){this.currentPoint.set(t,e)},lineTo:function(t,e){var i=new kr(this.currentPoint.clone(),new v(t,e));this.curves.push(i),this.currentPoint.set(t,e)},quadraticCurveTo:function(t,e,i,n){var r=new jr(this.currentPoint.clone(),new v(t,e),new v(i,n));this.curves.push(r),this.currentPoint.set(i,n)},bezierCurveTo:function(t,e,i,n,r,a){var o=new Gr(this.currentPoint.clone(),new v(t,e),new v(i,n),new v(r,a));this.curves.push(o),this.currentPoint.set(r,a)},splineThru:function(t){var e=new Xr([this.currentPoint.clone()].concat(t));this.curves.push(e),this.currentPoint.copy(t[t.length-1])},arc:function(t,e,i,n,r,a){var o=this.currentPoint.x,s=this.currentPoint.y;this.absarc(t+o,e+s,i,n,r,a)},absarc:function(t,e,i,n,r,a){this.absellipse(t,e,i,i,n,r,a)},ellipse:function(t,e,i,n,r,a,o,s){var c=this.currentPoint.x,h=this.currentPoint.y;this.absellipse(t+c,e+h,i,n,r,a,o,s)},absellipse:function(t,e,i,n,r,a,o,s){var c=new Lr(t,e,i,n,r,a,o,s);if(this.curves.length>0){var h=c.getPoint(0);h.equals(this.currentPoint)||this.lineTo(h.x,h.y)}this.curves.push(c);var l=c.getPoint(1);this.currentPoint.copy(l)},copy:function(t){return Yr.prototype.copy.call(this,t),this.currentPoint.copy(t.currentPoint),this},toJSON:function(){var t=Yr.prototype.toJSON.call(this);return t.currentPoint=this.currentPoint.toArray(),t},fromJSON:function(t){return Yr.prototype.fromJSON.call(this,t),this.currentPoint.fromArray(t.currentPoint),this}}),Jr.prototype=Object.assign(Object.create(Zr.prototype),{constructor:Jr,getPointsHoles:function(t){for(var e=[],i=0,n=this.holes.length;i<n;i++)e[i]=this.holes[i].getPoints(t);return e},extractPoints:function(t){return{shape:this.getPoints(t),holes:this.getPointsHoles(t)}},copy:function(t){Zr.prototype.copy.call(this,t),this.holes=[];for(var e=0,i=t.holes.length;e<i;e++){var n=t.holes[e];this.holes.push(n.clone())}return this},toJSON:function(){var t=Zr.prototype.toJSON.call(this);t.uuid=this.uuid,t.holes=[];for(var e=0,i=this.holes.length;e<i;e++){var n=this.holes[e];t.holes.push(n.toJSON())}return t},fromJSON:function(t){Zr.prototype.fromJSON.call(this,t),this.uuid=t.uuid,this.holes=[];for(var e=0,i=t.holes.length;e<i;e++){var n=t.holes[e];this.holes.push((new Zr).fromJSON(n))}return this}}),Qr.prototype=Object.assign(Object.create(tt.prototype),{constructor:Qr,isLight:!0,copy:function(t){return tt.prototype.copy.call(this,t),this.color.copy(t.color),this.intensity=t.intensity,this},toJSON:function(t){var e=tt.prototype.toJSON.call(this,t);return e.object.color=this.color.getHex(),e.object.intensity=this.intensity,void 0!==this.groundColor&&(e.object.groundColor=this.groundColor.getHex()),void 0!==this.distance&&(e.object.distance=this.distance),void 0!==this.angle&&(e.object.angle=this.angle),void 0!==this.decay&&(e.object.decay=this.decay),void 0!==this.penumbra&&(e.object.penumbra=this.penumbra),void 0!==this.shadow&&(e.object.shadow=this.shadow.toJSON()),e}}),Kr.prototype=Object.assign(Object.create(Qr.prototype),{constructor:Kr,isHemisphereLight:!0,copy:function(t){return Qr.prototype.copy.call(this,t),this.groundColor.copy(t.groundColor),this}}),Object.assign($r.prototype,{copy:function(t){return this.camera=t.camera.clone(),this.bias=t.bias,this.radius=t.radius,this.mapSize.copy(t.mapSize),this},clone:function(){return(new this.constructor).copy(this)},toJSON:function(){var t={};return 0!==this.bias&&(t.bias=this.bias),1!==this.radius&&(t.radius=this.radius),512===this.mapSize.x&&512===this.mapSize.y||(t.mapSize=this.mapSize.toArray()),t.camera=this.camera.toJSON(!1).object,delete t.camera.matrix,t}}),ta.prototype=Object.assign(Object.create($r.prototype),{constructor:ta,isSpotLightShadow:!0,update:function(t){var e=this.camera,i=2*g.RAD2DEG*t.angle,n=this.mapSize.width/this.mapSize.height,r=t.distance||e.far;i===e.fov&&n===e.aspect&&r===e.far||(e.fov=i,e.aspect=n,e.far=r,e.updateProjectionMatrix())}}),ea.prototype=Object.assign(Object.create(Qr.prototype),{constructor:ea,isSpotLight:!0,copy:function(t){return Qr.prototype.copy.call(this,t),this.distance=t.distance,this.angle=t.angle,this.penumbra=t.penumbra,this.decay=t.decay,this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}),ia.prototype=Object.assign(Object.create(Qr.prototype),{constructor:ia,isPointLight:!0,copy:function(t){return Qr.prototype.copy.call(this,t),this.distance=t.distance,this.decay=t.decay,this.shadow=t.shadow.clone(),this}}),na.prototype=Object.assign(Object.create($r.prototype),{constructor:na}),ra.prototype=Object.assign(Object.create(Qr.prototype),{constructor:ra,isDirectionalLight:!0,copy:function(t){return Qr.prototype.copy.call(this,t),this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}),aa.prototype=Object.assign(Object.create(Qr.prototype),{constructor:aa,isAmbientLight:!0}),oa.prototype=Object.assign(Object.create(Qr.prototype),{constructor:oa,isRectAreaLight:!0,copy:function(t){return Qr.prototype.copy.call(this,t),this.width=t.width,this.height=t.height,this},toJSON:function(t){var e=Qr.prototype.toJSON.call(this,t);return e.object.width=this.width,e.object.height=this.height,e}}),sa.prototype=Object.assign(Object.create(ya.prototype),{constructor:sa,ValueTypeName:"string",ValueBufferType:Array,DefaultInterpolation:2300,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),ca.prototype=Object.assign(Object.create(ya.prototype),{constructor:ca,ValueTypeName:"bool",ValueBufferType:Array,DefaultInterpolation:2300,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),Object.assign(ha.prototype,{evaluate:function(t){var e=this.parameterPositions,i=this._cachedIndex,n=e[i],r=e[i-1];t:{e:{var a;i:{n:if(!(t<n)){for(var o=i+2;;){if(void 0===n){if(t<r)break n;return i=e.length,this._cachedIndex=i,this.afterEnd_(i-1,t,r)}if(i===o)break;if(r=n,t<(n=e[++i]))break e}a=e.length;break i}if(t>=r)break t;var s=e[1];t<s&&(i=2,r=s);for(o=i-2;;){if(void 0===r)return this._cachedIndex=0,this.beforeStart_(0,t,n);if(i===o)break;if(n=r,t>=(r=e[--i-1]))break e}a=i,i=0}for(;i<a;){var c=i+a>>>1;t<e[c]?a=c:i=c+1}if(n=e[i],void 0===(r=e[i-1]))return this._cachedIndex=0,this.beforeStart_(0,t,n);if(void 0===n)return i=e.length,this._cachedIndex=i,this.afterEnd_(i-1,r,t)}this._cachedIndex=i,this.intervalChanged_(i,r,n)}return this.interpolate_(i,r,t,n)},settings:null,DefaultSettings_:{},getSettings_:function(){return this.settings||this.DefaultSettings_},copySampleValue_:function(t){for(var e=this.resultBuffer,i=this.sampleValues,n=this.valueSize,r=t*n,a=0;a!==n;++a)e[a]=i[r+a];return e},interpolate_:function(){throw new Error("call to abstract method")},intervalChanged_:function(){}}),
//!\ DECLARE ALIAS AFTER assign prototype !
Object.assign(ha.prototype,{beforeStart_:ha.prototype.copySampleValue_,afterEnd_:ha.prototype.copySampleValue_}),la.prototype=Object.assign(Object.create(ha.prototype),{constructor:la,interpolate_:function(t,e,i,n){for(var r=this.resultBuffer,a=this.sampleValues,o=this.valueSize,s=t*o,c=(i-e)/(n-e),h=s+o;s!==h;s+=4)x.slerpFlat(r,0,a,s-o,a,s,c);return r}}),ua.prototype=Object.assign(Object.create(ya.prototype),{constructor:ua,ValueTypeName:"quaternion",DefaultInterpolation:2301,InterpolantFactoryMethodLinear:function(t){return new la(this.times,this.values,this.getValueSize(),t)},InterpolantFactoryMethodSmooth:void 0}),pa.prototype=Object.assign(Object.create(ya.prototype),{constructor:pa,ValueTypeName:"color"}),da.prototype=Object.assign(Object.create(ya.prototype),{constructor:da,ValueTypeName:"number"}),fa.prototype=Object.assign(Object.create(ha.prototype),{constructor:fa,DefaultSettings_:{endingStart:2400,endingEnd:2400},intervalChanged_:function(t,e,i){var n=this.parameterPositions,r=t-2,a=t+1,o=n[r],s=n[a];if(void 0===o)switch(this.getSettings_().endingStart){case 2401:r=t,o=2*e-i;break;case 2402:o=e+n[r=n.length-2]-n[r+1];break;default:r=t,o=i}if(void 0===s)switch(this.getSettings_().endingEnd){case 2401:a=t,s=2*i-e;break;case 2402:a=1,s=i+n[1]-n[0];break;default:a=t-1,s=e}var c=.5*(i-e),h=this.valueSize;this._weightPrev=c/(e-o),this._weightNext=c/(s-i),this._offsetPrev=r*h,this._offsetNext=a*h},interpolate_:function(t,e,i,n){for(var r=this.resultBuffer,a=this.sampleValues,o=this.valueSize,s=t*o,c=s-o,h=this._offsetPrev,l=this._offsetNext,u=this._weightPrev,p=this._weightNext,d=(i-e)/(n-e),f=d*d,m=f*d,g=-u*m+2*u*f-u*d,v=(1+u)*m+(-1.5-2*u)*f+(-.5+u)*d+1,y=(-1-p)*m+(1.5+p)*f+.5*d,x=p*m-p*f,_=0;_!==o;++_)r[_]=g*a[h+_]+v*a[c+_]+y*a[s+_]+x*a[l+_];return r}}),ma.prototype=Object.assign(Object.create(ha.prototype),{constructor:ma,interpolate_:function(t,e,i,n){for(var r=this.resultBuffer,a=this.sampleValues,o=this.valueSize,s=t*o,c=s-o,h=(i-e)/(n-e),l=1-h,u=0;u!==o;++u)r[u]=a[c+u]*l+a[s+u]*h;return r}}),ga.prototype=Object.assign(Object.create(ha.prototype),{constructor:ga,interpolate_:function(t){return this.copySampleValue_(t-1)}});var va={arraySlice:function(t,e,i){return va.isTypedArray(t)?new t.constructor(t.subarray(e,void 0!==i?i:t.length)):t.slice(e,i)},convertArray:function(t,e,i){return!t||!i&&t.constructor===e?t:"number"==typeof e.BYTES_PER_ELEMENT?new e(t):Array.prototype.slice.call(t)},isTypedArray:function(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)},getKeyframeOrder:function(t){for(var e=t.length,i=new Array(e),n=0;n!==e;++n)i[n]=n;return i.sort((function(e,i){return t[e]-t[i]})),i},sortedArray:function(t,e,i){for(var n=t.length,r=new t.constructor(n),a=0,o=0;o!==n;++a)for(var s=i[a]*e,c=0;c!==e;++c)r[o++]=t[s+c];return r},flattenJSON:function(t,e,i,n){for(var r=1,a=t[0];void 0!==a&&void 0===a[n];)a=t[r++];if(void 0!==a){var o=a[n];if(void 0!==o)if(Array.isArray(o))do{void 0!==(o=a[n])&&(e.push(a.time),i.push.apply(i,o)),a=t[r++]}while(void 0!==a);else if(void 0!==o.toArray)do{void 0!==(o=a[n])&&(e.push(a.time),o.toArray(i,i.length)),a=t[r++]}while(void 0!==a);else do{void 0!==(o=a[n])&&(e.push(a.time),i.push(o)),a=t[r++]}while(void 0!==a)}}};function ya(t,e,i,n){if(void 0===t)throw new Error("THREE.KeyframeTrack: track name is undefined");if(void 0===e||0===e.length)throw new Error("THREE.KeyframeTrack: no keyframes in track named "+t);this.name=t,this.times=va.convertArray(e,this.TimeBufferType),this.values=va.convertArray(i,this.ValueBufferType),this.setInterpolation(n||this.DefaultInterpolation),this.validate(),this.optimize()}function xa(t,e,i,n){ya.call(this,t,e,i,n)}function _a(t,e,i){this.name=t,this.tracks=i,this.duration=void 0!==e?e:-1,this.uuid=g.generateUUID(),this.duration<0&&this.resetDuration(),this.optimize()}function ba(t){this.manager=void 0!==t?t:br,this.textures={}}function wa(t){this.manager=void 0!==t?t:br}Object.assign(ya,{parse:function(t){if(void 0===t.type)throw new Error("THREE.KeyframeTrack: track type undefined, can not parse");var e=ya._getTrackTypeForValueTypeName(t.type);if(void 0===t.times){var i=[],n=[];va.flattenJSON(t.keys,i,n,"value"),t.times=i,t.values=n}return void 0!==e.parse?e.parse(t):new e(t.name,t.times,t.values,t.interpolation)},toJSON:function(t){var e,i=t.constructor;if(void 0!==i.toJSON)e=i.toJSON(t);else{e={name:t.name,times:va.convertArray(t.times,Array),values:va.convertArray(t.values,Array)};var n=t.getInterpolation();n!==t.DefaultInterpolation&&(e.interpolation=n)}return e.type=t.ValueTypeName,e},_getTrackTypeForValueTypeName:function(t){switch(t.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return da;case"vector":case"vector2":case"vector3":case"vector4":return xa;case"color":return pa;case"quaternion":return ua;case"bool":case"boolean":return ca;case"string":return sa}throw new Error("THREE.KeyframeTrack: Unsupported typeName: "+t)}}),Object.assign(ya.prototype,{constructor:ya,TimeBufferType:Float32Array,ValueBufferType:Float32Array,DefaultInterpolation:2301,InterpolantFactoryMethodDiscrete:function(t){return new ga(this.times,this.values,this.getValueSize(),t)},InterpolantFactoryMethodLinear:function(t){return new ma(this.times,this.values,this.getValueSize(),t)},InterpolantFactoryMethodSmooth:function(t){return new fa(this.times,this.values,this.getValueSize(),t)},setInterpolation:function(t){var e;switch(t){case 2300:e=this.InterpolantFactoryMethodDiscrete;break;case 2301:e=this.InterpolantFactoryMethodLinear;break;case 2302:e=this.InterpolantFactoryMethodSmooth}if(void 0!==e)this.createInterpolant=e;else{var i="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(void 0===this.createInterpolant){if(t===this.DefaultInterpolation)throw new Error(i);this.setInterpolation(this.DefaultInterpolation)}console.warn("THREE.KeyframeTrack:",i)}},getInterpolation:function(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return 2300;case this.InterpolantFactoryMethodLinear:return 2301;case this.InterpolantFactoryMethodSmooth:return 2302}},getValueSize:function(){return this.values.length/this.times.length},shift:function(t){if(0!==t)for(var e=this.times,i=0,n=e.length;i!==n;++i)e[i]+=t;return this},scale:function(t){if(1!==t)for(var e=this.times,i=0,n=e.length;i!==n;++i)e[i]*=t;return this},trim:function(t,e){for(var i=this.times,n=i.length,r=0,a=n-1;r!==n&&i[r]<t;)++r;for(;-1!==a&&i[a]>e;)--a;if(++a,0!==r||a!==n){r>=a&&(r=(a=Math.max(a,1))-1);var o=this.getValueSize();this.times=va.arraySlice(i,r,a),this.values=va.arraySlice(this.values,r*o,a*o)}return this},validate:function(){var t=!0,e=this.getValueSize();e-Math.floor(e)!=0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),t=!1);var i=this.times,n=this.values,r=i.length;0===r&&(console.error("THREE.KeyframeTrack: Track is empty.",this),t=!1);for(var a=null,o=0;o!==r;o++){var s=i[o];if("number"==typeof s&&isNaN(s)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,o,s),t=!1;break}if(null!==a&&a>s){console.error("THREE.KeyframeTrack: Out of order keys.",this,o,s,a),t=!1;break}a=s}if(void 0!==n&&va.isTypedArray(n)){o=0;for(var c=n.length;o!==c;++o){var h=n[o];if(isNaN(h)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,o,h),t=!1;break}}}return t},optimize:function(){for(var t=this.times,e=this.values,i=this.getValueSize(),n=2302===this.getInterpolation(),r=1,a=t.length-1,o=1;o<a;++o){var s=!1,c=t[o];if(c!==t[o+1]&&(1!==o||c!==c[0]))if(n)s=!0;else for(var h=o*i,l=h-i,u=h+i,p=0;p!==i;++p){var d=e[h+p];if(d!==e[l+p]||d!==e[u+p]){s=!0;break}}if(s){if(o!==r){t[r]=t[o];var f=o*i,m=r*i;for(p=0;p!==i;++p)e[m+p]=e[f+p]}++r}}if(a>0){t[r]=t[a];for(f=a*i,m=r*i,p=0;p!==i;++p)e[m+p]=e[f+p];++r}return r!==t.length&&(this.times=va.arraySlice(t,0,r),this.values=va.arraySlice(e,0,r*i)),this}}),xa.prototype=Object.assign(Object.create(ya.prototype),{constructor:xa,ValueTypeName:"vector"}),Object.assign(_a,{parse:function(t){for(var e=[],i=t.tracks,n=1/(t.fps||1),r=0,a=i.length;r!==a;++r)e.push(ya.parse(i[r]).scale(n));return new _a(t.name,t.duration,e)},toJSON:function(t){for(var e=[],i=t.tracks,n={name:t.name,duration:t.duration,tracks:e,uuid:t.uuid},r=0,a=i.length;r!==a;++r)e.push(ya.toJSON(i[r]));return n},CreateFromMorphTargetSequence:function(t,e,i,n){for(var r=e.length,a=[],o=0;o<r;o++){var s=[],c=[];s.push((o+r-1)%r,o,(o+1)%r),c.push(0,1,0);var h=va.getKeyframeOrder(s);s=va.sortedArray(s,1,h),c=va.sortedArray(c,1,h),n||0!==s[0]||(s.push(r),c.push(c[0])),a.push(new da(".morphTargetInfluences["+e[o].name+"]",s,c).scale(1/i))}return new _a(t,-1,a)},findByName:function(t,e){var i=t;if(!Array.isArray(t)){var n=t;i=n.geometry&&n.geometry.animations||n.animations}for(var r=0;r<i.length;r++)if(i[r].name===e)return i[r];return null},CreateClipsFromMorphTargetSequences:function(t,e,i){for(var n={},r=/^([\w-]*?)([\d]+)$/,a=0,o=t.length;a<o;a++){var s=t[a],c=s.name.match(r);if(c&&c.length>1){var h=n[u=c[1]];h||(n[u]=h=[]),h.push(s)}}var l=[];for(var u in n)l.push(_a.CreateFromMorphTargetSequence(u,n[u],e,i));return l},parseAnimation:function(t,e){if(!t)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;for(var i=function(t,e,i,n,r){if(0!==i.length){var a=[],o=[];va.flattenJSON(i,a,o,n),0!==a.length&&r.push(new t(e,a,o))}},n=[],r=t.name||"default",a=t.length||-1,o=t.fps||30,s=t.hierarchy||[],c=0;c<s.length;c++){var h=s[c].keys;if(h&&0!==h.length)if(h[0].morphTargets){for(var l={},u=0;u<h.length;u++)if(h[u].morphTargets)for(var p=0;p<h[u].morphTargets.length;p++)l[h[u].morphTargets[p]]=-1;for(var d in l){var f=[],m=[];for(p=0;p!==h[u].morphTargets.length;++p){var g=h[u];f.push(g.time),m.push(g.morphTarget===d?1:0)}n.push(new da(".morphTargetInfluence["+d+"]",f,m))}a=l.length*(o||1)}else{var v=".bones["+e[c].name+"]";i(xa,v+".position",h,"pos",n),i(ua,v+".quaternion",h,"rot",n),i(xa,v+".scale",h,"scl",n)}}return 0===n.length?null:new _a(r,a,n)}}),Object.assign(_a.prototype,{resetDuration:function(){for(var t=0,e=0,i=this.tracks.length;e!==i;++e){var n=this.tracks[e];t=Math.max(t,n.times[n.times.length-1])}this.duration=t},trim:function(){for(var t=0;t<this.tracks.length;t++)this.tracks[t].trim(0,this.duration);return this},optimize:function(){for(var t=0;t<this.tracks.length;t++)this.tracks[t].optimize();return this}}),Object.assign(ba.prototype,{load:function(t,e,i,n){var r=this;new Mr(r.manager).load(t,(function(t){e(r.parse(JSON.parse(t)))}),i,n)},setTextures:function(t){this.textures=t},parse:function(t){var e=this.textures;function i(t){return void 0===e[t]&&console.warn("THREE.MaterialLoader: Undefined texture",t),e[t]}var n=new yr[t.type];if(void 0!==t.uuid&&(n.uuid=t.uuid),void 0!==t.name&&(n.name=t.name),void 0!==t.color&&n.color.setHex(t.color),void 0!==t.roughness&&(n.roughness=t.roughness),void 0!==t.metalness&&(n.metalness=t.metalness),void 0!==t.emissive&&n.emissive.setHex(t.emissive),void 0!==t.specular&&n.specular.setHex(t.specular),void 0!==t.shininess&&(n.shininess=t.shininess),void 0!==t.clearCoat&&(n.clearCoat=t.clearCoat),void 0!==t.clearCoatRoughness&&(n.clearCoatRoughness=t.clearCoatRoughness),void 0!==t.uniforms&&(n.uniforms=t.uniforms),void 0!==t.vertexShader&&(n.vertexShader=t.vertexShader),void 0!==t.fragmentShader&&(n.fragmentShader=t.fragmentShader),void 0!==t.vertexColors&&(n.vertexColors=t.vertexColors),void 0!==t.fog&&(n.fog=t.fog),void 0!==t.flatShading&&(n.flatShading=t.flatShading),void 0!==t.blending&&(n.blending=t.blending),void 0!==t.side&&(n.side=t.side),void 0!==t.opacity&&(n.opacity=t.opacity),void 0!==t.transparent&&(n.transparent=t.transparent),void 0!==t.alphaTest&&(n.alphaTest=t.alphaTest),void 0!==t.depthTest&&(n.depthTest=t.depthTest),void 0!==t.depthWrite&&(n.depthWrite=t.depthWrite),void 0!==t.colorWrite&&(n.colorWrite=t.colorWrite),void 0!==t.wireframe&&(n.wireframe=t.wireframe),void 0!==t.wireframeLinewidth&&(n.wireframeLinewidth=t.wireframeLinewidth),void 0!==t.wireframeLinecap&&(n.wireframeLinecap=t.wireframeLinecap),void 0!==t.wireframeLinejoin&&(n.wireframeLinejoin=t.wireframeLinejoin),void 0!==t.rotation&&(n.rotation=t.rotation),1!==t.linewidth&&(n.linewidth=t.linewidth),void 0!==t.dashSize&&(n.dashSize=t.dashSize),void 0!==t.gapSize&&(n.gapSize=t.gapSize),void 0!==t.scale&&(n.scale=t.scale),void 0!==t.polygonOffset&&(n.polygonOffset=t.polygonOffset),void 0!==t.polygonOffsetFactor&&(n.polygonOffsetFactor=t.polygonOffsetFactor),void 0!==t.polygonOffsetUnits&&(n.polygonOffsetUnits=t.polygonOffsetUnits),void 0!==t.skinning&&(n.skinning=t.skinning),void 0!==t.morphTargets&&(n.morphTargets=t.morphTargets),void 0!==t.dithering&&(n.dithering=t.dithering),void 0!==t.visible&&(n.visible=t.visible),void 0!==t.userData&&(n.userData=t.userData),void 0!==t.shading&&(n.flatShading=1===t.shading),void 0!==t.size&&(n.size=t.size),void 0!==t.sizeAttenuation&&(n.sizeAttenuation=t.sizeAttenuation),void 0!==t.map&&(n.map=i(t.map)),void 0!==t.alphaMap&&(n.alphaMap=i(t.alphaMap),n.transparent=!0),void 0!==t.bumpMap&&(n.bumpMap=i(t.bumpMap)),void 0!==t.bumpScale&&(n.bumpScale=t.bumpScale),void 0!==t.normalMap&&(n.normalMap=i(t.normalMap)),void 0!==t.normalScale){var r=t.normalScale;!1===Array.isArray(r)&&(r=[r,r]),n.normalScale=(new v).fromArray(r)}return void 0!==t.displacementMap&&(n.displacementMap=i(t.displacementMap)),void 0!==t.displacementScale&&(n.displacementScale=t.displacementScale),void 0!==t.displacementBias&&(n.displacementBias=t.displacementBias),void 0!==t.roughnessMap&&(n.roughnessMap=i(t.roughnessMap)),void 0!==t.metalnessMap&&(n.metalnessMap=i(t.metalnessMap)),void 0!==t.emissiveMap&&(n.emissiveMap=i(t.emissiveMap)),void 0!==t.emissiveIntensity&&(n.emissiveIntensity=t.emissiveIntensity),void 0!==t.specularMap&&(n.specularMap=i(t.specularMap)),void 0!==t.envMap&&(n.envMap=i(t.envMap)),void 0!==t.reflectivity&&(n.reflectivity=t.reflectivity),void 0!==t.lightMap&&(n.lightMap=i(t.lightMap)),void 0!==t.lightMapIntensity&&(n.lightMapIntensity=t.lightMapIntensity),void 0!==t.aoMap&&(n.aoMap=i(t.aoMap)),void 0!==t.aoMapIntensity&&(n.aoMapIntensity=t.aoMapIntensity),void 0!==t.gradientMap&&(n.gradientMap=i(t.gradientMap)),n}}),Object.assign(wa.prototype,{load:function(t,e,i,n){var r=this;new Mr(r.manager).load(t,(function(t){e(r.parse(JSON.parse(t)))}),i,n)},parse:function(t){var e=new bt,i=t.data.index;if(void 0!==i){var n=new Aa[i.type](i.array);e.setIndex(new ct(n,1))}var r=t.data.attributes;for(var a in r){var o=r[a];n=new Aa[o.type](o.array);e.addAttribute(a,new ct(n,o.itemSize,o.normalized))}var s=t.data.groups||t.data.drawcalls||t.data.offsets;if(void 0!==s)for(var c=0,h=s.length;c!==h;++c){var l=s[c];e.addGroup(l.start,l.count,l.materialIndex)}var u=t.data.boundingSphere;if(void 0!==u){var p=new _;void 0!==u.center&&p.fromArray(u.center),e.boundingSphere=new N(p,u.radius)}return e}});var Ma,Ea,Ta,Sa,Aa={Int8Array:Int8Array,Uint8Array:Uint8Array,Uint8ClampedArray:"undefined"!=typeof Uint8ClampedArray?Uint8ClampedArray:Uint8Array,Int16Array:Int16Array,Uint16Array:Uint16Array,Int32Array:Int32Array,Uint32Array:Uint32Array,Float32Array:Float32Array,Float64Array:Float64Array};function Ra(){}Ra.Handlers={handlers:[],add:function(t,e){this.handlers.push(t,e)},get:function(t){for(var e=this.handlers,i=0,n=e.length;i<n;i+=2){var r=e[i],a=e[i+1];if(r.test(t))return a}return null}},Object.assign(Ra.prototype,{crossOrigin:void 0,onLoadStart:function(){},onLoadProgress:function(){},onLoadComplete:function(){},initMaterials:function(t,e,i){for(var n=[],r=0;r<t.length;++r)n[r]=this.createMaterial(t[r],e,i);return n},createMaterial:(Ma={NoBlending:0,NormalBlending:1,AdditiveBlending:2,SubtractiveBlending:3,MultiplyBlending:4,CustomBlending:5},Ea=new H,Ta=new Ar,Sa=new ba,function(t,e,i){var n={};function r(t,r,a,o,s){var c,h=e+t,l=Ra.Handlers.get(h);null!==l?c=l.load(h):(Ta.setCrossOrigin(i),c=Ta.load(h)),void 0!==r&&(c.repeat.fromArray(r),1!==r[0]&&(c.wrapS=1e3),1!==r[1]&&(c.wrapT=1e3)),void 0!==a&&c.offset.fromArray(a),void 0!==o&&("repeat"===o[0]&&(c.wrapS=1e3),"mirror"===o[0]&&(c.wrapS=1002),"repeat"===o[1]&&(c.wrapT=1e3),"mirror"===o[1]&&(c.wrapT=1002)),void 0!==s&&(c.anisotropy=s);var u=g.generateUUID();return n[u]=c,u}var a={uuid:g.generateUUID(),type:"MeshLambertMaterial"};for(var o in t){var s=t[o];switch(o){case"DbgColor":case"DbgIndex":case"opticalDensity":case"illumination":break;case"DbgName":a.name=s;break;case"blending":a.blending=Ma[s];break;case"colorAmbient":case"mapAmbient":console.warn("THREE.Loader.createMaterial:",o,"is no longer supported.");break;case"colorDiffuse":a.color=Ea.fromArray(s).getHex();break;case"colorSpecular":a.specular=Ea.fromArray(s).getHex();break;case"colorEmissive":a.emissive=Ea.fromArray(s).getHex();break;case"specularCoef":a.shininess=s;break;case"shading":"basic"===s.toLowerCase()&&(a.type="MeshBasicMaterial"),"phong"===s.toLowerCase()&&(a.type="MeshPhongMaterial"),"standard"===s.toLowerCase()&&(a.type="MeshStandardMaterial");break;case"mapDiffuse":a.map=r(s,t.mapDiffuseRepeat,t.mapDiffuseOffset,t.mapDiffuseWrap,t.mapDiffuseAnisotropy);break;case"mapDiffuseRepeat":case"mapDiffuseOffset":case"mapDiffuseWrap":case"mapDiffuseAnisotropy":break;case"mapEmissive":a.emissiveMap=r(s,t.mapEmissiveRepeat,t.mapEmissiveOffset,t.mapEmissiveWrap,t.mapEmissiveAnisotropy);break;case"mapEmissiveRepeat":case"mapEmissiveOffset":case"mapEmissiveWrap":case"mapEmissiveAnisotropy":break;case"mapLight":a.lightMap=r(s,t.mapLightRepeat,t.mapLightOffset,t.mapLightWrap,t.mapLightAnisotropy);break;case"mapLightRepeat":case"mapLightOffset":case"mapLightWrap":case"mapLightAnisotropy":break;case"mapAO":a.aoMap=r(s,t.mapAORepeat,t.mapAOOffset,t.mapAOWrap,t.mapAOAnisotropy);break;case"mapAORepeat":case"mapAOOffset":case"mapAOWrap":case"mapAOAnisotropy":break;case"mapBump":a.bumpMap=r(s,t.mapBumpRepeat,t.mapBumpOffset,t.mapBumpWrap,t.mapBumpAnisotropy);break;case"mapBumpScale":a.bumpScale=s;break;case"mapBumpRepeat":case"mapBumpOffset":case"mapBumpWrap":case"mapBumpAnisotropy":break;case"mapNormal":a.normalMap=r(s,t.mapNormalRepeat,t.mapNormalOffset,t.mapNormalWrap,t.mapNormalAnisotropy);break;case"mapNormalFactor":a.normalScale=s;break;case"mapNormalRepeat":case"mapNormalOffset":case"mapNormalWrap":case"mapNormalAnisotropy":break;case"mapSpecular":a.specularMap=r(s,t.mapSpecularRepeat,t.mapSpecularOffset,t.mapSpecularWrap,t.mapSpecularAnisotropy);break;case"mapSpecularRepeat":case"mapSpecularOffset":case"mapSpecularWrap":case"mapSpecularAnisotropy":break;case"mapMetalness":a.metalnessMap=r(s,t.mapMetalnessRepeat,t.mapMetalnessOffset,t.mapMetalnessWrap,t.mapMetalnessAnisotropy);break;case"mapMetalnessRepeat":case"mapMetalnessOffset":case"mapMetalnessWrap":case"mapMetalnessAnisotropy":break;case"mapRoughness":a.roughnessMap=r(s,t.mapRoughnessRepeat,t.mapRoughnessOffset,t.mapRoughnessWrap,t.mapRoughnessAnisotropy);break;case"mapRoughnessRepeat":case"mapRoughnessOffset":case"mapRoughnessWrap":case"mapRoughnessAnisotropy":break;case"mapAlpha":a.alphaMap=r(s,t.mapAlphaRepeat,t.mapAlphaOffset,t.mapAlphaWrap,t.mapAlphaAnisotropy);break;case"mapAlphaRepeat":case"mapAlphaOffset":case"mapAlphaWrap":case"mapAlphaAnisotropy":break;case"flipSided":a.side=1;break;case"doubleSided":a.side=2;break;case"transparency":console.warn("THREE.Loader.createMaterial: transparency has been renamed to opacity"),a.opacity=s;break;case"depthTest":case"depthWrite":case"colorWrite":case"opacity":case"reflectivity":case"transparent":case"visible":case"wireframe":a[o]=s;break;case"vertexColors":!0===s&&(a.vertexColors=2),"face"===s&&(a.vertexColors=1);break;default:console.error("THREE.Loader.createMaterial: Unsupported",o,s)}}return"MeshBasicMaterial"===a.type&&delete a.emissive,"MeshPhongMaterial"!==a.type&&delete a.specular,a.opacity<1&&(a.transparent=!0),Sa.setTextures(n),Sa.parse(a)})});var La=function(t){var e=t.lastIndexOf("/");return-1===e?"./":t.substr(0,e+1)};function Pa(t){"boolean"==typeof t&&(console.warn("THREE.JSONLoader: showStatus parameter has been removed from constructor."),t=void 0),this.manager=void 0!==t?t:br,this.withCredentials=!1}Object.assign(Pa.prototype,{load:function(t,e,i,n){var r=this,a=this.texturePath&&"string"==typeof this.texturePath?this.texturePath:La(t),o=new Mr(this.manager);o.setWithCredentials(this.withCredentials),o.load(t,(function(i){var n=JSON.parse(i),o=n.metadata;if(void 0!==o){var s=o.type;if(void 0!==s&&"object"===s.toLowerCase())return void console.error("THREE.JSONLoader: "+t+" should be loaded with THREE.ObjectLoader instead.")}var c=r.parse(n,a);e(c.geometry,c.materials)}),i,n)},setTexturePath:function(t){this.texturePath=t},parse:function(t,e){void 0!==t.data&&(t=t.data),void 0!==t.scale?t.scale=1/t.scale:t.scale=1;var i=new st;return function(t,e){function i(t,e){return t&1<<e}var n,r,a,o,s,c,h,l,u,p,d,f,m,g,y,x,b,w,M,E,T,S,A,R,L,P=t.faces,C=t.vertices,O=t.normals,I=t.colors,N=t.scale,D=0;if(void 0!==t.uvs){for(n=0;n<t.uvs.length;n++)t.uvs[n].length&&D++;for(n=0;n<D;n++)e.faceVertexUvs[n]=[]}for(o=0,s=C.length;o<s;)(w=new _).x=C[o++]*N,w.y=C[o++]*N,w.z=C[o++]*N,e.vertices.push(w);for(o=0,s=P.length;o<s;)if(d=i(p=P[o++],0),f=i(p,1),m=i(p,3),g=i(p,4),y=i(p,5),x=i(p,6),b=i(p,7),d){if((E=new nt).a=P[o],E.b=P[o+1],E.c=P[o+3],(T=new nt).a=P[o+1],T.b=P[o+2],T.c=P[o+3],o+=4,f&&(u=P[o++],E.materialIndex=u,T.materialIndex=u),a=e.faces.length,m)for(n=0;n<D;n++)for(R=t.uvs[n],e.faceVertexUvs[n][a]=[],e.faceVertexUvs[n][a+1]=[],r=0;r<4;r++)L=new v(R[2*(l=P[o++])],R[2*l+1]),2!==r&&e.faceVertexUvs[n][a].push(L),0!==r&&e.faceVertexUvs[n][a+1].push(L);if(g&&(h=3*P[o++],E.normal.set(O[h++],O[h++],O[h]),T.normal.copy(E.normal)),y)for(n=0;n<4;n++)h=3*P[o++],A=new _(O[h++],O[h++],O[h]),2!==n&&E.vertexNormals.push(A),0!==n&&T.vertexNormals.push(A);if(x&&(S=I[c=P[o++]],E.color.setHex(S),T.color.setHex(S)),b)for(n=0;n<4;n++)S=I[c=P[o++]],2!==n&&E.vertexColors.push(new H(S)),0!==n&&T.vertexColors.push(new H(S));e.faces.push(E),e.faces.push(T)}else{if((M=new nt).a=P[o++],M.b=P[o++],M.c=P[o++],f&&(u=P[o++],M.materialIndex=u),a=e.faces.length,m)for(n=0;n<D;n++)for(R=t.uvs[n],e.faceVertexUvs[n][a]=[],r=0;r<3;r++)L=new v(R[2*(l=P[o++])],R[2*l+1]),e.faceVertexUvs[n][a].push(L);if(g&&(h=3*P[o++],M.normal.set(O[h++],O[h++],O[h])),y)for(n=0;n<3;n++)h=3*P[o++],A=new _(O[h++],O[h++],O[h]),M.vertexNormals.push(A);if(x&&(c=P[o++],M.color.setHex(I[c])),b)for(n=0;n<3;n++)c=P[o++],M.vertexColors.push(new H(I[c]));e.faces.push(M)}}(t,i),function(t,e){var i=void 0!==t.influencesPerVertex?t.influencesPerVertex:2;if(t.skinWeights)for(var n=0,r=t.skinWeights.length;n<r;n+=i){var a=t.skinWeights[n],o=i>1?t.skinWeights[n+1]:0,s=i>2?t.skinWeights[n+2]:0,c=i>3?t.skinWeights[n+3]:0;e.skinWeights.push(new L(a,o,s,c))}if(t.skinIndices)for(n=0,r=t.skinIndices.length;n<r;n+=i){var h=t.skinIndices[n],l=i>1?t.skinIndices[n+1]:0,u=i>2?t.skinIndices[n+2]:0,p=i>3?t.skinIndices[n+3]:0;e.skinIndices.push(new L(h,l,u,p))}e.bones=t.bones,e.bones&&e.bones.length>0&&(e.skinWeights.length!==e.skinIndices.length||e.skinIndices.length!==e.vertices.length)&&console.warn("When skinning, number of vertices ("+e.vertices.length+"), skinIndices ("+e.skinIndices.length+"), and skinWeights ("+e.skinWeights.length+") should match.")}(t,i),function(t,e){var i=t.scale;if(void 0!==t.morphTargets)for(var n=0,r=t.morphTargets.length;n<r;n++){e.morphTargets[n]={},e.morphTargets[n].name=t.morphTargets[n].name,e.morphTargets[n].vertices=[];for(var a=e.morphTargets[n].vertices,o=t.morphTargets[n].vertices,s=0,c=o.length;s<c;s+=3){var h=new _;h.x=o[s]*i,h.y=o[s+1]*i,h.z=o[s+2]*i,a.push(h)}}if(void 0!==t.morphColors&&t.morphColors.length>0){console.warn('THREE.JSONLoader: "morphColors" no longer supported. Using them as face colors.');var l=e.faces,u=t.morphColors[0].colors;for(n=0,r=l.length;n<r;n++)l[n].color.fromArray(u,3*n)}}(t,i),function(t,e){var i=[],n=[];void 0!==t.animation&&n.push(t.animation),void 0!==t.animations&&(t.animations.length?n=n.concat(t.animations):n.push(t.animations));for(var r=0;r<n.length;r++){var a=_a.parseAnimation(n[r],e.bones);a&&i.push(a)}if(e.morphTargets){var o=_a.CreateClipsFromMorphTargetSequences(e.morphTargets,10);i=i.concat(o)}i.length>0&&(e.animations=i)}(t,i),i.computeFaceNormals(),i.computeBoundingSphere(),void 0===t.materials||0===t.materials.length?{geometry:i}:{geometry:i,materials:Ra.prototype.initMaterials(t.materials,e,this.crossOrigin)}}}),Object.assign(function(t){this.manager=void 0!==t?t:br,this.texturePath=""}.prototype,{load:function(t,e,i,n){""===this.texturePath&&(this.texturePath=t.substring(0,t.lastIndexOf("/")+1));var r=this;new Mr(r.manager).load(t,(function(i){var a=null;try{a=JSON.parse(i)}catch(e){return void 0!==n&&n(e),void console.error("THREE:ObjectLoader: Can't parse "+t+".",e.message)}var o=a.metadata;void 0!==o&&void 0!==o.type&&"geometry"!==o.type.toLowerCase()?r.parse(a,e):console.error("THREE.ObjectLoader: Can't load "+t+". Use THREE.JSONLoader instead.")}),i,n)},setTexturePath:function(t){return this.texturePath=t,this},setCrossOrigin:function(t){return this.crossOrigin=t,this},parse:function(t,e){var i=this.parseShape(t.shapes),n=this.parseGeometries(t.geometries,i),r=this.parseImages(t.images,(function(){void 0!==e&&e(s)})),a=this.parseTextures(t.textures,r),o=this.parseMaterials(t.materials,a),s=this.parseObject(t.object,n,o);return t.animations&&(s.animations=this.parseAnimations(t.animations)),void 0!==t.images&&0!==t.images.length||void 0!==e&&e(s),s},parseShape:function(t){var e={};if(void 0!==t)for(var i=0,n=t.length;i<n;i++){var r=(new Jr).fromJSON(t[i]);e[r.uuid]=r}return e},parseGeometries:function(t,e){var i={};if(void 0!==t)for(var n=new Pa,r=new wa,a=0,o=t.length;a<o;a++){var s,c=t[a];switch(c.type){case"PlaneGeometry":case"PlaneBufferGeometry":s=new cr[c.type](c.width,c.height,c.widthSegments,c.heightSegments);break;case"BoxGeometry":case"BoxBufferGeometry":case"CubeGeometry":s=new cr[c.type](c.width,c.height,c.depth,c.widthSegments,c.heightSegments,c.depthSegments);break;case"CircleGeometry":case"CircleBufferGeometry":s=new cr[c.type](c.radius,c.segments,c.thetaStart,c.thetaLength);break;case"CylinderGeometry":case"CylinderBufferGeometry":s=new cr[c.type](c.radiusTop,c.radiusBottom,c.height,c.radialSegments,c.heightSegments,c.openEnded,c.thetaStart,c.thetaLength);break;case"ConeGeometry":case"ConeBufferGeometry":s=new cr[c.type](c.radius,c.height,c.radialSegments,c.heightSegments,c.openEnded,c.thetaStart,c.thetaLength);break;case"SphereGeometry":case"SphereBufferGeometry":s=new cr[c.type](c.radius,c.widthSegments,c.heightSegments,c.phiStart,c.phiLength,c.thetaStart,c.thetaLength);break;case"DodecahedronGeometry":case"DodecahedronBufferGeometry":case"IcosahedronGeometry":case"IcosahedronBufferGeometry":case"OctahedronGeometry":case"OctahedronBufferGeometry":case"TetrahedronGeometry":case"TetrahedronBufferGeometry":s=new cr[c.type](c.radius,c.detail);break;case"RingGeometry":case"RingBufferGeometry":s=new cr[c.type](c.innerRadius,c.outerRadius,c.thetaSegments,c.phiSegments,c.thetaStart,c.thetaLength);break;case"TorusGeometry":case"TorusBufferGeometry":s=new cr[c.type](c.radius,c.tube,c.radialSegments,c.tubularSegments,c.arc);break;case"TorusKnotGeometry":case"TorusKnotBufferGeometry":s=new cr[c.type](c.radius,c.tube,c.tubularSegments,c.radialSegments,c.p,c.q);break;case"LatheGeometry":case"LatheBufferGeometry":s=new cr[c.type](c.points,c.segments,c.phiStart,c.phiLength);break;case"PolyhedronGeometry":case"PolyhedronBufferGeometry":s=new cr[c.type](c.vertices,c.indices,c.radius,c.details);break;case"ShapeGeometry":case"ShapeBufferGeometry":for(var h=[],l=0,u=c.shapes.length;l<u;l++){var p=e[c.shapes[l]];h.push(p)}s=new cr[c.type](h,c.curveSegments);break;case"ExtrudeGeometry":case"ExtrudeBufferGeometry":for(h=[],l=0,u=c.shapes.length;l<u;l++){p=e[c.shapes[l]];h.push(p)}var d=c.options.extrudePath;void 0!==d&&(c.options.extrudePath=(new qr[d.type]).fromJSON(d)),s=new cr[c.type](h,c.options);break;case"BufferGeometry":s=r.parse(c);break;case"Geometry":s=n.parse(c,this.texturePath).geometry;break;default:console.warn('THREE.ObjectLoader: Unsupported geometry type "'+c.type+'"');continue}s.uuid=c.uuid,void 0!==c.name&&(s.name=c.name),!0===s.isBufferGeometry&&void 0!==c.userData&&(s.userData=c.userData),i[c.uuid]=s}return i},parseMaterials:function(t,e){var i={};if(void 0!==t){var n=new ba;n.setTextures(e);for(var r=0,a=t.length;r<a;r++){var o=t[r];if("MultiMaterial"===o.type){for(var s=[],c=0;c<o.materials.length;c++)s.push(n.parse(o.materials[c]));i[o.uuid]=s}else i[o.uuid]=n.parse(o)}}return i},parseAnimations:function(t){for(var e=[],i=0;i<t.length;i++){var n=t[i],r=_a.parse(n);void 0!==n.uuid&&(r.uuid=n.uuid),e.push(r)}return e},parseImages:function(t,e){var i=this,n={};function r(t){return i.manager.itemStart(t),a.load(t,(function(){i.manager.itemEnd(t)}),void 0,(function(){i.manager.itemEnd(t),i.manager.itemError(t)}))}if(void 0!==t&&t.length>0){var a=new Tr(new _r(e));a.setCrossOrigin(this.crossOrigin);for(var o=0,s=t.length;o<s;o++){var c=t[o],h=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(c.url)?c.url:i.texturePath+c.url;n[c.uuid]=r(h)}}return n},parseTextures:function(t,e){function i(t,e){return"number"==typeof t?t:(console.warn("THREE.ObjectLoader.parseTexture: Constant should be in numeric form.",t),e[t])}var n={};if(void 0!==t)for(var r=0,a=t.length;r<a;r++){var o=t[r];void 0===o.image&&console.warn('THREE.ObjectLoader: No "image" specified for',o.uuid),void 0===e[o.image]&&console.warn("THREE.ObjectLoader: Undefined image",o.image);var s=new R(e[o.image]);s.needsUpdate=!0,s.uuid=o.uuid,void 0!==o.name&&(s.name=o.name),void 0!==o.mapping&&(s.mapping=i(o.mapping,Oa)),void 0!==o.offset&&s.offset.fromArray(o.offset),void 0!==o.repeat&&s.repeat.fromArray(o.repeat),void 0!==o.center&&s.center.fromArray(o.center),void 0!==o.rotation&&(s.rotation=o.rotation),void 0!==o.wrap&&(s.wrapS=i(o.wrap[0],Ia),s.wrapT=i(o.wrap[1],Ia)),void 0!==o.format&&(s.format=o.format),void 0!==o.minFilter&&(s.minFilter=i(o.minFilter,Na)),void 0!==o.magFilter&&(s.magFilter=i(o.magFilter,Na)),void 0!==o.anisotropy&&(s.anisotropy=o.anisotropy),void 0!==o.flipY&&(s.flipY=o.flipY),n[o.uuid]=s}return n},parseObject:function(t,e,i){var n;function r(t){return void 0===e[t]&&console.warn("THREE.ObjectLoader: Undefined geometry",t),e[t]}function a(t){if(void 0!==t){if(Array.isArray(t)){for(var e=[],n=0,r=t.length;n<r;n++){var a=t[n];void 0===i[a]&&console.warn("THREE.ObjectLoader: Undefined material",a),e.push(i[a])}return e}return void 0===i[t]&&console.warn("THREE.ObjectLoader: Undefined material",t),i[t]}}switch(t.type){case"Scene":n=new Oi,void 0!==t.background&&Number.isInteger(t.background)&&(n.background=new H(t.background)),void 0!==t.fog&&("Fog"===t.fog.type?n.fog=new Ci(t.fog.color,t.fog.near,t.fog.far):"FogExp2"===t.fog.type&&(n.fog=new Pi(t.fog.color,t.fog.density)));break;case"PerspectiveCamera":n=new Ti(t.fov,t.aspect,t.near,t.far),void 0!==t.focus&&(n.focus=t.focus),void 0!==t.zoom&&(n.zoom=t.zoom),void 0!==t.filmGauge&&(n.filmGauge=t.filmGauge),void 0!==t.filmOffset&&(n.filmOffset=t.filmOffset),void 0!==t.view&&(n.view=Object.assign({},t.view));break;case"OrthographicCamera":n=new it(t.left,t.right,t.top,t.bottom,t.near,t.far),void 0!==t.zoom&&(n.zoom=t.zoom),void 0!==t.view&&(n.view=Object.assign({},t.view));break;case"AmbientLight":n=new aa(t.color,t.intensity);break;case"DirectionalLight":n=new ra(t.color,t.intensity);break;case"PointLight":n=new ia(t.color,t.intensity,t.distance,t.decay);break;case"RectAreaLight":n=new oa(t.color,t.intensity,t.width,t.height);break;case"SpotLight":n=new ea(t.color,t.intensity,t.distance,t.angle,t.penumbra,t.decay);break;case"HemisphereLight":n=new Kr(t.color,t.groundColor,t.intensity);break;case"SkinnedMesh":console.warn("THREE.ObjectLoader.parseObject() does not support SkinnedMesh yet.");case"Mesh":var o=r(t.geometry),s=a(t.material);n=o.bones&&o.bones.length>0?new Bi(o,s):new Gt(o,s);break;case"LOD":n=new Di;break;case"Line":n=new Gi(r(t.geometry),a(t.material),t.mode);break;case"LineLoop":n=new ki(r(t.geometry),a(t.material));break;case"LineSegments":n=new Hi(r(t.geometry),a(t.material));break;case"PointCloud":case"Points":n=new ji(r(t.geometry),a(t.material));break;case"Sprite":n=new Ni(a(t.material));break;case"Group":n=new Wi;break;default:n=new tt}if(n.uuid=t.uuid,void 0!==t.name&&(n.name=t.name),void 0!==t.matrix?(n.matrix.fromArray(t.matrix),void 0!==t.matrixAutoUpdate&&(n.matrixAutoUpdate=t.matrixAutoUpdate),n.matrixAutoUpdate&&n.matrix.decompose(n.position,n.quaternion,n.scale)):(void 0!==t.position&&n.position.fromArray(t.position),void 0!==t.rotation&&n.rotation.fromArray(t.rotation),void 0!==t.quaternion&&n.quaternion.fromArray(t.quaternion),void 0!==t.scale&&n.scale.fromArray(t.scale)),void 0!==t.castShadow&&(n.castShadow=t.castShadow),void 0!==t.receiveShadow&&(n.receiveShadow=t.receiveShadow),t.shadow&&(void 0!==t.shadow.bias&&(n.shadow.bias=t.shadow.bias),void 0!==t.shadow.radius&&(n.shadow.radius=t.shadow.radius),void 0!==t.shadow.mapSize&&n.shadow.mapSize.fromArray(t.shadow.mapSize),void 0!==t.shadow.camera&&(n.shadow.camera=this.parseObject(t.shadow.camera))),void 0!==t.visible&&(n.visible=t.visible),void 0!==t.frustumCulled&&(n.frustumCulled=t.frustumCulled),void 0!==t.renderOrder&&(n.renderOrder=t.renderOrder),void 0!==t.userData&&(n.userData=t.userData),void 0!==t.children)for(var c=t.children,h=0;h<c.length;h++)n.add(this.parseObject(c[h],e,i));if("LOD"===t.type)for(var l=t.levels,u=0;u<l.length;u++){var p=l[u],d=n.getObjectByProperty("uuid",p.object);void 0!==d&&n.addLevel(d,p.distance)}return n}});var Ca,Oa={UVMapping:300,CubeReflectionMapping:301,CubeRefractionMapping:302,EquirectangularReflectionMapping:303,EquirectangularRefractionMapping:304,SphericalReflectionMapping:305,CubeUVReflectionMapping:306,CubeUVRefractionMapping:307},Ia={RepeatWrapping:1e3,ClampToEdgeWrapping:1001,MirroredRepeatWrapping:1002},Na={NearestFilter:1003,NearestMipMapNearestFilter:1004,NearestMipMapLinearFilter:1005,LinearFilter:1006,LinearMipMapNearestFilter:1007,LinearMipMapLinearFilter:1008};function Da(t){"undefined"==typeof createImageBitmap&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),"undefined"==typeof fetch&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.manager=void 0!==t?t:br,this.options=void 0}function Ua(){this.type="ShapePath",this.color=new H,this.subPaths=[],this.currentPath=null}function za(t){this.type="Font",this.data=t}function Ba(t,e,i,n,r,a){var o=a.glyphs[t]||a.glyphs["?"];if(o){var s,c,h,l,u,p,d,f,m=new Ua;if(o.o)for(var g=o._cachedOutline||(o._cachedOutline=o.o.split(" ")),v=0,y=g.length;v<y;){switch(g[v++]){case"m":s=g[v++]*i+n,c=g[v++]*i+r,m.moveTo(s,c);break;case"l":s=g[v++]*i+n,c=g[v++]*i+r,m.lineTo(s,c);break;case"q":h=g[v++]*i+n,l=g[v++]*i+r,u=g[v++]*i+n,p=g[v++]*i+r,m.quadraticCurveTo(u,p,h,l);break;case"b":h=g[v++]*i+n,l=g[v++]*i+r,u=g[v++]*i+n,p=g[v++]*i+r,d=g[v++]*i+n,f=g[v++]*i+r,m.bezierCurveTo(u,p,d,f,h,l)}}return{offsetX:o.ha*i,path:m}}}Da.prototype={constructor:Da,setOptions:function(t){return this.options=t,this},load:function(t,e,i,n){void 0===t&&(t=""),void 0!==this.path&&(t=this.path+t),t=this.manager.resolveURL(t);var r=this,a=xr.get(t);if(void 0!==a)return r.manager.itemStart(t),setTimeout((function(){e&&e(a),r.manager.itemEnd(t)}),0),a;fetch(t).then((function(t){return t.blob()})).then((function(t){return createImageBitmap(t,r.options)})).then((function(i){xr.add(t,i),e&&e(i),r.manager.itemEnd(t)})).catch((function(e){n&&n(e),r.manager.itemEnd(t),r.manager.itemError(t)}))},setCrossOrigin:function(){return this},setPath:function(t){return this.path=t,this}},Object.assign(Ua.prototype,{moveTo:function(t,e){this.currentPath=new Zr,this.subPaths.push(this.currentPath),this.currentPath.moveTo(t,e)},lineTo:function(t,e){this.currentPath.lineTo(t,e)},quadraticCurveTo:function(t,e,i,n){this.currentPath.quadraticCurveTo(t,e,i,n)},bezierCurveTo:function(t,e,i,n,r,a){this.currentPath.bezierCurveTo(t,e,i,n,r,a)},splineThru:function(t){this.currentPath.splineThru(t)},toShapes:function(t,e){function i(t){for(var e=[],i=0,n=t.length;i<n;i++){var r=t[i],a=new Jr;a.curves=r.curves,e.push(a)}return e}function n(t,e){for(var i=e.length,n=!1,r=i-1,a=0;a<i;r=a++){var o=e[r],s=e[a],c=s.x-o.x,h=s.y-o.y;if(Math.abs(h)>Number.EPSILON){if(h<0&&(o=e[a],c=-c,s=e[r],h=-h),t.y<o.y||t.y>s.y)continue;if(t.y===o.y){if(t.x===o.x)return!0}else{var l=h*(t.x-o.x)-c*(t.y-o.y);if(0===l)return!0;if(l<0)continue;n=!n}}else{if(t.y!==o.y)continue;if(s.x<=t.x&&t.x<=o.x||o.x<=t.x&&t.x<=s.x)return!0}}return n}var r=zn.isClockWise,a=this.subPaths;if(0===a.length)return[];if(!0===e)return i(a);var o,s,c,h=[];if(1===a.length)return s=a[0],(c=new Jr).curves=s.curves,h.push(c),h;var l=!r(a[0].getPoints());l=t?!l:l;var u,p,d=[],f=[],m=[],g=0;f[g]=void 0,m[g]=[];for(var v=0,y=a.length;v<y;v++)o=r(u=(s=a[v]).getPoints()),(o=t?!o:o)?(!l&&f[g]&&g++,f[g]={s:new Jr,p:u},f[g].s.curves=s.curves,l&&g++,m[g]=[]):m[g].push({h:s,p:u[0]});if(!f[0])return i(a);if(f.length>1){for(var x=!1,_=[],b=0,w=f.length;b<w;b++)d[b]=[];for(b=0,w=f.length;b<w;b++)for(var M=m[b],E=0;E<M.length;E++){for(var T=M[E],S=!0,A=0;A<f.length;A++)n(T.p,f[A].p)&&(b!==A&&_.push({froms:b,tos:A,hole:E}),S?(S=!1,d[A].push(T)):x=!0);S&&d[b].push(T)}_.length>0&&(x||(m=d))}v=0;for(var R=f.length;v<R;v++){c=f[v].s,h.push(c);for(var L=0,P=(p=m[v]).length;L<P;L++)c.holes.push(p[L].h)}return h}}),Object.assign(za.prototype,{isFont:!0,generateShapes:function(t,e,i){void 0===e&&(e=100),void 0===i&&(i=4);for(var n=[],r=function(t,e,i,n){for(var r=Array.from?Array.from(t):String(t).split(""),a=e/n.resolution,o=(n.boundingBox.yMax-n.boundingBox.yMin+n.underlineThickness)*a,s=[],c=0,h=0,l=0;l<r.length;l++){var u=r[l];if("\n"===u)c=0,h-=o;else{var p=Ba(u,i,a,c,h,n);c+=p.offsetX,s.push(p.path)}}return s}(t,e,i,this.data),a=0,o=r.length;a<o;a++)Array.prototype.push.apply(n,r[a].toShapes());return n}}),Object.assign(function(t){this.manager=void 0!==t?t:br}.prototype,{load:function(t,e,i,n){var r=this,a=new Mr(this.manager);a.setPath(this.path),a.load(t,(function(t){var i;try{i=JSON.parse(t)}catch(e){console.warn("THREE.FontLoader: typeface.js support is being deprecated. Use typeface.json instead."),i=JSON.parse(t.substring(65,t.length-2))}var n=r.parse(i);e&&e(n)}),i,n)},parse:function(t){return new za(t)},setPath:function(t){return this.path=t,this}});var Fa,Ga,Ha,ka,Va,ja,Wa,Xa,qa,Ya,Za=function(){return void 0===Ca&&(Ca=new(window.AudioContext||window.webkitAudioContext)),Ca};function Ja(t){this.manager=void 0!==t?t:br}function Qa(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new Ti,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new Ti,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1}function Ka(t,e,i){tt.call(this),this.type="CubeCamera";var n=new Ti(90,1,t,e);n.up.set(0,-1,0),n.lookAt(new _(1,0,0)),this.add(n);var r=new Ti(90,1,t,e);r.up.set(0,-1,0),r.lookAt(new _(-1,0,0)),this.add(r);var a=new Ti(90,1,t,e);a.up.set(0,0,1),a.lookAt(new _(0,1,0)),this.add(a);var o=new Ti(90,1,t,e);o.up.set(0,0,-1),o.lookAt(new _(0,-1,0)),this.add(o);var s=new Ti(90,1,t,e);s.up.set(0,-1,0),s.lookAt(new _(0,0,1)),this.add(s);var c=new Ti(90,1,t,e);c.up.set(0,-1,0),c.lookAt(new _(0,0,-1)),this.add(c);var h={format:1022,magFilter:1006,minFilter:1006};this.renderTarget=new C(i,i,h),this.renderTarget.texture.name="CubeCamera",this.update=function(t,e){null===this.parent&&this.updateMatrixWorld();var i=this.renderTarget,h=i.texture.generateMipmaps;i.texture.generateMipmaps=!1,i.activeCubeFace=0,t.render(e,n,i),i.activeCubeFace=1,t.render(e,r,i),i.activeCubeFace=2,t.render(e,a,i),i.activeCubeFace=3,t.render(e,o,i),i.activeCubeFace=4,t.render(e,s,i),i.texture.generateMipmaps=h,i.activeCubeFace=5,t.render(e,c,i),t.setRenderTarget(null)},this.clear=function(t,e,i,n){for(var r=this.renderTarget,a=0;a<6;a++)r.activeCubeFace=a,t.setRenderTarget(r),t.clear(e,i,n);t.setRenderTarget(null)}}function $a(){tt.call(this),this.type="AudioListener",this.context=Za(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null}function to(t){tt.call(this),this.type="Audio",this.context=t.context,this.gain=this.context.createGain(),this.gain.connect(t.getInput()),this.autoplay=!1,this.buffer=null,this.loop=!1,this.startTime=0,this.offset=0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.sourceType="empty",this.filters=[]}function eo(t){to.call(this,t),this.panner=this.context.createPanner(),this.panner.connect(this.gain)}function io(t,e){this.analyser=t.context.createAnalyser(),this.analyser.fftSize=void 0!==e?e:2048,this.data=new Uint8Array(this.analyser.frequencyBinCount),t.getOutput().connect(this.analyser)}function no(t,e,i){this.binding=t,this.valueSize=i;var n,r=Float64Array;switch(e){case"quaternion":n=this._slerp;break;case"string":case"bool":r=Array,n=this._select;break;default:n=this._lerp}this.buffer=new r(4*i),this._mixBufferRegion=n,this.cumulativeWeight=0,this.useCount=0,this.referenceCount=0}Object.assign(Ja.prototype,{load:function(t,e,i,n){var r=new Mr(this.manager);r.setResponseType("arraybuffer"),r.load(t,(function(t){Za().decodeAudioData(t,(function(t){e(t)}))}),i,n)}}),Object.assign(Qa.prototype,{update:(qa=new y,Ya=new y,function(t){if(Fa!==this||Ga!==t.focus||Ha!==t.fov||ka!==t.aspect*this.aspect||Va!==t.near||ja!==t.far||Wa!==t.zoom||Xa!==this.eyeSep){Fa=this,Ga=t.focus,Ha=t.fov,ka=t.aspect*this.aspect,Va=t.near,ja=t.far,Wa=t.zoom;var e,i,n=t.projectionMatrix.clone(),r=(Xa=this.eyeSep/2)*Va/Ga,a=Va*Math.tan(g.DEG2RAD*Ha*.5)/Wa;Ya.elements[12]=-Xa,qa.elements[12]=Xa,e=-a*ka+r,i=a*ka+r,n.elements[0]=2*Va/(i-e),n.elements[8]=(i+e)/(i-e),this.cameraL.projectionMatrix.copy(n),e=-a*ka-r,i=a*ka-r,n.elements[0]=2*Va/(i-e),n.elements[8]=(i+e)/(i-e),this.cameraR.projectionMatrix.copy(n)}this.cameraL.matrixWorld.copy(t.matrixWorld).multiply(Ya),this.cameraR.matrixWorld.copy(t.matrixWorld).multiply(qa)})}),Ka.prototype=Object.create(tt.prototype),Ka.prototype.constructor=Ka,$a.prototype=Object.assign(Object.create(tt.prototype),{constructor:$a,getInput:function(){return this.gain},removeFilter:function(){null!==this.filter&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null)},getFilter:function(){return this.filter},setFilter:function(t){null!==this.filter?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination),this.filter=t,this.gain.connect(this.filter),this.filter.connect(this.context.destination)},getMasterVolume:function(){return this.gain.gain.value},setMasterVolume:function(t){this.gain.gain.setTargetAtTime(t,this.context.currentTime,.01)},updateMatrixWorld:function(){var t=new _,e=new x,i=new _,n=new _;return function(r){tt.prototype.updateMatrixWorld.call(this,r);var a=this.context.listener,o=this.up;this.matrixWorld.decompose(t,e,i),n.set(0,0,-1).applyQuaternion(e),a.positionX?(a.positionX.setValueAtTime(t.x,this.context.currentTime),a.positionY.setValueAtTime(t.y,this.context.currentTime),a.positionZ.setValueAtTime(t.z,this.context.currentTime),a.forwardX.setValueAtTime(n.x,this.context.currentTime),a.forwardY.setValueAtTime(n.y,this.context.currentTime),a.forwardZ.setValueAtTime(n.z,this.context.currentTime),a.upX.setValueAtTime(o.x,this.context.currentTime),a.upY.setValueAtTime(o.y,this.context.currentTime),a.upZ.setValueAtTime(o.z,this.context.currentTime)):(a.setPosition(t.x,t.y,t.z),a.setOrientation(n.x,n.y,n.z,o.x,o.y,o.z))}}()}),to.prototype=Object.assign(Object.create(tt.prototype),{constructor:to,getOutput:function(){return this.gain},setNodeSource:function(t){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=t,this.connect(),this},setMediaElementSource:function(t){return this.hasPlaybackControl=!1,this.sourceType="mediaNode",this.source=this.context.createMediaElementSource(t),this.connect(),this},setBuffer:function(t){return this.buffer=t,this.sourceType="buffer",this.autoplay&&this.play(),this},play:function(){if(!0!==this.isPlaying){if(!1!==this.hasPlaybackControl){var t=this.context.createBufferSource();return t.buffer=this.buffer,t.loop=this.loop,t.onended=this.onEnded.bind(this),t.playbackRate.setValueAtTime(this.playbackRate,this.startTime),this.startTime=this.context.currentTime,t.start(this.startTime,this.offset),this.isPlaying=!0,this.source=t,this.connect()}console.warn("THREE.Audio: this Audio has no playback control.")}else console.warn("THREE.Audio: Audio is already playing.")},pause:function(){if(!1!==this.hasPlaybackControl)return!0===this.isPlaying&&(this.source.stop(),this.offset+=(this.context.currentTime-this.startTime)*this.playbackRate,this.isPlaying=!1),this;console.warn("THREE.Audio: this Audio has no playback control.")},stop:function(){if(!1!==this.hasPlaybackControl)return this.source.stop(),this.offset=0,this.isPlaying=!1,this;console.warn("THREE.Audio: this Audio has no playback control.")},connect:function(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(var t=1,e=this.filters.length;t<e;t++)this.filters[t-1].connect(this.filters[t]);this.filters[this.filters.length-1].connect(this.getOutput())}else this.source.connect(this.getOutput());return this},disconnect:function(){if(this.filters.length>0){this.source.disconnect(this.filters[0]);for(var t=1,e=this.filters.length;t<e;t++)this.filters[t-1].disconnect(this.filters[t]);this.filters[this.filters.length-1].disconnect(this.getOutput())}else this.source.disconnect(this.getOutput());return this},getFilters:function(){return this.filters},setFilters:function(t){return t||(t=[]),!0===this.isPlaying?(this.disconnect(),this.filters=t,this.connect()):this.filters=t,this},getFilter:function(){return this.getFilters()[0]},setFilter:function(t){return this.setFilters(t?[t]:[])},setPlaybackRate:function(t){if(!1!==this.hasPlaybackControl)return this.playbackRate=t,!0===this.isPlaying&&this.source.playbackRate.setValueAtTime(this.playbackRate,this.context.currentTime),this;console.warn("THREE.Audio: this Audio has no playback control.")},getPlaybackRate:function(){return this.playbackRate},onEnded:function(){this.isPlaying=!1},getLoop:function(){return!1===this.hasPlaybackControl?(console.warn("THREE.Audio: this Audio has no playback control."),!1):this.loop},setLoop:function(t){if(!1!==this.hasPlaybackControl)return this.loop=t,!0===this.isPlaying&&(this.source.loop=this.loop),this;console.warn("THREE.Audio: this Audio has no playback control.")},getVolume:function(){return this.gain.gain.value},setVolume:function(t){return this.gain.gain.setTargetAtTime(t,this.context.currentTime,.01),this}}),eo.prototype=Object.assign(Object.create(to.prototype),{constructor:eo,getOutput:function(){return this.panner},getRefDistance:function(){return this.panner.refDistance},setRefDistance:function(t){this.panner.refDistance=t},getRolloffFactor:function(){return this.panner.rolloffFactor},setRolloffFactor:function(t){this.panner.rolloffFactor=t},getDistanceModel:function(){return this.panner.distanceModel},setDistanceModel:function(t){this.panner.distanceModel=t},getMaxDistance:function(){return this.panner.maxDistance},setMaxDistance:function(t){this.panner.maxDistance=t},updateMatrixWorld:function(){var t=new _;return function(e){tt.prototype.updateMatrixWorld.call(this,e),t.setFromMatrixPosition(this.matrixWorld),this.panner.setPosition(t.x,t.y,t.z)}}()}),Object.assign(io.prototype,{getFrequencyData:function(){return this.analyser.getByteFrequencyData(this.data),this.data},getAverageFrequency:function(){for(var t=0,e=this.getFrequencyData(),i=0;i<e.length;i++)t+=e[i];return t/e.length}}),Object.assign(no.prototype,{accumulate:function(t,e){var i=this.buffer,n=this.valueSize,r=t*n+n,a=this.cumulativeWeight;if(0===a){for(var o=0;o!==n;++o)i[r+o]=i[o];a=e}else{var s=e/(a+=e);this._mixBufferRegion(i,r,0,s,n)}this.cumulativeWeight=a},apply:function(t){var e=this.valueSize,i=this.buffer,n=t*e+e,r=this.cumulativeWeight,a=this.binding;if(this.cumulativeWeight=0,r<1){var o=3*e;this._mixBufferRegion(i,n,o,1-r,e)}for(var s=e,c=e+e;s!==c;++s)if(i[s]!==i[s+e]){a.setValue(i,n);break}},saveOriginalState:function(){var t=this.binding,e=this.buffer,i=this.valueSize,n=3*i;t.getValue(e,n);for(var r=i,a=n;r!==a;++r)e[r]=e[n+r%i];this.cumulativeWeight=0},restoreOriginalState:function(){var t=3*this.valueSize;this.binding.setValue(this.buffer,t)},_select:function(t,e,i,n,r){if(n>=.5)for(var a=0;a!==r;++a)t[e+a]=t[i+a]},_slerp:function(t,e,i,n){x.slerpFlat(t,e,t,e,t,i,n)},_lerp:function(t,e,i,n,r){for(var a=1-n,o=0;o!==r;++o){var s=e+o;t[s]=t[s]*a+t[i+o]*n}}});var ro,ao,oo,so,co,ho,lo,uo,po,fo,mo,go;function vo(t,e,i){var n=i||yo.parseTrackName(e);this._targetGroup=t,this._bindings=t.subscribe_(e,n)}function yo(t,e,i){this.path=e,this.parsedPath=i||yo.parseTrackName(e),this.node=yo.findNode(t,this.parsedPath.nodeName)||t,this.rootNode=t}function xo(t,e,i){this._mixer=t,this._clip=e,this._localRoot=i||null;for(var n=e.tracks,r=n.length,a=new Array(r),o={endingStart:2400,endingEnd:2400},s=0;s!==r;++s){var c=n[s].createInterpolant(null);a[s]=c,c.settings=o}this._interpolantSettings=o,this._interpolants=a,this._propertyBindings=new Array(r),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=2201,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}function _o(t){this._root=t,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}function bo(t){"string"==typeof t&&(console.warn("THREE.Uniform: Type parameter is no longer needed."),t=arguments[1]),this.value=t}function wo(){bt.call(this),this.type="InstancedBufferGeometry",this.maxInstancedCount=void 0}function Mo(t,e,i,n){this.data=t,this.itemSize=e,this.offset=i,this.normalized=!0===n}function Eo(t,e){this.array=t,this.stride=e,this.count=void 0!==t?t.length/e:0,this.dynamic=!1,this.updateRange={offset:0,count:-1},this.version=0}function To(t,e,i){Eo.call(this,t,e),this.meshPerAttribute=i||1}function So(t,e,i){ct.call(this,t,e),this.meshPerAttribute=i||1}function Ao(t,e){return t.distance-e.distance}function Ro(t,e,i,n){if(!1!==t.visible&&(t.raycast(e,i),!0===n))for(var r=t.children,a=0,o=r.length;a<o;a++)Ro(r[a],e,i,!0)}function Lo(t,e){this.min=void 0!==t?t:new v(1/0,1/0),this.max=void 0!==e?e:new v(-1/0,-1/0)}function Po(t){tt.call(this),this.material=t,this.render=function(){}}function Co(t,e,i,n){this.object=t,this.size=void 0!==e?e:1;var r=void 0!==i?i:16711680,a=void 0!==n?n:1,o=0,s=this.object.geometry;s&&s.isGeometry?o=3*s.faces.length:s&&s.isBufferGeometry&&(o=s.attributes.normal.count);var c=new bt,h=new gt(2*o*3,3);c.addAttribute("position",h),Hi.call(this,c,new Fi({color:r,linewidth:a})),this.matrixAutoUpdate=!1,this.update()}function Oo(t,e){tt.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=e;for(var i=new bt,n=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1],r=0,a=1;r<32;r++,a++){var o=r/32*Math.PI*2,s=a/32*Math.PI*2;n.push(Math.cos(o),Math.sin(o),1,Math.cos(s),Math.sin(s),1)}i.addAttribute("position",new gt(n,3));var c=new Fi({fog:!1});this.cone=new Hi(i,c),this.add(this.cone),this.update()}function Io(t){for(var e=function t(e){var i=[];e&&e.isBone&&i.push(e);for(var n=0;n<e.children.length;n++)i.push.apply(i,t(e.children[n]));return i}(t),i=new bt,n=[],r=[],a=new H(0,0,1),o=new H(0,1,0),s=0;s<e.length;s++){var c=e[s];c.parent&&c.parent.isBone&&(n.push(0,0,0),n.push(0,0,0),r.push(a.r,a.g,a.b),r.push(o.r,o.g,o.b))}i.addAttribute("position",new gt(n,3)),i.addAttribute("color",new gt(r,3));var h=new Fi({vertexColors:2,depthTest:!1,depthWrite:!1,transparent:!0});Hi.call(this,i,h),this.root=t,this.bones=e,this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1}function No(t,e,i){this.light=t,this.light.updateMatrixWorld(),this.color=i;var n=new qn(e,4,2),r=new Dt({wireframe:!0,fog:!1});Gt.call(this,n,r),this.matrix=this.light.matrixWorld,this.matrixAutoUpdate=!1,this.update()}function Do(t,e){tt.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=e;var i=new Fi({fog:!1}),n=new bt;n.addAttribute("position",new ct(new Float32Array(15),3)),this.line=new Gi(n,i),this.add(this.line),this.update()}function Uo(t,e,i){tt.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=i;var n=new rn(e);n.rotateY(.5*Math.PI),this.material=new Dt({wireframe:!0,fog:!1}),void 0===this.color&&(this.material.vertexColors=2);var r=n.getAttribute("position"),a=new Float32Array(3*r.count);n.addAttribute("color",new ct(a,3)),this.add(new Gt(n,this.material)),this.update()}function zo(t,e,i,n){t=t||10,e=e||10,i=new H(void 0!==i?i:4473924),n=new H(void 0!==n?n:8947848);for(var r=e/2,a=t/e,o=t/2,s=[],c=[],h=0,l=0,u=-o;h<=e;h++,u+=a){s.push(-o,0,u,o,0,u),s.push(u,0,-o,u,0,o);var p=h===r?i:n;p.toArray(c,l),l+=3,p.toArray(c,l),l+=3,p.toArray(c,l),l+=3,p.toArray(c,l),l+=3}var d=new bt;d.addAttribute("position",new gt(s,3)),d.addAttribute("color",new gt(c,3));var f=new Fi({vertexColors:2});Hi.call(this,d,f)}function Bo(t,e,i,n,r,a){t=t||10,e=e||16,i=i||8,n=n||64,r=new H(void 0!==r?r:4473924),a=new H(void 0!==a?a:8947848);var o,s,c,h,l,u,p,d=[],f=[];for(h=0;h<=e;h++)c=h/e*(2*Math.PI),o=Math.sin(c)*t,s=Math.cos(c)*t,d.push(0,0,0),d.push(o,0,s),p=1&h?r:a,f.push(p.r,p.g,p.b),f.push(p.r,p.g,p.b);for(h=0;h<=i;h++)for(p=1&h?r:a,u=t-t/i*h,l=0;l<n;l++)c=l/n*(2*Math.PI),o=Math.sin(c)*u,s=Math.cos(c)*u,d.push(o,0,s),f.push(p.r,p.g,p.b),c=(l+1)/n*(2*Math.PI),o=Math.sin(c)*u,s=Math.cos(c)*u,d.push(o,0,s),f.push(p.r,p.g,p.b);var m=new bt;m.addAttribute("position",new gt(d,3)),m.addAttribute("color",new gt(f,3));var g=new Fi({vertexColors:2});Hi.call(this,m,g)}function Fo(t,e,i,n){this.object=t,this.size=void 0!==e?e:1;var r=void 0!==i?i:16776960,a=void 0!==n?n:1,o=0,s=this.object.geometry;s&&s.isGeometry?o=s.faces.length:console.warn("THREE.FaceNormalsHelper: only THREE.Geometry is supported. Use THREE.VertexNormalsHelper, instead.");var c=new bt,h=new gt(2*o*3,3);c.addAttribute("position",h),Hi.call(this,c,new Fi({color:r,linewidth:a})),this.matrixAutoUpdate=!1,this.update()}function Go(t,e,i){tt.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=i,void 0===e&&(e=1);var n=new bt;n.addAttribute("position",new gt([-e,e,0,e,e,0,e,-e,0,-e,-e,0,-e,e,0],3));var r=new Fi({fog:!1});this.lightPlane=new Gi(n,r),this.add(this.lightPlane),(n=new bt).addAttribute("position",new gt([0,0,0,0,0,1],3)),this.targetLine=new Gi(n,r),this.add(this.targetLine),this.update()}function Ho(t){var e=new bt,i=new Fi({color:16777215,vertexColors:1}),n=[],r=[],a={},o=new H(16755200),s=new H(16711680),c=new H(43775),h=new H(16777215),l=new H(3355443);function u(t,e,i){p(t,i),p(e,i)}function p(t,e){n.push(0,0,0),r.push(e.r,e.g,e.b),void 0===a[t]&&(a[t]=[]),a[t].push(n.length/3-1)}u("n1","n2",o),u("n2","n4",o),u("n4","n3",o),u("n3","n1",o),u("f1","f2",o),u("f2","f4",o),u("f4","f3",o),u("f3","f1",o),u("n1","f1",o),u("n2","f2",o),u("n3","f3",o),u("n4","f4",o),u("p","n1",s),u("p","n2",s),u("p","n3",s),u("p","n4",s),u("u1","u2",c),u("u2","u3",c),u("u3","u1",c),u("c","t",h),u("p","c",l),u("cn1","cn2",l),u("cn3","cn4",l),u("cf1","cf2",l),u("cf3","cf4",l),e.addAttribute("position",new gt(n,3)),e.addAttribute("color",new gt(r,3)),Hi.call(this,e,i),this.camera=t,this.camera.updateProjectionMatrix&&this.camera.updateProjectionMatrix(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.pointMap=a,this.update()}function ko(t,e){this.object=t,void 0===e&&(e=16776960);var i=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),n=new Float32Array(24),r=new bt;r.setIndex(new ct(i,1)),r.addAttribute("position",new ct(n,3)),Hi.call(this,r,new Fi({color:e})),this.matrixAutoUpdate=!1,this.update()}function Vo(t,e){this.type="Box3Helper",this.box=t;var i=void 0!==e?e:16776960,n=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),r=new bt;r.setIndex(new ct(n,1)),r.addAttribute("position",new gt([1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1],3)),Hi.call(this,r,new Fi({color:i})),this.geometry.computeBoundingSphere()}function jo(t,e,i){this.type="PlaneHelper",this.plane=t,this.size=void 0===e?1:e;var n=void 0!==i?i:16776960,r=new bt;r.addAttribute("position",new gt([1,-1,1,-1,1,1,-1,-1,1,1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,1,0,0,1,0,0,0],3)),r.computeBoundingSphere(),Gi.call(this,r,new Fi({color:n}));var a=new bt;a.addAttribute("position",new gt([1,1,1,-1,1,1,-1,-1,1,1,1,1,-1,-1,1,1,-1,1],3)),a.computeBoundingSphere(),this.add(new Gt(a,new Dt({color:n,opacity:.2,transparent:!0,depthWrite:!1})))}function Wo(t,e,i,n,r,a){tt.call(this),void 0===n&&(n=16776960),void 0===i&&(i=1),void 0===r&&(r=.2*i),void 0===a&&(a=.2*r),void 0===po&&((po=new bt).addAttribute("position",new gt([0,0,0,0,1,0],3)),(fo=new nr(0,.5,1,5,1)).translate(0,-.5,0)),this.position.copy(e),this.line=new Gi(po,new Fi({color:n})),this.line.matrixAutoUpdate=!1,this.add(this.line),this.cone=new Gt(fo,new Dt({color:n})),this.cone.matrixAutoUpdate=!1,this.add(this.cone),this.setDirection(t),this.setLength(i,r,a)}function Xo(t){var e=[0,0,0,t=t||1,0,0,0,0,0,0,t,0,0,0,0,0,0,t],i=new bt;i.addAttribute("position",new gt(e,3)),i.addAttribute("color",new gt([1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],3));var n=new Fi({vertexColors:2});Hi.call(this,i,n)}Object.assign(vo.prototype,{getValue:function(t,e){this.bind();var i=this._targetGroup.nCachedObjects_,n=this._bindings[i];void 0!==n&&n.getValue(t,e)},setValue:function(t,e){for(var i=this._bindings,n=this._targetGroup.nCachedObjects_,r=i.length;n!==r;++n)i[n].setValue(t,e)},bind:function(){for(var t=this._bindings,e=this._targetGroup.nCachedObjects_,i=t.length;e!==i;++e)t[e].bind()},unbind:function(){for(var t=this._bindings,e=this._targetGroup.nCachedObjects_,i=t.length;e!==i;++e)t[e].unbind()}}),Object.assign(yo,{Composite:vo,create:function(t,e,i){return t&&t.isAnimationObjectGroup?new yo.Composite(t,e,i):new yo(t,e,i)},sanitizeNodeName:(uo=new RegExp("[\\[\\]\\.:\\/]","g"),function(t){return t.replace(/\s/g,"_").replace(uo,"")}),parseTrackName:(ro="[^"+"\\[\\]\\.:\\/".replace("\\.","")+"]",ao=/((?:WC+[\/:])*)/.source.replace("WC","[^\\[\\]\\.:\\/]"),oo=/(WCOD+)?/.source.replace("WCOD",ro),so=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC","[^\\[\\]\\.:\\/]"),co=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC","[^\\[\\]\\.:\\/]"),ho=new RegExp("^"+ao+oo+so+co+"$"),lo=["material","materials","bones"],function(t){var e=ho.exec(t);if(!e)throw new Error("PropertyBinding: Cannot parse trackName: "+t);var i={nodeName:e[2],objectName:e[3],objectIndex:e[4],propertyName:e[5],propertyIndex:e[6]},n=i.nodeName&&i.nodeName.lastIndexOf(".");if(void 0!==n&&-1!==n){var r=i.nodeName.substring(n+1);-1!==lo.indexOf(r)&&(i.nodeName=i.nodeName.substring(0,n),i.objectName=r)}if(null===i.propertyName||0===i.propertyName.length)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+t);return i}),findNode:function(t,e){if(!e||""===e||"root"===e||"."===e||-1===e||e===t.name||e===t.uuid)return t;if(t.skeleton){var i=t.skeleton.getBoneByName(e);if(void 0!==i)return i}if(t.children){var n=function(t){for(var i=0;i<t.length;i++){var r=t[i];if(r.name===e||r.uuid===e)return r;var a=n(r.children);if(a)return a}return null},r=n(t.children);if(r)return r}return null}}),Object.assign(yo.prototype,{_getValue_unavailable:function(){},_setValue_unavailable:function(){},BindingType:{Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3},Versioning:{None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2},GetterByBindingType:[function(t,e){t[e]=this.node[this.propertyName]},function(t,e){for(var i=this.resolvedProperty,n=0,r=i.length;n!==r;++n)t[e++]=i[n]},function(t,e){t[e]=this.resolvedProperty[this.propertyIndex]},function(t,e){this.resolvedProperty.toArray(t,e)}],SetterByBindingTypeAndVersioning:[[function(t,e){this.targetObject[this.propertyName]=t[e]},function(t,e){this.targetObject[this.propertyName]=t[e],this.targetObject.needsUpdate=!0},function(t,e){this.targetObject[this.propertyName]=t[e],this.targetObject.matrixWorldNeedsUpdate=!0}],[function(t,e){for(var i=this.resolvedProperty,n=0,r=i.length;n!==r;++n)i[n]=t[e++]},function(t,e){for(var i=this.resolvedProperty,n=0,r=i.length;n!==r;++n)i[n]=t[e++];this.targetObject.needsUpdate=!0},function(t,e){for(var i=this.resolvedProperty,n=0,r=i.length;n!==r;++n)i[n]=t[e++];this.targetObject.matrixWorldNeedsUpdate=!0}],[function(t,e){this.resolvedProperty[this.propertyIndex]=t[e]},function(t,e){this.resolvedProperty[this.propertyIndex]=t[e],this.targetObject.needsUpdate=!0},function(t,e){this.resolvedProperty[this.propertyIndex]=t[e],this.targetObject.matrixWorldNeedsUpdate=!0}],[function(t,e){this.resolvedProperty.fromArray(t,e)},function(t,e){this.resolvedProperty.fromArray(t,e),this.targetObject.needsUpdate=!0},function(t,e){this.resolvedProperty.fromArray(t,e),this.targetObject.matrixWorldNeedsUpdate=!0}]],getValue:function(t,e){this.bind(),this.getValue(t,e)},setValue:function(t,e){this.bind(),this.setValue(t,e)},bind:function(){var t=this.node,e=this.parsedPath,i=e.objectName,n=e.propertyName,r=e.propertyIndex;if(t||(t=yo.findNode(this.rootNode,e.nodeName)||this.rootNode,this.node=t),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,t){if(i){var a=e.objectIndex;switch(i){case"materials":if(!t.material)return void console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);if(!t.material.materials)return void console.error("THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",this);t=t.material.materials;break;case"bones":if(!t.skeleton)return void console.error("THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);t=t.skeleton.bones;for(var o=0;o<t.length;o++)if(t[o].name===a){a=o;break}break;default:if(void 0===t[i])return void console.error("THREE.PropertyBinding: Can not bind to objectName of node undefined.",this);t=t[i]}if(void 0!==a){if(void 0===t[a])return void console.error("THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,t);t=t[a]}}var s=t[n];if(void 0!==s){var c=this.Versioning.None;void 0!==t.needsUpdate?(c=this.Versioning.NeedsUpdate,this.targetObject=t):void 0!==t.matrixWorldNeedsUpdate&&(c=this.Versioning.MatrixWorldNeedsUpdate,this.targetObject=t);var h=this.BindingType.Direct;if(void 0!==r){if("morphTargetInfluences"===n){if(!t.geometry)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);if(t.geometry.isBufferGeometry){if(!t.geometry.morphAttributes)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);for(o=0;o<this.node.geometry.morphAttributes.position.length;o++)if(t.geometry.morphAttributes.position[o].name===r){r=o;break}}else{if(!t.geometry.morphTargets)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphTargets.",this);for(o=0;o<this.node.geometry.morphTargets.length;o++)if(t.geometry.morphTargets[o].name===r){r=o;break}}}h=this.BindingType.ArrayElement,this.resolvedProperty=s,this.propertyIndex=r}else void 0!==s.fromArray&&void 0!==s.toArray?(h=this.BindingType.HasFromToArray,this.resolvedProperty=s):Array.isArray(s)?(h=this.BindingType.EntireArray,this.resolvedProperty=s):this.propertyName=n;this.getValue=this.GetterByBindingType[h],this.setValue=this.SetterByBindingTypeAndVersioning[h][c]}else{var l=e.nodeName;console.error("THREE.PropertyBinding: Trying to update property for track: "+l+"."+n+" but it wasn't found.",t)}}else console.error("THREE.PropertyBinding: Trying to update node for track: "+this.path+" but it wasn't found.")},unbind:function(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}}),
//!\ DECLARE ALIAS AFTER assign prototype !
Object.assign(yo.prototype,{_getValue_unbound:yo.prototype.getValue,_setValue_unbound:yo.prototype.setValue}),Object.assign(function(){this.uuid=g.generateUUID(),this._objects=Array.prototype.slice.call(arguments),this.nCachedObjects_=0;var t={};this._indicesByUUID=t;for(var e=0,i=arguments.length;e!==i;++e)t[arguments[e].uuid]=e;this._paths=[],this._parsedPaths=[],this._bindings=[],this._bindingsIndicesByPath={};var n=this;this.stats={objects:{get total(){return n._objects.length},get inUse(){return this.total-n.nCachedObjects_}},get bindingsPerObject(){return n._bindings.length}}}.prototype,{isAnimationObjectGroup:!0,add:function(){for(var t=this._objects,e=t.length,i=this.nCachedObjects_,n=this._indicesByUUID,r=this._paths,a=this._parsedPaths,o=this._bindings,s=o.length,c=void 0,h=0,l=arguments.length;h!==l;++h){var u=arguments[h],p=u.uuid,d=n[p];if(void 0===d){d=e++,n[p]=d,t.push(u);for(var f=0,m=s;f!==m;++f)o[f].push(new yo(u,r[f],a[f]))}else if(d<i){c=t[d];var g=--i,v=t[g];n[v.uuid]=d,t[d]=v,n[p]=g,t[g]=u;for(f=0,m=s;f!==m;++f){var y=o[f],x=y[g],_=y[d];y[d]=x,void 0===_&&(_=new yo(u,r[f],a[f])),y[g]=_}}else t[d]!==c&&console.error("THREE.AnimationObjectGroup: Different objects with the same UUID detected. Clean the caches or recreate your infrastructure when reloading scenes.")}this.nCachedObjects_=i},remove:function(){for(var t=this._objects,e=this.nCachedObjects_,i=this._indicesByUUID,n=this._bindings,r=n.length,a=0,o=arguments.length;a!==o;++a){var s=arguments[a],c=s.uuid,h=i[c];if(void 0!==h&&h>=e){var l=e++,u=t[l];i[u.uuid]=h,t[h]=u,i[c]=l,t[l]=s;for(var p=0,d=r;p!==d;++p){var f=n[p],m=f[l],g=f[h];f[h]=m,f[l]=g}}}this.nCachedObjects_=e},uncache:function(){for(var t=this._objects,e=t.length,i=this.nCachedObjects_,n=this._indicesByUUID,r=this._bindings,a=r.length,o=0,s=arguments.length;o!==s;++o){var c=arguments[o],h=c.uuid,l=n[h];if(void 0!==l)if(delete n[h],l<i){var u=--i,p=t[u],d=t[y=--e];n[p.uuid]=l,t[l]=p,n[d.uuid]=u,t[u]=d,t.pop();for(var f=0,m=a;f!==m;++f){var g=(x=r[f])[u],v=x[y];x[l]=g,x[u]=v,x.pop()}}else{var y;n[(d=t[y=--e]).uuid]=l,t[l]=d,t.pop();for(f=0,m=a;f!==m;++f){var x;(x=r[f])[l]=x[y],x.pop()}}}this.nCachedObjects_=i},subscribe_:function(t,e){var i=this._bindingsIndicesByPath,n=i[t],r=this._bindings;if(void 0!==n)return r[n];var a=this._paths,o=this._parsedPaths,s=this._objects,c=s.length,h=this.nCachedObjects_,l=new Array(c);n=r.length,i[t]=n,a.push(t),o.push(e),r.push(l);for(var u=h,p=s.length;u!==p;++u){var d=s[u];l[u]=new yo(d,t,e)}return l},unsubscribe_:function(t){var e=this._bindingsIndicesByPath,i=e[t];if(void 0!==i){var n=this._paths,r=this._parsedPaths,a=this._bindings,o=a.length-1,s=a[o];e[t[o]]=i,a[i]=s,a.pop(),r[i]=r[o],r.pop(),n[i]=n[o],n.pop()}}}),Object.assign(xo.prototype,{play:function(){return this._mixer._activateAction(this),this},stop:function(){return this._mixer._deactivateAction(this),this.reset()},reset:function(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()},isRunning:function(){return this.enabled&&!this.paused&&0!==this.timeScale&&null===this._startTime&&this._mixer._isActiveAction(this)},isScheduled:function(){return this._mixer._isActiveAction(this)},startAt:function(t){return this._startTime=t,this},setLoop:function(t,e){return this.loop=t,this.repetitions=e,this},setEffectiveWeight:function(t){return this.weight=t,this._effectiveWeight=this.enabled?t:0,this.stopFading()},getEffectiveWeight:function(){return this._effectiveWeight},fadeIn:function(t){return this._scheduleFading(t,0,1)},fadeOut:function(t){return this._scheduleFading(t,1,0)},crossFadeFrom:function(t,e,i){if(t.fadeOut(e),this.fadeIn(e),i){var n=this._clip.duration,r=t._clip.duration,a=r/n,o=n/r;t.warp(1,a,e),this.warp(o,1,e)}return this},crossFadeTo:function(t,e,i){return t.crossFadeFrom(this,e,i)},stopFading:function(){var t=this._weightInterpolant;return null!==t&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(t)),this},setEffectiveTimeScale:function(t){return this.timeScale=t,this._effectiveTimeScale=this.paused?0:t,this.stopWarping()},getEffectiveTimeScale:function(){return this._effectiveTimeScale},setDuration:function(t){return this.timeScale=this._clip.duration/t,this.stopWarping()},syncWith:function(t){return this.time=t.time,this.timeScale=t.timeScale,this.stopWarping()},halt:function(t){return this.warp(this._effectiveTimeScale,0,t)},warp:function(t,e,i){var n=this._mixer,r=n.time,a=this._timeScaleInterpolant,o=this.timeScale;null===a&&(a=n._lendControlInterpolant(),this._timeScaleInterpolant=a);var s=a.parameterPositions,c=a.sampleValues;return s[0]=r,s[1]=r+i,c[0]=t/o,c[1]=e/o,this},stopWarping:function(){var t=this._timeScaleInterpolant;return null!==t&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(t)),this},getMixer:function(){return this._mixer},getClip:function(){return this._clip},getRoot:function(){return this._localRoot||this._mixer._root},_update:function(t,e,i,n){if(this.enabled){var r=this._startTime;if(null!==r){var a=(t-r)*i;if(a<0||0===i)return;this._startTime=null,e=i*a}e*=this._updateTimeScale(t);var o=this._updateTime(e),s=this._updateWeight(t);if(s>0)for(var c=this._interpolants,h=this._propertyBindings,l=0,u=c.length;l!==u;++l)c[l].evaluate(o),h[l].accumulate(n,s)}else this._updateWeight(t)},_updateWeight:function(t){var e=0;if(this.enabled){e=this.weight;var i=this._weightInterpolant;if(null!==i){var n=i.evaluate(t)[0];e*=n,t>i.parameterPositions[1]&&(this.stopFading(),0===n&&(this.enabled=!1))}}return this._effectiveWeight=e,e},_updateTimeScale:function(t){var e=0;if(!this.paused){e=this.timeScale;var i=this._timeScaleInterpolant;if(null!==i)e*=i.evaluate(t)[0],t>i.parameterPositions[1]&&(this.stopWarping(),0===e?this.paused=!0:this.timeScale=e)}return this._effectiveTimeScale=e,e},_updateTime:function(t){var e=this.time+t;if(0===t)return e;var i=this._clip.duration,n=this.loop,r=this._loopCount;if(2200===n){-1===r&&(this._loopCount=0,this._setEndings(!0,!0,!1));t:{if(e>=i)e=i;else{if(!(e<0))break t;e=0}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this._mixer.dispatchEvent({type:"finished",action:this,direction:t<0?-1:1})}}else{var a=2202===n;if(-1===r&&(t>=0?(r=0,this._setEndings(!0,0===this.repetitions,a)):this._setEndings(0===this.repetitions,!0,a)),e>=i||e<0){var o=Math.floor(e/i);e-=i*o,r+=Math.abs(o);var s=this.repetitions-r;if(s<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,e=t>0?i:0,this._mixer.dispatchEvent({type:"finished",action:this,direction:t>0?1:-1});else{if(1===s){var c=t<0;this._setEndings(c,!c,a)}else this._setEndings(!1,!1,a);this._loopCount=r,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:o})}}if(a&&1==(1&r))return this.time=e,i-e}return this.time=e,e},_setEndings:function(t,e,i){var n=this._interpolantSettings;i?(n.endingStart=2401,n.endingEnd=2401):(n.endingStart=t?this.zeroSlopeAtStart?2401:2400:2402,n.endingEnd=e?this.zeroSlopeAtEnd?2401:2400:2402)},_scheduleFading:function(t,e,i){var n=this._mixer,r=n.time,a=this._weightInterpolant;null===a&&(a=n._lendControlInterpolant(),this._weightInterpolant=a);var o=a.parameterPositions,s=a.sampleValues;return o[0]=r,s[0]=e,o[1]=r+t,s[1]=i,this}}),_o.prototype=Object.assign(Object.create(r.prototype),{constructor:_o,_bindAction:function(t,e){var i=t._localRoot||this._root,n=t._clip.tracks,r=n.length,a=t._propertyBindings,o=t._interpolants,s=i.uuid,c=this._bindingsByRootAndName,h=c[s];void 0===h&&(h={},c[s]=h);for(var l=0;l!==r;++l){var u=n[l],p=u.name,d=h[p];if(void 0!==d)a[l]=d;else{if(void 0!==(d=a[l])){null===d._cacheIndex&&(++d.referenceCount,this._addInactiveBinding(d,s,p));continue}var f=e&&e._propertyBindings[l].binding.parsedPath;++(d=new no(yo.create(i,p,f),u.ValueTypeName,u.getValueSize())).referenceCount,this._addInactiveBinding(d,s,p),a[l]=d}o[l].resultBuffer=d.buffer}},_activateAction:function(t){if(!this._isActiveAction(t)){if(null===t._cacheIndex){var e=(t._localRoot||this._root).uuid,i=t._clip.uuid,n=this._actionsByClip[i];this._bindAction(t,n&&n.knownActions[0]),this._addInactiveAction(t,i,e)}for(var r=t._propertyBindings,a=0,o=r.length;a!==o;++a){var s=r[a];0==s.useCount++&&(this._lendBinding(s),s.saveOriginalState())}this._lendAction(t)}},_deactivateAction:function(t){if(this._isActiveAction(t)){for(var e=t._propertyBindings,i=0,n=e.length;i!==n;++i){var r=e[i];0==--r.useCount&&(r.restoreOriginalState(),this._takeBackBinding(r))}this._takeBackAction(t)}},_initMemoryManager:function(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;var t=this;this.stats={actions:{get total(){return t._actions.length},get inUse(){return t._nActiveActions}},bindings:{get total(){return t._bindings.length},get inUse(){return t._nActiveBindings}},controlInterpolants:{get total(){return t._controlInterpolants.length},get inUse(){return t._nActiveControlInterpolants}}}},_isActiveAction:function(t){var e=t._cacheIndex;return null!==e&&e<this._nActiveActions},_addInactiveAction:function(t,e,i){var n=this._actions,r=this._actionsByClip,a=r[e];if(void 0===a)a={knownActions:[t],actionByRoot:{}},t._byClipCacheIndex=0,r[e]=a;else{var o=a.knownActions;t._byClipCacheIndex=o.length,o.push(t)}t._cacheIndex=n.length,n.push(t),a.actionByRoot[i]=t},_removeInactiveAction:function(t){var e=this._actions,i=e[e.length-1],n=t._cacheIndex;i._cacheIndex=n,e[n]=i,e.pop(),t._cacheIndex=null;var r=t._clip.uuid,a=this._actionsByClip,o=a[r],s=o.knownActions,c=s[s.length-1],h=t._byClipCacheIndex;c._byClipCacheIndex=h,s[h]=c,s.pop(),t._byClipCacheIndex=null,delete o.actionByRoot[(t._localRoot||this._root).uuid],0===s.length&&delete a[r],this._removeInactiveBindingsForAction(t)},_removeInactiveBindingsForAction:function(t){for(var e=t._propertyBindings,i=0,n=e.length;i!==n;++i){var r=e[i];0==--r.referenceCount&&this._removeInactiveBinding(r)}},_lendAction:function(t){var e=this._actions,i=t._cacheIndex,n=this._nActiveActions++,r=e[n];t._cacheIndex=n,e[n]=t,r._cacheIndex=i,e[i]=r},_takeBackAction:function(t){var e=this._actions,i=t._cacheIndex,n=--this._nActiveActions,r=e[n];t._cacheIndex=n,e[n]=t,r._cacheIndex=i,e[i]=r},_addInactiveBinding:function(t,e,i){var n=this._bindingsByRootAndName,r=n[e],a=this._bindings;void 0===r&&(r={},n[e]=r),r[i]=t,t._cacheIndex=a.length,a.push(t)},_removeInactiveBinding:function(t){var e=this._bindings,i=t.binding,n=i.rootNode.uuid,r=i.path,a=this._bindingsByRootAndName,o=a[n],s=e[e.length-1],c=t._cacheIndex;s._cacheIndex=c,e[c]=s,e.pop(),delete o[r];t:{for(var h in o)break t;delete a[n]}},_lendBinding:function(t){var e=this._bindings,i=t._cacheIndex,n=this._nActiveBindings++,r=e[n];t._cacheIndex=n,e[n]=t,r._cacheIndex=i,e[i]=r},_takeBackBinding:function(t){var e=this._bindings,i=t._cacheIndex,n=--this._nActiveBindings,r=e[n];t._cacheIndex=n,e[n]=t,r._cacheIndex=i,e[i]=r},_lendControlInterpolant:function(){var t=this._controlInterpolants,e=this._nActiveControlInterpolants++,i=t[e];return void 0===i&&((i=new ma(new Float32Array(2),new Float32Array(2),1,this._controlInterpolantsResultBuffer)).__cacheIndex=e,t[e]=i),i},_takeBackControlInterpolant:function(t){var e=this._controlInterpolants,i=t.__cacheIndex,n=--this._nActiveControlInterpolants,r=e[n];t.__cacheIndex=n,e[n]=t,r.__cacheIndex=i,e[i]=r},_controlInterpolantsResultBuffer:new Float32Array(1),clipAction:function(t,e){var i=e||this._root,n=i.uuid,r="string"==typeof t?_a.findByName(i,t):t,a=null!==r?r.uuid:t,o=this._actionsByClip[a],s=null;if(void 0!==o){var c=o.actionByRoot[n];if(void 0!==c)return c;s=o.knownActions[0],null===r&&(r=s._clip)}if(null===r)return null;var h=new xo(this,r,e);return this._bindAction(h,s),this._addInactiveAction(h,a,n),h},existingAction:function(t,e){var i=e||this._root,n=i.uuid,r="string"==typeof t?_a.findByName(i,t):t,a=r?r.uuid:t,o=this._actionsByClip[a];return void 0!==o&&o.actionByRoot[n]||null},stopAllAction:function(){var t=this._actions,e=this._nActiveActions,i=this._bindings,n=this._nActiveBindings;this._nActiveActions=0,this._nActiveBindings=0;for(var r=0;r!==e;++r)t[r].reset();for(r=0;r!==n;++r)i[r].useCount=0;return this},update:function(t){t*=this.timeScale;for(var e=this._actions,i=this._nActiveActions,n=this.time+=t,r=Math.sign(t),a=this._accuIndex^=1,o=0;o!==i;++o){e[o]._update(n,t,r,a)}var s=this._bindings,c=this._nActiveBindings;for(o=0;o!==c;++o)s[o].apply(a);return this},getRoot:function(){return this._root},uncacheClip:function(t){var e=this._actions,i=t.uuid,n=this._actionsByClip,r=n[i];if(void 0!==r){for(var a=r.knownActions,o=0,s=a.length;o!==s;++o){var c=a[o];this._deactivateAction(c);var h=c._cacheIndex,l=e[e.length-1];c._cacheIndex=null,c._byClipCacheIndex=null,l._cacheIndex=h,e[h]=l,e.pop(),this._removeInactiveBindingsForAction(c)}delete n[i]}},uncacheRoot:function(t){var e=t.uuid,i=this._actionsByClip;for(var n in i){var r=i[n].actionByRoot[e];void 0!==r&&(this._deactivateAction(r),this._removeInactiveAction(r))}var a=this._bindingsByRootAndName[e];if(void 0!==a)for(var o in a){var s=a[o];s.restoreOriginalState(),this._removeInactiveBinding(s)}},uncacheAction:function(t,e){var i=this.existingAction(t,e);null!==i&&(this._deactivateAction(i),this._removeInactiveAction(i))}}),bo.prototype.clone=function(){return new bo(void 0===this.value.clone?this.value:this.value.clone())},wo.prototype=Object.assign(Object.create(bt.prototype),{constructor:wo,isInstancedBufferGeometry:!0,copy:function(t){return bt.prototype.copy.call(this,t),this.maxInstancedCount=t.maxInstancedCount,this},clone:function(){return(new this.constructor).copy(this)}}),Object.defineProperties(Mo.prototype,{count:{get:function(){return this.data.count}},array:{get:function(){return this.data.array}}}),Object.assign(Mo.prototype,{isInterleavedBufferAttribute:!0,setX:function(t,e){return this.data.array[t*this.data.stride+this.offset]=e,this},setY:function(t,e){return this.data.array[t*this.data.stride+this.offset+1]=e,this},setZ:function(t,e){return this.data.array[t*this.data.stride+this.offset+2]=e,this},setW:function(t,e){return this.data.array[t*this.data.stride+this.offset+3]=e,this},getX:function(t){return this.data.array[t*this.data.stride+this.offset]},getY:function(t){return this.data.array[t*this.data.stride+this.offset+1]},getZ:function(t){return this.data.array[t*this.data.stride+this.offset+2]},getW:function(t){return this.data.array[t*this.data.stride+this.offset+3]},setXY:function(t,e,i){return t=t*this.data.stride+this.offset,this.data.array[t+0]=e,this.data.array[t+1]=i,this},setXYZ:function(t,e,i,n){return t=t*this.data.stride+this.offset,this.data.array[t+0]=e,this.data.array[t+1]=i,this.data.array[t+2]=n,this},setXYZW:function(t,e,i,n,r){return t=t*this.data.stride+this.offset,this.data.array[t+0]=e,this.data.array[t+1]=i,this.data.array[t+2]=n,this.data.array[t+3]=r,this}}),Object.defineProperty(Eo.prototype,"needsUpdate",{set:function(t){!0===t&&this.version++}}),Object.assign(Eo.prototype,{isInterleavedBuffer:!0,onUploadCallback:function(){},setArray:function(t){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");return this.count=void 0!==t?t.length/this.stride:0,this.array=t,this},setDynamic:function(t){return this.dynamic=t,this},copy:function(t){return this.array=new t.array.constructor(t.array),this.count=t.count,this.stride=t.stride,this.dynamic=t.dynamic,this},copyAt:function(t,e,i){t*=this.stride,i*=e.stride;for(var n=0,r=this.stride;n<r;n++)this.array[t+n]=e.array[i+n];return this},set:function(t,e){return void 0===e&&(e=0),this.array.set(t,e),this},clone:function(){return(new this.constructor).copy(this)},onUpload:function(t){return this.onUploadCallback=t,this}}),To.prototype=Object.assign(Object.create(Eo.prototype),{constructor:To,isInstancedInterleavedBuffer:!0,copy:function(t){return Eo.prototype.copy.call(this,t),this.meshPerAttribute=t.meshPerAttribute,this}}),So.prototype=Object.assign(Object.create(ct.prototype),{constructor:So,isInstancedBufferAttribute:!0,copy:function(t){return ct.prototype.copy.call(this,t),this.meshPerAttribute=t.meshPerAttribute,this}}),Object.assign(function(t,e,i,n){this.ray=new zt(t,e),this.near=i||0,this.far=n||1/0,this.params={Mesh:{},Line:{},LOD:{},Points:{threshold:1},Sprite:{}},Object.defineProperties(this.params,{PointCloud:{get:function(){return console.warn("THREE.Raycaster: params.PointCloud has been renamed to params.Points."),this.Points}}})}.prototype,{linePrecision:1,set:function(t,e){this.ray.set(t,e)},setFromCamera:function(t,e){e&&e.isPerspectiveCamera?(this.ray.origin.setFromMatrixPosition(e.matrixWorld),this.ray.direction.set(t.x,t.y,.5).unproject(e).sub(this.ray.origin).normalize()):e&&e.isOrthographicCamera?(this.ray.origin.set(t.x,t.y,(e.near+e.far)/(e.near-e.far)).unproject(e),this.ray.direction.set(0,0,-1).transformDirection(e.matrixWorld)):console.error("THREE.Raycaster: Unsupported camera type.")},intersectObject:function(t,e,i){var n=i||[];return Ro(t,this,n,e),n.sort(Ao),n},intersectObjects:function(t,e,i){var n=i||[];if(!1===Array.isArray(t))return console.warn("THREE.Raycaster.intersectObjects: objects is not an Array."),n;for(var r=0,a=t.length;r<a;r++)Ro(t[r],this,n,e);return n.sort(Ao),n}}),Object.assign(function(t){this.autoStart=void 0===t||t,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}.prototype,{start:function(){this.startTime=("undefined"==typeof performance?Date:performance).now(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0},stop:function(){this.getElapsedTime(),this.running=!1,this.autoStart=!1},getElapsedTime:function(){return this.getDelta(),this.elapsedTime},getDelta:function(){var t=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){var e=("undefined"==typeof performance?Date:performance).now();t=(e-this.oldTime)/1e3,this.oldTime=e,this.elapsedTime+=t}return t}}),Object.assign(function(t,e,i){return this.radius=void 0!==t?t:1,this.phi=void 0!==e?e:0,this.theta=void 0!==i?i:0,this}.prototype,{set:function(t,e,i){return this.radius=t,this.phi=e,this.theta=i,this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.radius=t.radius,this.phi=t.phi,this.theta=t.theta,this},makeSafe:function(){return this.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,this.phi)),this},setFromVector3:function(t){return this.radius=t.length(),0===this.radius?(this.theta=0,this.phi=0):(this.theta=Math.atan2(t.x,t.z),this.phi=Math.acos(g.clamp(t.y/this.radius,-1,1))),this}}),Object.assign(function(t,e,i){return this.radius=void 0!==t?t:1,this.theta=void 0!==e?e:0,this.y=void 0!==i?i:0,this}.prototype,{set:function(t,e,i){return this.radius=t,this.theta=e,this.y=i,this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.radius=t.radius,this.theta=t.theta,this.y=t.y,this},setFromVector3:function(t){return this.radius=Math.sqrt(t.x*t.x+t.z*t.z),this.theta=Math.atan2(t.x,t.z),this.y=t.y,this}}),Object.assign(Lo.prototype,{set:function(t,e){return this.min.copy(t),this.max.copy(e),this},setFromPoints:function(t){this.makeEmpty();for(var e=0,i=t.length;e<i;e++)this.expandByPoint(t[e]);return this},setFromCenterAndSize:function(){var t=new v;return function(e,i){var n=t.copy(i).multiplyScalar(.5);return this.min.copy(e).sub(n),this.max.copy(e).add(n),this}}(),clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.min.copy(t.min),this.max.copy(t.max),this},makeEmpty:function(){return this.min.x=this.min.y=1/0,this.max.x=this.max.y=-1/0,this},isEmpty:function(){return this.max.x<this.min.x||this.max.y<this.min.y},getCenter:function(t){return void 0===t&&(console.warn("THREE.Box2: .getCenter() target is now required"),t=new v),this.isEmpty()?t.set(0,0):t.addVectors(this.min,this.max).multiplyScalar(.5)},getSize:function(t){return void 0===t&&(console.warn("THREE.Box2: .getSize() target is now required"),t=new v),this.isEmpty()?t.set(0,0):t.subVectors(this.max,this.min)},expandByPoint:function(t){return this.min.min(t),this.max.max(t),this},expandByVector:function(t){return this.min.sub(t),this.max.add(t),this},expandByScalar:function(t){return this.min.addScalar(-t),this.max.addScalar(t),this},containsPoint:function(t){return!(t.x<this.min.x||t.x>this.max.x||t.y<this.min.y||t.y>this.max.y)},containsBox:function(t){return this.min.x<=t.min.x&&t.max.x<=this.max.x&&this.min.y<=t.min.y&&t.max.y<=this.max.y},getParameter:function(t,e){return void 0===e&&(console.warn("THREE.Box2: .getParameter() target is now required"),e=new v),e.set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y))},intersectsBox:function(t){return!(t.max.x<this.min.x||t.min.x>this.max.x||t.max.y<this.min.y||t.min.y>this.max.y)},clampPoint:function(t,e){return void 0===e&&(console.warn("THREE.Box2: .clampPoint() target is now required"),e=new v),e.copy(t).clamp(this.min,this.max)},distanceToPoint:function(){var t=new v;return function(e){return t.copy(e).clamp(this.min,this.max).sub(e).length()}}(),intersect:function(t){return this.min.max(t.min),this.max.min(t.max),this},union:function(t){return this.min.min(t.min),this.max.max(t.max),this},translate:function(t){return this.min.add(t),this.max.add(t),this},equals:function(t){return t.min.equals(this.min)&&t.max.equals(this.max)}}),Po.prototype=Object.create(tt.prototype),Po.prototype.constructor=Po,Po.prototype.isImmediateRenderObject=!0,Co.prototype=Object.create(Hi.prototype),Co.prototype.constructor=Co,Co.prototype.update=function(){var t=new _,e=new _,i=new b;return function(){var n=["a","b","c"];this.object.updateMatrixWorld(!0),i.getNormalMatrix(this.object.matrixWorld);var r=this.object.matrixWorld,a=this.geometry.attributes.position,o=this.object.geometry;if(o&&o.isGeometry)for(var s=o.vertices,c=o.faces,h=0,l=0,u=c.length;l<u;l++)for(var p=c[l],d=0,f=p.vertexNormals.length;d<f;d++){var m=s[p[n[d]]],g=p.vertexNormals[d];t.copy(m).applyMatrix4(r),e.copy(g).applyMatrix3(i).normalize().multiplyScalar(this.size).add(t),a.setXYZ(h,t.x,t.y,t.z),h+=1,a.setXYZ(h,e.x,e.y,e.z),h+=1}else if(o&&o.isBufferGeometry){var v=o.attributes.position,y=o.attributes.normal;for(h=0,d=0,f=v.count;d<f;d++)t.set(v.getX(d),v.getY(d),v.getZ(d)).applyMatrix4(r),e.set(y.getX(d),y.getY(d),y.getZ(d)),e.applyMatrix3(i).normalize().multiplyScalar(this.size).add(t),a.setXYZ(h,t.x,t.y,t.z),h+=1,a.setXYZ(h,e.x,e.y,e.z),h+=1}a.needsUpdate=!0}}(),Oo.prototype=Object.create(tt.prototype),Oo.prototype.constructor=Oo,Oo.prototype.dispose=function(){this.cone.geometry.dispose(),this.cone.material.dispose()},Oo.prototype.update=function(){var t=new _,e=new _;return function(){this.light.updateMatrixWorld();var i=this.light.distance?this.light.distance:1e3,n=i*Math.tan(this.light.angle);this.cone.scale.set(n,n,i),t.setFromMatrixPosition(this.light.matrixWorld),e.setFromMatrixPosition(this.light.target.matrixWorld),this.cone.lookAt(e.sub(t)),void 0!==this.color?this.cone.material.color.set(this.color):this.cone.material.color.copy(this.light.color)}}(),Io.prototype=Object.create(Hi.prototype),Io.prototype.constructor=Io,Io.prototype.updateMatrixWorld=function(){var t=new _,e=new y,i=new y;return function(n){var r=this.bones,a=this.geometry,o=a.getAttribute("position");i.getInverse(this.root.matrixWorld);for(var s=0,c=0;s<r.length;s++){var h=r[s];h.parent&&h.parent.isBone&&(e.multiplyMatrices(i,h.matrixWorld),t.setFromMatrixPosition(e),o.setXYZ(c,t.x,t.y,t.z),e.multiplyMatrices(i,h.parent.matrixWorld),t.setFromMatrixPosition(e),o.setXYZ(c+1,t.x,t.y,t.z),c+=2)}a.getAttribute("position").needsUpdate=!0,tt.prototype.updateMatrixWorld.call(this,n)}}(),No.prototype=Object.create(Gt.prototype),No.prototype.constructor=No,No.prototype.dispose=function(){this.geometry.dispose(),this.material.dispose()},No.prototype.update=function(){void 0!==this.color?this.material.color.set(this.color):this.material.color.copy(this.light.color)},Do.prototype=Object.create(tt.prototype),Do.prototype.constructor=Do,Do.prototype.dispose=function(){this.children[0].geometry.dispose(),this.children[0].material.dispose()},Do.prototype.update=function(){var t=.5*this.light.width,e=.5*this.light.height,i=this.line.geometry.attributes.position,n=i.array;n[0]=t,n[1]=-e,n[2]=0,n[3]=t,n[4]=e,n[5]=0,n[6]=-t,n[7]=e,n[8]=0,n[9]=-t,n[10]=-e,n[11]=0,n[12]=t,n[13]=-e,n[14]=0,i.needsUpdate=!0,void 0!==this.color?this.line.material.color.set(this.color):this.line.material.color.copy(this.light.color)},Uo.prototype=Object.create(tt.prototype),Uo.prototype.constructor=Uo,Uo.prototype.dispose=function(){this.children[0].geometry.dispose(),this.children[0].material.dispose()},Uo.prototype.update=function(){var t=new _,e=new H,i=new H;return function(){var n=this.children[0];if(void 0!==this.color)this.material.color.set(this.color);else{var r=n.geometry.getAttribute("color");e.copy(this.light.color),i.copy(this.light.groundColor);for(var a=0,o=r.count;a<o;a++){var s=a<o/2?e:i;r.setXYZ(a,s.r,s.g,s.b)}r.needsUpdate=!0}n.lookAt(t.setFromMatrixPosition(this.light.matrixWorld).negate())}}(),zo.prototype=Object.create(Hi.prototype),zo.prototype.constructor=zo,Bo.prototype=Object.create(Hi.prototype),Bo.prototype.constructor=Bo,Fo.prototype=Object.create(Hi.prototype),Fo.prototype.constructor=Fo,Fo.prototype.update=function(){var t=new _,e=new _,i=new b;return function(){this.object.updateMatrixWorld(!0),i.getNormalMatrix(this.object.matrixWorld);for(var n=this.object.matrixWorld,r=this.geometry.attributes.position,a=this.object.geometry,o=a.vertices,s=a.faces,c=0,h=0,l=s.length;h<l;h++){var u=s[h],p=u.normal;t.copy(o[u.a]).add(o[u.b]).add(o[u.c]).divideScalar(3).applyMatrix4(n),e.copy(p).applyMatrix3(i).normalize().multiplyScalar(this.size).add(t),r.setXYZ(c,t.x,t.y,t.z),c+=1,r.setXYZ(c,e.x,e.y,e.z),c+=1}r.needsUpdate=!0}}(),Go.prototype=Object.create(tt.prototype),Go.prototype.constructor=Go,Go.prototype.dispose=function(){this.lightPlane.geometry.dispose(),this.lightPlane.material.dispose(),this.targetLine.geometry.dispose(),this.targetLine.material.dispose()},Go.prototype.update=function(){var t=new _,e=new _,i=new _;return function(){t.setFromMatrixPosition(this.light.matrixWorld),e.setFromMatrixPosition(this.light.target.matrixWorld),i.subVectors(e,t),this.lightPlane.lookAt(i),void 0!==this.color?(this.lightPlane.material.color.set(this.color),this.targetLine.material.color.set(this.color)):(this.lightPlane.material.color.copy(this.light.color),this.targetLine.material.color.copy(this.light.color)),this.targetLine.lookAt(i),this.targetLine.scale.z=i.length()}}(),Ho.prototype=Object.create(Hi.prototype),Ho.prototype.constructor=Ho,Ho.prototype.update=function(){var t,e,i=new _,n=new et;function r(r,a,o,s){i.set(a,o,s).unproject(n);var c=e[r];if(void 0!==c)for(var h=t.getAttribute("position"),l=0,u=c.length;l<u;l++)h.setXYZ(c[l],i.x,i.y,i.z)}return function(){t=this.geometry,e=this.pointMap;n.projectionMatrix.copy(this.camera.projectionMatrix),r("c",0,0,-1),r("t",0,0,1),r("n1",-1,-1,-1),r("n2",1,-1,-1),r("n3",-1,1,-1),r("n4",1,1,-1),r("f1",-1,-1,1),r("f2",1,-1,1),r("f3",-1,1,1),r("f4",1,1,1),r("u1",.7,1.1,-1),r("u2",-.7,1.1,-1),r("u3",0,2,-1),r("cf1",-1,0,1),r("cf2",1,0,1),r("cf3",0,-1,1),r("cf4",0,1,1),r("cn1",-1,0,-1),r("cn2",1,0,-1),r("cn3",0,-1,-1),r("cn4",0,1,-1),t.getAttribute("position").needsUpdate=!0}}(),ko.prototype=Object.create(Hi.prototype),ko.prototype.constructor=ko,ko.prototype.update=function(){var t=new I;return function(e){if(void 0!==e&&console.warn("THREE.BoxHelper: .update() has no longer arguments."),void 0!==this.object&&t.setFromObject(this.object),!t.isEmpty()){var i=t.min,n=t.max,r=this.geometry.attributes.position,a=r.array;a[0]=n.x,a[1]=n.y,a[2]=n.z,a[3]=i.x,a[4]=n.y,a[5]=n.z,a[6]=i.x,a[7]=i.y,a[8]=n.z,a[9]=n.x,a[10]=i.y,a[11]=n.z,a[12]=n.x,a[13]=n.y,a[14]=i.z,a[15]=i.x,a[16]=n.y,a[17]=i.z,a[18]=i.x,a[19]=i.y,a[20]=i.z,a[21]=n.x,a[22]=i.y,a[23]=i.z,r.needsUpdate=!0,this.geometry.computeBoundingSphere()}}}(),ko.prototype.setFromObject=function(t){return this.object=t,this.update(),this},Vo.prototype=Object.create(Hi.prototype),Vo.prototype.constructor=Vo,Vo.prototype.updateMatrixWorld=function(t){var e=this.box;e.isEmpty()||(e.getCenter(this.position),e.getSize(this.scale),this.scale.multiplyScalar(.5),tt.prototype.updateMatrixWorld.call(this,t))},jo.prototype=Object.create(Gi.prototype),jo.prototype.constructor=jo,jo.prototype.updateMatrixWorld=function(t){var e=-this.plane.constant;Math.abs(e)<1e-8&&(e=1e-8),this.scale.set(.5*this.size,.5*this.size,e),this.children[0].material.side=e<0?1:0,this.lookAt(this.plane.normal),tt.prototype.updateMatrixWorld.call(this,t)},Wo.prototype=Object.create(tt.prototype),Wo.prototype.constructor=Wo,Wo.prototype.setDirection=(go=new _,function(t){t.y>.99999?this.quaternion.set(0,0,0,1):t.y<-.99999?this.quaternion.set(1,0,0,0):(go.set(t.z,0,-t.x).normalize(),mo=Math.acos(t.y),this.quaternion.setFromAxisAngle(go,mo))}),Wo.prototype.setLength=function(t,e,i){void 0===e&&(e=.2*t),void 0===i&&(i=.2*e),this.line.scale.set(1,Math.max(0,t-e),1),this.line.updateMatrix(),this.cone.scale.set(i,e,i),this.cone.position.y=t,this.cone.updateMatrix()},Wo.prototype.setColor=function(t){this.line.material.color.copy(t),this.cone.material.color.copy(t)},Xo.prototype=Object.create(Hi.prototype),Xo.prototype.constructor=Xo;function qo(t){console.warn("THREE.Spline has been removed. Use THREE.CatmullRomCurve3 instead."),Ur.call(this,t),this.type="catmullrom"}Rr.create=function(t,e){return console.log("THREE.Curve.create() has been deprecated"),t.prototype=Object.create(Rr.prototype),t.prototype.constructor=t,t.prototype.getPoint=e,t},Object.assign(Yr.prototype,{createPointsGeometry:function(t){console.warn("THREE.CurvePath: .createPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");var e=this.getPoints(t);return this.createGeometry(e)},createSpacedPointsGeometry:function(t){console.warn("THREE.CurvePath: .createSpacedPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");var e=this.getSpacedPoints(t);return this.createGeometry(e)},createGeometry:function(t){console.warn("THREE.CurvePath: .createGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");for(var e=new st,i=0,n=t.length;i<n;i++){var r=t[i];e.vertices.push(new _(r.x,r.y,r.z||0))}return e}}),Object.assign(Zr.prototype,{fromPoints:function(t){console.warn("THREE.Path: .fromPoints() has been renamed to .setFromPoints()."),this.setFromPoints(t)}}),Object.create(Ur.prototype),Object.create(Ur.prototype),qo.prototype=Object.create(Ur.prototype),Object.assign(qo.prototype,{initFromArray:function(){console.error("THREE.Spline: .initFromArray() has been removed.")},getControlPointsArray:function(){console.error("THREE.Spline: .getControlPointsArray() has been removed.")},reparametrizeByArcLength:function(){console.error("THREE.Spline: .reparametrizeByArcLength() has been removed.")}}),zo.prototype.setColors=function(){console.error("THREE.GridHelper: setColors() has been deprecated, pass them in the constructor instead.")},Io.prototype.update=function(){console.error("THREE.SkeletonHelper: update() no longer needs to be called.")},Object.assign(Ra.prototype,{extractUrlBase:function(t){return console.warn("THREE.Loader: .extractUrlBase() has been deprecated. Use THREE.LoaderUtils.extractUrlBase() instead."),La(t)}}),Object.assign(Lo.prototype,{center:function(t){return console.warn("THREE.Box2: .center() has been renamed to .getCenter()."),this.getCenter(t)},empty:function(){return console.warn("THREE.Box2: .empty() has been renamed to .isEmpty()."),this.isEmpty()},isIntersectionBox:function(t){return console.warn("THREE.Box2: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(t)},size:function(t){return console.warn("THREE.Box2: .size() has been renamed to .getSize()."),this.getSize(t)}}),Object.assign(I.prototype,{center:function(t){return console.warn("THREE.Box3: .center() has been renamed to .getCenter()."),this.getCenter(t)},empty:function(){return console.warn("THREE.Box3: .empty() has been renamed to .isEmpty()."),this.isEmpty()},isIntersectionBox:function(t){return console.warn("THREE.Box3: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(t)},isIntersectionSphere:function(t){return console.warn("THREE.Box3: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(t)},size:function(t){return console.warn("THREE.Box3: .size() has been renamed to .getSize()."),this.getSize(t)}}),Bt.prototype.center=function(t){return console.warn("THREE.Line3: .center() has been renamed to .getCenter()."),this.getCenter(t)},Object.assign(g,{random16:function(){return console.warn("THREE.Math: .random16() has been deprecated. Use Math.random() instead."),Math.random()},nearestPowerOfTwo:function(t){return console.warn("THREE.Math: .nearestPowerOfTwo() has been renamed to .floorPowerOfTwo()."),g.floorPowerOfTwo(t)},nextPowerOfTwo:function(t){return console.warn("THREE.Math: .nextPowerOfTwo() has been renamed to .ceilPowerOfTwo()."),g.ceilPowerOfTwo(t)}}),Object.assign(b.prototype,{flattenToArrayOffset:function(t,e){return console.warn("THREE.Matrix3: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(t,e)},multiplyVector3:function(t){return console.warn("THREE.Matrix3: .multiplyVector3() has been removed. Use vector.applyMatrix3( matrix ) instead."),t.applyMatrix3(this)},multiplyVector3Array:function(){console.error("THREE.Matrix3: .multiplyVector3Array() has been removed.")},applyToBuffer:function(t){return console.warn("THREE.Matrix3: .applyToBuffer() has been removed. Use matrix.applyToBufferAttribute( attribute ) instead."),this.applyToBufferAttribute(t)},applyToVector3Array:function(){console.error("THREE.Matrix3: .applyToVector3Array() has been removed.")}}),Object.assign(y.prototype,{extractPosition:function(t){return console.warn("THREE.Matrix4: .extractPosition() has been renamed to .copyPosition()."),this.copyPosition(t)},flattenToArrayOffset:function(t,e){return console.warn("THREE.Matrix4: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(t,e)},getPosition:function(){var t;return function(){return void 0===t&&(t=new _),console.warn("THREE.Matrix4: .getPosition() has been removed. Use Vector3.setFromMatrixPosition( matrix ) instead."),t.setFromMatrixColumn(this,3)}}(),setRotationFromQuaternion:function(t){return console.warn("THREE.Matrix4: .setRotationFromQuaternion() has been renamed to .makeRotationFromQuaternion()."),this.makeRotationFromQuaternion(t)},multiplyToArray:function(){console.warn("THREE.Matrix4: .multiplyToArray() has been removed.")},multiplyVector3:function(t){return console.warn("THREE.Matrix4: .multiplyVector3() has been removed. Use vector.applyMatrix4( matrix ) instead."),t.applyMatrix4(this)},multiplyVector4:function(t){return console.warn("THREE.Matrix4: .multiplyVector4() has been removed. Use vector.applyMatrix4( matrix ) instead."),t.applyMatrix4(this)},multiplyVector3Array:function(){console.error("THREE.Matrix4: .multiplyVector3Array() has been removed.")},rotateAxis:function(t){console.warn("THREE.Matrix4: .rotateAxis() has been removed. Use Vector3.transformDirection( matrix ) instead."),t.transformDirection(this)},crossVector:function(t){return console.warn("THREE.Matrix4: .crossVector() has been removed. Use vector.applyMatrix4( matrix ) instead."),t.applyMatrix4(this)},translate:function(){console.error("THREE.Matrix4: .translate() has been removed.")},rotateX:function(){console.error("THREE.Matrix4: .rotateX() has been removed.")},rotateY:function(){console.error("THREE.Matrix4: .rotateY() has been removed.")},rotateZ:function(){console.error("THREE.Matrix4: .rotateZ() has been removed.")},rotateByAxis:function(){console.error("THREE.Matrix4: .rotateByAxis() has been removed.")},applyToBuffer:function(t){return console.warn("THREE.Matrix4: .applyToBuffer() has been removed. Use matrix.applyToBufferAttribute( attribute ) instead."),this.applyToBufferAttribute(t)},applyToVector3Array:function(){console.error("THREE.Matrix4: .applyToVector3Array() has been removed.")},makeFrustum:function(t,e,i,n,r,a){return console.warn("THREE.Matrix4: .makeFrustum() has been removed. Use .makePerspective( left, right, top, bottom, near, far ) instead."),this.makePerspective(t,e,n,i,r,a)}}),D.prototype.isIntersectionLine=function(t){return console.warn("THREE.Plane: .isIntersectionLine() has been renamed to .intersectsLine()."),this.intersectsLine(t)},x.prototype.multiplyVector3=function(t){return console.warn("THREE.Quaternion: .multiplyVector3() has been removed. Use is now vector.applyQuaternion( quaternion ) instead."),t.applyQuaternion(this)},Object.assign(zt.prototype,{isIntersectionBox:function(t){return console.warn("THREE.Ray: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(t)},isIntersectionPlane:function(t){return console.warn("THREE.Ray: .isIntersectionPlane() has been renamed to .intersectsPlane()."),this.intersectsPlane(t)},isIntersectionSphere:function(t){return console.warn("THREE.Ray: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(t)}}),Object.assign(Ft.prototype,{area:function(){return console.warn("THREE.Triangle: .area() has been renamed to .getArea()."),this.getArea()},barycoordFromPoint:function(t,e){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),this.getBarycoord(t,e)},midpoint:function(t){return console.warn("THREE.Triangle: .midpoint() has been renamed to .getMidpoint()."),this.getMidpoint(t)},normal:function(t){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),this.getNormal(t)},plane:function(t){return console.warn("THREE.Triangle: .plane() has been renamed to .getPlane()."),this.getPlane(t)}}),Object.assign(Ft,{barycoordFromPoint:function(t,e,i,n,r){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),Ft.getBarycoord(t,e,i,n,r)},normal:function(t,e,i,n){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),Ft.getNormal(t,e,i,n)}}),Object.assign(Jr.prototype,{extractAllPoints:function(t){return console.warn("THREE.Shape: .extractAllPoints() has been removed. Use .extractPoints() instead."),this.extractPoints(t)},extrude:function(t){return console.warn("THREE.Shape: .extrude() has been removed. Use ExtrudeGeometry() instead."),new Gn(this,t)},makeGeometry:function(t){return console.warn("THREE.Shape: .makeGeometry() has been removed. Use ShapeGeometry() instead."),new Kn(this,t)}}),Object.assign(v.prototype,{fromAttribute:function(t,e,i){return console.warn("THREE.Vector2: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(t,e,i)},distanceToManhattan:function(t){return console.warn("THREE.Vector2: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(t)},lengthManhattan:function(){return console.warn("THREE.Vector2: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()}}),Object.assign(_.prototype,{setEulerFromRotationMatrix:function(){console.error("THREE.Vector3: .setEulerFromRotationMatrix() has been removed. Use Euler.setFromRotationMatrix() instead.")},setEulerFromQuaternion:function(){console.error("THREE.Vector3: .setEulerFromQuaternion() has been removed. Use Euler.setFromQuaternion() instead.")},getPositionFromMatrix:function(t){return console.warn("THREE.Vector3: .getPositionFromMatrix() has been renamed to .setFromMatrixPosition()."),this.setFromMatrixPosition(t)},getScaleFromMatrix:function(t){return console.warn("THREE.Vector3: .getScaleFromMatrix() has been renamed to .setFromMatrixScale()."),this.setFromMatrixScale(t)},getColumnFromMatrix:function(t,e){return console.warn("THREE.Vector3: .getColumnFromMatrix() has been renamed to .setFromMatrixColumn()."),this.setFromMatrixColumn(e,t)},applyProjection:function(t){return console.warn("THREE.Vector3: .applyProjection() has been removed. Use .applyMatrix4( m ) instead."),this.applyMatrix4(t)},fromAttribute:function(t,e,i){return console.warn("THREE.Vector3: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(t,e,i)},distanceToManhattan:function(t){return console.warn("THREE.Vector3: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(t)},lengthManhattan:function(){return console.warn("THREE.Vector3: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()}}),Object.assign(L.prototype,{fromAttribute:function(t,e,i){return console.warn("THREE.Vector4: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(t,e,i)},lengthManhattan:function(){return console.warn("THREE.Vector4: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()}}),Object.assign(st.prototype,{computeTangents:function(){console.error("THREE.Geometry: .computeTangents() has been removed.")},computeLineDistances:function(){console.error("THREE.Geometry: .computeLineDistances() has been removed. Use THREE.Line.computeLineDistances() instead.")}}),Object.assign(tt.prototype,{getChildByName:function(t){return console.warn("THREE.Object3D: .getChildByName() has been renamed to .getObjectByName()."),this.getObjectByName(t)},renderDepth:function(){console.warn("THREE.Object3D: .renderDepth has been removed. Use .renderOrder, instead.")},translate:function(t,e){return console.warn("THREE.Object3D: .translate() has been removed. Use .translateOnAxis( axis, distance ) instead."),this.translateOnAxis(e,t)},getWorldRotation:function(){console.error("THREE.Object3D: .getWorldRotation() has been removed. Use THREE.Object3D.getWorldQuaternion( target ) instead.")}}),Object.defineProperties(tt.prototype,{eulerOrder:{get:function(){return console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order},set:function(t){console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order=t}},useQuaternion:{get:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")},set:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")}}}),Object.defineProperties(Di.prototype,{objects:{get:function(){return console.warn("THREE.LOD: .objects has been renamed to .levels."),this.levels}}}),Object.defineProperty(Ui.prototype,"useVertexTexture",{get:function(){console.warn("THREE.Skeleton: useVertexTexture has been removed.")},set:function(){console.warn("THREE.Skeleton: useVertexTexture has been removed.")}}),Object.defineProperty(Rr.prototype,"__arcLengthDivisions",{get:function(){return console.warn("THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions."),this.arcLengthDivisions},set:function(t){console.warn("THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions."),this.arcLengthDivisions=t}}),Ti.prototype.setLens=function(t,e){console.warn("THREE.PerspectiveCamera.setLens is deprecated. Use .setFocalLength and .filmGauge for a photographic setup."),void 0!==e&&(this.filmGauge=e),this.setFocalLength(t)},Object.defineProperties(Qr.prototype,{onlyShadow:{set:function(){console.warn("THREE.Light: .onlyShadow has been removed.")}},shadowCameraFov:{set:function(t){console.warn("THREE.Light: .shadowCameraFov is now .shadow.camera.fov."),this.shadow.camera.fov=t}},shadowCameraLeft:{set:function(t){console.warn("THREE.Light: .shadowCameraLeft is now .shadow.camera.left."),this.shadow.camera.left=t}},shadowCameraRight:{set:function(t){console.warn("THREE.Light: .shadowCameraRight is now .shadow.camera.right."),this.shadow.camera.right=t}},shadowCameraTop:{set:function(t){console.warn("THREE.Light: .shadowCameraTop is now .shadow.camera.top."),this.shadow.camera.top=t}},shadowCameraBottom:{set:function(t){console.warn("THREE.Light: .shadowCameraBottom is now .shadow.camera.bottom."),this.shadow.camera.bottom=t}},shadowCameraNear:{set:function(t){console.warn("THREE.Light: .shadowCameraNear is now .shadow.camera.near."),this.shadow.camera.near=t}},shadowCameraFar:{set:function(t){console.warn("THREE.Light: .shadowCameraFar is now .shadow.camera.far."),this.shadow.camera.far=t}},shadowCameraVisible:{set:function(){console.warn("THREE.Light: .shadowCameraVisible has been removed. Use new THREE.CameraHelper( light.shadow.camera ) instead.")}},shadowBias:{set:function(t){console.warn("THREE.Light: .shadowBias is now .shadow.bias."),this.shadow.bias=t}},shadowDarkness:{set:function(){console.warn("THREE.Light: .shadowDarkness has been removed.")}},shadowMapWidth:{set:function(t){console.warn("THREE.Light: .shadowMapWidth is now .shadow.mapSize.width."),this.shadow.mapSize.width=t}},shadowMapHeight:{set:function(t){console.warn("THREE.Light: .shadowMapHeight is now .shadow.mapSize.height."),this.shadow.mapSize.height=t}}}),Object.defineProperties(ct.prototype,{length:{get:function(){return console.warn("THREE.BufferAttribute: .length has been deprecated. Use .count instead."),this.array.length}},copyIndicesArray:function(){console.error("THREE.BufferAttribute: .copyIndicesArray() has been removed.")}}),Object.assign(bt.prototype,{addIndex:function(t){console.warn("THREE.BufferGeometry: .addIndex() has been renamed to .setIndex()."),this.setIndex(t)},addDrawCall:function(t,e,i){void 0!==i&&console.warn("THREE.BufferGeometry: .addDrawCall() no longer supports indexOffset."),console.warn("THREE.BufferGeometry: .addDrawCall() is now .addGroup()."),this.addGroup(t,e)},clearDrawCalls:function(){console.warn("THREE.BufferGeometry: .clearDrawCalls() is now .clearGroups()."),this.clearGroups()},computeTangents:function(){console.warn("THREE.BufferGeometry: .computeTangents() has been removed.")},computeOffsets:function(){console.warn("THREE.BufferGeometry: .computeOffsets() has been removed.")}}),Object.defineProperties(bt.prototype,{drawcalls:{get:function(){return console.error("THREE.BufferGeometry: .drawcalls has been renamed to .groups."),this.groups}},offsets:{get:function(){return console.warn("THREE.BufferGeometry: .offsets has been renamed to .groups."),this.groups}}}),Object.assign(Hn.prototype,{getArrays:function(){console.error("THREE.ExtrudeBufferGeometry: .getArrays() has been removed.")},addShapeList:function(){console.error("THREE.ExtrudeBufferGeometry: .addShapeList() has been removed.")},addShape:function(){console.error("THREE.ExtrudeBufferGeometry: .addShape() has been removed.")}}),Object.defineProperties(bo.prototype,{dynamic:{set:function(){console.warn("THREE.Uniform: .dynamic has been removed. Use object.onBeforeRender() instead.")}},onUpdate:{value:function(){return console.warn("THREE.Uniform: .onUpdate() has been removed. Use object.onBeforeRender() instead."),this}}}),Object.defineProperties(Nt.prototype,{wrapAround:{get:function(){console.warn("THREE.Material: .wrapAround has been removed.")},set:function(){console.warn("THREE.Material: .wrapAround has been removed.")}},wrapRGB:{get:function(){return console.warn("THREE.Material: .wrapRGB has been removed."),new H}},shading:{get:function(){console.error("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead.")},set:function(t){console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=1===t}}}),Object.defineProperties(dr.prototype,{metal:{get:function(){return console.warn("THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead."),!1},set:function(){console.warn("THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead")}}}),Object.defineProperties(Ut.prototype,{derivatives:{get:function(){return console.warn("THREE.ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives},set:function(t){console.warn("THREE. ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives=t}}}),Object.assign(Li.prototype,{animate:function(t){console.warn("THREE.WebGLRenderer: .animate() is now .setAnimationLoop()."),this.setAnimationLoop(t)},getCurrentRenderTarget:function(){return console.warn("THREE.WebGLRenderer: .getCurrentRenderTarget() is now .getRenderTarget()."),this.getRenderTarget()},getMaxAnisotropy:function(){return console.warn("THREE.WebGLRenderer: .getMaxAnisotropy() is now .capabilities.getMaxAnisotropy()."),this.capabilities.getMaxAnisotropy()},getPrecision:function(){return console.warn("THREE.WebGLRenderer: .getPrecision() is now .capabilities.precision."),this.capabilities.precision},resetGLState:function(){return console.warn("THREE.WebGLRenderer: .resetGLState() is now .state.reset()."),this.state.reset()},supportsFloatTextures:function(){return console.warn("THREE.WebGLRenderer: .supportsFloatTextures() is now .extensions.get( 'OES_texture_float' )."),this.extensions.get("OES_texture_float")},supportsHalfFloatTextures:function(){return console.warn("THREE.WebGLRenderer: .supportsHalfFloatTextures() is now .extensions.get( 'OES_texture_half_float' )."),this.extensions.get("OES_texture_half_float")},supportsStandardDerivatives:function(){return console.warn("THREE.WebGLRenderer: .supportsStandardDerivatives() is now .extensions.get( 'OES_standard_derivatives' )."),this.extensions.get("OES_standard_derivatives")},supportsCompressedTextureS3TC:function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTextureS3TC() is now .extensions.get( 'WEBGL_compressed_texture_s3tc' )."),this.extensions.get("WEBGL_compressed_texture_s3tc")},supportsCompressedTexturePVRTC:function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTexturePVRTC() is now .extensions.get( 'WEBGL_compressed_texture_pvrtc' )."),this.extensions.get("WEBGL_compressed_texture_pvrtc")},supportsBlendMinMax:function(){return console.warn("THREE.WebGLRenderer: .supportsBlendMinMax() is now .extensions.get( 'EXT_blend_minmax' )."),this.extensions.get("EXT_blend_minmax")},supportsVertexTextures:function(){return console.warn("THREE.WebGLRenderer: .supportsVertexTextures() is now .capabilities.vertexTextures."),this.capabilities.vertexTextures},supportsInstancedArrays:function(){return console.warn("THREE.WebGLRenderer: .supportsInstancedArrays() is now .extensions.get( 'ANGLE_instanced_arrays' )."),this.extensions.get("ANGLE_instanced_arrays")},enableScissorTest:function(t){console.warn("THREE.WebGLRenderer: .enableScissorTest() is now .setScissorTest()."),this.setScissorTest(t)},initMaterial:function(){console.warn("THREE.WebGLRenderer: .initMaterial() has been removed.")},addPrePlugin:function(){console.warn("THREE.WebGLRenderer: .addPrePlugin() has been removed.")},addPostPlugin:function(){console.warn("THREE.WebGLRenderer: .addPostPlugin() has been removed.")},updateShadowMap:function(){console.warn("THREE.WebGLRenderer: .updateShadowMap() has been removed.")},setFaceCulling:function(){console.warn("THREE.WebGLRenderer: .setFaceCulling() has been removed.")}}),Object.defineProperties(Li.prototype,{shadowMapEnabled:{get:function(){return this.shadowMap.enabled},set:function(t){console.warn("THREE.WebGLRenderer: .shadowMapEnabled is now .shadowMap.enabled."),this.shadowMap.enabled=t}},shadowMapType:{get:function(){return this.shadowMap.type},set:function(t){console.warn("THREE.WebGLRenderer: .shadowMapType is now .shadowMap.type."),this.shadowMap.type=t}},shadowMapCullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")}}}),Object.defineProperties(xi.prototype,{cullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")}},renderReverseSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")}},renderSingleSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")}}}),Object.defineProperties(P.prototype,{wrapS:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS},set:function(t){console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS=t}},wrapT:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT},set:function(t){console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT=t}},magFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter},set:function(t){console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter=t}},minFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter},set:function(t){console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter=t}},anisotropy:{get:function(){return console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy},set:function(t){console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy=t}},offset:{get:function(){return console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset},set:function(t){console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset=t}},repeat:{get:function(){return console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat},set:function(t){console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat=t}},format:{get:function(){return console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format},set:function(t){console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format=t}},type:{get:function(){return console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type},set:function(t){console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type=t}},generateMipmaps:{get:function(){return console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps},set:function(t){console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps=t}}}),Object.defineProperties(Ai.prototype,{standing:{set:function(){console.warn("THREE.WebVRManager: .standing has been removed.")}}}),to.prototype.load=function(t){console.warn("THREE.Audio: .load has been deprecated. Use THREE.AudioLoader instead.");var e=this;return(new Ja).load(t,(function(t){e.setBuffer(t)})),this},io.prototype.getData=function(){return console.warn("THREE.AudioAnalyser: .getData() is now .getFrequencyData()."),this.getFrequencyData()},Ka.prototype.updateCubeMap=function(t,e){return console.warn("THREE.CubeCamera: .updateCubeMap() is now .update()."),this.update(t,e)};function Yo(t){return(Yo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Zo(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Jo(t,e){return(Jo=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Qo(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var i,n=$o(t);if(e){var r=$o(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return Ko(this,i)}}function Ko(t,e){return!e||"object"!==Yo(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function $o(t){return($o=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var ts=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Jo(t,e)}(a,t);var e,i,n,r=Qo(a);function a(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),(e=r.call(this,t.canvas))._ctx2d=t,e}return e=a,(i=[{key:"render",value:function(t,e){this._ctx2d.canvas.width=e.width,this._ctx2d.canvas.height=e.height,this._ctx2d.drawImage(t,0,0,e.width,e.height)}}])&&Zo(e.prototype,i),n&&Zo(e,n),a}(R);function es(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var is=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._renderer=e,this._stereo=new Qa,this._stereo.aspect=.5}var e,i,n;return e=t,(i=[{key:"setEyeSeparation",value:function(t){this._stereo.eyeSep=t}},{key:"setSize",value:function(t,e){this._renderer.setSize(t,e)}},{key:"render",value:function(t,e){t.updateMatrixWorld(),null===e.parent&&e.updateMatrixWorld(),this._stereo.update(e);var i=this._renderer.getSize();this._renderer.autoClear&&this._renderer.clear(),this._renderer.setScissorTest(!0),this._renderer.setScissor(0,0,i.width/2,i.height),this._renderer.setViewport(0,0,i.width/2,i.height),this._renderer.render(t,this._stereo.cameraL),this._renderer.setScissor(i.width/2,0,i.width/2,i.height),this._renderer.setViewport(i.width/2,0,i.width/2,i.height),this._renderer.render(t,this._stereo.cameraR),this._renderer.setScissorTest(!1)}}])&&es(e.prototype,i),n&&es(e,n),t}(),ns="Your browser doesn't support features to enable VR experience",rs="playsinline must be true for VR experience",as="Cannot apply VR experience for DRM content",os="Unable to obtain the video size for VR canvas";i(1);function ss(t){return(ss="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function cs(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function hs(t,e,i){return e&&cs(t.prototype,e),i&&cs(t,i),t}function ls(t,e){return(ls=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function us(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var i,n=ds(t);if(e){var r=ds(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return ps(this,i)}}function ps(t,e){return!e||"object"!==ss(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function ds(t){return(ds=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var fs=n.core.Error,ms=n.core.FakeEvent,gs=n.core.Utils,vs=n.core.CorsType,ys=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&ls(t,e)}(i,t);var e=us(i);function i(t,n,r){var a;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(a=e.call(this,t,n,r))._initMembers(),a._addBindings(),a}return hs(i,null,[{key:"isValid",value:function(){return!0}}]),hs(i,[{key:"_addBindings",value:function(){var t=this;this.eventManager.listen(this.player,this.player.Event.SOURCE_SELECTED,(function(e){t.player.isVr()&&(t.logger.debug("VR entry has detected"),t._isVrSupported(e.payload.selectedSource[0])&&(t._requestDeviceMotionPermission(),t.eventManager.listen(t.player,t.player.Event.MEDIA_LOADED,(function(){return t._addMotionBindings()})),t.eventManager.listen(t.player,t.player.Event.FIRST_PLAY,(function(){return t._initComponents()})),t.eventManager.listen(t.player,t.player.Event.ENDED,(function(){return t._cancelAnimationFrame()})),t.eventManager.listen(t.player,t.player.Event.PLAY,(function(){return t._onPlay()})),t.eventManager.listen(t.player,t.player.Event.PLAYING,(function(){return t._onPlaying()})),t.eventManager.listen(t.player,t.player.Event.RESIZE,(function(){return t._updateCanvasSize()})),t._setCrossOrigin()))}))}},{key:"_setCrossOrigin",value:function(){var t=this.player.env;"string"==typeof this.player.crossOrigin||"iOS"!==t.os.name&&"Safari"!==t.browser.name&&"Android Browser"!==t.browser.name||(this._crossOriginSet=!0,this.player.crossOrigin=vs.ANONYMOUS)}},{key:"_isIOSPlayer",value:function(){return!1===this.player.config.playback.playsinline&&"iPhone"===this.player.env.device.model}},{key:"_isUnSpportedBrowser",value:function(){var t=this.player.env;return"Safari"===t.browser.name&&t.browser.major<11||"iOS"===t.os.name&&gs.VERSION.compare(t.os.version,"11.3")<0||"IE"===t.browser.name&&!("11"===t.browser.major&&("8.1"===t.os.version||"10"===t.os.version))}},{key:"_isVrSupported",value:function(t){var e=this,i="";return this._isUnSpportedBrowser()&&(i=ns),this._isIOSPlayer()&&(i=rs),t.drmData&&(i=as),!i||(this.eventManager.listen(this.player,this.player.Event.PLAYING,(function(){e.logger.warn("The playback paused due to VR experience not supported"),e.player.pause()})),this.player.dispatchEvent(new ms(this.player.Event.ERROR,new fs(fs.Severity.CRITICAL,fs.Category.VR,fs.Code.VR_NOT_SUPPORTED,i))),!1)}},{key:"_addMotionBindings",value:function(){var t=this,e=gs.Dom.getElementBySelector("#".concat(this.config.rootElement," .").concat("playkit-overlay-action"));e&&(this.eventManager.listen(e,"mousedown",(function(e){return t._onOverlayActionPointerDown(e)})),this.eventManager.listen(e,"touchstart",(function(e){return t._onOverlayActionPointerDown(e)})),this.eventManager.listen(window,"mousemove",(function(e){return t._onDocumentPointerMove(e)})),this.eventManager.listen(window,"touchmove",(function(e){return t._onDocumentPointerMove(e)}),{passive:!1}),this.eventManager.listen(window,"mouseup",this._onDocumentPointerUp.bind(this)),this.eventManager.listen(window,"touchend",this._onDocumentPointerUp.bind(this))),window.DeviceMotionEvent&&this.eventManager.listen(window,"devicemotion",this._onDeviceMotion.bind(this))}},{key:"_initComponents",value:function(){this.logger.debug("Init VR components");var t=this.player.getVideoElement();gs.Dom.addClassName(t,"playkit-vr-video"),this._renderer=new Li({devicePixelRatio:window.devicePixelRatio,alpha:!1,clearColor:16777215,antialias:!0});var e=this._renderer.domElement;gs.Dom.addClassName(e,"playkit-vr-canvas"),gs.Dom.insertBefore(this.player.getView(),e,t.nextSibling);var i=this.config.cameraOptions,n=this._getCanvasDimensions(),r=n.width&&n.height?n.width/n.height:i.aspect;this._camera=new Ti(i.fov,r,i.near,i.far),this._camera.target=new _(0,0,0),this._texture=this._getVideoTexture(t),this._texture.minFilter=this._texture.magFilter=1006,this._texture.generateMipmaps=!1,this._texture.format=1022;var a=new qn(256,32,32);a.applyMatrix((new y).makeScale(-1,1,1));var o=new Gt(a,new Dt({map:this._texture,overdraw:!0}));o.position.set(0,0,0),this._scene=new Oi,this._scene.add(o),this._effect=new is(this._renderer),this._updateCanvasSize()}},{key:"_getVideoTexture",value:function(t){if("IE"===this.player.env.browser.name){var e=gs.Dom.createElement("canvas").getContext("2d");return new ts(e)}return new Xi(t)}},{key:"_render",value:function(){var t=this.player.getVideoElement();this._texture&&t.readyState>=t.HAVE_CURRENT_DATA&&(this._texture.needsUpdate=!0,this._texture instanceof ts&&this._texture.render(t,this._getCanvasDimensions())),this._rafId=requestAnimationFrame(this._render.bind(this)),this._updateCamera(),this._stereoMode&&this._effect?this._effect.render(this._scene,this._camera):this._renderer&&this._renderer.render(this._scene,this._camera)}},{key:"_updateCamera",value:function(){this._camera&&(this._latitude=Math.max(-89,Math.min(89,this._latitude)),this._camera.target.x=500*Math.sin(g.degToRad(90-this._latitude))*Math.cos(g.degToRad(this._longitude)),this._camera.target.y=500*Math.cos(g.degToRad(90-this._latitude)),this._camera.target.z=500*Math.sin(g.degToRad(90-this._latitude))*Math.sin(g.degToRad(this._longitude)),this._camera.lookAt(this._camera.target))}},{key:"_getCanvasDimensions",value:function(){var t,e,i=this.player.getView(),n=this.player.getVideoElement(),r=parseInt(n.videoWidth/n.videoHeight*i.offsetHeight);return i.offsetWidth<r?(t=n.videoHeight/n.videoWidth,e={width:i.offsetWidth,height:t*i.offsetWidth}):e={width:(t=n.videoWidth/n.videoHeight)*i.offsetHeight,height:i.offsetHeight},e}},{key:"_clearCalculateInterval",value:function(){this._calculateCanvasSizeInterval&&(clearInterval(this._calculateCanvasSizeInterval),this._calculateCanvasSizeInterval=null)}},{key:"_setRendererSize",value:function(t){this._renderer.setSize(t.width,t.height,!1),this.logger.debug("Update the VR canvas dimensions",t)}},{key:"_updateCanvasSizeByInterval",value:function(){var t,e=this,i=0;this._clearCalculateInterval(),this._calculateCanvasSizeInterval=setInterval((function(){(t=e._getCanvasDimensions()).width?(e._clearCalculateInterval(),e._setRendererSize(t)):++i>=600&&(e.player.pause(),e._clean(),e.player.dispatchEvent(new ms(e.player.Event.ERROR,new fs(fs.Severity.CRITICAL,fs.Category.VR,fs.Code.VR_NOT_SUPPORTED,os))))}),100)}},{key:"_updateCanvasSize",value:function(){if(this._renderer){var t=this._getCanvasDimensions();t.width?this._setRendererSize(t):this._updateCanvasSizeByInterval()}}},{key:"_onPlay",value:function(){this._rafId||this._render()}},{key:"_onPlaying",value:function(){this._updateCanvasSize()}},{key:"destroy",value:function(){this._clean()}},{key:"reset",value:function(){this._clean(),this._initMembers(),this._addBindings()}},{key:"toggleVrStereoMode",value:function(){this._stereoMode=!this._stereoMode,this.player.dispatchEvent(new ms(this.player.Event.VR_STEREO_MODE_CHANGED,{mode:this._stereoMode})),this._updateCanvasSize()}},{key:"isInStereoMode",value:function(){return this._stereoMode}},{key:"_clean",value:function(){this._cancelAnimationFrame(),this.eventManager.removeAll(),gs.Dom.removeClassName(this.player.getVideoElement(),"playkit-vr-video"),this._renderer&&gs.Dom.removeChild(this.player.getView(),this._renderer.domElement),this._crossOriginSet&&(this.player.crossOrigin=null),this._clearCalculateInterval()}},{key:"_initMembers",value:function(){this._renderer=null,this._scene=null,this._camera=null,this._texture=null,this._effect=null,this._stereoMode=this.config.startInStereo,this._rafId=null,this._pointerDown=!1,this._previousX=NaN,this._previousY=NaN,this._latitude=0,this._longitude=180,this._crossOriginSet=!1}},{key:"_cancelAnimationFrame",value:function(){this._rafId&&(cancelAnimationFrame(this._rafId),this._rafId=null)}},{key:"_onOverlayActionPointerDown",value:function(t){this._pointerDown=!0,this._previousX=t.clientX||t.touches[0].clientX,this._previousY=t.clientY||t.touches[0].clientY}},{key:"_onDocumentPointerMove",value:function(t){this._pointerDown&&((t.clientX||t.touches&&1===t.touches.length)&&(this._longitude=(this._previousX-(t.clientX||t.touches[0].clientX))*this.config.moveMultiplier+this._longitude,this._latitude=((t.clientY||t.touches[0].clientY)-this._previousY)*this.config.moveMultiplier+this._latitude,this._previousX=t.clientX||t.touches[0].clientX,this._previousY=t.clientY||t.touches[0].clientY),t.preventDefault())}},{key:"_onDocumentPointerUp",value:function(){this._pointerDown=!1}},{key:"_getMobileVibrationValue",value:function(){return"Android Browser"===this.player.env.browser.name?1:.01}},{key:"_requestDeviceMotionPermission",value:function(){var t=this;if("iOS"===this.player.env.os.name&&gs.VERSION.compare(this.player.env.os.version,"13")>0){var e=gs.Dom.getElementBySelector("#".concat(this.config.rootElement));this.eventManager.listenOnce(e,"click",(function(){window.DeviceOrientationEvent&&"function"==typeof window.DeviceOrientationEvent.requestPermission&&window.DeviceOrientationEvent.requestPermission().then((function(e){t.logger.debug("Permission device motion state ",e)})).catch((function(e){t.logger.warn("Error occurred on permission request for device motion ",e)}))}))}}},{key:"_onDeviceMotion",value:function(t){if(t.rotationRate){var e=t.rotationRate.alpha,i=t.rotationRate.beta,n=window.innerHeight>window.innerWidth,r=t.orientation||window.orientation,a=this.config.deviceMotionMultiplier*this._getMobileVibrationValue();if(n)this._longitude=this._longitude-i*a,this._latitude=this._latitude+e*a;else{var o=-90;r&&(o=r),this._longitude=-90===o?this._longitude+e*a:this._longitude-e*a,this._latitude=-90===o?this._latitude+i*a:this._latitude-i*a}}}}]),i}(n.BasePlugin);!function(t,e,i){e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i}(ys,"defaultConfig",{moveMultiplier:.15,deviceMotionMultiplier:1,startInStereo:!1,cameraOptions:{fov:75,aspect:640/360,near:.1,far:1e3}});var xs="1.4.1",_s="@playkit-js/playkit-js-vr";Object(n.registerPlugin)("vr",ys)}])}));

!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@playkit-js/playkit-js")):"function"==typeof define&&define.amd?define(["playkit-js"],t):"object"==typeof exports?exports.youtube=t(require("@playkit-js/playkit-js")):(e.playkit=e.playkit||{},e.playkit.youtube=t(e.KalturaPlayer.core))}(window,(function(e){return function(e){var t={};function n(i){if(t[i])return t[i].exports;var a=t[i]={i:i,l:!1,exports:{}};return e[i].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)n.d(i,a,function(t){return e[t]}.bind(null,a));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=5)}([function(t,n){t.exports=e},function(e,t,n){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=function(e,t){var n=e[1]||"",i=e[3];if(!i)return n;if(t&&"function"==typeof btoa){var a=(o=i,u=btoa(unescape(encodeURIComponent(JSON.stringify(o)))),s="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(u),"/*# ".concat(s," */")),r=i.sources.map((function(e){return"/*# sourceURL=".concat(i.sourceRoot||"").concat(e," */")}));return[n].concat(r).concat([a]).join("\n")}var o,u,s;return[n].join("\n")}(t,e);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n})).join("")},t.i=function(e,n,i){"string"==typeof e&&(e=[[null,e,""]]);var a={};if(i)for(var r=0;r<this.length;r++){var o=this[r][0];null!=o&&(a[o]=!0)}for(var u=0;u<e.length;u++){var s=[].concat(e[u]);i&&a[s[0]]||(n&&(s[2]?s[2]="".concat(n," and ").concat(s[2]):s[2]=n),t.push(s))}},t}},function(e,t,n){var i=n(3),a=n(4);"string"==typeof(a=a.__esModule?a.default:a)&&(a=[[e.i,a,""]]);var r={insert:"head",singleton:!1};i(a,r);e.exports=a.locals||{}},function(e,t,n){"use strict";var i,a=function(){return void 0===i&&(i=Boolean(window&&document&&document.all&&!window.atob)),i},r=function(){var e={};return function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}e[t]=n}return e[t]}}(),o=[];function u(e){for(var t=-1,n=0;n<o.length;n++)if(o[n].identifier===e){t=n;break}return t}function s(e,t){for(var n={},i=[],a=0;a<e.length;a++){var r=e[a],s=t.base?r[0]+t.base:r[0],c=n[s]||0,l="".concat(s," ").concat(c);n[s]=c+1;var f=u(l),y={css:r[1],media:r[2],sourceMap:r[3]};-1!==f?(o[f].references++,o[f].updater(y)):o.push({identifier:l,updater:v(y,t),references:1}),i.push(l)}return i}function c(e){var t=document.createElement("style"),i=e.attributes||{};if(void 0===i.nonce){var a=n.nc;a&&(i.nonce=a)}if(Object.keys(i).forEach((function(e){t.setAttribute(e,i[e])})),"function"==typeof e.insert)e.insert(t);else{var o=r(e.insert||"head");if(!o)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");o.appendChild(t)}return t}var l,f=(l=[],function(e,t){return l[e]=t,l.filter(Boolean).join("\n")});function y(e,t,n,i){var a=n?"":i.media?"@media ".concat(i.media," {").concat(i.css,"}"):i.css;if(e.styleSheet)e.styleSheet.cssText=f(t,a);else{var r=document.createTextNode(a),o=e.childNodes;o[t]&&e.removeChild(o[t]),o.length?e.insertBefore(r,o[t]):e.appendChild(r)}}function d(e,t,n){var i=n.css,a=n.media,r=n.sourceMap;if(a?e.setAttribute("media",a):e.removeAttribute("media"),r&&btoa&&(i+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(r))))," */")),e.styleSheet)e.styleSheet.cssText=i;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(i))}}var p=null,h=0;function v(e,t){var n,i,a;if(t.singleton){var r=h++;n=p||(p=c(t)),i=y.bind(null,n,r,!1),a=y.bind(null,n,r,!0)}else n=c(t),i=d.bind(null,n,t),a=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(n)};return i(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;i(e=t)}else a()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=a());var n=s(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var i=0;i<n.length;i++){var a=u(n[i]);o[a].references--}for(var r=s(e,t),c=0;c<n.length;c++){var l=u(n[c]);0===o[l].references&&(o[l].updater(),o.splice(l,1))}n=r}}}},function(e,t,n){"use strict";n.r(t);var i=n(1),a=n.n(i)()(!0);a.push([e.i,".playkit-iOS .playkit-engine-youtube,\n.playkit-Mac-OS .playkit-engine-youtube {\n  object-fit: fill;\n}\n","",{version:3,sources:["style.css"],names:[],mappings:"AAAA;;EAEE,gBAAgB;AAClB",file:"style.css",sourcesContent:[".playkit-iOS .playkit-engine-youtube,\n.playkit-Mac-OS .playkit-engine-youtube {\n  object-fit: fill;\n}\n"]}]),t.default=a},function(e,t,n){"use strict";n.r(t),n.d(t,"Engine",(function(){return p})),n.d(t,"VERSION",(function(){return h})),n.d(t,"NAME",(function(){return v}));var i=n(0);function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function r(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function o(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function s(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=f(e);if(t){var a=f(this).constructor;n=Reflect.construct(i,arguments,a)}else n=i.apply(this,arguments);return c(this,n)}}function c(e,t){return!t||"object"!==a(t)&&"function"!=typeof t?l(e):t}function l(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function y(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var d={controls:0,autoplay:0,origin:window.location.origin,iv_load_policy:3,disablekb:1,modestbranding:1,playsinline:1,rel:0,fs:0},p=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&u(e,t)}(n,e);var t=s(n);function n(e,a){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),y(l(r=t.call(this)),"_isAdaptiveBitrate",!0),y(l(r),"_loaded",!1),y(l(r),"_isSeeking",!1),y(l(r),"_firstPlaying",!0),y(l(r),"_currentState",null),y(l(r),"_playerTracks",[]),r._eventManager=new i.EventManager,r._createVideoElement(),r._init(e,a),r}return o(n,null,[{key:"isSupported",value:function(){return!0}},{key:"createEngine",value:function(e,t){return new this(e,t)}},{key:"canPlaySource",value:function(e){var t="string"==typeof e.mimetype&&"video/youtube"===e.mimetype.toLowerCase();return n._logger.debug("canPlayType result for mimeType: "+e.mimetype+" is "+t.toString()),t}},{key:"runCapabilities",value:function(){}},{key:"getCapabilities",value:function(){var e=!1;"connection"in navigator&&navigator.connection&&(e=!!navigator.connection.saveData);var t=y({},n.id,{autoplay:!1,mutedAutoPlay:!e});return Promise.resolve(t)}},{key:"prepareVideoElement",value:function(){n._logger.debug("Prepare the video element for playing not supported")}}]),o(n,[{key:"restore",value:function(e,t){this.reset(),this._init(e,t)}},{key:"_reset",value:function(){this._stopSeekTargetWatchDog(),this._stopPlayingWatchDog(),this.detach(),this._playerReady()&&this._api.stopVideo&&this._api.stopVideo(),this._loaded=!1,this._firstPlaying=!0,this._isSeeking=!1,this._isAdaptiveBitrate=!0,this._playerTracks=[],this._currentState=null}},{key:"reset",value:function(){this._reset(),this._eventManager.removeAll()}},{key:"destroy",value:function(){this._reset(),this._api&&this._api.destroy&&this._api.destroy(),this._eventManager.destroy()}},{key:"attach",value:function(){}},{key:"detach",value:function(){}},{key:"getVideoElement",value:function(){return this._el}},{key:"selectVideoTrack",value:function(e){this._api&&e instanceof i.VideoTrack&&(!e.active||this.isAdaptiveBitrateEnabled())&&(this.isAdaptiveBitrateEnabled()&&this.dispatchEvent(i.EventType.ABR_MODE_CHANGED,{mode:"manual"}),this._isAdaptiveBitrate=!1,this._api.setPlaybackQuality(e.label))}},{key:"selectAudioTrack",value:function(e){n._logger.info("audio track switching not supported, cannot switch to "+e.language)}},{key:"selectTextTrack",value:function(e){n._logger.info("text track switching not supported, cannot switch to "+e.language)}},{key:"hideTextTrack",value:function(){}},{key:"enableAdaptiveBitrate",value:function(){this._api&&(this._api.setPlaybackQuality("default"),this._isAdaptiveBitrate=!0)}},{key:"isAdaptiveBitrateEnabled",value:function(){return this._isAdaptiveBitrate}},{key:"seekToLiveEdge",value:function(){}},{key:"attachMediaSource",value:function(){}},{key:"detachMediaSource",value:function(){}},{key:"getStartTimeOfDvrWindow",value:function(){return 0}},{key:"isLive",value:function(){return!1}},{key:"play",value:function(){this._api&&(this.currentTime===this.duration&&(this.currentTime=0),this._api.playVideo())}},{key:"pause",value:function(){this._api&&this._api.pauseVideo()}},{key:"load",value:function(e){var t=this;return this._sdkLoaded.then((function(){var n={videoId:t._source.url,startSeconds:e&&e>0?e:0};t._api.cueVideoById(n),t._loaded=!0})).catch((function(e){return Promise.reject(e)})),this._videoLoaded={},this._videoLoaded.promise=new Promise((function(e,n){t._videoLoaded.resolve=e,t._videoLoaded.reject=n})),this._videoLoaded.promise}},{key:"_playerReady",value:function(){return!(!this._api||!this._loaded)}},{key:"_parseVideoTracks",value:function(){var e=this._api.getAvailableQualityLevels(),t=this._api.getPlaybackQuality(),n=[];return e.forEach((function(e,a){var r={active:t===e,label:e,bandwidth:0,width:a+1,height:a+1,language:"",index:a};n.push(new i.VideoTrack(r))})),n}},{key:"_startSeekTargetWatchDog",value:function(){var e=this,t=this.currentTime;this._stopSeekTargetWatchDog(),this._seekTargetIntervalId=setInterval((function(){e.paused&&e._isSeeking?e.currentTime!==t&&(e.dispatchEvent(new i.FakeEvent(i.EventType.TIME_UPDATE)),e.dispatchEvent(new i.FakeEvent(i.EventType.SEEKED)),e._isSeeking=!1):e._stopSeekTargetWatchDog()}),250)}},{key:"_stopSeekTargetWatchDog",value:function(){this._seekTargetIntervalId&&(clearInterval(this._seekTargetIntervalId),this._seekTargetIntervalId=null)}},{key:"_init",value:function(e,t){var n=this;this._source=e,this._config=t,this._api=null,this._videoLoaded=null,this._playingIntervalId=null;var a=function(e){var t=new i.Error(i.Error.Severity.CRITICAL,i.Error.Category.PLAYER,i.Error.Code.LOAD_FAILED,e);n.dispatchEvent(new i.FakeEvent(i.EventType.ERROR,t))};this._sdkLoaded=new Promise((function(e,t){n._apiReady=function(){(n._config.playback.muted||n._config.playback.autoplay)&&(n._api.mute&&n._api.mute(),n._muted=!0),e()},n._apiError=function(e){var i=n._getYoutubeErrorCodeData(e.data);a(i),t(e.data)}})),this._loadYouTubeIframeAPI().then((function(){n._loadYouTubePlayer()})).catch((function(e){a(e)}))}},{key:"_createVideoElement",value:function(){var e=this._el=i.Utils.Dom.createElement("div");i.Utils.Dom.setAttribute(e,"id",i.Utils.Generator.uniqueId(5)),i.Utils.Dom.setAttribute(e,"tabindex","-1")}},{key:"_getYoutubeErrorCodeData",value:function(e){switch(e){case 2:return{code:e,message:"Invalid params"};case 5:return{code:e,message:"Error while trying to play the video"};case 100:return{code:e,message:"Video not found"};case 101:case 150:return{code:e,message:"The owner of the requested video does not allow it to be played in embedded players"};default:return{code:e,message:"Unknown error"}}}},{key:"_loadYouTubePlayer",value:function(){var e=this,t=function(){var t={playerVars:d,events:{onReady:e._apiReady,onError:e._apiError,onStateChange:function(t){return e._onPlayerStateChange(t)},onPlaybackQualityChange:function(t){return e._onPlaybackQualityChange(t)},onVolumeChange:function(){return e.dispatchEvent(new i.FakeEvent(i.EventType.VOLUME_CHANGE))}}};if(t.playerVars.playsinline=e._config.playback.playsinline?1:0,t.playerVars.autoplay=e._config.playback.autoplay?1:0,i.Utils.Object.hasPropertyPath(e._config,"playback.options.youtube")){var n=e._config.playback.options.youtube;i.Utils.Object.mergeDeep(t.playerVars,n.playerVars)}e._api=new window.YT.Player(e._el.id,t)};if(this._api)return this._apiReady();window&&window.YT&&window.YT.Player?t():window.onYouTubeIframeAPIReady=t}},{key:"_loadYouTubeIframeAPI",value:function(){var e=this;return new Promise((function(t,n){if(window&&window.YT&&window.YT.Player)return t();var a=i.Utils.Dom.createElement("script"),r="https://www.youtube.com/iframe_api";i.Utils.Object.hasPropertyPath(e._config,"playback.options.youtube")&&e._config.playback.options.youtube.iframeApi&&(r=e._config.playback.options.youtube.iframeApi),a.src=r,a.async=!0,a.onload=function(){t()},a.onerror=function(){n({message:"Youtube Iframe API loading failed: "+r})};var o=document.getElementsByTagName("script")[0];o&&o.parentNode&&o.parentNode.insertBefore(a,o)}))}},{key:"_getPlayerStateKey",value:function(e){var t=window.YT.PlayerState;return Object.keys(t).find((function(n){return t[n]===e}))||"UNKNOWN"}},{key:"_onPlayerStateChange",value:function(e){var t=window.YT.PlayerState,i=e.data;if(n._logger.info("player state changed from ".concat(this._getPlayerStateKey(this._currentState)," to ").concat(this._getPlayerStateKey(i))),i!==this._currentState)switch(this._currentState=i,this._currentState){case t.UNSTARTED:this._handleLoaded();break;case t.ENDED:this._onEnded();break;case t.PLAYING:this._firstPlaying&&this._handleFirstPlaying(),this._onPlaying();break;case t.PAUSED:this._onPaused();break;case t.BUFFERING:this._onBuffering();break;case t.CUED:}}},{key:"_onPlaybackQualityChange",value:function(e){var t=this._playerTracks.find((function(t){return t instanceof i.VideoTrack&&t.label===e.data}));this.dispatchEvent(i.EventType.VIDEO_TRACK_CHANGED,{selectedVideoTrack:t})}},{key:"_onPlaying",value:function(){this.dispatchEvent(new i.FakeEvent(i.EventType.PLAY)),this.dispatchEvent(new i.FakeEvent(i.EventType.PLAYING)),this._startPlayingWatchDog(),this._isSeeking&&(this._isSeeking=!1,this.dispatchEvent(new i.FakeEvent(i.EventType.TIME_UPDATE)),this.dispatchEvent(new i.FakeEvent(i.EventType.SEEKED)))}},{key:"_handleLoaded",value:function(){this._loaded&&(this.dispatchEvent(new i.FakeEvent(i.EventType.LOADED_METADATA)),this._videoLoaded.resolve({tracks:this._playerTracks}))}},{key:"_handleFirstPlaying",value:function(){this._firstPlaying=!1,this.dispatchEvent(new i.FakeEvent(i.EventType.DURATION_CHANGE))}},{key:"_onBuffering",value:function(){this._stopPlayingWatchDog(),this.dispatchEvent(new i.FakeEvent(i.EventType.WAITING))}},{key:"_onPaused",value:function(){this._isSeeking&&(this._isSeeking=!1),this._stopPlayingWatchDog(),this.dispatchEvent(new i.FakeEvent(i.EventType.TIME_UPDATE)),this.dispatchEvent(new i.FakeEvent(i.EventType.PAUSE))}},{key:"_onEnded",value:function(){this._stopPlayingWatchDog(),this.dispatchEvent(new i.FakeEvent(i.EventType.TIME_UPDATE)),this.dispatchEvent(new i.FakeEvent(i.EventType.PAUSE)),this.dispatchEvent(new i.FakeEvent(i.EventType.ENDED))}},{key:"_startPlayingWatchDog",value:function(){var e=this;this._stopPlayingWatchDog(),this.dispatchEvent(new i.FakeEvent(i.EventType.TIME_UPDATE)),this._playingIntervalId=setInterval((function(){e._isSeeking||e.dispatchEvent(new i.FakeEvent(i.EventType.TIME_UPDATE))}),250)}},{key:"_stopPlayingWatchDog",value:function(){clearInterval(this._playingIntervalId),this._playingIntervalId=null}},{key:"resetAllCues",value:function(){}},{key:"enterPictureInPicture",value:function(){}},{key:"exitPictureInPicture",value:function(){}},{key:"isPictureInPictureSupported",value:function(){return!1}},{key:"id",get:function(){return n.id}},{key:"src",set:function(e){this._source.url=e},get:function(){return this._loaded&&this._source?this._source.url:""}},{key:"currentTime",get:function(){return this._playerReady()?this._api.getCurrentTime():0},set:function(e){this._api&&this.currentTime!==e&&(this._isSeeking=!0,this._api.seekTo(e,!0),this.dispatchEvent(new i.FakeEvent(i.EventType.SEEKING)),this.paused&&this._startSeekTargetWatchDog())}},{key:"duration",get:function(){return this._playerReady()?this._api.getDuration():NaN}},{key:"volume",set:function(e){this._playerReady()&&this._api.setVolume(100*e)},get:function(){return this._playerReady()?this._api.getVolume()/100:1}},{key:"paused",get:function(){return!this._playerReady()||![window.YT.PlayerState.PLAYING,window.YT.PlayerState.BUFFERING].includes(this._api.getPlayerState())}},{key:"seeking",get:function(){return this._isSeeking}},{key:"seekable",get:function(){var e=this;return{length:1,start:function(){return 0},end:function(){return e._api?e.currentTime:0}}}},{key:"played",get:function(){var e=this;return{length:1,start:function(){return 0},end:function(){return e._api?e.currentTime:0}}}},{key:"buffered",get:function(){var e=this;return{length:1,start:function(){return 0},end:function(){return e._api?e._api.getVideoLoadedFraction()*e.duration:0}}}},{key:"muted",set:function(e){this._playerReady()&&(e?this._api.mute():this._api.unMute(),this._muted=e)},get:function(){var e=!1;return this._playerReady()&&(e="boolean"==typeof this._muted?this._muted:this._api.isMuted()),e}},{key:"defaultMuted",get:function(){return!1}},{key:"poster",set:function(e){},get:function(){return""}},{key:"preload",set:function(e){},get:function(){return"none"}},{key:"autoplay",set:function(e){},get:function(){return!1}},{key:"loop",set:function(e){},get:function(){return!1}},{key:"controls",set:function(e){},get:function(){return!1}},{key:"playbackRate",set:function(e){this._api&&this._api.setPlaybackRate(e)},get:function(){return this._playerReady()?this._api.getPlaybackRate():1}},{key:"defaultPlaybackRate",set:function(e){},get:function(){return 1}},{key:"ended",get:function(){return!!this._playerReady()&&this._api.getPlayerState()===window.YT.PlayerState.ENDED}},{key:"error",get:function(){return null}},{key:"networkState",get:function(){if(!this._playerReady())return 0;var e=window.YT.PlayerState;switch(this._api.getPlayerState()){case e.UNSTARTED:return 0;case e.BUFFERING:return 2;default:return 1}}},{key:"readyState",get:function(){if(!this._api)return 0;var e=window.YT.PlayerState;switch(this._api.getPlayerState()){case e.UNSTARTED:return 0;case e.BUFFERING:return 2;default:return 4}}},{key:"videoHeight",get:function(){return-1}},{key:"videoWidth",get:function(){return-1}},{key:"playsinline",set:function(e){},get:function(){return this._config.playsinline}},{key:"crossOrigin",set:function(e){},get:function(){return null}},{key:"playbackRates",get:function(){var e=n.PLAYBACK_RATES;if(this._playerReady()){var t=this._api.getAvailablePlaybackRates();t&&Array.isArray(t)&&(e=t)}return e}},{key:"isInPictureInPicture",get:function(){return!1}},{key:"targetBuffer",get:function(){return NaN}},{key:"availableBuffer",get:function(){return NaN}}]),n}(i.FakeEventTarget);y(p,"_logger",Object(i.getLogger)("Youtube")),y(p,"id","youtube"),y(p,"PLAYBACK_RATES",[1]);n(2);var h="1.3.0",v="@playkit-js/playkit-js-youtube";p.isSupported()&&Object(i.registerEngine)(p.id,p)}])}));

//# sourceMappingURL=https://cdnapisec.kaltura.com/embedPlaykitJsSourceMaps/path/3_faab0d77c318e0c7f119a3a59e8f21d2
		window.__kalturaplayerdata = (window.__kalturaplayerdata || {});
		window.__kalturaplayerdata={"plugins":{"statistics":{"plugin":true},"topBarContainer":{"plugin":true},"controlBarContainer":{"plugin":true,"hover":false},"scrubber":{"plugin":true,"parent":"controlsContainer","minWidth":"100","sliderPreview":false},"largePlayBtn":{"plugin":true},"playHead":{"plugin":true},"playPauseBtn":{"plugin":true},"durationLabel":{"plugin":true},"currentTimeLabel":{"plugin":true},"liveCore":{"plugin":true},"liveStatus":{"plugin":true},"liveBackBtn":{"plugin":true},"fullScreenBtn":{"plugin":true},"playbackRateSelector":{"plugin":true,"speeds":"0.25, 0.5, 0.75, 1, 1.25, 1.5, 1.75, 2"},"playersJsReceiver":{"plugin":false},"chromecast":{"plugin":true,"parent":"controlsContainer"},"moderation":{"plugin":false},"hotspots":{"plugin":true},"titleLabel":{"align":"left","text":"{mediaProxy.entry.name}","truncateLongTitles":true,"plugin":false},"logo":{"plugin":false},"loadingSpinner":{"color":"#D04A02","plugin":true},"volumeControl":{"showSlider":true,"layout":"horizontal","pinVolumeBar":false,"accessibleControls":false,"accessibleVolumeChange":0.1,"plugin":true},"closedCaptions":{"layout":"ontop","displayCaptions":false,"enableOptionsMenu":true,"useCookie":true,"fontFamily":"Helvetica,Arial","fontsize":14,"fontColor":"#FFFFFF","bg":"rgba(8, 8, 8, 0.75)","useGlow":false,"glowBlur":4,"glowColor":"#000000","defaultLanguageKey":"en","hideWhenEmpty":true,"showEmbeddedCaptions":false,"plugin":true},"theme":{"buttonsSize":"13","watchedSliderColor":"#DC6900","plugin":true},"infoScreen":{"parent":"topBarContainer","align":"right","plugin":false},"sourceSelector":{"switchOnResize":false,"hideSource":false,"simpleFormat":true,"displayMode":"sizebitrate","plugin":true},"kalturaCuepoints":{},"uiManagers":{}},"uiVars":[{"key":"autoPlay","value":false,"overrideFlashvar":false},{"key":"enableTooltips","value":true,"overrideFlashvar":false},{"key":"IframeCustomPluginCss1","value":"\/\/cdnapisec.kaltura.com\/p\/0\/raw\/entry_id\/1_5q9jgrxb?v=2022-12-06","overrideFlashvar":false},{"key":"IframeCustomPluginJs1","value":"\/\/cdnapisec.kaltura.com\/p\/0\/raw\/entry_id\/1_p1jom24h?v=2022-12-06","overrideFlashvar":false},{"key":"loadThumbnailWithKs","value":true,"overrideFlashvar":false},{"key":"EmbedPlayer.ShowOriginalPoster","value":true,"overrideFlashvar":false},{"key":"EmbedPlayer.EnableIpadNativeFullscreen","value":true,"overrideFlashvar":false},{"key":"disableTrackElement","value":true,"overrideFlashvar":false},{"key":"Kaltura.ForceLayoutRedraw","value":true,"overrideFlashvar":true},{"key":"transcript.plugin","value":true,"overrideFlashvar":false},{"key":"transcript.onPage","value":true,"overrideFlashvar":false},{"key":"transcript.transcriptTargetId","value":"transcript-player-plugin","overrideFlashvar":false},{"key":"transcript.preferredLanguageKey","value":"en","overrideFlashvar":false}],"layout":{"skin":"kdark"},"provider":{"env":{"serviceUrl":"https:\/\/cdnapisec.kaltura.com\/api_v3","cdnUrl":"https:\/\/cfvod.kaltura.com","statsServiceUrl":"https:\/\/stats.kaltura.com","liveStatsServiceUrl":"https:\/\/livestats.kaltura.com","analyticsServiceUrl":"https:\/\/analytics.kaltura.com","apiFeatures":{"entryRedirect":"1"}}},"ui":{"translations":{"en":{"controls":{"play":"Play","pause":"Pause","language":"Language","settings":"Settings","fullscreen":"Fullscreen","fullscreenExit":"Exit fullscreen","rewind":"Seek backwards","secondsRewind":"Seek {{seconds}} seconds backwards","forward":"Seek forward","secondsForward":"Seek {{seconds}} seconds forward","vrStereo":"vrStereo","closedCaptionsOn":"Disable Captions","closedCaptionsOff":"Enable Captions","live":"Live","mute":"Mute","unmute":"Unmute","next":"Next","prev":"Prev","startOver":"Start over","pictureInPicture":"Picture in picture","pictureInPictureExit":"Exit picture in picture","logo":"Logo","seekBarSlider":"Seek bar","readLess":"Less","readMore":"More"},"unmute":{"unmute":"Unmute"},"volume":{"muted_click_to_unmute":"Muted. Click to unmute","volume_click_to_mute":"{{vol}}% volume. Click to mute","ten_percent":"ten percent","twenty_percent":"twenty percent","thirty_percent":"thirty percent","fourty_percent":"forty percent","fifty_percent":"fifty percent","sixty_percent":"sixty percent","seventy_percent":"seventy percent","eighty_percent":"eighty percent","ninety_percent":"ninety percent","one_hundred_percent":"one hundred percent","volume_slider_aria_label":"Volume","volume_slider_description":"Use the arrows to control the volume"},"copy":{"button":"Copy URL"},"settings":{"title":"Settings","audio":"Audio","quality":"Quality","speed":"Speed","speedNormal":"Normal","qualityAuto":"Auto","qualityHdLabel":"Quality is HD","quality4kLabel":"Quality is 4k","quality8kLabel":"Quality is 8k","advanced_audio_description":"Extended Audio Description","advanced_audio_description_enabled":"Disable Extended Audio Description","advanced_audio_description_disabled":"Enable Extended Audio Description"},"captions":{"captions":"Captions","advanced_captions_settings":"Advanced captions settings"},"overlay":{"close":"Close"},"error":{"default_error_title":"Something went wrong","default_error_message":"An error occurred, please try again later.","network_error_title":"There\u2019s a problem with your network","network_error_message":"Please check your network connection and try again.","media_unavailable_error_title":"Media unavailable","media_unavailable_error_message":"This media has been restricted. Please obtain relevant permissions to access content.","text_error_title":"Text stream error","text_error_message":"Text stream error occurred","media_error_title":"Media stream error","media_error_message":"One or more media streams have failed.","manifest_error_title":"Play manifest error","manifest_error_message":"Error processing the play manifest.","streaming_error_title":"Cannot load stream","streaming_error_message":"A streaming protocol error occurred.","drm_error_message":"You don\u2019t have permissions to view this media.","media_not_ready_error_title":"Media is being processed","media_not_ready_error_message":"Media is processing, check back soon.","geo_location_error_title":"Geo location unavailable","geo_location_error_message":"This content is unavailable in your region.","ip_restricted_error_message":"This media has been restricted to certain IP addresses.","default_session_text":"Copy for customer care: session ID","retry":"Try again"},"ads":{"ad_notice":"Advertisement","learn_more":"Learn more","skip_ad":"Skip ad","skip_in":"Skip in"},"cvaa":{"title":"Advanced captions settings","sample_caption_tag":"Sample {{number}}","sample_custom_caption_tag":"Custom captions","set_custom_caption":"Set custom caption","edit_caption":"Edit caption","size_label":"Size","font_color_label":"Font color","font_alignment_label":"Font alignment","font_family_label":"Font family","font_style_label":"Font style","font_opacity_label":"Font opacity","background_color_label":"Background color","background_opacity_label":"Background opacity","apply":"Apply","caption_preview":"This is your caption preview"},"cast":{"play_on_tv":"Play on TV","disconnect_from_tv":"Disconnect from TV","status":{"connecting_to":"Connecting to","connected_to":"Connected to","playing_on":"Playing on"}},"playlist":{"prev":"Previous","next":"Next","up_next":"Up Next","up_next_in":"Up next in","cancel":"Cancel"},"pictureInPicture":{"overlay_text":"Playing in Picture In Picture mode"},"watermark":{"watermark_alt_text":"Watermark"},"transcript":{"hide_plugin":"Hide Transcript","show_plugin":"Show Transcript","more_options":"More transcript options","print_transcript":"Print current transcript","download_transcript":"Download current transcript","search":"Search in Transcript","clear_search":"Clear search","next_search_match":"Next search result","prev_search_match":"Previous search result","search_results":"Search result {{current}} out of {{total}}","auto_scroll":"Resume AutoScroll","whoops":"Whoops!","load_failed":"Failed to load transcript","skip_transcript":"Skip transcript","smallScreenText":"To see the transcript, go to full screen","smallScreenMobileText":"To see the transcript, rotate the phone","attach_transcript_text":"Transcript popped out","attach_transcript_button":"Bring it back","attach_transcript":"Bring Transcript back","detach_transcript":"Popout transcript","transcript":"Transcript","caption_label":"Jump to this point in video","move_to_search":"Click to jump to search result","to_search_result":"Go to result","to_search_result_label":"Click to jump to this point in the video"}}}},"uiConfData":{"width":"400","height":"28","name":"PwC Audio Player"}};