UNPKG

theoplayer

Version:

THEOplayer is the universal video player solution, enabling you to quickly deliver cross-platform content playback.

30 lines (22 loc) 285 kB
/*! THEOplayer Usage of this software is limited by the THEOplayer License. It is prohibited to reverse engineer, decompile, translate, disassemble, decipher, decrypt, or otherwise attempt to discover the source code of this software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. For more information, visit https://www.theoplayer.com or contact contact @ theoplayer . com THEOplayer is based on patented technology developed by THEO Technologies (https://www.theoplayer.com). Version: 10.8.0 Created: 2026-01-15T14:16:26.308Z */ !function(t){"use strict";var n,i,e,r,o,u,s,f,h,c=t.window,a=t.document,v=(t.location,t.navigator),d=t.setTimeout,l=t.clearTimeout,w=t.setInterval,b=t.clearInterval,g=t.Error,m=t.TypeError,p=(t.SyntaxError,t.Object),y=t.Math,_=t.parseInt,S=t.parseFloat,T=t.isNaN,k=t.Uint8Array,I=(t.Worker,t.WorkerGlobalScope,t.XMLHttpRequest),E=p.create,R=p.defineProperty,O=p.getOwnPropertyDescriptor,N=p.getOwnPropertyNames,P=p.getPrototypeOf,A=p.prototype.hasOwnProperty,D=function(t,n){return function(){return t&&(n=t(t=0)),n}},C=function(t,n){return function(){return n||t((n={exports:{}}).exports,n),n.exports}},x=D(function(){"function"==typeof Symbol&&Symbol.iterator?(n=Symbol,i=null!=(u=Symbol.for)?u:Symbol,e=Symbol.iterator,r=null!=(s=Symbol.dispose)?s:i("Symbol.dispose"),o=null!=(f=Symbol.asyncDispose)?f:i("Symbol.asyncDispose")):(h=0,n=function(t){return"hd"+t+"_"+ ++h},e=(i=function(t){return"hd"+t})("Symbol.iterator"),r=i("Symbol.dispose"),o=i("Symbol.asyncDispose"),n.for=i,n.iterator=e,n.dispose=r,n.asyncDispose=o)});function B(t,i){return null!=i&&void 0!==n&&i[n.hasInstance]?!!i[n.hasInstance](t):t instanceof i}var M=D(function(){x(),pt()});function F(t){return t&&void 0!==n&&t.constructor===n?"symbol":typeof t}var L,U,z,W,V,H,q,X,j,Y,K,G,$,Z,J,Q,tt,nt,it,et=D(function(){x(),pt()});function rt(t){var n=this.constructor;return this.then(function(i){return n.resolve(t()).then(function(){return i})},function(i){return n.resolve(t()).then(function(){return n.reject(i)})})}function ot(t){return new this(function(n,i){if(!t||void 0===t.length)return i(new m((void 0===t?"undefined":F(t))+" "+t+" is not iterable(cannot read property Symbol(Symbol.iterator))"));var e=Array.prototype.slice.call(t);if(0===e.length)return n([]);var r=e.length;function o(t,i){if(i&&("object"===(void 0===i?"undefined":F(i))||"function"==typeof i)){var u=i.then;if("function"==typeof u)return void u.call(i,function(n){o(t,n)},function(i){e[t]={status:"rejected",reason:i},0===--r&&n(e)})}e[t]={status:"fulfilled",value:i},0===--r&&n(e)}for(var u=0;u<e.length;u++)o(u,e[u])})}function ut(t){return Boolean(t&&void 0!==t.length)}function st(){}function ft(t){if(!B(this,ft))throw new m("Promises must be constructed via new");if("function"!=typeof t)throw new m("not a function");this.Ua=0,this.IEi=!1,this.fkt=void 0,this.REi=[],lt(t,this)}function ht(t,n){for(;3===t.Ua;)t=t.fkt;0!==t.Ua?(t.IEi=!0,ft.CEi(function(){var i=1===t.Ua?n.onFulfilled:n.onRejected;if(null!==i){var e;try{e=i(t.fkt)}catch(t){return void at(n.promise,t)}ct(n.promise,e)}else(1===t.Ua?ct:at)(n.promise,t.fkt)})):t.REi.push(n)}function ct(t,n){try{if(n===t)throw new m("A promise cannot be resolved with itself.");if(n&&("object"===(void 0===n?"undefined":F(n))||"function"==typeof n)){var i=n.then;if(B(n,ft))return t.Ua=3,t.fkt=n,void vt(t);if("function"==typeof i)return void lt(function(t,n){return function(){t.apply(n,arguments)}}(i,n),t)}t.Ua=1,t.fkt=n,vt(t)}catch(n){at(t,n)}}function at(t,n){t.Ua=2,t.fkt=n,vt(t)}function vt(t){2===t.Ua&&0===t.REi.length&&ft.CEi(function(){t.IEi||ft.PEi(t.fkt)});for(var n=0,i=t.REi.length;n<i;n++)ht(t,t.REi[n]);t.REi=null}function dt(t,n,i){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof n?n:null,this.promise=i}function lt(t,n){var i=!1;try{t(function(t){i||(i=!0,ct(n,t))},function(t){i||(i=!0,at(n,t))})}catch(t){if(i)return;i=!0,at(n,t)}}function wt(t){return new G(K,{reason:t,promise:U.reject(t).catch(function(){}),cancelable:!0})}function bt(t){var n=new $(K,{detail:{reason:t},cancelable:!0});return p.defineProperty(n,"reason",{value:t}),n}function gt(t){var n=a.createEvent("CustomEvent");return n.initCustomEvent(K,!1,!0,{reason:t}),n}var mt=D(function(){var t,n,i,e;x(),pt(),M(),et(),L=d,ft.prototype.catch=function(t){return this.then(null,t)},ft.prototype.then=function(t,n){var i=new this.constructor(st);return ht(this,new dt(t,n,i)),i},ft.prototype.finally=rt,ft.all=function(t){return new ft(function(n,i){if(!ut(t))return i(new m("Promise.all accepts an array"));var e=Array.prototype.slice.call(t);if(0===e.length)return n([]);var r=e.length;function o(t,u){try{if(u&&("object"===(void 0===u?"undefined":F(u))||"function"==typeof u)){var s=u.then;if("function"==typeof s)return void s.call(u,function(n){o(t,n)},i)}e[t]=u,0===--r&&n(e)}catch(t){i(t)}}for(var u=0;u<e.length;u++)o(u,e[u])})},ft.allSettled=ot,ft.resolve=function(t){return t&&"object"===(void 0===t?"undefined":F(t))&&t.constructor===ft?t:new ft(function(n){n(t)})},ft.reject=function(t){return new ft(function(n,i){i(t)})},ft.race=function(t){return new ft(function(n,i){if(!ut(t))return i(new m("Promise.race accepts an array"));for(var e=0,r=t.length;e<r;e++)ft.resolve(t[e]).then(n,i)})},ft.CEi="function"==typeof setImmediate&&function(t){setImmediate(t)}||function(t){L(t,0)},ft.PEi=function(t){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",t)},U=function(){var t=self.Promise;if(void 0!==t)try{if(-1!==t.toString().indexOf("[native code]"))return t}catch(t){}}(),z=v?v.userAgent:"",W=z.match(/Firefox\/([0-9]+)/i),V=null!=W,H=W?Number(W[1]):0,q=z.match(/(Version)\/((\d+)\.(\d+)(?:\.(\d+))?).*Safari/),X=null!=q,j=q?Number(q[3]):0,Y=function(){function t(t){this.Ab=0,this.Wd=0,this.Kp=[],this.DEi=t}return t.prototype.NEi=function(t){var n=this.length();this.xEi(n+1);var i=this.Wd+n&this.DEi-1;this.Kp[i]=t,this.Ab=n+1},t.prototype.push=function(t){var n=this.length()+1;if(this.DEi<n)this.NEi(t);else{var i=this.Wd+n-1,e=this.DEi-1;this.Kp[i&e]=t,this.Ab=n}},t.prototype.shift=function(){var t=this.Wd,n=this.Kp[t];return this.Kp[t]=void 0,this.Wd=t+1&this.DEi-1,this.Ab--,n},t.prototype.length=function(){return this.Ab},t.prototype.xEi=function(t){this.DEi<t&&this.BEi(this.DEi<<1)},t.prototype.BEi=function(t){var n=this.DEi;this.DEi=t;var i=this.Wd+this.Ab&n-1;!function(t,n,i,e){for(var r=0;r<e;++r)t[r+i]=t[r+n],t[r+n]=void 0}(this.Kp,0,n,i)},t}(),K="unhandledrejection",G=self.PromiseRejectionEvent,$=self.CustomEvent,Z=function(t){return Z=function(){try{var t=U.resolve(),n="error",i=new G(K,{reason:n,promise:t});return K===i.type&&n===i.reason}catch(t){}return!1}()?wt:function(){try{var t="error",n=new $(K,{detail:{reason:t}});return K===n.type&&t===n.detail.reason}catch(t){}return!1}()?bt:gt,Z(t)},Q=V&&H<60||X&&j<15,U&&!Q?(tt=U,function(){}):(tt=ft,nt=null!==(J=function(){var t=self.queueMicrotask;if("function"==typeof t)return function(n){return t(n)};var n=U;if(n&&"function"==typeof n.resolve){var i=n.resolve();return function(t){return i.then(t)}}}())&&void 0!==J?J:ft.CEi,t=nt,n=new Y(16),i=!1,(it={n8:function(r){n.push(r),i||(i=!0,t(e))},UQ:e=function(){for(;n.length()>0;)n.shift()();i=!1}}).UQ,ft.CEi=it.n8,ft.PEi=function(t){try{var n=Z(t);if(!self.dispatchEvent(n)||n.defaultPrevented)return}catch(t){}d(function(){throw new g("Unhandled promise rejection: ".concat(t))},0)})}),pt=D(function(){mt()}),yt=C(function(t,i){var r,o;x(),pt(),et(),r=t,o=function(t){var i="function"==typeof n&&"symbol"===F(e)?n:function(t){return"Symbol("+t+")"};function r(){}var o=Number.isNaN||function(t){return t!=t},u=r;function s(t){return"object"===(void 0===t?"undefined":F(t))&&null!==t||"function"==typeof t}function f(t){return t.slice()}function h(t,n,i,e,r){new k(t).set(new k(i,e,r),n)}function c(t){return!1!==function(t){return"number"==typeof t&&(!o(t)&&!(t<0))}(t)&&t!==1/0}function a(t,n,i){if("function"!=typeof t)throw new m("Argument is not a function");return Function.prototype.apply.call(t,n,i)}function v(t,n,i,e){var r=t[n];if(void 0!==r){if("function"!=typeof r)throw new m(r+" is not a method");switch(i){case 0:return function(){return l(r,t,e)};case 1:return function(n){var i=[n].concat(e);return l(r,t,i)}}}return function(){return R(void 0)}}function d(t,n,i){var e=t[n];if(void 0!==e)return a(e,t,i)}function l(t,n,i){try{return R(a(t,n,i))}catch(t){return O(t)}}function w(t){if(t=Number(t),o(t)||t<0)throw new RangeError("highWaterMark property of a queuing strategy must be non-negative and non-NaN");return t}function b(t){if(void 0===t)return function(){return 1};if("function"!=typeof t)throw new m("size property of a queuing strategy must be a function");return function(n){return t(n)}}var _=tt,S=tt.prototype.then,T=tt.resolve.bind(_),I=tt.reject.bind(_);function E(t){return new _(t)}function R(t){return T(t)}function O(t){return I(t)}function N(t,n,i){return S.call(t,n,i)}function P(t,n,i){N(N(t,n,i),void 0,u)}function A(t,n){P(t,n)}function D(t,n){P(t,void 0,n)}function C(t,n,i){return N(t,n,i)}function x(t){N(t,void 0,u)}var B=function(){function t(){this.Ld=0,this.Hd=0,this.Wd={qd:[],zd:void 0},this.Gd=this.Wd,this.Ld=0,this.Hd=0}return p.defineProperty(t.prototype,"length",{get:function(){return this.Hd},enumerable:!0,configurable:!0}),t.prototype.push=function(t){var n=this.Gd,i=n;16383===n.qd.length&&(i={qd:[],zd:void 0}),n.qd.push(t),i!==n&&(this.Gd=i,n.zd=i),++this.Hd},t.prototype.shift=function(){var t=this.Wd,n=t,i=this.Ld,e=i+1,r=t.qd,o=r[i];return 16384===e&&(n=t.zd,e=0),--this.Hd,this.Ld=e,t!==n&&(this.Wd=n),r[i]=void 0,o},t.prototype.forEach=function(t){for(var n=this.Ld,i=this.Wd,e=i.qd;!(n===e.length&&void 0===i.zd||n===e.length&&(n=0,0===(e=(i=i.zd).qd).length));)t(e[n]),++n},t.prototype.peek=function(){var t=this.Wd,n=this.Ld;return t.qd[n]},t}();function M(t,n,i){var e=null;!0===i&&(e=p.prototype);var r=p.create(e);return r.value=t,r.done=n,r}function L(t,n){t.Xd=!0,t.Qd=n,n.Kd=t,"readable"===n.Ua?V(t):"closed"===n.Ua?function(t){V(t),X(t)}(t):H(t,n.Yd)}function U(t,n){return Zn(t.Qd,n)}function z(t){"readable"===t.Qd.Ua?q(t,new m("Reader was released and can no longer be used to monitor the stream's closedness")):function(t,n){H(t,n)}(t,new m("Reader was released and can no longer be used to monitor the stream's closedness")),t.Qd.Kd=void 0,t.Qd=void 0}function W(t){return new m("Cannot "+t+" a stream using a released reader")}function V(t){t.Jd=E(function(n,i){t.Zd=n,t.ul=i})}function H(t,n){V(t),q(t,n)}function q(t,n){x(t.Jd),t.ul(n),t.Zd=void 0,t.ul=void 0}function X(t){t.Zd(void 0),t.Zd=void 0,t.ul=void 0}var j=i("[[CancelSteps]]"),Y=i("[[PullSteps]]");function K(t,n){void 0===n&&(n=!1);var i=new it(t);return i.Xd=n,i}function G(t){return E(function(n,i){var e={tf:n,if:i};t.Kd.ef.push(e)})}function $(t,n,i){var e=t.Kd;e.ef.shift().tf(M(n,i,e.Xd))}function Z(t){return t.Kd.ef.length}function J(t){var n=t.Kd;return void 0!==n&&!!et(n)}var Q,nt,it=function(){function t(t){if(!1===Gn(t))throw new m("ReadableStreamDefaultReader can only be constructed with a ReadableStream instance");if(!0===$n(t))throw new m("This stream has already been locked for exclusive reading by another reader");L(this,t),this.ef=new B}return p.defineProperty(t.prototype,"closed",{get:function(){return et(this)?this.Jd:O(ot("closed"))},enumerable:!0,configurable:!0}),t.prototype.cancel=function(t){return et(this)?void 0===this.Qd?O(W("cancel")):U(this,t):O(ot("cancel"))},t.prototype.read=function(){return et(this)?void 0===this.Qd?O(W("read from")):rt(this):O(ot("read"))},t.prototype.releaseLock=function(){if(!et(this))throw ot("releaseLock");if(void 0!==this.Qd){if(this.ef.length>0)throw new m("Tried to release a reader lock when that reader has pending read() calls un-settled");z(this)}},t}();function et(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"ef")}function rt(t){var n=t.Qd;return n.nf=!0,"closed"===n.Ua?R(M(void 0,!0,t.Xd)):"errored"===n.Ua?O(n.Yd):n.rf[Y]()}function ot(t){return new m("ReadableStreamDefaultReader.prototype."+t+" can only be used on a ReadableStreamDefaultReader")}"symbol"===F(i.asyncIterator)&&((Q={})[i.asyncIterator]=function(){return this},nt=Q,p.defineProperty(nt,i.asyncIterator,{enumerable:!1}));var ut={next:function(){if(!1===st(this))return O(ft("next"));var t=this.hf;return void 0===t.Qd?O(W("iterate")):C(rt(t),function(n){var i=n.done;return i&&z(t),M(n.value,i,!0)})},return:function(t){if(!1===st(this))return O(ft("next"));var n=this.hf;if(void 0===n.Qd)return O(W("finish iterating"));if(n.ef.length>0)return O(new m("Tried to release a reader lock when that reader has pending read() calls un-settled"));if(!1===this.uf){var i=U(n,t);return z(n),C(i,function(){return M(t,!0,!0)})}return z(n),R(M(t,!0,!0))}};function st(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"hf")}function ft(t){return new m("ReadableStreamAsyncIterator."+t+" can only be used on a ReadableSteamAsyncIterator")}function ht(t){var n=t.cf.shift();return t.df-=n.size,t.df<0&&(t.df=0),n.value}function ct(t,n,i){if(!c(i=Number(i)))throw new RangeError("Size must be a finite, non-NaN, non-negative number.");t.cf.push({value:n,size:i}),t.df+=i}function at(t){t.cf=new B,t.df=0}void 0!==nt&&p.setPrototypeOf(ut,nt),p.defineProperty(ut,"next",{enumerable:!1}),p.defineProperty(ut,"return",{enumerable:!1});var vt=i("[[AbortSteps]]"),dt=i("[[ErrorSteps]]"),lt=function(){function t(t,n){void 0===t&&(t={}),void 0===n&&(n={}),bt(this);var i=n.size,e=n.highWaterMark;if(void 0!==t.type)throw new RangeError("Invalid type is specified");var r=b(i);void 0===e&&(e=1),function(t,n,i,e){var r=p.create(xt.prototype);function o(){return d(n,"start",[r])}var u=v(n,"write",1,[r]),s=v(n,"close",0,[]),f=v(n,"abort",1,[]);Bt(t,r,o,u,s,f,i,e)}(this,t,e=w(e),r)}return p.defineProperty(t.prototype,"locked",{get:function(){if(!1===gt(this))throw Vt("locked");return mt(this)},enumerable:!0,configurable:!0}),t.prototype.abort=function(t){return!1===gt(this)?O(Vt("abort")):!0===mt(this)?O(new m("Cannot abort a stream that already has a writer")):pt(this,t)},t.prototype.close=function(){return!1===gt(this)?O(Vt("close")):!0===mt(this)?O(new m("Cannot close a stream that already has a writer")):!0===kt(this)?O(new m("Cannot close an already-closing stream")):yt(this)},t.prototype.getWriter=function(){if(!1===gt(this))throw Vt("getWriter");return wt(this)},t}();function wt(t){return new Rt(t)}function bt(t){t.Ua="writable",t.Yd=void 0,t.lf=void 0,t.vf=void 0,t._f=new B,t.gf=void 0,t.pf=void 0,t.mf=void 0,t.wf=void 0,t.yf=!1}function gt(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"vf")}function mt(t){return void 0!==t.lf}function pt(t,n){var i=t.Ua;if("closed"===i||"errored"===i)return R(void 0);if(void 0!==t.wf)return t.wf.bf;var e=!1;"erroring"===i&&(e=!0,n=void 0);var r=E(function(i,r){t.wf={bf:void 0,tf:i,if:r,Af:n,Sf:e}});return t.wf.bf=r,!1===e&&St(t,n),r}function yt(t){var n=t.Ua;if("closed"===n||"errored"===n)return O(new m("The stream (in "+n+" state) is not in the writable state and cannot be closed"));var i=E(function(n,i){var e={tf:n,if:i};t.pf=e}),e=t.lf;return void 0!==e&&!0===t.yf&&"writable"===n&&Qt(e),function(t){ct(t,"close",0),Lt(t)}(t.vf),i}function _t(t,n){"writable"!==t.Ua?Tt(t):St(t,n)}function St(t,n){var i=t.vf;t.Ua="erroring",t.Yd=n;var e=t.lf;void 0!==e&&At(e,n),!1===function(t){return void 0!==t.gf||void 0!==t.mf}(t)&&!0===i.Tf&&Tt(t)}function Tt(t){t.Ua="errored",t.vf[dt]();var n=t.Yd;if(t._f.forEach(function(t){t.if(n)}),t._f=new B,void 0!==t.wf){var i=t.wf;if(t.wf=void 0,!0===i.Sf)return i.if(n),void It(t);P(t.vf[vt](i.Af),function(){i.tf(),It(t)},function(n){i.if(n),It(t)})}else It(t)}function kt(t){return void 0!==t.pf||void 0!==t.mf}function It(t){void 0!==t.pf&&(t.pf.if(t.Yd),t.pf=void 0);var n=t.lf;void 0!==n&&Yt(n,t.Yd)}function Et(t,n){var i=t.lf;void 0!==i&&n!==t.yf&&(!0===n?function(t){Gt(t)}(i):Qt(i)),t.yf=n}var Rt=function(){function t(t){if(!1===gt(t))throw new m("WritableStreamDefaultWriter can only be constructed with a WritableStream instance");if(!0===mt(t))throw new m("This stream has already been locked for exclusive writing by another writer");this.kf=t,t.lf=this;var n=t.Ua;if("writable"===n)!1===kt(t)&&!0===t.yf?Gt(this):Zt(this),Xt(this);else if("erroring"===n)$t(this,t.Yd),Xt(this);else if("closed"===n)Zt(this),function(t){Xt(t),Kt(t)}(this);else{var i=t.Yd;$t(this,i),jt(this,i)}}return p.defineProperty(t.prototype,"closed",{get:function(){return!1===Ot(this)?O(Ht("closed")):this.Jd},enumerable:!0,configurable:!0}),p.defineProperty(t.prototype,"desiredSize",{get:function(){if(!1===Ot(this))throw Ht("desiredSize");if(void 0===this.kf)throw qt("desiredSize");return function(t){var n=t.kf,i=n.Ua;return"errored"===i||"erroring"===i?null:"closed"===i?0:Ft(n.vf)}(this)},enumerable:!0,configurable:!0}),p.defineProperty(t.prototype,"ready",{get:function(){return!1===Ot(this)?O(Ht("ready")):this.Ef},enumerable:!0,configurable:!0}),t.prototype.abort=function(t){return!1===Ot(this)?O(Ht("abort")):void 0===this.kf?O(qt("abort")):function(t,n){var i=t.kf;return pt(i,n)}(this,t)},t.prototype.close=function(){if(!1===Ot(this))return O(Ht("close"));var t=this.kf;return void 0===t?O(qt("close")):!0===kt(t)?O(new m("Cannot close an already-closing stream")):Nt(this)},t.prototype.releaseLock=function(){if(!1===Ot(this))throw Ht("releaseLock");void 0!==this.kf&&Dt(this)},t.prototype.write=function(t){return!1===Ot(this)?O(Ht("write")):void 0===this.kf?O(qt("write to")):Ct(this,t)},t}();function Ot(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"kf")}function Nt(t){return yt(t.kf)}function Pt(t,n){"pending"===t.xf?Yt(t,n):function(t,n){jt(t,n)}(t,n)}function At(t,n){"pending"===t.Pf?Jt(t,n):function(t,n){$t(t,n)}(t,n)}function Dt(t){var n=t.kf,i=new m("Writer was released and can no longer be used to monitor the stream's closedness");At(t,i),Pt(t,i),n.lf=void 0,t.kf=void 0}function Ct(t,n){var i=t.kf,e=i.vf,r=function(t,n){try{return t.If(n)}catch(n){return Ut(t,n),1}}(e,n);if(i!==t.kf)return O(qt("write to"));var o=i.Ua;if("errored"===o)return O(i.Yd);if(!0===kt(i)||"closed"===o)return O(new m("The stream is closing or closed and cannot be written to"));if("erroring"===o)return O(i.Yd);var u=function(t){return E(function(n,i){var e={tf:n,if:i};t._f.push(e)})}(i);return function(t,n,i){var e={chunk:n};try{ct(t,e,i)}catch(n){return void Ut(t,n)}var r=t.Cf;!1===kt(r)&&"writable"===r.Ua&&Et(r,zt(t)),Lt(t)}(e,n,r),u}var xt=function(){function t(){throw new m("WritableStreamDefaultController cannot be constructed explicitly")}return t.prototype.error=function(t){if(!1===function(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"Cf")}(this))throw new m("WritableStreamDefaultController.prototype.error can only be used on a WritableStreamDefaultController");"writable"===this.Cf.Ua&&Wt(this,t)},t.prototype[vt]=function(t){var n=this.Rf(t);return Mt(this),n},t.prototype[dt]=function(){at(this)},t}();function Bt(t,n,i,e,r,o,u,s){n.Cf=t,t.vf=n,n.cf=void 0,n.df=void 0,at(n),n.Tf=!1,n.If=s,n.Df=u,n.Bf=e,n.Nf=r,n.Rf=o;var f=zt(n);Et(t,f),P(R(i()),function(){n.Tf=!0,Lt(n)},function(i){n.Tf=!0,_t(t,i)})}function Mt(t){t.Bf=void 0,t.Nf=void 0,t.Rf=void 0,t.If=void 0}function Ft(t){return t.Df-t.df}function Lt(t){var n=t.Cf;if(!1!==t.Tf&&void 0===n.gf)if("erroring"!==n.Ua){if(0!==t.cf.length){var i=function(t){return t.cf.peek().value}(t);"close"===i?function(t){var n=t.Cf;(function(t){t.mf=t.pf,t.pf=void 0})(n),ht(t);var i=t.Nf();Mt(t),P(i,function(){!function(t){t.mf.tf(void 0),t.mf=void 0,"erroring"===t.Ua&&(t.Yd=void 0,void 0!==t.wf&&(t.wf.tf(),t.wf=void 0)),t.Ua="closed";var n=t.lf;void 0!==n&&Kt(n)}(n)},function(t){!function(t,n){t.mf.if(n),t.mf=void 0,void 0!==t.wf&&(t.wf.if(n),t.wf=void 0),_t(t,n)}(n,t)})}(t):function(t,n){var i=t.Cf;!function(t){t.gf=t._f.shift()}(i);var e=t.Bf(n);P(e,function(){!function(t){t.gf.tf(void 0),t.gf=void 0}(i);var n=i.Ua;if(ht(t),!1===kt(i)&&"writable"===n){var e=zt(t);Et(i,e)}Lt(t)},function(n){"writable"===i.Ua&&Mt(t),function(t,n){t.gf.if(n),t.gf=void 0,_t(t,n)}(i,n)})}(t,i.chunk)}}else Tt(n)}function Ut(t,n){"writable"===t.Cf.Ua&&Wt(t,n)}function zt(t){return Ft(t)<=0}function Wt(t,n){var i=t.Cf;Mt(t),St(i,n)}function Vt(t){return new m("WritableStream.prototype."+t+" can only be used on a WritableStream")}function Ht(t){return new m("WritableStreamDefaultWriter.prototype."+t+" can only be used on a WritableStreamDefaultWriter")}function qt(t){return new m("Cannot "+t+" a stream using a released writer")}function Xt(t){t.Jd=E(function(n,i){t.Zd=n,t.ul=i,t.xf="pending"})}function jt(t,n){Xt(t),Yt(t,n)}function Yt(t,n){x(t.Jd),t.ul(n),t.Zd=void 0,t.ul=void 0,t.xf="rejected"}function Kt(t){t.Zd(void 0),t.Zd=void 0,t.ul=void 0,t.xf="resolved"}function Gt(t){t.Ef=E(function(n,i){t.Mf=n,t.Lf=i}),t.Pf="pending"}function $t(t,n){Gt(t),Jt(t,n)}function Zt(t){Gt(t),Qt(t)}function Jt(t,n){x(t.Ef),t.Lf(n),t.Mf=void 0,t.Lf=void 0,t.Pf="rejected"}function Qt(t){t.Mf(void 0),t.Mf=void 0,t.Lf=void 0,t.Pf="fulfilled"}function tn(t){if("object"!==(void 0===t?"undefined":F(t))||null===t)return!1;try{return"boolean"==typeof t.aborted}catch(t){return!1}}var nn,en="undefined"!=typeof DOMException?DOMException:void 0,rn=function(t){if("function"!=typeof t&&"object"!==(void 0===t?"undefined":F(t)))return!1;try{return new t,!0}catch(t){return!1}}(en)?en:((nn=function(t,n){this.message=t||"",this.name=n||"Error",g.captureStackTrace&&g.captureStackTrace(this,this.constructor)}).prototype=p.create(g.prototype),p.defineProperty(nn.prototype,"constructor",{value:nn,writable:!0,configurable:!0}),nn);function on(t,n,i,e,o,u){var s=K(t),f=wt(n);t.nf=!0;var h=!1,c=R(void 0);return E(function(a,v){var d,l,w,b;if(void 0!==u){if(d=function(){var i=new rn("Aborted","AbortError"),r=[];!1===e&&r.push(function(){return"writable"===n.Ua?pt(n,i):R(void 0)}),!1===o&&r.push(function(){return"readable"===t.Ua?Zn(t,i):R(void 0)}),_(function(){return tt.all(r.map(function(t){return t()}))},!0,i)},!0===u.aborted)return void d();u.addEventListener("abort",d)}if(y(t,s.Jd,function(t){!1===e?_(function(){return pt(n,t)},!0,t):S(!0,t)}),y(n,f.Jd,function(n){!1===o?_(function(){return Zn(t,n)},!0,n):S(!0,n)}),l=t,w=s.Jd,b=function(){!1===i?_(function(){return function(t){var n=t.kf,i=n.Ua;return!0===kt(n)||"closed"===i?R(void 0):"errored"===i?O(n.Yd):Nt(t)}(f)}):S()},"closed"===l.Ua?b():A(w,b),!0===kt(n)||"closed"===n.Ua){var g=new m("the destination writable stream closed before all data could be piped to it");!1===o?_(function(){return Zn(t,g)},!0,g):S(!0,g)}function p(){var t=c;return N(c,function(){return t!==c?p():void 0})}function y(t,n,i){"errored"===t.Ua?i(t.Yd):D(n,i)}function _(t,i,e){function r(){P(t(),function(){return T(i,e)},function(t){return T(!0,t)})}!0!==h&&(h=!0,"writable"===n.Ua&&!1===kt(n)?A(p(),r):r())}function S(t,i){!0!==h&&(h=!0,"writable"===n.Ua&&!1===kt(n)?A(p(),function(){return T(t,i)}):T(t,i))}function T(t,n){Dt(f),z(s),void 0!==u&&u.removeEventListener("abort",d),t?v(n):a(void 0)}x(E(function(t,n){!function i(e){e?t():N(!0===h?R(!0):N(f.Ef,function(){return N(rt(s),function(t){return!0===t.done||(c=N(Ct(f,t.value),void 0,r),!1)})}),i,n)}(!1)}))})}var un=function(){function t(){throw new m}return p.defineProperty(t.prototype,"desiredSize",{get:function(){if(!1===sn(this))throw gn("desiredSize");return ln(this)},enumerable:!0,configurable:!0}),t.prototype.close=function(){if(!1===sn(this))throw gn("close");if(!1===wn(this))throw new m("The stream is not in a state that permits close");an(this)},t.prototype.enqueue=function(t){if(!1===sn(this))throw gn("enqueue");if(!1===wn(this))throw new m("The stream is not in a state that permits enqueue");return vn(this,t)},t.prototype.error=function(t){if(!1===sn(this))throw gn("error");dn(this,t)},t.prototype[j]=function(t){at(this);var n=this.Of(t);return cn(this),n},t.prototype[Y]=function(){var t=this.Ff;if(this.cf.length>0){var n=ht(this);return!0===this.Uf&&0===this.cf.length?(cn(this),Jn(t)):fn(this),R(M(n,!1,t.Kd.Xd))}var i=G(t);return fn(this),i},t}();function sn(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"Ff")}function fn(t){!1!==hn(t)&&(!0!==t.Vf?(t.Vf=!0,P(t.Hf(),function(){t.Vf=!1,!0===t.Wf&&(t.Wf=!1,fn(t))},function(n){dn(t,n)})):t.Wf=!0)}function hn(t){var n=t.Ff;return!1!==wn(t)&&!1!==t.Tf&&(!0===$n(n)&&Z(n)>0||ln(t)>0)}function cn(t){t.Hf=void 0,t.Of=void 0,t.If=void 0}function an(t){var n=t.Ff;t.Uf=!0,0===t.cf.length&&(cn(t),Jn(n))}function vn(t,n){var i=t.Ff;if(!0===$n(i)&&Z(i)>0)$(i,n,!1);else{var e=void 0;try{e=t.If(n)}catch(n){throw dn(t,n),n}try{ct(t,n,e)}catch(n){throw dn(t,n),n}}fn(t)}function dn(t,n){var i=t.Ff;"readable"===i.Ua&&(at(t),cn(t),Qn(i,n))}function ln(t){var n=t.Ff.Ua;return"errored"===n?null:"closed"===n?0:t.Df-t.df}function wn(t){var n=t.Ff.Ua;return!1===t.Uf&&"readable"===n}function bn(t,n,i,e,r,o,u){n.Ff=t,n.cf=void 0,n.df=void 0,at(n),n.Tf=!1,n.Uf=!1,n.Wf=!1,n.Vf=!1,n.If=u,n.Df=o,n.Hf=e,n.Of=r,t.rf=n,P(R(i()),function(){n.Tf=!0,fn(n)},function(t){dn(n,t)})}function gn(t){return new m("ReadableStreamDefaultController.prototype."+t+" can only be used on a ReadableStreamDefaultController")}var mn=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&y.floor(t)===t},pn=function(){function t(){throw new m("ReadableStreamBYOBRequest cannot be used directly")}return p.defineProperty(t.prototype,"view",{get:function(){if(!1===Sn(this))throw Ln("view");return this.qf},enumerable:!0,configurable:!0}),t.prototype.respond=function(t){if(!1===Sn(this))throw Ln("respond");if(void 0===this.zf)throw new m("This BYOB request has been invalidated");this.qf.buffer,function(t,n){if(!1===c(n=Number(n)))throw new RangeError("bytesWritten must be a finite");Dn(t,n)}(this.zf,t)},t.prototype.respondWithNewView=function(t){if(!1===Sn(this))throw Ln("respond");if(void 0===this.zf)throw new m("This BYOB request has been invalidated");if(!ArrayBuffer.isView(t))throw new m("You can only respond with array buffer views");t.buffer,function(t,n){var i=t.Gf.peek();if(i.byteOffset+i.bytesFilled!==n.byteOffset)throw new RangeError("The region specified by view does not match byobRequest");if(i.byteLength!==n.byteLength)throw new RangeError("The buffer of view has different capacity than byobRequest");i.buffer=n.buffer,Dn(t,n.byteLength)}(this.zf,t)},t}(),yn=function(){function t(){throw new m("ReadableByteStreamController constructor cannot be used directly")}return p.defineProperty(t.prototype,"byobRequest",{get:function(){if(!1===_n(this))throw Un("byobRequest");if(void 0===this.Xf&&this.Gf.length>0){var t=this.Gf.peek(),n=new k(t.buffer,t.byteOffset+t.bytesFilled,t.byteLength-t.bytesFilled),i=p.create(pn.prototype);!function(t,n,i){t.zf=n,t.qf=i}(i,this,n),this.Xf=i}return this.Xf},enumerable:!0,configurable:!0}),p.defineProperty(t.prototype,"desiredSize",{get:function(){if(!1===_n(this))throw Un("desiredSize");return Mn(this)},enumerable:!0,configurable:!0}),t.prototype.close=function(){if(!1===_n(this))throw Un("close");if(!0===this.Uf)throw new m("The stream has already been closed; do not close it again!");var t=this.jf.Ua;if("readable"!==t)throw new m("The stream (in "+t+" state) is not in the readable state and cannot be closed");!function(t){var n=t.jf;if(t.df>0)t.Uf=!0;else{if(t.Gf.length>0&&t.Gf.peek().bytesFilled>0){var i=new m("Insufficient bytes to fill elements in the given buffer");throw Bn(t,i),i}xn(t),Jn(n)}}(this)},t.prototype.enqueue=function(t){if(!1===_n(this))throw Un("enqueue");if(!0===this.Uf)throw new m("stream is closed or draining");var n=this.jf.Ua;if("readable"!==n)throw new m("The stream (in "+n+" state) is not in the readable state and cannot be enqueued to");if(!ArrayBuffer.isView(t))throw new m("You can only enqueue array buffer views when using a ReadableByteStreamController");t.buffer,function(t,n){var i=t.jf,e=n.buffer,r=n.byteOffset,o=n.byteLength,u=e;!0===J(i)?0===Z(i)?En(t,u,r,o):$(i,new k(u,r,o),!1):!0===Vn(i)?(En(t,u,r,o),An(t)):En(t,u,r,o),Tn(t)}(this,t)},t.prototype.error=function(t){if(!1===_n(this))throw Un("error");Bn(this,t)},t.prototype[j]=function(t){this.Gf.length>0&&(this.Gf.peek().bytesFilled=0),at(this);var n=this.Of(t);return xn(this),n},t.prototype[Y]=function(){var t=this.jf;if(this.df>0){var n=this.cf.shift();this.df-=n.byteLength,Nn(this);var i=void 0;try{i=new k(n.buffer,n.byteOffset,n.byteLength)}catch(t){return O(t)}return R(M(i,!1,t.Kd.Xd))}var e=this.Qf;if(void 0!==e){var r=void 0;try{r=new ArrayBuffer(e)}catch(t){return O(t)}var o={buffer:r,byteOffset:0,byteLength:e,bytesFilled:0,elementSize:1,ctor:k,readerType:"default"};this.Gf.push(o)}var u=G(t);return Tn(this),u},t}();function _n(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"jf")}function Sn(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"zf")}function Tn(t){var n=function(t){var n=t.jf;if("readable"!==n.Ua)return!1;if(!0===t.Uf)return!1;if(!1===t.Tf)return!1;if(!0===J(n)&&Z(n)>0)return!0;if(!0===Vn(n)&&Wn(n)>0)return!0;var i=Mn(t);return i>0}(t);!1!==n&&(!0!==t.Vf?(t.Vf=!0,P(t.Hf(),function(){t.Vf=!1,!0===t.Wf&&(t.Wf=!1,Tn(t))},function(n){Bn(t,n)})):t.Wf=!0)}function kn(t,n){var i=!1;"closed"===t.Ua&&(i=!0);var e=In(n);"default"===n.readerType?$(t,e,i):function(t,n,i){var e=t.Kd,r=e.Kf.shift();r.tf(M(n,i,e.Xd))}(t,e,i)}function In(t){var n=t.bytesFilled,i=t.elementSize;return new t.ctor(t.buffer,t.byteOffset,n/i)}function En(t,n,i,e){t.cf.push({buffer:n,byteOffset:i,byteLength:e}),t.df+=e}function Rn(t,n){var i=n.elementSize,e=n.bytesFilled-n.bytesFilled%i,r=y.min(t.df,n.byteLength-n.bytesFilled),o=n.bytesFilled+r,u=o-o%i,s=r,f=!1;u>e&&(s=u-n.bytesFilled,f=!0);for(var c=t.cf;s>0;){var a=c.peek(),v=y.min(s,a.byteLength),d=n.byteOffset+n.bytesFilled;h(n.buffer,d,a.buffer,a.byteOffset,v),a.byteLength===v?c.shift():(a.byteOffset+=v,a.byteLength-=v),t.df-=v,On(t,v,n),s-=v}return f}function On(t,n,i){Pn(t),i.bytesFilled+=n}function Nn(t){0===t.df&&!0===t.Uf?(xn(t),Jn(t.jf)):Tn(t)}function Pn(t){void 0!==t.Xf&&(t.Xf.zf=void 0,t.Xf.qf=void 0,t.Xf=void 0)}function An(t){for(;t.Gf.length>0;){if(0===t.df)return;var n=t.Gf.peek();!0===Rn(t,n)&&(Cn(t),kn(t.jf,n))}}function Dn(t,n){var i=t.Gf.peek();if("closed"===t.jf.Ua){if(0!==n)throw new m("bytesWritten must be 0 when calling respond() on a closed stream");!function(t,n){n.buffer=n.buffer;var i=t.jf;if(!0===Vn(i))for(;Wn(i)>0;)kn(i,Cn(t))}(t,i)}else!function(t,n,i){if(i.bytesFilled+n>i.byteLength)throw new RangeError("bytesWritten out of range");if(On(t,n,i),!(i.bytesFilled<i.elementSize)){Cn(t);var e=i.bytesFilled%i.elementSize;if(e>0){var r=i.byteOffset+i.bytesFilled,o=i.buffer.slice(r-e,r);En(t,o,0,o.byteLength)}i.buffer=i.buffer,i.bytesFilled-=e,kn(t.jf,i),An(t)}}(t,n,i);Tn(t)}function Cn(t){var n=t.Gf.shift();return Pn(t),n}function xn(t){t.Hf=void 0,t.Of=void 0}function Bn(t,n){var i=t.jf;"readable"===i.Ua&&(function(t){Pn(t),t.Gf=new B}(t),at(t),xn(t),Qn(i,n))}function Mn(t){var n=t.jf.Ua;return"errored"===n?null:"closed"===n?0:t.Df-t.df}function Fn(t,n,i){var e=p.create(yn.prototype),r=v(n,"pull",0,[e]),o=v(n,"cancel",1,[]),u=n.autoAllocateChunkSize;if(void 0!==u&&(u=Number(u),!1===mn(u)||u<=0))throw new RangeError("autoAllocateChunkSize must be a positive integer");!function(t,n,i,e,r,o,u){n.jf=t,n.Wf=!1,n.Vf=!1,n.Xf=void 0,n.cf=n.df=void 0,at(n),n.Uf=!1,n.Tf=!1,n.Df=w(o),n.Hf=e,n.Of=r,n.Qf=u,n.Gf=new B,t.rf=n,P(R(i()),function(){n.Tf=!0,Tn(n)},function(t){Bn(n,t)})}(t,e,function(){return d(n,"start",[e])},r,o,i,u)}function Ln(t){return new m("ReadableStreamBYOBRequest.prototype."+t+" can only be used on a ReadableStreamBYOBRequest")}function Un(t){return new m("ReadableByteStreamController.prototype."+t+" can only be used on a ReadableByteStreamController")}function zn(t){return E(function(n,i){var e={tf:n,if:i};t.Kd.Kf.push(e)})}function Wn(t){return t.Kd.Kf.length}function Vn(t){var n=t.Kd;return void 0!==n&&!!qn(n)}var Hn=function(){function t(t){if(!Gn(t))throw new m("ReadableStreamBYOBReader can only be constructed with a ReadableStream instance given a byte source");if(!1===_n(t.rf))throw new m("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");if($n(t))throw new m("This stream has already been locked for exclusive reading by another reader");L(this,t),this.Kf=new B}return p.defineProperty(t.prototype,"closed",{get:function(){return qn(this)?this.Jd:O(Xn("closed"))},enumerable:!0,configurable:!0}),t.prototype.cancel=function(t){return qn(this)?void 0===this.Qd?O(W("cancel")):U(this,t):O(Xn("cancel"))},t.prototype.read=function(t){return qn(this)?void 0===this.Qd?O(W("read from")):ArrayBuffer.isView(t)?(t.buffer,0===t.byteLength?O(new m("view must have non-zero byteLength")):function(t,n){var i=t.Qd;return i.nf=!0,"errored"===i.Ua?O(i.Yd):function(t,n){var i=t.jf,e=1;n.constructor!==DataView&&(e=n.constructor.BYTES_PER_ELEMENT);var r=n.constructor,o={buffer:n.buffer,byteOffset:n.byteOffset,byteLength:n.byteLength,bytesFilled:0,elementSize:e,ctor:r,readerType:"byob"};if(t.Gf.length>0)return t.Gf.push(o),zn(i);if("closed"===i.Ua)return R(M(new r(o.buffer,o.byteOffset,0),!0,i.Kd.Xd));if(t.df>0){if(!0===Rn(t,o)){var u=In(o);return Nn(t),R(M(u,!1,i.Kd.Xd))}if(!0===t.Uf){var s=new m("Insufficient bytes to fill elements in the given buffer");return Bn(t,s),O(s)}}t.Gf.push(o);var f=zn(i);return Tn(t),f}(i.rf,n)}(this,t)):O(new m("view must be an array buffer view")):O(Xn("read"))},t.prototype.releaseLock=function(){if(!qn(this))throw Xn("releaseLock");if(void 0!==this.Qd){if(this.Kf.length>0)throw new m("Tried to release a reader lock when that reader has pending read() calls un-settled");z(this)}},t}();function qn(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"Kf")}function Xn(t){return new m("ReadableStreamBYOBReader.prototype."+t+" can only be used on a ReadableStreamBYOBReader")}var jn=function(){function t(t,n){void 0===t&&(t={}),void 0===n&&(n={}),Kn(this);var i=n.size,e=n.highWaterMark,r=t.type;if("bytes"===String(r)){if(void 0!==i)throw new RangeError("The strategy for a byte stream cannot have a size function");void 0===e&&(e=0),Fn(this,t,e=w(e))}else{if(void 0!==r)throw new RangeError("Invalid type is specified");var o=b(i);void 0===e&&(e=1),function(t,n,i,e){var r=p.create(un.prototype),o=v(n,"pull",0,[r]),u=v(n,"cancel",1,[]);bn(t,r,function(){return d(n,"start",[r])},o,u,i,e)}(this,t,e=w(e),o)}}return p.defineProperty(t.prototype,"locked",{get:function(){if(!1===Gn(this))throw ti("locked");return $n(this)},enumerable:!0,configurable:!0}),t.prototype.cancel=function(t){return!1===Gn(this)?O(ti("cancel")):!0===$n(this)?O(new m("Cannot cancel a stream that already has a reader")):Zn(this,t)},t.prototype.getReader=function(t){var n=(void 0===t?{}:t).mode;if(!1===Gn(this))throw ti("getReader");if(void 0===n)return K(this,!0);if("byob"===(n=String(n)))return function(t,n){void 0===n&&(n=!1);var i=new Hn(t);return i.Xd=n,i}(this,!0);throw new RangeError("Invalid mode is specified")},t.prototype.pipeThrough=function(t,n){var i=t.writable,e=t.readable,r=void 0===n?{}:n,o=r.preventClose,u=r.preventAbort,s=r.preventCancel,f=r.signal;if(!1===Gn(this))throw ti("pipeThrough");if(!1===gt(i))throw new m("writable argument to pipeThrough must be a WritableStream");if(!1===Gn(e))throw new m("readable argument to pipeThrough must be a ReadableStream");if(o=Boolean(o),u=Boolean(u),s=Boolean(s),void 0!==f&&!tn(f))throw new m("ReadableStream.prototype.pipeThrough's signal option must be an AbortSignal");if(!0===$n(this))throw new m("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if(!0===mt(i))throw new m("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");return x(on(this,i,o,u,s,f)),e},t.prototype.pipeTo=function(t,n){var i=void 0===n?{}:n,e=i.preventClose,r=i.preventAbort,o=i.preventCancel,u=i.signal;return!1===Gn(this)?O(ti("pipeTo")):!1===gt(t)?O(new m("ReadableStream.prototype.pipeTo's first argument must be a WritableStream")):(e=Boolean(e),r=Boolean(r),o=Boolean(o),void 0===u||tn(u)?!0===$n(this)?O(new m("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):!0===mt(t)?O(new m("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):on(this,t,e,r,o,u):O(new m("ReadableStream.prototype.pipeTo's signal option must be an AbortSignal")))},t.prototype.tee=function(){if(!1===Gn(this))throw ti("tee");var t=function(t){var n,i,e,r,o,u=K(t),s=!1,h=!1,c=!1,a=E(function(t){o=t});function v(){return!0===s||(s=!0,x(C(rt(u),function(t){if(s=!1,!0===t.done)return!1===h&&an(e.rf),void(!1===c&&an(r.rf));var n=t.value,i=n,o=n;!1===h&&vn(e.rf,i),!1===c&&vn(r.rf,o)}))),R(void 0)}function d(){}return e=Yn(d,v,function(e){if(h=!0,n=e,!0===c){var r=f([n,i]),u=Zn(t,r);o(u)}return a}),r=Yn(d,v,function(e){if(c=!0,i=e,!0===h){var r=f([n,i]),u=Zn(t,r);o(u)}return a}),D(u.Jd,function(t){dn(e.rf,t),dn(r.rf,t)}),[e,r]}(this);return f(t)},t.prototype.getIterator=function(t){var n=(void 0===t?{}:t).preventCancel,i=void 0!==n&&n;if(!1===Gn(this))throw ti("getIterator");return function(t,n){void 0===n&&(n=!1);var i=K(t),e=p.create(ut);return e.hf=i,e.uf=Boolean(n),e}(this,i)},t}();function Yn(t,n,i,e,r){void 0===e&&(e=1),void 0===r&&(r=function(){return 1});var o=p.create(jn.prototype);return Kn(o),bn(o,p.create(un.prototype),t,n,i,e,r),o}function Kn(t){t.Ua="readable",t.Kd=void 0,t.Yd=void 0,t.nf=!1}function Gn(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"rf")}function $n(t){return void 0!==t.Kd}function Zn(t,n){return t.nf=!0,"closed"===t.Ua?R(void 0):"errored"===t.Ua?O(t.Yd):(Jn(t),C(t.rf[j](n),r))}function Jn(t){t.Ua="closed";var n=t.Kd;void 0!==n&&(et(n)&&(n.ef.forEach(function(t){t.tf(M(void 0,!0,n.Xd))}),n.ef=new B),X(n))}function Qn(t,n){t.Ua="errored",t.Yd=n;var i=t.Kd;void 0!==i&&(et(i)?(i.ef.forEach(function(t){t.if(n)}),i.ef=new B):(i.Kf.forEach(function(t){t.if(n)}),i.Kf=new B),q(i,n))}function ti(t){return new m("ReadableStream.prototype."+t+" can only be used on a ReadableStream")}"symbol"===F(i.asyncIterator)&&p.defineProperty(jn.prototype,i.asyncIterator,{value:jn.prototype.getIterator,enumerable:!1,writable:!0,configurable:!0});var ni=function(){function t(t){var n=t.highWaterMark;this.highWaterMark=n}return t.prototype.size=function(t){return t.byteLength},t}(),ii=function(){function t(t){var n=t.highWaterMark;this.highWaterMark=n}return t.prototype.size=function(){return 1},t}(),ei=function(){function t(t,n,i){void 0===t&&(t={}),void 0===n&&(n={}),void 0===i&&(i={});var e=n.size,r=n.highWaterMark,o=i.size,u=i.highWaterMark;if(void 0!==t.writableType)throw new RangeError("Invalid writable type specified");var s=b(e);if(void 0===r&&(r=1),r=w(r),void 0!==t.readableType)throw new RangeError("Invalid readable type specified");var f,h=b(o);void 0===u&&(u=0),u=w(u),function(t,n,i,e,r,o){function u(){return n}function s(n){return function(t,n){var i=t.Yf;return!0===t.yf?C(t.Jf,function(){var e=t.Zf;if("erroring"===e.Ua)throw e.Yd;return vi(i,n)}):vi(i,n)}(t,n)}function f(n){return function(t,n){return oi(t,n),R(void 0)}(t,n)}function h(){return function(t){var n=t.$f,i=t.Yf,e=i.rv();return ci(i),C(e,function(){if("errored"===n.Ua)throw n.Yd;var t=n.rf;!0===wn(t)&&an(t)},function(i){throw oi(t,i),n.Yd})}(t)}function c(){return function(t){return si(t,!1),t.Jf}(t)}function a(n){return ui(t,n),R(void 0)}t.Zf=function(t,n,i,e,r,o){void 0===r&&(r=1),void 0===o&&(o=function(){return 1});var u=p.create(lt.prototype);return bt(u),Bt(u,p.create(xt.prototype),t,n,i,e,r,o),u}(u,s,h,f,i,e),t.$f=Yn(u,c,a,r,o),t.yf=void 0,t.Jf=void 0,t.hv=void 0,si(t,!0),t.Yf=void 0}(this,E(function(t){f=t}),r,s,u,h),function(t,n){var i=p.create(fi.prototype),e=function(t){try{return ai(i,t),R(void 0)}catch(t){return O(t)}},r=n.transform;if(void 0!==r){if("function"!=typeof r)throw new m("transform is not a method");e=function(t){return l(r,n,[t,i])}}var o=v(n,"flush",0,[i]);!function(t,n,i,e){n.ov=t,t.Yf=n,n.uv=i,n.rv=e}(t,i,e,o)}(this,t);var c=d(t,"start",[this.Yf]);f(c)}return p.defineProperty(t.prototype,"readable",{get:function(){if(!1===ri(this))throw li("readable");return this.$f},enumerable:!0,configurable:!0}),p.defineProperty(t.prototype,"writable",{get:function(){if(!1===ri(this))throw li("writable");return this.Zf},enumerable:!0,configurable:!0}),t}();function ri(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"Yf")}function oi(t,n){dn(t.$f.rf,n),ui(t,n)}function ui(t,n){ci(t.Yf),Ut(t.Zf.vf,n),!0===t.yf&&si(t,!1)}function si(t,n){void 0!==t.Jf&&t.hv(),t.Jf=E(function(n){t.hv=n}),t.yf=n}var fi=function(){function t(){throw new m("TransformStreamDefaultController instances cannot be created directly")}return p.defineProperty(t.prototype,"desiredSize",{get:function(){if(!1===hi(this))throw di("desiredSize");return ln(this.ov.$f.rf)},enumerable:!0,configurable:!0}),t.prototype.enqueue=function(t){if(!1===hi(this))throw di("enqueue");ai(this,t)},t.prototype.error=function(t){if(!1===hi(this))throw di("error");!function(t,n){oi(t.ov,n)}(this,t)},t.prototype.terminate=function(){if(!1===hi(this))throw di("terminate");!function(t){var n=t.ov,i=n.$f.rf;!0===wn(i)&&an(i);var e=new m("TransformStream terminated");ui(n,e)}(this)},t}();function hi(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"ov")}function ci(t){t.uv=void 0,t.rv=void 0}function ai(t,n){var i=t.ov,e=i.$f.rf;if(!1===wn(e))throw new m("Readable side is not in a state that permits enqueue");try{vn(e,n)}catch(t){throw ui(i,t),i.$f.Yd}var r=function(t){return!0!==hn(t)}(e);r!==i.yf&&si(i,!0)}function vi(t,n){return C(t.uv(n),void 0,function(n){throw oi(t.ov,n),n})}function di(t){return new m("TransformStreamDefaultController.prototype."+t+" can only be used on a TransformStreamDefaultController")}function li(t){return new m("TransformStream.prototype."+t+" can only be used on a TransformStream")}t.ByteLengthQueuingStrategy=ni,t.CountQueuingStrategy=ii,t.ReadableStream=jn,t.TransformStream=ei,t.WritableStream=lt,p.defineProperty(t,"__esModule",{value:!0})},"object"===(void 0===t?"undefined":F(t))&&void 0!==i?o(t):"function"==typeof define&&define.amd?define(["exports"],o):o((r=r||self).WebStreamsPolyfill={})}),_t=C(function(t){function n(){var t=yt();return n=function(){return t},t}x(),pt(),p.defineProperty(t,"__esModule",{value:!0}),function(t,n){for(var i in n)p.defineProperty(t,i,{enumerable:!0,get:p.getOwnPropertyDescriptor(n,i).get})}(t,{get ByteLengthQueuingStrategy(){return n().ByteLengthQueuingStrategy},get CountQueuingStrategy(){return n().CountQueuingStrategy},get ReadableStream(){return n().ReadableStream},get TransformStream(){return n().TransformStream},get WritableStream(){return n().WritableStream}})});function St(t,n){return(St=p.setPrototypeOf||function(t,n){return t.__proto__=n,t})(t,n)}function Tt(t,n){if("function"!=typeof n&&null!==n)throw new m("Super expression must either be null or a function");t.prototype=p.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),n&&St(t,n)}function kt(t,n){for(var i=0;i<n.length;i++){var e=n[i];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),p.defineProperty(t,e.key,e)}}function It(t,n,i){return n&&kt(t.prototype,n),i&&kt(t,i),t}function Et(t,n){(null==n||n>t.length)&&(n=t.length);for(var i=0,e=new Array(n);i<n;i++)e[i]=t[i];return e}function Rt(t,i){var r=void 0!==n&&t[e]||t["@@iterator"];if(r)return(r=r.call(t)).next.bind(r);if(Array.isArray(t)||(r=function(t,n){if(t){if("string"==typeof t)return Et(t,n);var i=p.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(i):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?Et(t,n):void 0}}(t))||i&&t&&"number"==typeof t.length){r&&(t=r);var o=0;return function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}}}throw new m("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}x(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt(),M(),x(),pt(),M(),x(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt(),M(),x(),pt();var Ot,Nt=((Ot={}).Rv="web",Ot.Dv="android",Ot.Bv="android-tv",Ot.Nv="ios",Ot.Mv="tvos",Ot.Lv="chromecast",Ot.Ov="theoliveweb",Ot);var Pt=v?v.userAgent:"",At=Pt.match(/chrome\/([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/i),Dt=Pt.match(/Edg\/([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/i),Ct=Pt.match(/Android ([0-9\.]+)/i),xt=Pt.match(/Windows NT ([0-9\.]+)/i),Bt=Pt.match(/(Version)\/((\d+)\.(\d+)(?:\.(\d+))?).*Safari/),Mt=Pt.match(/Firefox\/([0-9\.]+)/i),Ft=Pt.match(/OPR\/(\d+\.\d+)/i),Lt=Pt.match(/Tizen ([0-9\.]+)/i),Ut=Pt.match(/(iPhone OS|iPad OS|iPod OS|Mac OS X) (\d+)_(\d+)_?(\d+)?/),zt=Pt.match(/HbbTV\/([0-9.]+)/i),Wt=Pt.match(/(AFT.*) Build/i),Vt=function(){function t(){this.Fv=Boolean("ontouchstart"in self||self.DocumentTouch&&B(a,self.DocumentTouch)||v&&v.msMaxTouchPoints),this.Vv=/(mac\sos\sx)\s?([\w\s\.]+\w)*/i.test(Pt)||/(macintosh|mac(?=_powerpc)\s)/i.test(Pt),this.Wv=/Windows NT/i.test(Pt),this.zv=xt?S(xt[1]):0,this.Xv=/Android/i.test(Pt),this.Kv=Ct?S(Ct[1]):0,this.Jv=/windows phone (8|8\.1)/i.test(Pt),this.$v=/iPhone/i.test(Pt),this.i_=/iPad/i.test(Pt),this.s_=this.Vv&&this.Fv&&!this.i_,this.r_=/iPod/i.test(Pt),this.l_=/Mobile Safari/i.test(Pt),this.c_=/EOS\d*STB/i.test(Pt),this.d_=/APP\d*STB/i.test(Pt),this.h_=(this.$v||this.i_||this.s_||this.r_)&&!this.Jv,this.a_=Ut?S(Ut[2]):0,this.f_=this.Jv||this.h_||this.Xv||this.l_,this.__=/CriOS/i.test(Pt),this.p_=Boolean(self.chrome&&/google/i.test(v.vendor))||this.__,this.A_=this.p_&&/Edg\//i.test(v.userAgent),this.T_=Dt?_(Dt[1],10):0,this.Vg=Boolean(/CriOS/i.test(Pt)),this.Ug=Boolean(self.chrome||/Chrome/i.test(Pt)||this.Vg),this.y_=At?_(At[1],10):0,this.x_=/SMART-TV.*Tizen/i.test(Pt),this.I_=Lt?S(Lt[1]):0,this.w_=this.I_>0?function(t){return t>=8?108:t>=7?94:t>=6.5?85:t>=6?76:t>=5.5?69:t>=5?63:t>=4?56:t>=3?47:0}(this.I_):void 0,this.R_=/webos|web0s/i.test(Pt),this.B_=/HbbTV/i.test(Pt),this.M_=!!zt&&function(t){if(!t)return!1;var n=t.split(".").map(Number);return 3===n.length&&1===n[0]&&2===n[1]}(zt[1]),this.O_=/AFT.* Build/i.test(Pt),this.F_=Wt?Wt[1]:void 0,this.V_=/VIZIO/i.test(Pt),this.W_=/Edge\/\d+/i.test(Pt),this.z_=/Trident/i.test(Pt),this.X_=this.z_&&!self.ActiveXObject&&"ActiveXObject"in self,this.Q_=/Vivaldi/i.test(Pt),this.Y_=/Firefox/i.test(Pt)&&!/Seamonkey/i.test(Pt),this.Z_=Mt?S(Mt[1]):0,this.rg=/Safari/i.test(Pt)&&!/Chrome/i.test(Pt)&&!this.Jv&&!this.x_,this.og=Bt?S(Bt[2]):0,this.cg=Boolean(Ft),this.fg=Ft?S(Ft[1]):0,this._g=/CrKey/.test(Pt),this.pg=/\b(tv|smart-tv|smarttv|appletv|crkey|googletv|hbbtv|pov_tv|roku|viera|nettv|philipstv|vizio)\b/i.test(Pt),this.Ag=/PlayStation 4/i.test(Pt),this.Tg=/PlayStation 5/i.test(Pt),this.xg="web"===Nt.Bv,this.Ig="web"===Nt.Dv,this.Rg=this.Ig||this.xg,this.Bg="web"===Nt.Nv,this.Mg="web"===Nt.Mv,this.Og="web"===Nt.Lv}return It(t,[{key:"Ke",get:function(){return this.Fv}},{key:"Uv",get:function(){return this.Vv}},{key:"Hv",get:function(){return this.Wv}},{key:"qv",get:function(){return this.zv}},{key:"Gv",get:function(){return this.Xv}},{key:"Qv",get:function(){return this.Kv}},{key:"Yv",get:function(){return this.Jv}},{key:"Zv",get:function(){return this.$v}},{key:"t_",get:function(){return this.i_}},{key:"e_",get:function(){return this.s_}},{key:"n_",get:function(){return this.r_}},{key:"ru",get:function(){return this.h_}},{key:"o_",get:function(){return this.a_}},{key:"u_",get:function(){return this.c_||this.d_}},{key:"$d",get:function(){return this.l_}},{key:"Ks",get:function(){return this.f_}},{key:"v_",get:function(){return this.__}},{key:"g_",get:function(){return this.p_}},{key:"m_",get:function(){var t;return null!=(t=this.w_)?t:this.y_}},{key:"b_",get:function(){return this.A_}},{key:"S_",get:function(){var t;return(null==(t=c.chrome)?void 0:t.webview)&&this.T_>0}},{key:"k_",get:function(){return this.T_}},{key:"E_",get:function(){return this.x_}},{key:"P_",get:function(){return this.I_}},{key:"C_",get:function(){return this.R_}},{key:"D_",get:function(){return this.B_}},{key:"N_",get:function(){return this.M_}},{key:"L_",get:function(){return this.O_}},{key:"IS_FIRETV_AFTMM",get:function(){return"AFTMM"===this.F_}},{key:"U_",get:function(){return this.V_}},{key:"H_",get:function(){return this.W_}},{key:"q_",get:function(){return this.z_}},{key:"G_",get:function(){return this.X_}},{key:"j_",get:function(){return this.Q_}},{key:"K_",get:function(){return this.Y_}},{key:"J_",get:function(){return this.Z_}},{key:"eg",get:function(){return this.rg}},{key:"hg",get:function(){return 0===this.og&&Ht.ru?this.a_:this.og}},{key:"ag",get:function(){return this.cg}},{key:"dg",get:function(){return this.fg}},{key:"vg",get:function(){return this._g}},{key:"gg",get:function(){return this.pg}},{key:"wg",get:function(){return!(!this.C_&&!this.E_)&&this.m_<=56}},{key:"yg",get:function(){return this.Ag}},{key:"Sg",get:function(){return this.Tg}},{key:"Eg",get:function(){return this.xg}},{key:"Pg",get:function(){return this.Ig}},{key:"Cg",get:function(){return this.Rg}},{key:"Dg",get:function(){return this.Bg}},{key:"Ng",get:function(){return this.Mg}},{key:"Lg",get:function(){return this.Og}},{key:"Fg",get:function(){return this.Ug}},{key:"IS_IOS_CHROME",get:function(){return this.Vg}}]),t}();Vt.Hg=new Vt;var Ht=Vt.Hg;x(),pt(),et();var qt={}.toString;function Xt(t){return null!=t}var jt,Yt=Array.isArray||function(t){return"[object Array]"===qt.call(t)};function Kt(t){return"object"===(void 0===t?"undefined