roomdetail-CdZoR563.js 572 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. import{W as Ka,E as Zi,X as Ya,l as Xa,Y as Za,h as Ja,k as fi,Z as es,p as ft,F as mt,z as Ge,Q as er,R as ci,G as nr,V as rr,J as Ci,O as ts,x as is,y as ns,N as rs,j as os,$ as as,M as ss,a0 as ls,o as As,v as Yi,c as Xi,t as tr,A as ds,a1 as cs}from"./index-NWZRBRJn.js";import{g as us,B as ir}from"./index-BAbag6cj.js";import{_ as or,a as ar,b as sr}from"./button-icon-ByvyKiiQ.js";import{c as Si,g as hs}from"./_commonjsHelpers-Cpj98o6Y.js";import{B as ps}from"./index_bock_centerbottom-DLZlv5Zh.js";var yo={exports:{}};(function(yt,_t){(function(Dt,Mt){yt.exports=Mt()})(Si,function(){function Dt(u,e,i){return(e=function(d){var b=function(l,p){if(typeof l!="object"||!l)return l;var t=l[Symbol.toPrimitive];if(t!==void 0){var a=t.call(l,p);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(p==="string"?String:Number)(l)}(d,"string");return typeof b=="symbol"?b:b+""}(e))in u?Object.defineProperty(u,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):u[e]=i,u}function Mt(u){var e,i;return!!((u??((i=window)==null||(e=i.navigator)==null?void 0:e.userAgent))||"").match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i)}var mi={h264:1,h265:2,h266:4,vp8:8,vp9:16,av1:32};function _i(u,e){e===void 0&&(e=["h264"]);var i=(e||["h264"]).reduce(function(l,p){return p=p.toLowerCase(),l+(mi[p]||0)},0),d=u.split("?")[0],b=u.split("?")[1];return b=(b||"").split("&").filter(function(l){return!/^vc=\d?/.test(l)}).join("&"),d+"?"+b+(b?"&":"")+"vc="+i}var Ut=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof Si<"u"?Si:typeof self<"u"?self:{};function tt(u){return u&&u.__esModule&&Object.prototype.hasOwnProperty.call(u,"default")?u.default:u}function wt(u){if(u.__esModule)return u;var e=u.default;if(typeof e=="function"){var i=function d(){return this instanceof d?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};i.prototype=e.prototype}else i={};return Object.defineProperty(i,"__esModule",{value:!0}),Object.keys(u).forEach(function(d){var b=Object.getOwnPropertyDescriptor(u,d);Object.defineProperty(i,d,b.get?b:{enumerable:!0,get:function(){return u[d]}})}),i}var ni,vi={exports:{}},en=(ni||(ni=1,function(u){var e=Object.prototype.hasOwnProperty,i="~";function d(){}function b(a,n,s){this.fn=a,this.context=n,this.once=s||!1}function l(a,n,s,h,E){if(typeof s!="function")throw new TypeError("The listener must be a function");var v=new b(s,h||a,E),S=i?i+n:n;return a._events[S]?a._events[S].fn?a._events[S]=[a._events[S],v]:a._events[S].push(v):(a._events[S]=v,a._eventsCount++),a}function p(a,n){--a._eventsCount==0?a._events=new d:delete a._events[n]}function t(){this._events=new d,this._eventsCount=0}Object.create&&(d.prototype=Object.create(null),new d().__proto__||(i=!1)),t.prototype.eventNames=function(){var a,n,s=[];if(this._eventsCount===0)return s;for(n in a=this._events)e.call(a,n)&&s.push(i?n.slice(1):n);return Object.getOwnPropertySymbols?s.concat(Object.getOwnPropertySymbols(a)):s},t.prototype.listeners=function(a){var n=i?i+a:a,s=this._events[n];if(!s)return[];if(s.fn)return[s.fn];for(var h=0,E=s.length,v=new Array(E);h<E;h++)v[h]=s[h].fn;return v},t.prototype.listenerCount=function(a){var n=i?i+a:a,s=this._events[n];return s?s.fn?1:s.length:0},t.prototype.emit=function(a,n,s,h,E,v){var S=i?i+a:a;if(!this._events[S])return!1;var B,x,P=this._events[S],M=arguments.length;if(P.fn){switch(P.once&&this.removeListener(a,P.fn,void 0,!0),M){case 1:return P.fn.call(P.context),!0;case 2:return P.fn.call(P.context,n),!0;case 3:return P.fn.call(P.context,n,s),!0;case 4:return P.fn.call(P.context,n,s,h),!0;case 5:return P.fn.call(P.context,n,s,h,E),!0;case 6:return P.fn.call(P.context,n,s,h,E,v),!0}for(x=1,B=new Array(M-1);x<M;x++)B[x-1]=arguments[x];P.fn.apply(P.context,B)}else{var F,G=P.length;for(x=0;x<G;x++)switch(P[x].once&&this.removeListener(a,P[x].fn,void 0,!0),M){case 1:P[x].fn.call(P[x].context);break;case 2:P[x].fn.call(P[x].context,n);break;case 3:P[x].fn.call(P[x].context,n,s);break;case 4:P[x].fn.call(P[x].context,n,s,h);break;default:if(!B)for(F=1,B=new Array(M-1);F<M;F++)B[F-1]=arguments[F];P[x].fn.apply(P[x].context,B)}}return!0},t.prototype.on=function(a,n,s){return l(this,a,n,s,!1)},t.prototype.once=function(a,n,s){return l(this,a,n,s,!0)},t.prototype.removeListener=function(a,n,s,h){var E=i?i+a:a;if(!this._events[E])return this;if(!n)return p(this,E),this;var v=this._events[E];if(v.fn)v.fn!==n||h&&!v.once||s&&v.context!==s||p(this,E);else{for(var S=0,B=[],x=v.length;S<x;S++)(v[S].fn!==n||h&&!v[S].once||s&&v[S].context!==s)&&B.push(v[S]);B.length?this._events[E]=B.length===1?B[0]:B:p(this,E)}return this},t.prototype.removeAllListeners=function(a){var n;return a?(n=i?i+a:a,this._events[n]&&p(this,n)):(this._events=new d,this._eventsCount=0),this},t.prototype.off=t.prototype.removeListener,t.prototype.addListener=t.prototype.on,t.prefixed=i,t.EventEmitter=t,u.exports=t}(vi)),vi.exports),Li=tt(en);const Bi=(class $i{static getInstance(){return $i.instance||($i.instance=new $i),$i.instance}add(e){this.pickers.push(e)}remove(e){const i=this.pickers.indexOf(e);i>-1?this.pickers.splice(i,1):console.warn("Picker not found in the provider.")}closeOther(e){for(const i of this.pickers)i!==e&&(i.open=!1)}constructor(){this.pickers=[]}}).getInstance(),tn=["top","tl","tr","bottom","bl","br"],ei="epicker",Ui={getPopupContainer:()=>document.body,wrapClassName:"",open:!1,placement:"br",offset:[0,0],zIndex:1e3,content:"",trigger:"click",mouseLeaveDelay:.1,isMobile:!1};class Ii{get $popupContainer(){if(typeof this._options.getPopupContainer=="function"&&!this._options.isMobile){const e=this._options.getPopupContainer();if(e){if(!["INPUT","CANVAS","VIDEO","IMG"].includes(e==null?void 0:e.tagName))return e!==document.body&&(e.style.cssText+="position: relative;"),e;console.warn("popup container node does not support child elements, default body!")}else console.warn("popup container does not exist, default body!")}return document.body}get open(){return this._open}set open(e){this._disabled||(this._animationTimerClear(),e?(this.$content.style.display="inline-flex",this._options.isMobile&&document.body.classList.add(`${ei}-body-noscroll`),this._animationTimer=setTimeout(()=>{this._animationTimerClear(),this.$content.style.opacity="1"},20)):(this.$content.style.opacity="0",this._options.isMobile&&document.body.classList.remove(`${ei}-body-noscroll`),this._animationTimer=setTimeout(()=>{this._animationTimerClear(),this.$content.style.display="none"},350)),requestAnimationFrame(()=>{this._setPlacement()}),this._open!==!!e&&(this._onOpenChange(e),this._open=!!e))}get disabled(){return this._disabled}set disabled(e){e?this.$container.classList.add(`${ei}-disabled`):this.$container.classList.remove(`${ei}-disabled`),this._disabled=e}setPlacement(e){this._disabled||(tn.includes(e)?this._options.placement=e:console.warn(`${e} is not a valid placement`),this._setPlacement())}destroy(){this._removeHtml(),Bi.remove(this)}innerHTML(e){var i;this.$body&&(this.$body.innerHTML=e||""),(i=this.$popupContainer)==null||i.appendChild(this.$content)}_onOpenChange(e){this._options.onOpenChange==null||this._options.onOpenChange.call(this._options,!!e)}_animationTimerClear(){this._animationTimer&&(clearTimeout(this._animationTimer),this._animationTimer=null)}_removeHtml(){var e,i;this.$content.removeEventListener("click",this._onContentClick),this.$container.removeEventListener("click",this._onContentClick),this._options.trigger==="click"&&this.$container.removeEventListener("click",this._onShow),this._options.trigger==="hover"&&(this.$container.removeEventListener("mouseover",this._onShow),this.$container.removeEventListener("mousemove",this._onShow),this.$container.removeEventListener("mouseleave",this._onHide),this.$content.removeEventListener("mouseover",this._onContentShow),this.$content.removeEventListener("mousemove",this._onContentShow),this.$content.removeEventListener("mouseleave",this._onHide)),this._options.isMobile||(window.removeEventListener("blur",this._onHide),document.removeEventListener("visibilitychange",this._onHide),window.removeEventListener("resize",this._onHide),document.removeEventListener("click",this._onDocumentClick)),this._$mask&&(this._$mask.removeEventListener("click",this._onHide),(i=this.$content)==null||i.removeChild(this._$mask)),(e=this.$popupContainer)==null||e.removeChild(this.$content),this.$content.innerHTML=""}_setPlacement(){if(!this._open||this._options.isMobile)return;const e=this.$container.getBoundingClientRect(),i=this.$content.getBoundingClientRect(),d=this.$popupContainer.getBoundingClientRect(),b=e.left-d.left,l=-(e.right-d.right),p=e.y-d.y;let t,a=b+(e.width-i.width)/2;const n=p-i.height,s=p+e.height;if(/^t/.test(this._options.placement)){var h,E,v;switch(this._options.placement){case"top":t=void 0;break;case"tl":t=void 0,a=b;break;case"tr":a=void 0,t=l}this.$content.style.cssText+=`
  2. ${t!==void 0?`right: ${t+(((h=this._options.offset)==null?void 0:h[0])||0)}px;`:""}
  3. ${a!==void 0?`left: ${a+(((E=this._options.offset)==null?void 0:E[0])||0)}px;`:""}
  4. top: ${n+(((v=this._options.offset)==null?void 0:v[1])||0)}px;
  5. z-index:${this._options.zIndex};
  6. `}else if(/^b/.test(this._options.placement)){var S,B,x;switch(this._options.placement){case"bottom":t=void 0;break;case"bl":t=void 0,a=b;break;case"br":a=void 0,t=l}this.$content.style.cssText+=`
  7. ${t!==void 0?`right: ${t+(((S=this._options.offset)==null?void 0:S[0])||0)}px;`:""}
  8. ${a!==void 0?`left: ${a+(((B=this._options.offset)==null?void 0:B[0])||0)}px;`:""}
  9. top: ${s+(((x=this._options.offset)==null?void 0:x[1])||0)}px;
  10. z-index:${this._options.zIndex};
  11. `}}_initContentStyle(){if(this.$content.classList.add(`${ei}`,`${ei}-${this._options.placement}`),this._options.isMobile&&(this.$content.classList.add(`${ei}-mobile`),this._$mask=document.createElement("div"),this._$mask.classList.add(`${ei}-mask`),this.$content.appendChild(this._$mask)),this.$body=document.createElement("div"),this.$body.classList.add(`${ei}-body`),this.$content.appendChild(this.$body),this._options.wrapClassName)try{this.$content.classList.add(this._options.wrapClassName)}catch{}}_eventListener(){this.$content.addEventListener("click",this._onContentClick),this.$container.addEventListener("click",this._onContentClick),this._options.trigger==="click"&&this.$container.addEventListener("click",this._onShow),this._options.trigger==="hover"&&(this.$container.addEventListener("mouseover",this._onShow),this.$container.addEventListener("mousemove",this._onShow),this.$container.addEventListener("mouseleave",this._onHide),this.$content.addEventListener("mouseover",this._onContentShow),this.$content.addEventListener("mousemove",this._onContentShow),this.$content.addEventListener("mouseleave",this._onHide)),this._$mask&&this._$mask.addEventListener("click",this._onHide),this._options.isMobile||(window.addEventListener("blur",this._onHide),document.addEventListener("visibilitychange",this._onHide),window.addEventListener("resize",this._onHide),document.addEventListener("click",this._onDocumentClick))}_onContentClick(e){e.stopPropagation(),Bi.closeOther(this)}_onShow(e){var i,d;e==null||(i=e.stopPropagation)==null||i.call(e),e==null||(d=e.preventDefault)==null||d.call(e),this._disabled||(this._hideTimer&&(clearTimeout(this._hideTimer),this._hideTimer=null),this.open=!0)}_onContentShow(e){e.stopPropagation==null||e.stopPropagation.call(e),e.preventDefault==null||e.preventDefault.call(e),this.open&&!this._disabled&&this._onShow(null)}_onHide(){this._open&&!this._disabled&&(this._hideTimer=setTimeout(()=>{this._hideTimer&&(clearTimeout(this._hideTimer),this._hideTimer=null),this.open=!1},this._options.mouseLeaveDelay>0?1e3*this._options.mouseLeaveDelay:100))}_onDocumentClick(e){if(!this.$content.contains(e.target)&&this.$content!==e.target&&!this.$container.contains(e.target)&&this.$container!==e.target){if(this._disabled)return;this._onHide()}}constructor(e){if(this._open=!1,this._animationTimer=null,this._hideTimer=null,this._disabled=!1,this._options=Object.assign({},Ui,e||{}),this._options.isMobile&&(this._options.trigger="click"),Bi.add(this),typeof this._options.container=="function"?this.$container=this._options.container():this.$container=this._options.container,!this.$container)throw new Error("container is required!");this.$content=document.createElement("div"),this._initContentStyle(),this.innerHTML(this._options.content),this._onContentClick=this._onContentClick.bind(this),this._onShow=this._onShow.bind(this),this._onContentShow=this._onContentShow.bind(this),this._onHide=this._onHide.bind(this),this._onDocumentClick=this._onDocumentClick.bind(this),this._eventListener(),this.open=!!this._options.open}}Ii.VERSION="0.1.0-beta.11";const Ft=9;if(typeof Element<"u"&&!Element.prototype.matches){const u=Element.prototype;u.matches=(u==null?void 0:u.matchesSelector)||(u==null?void 0:u.mozMatchesSelector)||(u==null?void 0:u.msMatchesSelector)||(u==null?void 0:u.oMatchesSelector)||(u==null?void 0:u.webkitMatchesSelector)}function Nt(u,e,i,d,b){const l=nn.apply(this,arguments);return u.addEventListener(i,l,b),{destroy:function(){u.removeEventListener(i,l,b)}}}function ri(u,e,i,d,b){return typeof u.addEventListener=="function"?Nt.apply(null,arguments):typeof i=="function"?Nt.bind(null,document).apply(null,arguments):(typeof u=="string"&&(u=document.querySelectorAll(u)),Array.prototype.map.call(u,function(l){return Nt(l,e,i,d,b)}))}function nn(u,e,i,d){return function(b){b.delegateTarget=function(l,p){for(;l&&l.nodeType!==Ft;){if(typeof l.matches=="function"&&l.matches(p))return l;l=l.parentNode}}(b.target,e),b.delegateTarget&&d.call(u,b)}}var Ar,dr={exports:{}},cr,ur,bo=(Ar||(Ar=1,function(u){(function(){var e=typeof window<"u"&&window.document!==void 0?window.document:{},i=u.exports,d=function(){for(var p,t=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],a=0,n=t.length,s={};a<n;a++)if((p=t[a])&&p[1]in e){for(a=0;a<p.length;a++)s[t[0][a]]=p[a];return s}return!1}(),b={change:d.fullscreenchange,error:d.fullscreenerror},l={request:function(p,t){return new Promise((function(a,n){var s=(function(){this.off("change",s),a()}).bind(this);this.on("change",s);var h=(p=p||e.documentElement)[d.requestFullscreen](t);h instanceof Promise&&h.then(s).catch(n)}).bind(this))},exit:function(){return new Promise((function(p,t){if(this.isFullscreen){var a=(function(){this.off("change",a),p()}).bind(this);this.on("change",a);var n=e[d.exitFullscreen]();n instanceof Promise&&n.then(a).catch(t)}else p()}).bind(this))},toggle:function(p,t){return this.isFullscreen?this.exit():this.request(p,t)},onchange:function(p){this.on("change",p)},onerror:function(p){this.on("error",p)},on:function(p,t){var a=b[p];a&&e.addEventListener(a,t,!1)},off:function(p,t){var a=b[p];a&&e.removeEventListener(a,t,!1)},raw:d};d?(Object.defineProperties(l,{isFullscreen:{get:function(){return!!e[d.fullscreenElement]}},element:{enumerable:!0,get:function(){return e[d.fullscreenElement]}},isEnabled:{enumerable:!0,get:function(){return!!e[d.fullscreenEnabled]}}}),i?u.exports=l:window.screenfull=l):i?u.exports={isEnabled:!1}:window.screenfull={isEnabled:!1}})()}(dr)),dr.exports),li=tt(bo),Eo=function(){if(ur)return cr;ur=1;var u=function(a){return function(n){return!!n&&typeof n=="object"}(a)&&!function(n){var s=Object.prototype.toString.call(n);return s==="[object RegExp]"||s==="[object Date]"||function(h){return h.$$typeof===e}(n)}(a)},e=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.element"):60103;function i(a,n){return n.clone!==!1&&n.isMergeableObject(a)?t((s=a,Array.isArray(s)?[]:{}),a,n):a;var s}function d(a,n,s){return a.concat(n).map(function(h){return i(h,s)})}function b(a){return Object.keys(a).concat(function(n){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(n).filter(function(s){return Object.propertyIsEnumerable.call(n,s)}):[]}(a))}function l(a,n){try{return n in a}catch{return!1}}function p(a,n,s){var h={};return s.isMergeableObject(a)&&b(a).forEach(function(E){h[E]=i(a[E],s)}),b(n).forEach(function(E){(function(v,S){return l(v,S)&&!(Object.hasOwnProperty.call(v,S)&&Object.propertyIsEnumerable.call(v,S))})(a,E)||(l(a,E)&&s.isMergeableObject(n[E])?h[E]=function(v,S){if(!S.customMerge)return t;var B=S.customMerge(v);return typeof B=="function"?B:t}(E,s)(a[E],n[E],s):h[E]=i(n[E],s))}),h}function t(a,n,s){(s=s||{}).arrayMerge=s.arrayMerge||d,s.isMergeableObject=s.isMergeableObject||u,s.cloneUnlessOtherwiseSpecified=i;var h=Array.isArray(n);return h===Array.isArray(a)?h?s.arrayMerge(a,n,s):p(a,n,s):i(n,s)}return t.all=function(a,n){if(!Array.isArray(a))throw new Error("first argument should be an array");return a.reduce(function(s,h){return t(s,h,n)},{})},cr=t}(),hr=tt(Eo);class pr{t(e,i){const d=this._translations[this._locale];let b;if(!d)return typeof this.options.customizeMissing=="function"?this.options.customizeMissing(e,i):`[missing "${this._locale}" locale]`;if(typeof e=="string"&&e.includes(".")&&!(e in d)){const[l,p]=this._findChainValue(d,e);if(p)b=l;else{if((i==null?void 0:i.defaultvalue)===void 0)return typeof this.options.customizeMissing=="function"?this.options.customizeMissing(e,i):`[missing "${this._locale}.${e}" translation]`;b=i.defaultvalue}}else if(e in d)b=d[e];else{if((i==null?void 0:i.defaultvalue)===void 0)return typeof this.options.customizeMissing=="function"?this.options.customizeMissing(e,i):`[missing "${this._locale}.${e}" translation]`;b=i.defaultvalue}return typeof b=="string"&&i&&/\{\{\s*(\w+)\s*\}\}/.test(b)?b.replace(/\{\{\s*(\w+)\s*\}\}/g,(l,p)=>String(i[p])||""):b}get locale(){return this._locale}get translations(){return this._translations}appendTranslations(e){this._translations=hr(this._translations,e,{clone:!1}),this._locale||(this._locale=Object.keys(this._translations)[0]),this._onChange()}switchLocale(e){e in this._translations&&(this._locale=e,this._onChange())}getCurrentLocale(){return this._locale}getCurrentTranslation(){return this._translations[this._locale]}getVersion(){return"1.1.0-alpha.3"}_onChange(){return this.options.onChange==null?void 0:this.options.onChange.call(this.options,this)}_findChainValue(e,i){const d=i.split(".");let b=e;for(let l=0;l<d.length;l++){if(!(d[l]in b))return[void 0,!1];if(b=b[d[l]],l+1===d.length)return[b[d[l]],!0]}return[void 0,!1]}constructor(e,i){this._translations={},this._locale=i==null?void 0:i.defaultLocale,e&&(this._translations=e,i!=null&&i.defaultLocale||(this._locale=Object.keys(e)[0])),this.options=i||{}}}pr.VERSION="1.1.0-alpha.3";const ne="ezplayer",Fi="PAUSE_TIMING_HEADER_FOOTER",rn=["rec","cloudRec","cloudRecord"],Pe={loading:"loading",play:"play",capturePicture:"capturePicture",volumechange:"volumechange",audioInfo:"audioInfo",videoInfo:"videoInfo",fullscreen:"fullscreen",exitFullscreen:"exitFullscreen",fullscreenChange:"fullscreenChange",resize:"resize",orientationChange:"orientationChange",audioCodecUnsupported:"audioCodecUnsupported",changeTheme:"changeTheme",changeRecType:"changeRecType",changeDefinition:"changeDefinition",changeSpeed:"changeDefinition",control:{play:"Control.play",capturePicture:"Control.capturePicture",volumechange:"Control.volumechange",volumePanelOpenChange:"Control.volumePanelOpenChange",controlsBarOpenChange:"Control.controlsBarOpenChange",headerMoreShow:"Control.headerMoreShow",footerMoreShow:"Control.footerMoreShow",beforeMountControls:"Control.beforeMountControls",mountedControls:"Control.mountedControls",beforeUnmountControls:"Control.beforeUnmountControls",unmountedControls:"Control.unmountedControls",changeRecType:"Control.changeRecType",changeDefinition:"Control.changeDefinition",definitionPanelOpenChange:"Control.definitionPanelOpenChange",changeSpeed:"Control.changeDefinition",speedPanelOpenChange:"Control.speedPanelOpenChange"},theme:{beforeDestroy:"Theme.beforeDestroy",destroyed:"Theme.destroyed"},message:"message"};let Bt=class extends Li{get active(){return this._disabled}set active(u){this._active=u,this._updateActiveState(u)}get disabled(){return this._disabled}set disabled(u){this._disabled=u,this._updateDisabledState(u)}_updateDisabledState(u){var e,i;u?(e=this.$container)==null||e.classList.add(`${ne}-disabled`):(i=this.$container)==null||i.classList.remove(`${ne}-disabled`)}_updateActiveState(u){var e,i;u?(e=this.$container)==null||e.classList.add(`${ne}-active`):(i=this.$container)==null||i.classList.remove(`${ne}-active`)}reset(){}_onClick(){this.$container.addEventListener("click",u=>{var e;(e=this.$container)!=null&&e.classList.contains(`${ne}-disabled`)||this._onControlClick==null||this._onControlClick.call(this,u)})}hide(){this.$container&&(this.$container.style.display="none",this.$container.classList.add(`${ne}-hide`))}destroy(){var u;this.removeAllListeners(),(u=this.$popupContainer)==null||u.removeChild(this.$container)}_onControlClick(u){this.__options.onClick==null||this.__options.onClick.call(this.__options,u)}constructor(u){super(),this.__options={},this._disabled=!1,this._active=!1,this.__options=Object.assign({},u||{}),this.$container=document.createElement(u.tagName||"span"),this.$container.classList.add(`${ne}-control`),(u==null?void 0:u.controlType)==="text"?this.$container.classList.add(`${ne}-control-text`):(u==null?void 0:u.controlType)==="block"?this.$container.classList.add(`${ne}-control-block`):this.$container.classList.add(`${ne}-control-btn`),u!=null&&u.classNameSuffix&&this.$container.classList.add(`${ne}-control-${u==null?void 0:u.classNameSuffix}`),u!=null&&u.className&&this.$container.classList.add(u.className),u.getPopupContainer?this.$popupContainer=u.getPopupContainer==null?void 0:u.getPopupContainer.call(u):this.$popupContainer=document.body,this.$popupContainer.appendChild(this.$container),this._onClick()}};function on(){return on=Object.assign||function(u){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var d in i)Object.prototype.hasOwnProperty.call(i,d)&&(u[d]=i[d])}return u},on.apply(this,arguments)}const So={};class Co extends Bt{_html(){var e;typeof this._options.render=="function"?this.$container.innerHTML=this._options.render():this.$container.innerHTML=`
  12. <span class="${ne}-loading-dot ${ne}-loading-dot-load">
  13. <i class="${ne}-loading-dot-item"></i>
  14. <i class="${ne}-loading-dot-item"></i>
  15. <i class="${ne}-loading-dot-item"></i>
  16. <i class="${ne}-loading-dot-item"></i>
  17. </span>
  18. <div class="${ne}-loading-text">${((e=this._options.locale)==null?void 0:e.loading)||"loading..."}</div>
  19. `}show(e){e&&(this.$container.innerHTML=e),this.$container.style.display="flex",this.$container.classList.remove(`${ne}-hide`),this.$popupContainer.classList.add(`${ne}-has-loading`)}hide(){super.hide(),this.$popupContainer.classList.remove(`${ne}-has-loading`)}constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};super(Object.assign({},So,on({},e,{tagName:"div",controlType:"block"}))),this._options=Object.assign({},e),this.$container.classList.add(`${ne}-loading`,`${ne}-hide`),this._html()}}function an(){return an=Object.assign||function(u){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var d in i)Object.prototype.hasOwnProperty.call(i,d)&&(u[d]=i[d])}return u},an.apply(this,arguments)}const fr={poster:"data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD//gAfQ29tcHJlc3NlZCBieSBqcGVnLXJlY29tcHJlc3P/2wCEAAkJCQkJCQoLCwoODw0PDhQSERESFB4WFxYXFh4uHSEdHSEdLikxKCUoMSlJOTMzOUlUR0NHVGZbW2aBeoGoqOIBCQkJCQkJCgsLCg4PDQ8OFBIRERIUHhYXFhcWHi4dIR0dIR0uKTEoJSgxKUk5MzM5SVRHQ0dUZltbZoF6gaio4v/CABEIA/0HHgMBIgACEQEDEQH/xAAZAAEBAQEBAQAAAAAAAAAAAAAAAQIEAwf/2gAIAQEAAAAA+WgAgAQAACTxAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHUAEACAAAE8YAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAdQBAAgAAAPPzAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOoCABAAAAGfEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA6ggAIAAAATxgAAAAAAAAAAAAAAAAAAAAAAAAAAAAADqIACAAAACPLIAAAAAAAAAAAAAAAAAAAAAAAAAAAAADqgAIAAAAEMeYAAAAAAAAAAAAAAAAAAAAAAAAAAAAADpACAAAABAz5AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOkAgAAAAQCeUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA6QIAAAAEAHjAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOkIAAAAEAEeeQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOkQAAAAQAQYwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB0oAAAAIAIDGAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOgAAAAIAIBnzAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA6AAAACACAGfMAAAAAAAAAAAAAAAAAAAAAAAAAAAAADoAAAAgAgBE8wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOgAAAIAIAQTzAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA6AAACACACBPMAAAAAAAAAAAAAAAAAAAAAAAAAAAAADoAAAgAgAgE8wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOgAAIAIAIAZwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB0AAEAEAEAImAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOgABABACAEGcgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAdAAIAIAQAgMwCAAAAAAAAAAAAAAAAAAAAAAAAAAAAA6ABABACACBbAJEkAAAAAAAAAAAAAAAAAAAAAAAAAAAAdACACACAEDWjAEDMgAAAAAAAAAAAAAAAAAAAAAAAAAAAOgEAEAEAIGtoYBAJJAAAAAAAAAAAAAAAAAAAAAAAAAAAB0CACACAEBvREyEAgzAAAAAAAAAAAAAAAAAAAAAAAAAAADoQAQAQAgLuoJkICBc5AAAAAAAAAAAAAAAAAAAAAAAAAAAdEAEAIAQC+iAzBAIKkyAAAAAAAAAAAAAAAAAAAAAAAAAAB7gEAIAQA9ADAQEFQzAAAAAAAAAAAAAAAAAAAAAAAAAAAe4EAIAIAboCZEAgqDMAAAAAAAAAAAAAAAAAAAAAAAAAAD3CAEAEAJrYCSEAgqBMgAAAAAAAAAAAAAAAAAAAAAAAAAB7kAEAIARfQAmRAQLASQAAAAAAAAAAAAAAAAAAAAAAAAAAe8AEAIAQb0AjJAIKgIkAAAAAAAAAAAAAAAAAAAAAAAAAAPYAgBACCvQBEiAQVAQkAAAAAAAAAAAAAAAAAAAAAAAAAAPYCAEAIKa0AjJAQKgQMgAAAAAAAAAAAAAAAAAAAAAAAAAHsEAIAQKNaBCRAIKgIEgAAAAAAAAAAAAAAAAAAAAAAAAAD2IAIAQUR6UQMkBBUBASAAAAAAAAAAAAAAAAAAAAAAAAAAPaACAEFEL6CBIgEFQICIAAAAAAAAAAAAAAAAAAAAAAAAAA9QCAEFEDWyCIgEFQECEAAAAAAAAAAAAAAAAAAAAAAAAAAeoEAIKIBraCIQECwEBCAAAAAAAAAAAAAAAAAAAAAAAAAAPUIAQUIA1tBEQCCoCBBAAAAAAAAAAAAAAAAAAAAAAAAAAHqQAgoQBGthEQCCoCBAgAAAAAAAAAAAAAAAAAAAAAAAAAD1gBBQgBDWyEIBBUCAgQAAAAAAAAAAAAAAAAAAAAAAAAAB6AEFEAIF9IEQCCoCBAgAAAAAAAAAAAAAAAAAAAAAAAAAB6AQUQAgD0CEBAsBAQIAAAAAAAAAAAAAAAAAAAAAAAAAAegQUQAgCPSkIBBUCAgQAAAAAAAAAAAAAAAAAAAAAAAAAAehBRACAINbQgEFQECAgAAAAAAAAAAAAAAAAAAAAAAAAAA9IKEAQAgXYQECwEBAgAAAAAAAAAAAAAAAAAAAAAAAAAAbKEAQAgDWiAQVAQIEAAAAAAAAAAAAAAAAAAAAAAAAAABuhAEAIAi+iAQVAQICAAAAAAAAAAAAAAAAAAAAAAAAAAA9BACAIAgb1AIKgQECAAAAAAAAAAAAAAAAAAAAAAAAAAAeiAEAQBALsCCoCBAQAAAAAAAAAAAAAAAAAAAAAAAAAADYBAEAIAXYQLAQECAAAAAAAAAAAAAAAAAAAAAAAAAAANgQBACAA1oQVAQIEAAAAAAAAAAAAAAAAAAAAAAAAAAANhAEAIAAXaCoCBAQAAAAAAAAAAAAAAAAAAAAAAAAAAA2QAgCAAAugsBAQIAAAAAAAAAAAAAAAAAAAAAAAAAW6qkSSwAgCAAAFtVAQIEAAAAAAAAAAAAAAAAAAAAAAAADWta1SgDlAQBAAAALdQEBBAAAAAAAAAAAAAAAAAAAAAAAAF1vdUFAHKCAIAAAAFqkBCAAAAAAAAAAAAAAAAAAAAAAAANem6CgoByiAEAAAAAKAQAAAAAAAAAAAAAAAAAAAAAAABdetFCgoByoAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABd+ihQUFAcgBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADfpSgoUFAcgEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANemgUKCgoHGAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAu/QBQUFBQcYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAF9dAChQUFBxgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA160AKCgoKHGAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAG/SgAUKCgocYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA9NqABQUFBRxgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAALvZQAFBQoKOMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC72FAAUKCgpxgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAemqFAAUFCgpxgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3soUABQoKCuMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANegoUABQUKCuMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAX0oUKAAoUFBeMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAu6oUUABQUKByAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAG9FChQAFCgoOQAAAAAAAAAAAAAAAAAAAAAAAAAAAAABrYUKKAAoKChyAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAXahRQoAChQUOQAAAAAAAAAAAAAAAAAAAAAAAAAAAAADdKKFCgAUFBRyAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAuxQooUABQoKOQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGtBRQoUACgoKcgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAXSihRQoACgoU5AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA2UKKFCgAUFBXIAAAAAAAAAAAAAAAAAAAAAAAAAAAAALtFFCihQAFBQrkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGtIoUUKFAAUKC8gAAAAAAAAAAAAAAAAAAAAAAAAAAAABdKiihRQoACgoXkAAAAAAAAAAAAAAAAAAAAAAAAAAAAALpSUKKFCgAKFBygAAAAAAAAAAAAAAAAAAAAAAAAAAAAGqVFFCihQAFBQ5QAAAAAAAAAAAAAAAAAAAAAAAAAAAADYpFFFChQAFChygAAAAAAAAAAAAAAAAAAAAAAAAAAAALaKihRQooACgo5QAAAAAAAAAAAAAAAAAAAAAAAAAAAAFtCoooUUKAAoUcoAAAAAAAAAAAAAAAAAAAAAAAAAAAADRRUUKKFCgAUFOUAAAAAAAAAAAAAAAAAAAAAAAAAAAAC0oVFFCihQAFCnKAAAAAAAAAAAAAAAAAAAAAAAAAAAABaKKihRQoUACgrlAAAAAAAAAAAAAAAAAAAAAAAAAAAAAtCioooUUKAAoLygAAAAAAAAAAAAAAAAAAAAAAAAAAAAVRRUUKKFCgAUF5QAAAAAAAAAAAAAAAAAAAAAAAAAAAAKUUVFFCihQAFBzAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUooqKFFChQAFDmAAAAAAAAAAAAAAAAAAAAAAAAAAAAAoooqKKFFCgAKHMAAAAAAAAAAAAAAAAAAAAAAAAAAAABRRRSUKKFCgAKOYAAAAAAAAAAAAAAAAAAAAAAAAAAAABRRRUUUKKFAAUcwAAAAAAAAAAAAAAAAAAAAAAAAAAAACiiikUUUKFAAU5gAAAAAAAAAAAAAAAAAAAAAAAAAAAACiiioooUKKAApzAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFFFFIooUUKAArmAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFFFFRQooUKABXMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKKKFRRQooUABeYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKKKKihRQoUABzgAAAAAAAAAAAAAAAAAAAAAAAAAAAABRQoqKKFFCgAOcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFFFFRQooUKABzgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAoUUVFFCihQAOcAAAAAAAAAAAAAAAAAAAAAAAAAAAAACiiiooUUKFABzgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUKKKiihRQoAOcAAAAAAAAAAAAAAAAAAAAAAAAAAAAABRRRSUKKFCgBzgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFFFFRRQooUAOcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAooopFFFChQBzgAAAAAAAAAAAAAAAAAAAAAAAAAAAAACiiioooUKKAOcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUUUUiihRQoBzgAAAAAAAAAAAAAAAAAAAAAAAAAAAAABRRRUUKKFCgOcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKKKFRRQooUBzgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAoooqKFFChQOcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFFCioooUUKBzgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUUUVFCihQoOcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAChRRUUUKKFBzgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKKKKihRQoUOcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAoooqKKFFChzgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFFFFJQooUKOcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUUUBQBQKH/xAAXAQEBAQEAAAAAAAAAAAAAAAAAAQID/9oACAECEAAAAOoCAASAAAAAAAAAAAAAAANgQAAyAAAAAAAAAAAAAAA2EAACQAAAAAAAAAAAAAADZAAAJAAAAAAAAAAAAAAANwAAAZAAAAAAAAAAAAAAA0AAAJAAAAAAAAAAAAAAANAAAIQAAAAAAAAAAAAAADQAAIEAAAAAAAAAAAAAAA0AAIBAAAAAAAAAAAAAAANAAIAQAAAAAAAAAAAAAADQAIAEAAAAAAAAAAAAAAA0AIAAIAAAAAAAAAAAAAANAIABSBAAAAAAAAAAAAAANAQAFEsBAAAAAAAAAAAAAA0EABNBAIAAAAAAAAAAAAADRAARoJYEAAAAAAAAAAAAAAoAELqBAQAAAAAAAAAAAAACgAgtCAgAAAAAAAAAAAAACgCLDQICAAAAAAAAAAAAAAKAiwNBAQAAAAAAAAAAAAAAoIsA0ECAAAAAAAAAAAAAACiLADQgIAAAAAAAAAAAAAAKiwANEBAAAAAAAAAAAAAAAAAC1AgAAAAAAAAAAAAAAAAAtgIAAAAAAAAAAAAAAAAAFBAAAAAAAAAAAAAAAAAAKEAAAAAAAAAAAAAAAAAAUgAAAAAAAAAAAAAAAAAAsAAAAAAAAAAAAAAtKMAAAAAAAAAAAAAAAAAaoFOYAAAAAAAAAAAAAAAAtoBTmAAAAAAAAAAAAAAAAaFAK5gAAAAAAAAAAAAAAAWgoBeYAAAAAAAAAAAAAAALQKAXmAAAAAAAAAAAAAAAFoBQDAAAAAAAAAAAAAAAAtAFAMAAAAAAAAAAAAAAAFUAKAwAAAAAAAAAAAAAAAUoAoDAAAAAAAAAAAAAAACigBQMAAAAAAAAAAAAAAAUFAFAwAAAAAAAAAAAAAABQUAKDAAAAAAAAAAAAAAACgoAoMAAAAAAAAAAAAAAAKCgBQwAAAAAAAAAAAAAAAUFAFDAAAAAAAAAAAAAAABQUAKMAAAAAAAAAAAAAAACgoAUwAAAAAAAAAAAAAAAFBQBTAAAAAAAAAAAAAAAAUFACsAAAAAAAAAAAAAAAAoKAKwAAAAAAAAAAAAAAACgoAXAAAAAAAAAAAAAAAAWUFAFwAAAAAAAAAAAAAAABQUAMgAAAAAAAAAAAAAAAsoKAMgAAAAAAAAAAAAAAAKCgDIAAAAAAAAAAAAAAABQUAyAAAAAAAAAAAAAAAAUFAMgAAAAAAAAAAAAAAACgoDIAAAAAAAAAAAAAAAAoKAyAAAAAAAAAAAAAAAAFBQMgAAAAAAAAAAAAAAAAoKDIAAAAAAAAAAAAAAAAKCgyAAAAAAAAAAAAAAAABQUMgAAAAAAAAAAAAAAAAUFDIAAAAAAAAAAAAAAAAAoD//EABYBAQEBAAAAAAAAAAAAAAAAAAABAv/aAAgBAxAAAADAAoigoAAAAAAAAAAAAAADIBSKAoAAAAAAAAAAAAAADIFIoAoAAAAAAAAAAAAAADIUigAUAAAAAAAAAAAAAADJSKAAUAAAAAAAAAAAAAADNIoAAoAAAAAAAAAAAAAACIUAAoAAAAAAAAAAAAAAAyUAApKAAAAAAAAAAAAAAAzQABUUAAAAAAAAAAAAAAAgABUUAAAAAAAAAAAAAAAIABUUAAAAAAAAAAAAAAACABUUAAAAAAAAAAAAAAAAgBUUBAoAAAAAAAAAAAAAAgFJQEBQAAAAAAAAAAAAAAgUlAJKFAAAAAAAAAAAAAACCooBIooAAAAAAAAAAAAAAIqKAGVCgAAAAAAAAAAAAAAIoAIBQAAAAAAAAAAAAAAIoACAoAAAAAAAAAAAAAAAAAM0KAAAAAAAAAAAAAAAAACBQAAAAAAAAAAAAAAAAAIKAAAAAAAAAAAAAAAAAAgoAAAAAAAAAAAAAAAAACFAAAAAAAAAAAAAAAAAAEUAAAAAAAAAAAAAAAAAASgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAloAAAAAAAAAAAAAAAAEQA0AAAAAAAAAAAAAAAAEgANAAAAAAAAAAAAAAAAElgANAAAAAAAAAAAAAAAAIlQANAAAAAAAAAAAAAAAAgSwANAAAAAAAAAAAAAAABASoANAAAAAAAAAAAAAAACAJYANAAAAAAAAAAAAAAABAIsANAAAAAAAAAAAAAAAEsASoA0AAAAAAAAAAAAAAAJYAlgDQAAAAAAAAAAAAAAAIAlQDQAAAAAAAAAAAAAAASwBLANAAAAAAAAAAAAAAAAQBKgNAAAAAAAAAAAAAAAAlgCWA0AAAAAAAAAAAAAAAAQCVA0AAAAAAAAAAAAAAABLAEsDQAAAAAAAAAAAAAAAAgEqDQAAAAAAAAAAAAAAACWAJYNAAAAAAAAAAAAAAAAEsAlQ0AAAAAAAAAAAAAAAASwBLDQAAAAAAAAAAAAAAAAlgEWNAAAAAAAAAAAAAAAACWAJU0AAAAAAAAAAAAAAAAEsASzQAAAAAAAAAAAAAAAAEASqAAAAAAAAAAAAAAAACWAJaAAAAAAAAAAAAAAAAAgCWgAAAAAAAAAAAAAAAASwBNAAAAAAAAAAAAAAAAACATQAAAAAAAAAAAAAAAACWAKAAAAAAAAAAAAAAAAAEAoAAAAAAAAAAAAAAAABLAKAAAAAAAAAAAAAAAAAJYCgAAAAAAAAAAAAAAAACWAoAAAAAAAAAAAAAAAAASwKAAAAAAAAAAAAAAAAAAg//EACgQAAEEAQIFBAMBAAAAAAAAAAEAAhFwMTBREhNAQYADECBQIWBh0P/aAAgBAQABPwD5QPeAoC/HURoOEi5SINyPFyOEi5Tcjs3I+5HYPmScm5HZuR1yOuR2Lkdi5Di5Di5Di5Di5Di5DchuR3vBUFQbdgrhRAnQgKFBtYNUAe51ItINJQAHRxZ4b8j0JFlgSgI+Z6IiyQJQEaB6MiyAI60ixgI0TbTRpHpjYY+iNhNGkbkPUmwG3IMaR8vRnSNtNzcjc3I3NyNzcjc3IM+ZIxcjbkFyi5AYuVpuWZuQGLlBuUG5QVNYQdlwO2XLcuU5co7rlHdcr+rlHdco7rlO3C5blwO2XC7Y/UzVQBPZD0yh6Q3QY3ZQB2+4BqUMcUPTHcoNA7ffypp8NJQYO6AA/RZUqVKlTSwYSg0C4Qw90ABcIYSgALhAJQaBcQZvcQEoNi4g2UBFxNbvcYbvcbWxcbRFxgXG0XGBcYE3IBFxgXGB5jgXGLkFxi5B5jjzHFyDzHFyD/AKp0pUqVKlSpUqVKlSpUqVK//EAB0RAAMAAgIDAAAAAAAAAAAAAAABEWBwEpCAoLD/2gAIAQIBAT8A30/QDhCeJ8zFLca7Hl0RQhCIiIjijjk8Jl8JuCfXf//EABoRAAICAwAAAAAAAAAAAAAAAAARAaAQYLD/2gAIAQMBAT8AtfzYjYxjyx7Q+5f/AP/Z"};class wo extends Bt{_imgLoadErrorEvent(e){var i;this._options.onLoadImgError==null||this._options.onLoadImgError.call(this._options,((i=e.target)==null?void 0:i.getAttribute("src"))||"")}setPoster(e){var i;(e=e??this._options.poster)!==""?(this.$container.innerHTML=`<img class="${ne}-poster-img" src="${e}" />`,(i=this.$container.querySelector(`.${ne}-poster-img`))==null||i.addEventListener("error",this._imgLoadErrorEvent)):this.$container.innerHTML=""}show(){this.$container&&(this.$container.style.display="flex",this.$container.classList.remove(`${ne}-hide`))}hide(){var e,i;super.hide(),(i=this.$container)==null||(e=i.querySelector(`.${ne}-poster-img`))==null||e.removeEventListener("error",this._imgLoadErrorEvent)}destroy(){this.hide(),this.$popupContainer.removeChild(this.$container)}constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};super(Object.assign({},fr,an({},e,{tagName:"div",controlType:"block"}))),this._options=Object.assign({},fr,e),this.$container.classList.add(`${ne}-poster`,`${ne}-hide`),this._imgLoadErrorEvent=this._imgLoadErrorEvent.bind(this),this._options.poster&&this.setPoster(this._options.poster)}}const Ct={play:`<svg width="1em" height="1em" viewBox="0 0 24 24" fill="currentColor" focusable="false" aria-hidden="true" data-icon="play">
  20. <rect x="6.5" y="5.5" rx="1.25" width="2.5" height="13"/>
  21. <rect x="15" y="5.5" rx="1.25" width="2.5" height="13"/>
  22. </svg>`,pause:'<svg width="1em" height="1em" viewBox="0 0 24 24" fill="currentColor" focusable="false" aria-hidden="true" data-icon="pause"> <path d="M17.5 13.66L9.1 19.26C7.78 20.14 6 19.19 6 17.59L6 6.4C6 4.8 7.78 3.85 9.1 4.73L17.5 10.33C18.69 11.12 18.69 12.87 17.5 13.66Z" /></svg>',volume:u=>`<svg width="1em" height="1em" viewBox="0 0 24 24" stroke="currentColor" fill="none" focusable="false" aria-hidden="true" data-icon="volume">
  23. <path class="${u}-icon-volume-muted" d="M20.57 9.69L16.07 14.19" stroke-width="1.500000" stroke-linejoin="round" stroke-linecap="round"/>
  24. <path class="${u}-icon-volume-muted" d="M20.57 14.19L16.07 9.69" stroke-width="1.500000" stroke-linejoin="round" stroke-linecap="round"/>
  25. <!-- 音低 -->
  26. <path class="${u}-icon-volume-low" d="M15.53 15.97C16.69 15.25 17.49 13.75 17.49 12C17.49 10.25 16.69 8.75 15.53 8.02" stroke-width="1.500000" stroke-linejoin="round" stroke-linecap="round"/>
  27. <!-- 音高 -->
  28. <path class="${u}-icon-volume-high" d="M18.5 19.06C20.31 17.5 21.49 14.93 21.49 12C21.49 9.07 20.31 6.48 18.49 4.93" stroke-width="1.500000" stroke-linejoin="round" stroke-linecap="round"/>
  29. <path d="M5.87 8.62L9.85 5.25C10.5 4.7 11.49 5.16 11.49 6.01L11.49 17.98C11.49 18.83 10.5 19.29 9.85 18.74L5.87 15.37" stroke-width="1.500000" stroke-linejoin="round" stroke-linecap="round"/>
  30. <path d="M5.87 15.37L3.49 15.37C2.94 15.37 2.49 14.92 2.49 14.37L2.49 9.62C2.49 9.07 2.94 8.62 3.49 8.62L5.87 8.62" stroke-width="1.500000" stroke-linejoin="round" stroke-linecap="round"/>
  31. </svg>`,mobileFullscreen:`<svg width="1em" height="1em" viewBox="0 0 24 24" fill="currentColor" focusable="false" aria-hidden="true" data-icon="mobile-fullscreen">
  32. <path d="M4 2.9082L11 2.9082C12.5188 2.9082 13.75 4.1394 13.75 5.6582L13.75 17.6582C13.75 19.177 12.5188 20.4082 11 20.4082L4 20.4082C2.4812 20.4082 1.25 19.177 1.25 17.6582L1.25 5.6582C1.25 4.1394 2.4812 2.9082 4 2.9082ZM4 4.4082L11 4.4082C11.6903 4.4082 12.25 4.9679 12.25 5.6582L12.25 17.6582C12.25 18.3485 11.6903 18.9082 11 18.9082L4 18.9082C3.30969 18.9082 2.75 18.3485 2.75 17.6582L2.75 5.6582C2.75 4.9679 3.30969 4.4082 4 4.4082ZM22.1511 18.3113C22.1511 19.3595 21.2467 20.1652 20.1509 20.2362L19.993 20.2413L15.2939 20.2413C14.8798 20.2413 14.5439 19.9055 14.5439 19.4913C14.5439 19.1116 14.8262 18.7979 15.1921 18.7482L15.2939 18.7413L19.993 18.7413C20.344 18.7413 20.5962 18.5592 20.6432 18.3732L20.6511 18.3113L20.6511 12.4895C20.6511 12.3048 20.4338 12.1042 20.1062 12.066L19.993 12.0594L15.2939 12.0594C14.8798 12.0594 14.5439 11.7238 14.5439 11.3094C14.5439 10.9298 14.8262 10.616 15.1921 10.5663L15.2939 10.5594L19.993 10.5594C21.1055 10.5594 22.0605 11.3175 22.145 12.3416L22.1511 12.4895L22.1511 18.3113ZM10.3225 16.1035C10.3225 15.6893 9.98669 15.3535 9.57251 15.3535L5.84644 15.3535L5.74463 15.3604C5.37854 15.41 5.09644 15.7239 5.09644 16.1035C5.09644 16.5177 5.43225 16.8535 5.84644 16.8535L9.57251 16.8535L9.67432 16.8467C10.0404 16.797 10.3225 16.4832 10.3225 16.1035Z" clip-rule="evenodd" fill-rule="evenodd"/>
  33. </svg>`,fullscreen:`<svg width="1em" height="1em" viewBox="0 0 24 24" fill="currentColor" focusable="false" aria-hidden="true" data-icon="webFullscreen">
  34. <path d="M18.4009 2.40125L5.59972 2.40125C4.74849 2.39276 3.9297 2.72729 3.32788 3.32935C2.72607 3.9314 2.39188 4.75031 2.40062 5.6015L2.40062 18.4015C2.3922 19.2527 2.7267 20.0715 3.32874 20.6733C3.93079 21.2751 4.74969 21.6093 5.60091 21.6006L18.4009 21.6006C19.2519 21.609 20.0705 21.2747 20.6723 20.6729C21.2741 20.0711 21.6084 19.2525 21.6 18.4015L21.6 5.60034C21.6084 4.74933 21.2741 3.93073 20.6723 3.32892C20.0705 2.72711 19.2519 2.39282 18.4009 2.40125ZM18.401 20.3213C19.4246 20.3213 20.321 19.4249 20.321 18.4014L20.321 5.60022C20.321 4.5766 19.4246 3.68024 18.401 3.68024L5.59987 3.68024C4.57631 3.68024 3.67993 4.5766 3.67993 5.60022L3.67993 18.4014C3.67993 19.4249 4.57631 20.3213 5.59987 20.3213L18.401 20.3213ZM14.5599 5.27087L18.3997 5.27087L18.3997 5.27209C18.7849 5.27087 19.0405 5.52527 19.0405 5.91168L19.0405 9.75153C19.0405 10.1331 18.7849 10.3887 18.401 10.3911C18.0158 10.3887 17.7602 10.1331 17.7602 9.75153L17.7602 7.44763L14.0487 11.1591C13.9313 11.2808 13.7695 11.3494 13.6005 11.3494C13.4315 11.3494 13.2697 11.2808 13.1523 11.1591C13.0292 11.0428 12.9594 10.8809 12.9594 10.7115C12.9594 10.5421 13.0292 10.3802 13.1523 10.2639L16.8638 6.55005L14.5599 6.55005C14.1735 6.54883 13.9179 6.29443 13.9203 5.91046C13.9179 5.52411 14.1735 5.26971 14.5599 5.27087ZM10.594 12.6625L6.88254 16.3751L6.88254 14.0712C6.88254 13.686 6.62695 13.4304 6.24297 13.4304C5.85898 13.4304 5.60338 13.686 5.60219 14.0712L5.60219 17.9111C5.60219 18.2939 5.85898 18.5483 6.24297 18.5507L10.0828 18.5507C10.4668 18.5483 10.7224 18.2939 10.7224 17.9099C10.7224 17.5247 10.4668 17.2691 10.0816 17.2703L7.77771 17.2703L11.4904 13.5588C11.6133 13.4421 11.6829 13.2801 11.6829 13.1107C11.6829 12.9412 11.6133 12.7791 11.4904 12.6625C11.3737 12.5396 11.2117 12.47 11.0422 12.47C10.8727 12.47 10.7107 12.5396 10.594 12.6625Z" clip-rule="evenodd" fill-rule="evenodd"/>
  35. </svg>`,exitFullscreen:`
  36. <svg width="1em" height="1em" viewBox="0 0 24 24" fill="currentColor" focusable="false" aria-hidden="true" data-icon="exitWebFullscreen">
  37. <path d="M18.4009 2.40125L5.59978 2.40125C4.74855 2.39276 3.92976 2.72729 3.32794 3.32935C2.72614 3.9314 2.39194 4.75031 2.40068 5.6015L2.40068 18.4015C2.39226 19.2527 2.72676 20.0715 3.3288 20.6733C3.93085 21.2751 4.74976 21.6093 5.60097 21.6006L18.4009 21.6006C19.252 21.609 20.0706 21.2747 20.6723 20.6729C21.2741 20.0711 21.6085 19.2525 21.6 18.4015L21.6 5.60034C21.6085 4.74933 21.2741 3.93073 20.6723 3.32892C20.0706 2.72711 19.252 2.39282 18.4009 2.40125ZM18.4012 20.3212C19.4247 20.3212 20.3211 19.4248 20.3211 18.4012L20.3211 5.6001C20.3211 4.57648 19.4247 3.68011 18.4012 3.68011L5.59999 3.68011C4.57643 3.68011 3.68005 4.57648 3.68005 5.6001L3.68005 18.4012C3.68005 19.4248 4.57643 20.3212 5.59999 20.3212L18.4012 20.3212ZM17.4401 11.3494L13.6002 11.3494L13.6002 11.3483C13.215 11.3494 12.9594 11.095 12.9594 10.7087L12.9594 6.86877C12.9594 6.48718 13.215 6.23163 13.599 6.22925C13.9842 6.23163 14.2398 6.48718 14.2398 6.86877L14.2398 9.17273L17.9512 5.46124C18.0686 5.3396 18.2304 5.27087 18.3994 5.27087C18.5685 5.27087 18.7303 5.3396 18.8476 5.46124C18.9708 5.57751 19.0406 5.73944 19.0406 5.90881C19.0406 6.07825 18.9708 6.24011 18.8476 6.35645L15.1362 10.0703L17.4401 10.0703C17.8265 10.0715 18.082 10.3259 18.0797 10.7099C18.082 11.0963 17.8265 11.3506 17.4401 11.3494ZM6.69115 18.358L10.4026 14.6454L10.4026 16.9493C10.4026 17.3345 10.6582 17.5901 11.0422 17.5901C11.4262 17.5901 11.6818 17.3345 11.683 16.9493L11.683 13.1094C11.683 12.7266 11.4262 12.4722 11.0422 12.4698L7.20233 12.4698C6.81834 12.4722 6.56276 12.7266 6.56276 13.1106C6.56276 13.4958 6.81834 13.7514 7.20354 13.7502L9.50746 13.7502L5.79478 17.4617C5.67188 17.5784 5.60228 17.7404 5.60228 17.9099C5.60228 18.0793 5.67188 18.2413 5.79478 18.358C5.91145 18.481 6.07349 18.5505 6.24297 18.5505C6.41243 18.5505 6.57446 18.481 6.69115 18.358Z" clip-rule="evenodd" fill-rule="evenodd"/>
  38. </svg>`,globalFullscreen:`<svg width="1em" height="1em" viewBox="0 0 24 24" fill="none" stroke="currentColor" focusable="false" aria-hidden="true" data-icon="fullscreen">
  39. <path d="M8 4L6 4C4.89 4 4 4.89 4 6L4 8" stroke-width="1.5" stroke-linejoin="round" stroke-linecap="round"/>
  40. <path d="M4 16L4 18C4 19.1 4.89 20 6 20L8 20" stroke-width="1.5" stroke-linejoin="round" stroke-linecap="round"/>
  41. <path d="M16 20L18 20C19.1 20 20 19.1 20 18L20 16" stroke-width="1.5" stroke-linejoin="round" stroke-linecap="round"/>
  42. <path d="M20 8L20 6C20 4.89 19.1 4 18 4L16 4" stroke-width="1.5" stroke-linejoin="round" stroke-linecap="round"/>
  43. </svg>`,exitGlobalFullscreen:`<svg width="1em" height="1em" viewBox="0 0 24 24" fill="none" stroke="currentColor" focusable="false" aria-hidden="true" data-icon="exitFullscreen">
  44. <path d="M4 8L6 8C7.1 8 8 7.1 8 6L8 4" stroke-width="1.488819" stroke-linejoin="round" stroke-linecap="round"/>
  45. <path d="M8 20L8 18C8 16.89 7.1 16 6 16L4 16" stroke-width="1.488819" stroke-linejoin="round" stroke-linecap="round"/>
  46. <path d="M20 16L18 16C16.89 16 16 16.89 16 18L16 20" stroke-width="1.488819" stroke-linejoin="round" stroke-linecap="round"/>
  47. <path d="M16 4L16 6C16 7.1 16.89 8 18 8L20 8" stroke-width="1.488819" stroke-linejoin="round" stroke-linecap="round"/>
  48. </svg>`,close:'<svg width="1em" height="1em" viewBox="0 0 24 24" stroke="currentColor" focusable="false" aria-hidden="true" data-icon="close"><path d="M6.34 6.34L17.65 17.65" stroke-width="1.5" stroke-linecap="round"/><path d="M6.34 17.65L17.65 6.34" stroke-width="1.5" stroke-linecap="round"/></svg>',ptz:`<svg width="1em" height="1em" viewBox="0 0 24 24" fill="none" stroke="currentColor" focusable="false" aria-hidden="true" data-icon="ptz">
  49. <circle cx="12" cy="12" r="2.771739" stroke-width="1.5"/>
  50. <path d="M9.06 5.14L10.76 3.8C11.48 3.23 12.51 3.23 13.23 3.8L14.93 5.14" stroke-width="1.5" stroke-linecap="round"/>
  51. <path d="M4.87 14.93L3.54 13.23C2.97 12.51 2.97 11.48 3.54 10.76L4.87 9.06" stroke-width="1.5" stroke-linecap="round"/>
  52. <path d="M18.91 14.93L20.24 13.23C20.81 12.51 20.81 11.48 20.24 10.76L18.91 9.06" stroke-width="1.5" stroke-linecap="round"/>
  53. <path d="M9.06 18.69L10.76 20.02C11.48 20.59 12.51 20.59 13.23 20.02L14.93 18.69" stroke-width="1.5" stroke-linecap="round"/>
  54. </svg>`,download:`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" focusable="false" aria-hidden="true" data-icon="download">
  55. <path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="m20,14.83l0,3.67c0,0.55 -0.45,1 -1,1l-14,0c-0.56,0 -1,-0.45 -1,-1l0,-3.67"/>
  56. <path fill="currentColor" d="m11.125,9.66357l-2.59094,0c-0.44544,0 -0.66846,0.53853 -0.35352,0.85353l3.45956,3.4595c0.1952,0.1953 0.5119,0.1953 0.7071,0l3.4596,-3.4595c0.3149,-0.315 0.0919,-0.85353 -0.3536,-0.85353l-2.5782,0l0,-5.95654c0,-0.48315 -0.3917,-0.875 -0.875,-0.875c-0.4833,0 -0.875,0.39185 -0.875,0.875l0,5.95654z"/>
  57. </svg>`,sdk:`<svg width="1em" height="1em" viewBox="0 0 20 20" fill="currentColor" focusable="false" aria-hidden="true" data-icon="sdk">
  58. <path d="M6.20253 2.50012L11.6496 2.50012C12.2335 2.50012 12.7939 2.72827 13.2069 3.13391L15.3547 5.24329C15.7677 5.64893 16 6.19934 16 6.77271L16 15.1062C16 16.3011 15.0142 17.2694 13.7975 17.2694L6.20253 17.2694C4.98578 17.2694 4 16.3011 4 15.1062L4 4.66333C4 3.46826 4.98578 2.50012 6.20253 2.50012ZM8.07051 6.09814C8.02467 5.76025 7.73502 5.49976 7.38452 5.49976C7.00217 5.49976 6.69221 5.80969 6.69221 6.19202L6.69221 8.49976L6.69853 8.59375C6.74437 8.93164 7.03403 9.19202 7.38452 9.19202C7.76688 9.19202 8.07683 8.88208 8.07683 8.49976L8.07683 6.19202L8.07051 6.09814ZM9.69238 5.49976C10.0429 5.49976 10.3325 5.76025 10.3784 6.09814L10.3847 6.19202L10.3847 8.49976C10.3847 8.88208 10.0747 9.19202 9.69238 9.19202C9.34189 9.19202 9.05223 8.93164 9.00639 8.59375L9.00008 8.49976L9.00008 6.19202C9.00008 5.80969 9.31003 5.49976 9.69238 5.49976ZM12.686 6.09814C12.6402 5.76025 12.3505 5.49976 12 5.49976C11.6176 5.49976 11.3077 5.80969 11.3077 6.19202L11.3077 8.49976L11.314 8.59375C11.3598 8.93164 11.6495 9.19202 12 9.19202C12.3824 9.19202 12.6923 8.88208 12.6923 8.49976L12.6923 6.19202L12.686 6.09814Z" clip-rule="evenodd" fill-rule="evenodd"/>
  59. </svg>`,cloudRec:`<svg width="1em" height="1em" viewBox="0 0 20 20" fill="currentColor" focusable="false" aria-hidden="true" data-icon="cloud">
  60. <path d="M9.76489 4.00439C7.65723 4.08447 5.79883 5.23486 4.89697 6.94995L4.78638 7.17236C2.60205 7.62524 1 9.40649 1 11.5239C1 14.0032 3.17749 16 5.84619 16L9.32983 16L9.32983 13.3784L7.66479 13.3784C7.21924 13.3784 6.99634 12.8398 7.31128 12.5249L9.63892 10.197C9.83423 10.002 10.1509 10.002 10.3462 10.197L12.6738 12.5249C12.9888 12.8398 12.7659 13.3784 12.3203 13.3784L10.6553 13.3784L10.6553 16L14.9846 16C17.1948 16 19 14.3445 19 12.2856L18.9954 12.1052C18.9058 10.3704 17.533 8.95557 15.7456 8.63818L15.6372 8.62036L15.6152 8.4624C15.2087 5.93188 12.8438 4 10 4L9.76489 4.00439Z" clip-rule="evenodd" fill-rule="evenodd"/>
  61. </svg>`,cloudRecord:`<svg width="1em" height="1em" viewBox="0 0 20 20" fill="currentColor" focusable="false" aria-hidden="true" data-icon="cloud-record">
  62. <path d="M9.76489 4.00439C7.65723 4.08447 5.79883 5.23486 4.89697 6.94995L4.78638 7.17236C2.60205 7.62524 1 9.40649 1 11.5239C1 14.0032 3.17749 16 5.84619 16L14.9846 16C17.1948 16 19 14.3445 19 12.2856L18.9954 12.1052C18.9058 10.3704 17.533 8.95557 15.7456 8.63818L15.6372 8.62036L15.6152 8.4624C15.2087 5.93188 12.8438 4 10 4L9.76489 4.00439ZM10.8674 13.9116L6.89038 13.9116C6.26294 13.9116 5.75391 13.3889 5.75391 12.7449L5.75391 9.24487C5.75391 8.60034 6.26294 8.07812 6.89038 8.07812L10.8674 8.07812C11.4954 8.07812 12.0039 8.60034 12.0039 9.24487L12.0039 10.2937C12.2932 10.0627 12.9229 9.63184 13.4836 9.271C13.8145 9.05811 14.2461 9.24219 14.2461 9.63599L14.2461 12.3655C14.2461 12.759 13.8142 12.9434 13.4836 12.7307C12.9321 12.3755 12.303 11.9438 12.0039 11.707L12.0039 12.7449C12.0039 13.3889 11.4954 13.9116 10.8674 13.9116Z" clip-rule="evenodd" fill-rule="evenodd"/>
  63. </svg>`,playBack:`<svg width="1em" height="1em" viewBox="0 0 26.8701 26.8701" fill="none" stroke="currentColor" focusable="false" aria-hidden="true" data-icon="play-back">
  64. <path d="M8.48 4.24C8.48 4.24 7.39 8.16 7.77 7.77C11.29 4.26 16.99 4.26 20.5 7.77C24.02 11.29 24.02 16.99 20.5 20.5C16.99 24.02 11.29 24.02 7.77 20.5C6.03 18.76 5.16 16.49 5.14 14.21" stroke-width="1.5" stroke-linecap="round"/>
  65. </svg>`,playForward:`<svg width="1em" height="1em" viewBox="0 0 24 24" fill="none" stroke="currentColor" focusable="false" aria-hidden="true" data-icon="play-forward">
  66. <path d="M19.58 7.28C18.01 4.71 15.18 2.99 11.95 2.99C7 2.99 3 7 3 11.95C3 16.89 7 20.9 11.95 20.9C16.51 20.9 20.27 17.48 20.82 13.07" stroke-width="1.5" stroke-linejoin="round" stroke-linecap="round"/>
  67. <path d="M19.56 4.22L19.56 7.29" stroke-width="1.5" stroke-linejoin="round" stroke-linecap="round"/>
  68. <path d="M16.5 7.29L19.56 7.29" stroke-width="1.5" stroke-linejoin="round" stroke-linecap="round"/>
  69. </svg>`,filter:`<svg width="1em" height="1em" viewBox="0 0 20 20" fill="currentColor" focusable="false" aria-hidden="true" data-icon="filter">
  70. <path d="M12.57 9.92L16.31 5.76C16.55 5.49 16.69 5.15 16.69 4.79C16.69 3.98 16.03 3.33 15.23 3.33L4.79 3.33C4.43 3.33 4.09 3.46 3.82 3.7L3.72 3.79C3.21 4.33 3.19 5.18 3.7 5.75L7.38 9.91L7.38 15.66C7.38 16.11 7.7 16.51 8.14 16.63L11.32 17.43C11.95 17.59 12.57 17.11 12.57 16.46L12.57 9.92ZM4.88 4.83L8.88 9.35L8.88 15.27L11.07 15.82L11.07 9.34L15.13 4.83L4.88 4.83Z" fill-rule="evenodd"/>
  71. </svg>`,arrow:`<svg width="1em" height="1em" viewBox="0 0 30 30" fill="none" stroke="currentColor" focusable="false" aria-hidden="true" data-icon="arrow">
  72. <path d="M23 19L15 12L7 19" stroke-width="1.5" stroke-linejoin="round" stroke-linecap="round"/>
  73. </svg>`,more:`<svg width="1em" height="1em" viewBox="0 0 24 24" fill="none" stroke="currentColor" focusable="false" aria-hidden="true" data-icon="more">
  74. <path d="M4 6.8L20.8 6.8" stroke-width="1.5" stroke-linecap="round"/>
  75. <path d="M4 12.39L12.4 12.39" stroke-width="1.5" stroke-linecap="round"/>
  76. <path d="M4 18L8.19 18" stroke-width="1.5" stroke-linecap="round"/>
  77. </svg>`,moreDot:`<svg width="1em" height="1em" viewBox="0 0 20 20" fill="currentColor" focusable="false" aria-hidden="true" data-icon="more-dot">
  78. <path d="M8.75 3.75C8.75 3.05964 9.30964 2.5 10 2.5C10.6904 2.5 11.25 3.05964 11.25 3.75C11.25 4.44036 10.6904 5 10 5C9.30964 5 8.75 4.44036 8.75 3.75ZM8.75 10C8.75 9.30964 9.30964 8.75 10 8.75C10.6904 8.75 11.25 9.30964 11.25 10C11.25 10.6904 10.6904 11.25 10 11.25C9.30964 11.25 8.75 10.6904 8.75 10ZM10 15C9.30964 15 8.75 15.5596 8.75 16.25C8.75 16.9404 9.30964 17.5 10 17.5C10.6904 17.5 11.25 16.9404 11.25 16.25C11.25 15.5596 10.6904 15 10 15Z" fill-rule="evenodd" />
  79. </svg>`,minusCircle:`<svg width="1em" height="1em" viewBox="0 0 20 20" focusable="false" aria-hidden="true" data-icon="minus-circle">
  80. <path fill="currentColor" d="M10 3.75C13.4518 3.75 16.25 6.54822 16.25 10C16.25 13.4518 13.4518 16.25 10 16.25C6.54822 16.25 3.75 13.4518 3.75 10C3.75 6.54822 6.54822 3.75 10 3.75ZM10 5C7.23857 5 5 7.23858 5 10C5 12.7614 7.23857 15 10 15C12.7614 15 15 12.7614 15 10C15 7.23858 12.7614 5 10 5Z" fill-rule="evenodd" />
  81. <path stroke="currentColor" d="M7.46729 10.0588L12.4673 10.0588" stroke-linecap="round" stroke-width="1.25" />
  82. </svg>`,plusCircle:`<svg width="1em" height="1em" viewBox="0 0 20 20" focusable="false" aria-hidden="true" data-icon="plus-circle">
  83. <path fill="currentColor" d="M10 3.75C13.4518 3.75 16.25 6.54822 16.25 10C16.25 13.4518 13.4518 16.25 10 16.25C6.54822 16.25 3.75 13.4518 3.75 10C3.75 6.54822 6.54822 3.75 10 3.75ZM10 5C7.23857 5 5 7.23858 5 10C5 12.7614 7.23857 15 10 15C12.7614 15 15 12.7614 15 10C15 7.23858 12.7614 5 10 5Z" fill-rule="evenodd" />
  84. <path stroke="currentColor" d="M7.46729 10.0588L12.4673 10.0588" stroke-linecap="round" stroke-width="1.25" />
  85. <path stroke="currentColor" d="M0 0L5 0" stroke-linecap="round" stroke-width="1.25" transform="matrix(0,1,-1,0,9.96729,7.55884)" />
  86. </svg>`,record:`<svg width="1em" height="1em" viewBox="0 0 24 24" fill="none" stroke="currentColor" focusable="false" aria-hidden="true" data-icon="record">
  87. <path d="M4.53 19C3.03 19 1.8 17.74 1.8 16.2L1.8 7.8C1.8 6.25 3.03 5 4.53 5L14.08 5C15.58 5 16.8 6.25 16.8 7.8L16.8 16.2C16.8 17.74 15.58 19 14.08 19L4.53 19Z" stroke-width="1.5" stroke-linejoin="round"/>
  88. <path d="M17.25 13.64C17.94 14.2 18.97 15.03 20.36 16.15C21.09 16.74 22.19 16.21 22.19 15.27L22.19 8.72C22.19 7.78 21.09 7.25 20.36 7.84C18.99 8.94 17.96 9.77 17.28 10.32" stroke-width="1.5" stroke-linejoin="round" stroke-linecap="round"/>
  89. </svg>`,talk:`<svg width="1em" height="1em" viewBox="0 0 24 24" fill="currentColor" stroke="currentColor" focusable="false" aria-hidden="true" data-icon="talk">
  90. <path stroke="none" d="M12.22 18.95C12.65 18.95 13.01 19.21 13.07 19.54L13.08 19.64L13.08 21.78C13.08 22.16 12.69 22.47 12.22 22.47C11.78 22.47 11.42 22.21 11.37 21.87L11.36 21.78L11.36 19.64C11.36 19.26 11.74 18.95 12.22 18.95Z" fill-rule="evenodd"/>
  91. <path d="M19.53 11.37L19.53 11.58C19.53 15.74 16.15 19.11 11.99 19.11C7.83 19.11 4.46 15.74 4.46 11.58L4.46 11.43" fill="none" stroke-width="1.5" stroke-linecap="round"/>
  92. <path stroke="none" d="M12.05 1.52C9.3 1.52 7.07 3.58 7.07 6.12L7.07 12.07C7.07 14.61 9.3 16.67 12.05 16.67C14.79 16.67 17.02 14.61 17.02 12.07L17.02 6.12C17.02 3.58 14.79 1.52 12.05 1.52ZM8.57 12.07L8.57 6.12C8.57 5.94 8.59 5.75 8.63 5.57C8.67 5.36 8.74 5.16 8.83 4.96C8.86 4.89 8.9 4.82 8.93 4.75C9.09 4.46 9.3 4.21 9.55 3.97C9.64 3.89 9.73 3.81 9.83 3.74C10.08 3.55 10.35 3.4 10.66 3.28C10.79 3.23 10.93 3.19 11.06 3.15C11.38 3.07 11.71 3.02 12.05 3.02C12.38 3.02 12.71 3.07 13.03 3.15C13.17 3.19 13.3 3.23 13.43 3.28C13.74 3.4 14.02 3.55 14.27 3.74C14.36 3.81 14.45 3.89 14.54 3.97C14.79 4.21 15 4.46 15.16 4.75C15.2 4.82 15.23 4.89 15.26 4.96C15.35 5.16 15.42 5.36 15.46 5.57C15.5 5.75 15.52 5.94 15.52 6.12L15.52 12.07C15.52 12.26 15.5 12.44 15.46 12.63C15.42 12.83 15.35 13.04 15.26 13.24C15.23 13.31 15.2 13.38 15.16 13.45C15 13.73 14.79 13.99 14.54 14.22C14.45 14.3 14.36 14.38 14.27 14.45C14.02 14.64 13.74 14.79 13.43 14.91C13.3 14.96 13.17 15.01 13.03 15.05C12.71 15.13 12.38 15.17 12.05 15.17C11.71 15.17 11.38 15.13 11.06 15.05C10.93 15.01 10.79 14.96 10.66 14.91C10.35 14.79 10.08 14.64 9.83 14.45C9.73 14.38 9.64 14.3 9.55 14.22C9.3 13.99 9.09 13.73 8.93 13.45C8.9 13.38 8.86 13.31 8.83 13.24C8.74 13.04 8.67 12.83 8.63 12.63C8.59 12.44 8.57 12.26 8.57 12.07Z" fill-rule="evenodd"/>
  93. </svg>`,talkGrowth:u=>`<svg width="1em" height="1em" viewBox="0 0 24 24" focusable="false" aria-hidden="true" data-icon="talk-growth">
  94. <g fill="currentColor" stroke="currentColor">
  95. <path stroke="none" d="M9.22313 18.9543C9.6588 18.9543 10.0189 19.2133 10.0759 19.5494L10.0837 19.6428L10.0837 21.7847C10.0837 22.1649 9.69841 22.4732 9.22313 22.4732C8.78745 22.4732 8.42739 22.2142 8.37041 21.8781L8.36255 21.7847L8.36255 19.6428C8.36255 19.2626 8.74784 18.9543 9.22313 18.9543Z" fill-rule="evenodd" />
  96. <path d="M16.5323 11.3779L16.5323 11.5872C16.5323 15.7472 13.1599 19.1197 8.99981 19.1197C4.83971 19.1197 1.46729 15.7472 1.46729 11.5872L1.46729 11.4335" fill-rule="evenodd" fill="none" stroke-width="1.5" />
  97. <path stroke="none" d="M4.07861 6.12978C4.07861 3.589 6.30476 1.5293 9.05085 1.5293C11.7969 1.5293 14.0231 3.589 14.0231 6.12978L14.0231 12.075C14.0231 14.6158 11.7969 16.6755 9.05085 16.6755C6.30476 16.6755 4.07861 14.6158 4.07861 12.075L4.07861 6.12978ZM5.57861 12.075L5.57861 6.12978C5.57861 5.94083 5.597 5.75561 5.63376 5.57412C5.67605 5.36539 5.74265 5.16158 5.83357 4.9627C5.86625 4.8912 5.90164 4.82121 5.93974 4.75272C6.09781 4.4685 6.30245 4.21019 6.55365 3.97777C6.64206 3.89597 6.73424 3.81921 6.83019 3.7475C7.0816 3.55959 7.3589 3.40632 7.66207 3.28767C7.79552 3.23545 7.93107 3.19114 8.06871 3.15475C8.38503 3.07111 8.71241 3.0293 9.05085 3.0293C9.38929 3.0293 9.71668 3.07112 10.033 3.15475C10.1706 3.19114 10.3062 3.23545 10.4396 3.28767C10.7428 3.40632 11.0201 3.55959 11.2715 3.74749C11.3675 3.81921 11.4596 3.89596 11.548 3.97777C11.7993 4.2102 12.0039 4.46853 12.162 4.75276C12.2001 4.82124 12.2354 4.89122 12.2681 4.9627C12.359 5.16157 12.4256 5.36536 12.4679 5.57407C12.5047 5.75558 12.5231 5.94082 12.5231 6.12978L12.5231 12.075C12.5231 12.264 12.5047 12.4492 12.4679 12.6307C12.4256 12.8394 12.359 13.0432 12.2681 13.2421C12.2355 13.3136 12.2001 13.3835 12.162 13.452C12.0039 13.7362 11.7993 13.9946 11.548 14.227C11.4596 14.3088 11.3675 14.3856 11.2715 14.4573C11.0201 14.6452 10.7428 14.7985 10.4396 14.9171C10.3062 14.9693 10.1706 15.0136 10.033 15.05C9.71667 15.1337 9.38929 15.1755 9.05085 15.1755C8.71241 15.1755 8.38503 15.1337 8.06871 15.05C7.93107 15.0136 7.79552 14.9693 7.66207 14.9171C7.3589 14.7985 7.0816 14.6452 6.83019 14.4573C6.73424 14.3856 6.64206 14.3088 6.55365 14.227C6.30244 13.9946 6.09779 13.7363 5.93972 13.452C5.90163 13.3836 5.86625 13.3136 5.83357 13.2421C5.74265 13.0432 5.67605 12.8394 5.63377 12.6307C5.597 12.4492 5.57861 12.264 5.57861 12.075Z" fill-rule="evenodd" />
  98. </g>
  99. <g class="${u}-icon-talk-growth-dot">
  100. <path class="${u}-icon-talk-growth-dot1" d="M19.1333 6.40039L22.8667 6.40039" stroke="currentColor" stroke-linecap="round" stroke-width="1.86666667" />
  101. <path class="${u}-icon-talk-growth-dot2" d="M19.1333 10.1338L21.9331 10.1338" stroke="currentColor" stroke-linecap="round" stroke-width="1.86666667" />
  102. <path class="${u}-icon-talk-growth-dot3" d="M19.1333 13.8672L20.9995 13.8672" stroke="currentColor" stroke-linecap="round" stroke-width="1.86666667" />
  103. <path class="${u}-icon-talk-growth-dot4" d="M19.1333 17.6001L20.0669 17.6001" stroke="currentColor" stroke-linecap="round" stroke-width="1.86666667" />
  104. </g>
  105. </svg>`,capturePicture:`<svg width="1em" height="1em" viewBox="0 0 24 24" fill="none" stroke="currentColor" focusable="false" aria-hidden="true" data-icon="capture-picture">
  106. <path d="M6.94 7.51C7.34 7.51 7.7 7.28 7.86 6.91L8.43 5.6C8.59 5.23 8.95 5 9.35 5L14.69 5C15.04 5 15.37 5.18 15.55 5.49L16.45 7.02C16.63 7.33 16.96 7.51 17.31 7.51L18.5 7.51C19.6 7.51 20.5 8.41 20.5 9.51L20.5 17C20.5 18.1 19.6 19 18.5 19L5.5 19C4.39 19 3.5 18.1 3.5 17L3.5 9.51C3.5 8.41 4.39 7.51 5.5 7.51L6.94 7.51Z" stroke-width="1.5"/>
  107. <circle cx="12" cy="12.525146" r="3.068097" stroke-width="1.5"/>
  108. </svg>`,zoom:`<svg width="1em" height="1em" viewBox="0 0 24 24" fill="none" stroke="currentColor" focusable="false" aria-hidden="true" data-icon="zoom">
  109. <ellipse cx="10.914795" cy="11.25" rx="8.004043" ry="8.25" stroke-width="1.5"/>
  110. <path d="M14.31 11.04L8.05 11.14" stroke-width="1.5" stroke-linejoin="round" stroke-linecap="round"/>
  111. <path d="M11.13 14.22L11.23 7.95" stroke-width="1.5" stroke-linejoin="round" stroke-linecap="round"/>
  112. <path d="M16.45 17.83L19.36 20.83" stroke-width="1.5" stroke-linejoin="round" stroke-linecap="round"/>
  113. </svg>`,privacyMasking:`<svg width="1em" height="1em" viewBox="0 0 24 24" fill="none" stroke="currentColor" focusable="false" aria-hidden="true" data-icon="privacy-masking">
  114. <path d="M12 19C11.15 19 10.31 18.82 9.49 18.5" stroke-width="1.5" stroke-linejoin="round" stroke-linecap="round"/>
  115. <path d="M20.88 12.46C18.98 15.96 15.49 19 11.99 19" stroke-width="1.5" stroke-linejoin="round" stroke-linecap="round"/>
  116. <path d="M19.07 8.92C19.76 9.72 20.38 10.61 20.88 11.53C21.03 11.82 21.03 12.17 20.88 12.46" stroke-width="1.5" stroke-linejoin="round" stroke-linecap="round"/>
  117. <path d="M5 19L19 5" stroke-width="1.5" stroke-linejoin="round" stroke-linecap="round"/>
  118. <path d="M9.77 14.22C8.54 12.99 8.54 11 9.77 9.77C11 8.54 12.99 8.54 14.22 9.77" stroke-width="1.5" stroke-linejoin="round" stroke-linecap="round"/>
  119. <path d="M17.04 6.95C15.49 5.75 13.74 5 12 5C8.5 5 5.01 8.03 3.11 11.53C2.96 11.82 2.96 12.17 3.11 12.46C4.06 14.21 5.41 15.84 6.95 17.04" stroke-width="1.5" stroke-linejoin="round" stroke-linecap="round"/>
  120. </svg>`,info:`<svg width="1em" height="1em" viewBox="0 0 24 24" fill="currentColor" focusable="false" aria-hidden="true" data-icon="info">
  121. <path d="M12 1.5C6.20154 1.5 1.5 6.20156 1.5 12C1.5 17.7984 6.20154 22.5 12 22.5C17.7985 22.5 22.5 17.7984 22.5 12C22.5 6.20156 17.7985 1.5 12 1.5ZM10.875 7.875C10.875 8.49609 11.3789 9 12 9C12.6211 9 13.125 8.49609 13.125 7.875C13.125 7.25391 12.6211 6.75 12 6.75C11.3789 6.75 10.875 7.25391 10.875 7.875ZM12.75 17.0625C12.75 17.1656 12.6656 17.25 12.5625 17.25L11.4375 17.25C11.3344 17.25 11.25 17.1656 11.25 17.0625L11.25 10.6875C11.25 10.5844 11.3344 10.5 11.4375 10.5L12.5625 10.5C12.6656 10.5 12.75 10.5844 12.75 10.6875L12.75 17.0625Z" clip-rule="evenodd" fill-rule="evenodd"/>
  122. </svg>`,error:`<svg width="1em" height="1em" viewBox="0 0 24 24" fill="currentColor" focusable="false" aria-hidden="true" data-icon="error">
  123. <path d="M1.5 12C1.5 6.20156 6.20157 1.5 12 1.5C17.7984 1.5 22.5 6.20156 22.5 12C22.5 17.7984 17.7984 22.5 12 22.5C6.20157 22.5 1.5 17.7984 1.5 12ZM14.3297 15.982L15.8766 15.9891C15.9797 15.9891 16.0641 15.9047 16.0641 15.8016C16.0641 15.757 16.0477 15.7148 16.0195 15.6797L12.9727 12.0469L16.0172 8.4164C16.0453 8.38125 16.0617 8.33906 16.0617 8.29453C16.0617 8.18906 15.9774 8.10703 15.8742 8.10703L14.3273 8.11406L12 10.8891L9.67267 8.11172L8.12344 8.10469C8.02032 8.10469 7.93594 8.18906 7.93594 8.29219C7.93594 8.33672 7.95233 8.37891 7.98047 8.41406L11.0297 12.0445L7.98047 15.6773C7.95233 15.7125 7.93594 15.7547 7.93594 15.7992C7.93594 15.9047 8.02032 15.9867 8.12344 15.9867L9.67267 15.9797L12 13.2047L14.3297 15.982Z" clip-rule="evenodd" fill-rule="evenodd"/>
  124. </svg>`};function It(u,e){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},d="";return i&&Object.keys(i).forEach(b=>{d+=`${b}="${i[b]}"`}),`<span class="${ne}-icon ${ne}-icon-${e}" ${d}>${u}</span>`}const ko=function(){return It(Ct.play,"play",arguments.length>0&&arguments[0]!==void 0?arguments[0]:{})},To=function(){return It(Ct.pause,"pause",arguments.length>0&&arguments[0]!==void 0?arguments[0]:{})},Lo=function(){let u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return It(Ct.volume(ne),"volume",u)},Bo=function(){return It(Ct.mobileFullscreen,"mobile-fullscreen",arguments.length>0&&arguments[0]!==void 0?arguments[0]:{})},Io=function(){return It(Ct.exitFullscreen,"exit-fullscreen",arguments.length>0&&arguments[0]!==void 0?arguments[0]:{})},Oo=function(){return It(Ct.fullscreen,"fullscreen",arguments.length>0&&arguments[0]!==void 0?arguments[0]:{})},xo=function(){return It(Ct.exitGlobalFullscreen,"exit-global-fullscreen",arguments.length>0&&arguments[0]!==void 0?arguments[0]:{})},Ro=function(){return It(Ct.globalFullscreen,"global-fullscreen",arguments.length>0&&arguments[0]!==void 0?arguments[0]:{})},Do=function(){return It(Ct.capturePicture,"capture-picture",arguments.length>0&&arguments[0]!==void 0?arguments[0]:{})},Mo=function(){return It(Ct.ptz,"ptz",arguments.length>0&&arguments[0]!==void 0?arguments[0]:{})},Po=function(){return It(Ct.record,"record",arguments.length>0&&arguments[0]!==void 0?arguments[0]:{})},$o=function(){let u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return It(Ct.talkGrowth(ne),"talk-growth",u)},Uo=function(){return It(Ct.minusCircle,"minus-circle",arguments.length>0&&arguments[0]!==void 0?arguments[0]:{})},Fo=function(){return It(Ct.plusCircle,"plus-circle",arguments.length>0&&arguments[0]!==void 0?arguments[0]:{})},No=function(){return It(Ct.sdk,"sdk",arguments.length>0&&arguments[0]!==void 0?arguments[0]:{})},Vo=function(){return It(Ct.cloudRec,"cloud-rec",arguments.length>0&&arguments[0]!==void 0?arguments[0]:{})},jo=function(){return It(Ct.cloudRecord,"cloud-record",arguments.length>0&&arguments[0]!==void 0?arguments[0]:{})},Go=function(){return It(Ct.error,"error",arguments.length>0&&arguments[0]!==void 0?arguments[0]:{})},mr=function(){return It(Ct.info,"info",arguments.length>0&&arguments[0]!==void 0?arguments[0]:{})};function sn(){return sn=Object.assign||function(u){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var d in i)Object.prototype.hasOwnProperty.call(i,d)&&(u[d]=i[d])}return u},sn.apply(this,arguments)}const _r={};class Qo extends Bt{info(e){let i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;this._show(`${mr()}<div class="${ne}-message-msg">${e}</div>`,i,"info")}warn(e){let i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;this._show(`${mr()}<div class="${ne}-message-msg">${e}</div>`,i,"warn")}error(e){let i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;this._show(`${Go()}<div class="${ne}-message-msg">${e}</div>`,i,"error")}toast(e){}_show(e){let i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,d=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"info";this._timer&&(clearTimeout(this._timer),this._timer=null),this.$popupContainer.classList.add(`${ne}-has-message`,`${ne}-has-message-${d}`),typeof this._options.render=="function"?this.$container.innerHTML=this._options.render(e,i,d):this.$container.innerHTML=`<div class="${ne}-message-content ${ne}-message-${d}">${e||""}</div>`,this.$container.style.display="flex",this.$container.classList.remove(`${ne}-hide`),i>0&&(this._timer=setTimeout(()=>{this.hide(),this._timer&&clearTimeout(this._timer),this._timer=null},1e3*i))}destroy(){this._timer&&(clearTimeout(this._timer),this._timer=null),this.hide(),super.destroy()}hide(){super.hide(),this.$container.innerHTML="",Array.from(this.$popupContainer.classList).forEach(e=>{new RegExp(`^${ne}-has-message`,"ig").test(e)&&this.$popupContainer.classList.remove(e)})}constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};super(Object.assign({},_r,sn({},e,{tagName:"div",controlType:"block"}))),this._options=Object.assign({},_r,e),this.$container.classList.add(`${ne}-message`,`${ne}-hide`)}}function ln(){return ln=Object.assign||function(u){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var d in i)Object.prototype.hasOwnProperty.call(i,d)&&(u[d]=i[d])}return u},ln.apply(this,arguments)}function Ni(u,e){let i=null,d=0;return function(){for(var b=arguments.length,l=new Array(b),p=0;p<b;p++)l[p]=arguments[p];const t=Date.now(),a=e-(t-d);a<=0?(d=t,u.apply(this,l)):i||(i=setTimeout(()=>{d=Date.now(),i=null,u.apply(this,l)},a))}}var vr,gr,yr;class dt{static orientationEventListener(e){let i=null,d=()=>{var t,a;if((t=screen)!=null&&t.orientation)return{angle:screen.orientation.angle,type:screen.orientation.type||screen.mozOrientation||screen.msOrientation};if(((a=window)==null?void 0:a.orientation)!==void 0){const n=window.orientation;return{angle:n>=0?n:360+n,type:Math.abs(n)===90?"landscape":"portrait"}}return dt.isMobile?{angle:window.innerWidth>window.innerHeight?90:0,type:window.innerWidth>window.innerHeight?"landscape":"portrait"}:{angle:0,type:"unknow"}},b=d(),l=()=>{const t=d==null?void 0:d();t.angle===b.angle&&t.type===b.type||(e==null||e(t),b=t)},p=()=>{i&&clearTimeout(i),l&&(i=setTimeout(l,200))};return screen.orientation?screen.orientation.addEventListener("change",l):"onorientationchange"in window?window.addEventListener("orientationchange",l):dt.isMobile&&window.addEventListener("resize",p),[b,()=>{screen.orientation&&l?screen.orientation.removeEventListener("change",l):"onorientationchange"in window&&l?window.removeEventListener("orientationchange",l):dt.isMobile&&window.removeEventListener("resize",p),l=null,p=null,d=null,i&&(clearTimeout(i),i=null)}]}static resizeObserver(e,i){let d=(l,p)=>{for(const t of l)t.target===e&&i&&i(l,p)},b=new ResizeObserver(Ni(d,50));return b.observe(e),{unobserve(){try{b==null||b.unobserve(e)}catch{}d=null},disconnect(){b==null||b.disconnect(),b=null,d=null}}}}dt.isMobile=/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone|Opera Mini)/i.test((vr=navigator)==null?void 0:vr.userAgent)||/Macintosh/i.test((gr=navigator)==null?void 0:gr.userAgent)&&((yr=navigator)==null?void 0:yr.maxTouchPoints)>1;const zo={step:.01,range:[0,1],draggable:!0,disabled:!1,showPercent:!1,showPlus:!1,showMinus:!1,onChange:()=>{},renderText:(u,e)=>(100*e).toFixed(0)};class Ho{get disabled(){return this._disabled}set disabled(e){this._disabled=e}get value(){return this._value}set value(e){this._updateValuePercent("value",e)}get percent(){return this._percent}set percent(e){this._updateValuePercent("percent",e)}destroy(){var e,i,d,b,l,p,t,a,n,s;(i=this._delegateSliderMouseDown)==null||(e=i.destroy)==null||e.call(i),this._delegateSliderMouseDown=null,(b=this._delegateSliderHandleMouseDown)==null||(d=b.destroy)==null||d.call(b),this._delegateSliderHandleMouseDown=null,(p=this._delegateProgressMouseDown)==null||(l=p.destroy)==null||l.call(p),this._delegateProgressMouseDown=null,(a=this._delegatePlusClick)==null||(t=a.destroy)==null||t.call(a),this._delegatePlusClick=null,(s=this._delegateMinusClick)==null||(n=s.destroy)==null||n.call(s),this._delegateMinusClick=null,this.$content&&this.$container.removeChild(this.$content),this.$content=null}_updateValuePercent(e,i){if(e==="percent"){if(i<0||i>1)return;this._percent!==i&&(this._percent=+i.toFixed(2),this._convertPercentToValue(this._percent),this.options.onChange==null||this.options.onChange.call(this.options,this._value,this._percent,this.options.range),this._updateUI())}else if(e==="value"){if(i<this.options.range[0]||i>this.options.range[1])return;this._value!==i&&(this._value=+i.toFixed(2),this._convertValueToPercent(this._value),this.options.onChange==null||this.options.onChange.call(this.options,this._value,this._percent,this.options.range),this._updateUI())}}_convertPercentToValue(e){this._value=+(this.options.range[0]+(this.options.range[1]-this.options.range[0])*e).toFixed(2)}_convertValueToPercent(e){this._percent=+((e-this.options.range[0])/(this.options.range[1]-this.options.range[0])).toFixed(2)}_render(){var e;this.$content=document.createElement("div"),this.$content.className=`${ne}-progress ${(e=this.options.className)!=null?e:""}`,this.$content.innerHTML=`${this.options.showPercent?`<div class="${ne}-progress-text">${this.options.renderText==null?void 0:this.options.renderText.call(this.options,this._value,this._percent,this.options.range)}</div>`:""}
  125. ${this.options.showPlus?`<div class="${ne}-progress-plus">
  126. ${Fo()}
  127. </div>`:""}
  128. <div class="${ne}-progress-slider">
  129. <div class="${ne}-progress-slider-fill"></div>
  130. <div class="${ne}-progress-slider-handle" style="top: 100%"></div>
  131. </div>
  132. ${this.options.showMinus?`<div class="${ne}-progress-minus">
  133. ${Uo()}
  134. </div>`:""}`,this.$container.appendChild(this.$content)}_updateUI(){const e=this.$content;if(e==null||e.setAttribute("data-value",this._value+""),e.querySelector(`.${ne}-progress-slider-fill`)){const i=+(100*this._percent).toFixed(0);this.options.showPercent&&(e.querySelector(`.${ne}-progress-text`).innerHTML=this.options.renderText==null?void 0:this.options.renderText.call(this.options,this._value,this._percent,this.options.range)),e.querySelector(`.${ne}-progress-slider-fill`).style.height=i+"%",e.querySelector(`.${ne}-progress-slider-handle`).style.top=100-i+"%"}}_eventListeners(){this._delegateSliderMouseDown=ri(this.$content,`.${ne}-progress-slider`,"mousedown",e=>{var i,d;if(e.stopPropagation(),e.delegateTarget.classList.contains(`${ne}-disabled`)||this._disabled)return;const b=this.$content.querySelector(`.${ne}-progress-slider`).getBoundingClientRect();let l=e.clientY-b.top;l=Math.max(0,Math.min(l,b.height));const p=+((b.height-l)/b.height).toFixed(2);this._convertPercentToValue(p),(d=this.options)==null||(i=d.onProgressClick)==null||i.call(d,this._value,p,this.options.range),this.percent=p}),this._delegateSliderHandleMouseDown=ri(this.$content,`.${ne}-progress-slider-handle`,"mousedown",e=>{if(e.stopPropagation(),!this.options.draggable||e.delegateTarget.classList.contains(`${ne}-disabled`)||this._disabled)return;const i=e.clientY,d=this.$content.querySelector(`.${ne}-progress-slider-fill`).offsetHeight,b=this.$content.querySelector(`.${ne}-progress-slider`).offsetHeight;let l=Ni(a=>{if(a.stopPropagation(),!this.options.draggable||this._disabled)return;const n=i-a.clientY;let s=d+n;s=Math.max(0,Math.min(s,b)),this.percent=+(s/b).toFixed(2)},20);const p=this.$content;function t(){p.removeEventListener("mousemove",l),l=null,p.removeEventListener("mouseup",t),p.removeEventListener("mouseup",t)}p.addEventListener("mousemove",l),p.addEventListener("mouseup",t),p.addEventListener("mouseleave",t)}),this.options.showPlus&&(this._delegatePlusClick=ri(this.$content,`.${ne}-progress-plus`,"click",e=>{if(e.delegateTarget.classList.contains(`${ne}-disabled`)||this._disabled)return;const i=this._value+this.options.step;i<=this.options.range[1]?this.value=i:this.value=this.options.range[1],this.options.onPlusClick==null||this.options.onPlusClick.call(this.options,this.value,this.percent,this.options.range)})),this.options.showMinus&&(this._delegateMinusClick=ri(this.$content,`.${ne}-progress-minus`,"click",e=>{if(e.delegateTarget.classList.contains(`${ne}-disabled`)||this._disabled)return;const i=this._value-this.options.step;i>=this.options.range[0]?this.value=i:this.value=this.options.range[0],this.options.onMinusClick==null||this.options.onMinusClick.call(this.options,this.value,this.percent,this.options.range)})),this._delegateProgressMouseDown=ri(this.$container,`.${ne}-progress`,"mousedown",e=>{e.stopPropagation()})}constructor(e){var i,d;if(this._percent=0,this._value=0,this._disabled=!1,this._delegateSliderMouseDown=null,this._delegateSliderHandleMouseDown=null,this._delegateProgressMouseDown=null,this._delegatePlusClick=null,this._delegateMinusClick=null,this.options=Object.assign({},zo,e),((i=this.options.range)==null?void 0:i.length)!==2)throw new Error("Progress range must be an array with two elements.");if(this.options.range[0]>=this.options.range[1])throw new Error("Progress range first element must be less than the second element.");this.$container=e.container,this._render(),this._eventListeners();const b=(d=this.options.defaultValue)!=null?d:this.options.range[0];this._value=+b.toFixed(2),this._percent=+((b-this.options.range[0])/(this.options.range[1]-this.options.range[0])).toFixed(2),this._updateUI(),this.disabled=this.options.disabled}}function An(){return An=Object.assign||function(u){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var d in i)Object.prototype.hasOwnProperty.call(i,d)&&(u[d]=i[d])}return u},An.apply(this,arguments)}const Wo={volume:.8,muted:!1,open:!1,trigger:"hover",onOpenChange:()=>{},onChange:()=>{}};function br(u,e,i,d,b,l,p){try{var t=u[l](p),a=t.value}catch(n){return void i(n)}t.done?e(a):Promise.resolve(a).then(d,b)}function dn(u){return function(){var e=this,i=arguments;return new Promise(function(d,b){var l=u.apply(e,i);function p(a){br(l,d,b,p,t,"next",a)}function t(a){br(l,d,b,p,t,"throw",a)}p(void 0)})}}const qo={prefix:"ezplayer"};class wi{static getInstance(){return wi.instance||(wi.instance=new wi),wi.instance}add(e,i){if(e){const d=this.fullscreens.findIndex(b=>b.element===e);d>=0?(this.fullscreens[d].onChange||(this.fullscreens[d].onChange=[]),this.fullscreens[d].onChange.push(i)):this.fullscreens.push({element:e,onChange:[i]})}}getChanges(e){const i=this.fullscreens.find(d=>d.element===e);return i&&(i==null?void 0:i.onChange)||[]}remove(e,i){const d=this.fullscreens.findIndex(p=>p.element===e);if(d>=0){var b;const p=(b=this.fullscreens[d].onChange)==null?void 0:b.find(t=>t===i);if(p){var l;const t=(l=this.fullscreens[d].onChange)==null?void 0:l.filter(a=>a!==p);this.fullscreens[d].onChange=t}(!this.fullscreens[d].onChange||this.fullscreens[d].onChange&&this.fullscreens[d].onChange.length===0)&&this.fullscreens.splice(d,1)}}constructor(){this.fullscreens=[]}}const cn=wi.getInstance();let Er=class{fullscreen(){return dn(function*(){if(!dt.isMobile)return yield li.request(this.$container);this._fullscreenchange(this.$container,!0)}).call(this)}exitFullscreen(){return dn(function*(){if(dt.isMobile)this._fullscreenchange(this.$container,!1);else if(this._isFullscreen)return yield li.exit()}).call(this)}toggle(){return dn(function*(){if(!dt.isMobile)return yield li.toggle(this.$container);this._fullscreenchange(this.$container,!this._isCurrentFullscreen)}).call(this)}destroy(){li.isEnabled&&li.off("change",this._fullscreenchange2),dt.isMobile&&this._options.onChange&&cn.remove(this.$container,this._options.onChange),this._fullscreenchange2=null}_fullscreenchange2(){this._fullscreenchange()}_fullscreenchange(u,e){if(this._isFullscreen=li.isFullscreen,u)this._isCurrentFullscreen=!!e,this._currentFullscreenElementList=[];else if(this._isFullscreen){const l=li.element,p=this._currentFullscreenElementList.indexOf(l);l&&p===-1?this._currentFullscreenElementList.unshift(l):l&&p>=1&&this._currentFullscreenElementList.shift();const t=this._currentFullscreenElementList.indexOf(this.$container);this._isCurrentFullscreen=t>=0}else this._isCurrentFullscreen=!1,this._currentFullscreenElementList=[];var i,d,b;this._isCurrentFullscreen?(i=this.$container)==null||i.classList.add(`${this._options.prefix}-fullscreen`):((d=this.$container)==null||d.classList.remove(`${this._options.prefix}-fullscreen`),(b=this.$container)==null||b.classList.remove(`${this._options.prefix}-global-fullscreen`)),dt.isMobile?cn.getChanges(this.$container).forEach(l=>{l({isCurrentFullscreen:this._isCurrentFullscreen,isFullscreen:this._isFullscreen,isMobile:dt.isMobile})}):this._options.onChange==null||this._options.onChange.call(this._options,{isCurrentFullscreen:this._isCurrentFullscreen,isFullscreen:this._isFullscreen,isMobile:dt.isMobile}),dt.isMobile&&(this._isCurrentFullscreen?document.body.classList.add(`${this._options.prefix}-body-mobile-noscroll`):document.body.classList.remove(`${this._options.prefix}-body-mobile-noscroll`))}constructor(u){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this._isCurrentFullscreen=!1,this._isFullscreen=!1,this._currentFullscreenElementList=[],this.$container=u,this._options=Object.assign({},qo,e),this._options.onChange&&dt.isMobile&&cn.add(this.$container,this._options.onChange),this._isFullscreen=!!this._options.isFullscreen,this._fullscreenchange2=this._fullscreenchange2.bind(this),li.isEnabled&&li.on("change",this._fullscreenchange2)}};function un(){return un=Object.assign||function(u){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var d in i)Object.prototype.hasOwnProperty.call(i,d)&&(u[d]=i[d])}return u},un.apply(this,arguments)}class Sr extends Bt{destroy(){var e;this.$container.innerHTML="",(e=this._fullscreenUtil)==null||e.destroy(),this._fullscreenUtil=null,super.destroy()}_render(){var e,i,d;dt.isMobile?this.$container.innerHTML=Bo({title:(e=this.options.locale)==null?void 0:e.fullscreen}):this.$container.innerHTML=Io({title:(i=this.options.locale)==null?void 0:i.exitFullscreen})+Oo({title:(d=this.options.locale)==null?void 0:d.fullscreen})}_fullscreenChange(e){this.isCurrentFullscreen=e.isCurrentFullscreen,this._render()}_onControlClick(){var e,i;this.isCurrentFullscreen?(e=this._fullscreenUtil)==null||e.exitFullscreen():(i=this._fullscreenUtil)==null||i.fullscreen()}_event(){}constructor(e){var i;if(super(un({tagName:"span",classNameSuffix:"fullscreen",controlType:"button"},e)),this.isCurrentFullscreen=!1,this.options=e,this.isCurrentFullscreen=!!e.isCurrentFullscreen,this._$rootContainer=(i=this.options)==null?void 0:i.rootContainer,!this._$rootContainer)throw new Error("Fullscreen option fullscreenContainer is required!");this._fullscreenChange=this._fullscreenChange.bind(this),this._fullscreenUtil=new Er(this._$rootContainer,{onChange:this._fullscreenChange,isFullscreen:this.isCurrentFullscreen}),this._render(),this._event()}}function hn(){return hn=Object.assign||function(u){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var d in i)Object.prototype.hasOwnProperty.call(i,d)&&(u[d]=i[d])}return u},hn.apply(this,arguments)}var Cr={play:"播放",pause:"暂停",fullscreen:"全屏",exitFullscreen:"退出全屏",globalFullscreen:"全局全屏",exitGlobalFullscreen:"退出全局全屏",volume:"音量",muted:"静音",loading:"加载中,请稍等...",sdkRec:"SDK存储",cloudRec:"云存储",cloudRecord:"云录像",definition:"清晰度",capturePicture:"截图",fetchError:"取流失败,请检查网络"},wr={play:"play",pause:"pause",fullscreen:"fullscreen",exitFullscreen:"exitFullscreen",globalFullscreen:"globalFullscreen",exitGlobalFullscreen:"exitGlobalFullscreen",volume:"volume",muted:"muted",loading:"Loading...",sdkRec:"SDK",cloudRec:"cloud",cloudRecord:"cloudRecord",definition:"definition",capturePicture:"capturePicture",fetchError:"Stream retrieval failed, please check the network"};function Vi(){return Vi=Object.assign||function(u){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var d in i)Object.prototype.hasOwnProperty.call(i,d)&&(u[d]=i[d])}return u},Vi.apply(this,arguments)}const ji={sound:"volume",webExpend:"fullscreen",expend:"globalFullscreen",pantile:"ptz",recordvideo:"record",hd:"definition"};function kr(u){return[u.filter(e=>e.part==="left"),u.filter(e=>e.part==="right")]}var Ko={autoFocus:3,footer:{btnList:[{iconId:"play",part:"left",isrender:1},{iconId:"volume",part:"left",defaultActive:1,isrender:1},{iconId:"fullscreen",part:"right",defaultActive:0,isrender:1},{iconId:"globalFullscreen",part:"right",defaultActive:0,isrender:1}]}};const Tr={pcLive:{autoFocus:3,header:{btnList:[{iconId:"deviceID",part:"left",isrender:1},{iconId:"deviceName",part:"left",isrender:1},{iconId:"rec",part:"right",isrender:1},{iconId:"cloudRec",part:"right",isrender:1}]},footer:{btnList:[{iconId:"play",part:"left",isrender:1},{iconId:"capturePicture",part:"left",isrender:1},{iconId:"sound",part:"left",isrender:1},{iconId:"pantile",part:"left",isrender:1},{iconId:"recordvideo",part:"left",isrender:1},{iconId:"talk",part:"left",isrender:1},{iconId:"zoom",part:"left",isrender:1},{iconId:"hd",part:"right",isrender:1},{iconId:"webExpend",part:"right",isrender:1},{iconId:"expend",part:"right",isrender:1}]}},pcRec:{header:{btnList:[{iconId:"deviceID",part:"left",defaultActive:0,isrender:1},{iconId:"deviceName",part:"left",defaultActive:0,isrender:1},{iconId:"cloudRec",part:"right",defaultActive:0,isrender:1},{iconId:"cloudRecord",part:"right",defaultActive:0,isrender:1},{iconId:"rec",part:"right",defaultActive:0,isrender:1}]},footer:{btnList:[{iconId:"play",part:"left",defaultActive:1,isrender:1},{iconId:"capturePicture",part:"left",defaultActive:0,isrender:1},{iconId:"sound",part:"left",defaultActive:1,isrender:1},{iconId:"pantile",part:"left",defaultActive:0,isrender:0},{iconId:"recordvideo",part:"left",defaultActive:0,isrender:1},{iconId:"zoom",part:"left",defaultActive:0,isrender:1},{iconId:"speed",part:"right",defaultActive:0,isrender:1},{iconId:"webExpend",part:"right",defaultActive:0,isrender:1},{iconId:"expend",part:"right",defaultActive:0,isrender:1}]}},mobileLive:{header:{btnList:[{iconId:"deviceID",part:"left",defaultActive:0,isrender:1},{iconId:"deviceName",part:"left",defaultActive:0,isrender:1}]},footer:{btnList:[{iconId:"play",part:"left",defaultActive:1,isrender:1},{iconId:"capturePicture",part:"left",defaultActive:0,isrender:1},{iconId:"sound",part:"left",defaultActive:1,isrender:1},{iconId:"pantile",part:"left",defaultActive:0,isrender:1},{iconId:"recordvideo",part:"left",defaultActive:0,isrender:1},{iconId:"talk",part:"left",defaultActive:0,isrender:1},{iconId:"zoom",part:"left",defaultActive:0,isrender:1},{iconId:"hd",part:"right",defaultActive:0,isrender:1},{iconId:"expend",part:"right",defaultActive:0,isrender:1}]}},mobileRec:{header:{btnList:[{iconId:"deviceID",part:"left",defaultActive:0,isrender:1},{iconId:"deviceName",part:"left",defaultActive:0,isrender:1},{iconId:"cloudRec",part:"right",defaultActive:0,isrender:1},{iconId:"rec",part:"right",defaultActive:0,isrender:1}]},footer:{btnList:[{iconId:"play",part:"left",defaultActive:1,isrender:1},{iconId:"capturePicture",part:"left",defaultActive:0,isrender:1},{iconId:"sound",part:"left",defaultActive:1,isrender:1},{iconId:"recordvideo",part:"left",defaultActive:0,isrender:1},{iconId:"zoom",part:"left",defaultActive:0,isrender:1},{iconId:"speed",part:"right",defaultActive:0,isrender:1},{iconId:"expend",part:"right",defaultActive:0,isrender:1}]}},security:{header:{btnList:[{iconId:"deviceID",part:"left",defaultActive:0,isrender:1},{iconId:"deviceName",part:"left",defaultActive:0,isrender:1}]},footer:{btnList:[{iconId:"play",part:"left",defaultActive:1,isrender:1},{iconId:"talk",part:"left",defaultActive:0,isrender:1},{iconId:"sound",part:"left",defaultActive:1,isrender:1},{iconId:"capturePicture",part:"left",defaultActive:0,isrender:1},{iconId:"recordvideo",part:"left",defaultActive:0,isrender:1},{iconId:"zoom",part:"left",defaultActive:0,isrender:1},{iconId:"hd",part:"right",defaultActive:0,isrender:1},{iconId:"expend",part:"right",defaultActive:0,isrender:1}]}},voice:{header:{btnList:[{iconId:"deviceID",part:"left",defaultActive:0,isrender:1},{iconId:"deviceName",part:"left",defaultActive:0,isrender:1}]},footer:{btnList:[{iconId:"play",part:"left",defaultActive:1,isrender:1},{iconId:"talk",part:"left",defaultActive:0,isrender:1},{iconId:"sound",part:"left",defaultActive:1,isrender:1},{iconId:"expend",part:"right",defaultActive:0,isrender:1}]}}};class Lr{destroy(){var e;(e=this.$popupContainer)==null||e.removeChild(this.$container)}constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this._options=e,this.$container=document.createElement("div"),this._defaultClass=`${ne}-${this._options.cType}`,this._options.cType&&this.$container.classList.add(this._defaultClass),e!=null&&e.className&&this.$container.classList.add(e.className),e!=null&&e.color&&(this.$container.style.cssText+=`--${ne}-default-color: ${e.color};`),e!=null&&e.activeColor&&(this.$container.style.cssText+=`--${ne}-active-color: ${e.activeColor};`),e!=null&&e.backgroundColor&&(this.$container.style.cssText+=`;background-image: url();background-color: ${e.backgroundColor};`),e.getPopupContainer?this.$popupContainer=e.getPopupContainer==null?void 0:e.getPopupContainer.call(e):this.$popupContainer=document.body,this.$left=document.createElement("div"),this.$left.classList.add(`${this._defaultClass}-left`),this.$right=document.createElement("div"),this.$right.classList.add(`${this._defaultClass}-right`),this.$container.appendChild(this.$left),this.$container.appendChild(this.$right),this.$popupContainer.appendChild(this.$container)}}function pn(){return pn=Object.assign||function(u){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var d in i)Object.prototype.hasOwnProperty.call(i,d)&&(u[d]=i[d])}return u},pn.apply(this,arguments)}class Yo extends Lr{constructor(){super(pn({},arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},{cType:"header"}))}}class Xo{destroy(){this.$container.remove()}constructor(e){if(this.$container=document.createElement("div"),this.$container.classList.add(`${ne}-content`),typeof e.getPopupContainer=="function"){const i=e.getPopupContainer==null?void 0:e.getPopupContainer.call(e);i==null||i.appendChild(this.$container)}}}function fn(){return fn=Object.assign||function(u){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var d in i)Object.prototype.hasOwnProperty.call(i,d)&&(u[d]=i[d])}return u},fn.apply(this,arguments)}class Zo extends Lr{constructor(){super(fn({},arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},{cType:"footer"}))}}function mn(){return mn=Object.assign||function(u){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var d in i)Object.prototype.hasOwnProperty.call(i,d)&&(u[d]=i[d])}return u},mn.apply(this,arguments)}function _n(){return _n=Object.assign||function(u){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var d in i)Object.prototype.hasOwnProperty.call(i,d)&&(u[d]=i[d])}return u},_n.apply(this,arguments)}function vn(){return vn=Object.assign||function(u){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var d in i)Object.prototype.hasOwnProperty.call(i,d)&&(u[d]=i[d])}return u},vn.apply(this,arguments)}function gn(){return gn=Object.assign||function(u){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var d in i)Object.prototype.hasOwnProperty.call(i,d)&&(u[d]=i[d])}return u},gn.apply(this,arguments)}function yn(){return yn=Object.assign||function(u){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var d in i)Object.prototype.hasOwnProperty.call(i,d)&&(u[d]=i[d])}return u},yn.apply(this,arguments)}function bn(){return bn=Object.assign||function(u){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var d in i)Object.prototype.hasOwnProperty.call(i,d)&&(u[d]=i[d])}return u},bn.apply(this,arguments)}const Jo={open:!1,max:8};function En(){return En=Object.assign||function(u){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var d in i)Object.prototype.hasOwnProperty.call(i,d)&&(u[d]=i[d])}return u},En.apply(this,arguments)}class Br extends Bt{updateSelectOptions(e){var i;(e==null?void 0:e.length)>0&&((i=this._picker)==null||i.innerHTML(`<ul class="${ne}-select-list">
  135. ${e.map(d=>`
  136. <li class="${ne}-select-option ${+d.value===this.value?`${ne}-active`:""}" data-value="${d.value}">
  137. <span>${d.label}</span>
  138. </li>
  139. `).join("")}
  140. </ul>`),this._activeOption())}_render(e){if(e)if(this.$container.querySelector(`.${ne}-select-btn`))this.$container.querySelector(`.${ne}-select-btn`).innerHTML=`<span>${e==null?void 0:e.label}</span>`;else{const i=document.createElement("span");i.classList.add(`${ne}-btn`,`${ne}-select-btn`),i.innerHTML=`<span>${e==null?void 0:e.label}</span>`,this.$container.appendChild(i)}}_activeOption(){if(this._picker){var e,i;const d=(e=this._picker.$body)==null?void 0:e.querySelector(`.${ne}-active`);d==null||d.classList.remove(ne+"-active");const b=(i=this._picker.$body)==null?void 0:i.querySelector(`.${ne}-select-option[data-value="${this.value}"]`);b==null||b.classList.add(ne+"-active");const l=this.list.find(p=>p.value===this.value);this._render(l)}}_onSelectChange(){this._picker&&(this._delegation=ri(this._picker.$body,`.${ne}-select-option`,"click",e=>{const i=e.delegateTarget;if(!i.classList.contains(`${ne}-disabled`)){const d=i.getAttribute("data-value");if(this.value!==+d){this.value=+d,this._activeOption();const b=this.list.find(l=>l.value===this.value);this._options.onChange==null||this._options.onChange.call(this._options,this.value,b),this._picker.open=!1}}}))}destroy(){var e,i;(e=this._delegation)==null||e.destroy(),(i=this._picker)==null||i.destroy(),super.destroy()}_onControlClick(e){this._options.onClick==null||this._options.onClick.call(this._options,e)}constructor(e){super(En({tagName:"span",type:"button",controlType:"button"},e)),this._options=e,this.list=e.list||[],e.value===void 0&&e.value===null||(this.value=e.value),this._picker=new Ii({container:this.$container,getPopupContainer:()=>this.$container,trigger:dt.isMobile?"click":"hover",isMobile:dt.isMobile,wrapClassName:`${ne}-${e.classNameSuffix}-picker`,open:this._options.open,offset:[0,-10],placement:"top",onOpenChange:i=>{const d=this.list.find(b=>b.value===this.value);this._options.onOpenChange==null||this._options.onOpenChange.call(this._options,i,this.value,d)}}),this.list&&this.updateSelectOptions(this.list),this._onSelectChange(),this._activeOption()}}function Sn(){return Sn=Object.assign||function(u){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var d in i)Object.prototype.hasOwnProperty.call(i,d)&&(u[d]=i[d])}return u},Sn.apply(this,arguments)}function Cn(){return Cn=Object.assign||function(u){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var d in i)Object.prototype.hasOwnProperty.call(i,d)&&(u[d]=i[d])}return u},Cn.apply(this,arguments)}function wn(){return wn=Object.assign||function(u){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var d in i)Object.prototype.hasOwnProperty.call(i,d)&&(u[d]=i[d])}return u},wn.apply(this,arguments)}function kn(){return kn=Object.assign||function(u){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var d in i)Object.prototype.hasOwnProperty.call(i,d)&&(u[d]=i[d])}return u},kn.apply(this,arguments)}function Tn(){return Tn=Object.assign||function(u){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var d in i)Object.prototype.hasOwnProperty.call(i,d)&&(u[d]=i[d])}return u},Tn.apply(this,arguments)}function Ln(){return Ln=Object.assign||function(u){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var d in i)Object.prototype.hasOwnProperty.call(i,d)&&(u[d]=i[d])}return u},Ln.apply(this,arguments)}function Bn(){return Bn=Object.assign||function(u){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var d in i)Object.prototype.hasOwnProperty.call(i,d)&&(u[d]=i[d])}return u},Bn.apply(this,arguments)}function In(){return In=Object.assign||function(u){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var d in i)Object.prototype.hasOwnProperty.call(i,d)&&(u[d]=i[d])}return u},In.apply(this,arguments)}const On={play:class extends Bt{get playing(){return this._playing}_onControlClick(u){this._playing=!this._playing,this.emit(Pe.control.play,this._playing),this._options.onClick==null||this._options.onClick.call(this._options,u,this._playing),this._render()}_render(){var u,e;this._playing?this.$container.innerHTML=ko({title:(u=this._options.locale)==null?void 0:u.play}):this.$container.innerHTML=To({title:(e=this._options.locale)==null?void 0:e.pause})}constructor(u){super(ln({},u,{tagName:"span",controlType:"button",classNameSuffix:"play"})),this._playing=!1,this._options=u,this._playing=!!u.playing,this.on(Pe.play,e=>{this._playing!==e&&(this._playing=e,this._render())}),this._render()}},volume:class extends Bt{get muted(){return this._muted}set muted(u){this._muted!==u&&(u?(this._volume=0,this._progress&&(this._progress.value=0)):(this._volume=this._lastVolume,this._progress&&(this._progress.value=this._lastVolume)),this._muted=u,this._options.onChange==null||this._options.onChange.call(this._options,this.volume,u),this.emit(Pe.control.volumechange,this.volume,u)),this._updateUI()}get volume(){return this._lastVolume}set volume(u){if(u>=0&&u<=1){const e=+u.toFixed(2);this._lastVolume!==e&&(this._volume=e,this._lastVolume=this._volume,this._progress&&(this._progress.value=e),this._options.onChange==null||this._options.onChange.call(this._options,e,this._muted),this.emit(Pe.control.volumechange,e,this._muted)),this._updateUI()}}get disabled(){return this._disabled}set disabled(u){this._disabled=u,this.picker&&(this.picker.disabled=u),this._updateDisabledState(u)}destroy(){var u,e,i;(e=this._progress)==null||(u=e.destroy)==null||u.call(e),this._progress=null,(i=this.picker)==null||i.destroy(),this.picker=null,super.destroy()}_toggleMute(){if(!this.disabled)return this._lastVolume===0?(this.volume=this._options.volume||.5,void(this.muted=!1)):void(this.muted?this.muted=!1:this.muted=!0)}_updateUI(){var u,e,i,d;this._$content.classList.remove(ne+"-icon-volume-muted"),this._$content.classList.remove(ne+"-icon-volume-zero"),this._$content.classList.remove(ne+"-icon-volume-low"),this._$content.classList.remove(ne+"-icon-volume-high"),this._muted?(this._volume=0,this._$content.classList.add(ne+"-icon-volume-muted"),this._$content.setAttribute("title",((e=this._options)==null||(u=e.locale)==null?void 0:u.muted)||"muted")):(this._$content.classList.remove(ne+"-icon-volume-muted"),this._volume===0?this._$content.classList.add(ne+"-icon-volume-zero"):this._volume<=.5?this._$content.classList.add(ne+"-icon-volume-low"):this._$content.classList.add(ne+"-icon-volume-high"),this._$content.setAttribute("title",((d=this._options)==null||(i=d.locale)==null?void 0:i.volume)||"volume"))}get _$content(){return this.$container.querySelector(`.${ne}-icon-volume`)}_render(){var u;this.$container.innerHTML=Lo({title:(u=this._options.locale)==null?void 0:u.volume})}_onControlClick(){}_addEventListener(){ri(this.$container,`.${ne}-control-volume`,"mousedown",()=>{this.$container.classList.contains(`${ne}-disabled`)||this._toggleMute()})}constructor(u){super(An({},u,{tagName:"span",classNameSuffix:"volume",controlType:"button"})),this._muted=!1,this._volume=0,this._lastVolume=0,this._progress=null,this._options=Object.assign({},Wo,u),this._render(),this._volume=this._options.volume>=1?1:this._options.volume<=0?0:+this._options.volume.toFixed(2),this._lastVolume=this._volume,this._muted=!!this._options.muted||!1,dt.isMobile||(this.picker=new Ii({container:this.$container,getPopupContainer:()=>this.$container,trigger:this._options.trigger,open:this._options.open,offset:[0,-10],placement:"top",onOpenChange:e=>{this._options.onOpenChange==null||this._options.onOpenChange.call(this._options,e,this._muted?this._lastVolume:this.volume,this._muted),this.emit(Pe.control.volumePanelOpenChange,e,this._lastVolume,this._muted)}}),this._progress=new Ho({container:this.picker.$body,defaultValue:this._options.muted?0:this._options.volume,range:[0,1],step:.1,showPercent:!0,className:`${ne}-volume-progress`,onProgressClick:()=>{this.muted=!1},onChange:e=>{e!==this._volume&&(this.volume=e)}})),this._updateUI(),this._addEventListener(),this.on(Pe.audioCodecUnsupported,()=>{this.disabled=!0}),this.on(Pe.volumechange,(e,i)=>{this._muted!==i&&(this.muted=i),this._lastVolume!==e&&(this.volume=e)})}},deviceID:class extends Bt{_render(){this.$container.innerHTML=`<span class="${ne}-text ${ne}-text-device-id">DeviceIDDeviceIDDeviceIDDeviceIDDeviceIDDeviceIDDeviceIDDeviceID</span>`}constructor(u){super(Tn({},u,{tagName:"span",controlType:"text",classNameSuffix:"device-id"})),this._render()}},deviceName:class extends Bt{_render(){this.$container.innerHTML=`<span class="${ne}-text ${ne}-text-device-name">DeviceNameDeviceNameDeviceNameDeviceNameDeviceNameDeviceName</span>`}constructor(u){super(Ln({},u,{tagName:"span",controlType:"text",classNameSuffix:"device-name"})),this._render()}},capturePicture:class extends Bt{_render(){var u;this.$container.innerHTML=Do({title:(u=this._options.locale)==null?void 0:u.capturePicture})}_onControlClick(u){this.emit(Pe.control.capturePicture,this._options.type||"download",this._options.quality||.9),super._onControlClick(u)}constructor(u){super(_n({},u,{tagName:"span",classNameSuffix:"capture-picture"})),this._options=u,this._render()}},ptz:class extends Bt{_render(){this.$container.innerHTML=Mo()}_onControlClick(u){this._options.onClick==null||this._options.onClick.call(this._options,u)}constructor(u){super(vn({},u,{tagName:"span",controlType:"button",classNameSuffix:"ptz"})),this._options=u,this._render()}},record:class extends Bt{_render(){this.$container.innerHTML=Po()}_onControlClick(u){this._options.onClick==null||this._options.onClick.call(this._options,u)}constructor(u){super(gn({},u,{tagName:"span",controlType:"button",classNameSuffix:"record"})),this._options=u,this._render()}},talk:class extends Bt{_render(){this.$container.innerHTML=$o()}onClick(){}_onControlClick(u){this._options.onClick==null||this._options.onClick.call(this._options,u)}constructor(u){super(yn({},u,{tagName:"span",controlType:"button",classNameSuffix:"talk"})),this._options=u,this._render()}},zoom:class extends Bt{_render(){}destroy(){var u;this._options.rootContainer&&this._$zoomPanel&&((u=this._options.rootContainer)==null||u.removeChild(this._$zoomPanel),this._$zoomPanel=null),super.destroy()}_onControlClick(u){}constructor(u){super(bn({},u,{tagName:"span",controlType:"button",classNameSuffix:"zoom"})),this._options=Object.assign({},Jo,u||{}),this._render()}},definition:class extends Br{constructor(u){super(Sn({},u,{value:u.definition||1,controlType:"button",list:[{label:"4k",value:4},{label:"极清极清极清极清极清极清极清",value:2},{label:"1080p",value:1},{label:"标清标清标清标清标清标清标清标清",value:.5}],classNameSuffix:"definition",onChange:(e,i)=>{var d;u==null||(d=u.onChange)==null||d.call(u,e,i),this.emit(Pe.control.changeDefinition,e,i)},onOpenChange:(e,i,d)=>{var b;u==null||(b=u.onOpenChange)==null||b.call(u,e,i,d),this.emit(Pe.control.definitionPanelOpenChange,e,i,d)}}))}},fullscreen:Sr,globalFullscreen:class extends Sr{_render(){var u,e;this.$container.innerHTML=xo({title:(u=this.options.locale)==null?void 0:u.exitGlobalFullscreen})+Ro({title:(e=this.options.locale)==null?void 0:e.globalFullscreen})}_onControlClick(){var u,e;this.isCurrentFullscreen&&this._$rootContainer.classList.contains(`${ne}-global-fullscreen`)?(this._$rootContainer.classList.remove(`${ne}-global-fullscreen`),(u=this._fullscreenUtil)==null||u.exitFullscreen()):(this._$rootContainer.classList.add(`${ne}-global-fullscreen`),(e=this._fullscreenUtil)==null||e.fullscreen())}constructor(u){super(mn({},u,{controlType:"button",classNameSuffix:"global-fullscreen"}))}},rec:class extends Bt{_render(){var u,e,i;this.$container.innerHTML=No({title:(u=this._options.locale)==null?void 0:u.sdkRec,"data-type":"sdk"})+Vo({title:(e=this._options.locale)==null?void 0:e.cloudRec,"data-type":"cloudRec"})+jo({title:(i=this._options.locale)==null?void 0:i.cloudRecord,"data-type":"cloudRecord"})}_activeIcon(u){switch(this.$container.querySelectorAll(`.${ne}-icon`).forEach(b=>{b.classList.remove(`${ne}-active`)}),u){case"sdk":var e;(e=this.$container.querySelector(`.${ne}-icon-sdk`))==null||e.classList.add(`${ne}-active`);break;case"cloudRec":var i;(i=this.$container.querySelector(`.${ne}-icon-cloud-rec`))==null||i.classList.add(`${ne}-active`);break;case"cloudRecord":var d;(d=this.$container.querySelector(`.${ne}-icon-cloud-record`))==null||d.classList.add(`${ne}-active`)}}_onClickIcon(){this._delegation=ri(this.$container,`.${ne}-icon`,"click",u=>{const e=u.delegateTarget;if(!e.classList.contains(`${ne}-disabled`)){const i=e.getAttribute("data-type");this.recType!==i&&(this.recType=i,this._activeIcon(i),this.emit(Pe.control.changeRecType,i),this._options.onChange==null||this._options.onChange.call(this._options,i))}})}destroy(){var u;(u=this._delegation)==null||u.destroy(),this._delegation=null,super.destroy()}_onControlClick(u){this._options.onClick==null||this._options.onClick.call(this._options,u)}constructor(u){super(hn({},u,{tagName:"div",controlType:"block",classNameSuffix:"rec"})),this._options=u,this.recType=u.recType||"sdk",this._render(),this._onClickIcon(),this._activeIcon(u.recType)}},speed:class extends Br{constructor(u){super(Cn({},u,{value:u.speed||1,list:[{label:"4x4x",value:4},{label:"2x",value:2},{label:"1x1x",value:1},{label:"0.5x",value:.5}],classNameSuffix:"speed",controlType:"button",onChange:(e,i)=>{var d;u==null||(d=u.onChange)==null||d.call(u,e,i),this.emit(Pe.control.changeSpeed,e,i)},onOpenChange:(e,i,d)=>{var b;u==null||(b=u.onOpenChange)==null||b.call(u,e,i,d),this.emit(Pe.control.speedPanelOpenChange,e,i,d)}}))}},date:class extends Bt{_render(){this.$container.innerHTML="date"}_onControlClick(u){super._onControlClick(u)}constructor(u){super(wn({},u,{tagName:"span",controlType:"button",classNameSuffix:"date"})),this._options=u,this._render()}},timeLine:class extends Bt{_render(){this.$container.innerHTML=`<span class="${ne}-full-block ${ne}-block-time-line">Line</span>`}_onControlClick(u){this._options.onClick==null||this._options.onClick.call(this._options,u)}constructor(u){super(kn({},u,{tagName:"div",controlType:"block",classNameSuffix:"time-line"})),this._options=u,this._render()}},playBack:class extends Bt{_render(){this.$container.innerHTML=`<span class="${ne}-icon ${ne}-icon-play-back">
  141. ${Ct.playBack}
  142. <span class="${ne}-play-forward-back">${this._options.time||10}</span>
  143. </span>`}_onControlClick(u){this._options.onClick==null||this._options.onClick.call(this._options,u)}constructor(u){super(Bn({},u,{tagName:"span",controlType:"button",classNameSuffix:"play-back"})),this._options=u,this._render()}},playForward:class extends Bt{_render(){this.$container.innerHTML=`<span class="${ne}-icon ${ne}-icon-play-forward">
  144. ${Ct.playForward}
  145. <span class="${ne}-play-forward-time">${this._options.time||10}</span>
  146. </span>`}_onControlClick(u){this._options.onClick==null||this._options.onClick.call(this._options,u)}constructor(u){super(In({},u,{tagName:"span",controlType:"button",classNameSuffix:"play-forward"})),this._options=u,this._render()}}};function Ir(u,e,i,d,b,l,p){try{var t=u[l](p),a=t.value}catch(n){return void i(n)}t.done?e(a):Promise.resolve(a).then(d,b)}function Gi(u){return function(){var e=this,i=arguments;return new Promise(function(d,b){var l=u.apply(e,i);function p(a){Ir(l,d,b,p,t,"next",a)}function t(a){Ir(l,d,b,p,t,"throw",a)}p(void 0)})}}function gi(){return gi=Object.assign||function(u){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var d in i)Object.prototype.hasOwnProperty.call(i,d)&&(u[d]=i[d])}return u},gi.apply(this,arguments)}const Or={language:"zh",mobileExtendConfig:{controls:["ptz","talk","record","rec"]}},ea=["width","height","playing","volume","muted","loading","recType","isCurrentFullscreen","orientationAngle","zoom","recording"];class Yt extends Li{get width(){return this._width}get height(){return this._height}get playing(){return this._playing}set playing(e){var i,d;this._playing!==e&&(this._playing=e,e||(this.loading=!1),this.emit(Pe.play,e),(i=this.controls)!=null&&i.playControl&&this.controls.playControl.playing!==e&&((d=this.controls)==null||d.playControl.emit(Pe.play,e)))}get loading(){return this._loading}set loading(e){var i,d;this._loading=e,e?(i=this._loadingControl)==null||i.show():(d=this._loadingControl)==null||d.hide(),this._loading!==e&&this.emit(Pe.loading,e)}get volume(){return this._volume}set volume(e){var i,d,b;e>=0&&e<=1&&this._volume!==e&&(this._volume=e,this.emit(Pe.volumechange,e,this._muted),(i=this.controls)!=null&&i.volumeControl&&((b=this.controls)==null||(d=b.volumeControl)==null?void 0:d.volume)!==e&&this.controls.volumeControl.emit(Pe.volumechange,e,this._muted))}get muted(){return this._muted}set muted(e){var i,d,b;this._muted!==e&&(this._muted=e,this.emit(Pe.volumechange,this._volume,this._muted),(i=this.controls)!=null&&i.volumeControl&&((b=this.controls)==null||(d=b.volumeControl)==null?void 0:d.muted)!==e&&this.controls.volumeControl.emit(Pe.volumechange,this._volume,e))}get zoom(){return this._zoom}set zoom(e){this._zoom=e}get recording(){return this._recording}get isCurrentFullscreen(){return this._isCurrentFullscreen}get recType(){return this._recType}get orientationAngle(){return this._orientationAngle}resize(e,i){let d="";d+=typeof e=="number"?`width: ${e}px;`:`width: ${e};`,d+=typeof i=="number"?`height: ${i}px;`:`height: ${i};`,this.$container&&(this.$container.style.cssText+=d)}fullscreen(){return Gi(function*(){var e;return yield(e=this._fullscreen)==null?void 0:e.fullscreen()}).call(this)}exitFullscreen(){return Gi(function*(){var e;return yield(e=this._fullscreen)==null?void 0:e.exitFullscreen()}).call(this)}changeTheme(e){this._changeThemeFlag=!0,this.emit==null||this.emit.call(this,Pe.changeTheme,e),this._renderTheme(e)}setPoster(e){var i;(i=this.posterControl)==null||i.setPoster(e)}destroy(){var e,i,d,b,l;this.$container&&(this.emit(Pe.theme.beforeDestroy),this._removeEventListener(),this._unmountedControls(),(e=this._loadingControl)==null||e.destroy(),this._loadingControl=null,(i=this.messageControl)==null||i.destroy(),this.messageControl=null,(d=this.posterControl)==null||d.destroy(),this.posterControl=null,(b=this.contentControl)==null||b.destroy(),this.contentControl=null,Array.from(((l=this.$container)==null?void 0:l.classList)||[]).forEach(p=>{new RegExp(`^${ne}-`,"ig").test(p)&&this.$container.classList.remove(p)}),this.emit(Pe.theme.destroyed),this._onPauseTimingFunc&&(this._onPauseTimingFunc=null),this.removeAllListeners(),this.i18n=null)}_initOptions(e){if(this.options=Object.assign({},Or,e),typeof this.options.container=="function"?this.$container=this.options.container():this.$container=this.options.container,!this.$container)throw new Error("container option is required!");const i=["zh","en"].includes(this.options.language)?this.options.language:"zh";this.i18n=new pr({zh:Cr,en:wr},{defaultLocale:i})}_initClassName(){var e,i;this.$container.classList.add(ne,dt.isMobile?ne+"-mobile":ne+"-pc"),["ezopen","flv","hls","mp4"].includes(this.options.type)&&this.$container.classList.add(`${ne}-${this.options.type}`),typeof this.options.className=="string"&&this.$container.classList.add(this.options.className),this.resize((e=this.options)==null?void 0:e.width,(i=this.options)==null?void 0:i.height)}_unmountedControls(){if(!this.controls)return;const e=Object.keys(this.controls).length>0||this._$header||this._$footer;if(this._interactiveResult&&(this._interactiveResult.cleanup==null||this._interactiveResult.cleanup.call(this._interactiveResult),this._interactiveResult=null),e&&this.emit(Pe.control.beforeUnmountControls),Object.keys(this.controls).length>0){for(const b in this.controls){var i,d;(i=(d=this.controls[b]).destroy)==null||i.call(d)}this.controls=null}this._$header&&(this._$header.destroy(),this._$header=null),this._$footer&&(this._$footer.destroy(),this._$footer=null),e&&this.emit(Pe.control.unmountedControls)}_renderTheme(e){return Gi(function*(){var i,d,b;if(this._unmountedControls(),Object.prototype.toString.call(e)!=="[object Object]")return;this.controls={},this.emit(Pe.control.beforeMountControls);const l=function(v){var S,B;const x={};var P;x.autoFocus=(P=v==null?void 0:v.autoFocus)!=null?P:3,x.poster=(v==null?void 0:v.poster)||"";const M=[],F=[],G=((v==null||(S=v.header)==null?void 0:S.btnList)||[]).filter(f=>f.isrender===1&&["deviceID","deviceName"].includes(f.iconId)?(M.push(f),!1):f.isrender===1&&rn.includes(f.iconId)?(F.push(F[0]?Vi({},f,{part:F[0].part}):f),!1):f.isrender===1).map(f=>(ji[f.iconId]&&(f.iconId=ji[f.iconId]),f)),K=((v==null||(B=v.footer)==null?void 0:B.btnList)||[]).filter(f=>f.isrender===1&&["deviceID","deviceName"].includes(f.iconId)?(M.push(f),!1):f.isrender===1&&rn.includes(f.iconId)?(F.push(F[0]?Vi({},f,{part:F[0].part}):f),!1):f.isrender===1).map(f=>(ji[f.iconId]&&(f.iconId=ji[f.iconId]),f));var H,Z,ie,T,m,g;return G.length>0||M.length>0||F.length>0?(x.header={},x.header.color=v==null||(H=v.header)==null?void 0:H.color,x.header.backgroundColor=v==null||(Z=v.header)==null?void 0:Z.backgroundColor,x.header.activeColor=v==null||(ie=v.header)==null?void 0:ie.activeColor,x.header.btnList=[...M||[],...F||[],...G||[]]):x.header=void 0,K.length>0?(x.footer={},x.footer.color=v==null||(T=v.footer)==null?void 0:T.color,x.footer.backgroundColor=v==null||(m=v.footer)==null?void 0:m.backgroundColor,x.footer.activeColor=v==null||(g=v.footer)==null?void 0:g.activeColor,x.footer.btnList=K):x.footer=void 0,x}(e);if(l.poster&&this.setPoster(l.poster),(i=this.posterControl)==null||i.show(),l.header){this._$header=new Yo({getPopupContainer:()=>this.$container,color:l.header.color,activeColor:l.header.activeColor,backgroundColor:l.header.backgroundColor});const[v,S]=kr(l.header.btnList||[]);this._renderControls(this._$header.$left,v),this._renderControls(this._$header.$right,S)}if(l.footer){this._$footer=new Zo({getPopupContainer:()=>this.$container,color:l.footer.color,activeColor:l.footer.activeColor,backgroundColor:l.footer.backgroundColor});const[v,S]=kr(l.footer.btnList||[]);this._renderControls(this._$footer.$left,v),this._renderControls(this._$footer.$right,S)}var p,t,a,n,s,h,E;(this._$header||this._$footer)&&(l==null?void 0:l.autoFocus)!==0&&(this._interactiveResult=function(v){let S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:3e3,B=arguments.length>2?arguments[2]:void 0,x=null,P=!1;const M=v.querySelector(`.${ne}-header`),F=v.querySelector(`.${ne}-footer`);let G=()=>{x&&(clearTimeout(x),x=null)},K=()=>{G==null||G(),M==null||M.classList.remove(`${ne}-hide-transition`),F==null||F.classList.remove(`${ne}-hide-transition`),P||B(!0),P=!0},H=()=>{G==null||G(),v.classList.contains(`${ne}-player-pause`)||(M==null||M.classList.add(`${ne}-hide-transition`),F==null||F.classList.add(`${ne}-hide-transition`),P&&B(!1),P=!1)},Z=()=>{K==null||K(),x=setTimeout(()=>{G==null||G(),H==null||H()},S)},ie=Q=>{var ee;Q==null||(ee=Q.stopPropagation)==null||ee.call(Q),G==null||G()},T=()=>{P?H==null||H():Z==null||Z()},m=Q=>{var ee;Q==null||(ee=Q.stopPropagation)==null||ee.call(Q),Z==null||Z()};if(Z(),dt.isMobile&&T){const Q=window.PointerEvent?"pointerdown":"touchstart";v.addEventListener(Q,T),F&&F.addEventListener(Q,m),M&&M.addEventListener(Q,m)}else{const Q=window.PointerEvent?"pointerdown":"click";var g,f,O,j;v.addEventListener(Q,Z),v.addEventListener("mousemove",Z),v.addEventListener("mouseleave",H),F&&(F==null||(g=F.addEventListener)==null||g.call(F,Q,ie),F==null||(f=F.addEventListener)==null||f.call(F,"mousemove",ie)),M&&(M==null||(O=M.addEventListener)==null||O.call(M,Q,ie),M==null||(j=M.addEventListener)==null||j.call(M,"mousemove",ie))}return{cleanup:()=>{if(v){if(dt.isMobile&&T){const me=window.PointerEvent?"pointerdown":"touchstart";v.removeEventListener(me,T),F&&Z&&F.removeEventListener(me,m),M&&Z&&M.removeEventListener(me,m)}if(Z){const me=window.PointerEvent?"pointerdown":"click";var Q,ee,ue,fe;v.removeEventListener(me,Z),v.removeEventListener("mousemove",Z),v.removeEventListener("mouseleave",H),F&&G&&(F==null||(Q=F.removeEventListener)==null||Q.call(F,me,ie),F==null||(ee=F.removeEventListener)==null||ee.call(F,"mousemove",ie)),M&&G&&(M==null||(ue=M.removeEventListener)==null||ue.call(M,me,ie),M==null||(fe=M.removeEventListener)==null||fe.call(M,"mousemove",ie))}H&&v.removeEventListener("mouseleave",H),T=null,Z=null,H=null,K=null,m=null,ie=null,G==null||G(),G=null}},clearTimeout:G,setTimeoutShow:Z,hide:H}}(this.$container,1e3*((e==null?void 0:e.autoFocus)||3),v=>{this.emit(Pe.control.controlsBarOpenChange,v)}),this._onPauseTimingFunc&&(this.removeListener(Fi,this._onPauseTimingFunc),this._onPauseTimingFunc=null),this._onPauseTimingFunc=v=>{var S,B,x,P;v?(B=this._interactiveResult)==null||(S=B.clearTimeout)==null||S.call(B):(P=this._interactiveResult)==null||(x=P.setTimeoutShow)==null||x.call(P)},this.on(Fi,this._onPauseTimingFunc)),(t=(p=this).controls)!=null&&t.volumeControl&&(p.controls.volumeControl.on(Pe.control.volumechange,(v,S)=>{p.muted!==S&&(p.muted=S),p.volume!==v&&(p.volume=v),p.emit(Pe.control.volumechange,v,S)}),p.controls.volumeControl.on(Pe.control.volumePanelOpenChange,(v,S,B)=>{p.emit(Pe.control.volumePanelOpenChange,v,S,B)})),(a=p.controls)!=null&&a.playControl&&p.controls.playControl.on(Pe.control.play,v=>{p.playing!==v&&(p.playing=v,p.emit(Pe.control.play,v))}),(n=p.controls)!=null&&n.recControl&&p.controls.recControl.on(Pe.control.changeRecType,v=>{p.recType!==v&&(p.emit(Pe.control.changeRecType,v),p.emit(Pe.changeRecType,v))}),(s=p.controls)!=null&&s.definitionControl&&p.controls.definitionControl.on(Pe.control.definitionPanelOpenChange,(v,S,B)=>{dt.isMobile&&p.emit(Fi,v,S)}),(h=p.controls)!=null&&h.speedControl&&p.controls.speedControl.on(Pe.control.speedPanelOpenChange,(v,S,B)=>{dt.isMobile&&p.emit(Fi,v,S)}),(E=p.controls)!=null&&E.capturePictureControl&&p.controls.capturePictureControl.on(Pe.control.capturePicture,(v,S)=>{p.emit(Pe.control.capturePicture,v)}),this.emit(Pe.control.mountedControls),(d=this.controls)!=null&&d.volumeControl&&!this._changeThemeFlag&&(this.controls.volumeControl.disabled=!0),(b=this.controls)!=null&&b.globalFullscreenControl&&!this.playing&&(this.controls.globalFullscreenControl.disabled=!0)}).call(this)}_renderControls(e,i){return Gi(function*(){if(e){const a=this._changeThemeFlag,n=ea.reduce((s,h)=>(s[h]=this[h],s),{});for(const s of i){var d,b,l,p,t;rn.includes(s.iconId)?(d=this.controls)!=null&&d.recControl||(this.controls.recControl=new On.rec(gi({rootContainer:this.$container,getPopupContainer:()=>e,recType:this._recType,locale:((b=this.i18n)==null?void 0:b.getCurrentTranslation())||{}},((l=this.options)==null?void 0:l.recOptions)||{},a?n:{}))):On[s.iconId]&&(this.controls[`${s.iconId}Control`]=new On[s.iconId](gi({rootContainer:this.$container,getPopupContainer:()=>e,locale:((p=this.i18n)==null?void 0:p.getCurrentTranslation())||{}},((t=this.options)==null?void 0:t[`${s.iconId}Options`])||{},a?n:{})))}}}).call(this)}_mobileInnerWidthHeight(){if(dt.isMobile){var e,i,d,b;const l=Math.floor(window.innerHeight),p=Math.floor(window.innerWidth);(i=this.$container)==null||(e=i.style)==null||e.setProperty(`--${ne}-mobile-inner-height`,`${l}px`),(b=this.$container)==null||(d=b.style)==null||d.setProperty(`--${ne}-mobile-inner-width`,`${p}px`)}}_addEventListener(){this._fullscreen=new Er(this.$container,{prefix:ne,onChange:b=>{b.isCurrentFullscreen?this.emit(Pe.fullscreen):this._isCurrentFullscreen&&this.emit(Pe.exitFullscreen),this._isCurrentFullscreen=b.isCurrentFullscreen,this.emit(Pe.fullscreenChange,b)}});const e=b=>{if(this.$container){var l;switch((l=this.$container.classList)==null||l.remove(`${ne}-angle-0`,`${ne}-angle-90`,`${ne}-angle-180`,`${ne}-angle-270`),b.angle){case 0:this.$container.classList.add(`${ne}-angle-0`);break;case 90:this.$container.classList.add(`${ne}-angle-90`);break;case 180:this.$container.classList.add(`${ne}-angle-180`);break;case 270:this.$container.classList.add(`${ne}-angle-270`)}this.orientationAngle!==b.angle&&this.emit(Pe.orientationChange,b.angle),this._orientationAngle=b.angle,this._mobileInnerWidthHeight()}},[i,d]=dt.orientationEventListener(e);this._cleanupOrientation=d,e(i),this._mobileInnerWidthHeight(),window.addEventListener("resize",Ni(this._mobileInnerWidthHeight,20)),this._cleanUpResizeObserver=dt.resizeObserver(this.$container,Ni(()=>{const b=Math.floor(this.$container.clientWidth),l=Math.floor(this.$container.clientHeight);if(this.width!==b||this.height!==l){if(this.emit(Yt.EVENTS.resize,{width:b,height:l}),this._width=b,this._height=l,this._$header){var p,t,a,n;b-30<=(((t=this._$header)==null||(p=t.$left)==null?void 0:p.clientWidth)||0)+(((n=this._$header)==null||(a=n.$right)==null?void 0:a.clientWidth)||0)?this.emit(Yt.EVENTS.control.headerMoreShow,!0):this.emit(Yt.EVENTS.control.headerMoreShow,!1)}if(this._$footer){var s,h;b-16<=(((s=this._$footer.$left)==null?void 0:s.clientWidth)||0)+(((h=this._$footer.$right)==null?void 0:h.clientWidth)||0)?this.emit(Yt.EVENTS.control.footerMoreShow,!0):this.emit(Yt.EVENTS.control.footerMoreShow,!1)}}},20))}_removeEventListener(){var e,i,d,b;this._isCurrentFullscreen&&((b=this._fullscreen)==null||b.exitFullscreen()),(e=this._fullscreen)==null||e.destroy(),this._fullscreen=null,this._cleanupOrientation==null||this._cleanupOrientation.call(this),this._cleanupOrientation=null,(d=this._cleanUpResizeObserver)==null||(i=d.unobserve)==null||i.call(d),this._cleanUpResizeObserver=null,window.removeEventListener("resize",this._mobileInnerWidthHeight)}_reset(){this._zoom=1}constructor(e){var i,d,b,l,p,t;if(super(),this.options=Or,this.controls={},this._$header=null,this._$footer=null,this._interactiveResult=null,this._fullscreen=null,this._cleanupOrientation=null,this._cleanUpResizeObserver=null,this._width=0,this._height=0,this._isCurrentFullscreen=!1,this._orientationAngle=0,this._playing=!1,this._loading=!1,this._volume=0,this._muted=!1,this._zoom=1,this._recording=!1,this._changeThemeFlag=!1,this._onPauseTimingFunc=null,this._recType="sdk",e.onInitializing==null||e.onInitializing.call(e,this),this._initOptions(e),this._initClassName(),this.contentControl=new Xo({getPopupContainer:()=>this.$container}),this.options.loadingOptions!==null&&(this._loadingControl=new Co(gi({locale:((b=this.i18n)==null?void 0:b.getCurrentTranslation())||{}},this.options.loadingOptions||{},{getPopupContainer:()=>this.$container}))),this.options.messageOptions!==null&&(this.messageControl=new Qo(gi({locale:((l=this.i18n)==null?void 0:l.getCurrentTranslation())||{}},this.options.messageOptions||{},{getPopupContainer:()=>this.$container}))),this.options.posterOptions!==null&&(this.posterControl=new wo(gi({},this.options.posterOptions||{},{getPopupContainer:()=>this.contentControl.$container}))),this._volume=((i=this.options.volumeOptions)==null?void 0:i.volume)||0,this._muted=((d=this.options.volumeOptions)==null?void 0:d.muted)||!1,this._mobileInnerWidthHeight=this._mobileInnerWidthHeight.bind(this),["flv","hls","mp4"].includes(e.type))this._renderTheme([null].includes((p=this.options)==null?void 0:p.themeData)?null:Ko);else if(e.type==="ezopen"){var a;this._renderTheme([null].includes((a=this.options)==null?void 0:a.themeData)?null:Tr.pcLive)}this._addEventListener(),(t=this)==null||t.on(Pe.audioCodecUnsupported,()=>{var n;(n=t.controls)!=null&&n.volumeControl&&t.controls.volumeControl.emit(Pe.audioCodecUnsupported)}),t==null||t.on(Pe.message,(n,s,h)=>{var E;if(["fetchError","error"].includes(s))(E=t.messageControl)==null||E.error(n,h);else if(s==="warn"){var v;(v=t.messageControl)==null||v.warn(n,h)}else if(s==="info"){var S;(S=t.messageControl)==null||S.info(n,h)}}),t==null||t.on(Pe.audioInfo,n=>{var s;!(t==null||(s=t.controls)==null)&&s.volumeControl&&(n.audioFormatName||n.encType)&&(t.controls.volumeControl.disabled=!1)}),t==null||t.on(Pe.play,n=>{var s,h;n&&((h=t.messageControl)==null||h.hide()),!(t==null||(s=t.controls)==null)&&s.globalFullscreenControl&&(t.controls.globalFullscreenControl.disabled=!n)})}}Yt.TEMPLATES=Tr,Yt.EVENTS=Pe,Yt.LOCALES={zh:Cr,en:wr},Yt.THEME_VERSION="0.0.1-alpha.18";var xr,xn={exports:{}},ta=xn.exports,ia=(xr||(xr=1,function(u,e){var i;i=typeof self<"u"?self:ta,u.exports=function(d){var b=d||{},l=d.navigator!==void 0?d.navigator:{},p=function(a,n){var s=l.mimeTypes;for(var h in s)if(s[h][a]==n)return!0;return!1},t=null;return l.userAgentData!==void 0&&l.userAgentData.getHighEntropyValues(["platformVersion"]).then(function(a){l.userAgentData.platform==="Windows"&&(t=parseInt(a.platformVersion.split(".")[0])>=13?11:10)}),function(a){var n=a||l.userAgent||"",s={},h={Trident:n.indexOf("Trident")>-1||n.indexOf("NET CLR")>-1,Presto:n.indexOf("Presto")>-1,WebKit:n.indexOf("AppleWebKit")>-1,Gecko:n.indexOf("Gecko/")>-1,KHTML:n.indexOf("KHTML/")>-1,Safari:n.indexOf("Safari")>-1,Chrome:n.indexOf("Chrome")>-1||n.indexOf("CriOS")>-1,IE:n.indexOf("MSIE")>-1||n.indexOf("Trident")>-1,Edge:n.indexOf("Edge")>-1||n.indexOf("Edg/")>-1||n.indexOf("EdgA")>-1||n.indexOf("EdgiOS")>-1,Firefox:n.indexOf("Firefox")>-1||n.indexOf("FxiOS")>-1,"Firefox Focus":n.indexOf("Focus")>-1,Chromium:n.indexOf("Chromium")>-1,Opera:n.indexOf("Opera")>-1||n.indexOf("OPR")>-1,Vivaldi:n.indexOf("Vivaldi")>-1,Yandex:n.indexOf("YaBrowser")>-1,Brave:!!l.brave,Arora:n.indexOf("Arora")>-1,Lunascape:n.indexOf("Lunascape")>-1,QupZilla:n.indexOf("QupZilla")>-1,"Coc Coc":n.indexOf("coc_coc_browser")>-1,Kindle:n.indexOf("Kindle")>-1||n.indexOf("Silk/")>-1,Iceweasel:n.indexOf("Iceweasel")>-1,Konqueror:n.indexOf("Konqueror")>-1,Iceape:n.indexOf("Iceape")>-1,SeaMonkey:n.indexOf("SeaMonkey")>-1,Epiphany:n.indexOf("Epiphany")>-1,360:n.indexOf("QihooBrowser")>-1||n.indexOf("QHBrowser")>-1,"360EE":n.indexOf("360EE")>-1,"360SE":n.indexOf("360SE")>-1,UC:n.indexOf("UCBrowser")>-1||n.indexOf(" UBrowser")>-1||n.indexOf("UCWEB")>-1,QQBrowser:n.indexOf("QQBrowser")>-1,QQ:n.indexOf("QQ/")>-1,Baidu:n.indexOf("Baidu")>-1||n.indexOf("BIDUBrowser")>-1||n.indexOf("baidubrowser")>-1||n.indexOf("baiduboxapp")>-1||n.indexOf("BaiduHD")>-1,Maxthon:n.indexOf("Maxthon")>-1,Sogou:n.indexOf("MetaSr")>-1||n.indexOf("Sogou")>-1,Liebao:n.indexOf("LBBROWSER")>-1||n.indexOf("LieBaoFast")>-1,"2345Explorer":n.indexOf("2345Explorer")>-1||n.indexOf("Mb2345Browser")>-1||n.indexOf("2345chrome")>-1,"115Browser":n.indexOf("115Browser")>-1,TheWorld:n.indexOf("TheWorld")>-1,Quark:n.indexOf("Quark")>-1,Qiyu:n.indexOf("Qiyu")>-1,XiaoMi:n.indexOf("MiuiBrowser")>-1,Huawei:n.indexOf("HuaweiBrowser")>-1||n.indexOf("HUAWEI/")>-1||n.indexOf("HONOR")>-1||n.indexOf("HBPC/")>-1,Vivo:n.indexOf("VivoBrowser")>-1,OPPO:n.indexOf("HeyTapBrowser")>-1,Wechat:n.indexOf("MicroMessenger")>-1,WechatWork:n.indexOf("wxwork/")>-1,Taobao:n.indexOf("AliApp(TB")>-1,Alipay:n.indexOf("AliApp(AP")>-1,Weibo:n.indexOf("Weibo")>-1,Douban:n.indexOf("com.douban.frodo")>-1,Suning:n.indexOf("SNEBUY-APP")>-1,iQiYi:n.indexOf("IqiyiApp")>-1,DingTalk:n.indexOf("DingTalk")>-1,Douyin:n.indexOf("aweme")>-1,Googlebot:n.indexOf("Googlebot")>-1,Baiduspider:n.indexOf("Baiduspider")>-1,Sogouspider:n.match(/Sogou (\S+) Spider/i),Bingbot:n.indexOf("bingbot")>-1,"360Spider":n.indexOf("360Spider")>-1||n.indexOf("HaosouSpider")>-1,Bytespider:n.indexOf("Bytespider")>-1,YisouSpider:n.indexOf("YisouSpider")>-1,YodaoBot:n.indexOf("YodaoBot")>-1,YandexBot:n.indexOf("YandexBot")>-1,Windows:n.indexOf("Windows")>-1,Linux:n.indexOf("Linux")>-1||n.indexOf("X11")>-1,"Mac OS":n.indexOf("Macintosh")>-1,Android:n.indexOf("Android")>-1||n.indexOf("Adr")>-1,HarmonyOS:n.indexOf("HarmonyOS")>-1,Ubuntu:n.indexOf("Ubuntu")>-1,FreeBSD:n.indexOf("FreeBSD")>-1,Debian:n.indexOf("Debian")>-1,"Windows Phone":n.indexOf("IEMobile")>-1||n.indexOf("Windows Phone")>-1,BlackBerry:n.indexOf("BlackBerry")>-1||n.indexOf("RIM")>-1,MeeGo:n.indexOf("MeeGo")>-1,Symbian:n.indexOf("Symbian")>-1,iOS:n.indexOf("like Mac OS X")>-1,"Chrome OS":n.indexOf("CrOS")>-1,WebOS:n.indexOf("hpwOS")>-1,Mobile:n.indexOf("Mobi")>-1||n.indexOf("iPh")>-1||n.indexOf("480")>-1,Tablet:n.indexOf("Tablet")>-1||n.indexOf("Pad")>-1||n.indexOf("Nexus 7")>-1||l.platform==="MacIntel"&&l.maxTouchPoints>1,isWebview:n.indexOf("; wv)")>-1},E=!1;if(b.chrome){var v=n.replace(/^.*Chrome\/([\d]+).*$/,"$1");b.chrome.adblock2345||b.chrome.common2345?h["2345Explorer"]=!0:p("type","application/360softmgrplugin")||p("type","application/mozilla-npqihooquicklogin")||v>36&&b.showModalDialog?E=!0:v>45&&!(E=p("type","application/vnd.chromium.remoting-viewer"))&&v>=69&&(E=p("type","application/hwepass2001.installepass2001")||p("type","application/asx"))}h.Mobile?h.Mobile=!(n.indexOf("iPad")>-1):E&&(p("type","application/gameplugin")||l&&l.connection!==void 0&&l.connection.saveData===void 0?h["360SE"]=!0:h["360EE"]=!0),h.Baidu&&h.Opera?h.Baidu=!1:h.iOS&&(h.Safari=!0);var S={engine:["WebKit","Trident","Gecko","Presto","KHTML"],browser:["Safari","Chrome","Edge","IE","Firefox","Firefox Focus","Chromium","Opera","Vivaldi","Yandex","Brave","Arora","Lunascape","QupZilla","Coc Coc","Kindle","Iceweasel","Konqueror","Iceape","SeaMonkey","Epiphany","XiaoMi","Vivo","OPPO","360","360SE","360EE","UC","QQBrowser","QQ","Huawei","Baidu","Maxthon","Sogou","Liebao","2345Explorer","115Browser","TheWorld","Quark","Qiyu","Wechat","WechatWork","Taobao","Alipay","Weibo","Douban","Suning","iQiYi","DingTalk","Douyin","Googlebot","Baiduspider","Sogouspider","Bingbot","360Spider","Bytespider","YisouSpider","YodaoBot","YandexBot"],system:["Windows","Linux","Mac OS","Android","HarmonyOS","Ubuntu","FreeBSD","Debian","iOS","Windows Phone","BlackBerry","MeeGo","Symbian","Chrome OS","WebOS"],device:["Mobile","Tablet"]};for(var B in s.device="PC",s.language=function(){var G=l.browserLanguage||l.language;if(typeof G!="string")return"Unknown language";var K=G.split("-");return K[1]&&(K[1]=K[1].toUpperCase()),K.join("_")}(),S)for(var x=0;x<S[B].length;x++){var P=S[B][x];h[P]&&(s[B]=P)}var M={Windows:function(){var G=n.replace(/^Mozilla\/\d.0 \(Windows NT ([\d.]+)[;)].*$/,"$1");return{10:"10",6.4:"10",6.3:"8.1",6.2:"8",6.1:"7","6.0":"Vista",5.2:"XP",5.1:"XP","5.0":"2000"}[G]||G},Android:function(){return n.replace(/^.*Android ([\d.]+);.*$/,"$1")},HarmonyOS:function(){return{10:"2",12:"3"}[n.replace(/^Mozilla.*Android ([\d.]+)[;)].*$/,"$1")]||""},iOS:function(){return n.replace(/^.*OS ([\d_]+) like.*$/,"$1").replace(/_/g,".")},Debian:function(){return n.replace(/^.*Debian\/([\d.]+).*$/,"$1")},"Windows Phone":function(){return n.replace(/^.*Windows Phone( OS)? ([\d.]+);.*$/,"$2")},"Mac OS":function(){return n.replace(/^.*Mac OS X ([\d_]+).*$/,"$1").replace(/_/g,".")},WebOS:function(){return n.replace(/^.*hpwOS\/([\d.]+);.*$/,"$1")}};s.systemVersion="",M[s.system]&&(s.systemVersion=M[s.system](),s.systemVersion==n&&(s.systemVersion="")),s.system=="Windows"&&t&&(s.systemVersion=t),s.platform=l.platform,s.isWebview=h.isWebview,s.isBot=["Googlebot","Baiduspider","Sogouspider","Bingbot","360Spider","Bytespider","YandexBot"].some(function(G){return h[G]});var F={Safari:function(){return n.replace(/^.*Version\/([\d.]+).*$/,"$1")},Chrome:function(){return n.replace(/^.*Chrome\/([\d.]+).*$/,"$1").replace(/^.*CriOS\/([\d.]+).*$/,"$1")},IE:function(){return n.replace(/^.*MSIE ([\d.]+).*$/,"$1").replace(/^.*rv:([\d.]+).*$/,"$1")},Edge:function(){return n.replace(/^.*Edge\/([\d.]+).*$/,"$1").replace(/^.*Edg\/([\d.]+).*$/,"$1").replace(/^.*EdgA\/([\d.]+).*$/,"$1").replace(/^.*EdgiOS\/([\d.]+).*$/,"$1")},Firefox:function(){return n.replace(/^.*Firefox\/([\d.]+).*$/,"$1").replace(/^.*FxiOS\/([\d.]+).*$/,"$1")},"Firefox Focus":function(){return n.replace(/^.*Focus\/([\d.]+).*$/,"$1")},Chromium:function(){return n.replace(/^.*Chromium\/([\d.]+).*$/,"$1")},Opera:function(){return n.replace(/^.*Opera\/([\d.]+).*$/,"$1").replace(/^.*OPR\/([\d.]+).*$/,"$1")},Vivaldi:function(){return n.replace(/^.*Vivaldi\/([\d.]+).*$/,"$1")},Yandex:function(){return n.replace(/^.*YaBrowser\/([\d.]+).*$/,"$1")},Brave:function(){return n.replace(/^.*Chrome\/([\d.]+).*$/,"$1")},Arora:function(){return n.replace(/^.*Arora\/([\d.]+).*$/,"$1")},Lunascape:function(){return n.replace(/^.*Lunascape[\/\s]([\d.]+).*$/,"$1")},QupZilla:function(){return n.replace(/^.*QupZilla[\/\s]([\d.]+).*$/,"$1")},"Coc Coc":function(){return n.replace(/^.*coc_coc_browser\/([\d.]+).*$/,"$1")},Kindle:function(){return n.replace(/^.*Version\/([\d.]+).*$/,"$1")},Iceweasel:function(){return n.replace(/^.*Iceweasel\/([\d.]+).*$/,"$1")},Konqueror:function(){return n.replace(/^.*Konqueror\/([\d.]+).*$/,"$1")},Iceape:function(){return n.replace(/^.*Iceape\/([\d.]+).*$/,"$1")},SeaMonkey:function(){return n.replace(/^.*SeaMonkey\/([\d.]+).*$/,"$1")},Epiphany:function(){return n.replace(/^.*Epiphany\/([\d.]+).*$/,"$1")},360:function(){return n.replace(/^.*QihooBrowser(HD)?\/([\d.]+).*$/,"$2")},"360SE":function(){return{108:"14.0",86:"13.0",78:"12.0",69:"11.0",63:"10.0",55:"9.1",45:"8.1",42:"8.0",31:"7.0",21:"6.3"}[n.replace(/^.*Chrome\/([\d]+).*$/,"$1")]||""},"360EE":function(){return{95:"21",86:"13.0",78:"12.0",69:"11.0",63:"9.5",55:"9.0",50:"8.7",30:"7.5"}[n.replace(/^.*Chrome\/([\d]+).*$/,"$1")]||""},Maxthon:function(){return n.replace(/^.*Maxthon\/([\d.]+).*$/,"$1")},QQBrowser:function(){return n.replace(/^.*QQBrowser\/([\d.]+).*$/,"$1")},QQ:function(){return n.replace(/^.*QQ\/([\d.]+).*$/,"$1")},Baidu:function(){return n.replace(/^.*BIDUBrowser[\s\/]([\d.]+).*$/,"$1").replace(/^.*baiduboxapp\/([\d.]+).*$/,"$1")},UC:function(){return n.replace(/^.*UC?Browser\/([\d.]+).*$/,"$1")},Sogou:function(){return n.replace(/^.*SE ([\d.X]+).*$/,"$1").replace(/^.*SogouMobileBrowser\/([\d.]+).*$/,"$1")},Liebao:function(){var G="";n.indexOf("LieBaoFast")>-1&&(G=n.replace(/^.*LieBaoFast\/([\d.]+).*$/,"$1"));var K={57:"6.5",49:"6.0",46:"5.9",42:"5.3",39:"5.2",34:"5.0",29:"4.5",21:"4.0"},H=n.replace(/^.*Chrome\/([\d]+).*$/,"$1");return G||K[H]||""},"2345Explorer":function(){return{69:"10.0",55:"9.9"}[navigator.userAgent.replace(/^.*Chrome\/([\d]+).*$/,"$1")]||n.replace(/^.*2345Explorer\/([\d.]+).*$/,"$1").replace(/^.*Mb2345Browser\/([\d.]+).*$/,"$1")},"115Browser":function(){return n.replace(/^.*115Browser\/([\d.]+).*$/,"$1")},TheWorld:function(){return n.replace(/^.*TheWorld ([\d.]+).*$/,"$1")},XiaoMi:function(){return n.replace(/^.*MiuiBrowser\/([\d.]+).*$/,"$1")},Vivo:function(){return n.replace(/^.*VivoBrowser\/([\d.]+).*$/,"$1")},OPPO:function(){return n.replace(/^.*HeyTapBrowser\/([\d.]+).*$/,"$1")},Quark:function(){return n.replace(/^.*Quark\/([\d.]+).*$/,"$1")},Qiyu:function(){return n.replace(/^.*Qiyu\/([\d.]+).*$/,"$1")},Wechat:function(){return n.replace(/^.*MicroMessenger\/([\d.]+).*$/,"$1")},WechatWork:function(){return n.replace(/^.*wxwork\/([\d.]+).*$/,"$1")},Taobao:function(){return n.replace(/^.*AliApp\(TB\/([\d.]+).*$/,"$1")},Alipay:function(){return n.replace(/^.*AliApp\(AP\/([\d.]+).*$/,"$1")},Weibo:function(){return n.replace(/^.*weibo__([\d.]+).*$/,"$1")},Douban:function(){return n.replace(/^.*com.douban.frodo\/([\d.]+).*$/,"$1")},Suning:function(){return n.replace(/^.*SNEBUY-APP([\d.]+).*$/,"$1")},iQiYi:function(){return n.replace(/^.*IqiyiVersion\/([\d.]+).*$/,"$1")},DingTalk:function(){return n.replace(/^.*DingTalk\/([\d.]+).*$/,"$1")},Douyin:function(){return n.replace(/^.*app_version\/([\d.]+).*$/,"$1")},Huawei:function(){return n.replace(/^.*Version\/([\d.]+).*$/,"$1").replace(/^.*HuaweiBrowser\/([\d.]+).*$/,"$1").replace(/^.*HBPC\/([\d.]+).*$/,"$1")},Googlebot:function(){return n.replace(/^.*Googlebot\/([\d.]+).*$/,"$1")},Baiduspider:function(){return n.replace(/^.*Baiduspider(-render)?\/([\d.]+).*$/,"$1")},Sogouspider:function(){return n.replace(/^.*Sogou (\S+) Spider\/([\d.]+).*$/i,"$2")},Bingbot:function(){return n.replace(/^.*bingbot\/([\d.]+).*$/,"$1")},"360Spider":function(){return""},Bytespider:function(){return""},YisouSpider:function(){return n.replace(/^.*YisouSpider\/([\d.]+).*$/,"$1")},YodaoBot:function(){return n.replace(/^.*YodaoBot\/([\d.]+).*$/,"$1")},YandexBot:function(){return n.replace(/^.*YandexBot\/([\d.]+).*$/,"$1")}};return s.version="",F[s.browser]&&(s.version=F[s.browser](),s.version==n&&(s.version="")),s.browser=="Chrome"&&n.match(/\S+Browser/)&&(s.browser=n.match(/\S+Browser/)[0],s.version=n.replace(/^.*Browser\/([\d.]+).*$/,"$1")),s.browser=="Edge"?s.engine=parseInt(s.version)>75?"Blink":"EdgeHTML":(h.Chrome&&s.engine=="WebKit"&&parseInt(F.Chrome())>27||s.browser=="Opera"&&parseInt(s.version)>12||s.browser=="Yandex")&&(s.engine="Blink"),s}}(i)}(xn)),xn.exports),na=tt(ia);const ra=0,Rr=1,Rn="flv",Dr="m7s",Oi={videoBuffer:.2,videoBufferDelay:1e3,scaleMode:1,debug:!1,heartTimeout:15,heartTimeoutReplayTimes:5,timeout:10,loadingTimeout:10,loadingTimeoutDelay:3,loadingTimeoutReplayTimes:5,keepScreenOn:!1,muted:!0,hasAudio:!0,volume:.8,hasVideo:!0,decoder:"decoder.js",staticPath:"",url:"",rotate:0,isLive:!0,forceNoOffscreen:!0,protocol:Rr,demuxType:Rn,useMSE:!1,wasmDecodeErrorReplay:!0,openWebglAlignment:!1,wasmDecodeAudioSyncVideo:!1,autoPlay:!0,loggerOptions:{level:"INFO"}},Mr="init",Pr="initVideo",oa="render",aa="playAudio",$r="initAudio",Ur="audioCode",Fr="videoCode",sa="wasmError",la="Invalid NAL unit size",Ai=1,yi=2,Aa=8,da=9,ca="init",Nr="decode",ua="audioDecode",ha="close",pa="updateConfig",te=hr({fullscreenChange:"fullscreenChange",orientationChange:"orientationChange",decoderWorkerInit:"decoderWorkerInit",play:"play",playing:"playing",pause:"pause",mute:"mute",load:"load",loading:"loading",loaded:"loaded",videoInfo:"videoInfo",timeUpdate:"timeUpdate",timeUpdateOSD:"timeUpdateOSD",audioInfo:"audioInfo",log:"log",error:"error",kBps:"kBps",timeout:"timeout",heartTimeout:"heartTimeout",heartRetryTimes:"heartRetryTimes",delayTimeout:"delayTimeout",loadingTimeout:"loadingTimeout",loadingRetryTimes:"loadingRetryTimes",stats:"stats",performance:"performance",buffer:"buffer",videoFrame:"videoFrame",start:"start",metadata:"metadata",resize:"resize",streamEnd:"streamEnd",streamSuccess:"streamSuccess",streamMessage:"streamMessage",streamError:"streamError",volumechange:"volumechange",audioCodecUnsupported:"audioCodecUnsupported",unrecoverableEarlyEof:"unrecoverableEarlyEof",destroy:"destroy",mseSourceOpen:"mseSourceOpen",mseSourceClose:"mseSourceClose",mseSourceBufferError:"mseSourceBufferError",mseSourceBufferBusy:"mseSourceBufferBusy",mseSourceBufferFull:"mseSourceBufferFull",videoWaiting:"videoWaiting",videoTimeUpdate:"videoTimeUpdate",videoSyncAudio:"videoSyncAudio",playToRenderTimes:"playToRenderTimes",localVideoRecords:"localVideoRecords",getDefinitionListResult:"getDefinitionListResult",definitionChange:"definitionChange",definitionListChange:"definitionListChange",playbackRateListChange:"playbackRateListChange",playbackRateChange:"playbackRateChange",decoderLoaded:"decoderLoaded",end:"end"},Yt.EVENTS,{clone:!1}),Vr={load:te.load,timeUpdate:te.timeUpdate,videoInfo:te.videoInfo,audioInfo:te.audioInfo,error:te.error,kBps:te.kBps,log:te.log,start:te.start,delayTimeout:te.delayTimeout,fullscreen:"fullscreen",play:te.play,pause:te.pause,mute:te.mute,stats:te.stats,volumechange:te.volumechange,performance:te.performance,playToRenderTimes:te.playToRenderTimes},vt={playError:"playIsNotPauseOrUrlIsNull",fetchError:"NetworkError",websocketError:"websocketError",webcodecsH265NotSupport:"webcodecsH265NotSupport",webcodecsDecodeError:"webcodecsDecodeError",webcodecsWidthOrHeightChange:"webcodecsWidthOrHeightChange",mediaSourceH265NotSupport:"mediaSourceH265NotSupport",mediaSourceFull:te.mseSourceBufferFull,mseSourceBufferError:te.mseSourceBufferError,mediaSourceAppendBufferError:"mediaSourceAppendBufferError",mediaSourceBufferListLarge:"mediaSourceBufferListLarge",mediaSourceAppendBufferEndTimeout:"mediaSourceAppendBufferEndTimeout",wasmDecodeError:"wasmDecodeError",webglAlignmentError:"webglAlignmentError"},oi={download:"download",base64:"base64",blob:"blob"},fa={7:"H264(AVC)",12:"H265(HEVC)"},ma={10:"AAC",7:"ALAW",8:"MULAW"},bi={full:0,auto:1,fullAuto:2},jr="webcodecs",Dn="webgl",Mn="offscreen",_a="The user aborted a request",va="AbortError",ga="AbortError",Gr="https://open.ys7.com/";function ya(){}function Qr(){let u=arguments.length>1?arguments[1]:void 0;const e=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:"").split(","),i=atob(e[1]),d=e[0].replace("data:","").replace(";base64","");let b=i.length;const l=new Uint8Array(b);for(;b--;)l[b]=i.charCodeAt(b);return new File([l],u||"file",{type:d})}function Wt(){return new Date().getTime()}function zr(u,e,i){if(u)return typeof e=="object"&&Object.keys(e).forEach(d=>{zr(u,d,e[d])}),u.style[e]=i,u}function Hr(){return performance&&typeof performance.now=="function"?performance.now():Date.now()}function Wr(){return/phone|pad|pod|iphone|ipod|ios|ipad|android|mobile|blackberry|iemobile|mqqbrowser|juc|wosbrowser|webos|symbian|windows phone|opera mini|huaweibrowser/i.test(window.navigator.userAgent.toLowerCase())}function Pn(u){return!function(e){return e==null}(u)}(()=>{try{if(typeof WebAssembly=="object"&&typeof WebAssembly.instantiate=="function"){const u=new WebAssembly.Module(Uint8Array.of(0,97,115,109,1,0,0,0));if(u instanceof WebAssembly.Module)return new WebAssembly.Instance(u)instanceof WebAssembly.Instance}}catch{}})();class xi{constructor(){}on(e,i,d){const b=this.e||(this.e={});return(b[e]||(b[e]=[])).push({fn:i,ctx:d}),this}once(e,i,d){const b=this;function l(){b.off(e,l);for(var p=arguments.length,t=new Array(p),a=0;a<p;a++)t[a]=arguments[a];i.apply(d,t)}return l._=i,this.on(e,l,d)}emit(e){const i=((this.e||(this.e={}))[e]||[]).slice();for(var d=arguments.length,b=new Array(d>1?d-1:0),l=1;l<d;l++)b[l-1]=arguments[l];for(let p=0;p<i.length;p+=1)i[p].fn.apply(i[p].ctx,b);return this}off(e,i){const d=this.e||(this.e={});if(!e)return Object.keys(d).forEach(p=>{delete d[p]}),void delete this.e;const b=d[e],l=[];if(b&&i)for(let p=0,t=b.length;p<t;p+=1)b[p].fn!==i&&b[p].fn._!==i&&l.push(b[p]);return l.length?d[e]=l:delete d[e],this}}let qr=class extends xi{constructor(u){super(),this._isFullScreen=!1,this.resetInit(),this._orientation=u._opt.orientation||0,u.on(te.fullscreenChange,e=>{this._isFullScreen=e.isCurrentFullscreen}),u.on(te.orientationChange,e=>{this._orientation=e})}resetInit(){this.init=!1,this.videoInfo={width:0,height:0,encType:"",encTypeCode:0}}destroy(){var u;this.resetInit(),this.player.$container&&this.$videoElement&&((u=this.player.$container)===null||u===void 0||u.removeChild(this.$videoElement)),this.$videoElement=null,this.off()}updateVideoInfo(u){var e,i,d,b,l,p,t,a,n,s,h;(u.height&&u.height!==((e=this.videoInfo)===null||e===void 0?void 0:e.height)||u.width&&u.width!==this.videoInfo.width||u!=null&&u.encTypeCode&&(u==null?void 0:u.encTypeCode)!==((i=this.videoInfo)===null||i===void 0?void 0:i.encTypeCode))&&(this.videoInfo=Object.assign(this.videoInfo||{},u||{}),u.encTypeCode&&(this.videoInfo.encTypeCode=u.encTypeCode,this.videoInfo.encType=fa[u.encTypeCode]),u.width&&(this.videoInfo.width=u.width),u.height&&(this.videoInfo.height=u.height),!((d=this.videoInfo)===null||d===void 0)&&d.width&&((b=this.videoInfo)===null||b===void 0?void 0:b.width)>0&&(!((l=this.videoInfo)===null||l===void 0)&&l.height)&&((p=this.videoInfo)===null||p===void 0?void 0:p.height)>0&&(!((t=this.videoInfo)===null||t===void 0)&&t.encTypeCode)&&this.player.emit(te.videoInfo,this.videoInfo),!((a=this.videoInfo)===null||a===void 0)&&a.hasAudio&&(!((n=this.videoInfo)===null||n===void 0)&&n.audioCodec)&&this.player.emit(te.audioInfo,{encType:(s=this.videoInfo)===null||s===void 0?void 0:s.audioCodec,audioFormatName:this._flvToMp4Codec((h=this.videoInfo)===null||h===void 0?void 0:h.audioCodec),audioCodec:this.videoInfo.audioCodec}))}_flvToMp4Codec(u){return{2:"mp3","mp4a.40.2":"AAC",10:"AAC"}[u]}play(){}pause(){}clearView(){}};const ui=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof Si=="object"&&Si.global===Si?Si:void 0;function $n(u,e,i){const d=new XMLHttpRequest;d.open("GET",u),d.responseType="blob",d.onload=function(){Un(d.response,e,i)},d.onerror=function(){},d.send()}function Kr(u){const e=new XMLHttpRequest;e.open("HEAD",u,!1);try{e.send()}catch{}return e.status>=200&&e.status<=299}function Qi(u){try{u.dispatchEvent(new MouseEvent("click"))}catch{const i=document.createEvent("MouseEvents");i.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),u.dispatchEvent(i)}}const Yr=ui.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent);var Un=typeof window!="object"||window!==ui?function(){}:"download"in HTMLAnchorElement.prototype&&!Yr?function(u,e,i){const d=ui.URL||ui.webkitURL,b=document.createElementNS("http://www.w3.org/1999/xhtml","a");e=e||u.name||"download",b.download=e,b.rel="noopener",typeof u=="string"?(b.href=u,b.origin!==location.origin?Kr(b.href)?$n(u,e,i):Qi(b,b.target="_blank"):Qi(b)):(b.href=d.createObjectURL(u),setTimeout(function(){d.revokeObjectURL(b.href)},4e4),setTimeout(function(){Qi(b)},0))}:"msSaveOrOpenBlob"in navigator?function(u,e,i){if(e=e||u.name||"download",typeof u=="string")if(Kr(u))$n(u,e,i);else{const d=document.createElement("a");d.href=u,d.target="_blank",setTimeout(function(){Qi(d)})}else navigator.msSaveOrOpenBlob(function(d,b){return b===void 0?b={autoBom:!1}:typeof b!="object"&&(b={autoBom:!b}),b.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(d.type)?new Blob(["\uFEFF",d],{type:d.type}):d}(u,i),e)}:function(u,e,i,d){if((d=d||open("","_blank"))&&(d.document.title=d.document.body.innerText="downloading..."),typeof u=="string")return $n(u,e,i);const b=u.type==="application/octet-stream",l=/constructor/i.test(ui.HTMLElement)||ui.safari,p=/CriOS\/[\d]+/.test(navigator.userAgent);if((p||b&&l||Yr)&&typeof FileReader<"u"){const t=new FileReader;t.onloadend=function(){let a=t.result;a=p?a:a.replace(/^data:[^;]*;/,"data:attachment/file;"),d?d.location.href=a:location=a,d=null},t.readAsDataURL(u)}else{const t=ui.URL||ui.webkitURL,a=t.createObjectURL(u);d?d.location=a:location.href=a,d=null,setTimeout(function(){t.revokeObjectURL(a)},4e4)}};class ba extends qr{constructor(e){super(e),this._pageHide=!1,this.player=e;const i=document.createElement("canvas");i.style.position="absolute",i.style.top="0",i.style.left="0",this.$videoElement=i,e.$container.appendChild(this.$videoElement),this.context2D=null,this.contextGl=null,this.contextGlRender=null,this.contextGlDestroy=null,this.bitmaprenderer=null,this.renderType=null,this._currentTime=0,this._initCanvasRender(),this._contextmenuEvent=d=>{d.target===this.$videoElement&&d.preventDefault()},document.addEventListener("contextmenu",this._contextmenuEvent),this.player.debug.log("CanvasVideo","init"),this._visibilitychange=this._visibilitychange.bind(this),document.addEventListener("visibilitychange",this._visibilitychange)}destroy(){this.contextGl&&(this.contextGl=null),this.context2D&&(this.context2D=null),this.contextGlRender&&(this.contextGlDestroy&&this.contextGlDestroy(),this.contextGlDestroy=null,this.contextGlRender=null),this.bitmaprenderer&&(this.bitmaprenderer=null),this._contextmenuEvent&&(document.removeEventListener("contextmenu",this._contextmenuEvent),this._contextmenuEvent=null),this._visibilitychange&&(document.removeEventListener("visibilitychange",this._visibilitychange),this._visibilitychange=null),this.renderType=null,super.destroy(),this.player.debug.log("CanvasVideoLoader","destroy")}_visibilitychange(){this.player.debug.log("document.hidden",document.hidden),this._pageHide=document.hidden}_initContextGl(){this.contextGl=function(i){let d=null;const b=["webgl","experimental-webgl","moz-webgl","webkit-3d"];let l=0;for(;!d&&l<b.length;){const p=b[l];try{const t={preserveDrawingBuffer:!0};d=i.getContext(p,t)}catch{d=null}d&&typeof d.getParameter=="function"||(d=null),++l}return d}(this.$videoElement);const e=((i,d)=>{var b=["attribute vec4 vertexPos;","attribute vec4 texturePos;","varying vec2 textureCoord;","void main()","{","gl_Position = vertexPos;","textureCoord = texturePos.xy;","}"].join(`
  147. `),l=["precision highp float;","varying highp vec2 textureCoord;","uniform sampler2D ySampler;","uniform sampler2D uSampler;","uniform sampler2D vSampler;","const mat4 YUV2RGB = mat4","(","1.1643828125, 0, 1.59602734375, -.87078515625,","1.1643828125, -.39176171875, -.81296875, .52959375,","1.1643828125, 2.017234375, 0, -1.081390625,","0, 0, 0, 1",");","void main(void) {","highp float y = texture2D(ySampler, textureCoord).r;","highp float u = texture2D(uSampler, textureCoord).r;","highp float v = texture2D(vSampler, textureCoord).r;","gl_FragColor = vec4(y, u, v, 1) * YUV2RGB;","}"].join(`
  148. `);d&&i.pixelStorei(i.UNPACK_ALIGNMENT,1);var p=i.createShader(i.VERTEX_SHADER);i.shaderSource(p,b),i.compileShader(p),i.getShaderParameter(p,i.COMPILE_STATUS);var t=i.createShader(i.FRAGMENT_SHADER);i.shaderSource(t,l),i.compileShader(t),i.getShaderParameter(t,i.COMPILE_STATUS);var a=i.createProgram();i.attachShader(a,p),i.attachShader(a,t),i.linkProgram(a),i.getProgramParameter(a,i.LINK_STATUS),i.useProgram(a);var n=i.createBuffer();i.bindBuffer(i.ARRAY_BUFFER,n),i.bufferData(i.ARRAY_BUFFER,new Float32Array([1,1,-1,1,1,-1,-1,-1]),i.STATIC_DRAW);var s=i.getAttribLocation(a,"vertexPos");i.enableVertexAttribArray(s),i.vertexAttribPointer(s,2,i.FLOAT,!1,0,0);var h=i.createBuffer();i.bindBuffer(i.ARRAY_BUFFER,h),i.bufferData(i.ARRAY_BUFFER,new Float32Array([1,0,0,0,1,1,0,1]),i.STATIC_DRAW);var E=i.getAttribLocation(a,"texturePos");function v(P,M){var F=i.createTexture();return i.bindTexture(i.TEXTURE_2D,F),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,i.LINEAR),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,i.LINEAR),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_S,i.CLAMP_TO_EDGE),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_T,i.CLAMP_TO_EDGE),i.bindTexture(i.TEXTURE_2D,null),i.uniform1i(i.getUniformLocation(a,P),M),F}i.enableVertexAttribArray(E),i.vertexAttribPointer(E,2,i.FLOAT,!1,0,0);var S=v("ySampler",0),B=v("uSampler",1),x=v("vSampler",2);return{render:function(P,M,F,G,K){i.viewport(0,0,P,M),i.activeTexture(i.TEXTURE0),i.bindTexture(i.TEXTURE_2D,S),i.texImage2D(i.TEXTURE_2D,0,i.LUMINANCE,P,M,0,i.LUMINANCE,i.UNSIGNED_BYTE,F),i.activeTexture(i.TEXTURE1),i.bindTexture(i.TEXTURE_2D,B),i.texImage2D(i.TEXTURE_2D,0,i.LUMINANCE,P/2,M/2,0,i.LUMINANCE,i.UNSIGNED_BYTE,G),i.activeTexture(i.TEXTURE2),i.bindTexture(i.TEXTURE_2D,x),i.texImage2D(i.TEXTURE_2D,0,i.LUMINANCE,P/2,M/2,0,i.LUMINANCE,i.UNSIGNED_BYTE,K),i.drawArrays(i.TRIANGLE_STRIP,0,4)},destroy:function(){try{i.deleteProgram(a),i.deleteBuffer(n),i.deleteBuffer(h),i.deleteTexture(S),i.deleteTexture(B),i.deleteTexture(x)}catch{}}}})(this.contextGl,this.player._opt.openWebglAlignment);this.contextGlRender=e.render,this.contextGlDestroy=e.destroy}_initContext2D(){this.context2D=this.$videoElement.getContext("2d")}_initCanvasRender(){this._supportOffscreen()?(this.renderType=Mn,this._bindOffscreen()):(this.renderType=Dn,this._initContextGl())}_supportOffscreen(){return typeof this.$videoElement.transferControlToOffscreen=="function"&&this.player._opt.useOffscreen}_bindOffscreen(){this.bitmaprenderer=this.$videoElement.getContext("bitmaprenderer")}initCanvasViewSize(){this.$videoElement.width=this.videoInfo.width,this.$videoElement.height=this.videoInfo.height,this.resize()}render(e){var i,d,b;switch(this.player.videoTimestamp=e.ts,this._currentTime=e.ts,this.renderType){case Mn:(i=this.bitmaprenderer)===null||i===void 0||i.transferFromImageBitmap(e.buffer);break;case Dn:this._pageHide||this.contextGlRender(this.$videoElement.width,this.$videoElement.height,e.output[0],e.output[1],e.output[2]);break;case jr:(d=this.context2D)===null||d===void 0||d.drawImage(e.videoFrame,0,0,this.$videoElement.width,this.$videoElement.height),(b=e.videoFrame).close?b.close():b.destroy&&b.destroy()}}screenshot(e,i,d,b){e=e||Wt()+"",b=b||oi.download;const l={png:"image/png",jpeg:"image/jpeg",webp:"image/webp"};let p=.92;!l[i]&&oi[i]&&(b=i,i="png",d=void 0),typeof d=="string"&&(b=d,d=void 0),d!==void 0&&(p=Number(d));const t=this.$videoElement.toDataURL(l[i]||l.png,p);if(t!=="data:,"){if(b===oi.base64)return t;{const a=Qr(t,e+"."+i);return b===oi.blob?a:b===oi.download?(Un(a,e),a):void 0}}}clearView(){var e;switch(this.renderType){case Mn:(function(i,d){const b=document.createElement("canvas");return b.width=i,b.height=d,window.createImageBitmap(b,0,0,i,d)})(this.$videoElement.width,this.$videoElement.height).then(i=>{var d;(d=this.bitmaprenderer)===null||d===void 0||d.transferFromImageBitmap(i)});break;case Dn:this.contextGl.clear(this.contextGl.COLOR_BUFFER_BIT);break;case jr:(e=this.context2D)===null||e===void 0||e.clearRect(0,0,this.$videoElement.width,this.$videoElement.height)}}resize(){this.player.debug.log("canvasVideo","resize");const e=this.player._opt;let i=Math.floor(this.player.width),d=Math.floor(this.player.height);this._isFullScreen&&[0,180].includes(this._orientation)&&Mt()&&([i,d]=[d,i]);let b=this.$videoElement.width,l=this.$videoElement.height;const p=e.rotate,t=(i-b)/2,a=(d-l)/2;p!==270&&p!==90||(b=this.$videoElement.height,l=this.$videoElement.width);const n=i/b,s=d/l;let h=n>s?s:n;e.scaleMode!==bi.auto&&n!==s&&(h=n+","+s),e.scaleMode===bi.fullAuto&&(h=n>s?n:s);let E="scale("+h+")";p&&(E+=" rotate("+p+"deg)"),this.$videoElement.style.cssText+="transform-origin: 50% 50%;",this.$videoElement.style.transform=E,this.$videoElement.style.left=t+"px",this.$videoElement.style.top=a+"px"}get currentTime(){return(this._currentTime||0)/1e3}}class Ea extends xi{constructor(e){super(),this.bufferList=[],this.player=e,this.scriptNode=null,this.hasInitScriptNode=!1,this.audioContextChannel=null,this.audioContext=new(window.AudioContext||window.webkitAudioContext),this.gainNode=this.audioContext.createGain();const i=this.audioContext.createBufferSource();i.buffer=this.audioContext.createBuffer(1,1,22050),i.connect(this.audioContext.destination),i.start(0),this.audioBufferSourceNode=i,this.mediaStreamAudioDestinationNode=this.audioContext.createMediaStreamDestination(),this.audioEnabled(!0),this.gainNode.gain.value=0,this.playing=!1,this.audioSyncVideoOption={diff:null},this.audioInfo={encType:"",channels:"",sampleRate:""},this.init=!1,this.hasAudio=!1,this._muted=this.player._opt.muted,this._volume=this.player._opt.volume,!this._muted&&this._volume&&(this.volume=this._volume),this.on(te.videoSyncAudio,d=>{this.audioSyncVideoOption=d}),this.player.debug.log("AudioContext","init")}resetInit(){this.init=!1,this.audioInfo={encType:"",channels:"",sampleRate:""}}destroy(){this.closeAudio(),this.resetInit(),this.audioContext.close(),this.audioContext=null,this.gainNode=null,this.hasAudio=!1,this.playing=!1,this.scriptNode&&(this.scriptNode.onaudioprocess=ya,this.scriptNode=null),this.audioBufferSourceNode=null,this.mediaStreamAudioDestinationNode=null,this.hasInitScriptNode=!1,this.audioSyncVideoOption={diff:null},this.off(),this.player.debug.log("AudioContext","destroy")}updateAudioInfo(e){e.encTypeCode&&(this.audioInfo.encType=ma[e.encTypeCode]),e.channels&&(this.audioInfo.channels=e.channels),e.sampleRate&&(this.audioInfo.sampleRate=e.sampleRate),this.audioInfo.sampleRate&&this.audioInfo.channels&&this.audioInfo.encType&&!this.init&&(this.player.emit(te.audioInfo,this.audioInfo),this.init=!0)}get isPlaying(){return this.playing}get muted(){return this._muted}set muted(e){e?(this._setVolume(0),this.clear()):this._setVolume(this._volume),this._muted=e}get volume(){return this._volume}set volume(e){this.setVolume(e)}get bufferSize(){return this.bufferList.length}initScriptNode(){if(this.playing=!0,this.hasInitScriptNode)return;const e=this.audioInfo.channels,i=this.audioContext.createScriptProcessor(1024,0,e);i.onaudioprocess=d=>{const b=d.outputBuffer;if(this.bufferList.length&&this.playing){if(!this.player._opt.useWCS&&!this.player._opt.useMSE&&this.player._opt.wasmDecodeAudioSyncVideo){if(this.audioSyncVideoOption.diff>1e3)return void this.player.debug.warn("AudioContext",`audioSyncVideoOption more than diff :${this.audioSyncVideoOption.diff}, waiting`);if(this.audioSyncVideoOption.diff<-1e3){this.player.debug.warn("AudioContext",`audioSyncVideoOption less than diff :${this.audioSyncVideoOption.diff}, dropping`);let p=this.bufferList.shift();for(;p.ts-this.player.videoTimestamp<-1e3&&this.bufferList.length>0;)p=this.bufferList.shift();if(this.bufferList.length===0)return}}if(this.bufferList.length===0)return;const l=this.bufferList.shift();l&&l.ts&&(this.player.audioTimestamp=l.ts);for(let p=0;p<e;p++){const t=l==null?void 0:l.buffer[p],a=b.getChannelData(p);for(let n=0;n<1024;n++)a[n]=t[n]||0}}},i.connect(this.gainNode),this.scriptNode=i,this.gainNode.connect(this.audioContext.destination),this.gainNode.connect(this.mediaStreamAudioDestinationNode),this.hasInitScriptNode=!0}setVolume(e){e=parseFloat(e+"").toFixed(2),this._setVolume(e),this._volume=e}_setVolume(e){e=parseFloat(e+"").toFixed(2),isNaN(e)||(this.audioEnabled(!0),e=function(i,d,b){return Math.max(Math.min(i,Math.max(d,b)),Math.min(d,b))}(e,0,1),this.gainNode.gain.value=e,this.gainNode.gain.setValueAtTime(e,this.audioContext.currentTime))}closeAudio(){this.hasInitScriptNode&&(this.scriptNode&&this.scriptNode.disconnect(this.gainNode),this.gainNode&&this.gainNode.disconnect(this.audioContext.destination),this.gainNode&&this.gainNode.disconnect(this.mediaStreamAudioDestinationNode)),this.clear()}audioEnabled(e){var i,d;e?((i=this.audioContext)===null||i===void 0?void 0:i.state)==="suspended"&&this.audioContext.resume():((d=this.audioContext)===null||d===void 0?void 0:d.state)==="running"&&this.audioContext.suspend()}isStateRunning(){return this.audioContext.state==="running"}isStateSuspended(){return this.audioContext.state==="suspended"}clear(){this.bufferList=[]}play(e,i){this.muted||(this.hasAudio=!0,this.bufferList.push({buffer:e,ts:i}),this.bufferList.length>20&&this.bufferList.length>50&&this.bufferList.shift())}pause(){this.audioSyncVideoOption={diff:null},this.playing=!1,this.clear()}resume(){this.playing=!0}}class zi{constructor(e){return new(zi.getLoaderFactory())(e)}static getLoaderFactory(){return Ea}}class Sa extends xi{constructor(e){super(),this.player=e,this.playing=!1,this.abortController=new AbortController,this.streamRate=(Hr(),i=>{Hr()}),e.debug.log("FetchStream","init"),this._streamSuccess=!1}destroy(){this.abort(),this.off(),this.streamRate=null,this.player.debug.log("FetchStream","destroy")}fetchStream(e,i={}){var d;this._streamSuccess=!1;const{demux:b}=this.player;this.player._times.streamStart=Wt(),this.abortController||(this.abortController=new AbortController);const l=Object.assign({signal:(d=this.abortController)===null||d===void 0?void 0:d.signal},{headers:i.headers||{}});fetch(e,l).then(p=>{if(p.status!==200)return this.abort(),this.emit(te.streamError),void this.player.emit(te.error,te.streamError);const t=p.body.getReader(),a=()=>{t.read().then(({done:n,value:s})=>{n?b.close():(this.streamRate&&this.streamRate(s.byteLength),b.dispatch(s),this._streamSuccess||(this._streamSuccess=!0,this.emit(te.streamSuccess)),a())}).catch(n=>{b.close();const s=n.toString();if(s.indexOf(_a)===-1&&s.indexOf(va)===-1&&n.name!==ga){this.abort();try{t.cancel()}catch{}this.emit(te.streamError,n),this.player.emit(te.error,te.streamError,n)}})};a()}).catch(p=>{b.close(),this.abort(),this.emit(te.streamError,p),this.player.emit(te.error,te.streamError),p==null||p.name})}abort(){this._streamSuccess=!1,this.abortController&&(this.abortController.abort(),this.abortController=null)}}class Fn{constructor(e){return new(Fn.getLoaderFactory(e._opt.protocol))(e)}static getLoaderFactory(e){return Sa}}class Xr{constructor(e){this.player=e,this.decoderWorker=new Worker((e._opt.staticPath===""?"":function(i,d){d===void 0&&(d="");var b=/^(https?:\/\/|^\/\/)/;return b.test(i)?i:(i=i.replace(/\/+/g,"/"),d=b.test(d||"")?d:window.location.href,new URL(i,d).href)}(e._opt.staticPath))+e._opt.decoder),this._initDecoderWorker(),e.debug.log("decoderWorker","init")}destroy(){this.decoderWorker.postMessage({cmd:ha}),this.decoderWorker.terminate(),this.decoderWorker=null,this.player.debug.log("decoderWorker","destroy")}_initDecoderWorker(){const{debug:e,events:{proxy:i}}=this.player;this.decoderWorker.onmessage=d=>{var b,l,p,t,a,n;const s=d.data;switch(s.cmd){case Mr:e.log("decoderWorker","onmessage:",Mr),this.player.loaded||this.player.emit(te.load),this.player.emit(te.decoderWorkerInit),this.player.emit(te.decoderLoaded),this._initWork();break;case Fr:e.log("decoderWorker","onmessage:",Fr,s.code),this.player._times.decodeStart||(this.player._times.decodeStart=Wt()),this.player.video.updateVideoInfo({encTypeCode:s.code});break;case Ur:e.log("decoderWorker","onmessage:",Ur,s.code),(b=this.player)===null||b===void 0||(b=b.audio)===null||b===void 0||(l=b.updateAudioInfo)===null||l===void 0||l.call(b,{encTypeCode:s.code});break;case Pr:if(e.log("decoderWorker","onmessage:",Pr,`width:${s.w},height:${s.h}`),(p=this.player)===null||p===void 0||(p=p.video)===null||p===void 0||(t=p.updateVideoInfo)===null||t===void 0||t.call(p,{width:s.w,height:s.h}),!this.player._opt.openWebglAlignment&&s.w/2%4!=0)return void this.player.emit(vt.webglAlignmentError);this.player.video.initCanvasViewSize();break;case $r:e.log("decoderWorker","onmessage:",$r,`channels:${s.channels},sampleRate:${s.sampleRate}`),this.player.audio&&(this.player.audio.updateAudioInfo(s),this.player.audio.initScriptNode(s));break;case oa:var h,E,v;this.player.handleRender(),this.player.video.render(s),this.player.emit(te.timeUpdate,s.ts/1e3),this.player.updateStats({fps:!0,ts:s.ts,buf:s.delay}),s.w&&s.h&&((h=this.player)===null||h===void 0||(E=(v=h.video).updateVideoInfo)===null||E===void 0||E.call(v,{width:s.w,height:s.h})),this.player._times.videoStart||(this.player._times.videoStart=Wt(),this.player.handlePlayToRenderTimes());break;case aa:this.player.playing&&this.player.audio&&this.player.audio.play(s.buffer,s.ts);break;case sa:s.message&&s.message.indexOf(la)!==-1&&this.player.emitError(vt.wasmDecodeError);break;default:(a=(n=this.player)[s.cmd])===null||a===void 0||a.call(n,s)}}}_initWork(){var e;const i={debug:this.player._opt.debug,useOffscreen:this.player._opt.useOffscreen,useWCS:this.player._opt.useWCS,videoBuffer:this.player._opt.videoBuffer,videoBufferDelay:this.player._opt.videoBufferDelay,openWebglAlignment:this.player._opt.openWebglAlignment};this.decoderWorker.postMessage({cmd:ca,opt:JSON.stringify(i),sampleRate:((e=this.player)===null||e===void 0||(e=e.audio)===null||e===void 0||(e=e.audioContext)===null||e===void 0?void 0:e.sampleRate)||0})}decodeVideo(e,i,d){const b={type:yi,ts:Math.max(i,0),isIFrame:d};this.decoderWorker.postMessage({cmd:Nr,buffer:e,options:b},[e.buffer])}decodeAudio(e,i){this.player._opt.useWCS||this.player._opt.useMSE?this._decodeAudioNoDelay(e,i):this._decodeAudio(e,i)}_decodeAudio(e,i){const d={type:Ai,ts:Math.max(i,0)};this.decoderWorker.postMessage({cmd:Nr,buffer:e,options:d},[e.buffer])}_decodeAudioNoDelay(e,i){this.decoderWorker.postMessage({cmd:ua,buffer:e,ts:Math.max(i,0)},[e.buffer])}updateWorkConfig(e){this.decoderWorker.postMessage({cmd:pa,key:e.key,value:e.value})}}class Zr extends xi{constructor(e){super(),this.player=e,this.stopId=null,this.firstTimestamp=null,this.startTimestamp=null,this.delay=-1,this.bufferList=[],this.dropping=!1,this.initInterval()}destroy(){this.stopId&&(clearInterval(this.stopId),this.stopId=null),this.firstTimestamp=null,this.startTimestamp=null,this.delay=-1,this.bufferList=[],this.dropping=!1,this.off(),this.player.debug.log("CommonDemux","destroy")}getDelay(e){if(!e)return-1;if(this.firstTimestamp){if(e){const i=Date.now()-this.startTimestamp,d=e-this.firstTimestamp;this.delay=i>=d?i-d:d-i}}else this.firstTimestamp=e,this.startTimestamp=Date.now(),this.delay=-1;return this.delay}resetDelay(){this.firstTimestamp=null,this.startTimestamp=null,this.delay=-1,this.dropping=!1}initInterval(){this.player.debug.log("common dumex","init Interval");const e=()=>{let i;const d=this.player._opt.videoBuffer,b=this.player._opt.videoBufferDelay;if(this.bufferList.length)if(this.dropping){for(i=this.bufferList.shift(),i.type===Ai&&i.payload[1]===0&&this._doDecoderDecode(i);!i.isIFrame&&this.bufferList.length;)i=this.bufferList.shift(),i.type===Ai&&i.payload[1]===0&&this._doDecoderDecode(i);i.isIFrame&&this.getDelay(i.ts)<=Math.min(d,200)&&(this.dropping=!1,this._doDecoderDecode(i))}else i=this.bufferList[0],this.getDelay(i.ts)===-1?(this.bufferList.shift(),this._doDecoderDecode(i)):this.delay>d+b?(this.resetDelay(),this.dropping=!0):(i=this.bufferList[0],this.getDelay(i.ts)>d&&(this.bufferList.shift(),this._doDecoderDecode(i)))};e(),this.stopId=setInterval(e,10)}_doDecode(e,i,d,b,l){const p=this.player,t={ts:d,cts:l,type:i,isIFrame:!1};var a,n;if(p._opt.useWCS&&!p._opt.useOffscreen)i===yi&&(t.isIFrame=b),this.pushBuffer(e,t);else if(i===yi)p==null||(a=p.decoderWorker)===null||a===void 0||(n=a.decodeVideo)===null||n===void 0||n.call(a,e,d,b);else if(i===Ai){var s,h;p._opt.hasAudio&&(p==null||(s=p.decoderWorker)===null||s===void 0||(h=s.decodeAudio)===null||h===void 0||h.call(s,e,d))}}_doDecoderDecode(e){const i=this.player;var d,b;e.type===Ai?i._opt.hasAudio&&((d=i.decoderWorker)===null||d===void 0||(b=d.decodeAudio)===null||b===void 0||b.call(d,e.payload,e.ts)):e.type}pushBuffer(e,i){i.type===Ai?this.bufferList.push({ts:i.ts,payload:e,type:Ai}):i.type===yi&&this.bufferList.push({ts:i.ts,cts:i.cts,payload:e,type:yi,isIFrame:i.isIFrame})}close(){}}class Ca extends Zr{constructor(e){super(e),this.input=this._inputFlv(),this.flvDemux=this.dispatchFlvData(this.input),e.debug.log("FlvDemux","init")}destroy(){super.destroy(),this.input=null,this.flvDemux=null,this.player.debug.log("FlvDemux","destroy")}dispatch(e){this.flvDemux(e)}*_inputFlv(){yield 9;const e=new ArrayBuffer(4),i=new Uint8Array(e),d=new Uint32Array(e),b=this.player;for(;;){i[3]=0;const l=yield 15,p=l[4];i[0]=l[7],i[1]=l[6],i[2]=l[5];const t=d[0];i[0]=l[10],i[1]=l[9],i[2]=l[8];let a=d[0];a===16777215&&(i[3]=l[11],a=d[0]);const n=yield t;switch(p){case Aa:b._opt.hasAudio&&(b.updateStats({abps:n.byteLength}),n.byteLength>0&&this._doDecode(n,Ai,a));break;case da:if(b._times.demuxStart||(b._times.demuxStart=Wt()),b._opt.hasVideo){b.updateStats({vbps:n.byteLength});const s=n[0]>>4==1;if(n.byteLength>0){d[0]=n[4],d[1]=n[3],d[2]=n[2],d[3]=0;const h=d[0];this._doDecode(n,yi,a,s,h)}}}}}dispatchFlvData(e){let i=e.next(),d=null;return b=>{let l=new Uint8Array(b);if(d){const p=new Uint8Array(d.length+l.length);p.set(d),p.set(l,d.length),l=p,d=null}for(;l.length>=i.value;){const p=l.slice(i.value);i=e.next(l.slice(0,i.value)),l=p}l.length>0&&(d=l)}}close(){var e,i;(e=this.input)===null||e===void 0||(i=e.return)===null||i===void 0||i.call(e,null)}}class wa extends Zr{constructor(e){super(e),e.debug.log("M7sDemux","init")}destroy(){super.destroy(),this.player.debug.log("M7sDemux","destroy"),this.player=null}dispatch(e){const i=this.player,d=new DataView(e),b=d.getUint8(0),l=d.getUint32(1,!1);switch(b){case Ai:if(i._opt.hasAudio){const p=new Uint8Array(e,5);i.updateStats({abps:p.byteLength}),p.byteLength>0&&this._doDecode(p,b,l)}break;case yi:if(i._opt.hasVideo)if(i._times.demuxStart||(i._times.demuxStart=Wt()),d.byteLength>5){const p=new Uint8Array(e,5),t=d.getUint8(5)>>4==1;i.updateStats({vbps:p.byteLength}),p.byteLength>0&&this._doDecode(p,b,l,t)}else this.player.debug.warn("M7sDemux","dispatch","dv byteLength is",d.byteLength)}}}class Nn{constructor(e){return new(Nn.getLoaderFactory(e._opt.demuxType))(e)}static getLoaderFactory(e){return e===Dr?wa:e===Rn?Ca:void 0}}const Vn=()=>typeof navigator<"u"&&parseFloat((""+(/CPU.*OS ([0-9_]{3,4})[0-9_]{0,1}|(CPU like).*AppleWebKit.*Mobile/i.exec(navigator.userAgent)||[0,""])[1]).replace("undefined","3_2").replace("_",".").replace("_",""))<10&&!window.MSStream,jn=()=>"wakeLock"in navigator;class ka{constructor(e){if(this.player=e,this.enabled=!1,jn()){this._wakeLock=null;const i=()=>{this._wakeLock!==null&&document.visibilityState==="visible"&&this.enable()};document.addEventListener("visibilitychange",i),document.addEventListener("fullscreenchange",i)}else Vn()?this.noSleepTimer=null:(this.noSleepVideo=document.createElement("video"),this.noSleepVideo.setAttribute("title","No Sleep"),this.noSleepVideo.setAttribute("playsinline",""),this._addSourceToVideo(this.noSleepVideo,"webm","data:video/webm;base64,GkXfowEAAAAAAAAfQoaBAUL3gQFC8oEEQvOBCEKChHdlYm1Ch4EEQoWBAhhTgGcBAAAAAAAVkhFNm3RALE27i1OrhBVJqWZTrIHfTbuMU6uEFlSua1OsggEwTbuMU6uEHFO7a1OsghV17AEAAAAAAACkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVSalmAQAAAAAAAEUq17GDD0JATYCNTGF2ZjU1LjMzLjEwMFdBjUxhdmY1NS4zMy4xMDBzpJBlrrXf3DCDVB8KcgbMpcr+RImIQJBgAAAAAAAWVK5rAQAAAAAAD++uAQAAAAAAADLXgQFzxYEBnIEAIrWcg3VuZIaFVl9WUDiDgQEj44OEAmJaAOABAAAAAAAABrCBsLqBkK4BAAAAAAAPq9eBAnPFgQKcgQAitZyDdW5khohBX1ZPUkJJU4OBAuEBAAAAAAAAEZ+BArWIQOdwAAAAAABiZIEgY6JPbwIeVgF2b3JiaXMAAAAAAoC7AAAAAAAAgLUBAAAAAAC4AQN2b3JiaXMtAAAAWGlwaC5PcmcgbGliVm9yYmlzIEkgMjAxMDExMDEgKFNjaGF1ZmVudWdnZXQpAQAAABUAAABlbmNvZGVyPUxhdmM1NS41Mi4xMDIBBXZvcmJpcyVCQ1YBAEAAACRzGCpGpXMWhBAaQlAZ4xxCzmvsGUJMEYIcMkxbyyVzkCGkoEKIWyiB0JBVAABAAACHQXgUhIpBCCGEJT1YkoMnPQghhIg5eBSEaUEIIYQQQgghhBBCCCGERTlokoMnQQgdhOMwOAyD5Tj4HIRFOVgQgydB6CCED0K4moOsOQghhCQ1SFCDBjnoHITCLCiKgsQwuBaEBDUojILkMMjUgwtCiJqDSTX4GoRnQXgWhGlBCCGEJEFIkIMGQcgYhEZBWJKDBjm4FITLQagahCo5CB+EIDRkFQCQAACgoiiKoigKEBqyCgDIAAAQQFEUx3EcyZEcybEcCwgNWQUAAAEACAAAoEiKpEiO5EiSJFmSJVmSJVmS5omqLMuyLMuyLMsyEBqyCgBIAABQUQxFcRQHCA1ZBQBkAAAIoDiKpViKpWiK54iOCISGrAIAgAAABAAAEDRDUzxHlETPVFXXtm3btm3btm3btm3btm1blmUZCA1ZBQBAAAAQ0mlmqQaIMAMZBkJDVgEACAAAgBGKMMSA0JBVAABAAACAGEoOogmtOd+c46BZDppKsTkdnEi1eZKbirk555xzzsnmnDHOOeecopxZDJoJrTnnnMSgWQqaCa0555wnsXnQmiqtOeeccc7pYJwRxjnnnCateZCajbU555wFrWmOmkuxOeecSLl5UptLtTnnnHPOOeecc84555zqxekcnBPOOeecqL25lpvQxTnnnE/G6d6cEM4555xzzjnnnHPOOeecIDRkFQAABABAEIaNYdwpCNLnaCBGEWIaMulB9+gwCRqDnELq0ehopJQ6CCWVcVJKJwgNWQUAAAIAQAghhRRSSCGFFFJIIYUUYoghhhhyyimnoIJKKqmooowyyyyzzDLLLLPMOuyssw47DDHEEEMrrcRSU2011lhr7jnnmoO0VlprrbVSSimllFIKQkNWAQAgAAAEQgYZZJBRSCGFFGKIKaeccgoqqIDQkFUAACAAgAAAAABP8hzRER3RER3RER3RER3R8RzPESVREiVREi3TMjXTU0VVdWXXlnVZt31b2IVd933d933d+HVhWJZlWZZlWZZlWZZlWZZlWZYgNGQVAAACAAAghBBCSCGFFFJIKcYYc8w56CSUEAgNWQUAAAIACAAAAHAUR3EcyZEcSbIkS9IkzdIsT/M0TxM9URRF0zRV0RVdUTdtUTZl0zVdUzZdVVZtV5ZtW7Z125dl2/d93/d93/d93/d93/d9XQdCQ1YBABIAADqSIymSIimS4ziOJElAaMgqAEAGAEAAAIriKI7jOJIkSZIlaZJneZaomZrpmZ4qqkBoyCoAABAAQAAAAAAAAIqmeIqpeIqoeI7oiJJomZaoqZoryqbsuq7ruq7ruq7ruq7ruq7ruq7ruq7ruq7ruq7ruq7ruq7ruq4LhIasAgAkAAB0JEdyJEdSJEVSJEdygNCQVQCADACAAAAcwzEkRXIsy9I0T/M0TxM90RM901NFV3SB0JBVAAAgAIAAAAAAAAAMybAUy9EcTRIl1VItVVMt1VJF1VNVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVN0zRNEwgNWQkAkAEAkBBTLS3GmgmLJGLSaqugYwxS7KWxSCpntbfKMYUYtV4ah5RREHupJGOKQcwtpNApJq3WVEKFFKSYYyoVUg5SIDRkhQAQmgHgcBxAsixAsiwAAAAAAAAAkDQN0DwPsDQPAAAAAAAAACRNAyxPAzTPAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABA0jRA8zxA8zwAAAAAAAAA0DwP8DwR8EQRAAAAAAAAACzPAzTRAzxRBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABA0jRA8zxA8zwAAAAAAAAAsDwP8EQR0DwRAAAAAAAAACzPAzxRBDzRAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAEOAAABBgIRQasiIAiBMAcEgSJAmSBM0DSJYFTYOmwTQBkmVB06BpME0AAAAAAAAAAAAAJE2DpkHTIIoASdOgadA0iCIAAAAAAAAAAAAAkqZB06BpEEWApGnQNGgaRBEAAAAAAAAAAAAAzzQhihBFmCbAM02IIkQRpgkAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAGHAAAAgwoQwUGrIiAIgTAHA4imUBAIDjOJYFAACO41gWAABYliWKAABgWZooAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAYcAAACDChDBQashIAiAIAcCiKZQHHsSzgOJYFJMmyAJYF0DyApgFEEQAIAAAocAAACLBBU2JxgEJDVgIAUQAABsWxLE0TRZKkaZoniiRJ0zxPFGma53meacLzPM80IYqiaJoQRVE0TZimaaoqME1VFQAAUOAAABBgg6bE4gCFhqwEAEICAByKYlma5nmeJ4qmqZokSdM8TxRF0TRNU1VJkqZ5niiKommapqqyLE3zPFEURdNUVVWFpnmeKIqiaaqq6sLzPE8URdE0VdV14XmeJ4qiaJqq6roQRVE0TdNUTVV1XSCKpmmaqqqqrgtETxRNU1Vd13WB54miaaqqq7ouEE3TVFVVdV1ZBpimaaqq68oyQFVV1XVdV5YBqqqqruu6sgxQVdd1XVmWZQCu67qyLMsCAAAOHAAAAoygk4wqi7DRhAsPQKEhKwKAKAAAwBimFFPKMCYhpBAaxiSEFEImJaXSUqogpFJSKRWEVEoqJaOUUmopVRBSKamUCkIqJZVSAADYgQMA2IGFUGjISgAgDwCAMEYpxhhzTiKkFGPOOScRUoox55yTSjHmnHPOSSkZc8w556SUzjnnnHNSSuacc845KaVzzjnnnJRSSuecc05KKSWEzkEnpZTSOeecEwAAVOAAABBgo8jmBCNBhYasBABSAQAMjmNZmuZ5omialiRpmud5niiapiZJmuZ5nieKqsnzPE8URdE0VZXneZ4oiqJpqirXFUXTNE1VVV2yLIqmaZqq6rowTdNUVdd1XZimaaqq67oubFtVVdV1ZRm2raqq6rqyDFzXdWXZloEsu67s2rIAAPAEBwCgAhtWRzgpGgssNGQlAJABAEAYg5BCCCFlEEIKIYSUUggJAAAYcAAACDChDBQashIASAUAAIyx1lprrbXWQGettdZaa62AzFprrbXWWmuttdZaa6211lJrrbXWWmuttdZaa6211lprrbXWWmuttdZaa6211lprrbXWWmuttdZaa6211lprrbXWWmstpZRSSimllFJKKaWUUkoppZRSSgUA+lU4APg/2LA6wknRWGChISsBgHAAAMAYpRhzDEIppVQIMeacdFRai7FCiDHnJKTUWmzFc85BKCGV1mIsnnMOQikpxVZjUSmEUlJKLbZYi0qho5JSSq3VWIwxqaTWWoutxmKMSSm01FqLMRYjbE2ptdhqq7EYY2sqLbQYY4zFCF9kbC2m2moNxggjWywt1VprMMYY3VuLpbaaizE++NpSLDHWXAAAd4MDAESCjTOsJJ0VjgYXGrISAAgJACAQUooxxhhzzjnnpFKMOeaccw5CCKFUijHGnHMOQgghlIwx5pxzEEIIIYRSSsaccxBCCCGEkFLqnHMQQgghhBBKKZ1zDkIIIYQQQimlgxBCCCGEEEoopaQUQgghhBBCCKmklEIIIYRSQighlZRSCCGEEEIpJaSUUgohhFJCCKGElFJKKYUQQgillJJSSimlEkoJJYQSUikppRRKCCGUUkpKKaVUSgmhhBJKKSWllFJKIYQQSikFAAAcOAAABBhBJxlVFmGjCRcegEJDVgIAZAAAkKKUUiktRYIipRikGEtGFXNQWoqocgxSzalSziDmJJaIMYSUk1Qy5hRCDELqHHVMKQYtlRhCxhik2HJLoXMOAAAAQQCAgJAAAAMEBTMAwOAA4XMQdAIERxsAgCBEZohEw0JweFAJEBFTAUBigkIuAFRYXKRdXECXAS7o4q4DIQQhCEEsDqCABByccMMTb3jCDU7QKSp1IAAAAAAADADwAACQXAAREdHMYWRobHB0eHyAhIiMkAgAAAAAABcAfAAAJCVAREQ0cxgZGhscHR4fICEiIyQBAIAAAgAAAAAggAAEBAQAAAAAAAIAAAAEBB9DtnUBAAAAAAAEPueBAKOFggAAgACjzoEAA4BwBwCdASqwAJAAAEcIhYWIhYSIAgIABhwJ7kPfbJyHvtk5D32ych77ZOQ99snIe+2TkPfbJyHvtk5D32ych77ZOQ99YAD+/6tQgKOFggADgAqjhYIAD4AOo4WCACSADqOZgQArADECAAEQEAAYABhYL/QACIBDmAYAAKOFggA6gA6jhYIAT4AOo5mBAFMAMQIAARAQABgAGFgv9AAIgEOYBgAAo4WCAGSADqOFggB6gA6jmYEAewAxAgABEBAAGAAYWC/0AAiAQ5gGAACjhYIAj4AOo5mBAKMAMQIAARAQABgAGFgv9AAIgEOYBgAAo4WCAKSADqOFggC6gA6jmYEAywAxAgABEBAAGAAYWC/0AAiAQ5gGAACjhYIAz4AOo4WCAOSADqOZgQDzADECAAEQEAAYABhYL/QACIBDmAYAAKOFggD6gA6jhYIBD4AOo5iBARsAEQIAARAQFGAAYWC/0AAiAQ5gGACjhYIBJIAOo4WCATqADqOZgQFDADECAAEQEAAYABhYL/QACIBDmAYAAKOFggFPgA6jhYIBZIAOo5mBAWsAMQIAARAQABgAGFgv9AAIgEOYBgAAo4WCAXqADqOFggGPgA6jmYEBkwAxAgABEBAAGAAYWC/0AAiAQ5gGAACjhYIBpIAOo4WCAbqADqOZgQG7ADECAAEQEAAYABhYL/QACIBDmAYAAKOFggHPgA6jmYEB4wAxAgABEBAAGAAYWC/0AAiAQ5gGAACjhYIB5IAOo4WCAfqADqOZgQILADECAAEQEAAYABhYL/QACIBDmAYAAKOFggIPgA6jhYICJIAOo5mBAjMAMQIAARAQABgAGFgv9AAIgEOYBgAAo4WCAjqADqOFggJPgA6jmYECWwAxAgABEBAAGAAYWC/0AAiAQ5gGAACjhYICZIAOo4WCAnqADqOZgQKDADECAAEQEAAYABhYL/QACIBDmAYAAKOFggKPgA6jhYICpIAOo5mBAqsAMQIAARAQABgAGFgv9AAIgEOYBgAAo4WCArqADqOFggLPgA6jmIEC0wARAgABEBAUYABhYL/QACIBDmAYAKOFggLkgA6jhYIC+oAOo5mBAvsAMQIAARAQABgAGFgv9AAIgEOYBgAAo4WCAw+ADqOZgQMjADECAAEQEAAYABhYL/QACIBDmAYAAKOFggMkgA6jhYIDOoAOo5mBA0sAMQIAARAQABgAGFgv9AAIgEOYBgAAo4WCA0+ADqOFggNkgA6jmYEDcwAxAgABEBAAGAAYWC/0AAiAQ5gGAACjhYIDeoAOo4WCA4+ADqOZgQObADECAAEQEAAYABhYL/QACIBDmAYAAKOFggOkgA6jhYIDuoAOo5mBA8MAMQIAARAQABgAGFgv9AAIgEOYBgAAo4WCA8+ADqOFggPkgA6jhYID+oAOo4WCBA+ADhxTu2sBAAAAAAAAEbuPs4EDt4r3gQHxghEr8IEK"),this._addSourceToVideo(this.noSleepVideo,"mp4","data:video/mp4;base64,AAAAHGZ0eXBNNFYgAAACAGlzb21pc28yYXZjMQAAAAhmcmVlAAAGF21kYXTeBAAAbGliZmFhYyAxLjI4AABCAJMgBDIARwAAArEGBf//rdxF6b3m2Ui3lizYINkj7u94MjY0IC0gY29yZSAxNDIgcjIgOTU2YzhkOCAtIEguMjY0L01QRUctNCBBVkMgY29kZWMgLSBDb3B5bGVmdCAyMDAzLTIwMTQgLSBodHRwOi8vd3d3LnZpZGVvbGFuLm9yZy94MjY0Lmh0bWwgLSBvcHRpb25zOiBjYWJhYz0wIHJlZj0zIGRlYmxvY2s9MTowOjAgYW5hbHlzZT0weDE6MHgxMTEgbWU9aGV4IHN1Ym1lPTcgcHN5PTEgcHN5X3JkPTEuMDA6MC4wMCBtaXhlZF9yZWY9MSBtZV9yYW5nZT0xNiBjaHJvbWFfbWU9MSB0cmVsbGlzPTEgOHg4ZGN0PTAgY3FtPTAgZGVhZHpvbmU9MjEsMTEgZmFzdF9wc2tpcD0xIGNocm9tYV9xcF9vZmZzZXQ9LTIgdGhyZWFkcz02IGxvb2thaGVhZF90aHJlYWRzPTEgc2xpY2VkX3RocmVhZHM9MCBucj0wIGRlY2ltYXRlPTEgaW50ZXJsYWNlZD0wIGJsdXJheV9jb21wYXQ9MCBjb25zdHJhaW5lZF9pbnRyYT0wIGJmcmFtZXM9MCB3ZWlnaHRwPTAga2V5aW50PTI1MCBrZXlpbnRfbWluPTI1IHNjZW5lY3V0PTQwIGludHJhX3JlZnJlc2g9MCByY19sb29rYWhlYWQ9NDAgcmM9Y3JmIG1idHJlZT0xIGNyZj0yMy4wIHFjb21wPTAuNjAgcXBtaW49MCBxcG1heD02OSBxcHN0ZXA9NCB2YnZfbWF4cmF0ZT03NjggdmJ2X2J1ZnNpemU9MzAwMCBjcmZfbWF4PTAuMCBuYWxfaHJkPW5vbmUgZmlsbGVyPTAgaXBfcmF0aW89MS40MCBhcT0xOjEuMDAAgAAAAFZliIQL8mKAAKvMnJycnJycnJycnXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXiEASZACGQAjgCEASZACGQAjgAAAAAdBmjgX4GSAIQBJkAIZACOAAAAAB0GaVAX4GSAhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZpgL8DJIQBJkAIZACOAIQBJkAIZACOAAAAABkGagC/AySEASZACGQAjgAAAAAZBmqAvwMkhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZrAL8DJIQBJkAIZACOAAAAABkGa4C/AySEASZACGQAjgCEASZACGQAjgAAAAAZBmwAvwMkhAEmQAhkAI4AAAAAGQZsgL8DJIQBJkAIZACOAIQBJkAIZACOAAAAABkGbQC/AySEASZACGQAjgCEASZACGQAjgAAAAAZBm2AvwMkhAEmQAhkAI4AAAAAGQZuAL8DJIQBJkAIZACOAIQBJkAIZACOAAAAABkGboC/AySEASZACGQAjgAAAAAZBm8AvwMkhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZvgL8DJIQBJkAIZACOAAAAABkGaAC/AySEASZACGQAjgCEASZACGQAjgAAAAAZBmiAvwMkhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZpAL8DJIQBJkAIZACOAAAAABkGaYC/AySEASZACGQAjgCEASZACGQAjgAAAAAZBmoAvwMkhAEmQAhkAI4AAAAAGQZqgL8DJIQBJkAIZACOAIQBJkAIZACOAAAAABkGawC/AySEASZACGQAjgAAAAAZBmuAvwMkhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZsAL8DJIQBJkAIZACOAAAAABkGbIC/AySEASZACGQAjgCEASZACGQAjgAAAAAZBm0AvwMkhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZtgL8DJIQBJkAIZACOAAAAABkGbgCvAySEASZACGQAjgCEASZACGQAjgAAAAAZBm6AnwMkhAEmQAhkAI4AhAEmQAhkAI4AhAEmQAhkAI4AhAEmQAhkAI4AAAAhubW9vdgAAAGxtdmhkAAAAAAAAAAAAAAAAAAAD6AAABDcAAQAAAQAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAzB0cmFrAAAAXHRraGQAAAADAAAAAAAAAAAAAAABAAAAAAAAA+kAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAALAAAACQAAAAAAAkZWR0cwAAABxlbHN0AAAAAAAAAAEAAAPpAAAAAAABAAAAAAKobWRpYQAAACBtZGhkAAAAAAAAAAAAAAAAAAB1MAAAdU5VxAAAAAAALWhkbHIAAAAAAAAAAHZpZGUAAAAAAAAAAAAAAABWaWRlb0hhbmRsZXIAAAACU21pbmYAAAAUdm1oZAAAAAEAAAAAAAAAAAAAACRkaW5mAAAAHGRyZWYAAAAAAAAAAQAAAAx1cmwgAAAAAQAAAhNzdGJsAAAAr3N0c2QAAAAAAAAAAQAAAJ9hdmMxAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAALAAkABIAAAASAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGP//AAAALWF2Y0MBQsAN/+EAFWdCwA3ZAsTsBEAAAPpAADqYA8UKkgEABWjLg8sgAAAAHHV1aWRraEDyXyRPxbo5pRvPAyPzAAAAAAAAABhzdHRzAAAAAAAAAAEAAAAeAAAD6QAAABRzdHNzAAAAAAAAAAEAAAABAAAAHHN0c2MAAAAAAAAAAQAAAAEAAAABAAAAAQAAAIxzdHN6AAAAAAAAAAAAAAAeAAADDwAAAAsAAAALAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAAiHN0Y28AAAAAAAAAHgAAAEYAAANnAAADewAAA5gAAAO0AAADxwAAA+MAAAP2AAAEEgAABCUAAARBAAAEXQAABHAAAASMAAAEnwAABLsAAATOAAAE6gAABQYAAAUZAAAFNQAABUgAAAVkAAAFdwAABZMAAAWmAAAFwgAABd4AAAXxAAAGDQAABGh0cmFrAAAAXHRraGQAAAADAAAAAAAAAAAAAAACAAAAAAAABDcAAAAAAAAAAAAAAAEBAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAkZWR0cwAAABxlbHN0AAAAAAAAAAEAAAQkAAADcAABAAAAAAPgbWRpYQAAACBtZGhkAAAAAAAAAAAAAAAAAAC7gAAAykBVxAAAAAAALWhkbHIAAAAAAAAAAHNvdW4AAAAAAAAAAAAAAABTb3VuZEhhbmRsZXIAAAADi21pbmYAAAAQc21oZAAAAAAAAAAAAAAAJGRpbmYAAAAcZHJlZgAAAAAAAAABAAAADHVybCAAAAABAAADT3N0YmwAAABnc3RzZAAAAAAAAAABAAAAV21wNGEAAAAAAAAAAQAAAAAAAAAAAAIAEAAAAAC7gAAAAAAAM2VzZHMAAAAAA4CAgCIAAgAEgICAFEAVBbjYAAu4AAAADcoFgICAAhGQBoCAgAECAAAAIHN0dHMAAAAAAAAAAgAAADIAAAQAAAAAAQAAAkAAAAFUc3RzYwAAAAAAAAAbAAAAAQAAAAEAAAABAAAAAgAAAAIAAAABAAAAAwAAAAEAAAABAAAABAAAAAIAAAABAAAABgAAAAEAAAABAAAABwAAAAIAAAABAAAACAAAAAEAAAABAAAACQAAAAIAAAABAAAACgAAAAEAAAABAAAACwAAAAIAAAABAAAADQAAAAEAAAABAAAADgAAAAIAAAABAAAADwAAAAEAAAABAAAAEAAAAAIAAAABAAAAEQAAAAEAAAABAAAAEgAAAAIAAAABAAAAFAAAAAEAAAABAAAAFQAAAAIAAAABAAAAFgAAAAEAAAABAAAAFwAAAAIAAAABAAAAGAAAAAEAAAABAAAAGQAAAAIAAAABAAAAGgAAAAEAAAABAAAAGwAAAAIAAAABAAAAHQAAAAEAAAABAAAAHgAAAAIAAAABAAAAHwAAAAQAAAABAAAA4HN0c3oAAAAAAAAAAAAAADMAAAAaAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAACMc3RjbwAAAAAAAAAfAAAALAAAA1UAAANyAAADhgAAA6IAAAO+AAAD0QAAA+0AAAQAAAAEHAAABC8AAARLAAAEZwAABHoAAASWAAAEqQAABMUAAATYAAAE9AAABRAAAAUjAAAFPwAABVIAAAVuAAAFgQAABZ0AAAWwAAAFzAAABegAAAX7AAAGFwAAAGJ1ZHRhAAAAWm1ldGEAAAAAAAAAIWhkbHIAAAAAAAAAAG1kaXJhcHBsAAAAAAAAAAAAAAAALWlsc3QAAAAlqXRvbwAAAB1kYXRhAAAAAQAAAABMYXZmNTUuMzMuMTAw"),this.noSleepVideo.addEventListener("loadedmetadata",()=>{this.noSleepVideo.duration<=1?this.noSleepVideo.setAttribute("loop",""):this.noSleepVideo.addEventListener("timeupdate",()=>{this.noSleepVideo.currentTime>.5&&(this.noSleepVideo.currentTime=Math.random())})}))}_addSourceToVideo(e,i,d){const b=document.createElement("source");b.src=d,b.type=`video/${i}`,e.appendChild(b)}get isEnabled(){return this.enabled}enable(){const e=this.player.debug;return jn()?navigator.wakeLock.request("screen").then(i=>{this._wakeLock=i,this.enabled=!0,e.log("wakeLock","Wake Lock active."),this._wakeLock.addEventListener("release",()=>{e.log("wakeLock","Wake Lock released.")})}).catch(i=>{throw this.enabled=!1,e.error("wakeLock",`${i.name}, ${i.message}`),i}):Vn()?(this.disable(),this.noSleepTimer=window.setInterval(()=>{document.hidden||(window.location.href=window.location.href.split("#")[0],window.setTimeout(window.stop,0))},15e3),this.enabled=!0,Promise.resolve()):this.noSleepVideo.play().then(i=>(this.enabled=!0,i)).catch(i=>{throw this.enabled=!1,i})}disable(){const e=this.player.debug;jn()?(this._wakeLock&&this._wakeLock.release(),this._wakeLock=null):Vn()?this.noSleepTimer&&(e.warn("wakeLock","NoSleep now disabled for older iOS devices."),window.clearInterval(this.noSleepTimer),this.noSleepTimer=null):this.noSleepVideo.pause(),this.enabled=!1}}var Ta={info:"",log:"background: #4096ff; color: #FFF;",warn:"background: yellow; color: #FFF;",error:"background: red; color: #FFF;"},Jr=function(){function u(i){i===void 0&&(i={}),this._options={level:"INFO",showTime:!1},this._levelNum=3,this.info=this._loggerFactory("info",this._levelNum>=3),this.log=this._loggerFactory("log",this._levelNum>=2),this.warn=this._loggerFactory("warn",this._levelNum>=1),this.error=this._loggerFactory("error",this._levelNum>=0),this.setOptions(i)}var e=u.prototype;return e.setOptions=function(i){var d;this._options=Object.assign({},this._options,i),this._levelNum=this._matchLevel((d=this._options.level)!=null?d:"INFO"),this.info=this._loggerFactory("info",this._levelNum>=3),this.log=this._loggerFactory("log",this._levelNum>=2),this.warn=this._loggerFactory("warn",this._levelNum>=1),this.error=this._loggerFactory("error",this._levelNum>=0)},e._matchLevel=function(i){var d=3;switch(i){case"INFO":d=3;break;case"LOG":d=2;break;case"WARN":d=1;break;case"ERROR":d=0}return d},e._loggerFactory=function(i,d){var b=console[i];if(d&&b){var l,p=this._options.name?"%c["+this._options.name+"]%c %c["+i.toUpperCase()+"]":"%c["+i.toUpperCase()+"]",t=[this._options.name?"background: green;color: #fff":null,this._options.name?"":null,Ta[i]].filter(function(a){return a!=null});return(l=b).bind.apply(l,[].concat([console,p],t))}return u.noop},e.getOptions=function(){return this._options},e.getVersion=function(){return"1.0.1"},u}();function Ri(u){return(u=+u)<10&&(u="0"+u),u+""}Jr.noop=function(){};var La=["info","log","warn","error"];function Ba(u){var e=new Jr(u);return new Proxy(e,{get:function(i,d){if(La.includes(d)){var b;if((b=i._options)!=null&&b.showTime){var l=(t=(p=new Date(Date.now())).getFullYear(),a=p.getMonth()+1,n=p.getDate(),s=p.getHours(),h=p.getMinutes(),E=p.getSeconds(),v=p.getMilliseconds(),t+"/"+Ri(a)+"/"+Ri(n)+" "+Ri(s)+":"+Ri(h)+":"+Ri(E)+":"+v);return i[d].bind(console,"["+l+"]")}return i[d].bind(console)}var p,t,a,n,s,h,E,v;return Reflect.get(i,d)}})}class Ia{constructor(e){this.master=e,this.logger=new Ba({name:"FLV",showTime:!0})}info(e,...i){this._setLogger()>=4&&this.logger.log(e,...i)}log(e,...i){this._setLogger()>=3&&this.logger.log(e,...i)}warn(e,...i){this._setLogger()>=2&&this.logger.warn(e,...i)}error(e,...i){this.logger.error(e,...i)}_setLogger(){var e,i,d,b,l;return this.master._opt.debug&&(!((e=this.master._opt.loggerOptions)===null||e===void 0)&&e.level)?((i=this.master._opt.loggerOptions)===null||i===void 0?void 0:i.level)==="INFO"?4:((d=this.master._opt.loggerOptions)===null||d===void 0?void 0:d.level)==="LOG"?3:((b=this.master._opt.loggerOptions)===null||b===void 0?void 0:b.level)==="WARN"?2:((l=this.master._opt.loggerOptions)===null||l===void 0?void 0:l.level)==="ERROR"?1:5:-1}}class Gn{constructor(e){this.destroys=[],this.proxy=this.proxy.bind(this),this.master=e}proxy(e,i,d){let b=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};if(!e)return;if(Array.isArray(i))return i.map(p=>this.proxy(e,p,d,b));e.addEventListener(i,d,b);const l=()=>e.removeEventListener(i,d,b);return this.destroys.push(l),l}destroy(){var e;(e=this.master.debug)===null||e===void 0||e.log("Events","destroy"),this.destroys.forEach(i=>i())}}var Oa=u=>{const{events:{proxy:e}}=u,i=document.createElement("object");i.setAttribute("aria-hidden","true"),i.setAttribute("tabindex","-1"),i.type="text/html",i.data="about:blank",zr(i,{display:"block",position:"absolute",top:"0",left:"0",height:"100%",width:"100%",overflow:"hidden",pointerEvents:"none",zIndex:"-1"});let d=u.width,b=u.height;e(i,"load",()=>{var l;e((l=i.contentDocument)===null||l===void 0?void 0:l.defaultView,"resize",()=>{u.width===d&&u.height===b||(d=u.width,b=u.height,u.emit(te.resize))})}),u.$container.appendChild(i),u.on(te.destroy,()=>{u.$container.removeChild(i)})};class xa{constructor(e){this.player=e,Oa(e)}}class eo extends xi{constructor(e,i,d){var b;super(),this.$container=e,this._opt=i,this.debug=new Ia(this),this._muted=i.muted,this._volume=i.volume||.8,this._loading=!1,this._playing=!1,this._hasLoaded=!1,this._checkHeartTimeout=null,this._checkStatsInterval=null,this._startBpsTime=null,this._isPlayingBeforePageHidden=!1,this._stats={buf:0,fps:0,abps:0,vbps:0,ts:0},this._times={playInitStart:"",playStart:"",streamStart:"",streamResponse:"",demuxStart:"",decodeStart:"",videoStart:"",playTimestamp:"",streamTimestamp:"",streamResponseTimestamp:"",demuxTimestamp:"",decodeTimestamp:"",videoTimestamp:"",allTimestamp:""},this._videoTimestamp=0,this._audioTimestamp=0,b=this,Object.defineProperty(b,"rect",{get:()=>b.$container.getBoundingClientRect()}),["bottom","height","left","right","top","width"].forEach(l=>{Object.defineProperty(b,l,{get:()=>b.rect[l]})}),this.events=new Gn(this),this.video=new d(this),(l=>{l.on(te.decoderWorkerInit,()=>{l.debug.log("player","has loaded"),l.loaded=!0}),l.on(te.play,()=>{l.loading=!1}),l.on(te.resize,()=>{var t;(t=l.video)===null||t===void 0||t.resize()});const p=[te.timeUpdate];Object.keys(te).forEach(t=>{l.on(te[t],a=>{p.includes(t)||(typeof a!="object"||Object.prototype.toString.call(a)!=="[object Object]"?l.debug.log("player events",te[t],a):l.debug.log("player events",te[t],JSON.stringify(a)))})}),Object.keys(vt).forEach(t=>{l.on(vt[t],a=>{l.debug.log("player event error",vt[t],a)})})})(this),(l=>{const{_opt:p,debug:t,events:{proxy:a}}=l;a(document,"visibilitychange",()=>{p.hiddenAutoPause&&(t.log("visibilitychange",document.visibilityState,l._isPlayingBeforePageHidden),document.visibilityState==="visible"?l._isPlayingBeforePageHidden&&l.play():(l._isPlayingBeforePageHidden=l.playing,l.playing&&l.pause()))}),a(window,"fullscreenchange",()=>{l.keepScreenOn!==null&&document.visibilityState==="visible"&&l.enableWakeLock&&l.enableWakeLock()})})(this),this._fullscreen=!1,this.control=new xa(this)}get muted(){return this._muted}set muted(e){this._updateMuted(e)}_updateMuted(e){this._muted!==e&&(this._muted=e,this.emit(te.volumechange,this.volume,e))}get volume(){return this._volume}set volume(e){this._updateVolume(e)}_updateVolume(e){e>=0&&e<=1&&this._volume!==e&&(this.emit(te.volumechange,e,this._muted),this._volume=e)}destroy(){this._loading=!1,this._playing=!1,this._hasLoaded=!1,this._volume=null,this._times={playInitStart:"",playStart:"",streamStart:"",streamResponse:"",demuxStart:"",decodeStart:"",videoStart:"",playTimestamp:"",streamTimestamp:"",streamResponseTimestamp:"",demuxTimestamp:"",decodeTimestamp:"",videoTimestamp:"",allTimestamp:""},this.video&&(this.video.destroy(),this.video=null),this.events&&(this.events.destroy(),this.events=null),this.emit("destroy"),this.off(),this.debug.log("play","destroy end")}updateOption(e){this._opt=Object.assign({},this._opt,e)}resize(){this.video.resize()}}var Ei,qt,Ht,to,Ra=(Ei=typeof self<"u"?self:window,qt={navigator:Ei.navigator!==void 0?Ei.navigator:{userAgent:""},infoMap:{engine:["WebKit","Trident","Gecko","Presto"],browser:["Safari","Chrome","Edge","IE","Firefox","Firefox Focus","Chromium","Opera","Vivaldi","Yandex","Arora","Lunascape","QupZilla","Coc Coc","Kindle","Iceweasel","Konqueror","Iceape","SeaMonkey","Epiphany","360","360SE","360EE","UC","QQBrowser","QQ","Baidu","Maxthon","Sogou","LBBROWSER","2345Explorer","TheWorld","XiaoMi","Quark","Qiyu","Wechat","Taobao","Alipay","Weibo","Douban","Suning","iQiYi"],os:["Windows","Linux","Mac OS","Android","Ubuntu","FreeBSD","Debian","iOS","Windows Phone","BlackBerry","MeeGo","Symbian","Chrome OS","WebOS"],device:["Mobile","Tablet","iPad"]}},Ht={getMatchMap:function(u){return{Trident:u.indexOf("Trident")>-1||u.indexOf("NET CLR")>-1,Presto:u.indexOf("Presto")>-1,WebKit:u.indexOf("AppleWebKit")>-1,Gecko:u.indexOf("Gecko/")>-1,Safari:u.indexOf("Safari")>-1,Chrome:u.indexOf("Chrome")>-1||u.indexOf("CriOS")>-1,IE:u.indexOf("MSIE")>-1||u.indexOf("Trident")>-1,Edge:u.indexOf("Edge")>-1,Firefox:u.indexOf("Firefox")>-1||u.indexOf("FxiOS")>-1,"Firefox Focus":u.indexOf("Focus")>-1,Chromium:u.indexOf("Chromium")>-1,Opera:u.indexOf("Opera")>-1||u.indexOf("OPR")>-1,Vivaldi:u.indexOf("Vivaldi")>-1,Yandex:u.indexOf("YaBrowser")>-1,Arora:u.indexOf("Arora")>-1,Lunascape:u.indexOf("Lunascape")>-1,QupZilla:u.indexOf("QupZilla")>-1,"Coc Coc":u.indexOf("coc_coc_browser")>-1,Kindle:u.indexOf("Kindle")>-1||u.indexOf("Silk/")>-1,Iceweasel:u.indexOf("Iceweasel")>-1,Konqueror:u.indexOf("Konqueror")>-1,Iceape:u.indexOf("Iceape")>-1,SeaMonkey:u.indexOf("SeaMonkey")>-1,Epiphany:u.indexOf("Epiphany")>-1,360:u.indexOf("QihooBrowser")>-1||u.indexOf("QHBrowser")>-1,"360EE":u.indexOf("360EE")>-1,"360SE":u.indexOf("360SE")>-1,UC:u.indexOf("UC")>-1||u.indexOf(" UBrowser")>-1,QQBrowser:u.indexOf("QQBrowser")>-1,QQ:u.indexOf("QQ/")>-1,Baidu:u.indexOf("Baidu")>-1||u.indexOf("BIDUBrowser")>-1,Maxthon:u.indexOf("Maxthon")>-1,Sogou:u.indexOf("MetaSr")>-1||u.indexOf("Sogou")>-1,LBBROWSER:u.indexOf("LBBROWSER")>-1,"2345Explorer":u.indexOf("2345Explorer")>-1,TheWorld:u.indexOf("TheWorld")>-1,XiaoMi:u.indexOf("MiuiBrowser")>-1,Quark:u.indexOf("Quark")>-1,Qiyu:u.indexOf("Qiyu")>-1,Wechat:u.indexOf("MicroMessenger")>-1,Taobao:u.indexOf("AliApp(TB")>-1,Alipay:u.indexOf("AliApp(AP")>-1,Weibo:u.indexOf("Weibo")>-1,Douban:u.indexOf("com.douban.frodo")>-1,Suning:u.indexOf("SNEBUY-APP")>-1,iQiYi:u.indexOf("IqiyiApp")>-1,Windows:u.indexOf("Windows")>-1,Linux:u.indexOf("Linux")>-1||u.indexOf("X11")>-1,"Mac OS":u.indexOf("Macintosh")>-1,Android:u.indexOf("Android")>-1||u.indexOf("Adr")>-1,Ubuntu:u.indexOf("Ubuntu")>-1,FreeBSD:u.indexOf("FreeBSD")>-1,Debian:u.indexOf("Debian")>-1,"Windows Phone":u.indexOf("IEMobile")>-1||u.indexOf("Windows Phone")>-1,BlackBerry:u.indexOf("BlackBerry")>-1||u.indexOf("RIM")>-1,MeeGo:u.indexOf("MeeGo")>-1,Symbian:u.indexOf("Symbian")>-1,iOS:u.indexOf("like Mac OS X")>-1,"Chrome OS":u.indexOf("CrOS")>-1,WebOS:u.indexOf("hpwOS")>-1,Mobile:u.indexOf("Mobi")>-1||u.indexOf("iPh")>-1||u.indexOf("480")>-1,Tablet:u.indexOf("Tablet")>-1||u.indexOf("Nexus 7")>-1,iPad:u.indexOf("iPad")>-1}},matchInfoMap:function(u){var e,i=((e=qt.navigator)==null?void 0:e.userAgent)||"",d=Ht.getMatchMap(i);for(var b in qt.infoMap)for(var l=0;l<qt.infoMap[b].length;l++){var p=qt.infoMap[b][l];d[p]&&(u[b]=p)}},getOS:function(){var u=this;return Ht.matchInfoMap(u),u==null?void 0:u.os},getOSVersion:function(){var u=this,e=qt.navigator.userAgent||"";u.osVersion="";var i={Windows:function(){var d=e.replace(/^.*Windows NT ([\d.]+);.*$/,"$1");return{6.4:"10",6.3:"8.1",6.2:"8",6.1:"7","6.0":"Vista",5.2:"XP",5.1:"XP","5.0":"2000"}[d]||d},Android:function(){return e.replace(/^.*Android ([\d.]+);.*$/,"$1")},iOS:function(){return e.replace(/^.*OS ([\d_]+) like.*$/,"$1").replace(/_/g,".")},Debian:function(){return e.replace(/^.*Debian\/([\d.]+).*$/,"$1")},"Windows Phone":function(){return e.replace(/^.*Windows Phone( OS)? ([\d.]+);.*$/,"$2")},"Mac OS":function(){return e.replace(/^.*Mac OS X ([\d_]+).*$/,"$1").replace(/_/g,".")},WebOS:function(){return e.replace(/^.*hpwOS\/([\d.]+);.*$/,"$1")}};return typeof i[u.os]=="function"&&(u.osVersion=i[u.os](),u.osVersion==e&&(u.osVersion="")),u.osVersion},getOrientationStatu:function(){return window.matchMedia("(orientation: portrait)").matches?"vertical":"horizontal"},getDeviceType:function(){var u=this;return u.device="PC",Ht.matchInfoMap(u),u.device},getNetwork:function(){var u,e,i,d;return(u=((e=navigator)==null?void 0:e.connection)||((i=navigator)==null?void 0:i.mozConnection)||((d=navigator)==null?void 0:d.webkitConnection))==null?void 0:u.effectiveType},getLanguage:function(){var u,e,i;return this.language=((i=(((u=qt.navigator)==null?void 0:u.browserLanguage)||((e=qt.navigator)==null?void 0:e.language)).split("-"))[1]&&(i[1]=i[1].toUpperCase()),i.join("_")),this.language},createFingerprint:function(u){var e=document.createElement("canvas"),i=e.getContext("2d"),d=u||window.location.host;i.textBaseline="top",i.font="14px 'Arial'",i.fillStyle="#f60",i.fillRect(125,1,62,20),i.fillStyle="#069",i.fillText(d,2,15),i.fillStyle="rgba(102, 204, 0, 0.7)",i.fillText(d,4,17);var b=e.toDataURL().replace("data:image/png;base64,","");return function(l){var p,t,a,n="";for(p=0,t=(l+="").length;p<t;p++)n+=(a=l.charCodeAt(p).toString(16)).length<2?"0"+a:a;return n}(atob(b).slice(-16,-12))},getBrowserInfo:function(){var u=this;Ht.matchInfoMap(u);var e=qt.navigator.userAgent||"",i=function(t,a){var n=qt.navigator.mimeTypes;for(var s in n)if(n[s][t]==a)return!0;return!1},d=Ht.getMatchMap(e),b=!1;if(Ei.chrome){var l=e.replace(/^.*Chrome\/([\d]+).*$/,"$1");+l>36&&Ei.showModalDialog?b=!0:+l>45&&(b=i("type","application/vnd.chromium.remoting-viewer"))}if(d.Baidu&&d.Opera&&(d.Baidu=!1),d.Mobile&&(d.Mobile=!e.includes("iPad")),b&&(i("type","application/gameplugin")||qt.navigator&&qt.navigator.connection.saveData===void 0?d["360SE"]=!0:d["360EE"]=!0),d.IE||d.Edge)switch(window.screenTop-window.screenY){case 71:case 74:case 99:case 75:case 105:break;case 102:d["360EE"]=!0;break;case 104:d["360SE"]=!0}var p={Safari:function(){return e.replace(/^.*Version\/([\d.]+).*$/,"$1")},Chrome:function(){return e.replace(/^.*Chrome\/([\d.]+).*$/,"$1").replace(/^.*CriOS\/([\d.]+).*$/,"$1")},IE:function(){return e.replace(/^.*MSIE ([\d.]+).*$/,"$1").replace(/^.*rv:([\d.]+).*$/,"$1")},Edge:function(){return e.replace(/^.*Edge\/([\d.]+).*$/,"$1")},Firefox:function(){return e.replace(/^.*Firefox\/([\d.]+).*$/,"$1").replace(/^.*FxiOS\/([\d.]+).*$/,"$1")},"Firefox Focus":function(){return e.replace(/^.*Focus\/([\d.]+).*$/,"$1")},Chromium:function(){return e.replace(/^.*Chromium\/([\d.]+).*$/,"$1")},Opera:function(){return e.replace(/^.*Opera\/([\d.]+).*$/,"$1").replace(/^.*OPR\/([\d.]+).*$/,"$1")},Vivaldi:function(){return e.replace(/^.*Vivaldi\/([\d.]+).*$/,"$1")},Yandex:function(){return e.replace(/^.*YaBrowser\/([\d.]+).*$/,"$1")},Arora:function(){return e.replace(/^.*Arora\/([\d.]+).*$/,"$1")},Lunascape:function(){return e.replace(/^.*Lunascape[\/\s]([\d.]+).*$/,"$1")},QupZilla:function(){return e.replace(/^.*QupZilla[\/\s]([\d.]+).*$/,"$1")},"Coc Coc":function(){return e.replace(/^.*coc_coc_browser\/([\d.]+).*$/,"$1")},Kindle:function(){return e.replace(/^.*Version\/([\d.]+).*$/,"$1")},Iceweasel:function(){return e.replace(/^.*Iceweasel\/([\d.]+).*$/,"$1")},Konqueror:function(){return e.replace(/^.*Konqueror\/([\d.]+).*$/,"$1")},Iceape:function(){return e.replace(/^.*Iceape\/([\d.]+).*$/,"$1")},SeaMonkey:function(){return e.replace(/^.*SeaMonkey\/([\d.]+).*$/,"$1")},Epiphany:function(){return e.replace(/^.*Epiphany\/([\d.]+).*$/,"$1")},360:function(){return e.replace(/^.*QihooBrowser\/([\d.]+).*$/,"$1")},"360SE":function(){return{63:"10.0",55:"9.1",45:"8.1",42:"8.0",31:"7.0",21:"6.3"}[+e.replace(/^.*Chrome\/([\d]+).*$/,"$1")]||""},"360EE":function(){return{69:"11.0",63:"9.5",55:"9.0",50:"8.7",30:"7.5"}[+e.replace(/^.*Chrome\/([\d]+).*$/,"$1")]||""},Maxthon:function(){return e.replace(/^.*Maxthon\/([\d.]+).*$/,"$1")},QQBrowser:function(){return e.replace(/^.*QQBrowser\/([\d.]+).*$/,"$1")},QQ:function(){return e.replace(/^.*QQ\/([\d.]+).*$/,"$1")},Baidu:function(){return e.replace(/^.*BIDUBrowser[\s\/]([\d.]+).*$/,"$1")},UC:function(){return e.replace(/^.*UC?Browser\/([\d.]+).*$/,"$1")},Sogou:function(){return e.replace(/^.*SE ([\d.X]+).*$/,"$1").replace(/^.*SogouMobileBrowser\/([\d.]+).*$/,"$1")},LBBROWSER:function(){return{57:"6.5",49:"6.0",46:"5.9",42:"5.3",39:"5.2",34:"5.0",29:"4.5",21:"4.0"}[+navigator.userAgent.replace(/^.*Chrome\/([\d]+).*$/,"$1")]||""},"2345Explorer":function(){return e.replace(/^.*2345Explorer\/([\d.]+).*$/,"$1")},TheWorld:function(){return e.replace(/^.*TheWorld ([\d.]+).*$/,"$1")},XiaoMi:function(){return e.replace(/^.*MiuiBrowser\/([\d.]+).*$/,"$1")},Quark:function(){return e.replace(/^.*Quark\/([\d.]+).*$/,"$1")},Qiyu:function(){return e.replace(/^.*Qiyu\/([\d.]+).*$/,"$1")},Wechat:function(){return e.replace(/^.*MicroMessenger\/([\d.]+).*$/,"$1")},Taobao:function(){return e.replace(/^.*AliApp\(TB\/([\d.]+).*$/,"$1")},Alipay:function(){return e.replace(/^.*AliApp\(AP\/([\d.]+).*$/,"$1")},Weibo:function(){return e.replace(/^.*weibo__([\d.]+).*$/,"$1")},Douban:function(){return e.replace(/^.*com.douban.frodo\/([\d.]+).*$/,"$1")},Suning:function(){return e.replace(/^.*SNEBUY-APP([\d.]+).*$/,"$1")},iQiYi:function(){return e.replace(/^.*IqiyiVersion\/([\d.]+).*$/,"$1")}};return u.browserVersion="",p[u.browser]&&(u.browserVersion=p[u.browser](),u.browserVersion==e&&(u.browserVersion="")),u.browser=="Edge"&&(u.engine="EdgeHTML"),u.browser=="Chrome"&&parseInt(u.browserVersion)>27&&(u.engine="Blink"),u.browser=="Opera"&&parseInt(u.browserVersion)>12&&(u.engine="Blink"),u.browser=="Yandex"&&(u.engine="Blink"),u.browser+" (version: "+u.browserVersion+"; kernel: "+u.engine+")"}},to={DeviceInfoObj:function(u){var e,i=function(p){var t;(t=u.info)==null||t.forEach(function(a){a.toLowerCase()===p.toLowerCase()&&(b[p]=d[p])})};u=u||{domain:""};var d={deviceType:Ht.getDeviceType(),OS:Ht.getOS(),OSVersion:Ht.getOSVersion(),sh:Ei.screen.height,sw:Ei.screen.width,lang:Ht.getLanguage(),netWork:Ht.getNetwork(),orientation:Ht.getOrientationStatu(),browserInfo:Ht.getBrowserInfo(),fingerprint:Ht.createFingerprint(u.domain),userAgent:(e=qt.navigator)==null?void 0:e.userAgent};if(!u.info||u.info.length===0)return d;var b={};for(var l in d)i(l);return b}},{getDeviceInfo:function(u){return to.DeviceInfoObj(u)}}),ki=function(){function u(){}return u.add=function(e,i){u.queues.push({url:e,data:i})},u.fire=function(){if(u.queues&&u.queues.length!==0){u.isStop=!1;var e=u.queues[0];e.url&&u.api.report(e.data),u.queues.splice(0,1),u.fire()}else u.isStop=!0},u}();ki.isStop=!0,ki.queues=[];var Da=function(){function u(i){this.url=i}var e=u.prototype;return e.report=function(i){this.checkUrl(this.url)&&this.sendInfo(i)},e.sendInfo=function(i){navigator.sendBeacon?this.sendBeacon(this.url,i):this.sendImage(this.url,i)},e.sendImage=function(i,d){var b=this.changeJSON2Query(d),l=new Image;l.onload=l.onerror=function(){l=null},l.src=i+"?"+b+"&random="+Math.random()},e.sendBeacon=function(i,d){try{navigator.sendBeacon(i,this.formatParamsByURLSearchParams(d))}catch{}},e.formatParamsByURLSearchParams=function(i){var d=new URLSearchParams;for(var b in i)typeof i[b]=="object"&&(i[b]=JSON.stringify(i[b])),d.append(b,i[b]);return d},e.changeJSON2Query=function(i){var d="";for(var b in i){d!=""&&(d+="&");var l=i[b];d+=b+"="+encodeURIComponent(typeof l=="object"?JSON.stringify(l):l)}return d},e.checkUrl=function(i){return!!i&&/^[hH][tT][tT][pP]([sS]?):\/\//.test(i)},u}();function Di(){return Di=Object.assign||function(u){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var d in i)Object.prototype.hasOwnProperty.call(i,d)&&(u[d]=i[d])}return u},Di.apply(this,arguments)}var Ma=function(){function u(i){this.options=i,this.extendsInfo=i.extendsInfo||{},this.clientInfo=this._getDeviceInfo(),ki.api=new Da(i.url)}var e=u.prototype;return e.send=function(i){return this.options.forbidden||typeof i!="object"||(this._handleRecordError(i),ki.isStop&&ki.fire()),this},e.setForbidden=function(i){this.options.forbidden=i},e.updateExtendsInfo=function(i){i===void 0&&(i={}),this.extendsInfo=Di({},this.extendsInfo||{},i)},e._handleRecordError=function(i){try{var d=this._handleErrorInfo(i);ki.add(this.options.url,d)}catch{}},e._handleErrorInfo=function(i){var d=this._getExtendsInfo(),b=Di({st:new Date().getTime()},d,i);return b.clientInfo=this.clientInfo,b},e._getExtendsInfo=function(){try{var i,d={},b=this.extendsInfo||{};for(var l in typeof b.getDynamic=="function"&&(i=b.getDynamic()),Object.prototype.toString.call(i)==="[object Object]"&&(b=Di({},b,i)),b)typeof b[l]!="function"&&(d[l]=b[l]);return d}catch{return{}}},e._getDeviceInfo=function(){try{var i=Ra.getDeviceInfo();return JSON.stringify(i)}catch{return""}},u}();function io(u){if(/http[s]?:\/\/|ws[s]?:\/\//.test(u)){const e=u.split("?")[1],i=e?e.split("&"):[],d={};for(let b=0;b<i.length;++b){const[l,p]=i[b].split("=");d[l]=d[l]||decodeURIComponent(p)}try{const b=u.split(".flv")[0].split("/"),l=b[b.length-1].split("_");b.length>0&&l[0]&&l[1]&&l[2]&&(d.serial=l[0],d.no=l[1],d.bitstream=l[2])}catch{}return d}return{}}class at{static initMonitor(e){at.collect=new Ma({forbidden:e,url:"https://log.ys7.com/statistics.do/opensdk_ezuikit",jsError:!1,promiseError:!1,resourceError:!1,extendsInfo:{protocol:"flv",v:"2.0.2"}})}static report(e){let i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};at.collect||at.initMonitor();try{const d=io(at.url);at.collect.send({url:at.url,serial:d.serial,no:d.no,action:e,logInfo:i})}catch{}}}class Pa extends eo{constructor(e,i){super(e,i,ba),this._opt.useMSE=!1,this._loadingTimeoutDelayTimer=null,this._opt.hasAudio&&(this.audio=new zi(this)),this.decoderWorker=new Xr(this),this.stream=null,this.demux=null,this._muted=this._opt.muted,Wr()&&(this.keepScreenOn=new ka(this)),this._enableSoundOnUserInteraction=this._enableSoundOnUserInteraction.bind(this),window.addEventListener("click",this._enableSoundOnUserInteraction),window.addEventListener("pointerdown",this._enableSoundOnUserInteraction),window.addEventListener("touchstart",this._enableSoundOnUserInteraction),window.addEventListener("keydown",this._enableSoundOnUserInteraction),document.body.addEventListener("click",this._enableSoundOnUserInteraction),document.body.addEventListener("pointerdown",this._enableSoundOnUserInteraction),document.body.addEventListener("touchstart",this._enableSoundOnUserInteraction),document.body.addEventListener("keydown",this._enableSoundOnUserInteraction),this.on(te.audioInfo,d=>{var b;d.encType&&!this.muted&&(!((b=this.audio)===null||b===void 0)&&b.isStateRunning())&&setTimeout(()=>{var l,p;(p=(l=this.audio).audioEnabled)===null||p===void 0||p.call(l,!0)},100)})}destroy(){var e,i,d,b,l,p;this._loading=!1,this._playing=!1,this._hasLoaded=!1,this.decoderWorker&&(this.decoderWorker.destroy(),this.decoderWorker=null),this.audio&&((i=(e=this.audio).destroy)===null||i===void 0||i.call(e),this.audio=null),this.stream&&((b=(d=this.stream).destroy)===null||b===void 0||b.call(d),this.stream=null),this.demux&&((p=(l=this.demux)===null||l===void 0?void 0:l.destroy)===null||p===void 0||p.call(l),this.demux=null),this.clearCheckHeartTimeout(),this.clearCheckLoadingTimeout(),this.clearStatsInterval(),this.releaseWakeLock(),this.keepScreenOn=null,this.resetStats(),this._audioTimestamp=0,this._videoTimestamp=0,window.removeEventListener("click",this._enableSoundOnUserInteraction),window.removeEventListener("pointerdown",this._enableSoundOnUserInteraction),window.removeEventListener("touchstart",this._enableSoundOnUserInteraction),window.removeEventListener("keydown",this._enableSoundOnUserInteraction),document.body.removeEventListener("click",this._enableSoundOnUserInteraction),document.body.removeEventListener("pointerdown",this._enableSoundOnUserInteraction),document.body.removeEventListener("touchstart",this._enableSoundOnUserInteraction),document.body.removeEventListener("keydown",this._enableSoundOnUserInteraction),super.destroy()}set loaded(e){this._hasLoaded=e}get loaded(){return this._hasLoaded}set playing(e){e&&(this.loading=!1),this.playing!==e&&(this._playing=e,this.emit(te.playing,e),this.emit(te.volumechange,this.volume,this.muted),e?this.emit(te.play):this.emit(te.pause))}get playing(){return this._playing}get muted(){return this._muted}set muted(e){this.audio&&(this.audio.muted=e),super._updateMuted(e)}get volume(){return this._volume}set volume(e){this.audio&&(this.audio.volume=e),super._updateVolume(e)}set loading(e){this.loading!==e&&(this._loading=e,this.emit(te.loading,this._loading),e||this.emit(te.loaded))}get loading(){return this._loading}set audioTimestamp(e){e!==null&&(this._audioTimestamp=e)}get audioTimestamp(){return this._audioTimestamp}set videoTimestamp(e){e!==null&&(this._videoTimestamp=e,this._opt.useWCS||this._opt.useMSE||this.audioTimestamp&&this.videoTimestamp&&this.audio&&this.audio.emit(te.videoSyncAudio,{audioTimestamp:this.audioTimestamp,videoTimestamp:this.videoTimestamp,diff:this.audioTimestamp-this.videoTimestamp}))}get videoTimestamp(){return this._videoTimestamp}get isDebug(){return this._opt.debug===!0}_init(){return new Promise((e,i)=>{this.stream||(this.stream=new Fn(this)),this.audio||this._opt.hasAudio&&(this.audio=new zi(this)),this.demux||(this.demux=new Nn(this)),this.decoderWorker?e():(this.decoderWorker=new Xr(this),this.once(te.decoderWorkerInit,()=>{e()}))})}play(e){return this._opt=Object.assign({},this._opt,e||{}),this.clearCheckHeartTimeout(),new Promise((i,d)=>{if(!this._opt.url)return d();this.loading=!0,this.playing=!1,this._times.playInitStart=Wt(),this._init().then(()=>{this._times.playStart=Wt(),this._opt.muted||(this.muted=!1),this.enableWakeLock();try{this.stream.fetchStream(this._opt.url,this._opt)}catch{}this.checkLoadingTimeout(),this.stream.once(te.streamError,b=>{this.stream&&(this.stream.destroy(),this.stream=null),this.clearCheckLoadingTimeout(),this.emit(te.streamError,b),this.emit(te.delayTimeout,b),d(b)}),this.stream.once(te.streamEnd,()=>{d()}),this.stream.once(te.streamSuccess,()=>{this.clearCheckLoadingTimeout(),this.emit(te.streamSuccess),i(),this._times.streamResponse=Wt(),this.video.play(),this.checkStatsInterval()})}).catch(b=>{d(b)}),this._resumeAudioAfterPause()})}close(){return new Promise(e=>{this._close().then(()=>{var i,d;(d=(i=this.video)===null||i===void 0?void 0:i.clearView)===null||d===void 0||d.call(i),e()})})}_resumeAudioAfterPause(){this._volume&&(this.volume=this._volume)}_close(){return new Promise(e=>{var i,d;this._loadingTimeoutDelayTimer&&(clearTimeout(this._loadingTimeoutDelayTimer),this._loadingTimeoutDelayTimer=null),this.stream&&(this.stream.destroy(),this.stream=null),this.demux&&(this.demux.destroy(),this.demux=null),this.decoderWorker&&(this.decoderWorker.destroy(),this.decoderWorker=null),this.audio&&((d=(i=this.audio).pause)===null||d===void 0||d.call(i)),this.clearCheckHeartTimeout(),this.clearCheckLoadingTimeout(),this.clearStatsInterval(),this.playing=!1,this.loading=!1,this.video&&(this.video.resetInit(),this.video.pause(!0)),this.releaseWakeLock(),this.resetStats(),this._audioTimestamp=0,this._videoTimestamp=0,this._times={playInitStart:"",playStart:"",streamStart:"",streamResponse:"",demuxStart:"",decodeStart:"",videoStart:"",playTimestamp:"",streamTimestamp:"",streamResponseTimestamp:"",demuxTimestamp:"",decodeTimestamp:"",videoTimestamp:"",allTimestamp:""},setTimeout(()=>{e()},0)})}pause(e=!1){return e?this.close():this._close()}checkHeart(){this.clearCheckHeartTimeout(),this.checkHeartTimeout()}checkHeartTimeout(){var e;this._opt.heartTimeout!==0&&(this._checkHeartTimeout=setTimeout(()=>{if(this._checkHeartTimeout&&this.clearCheckHeartTimeout(),this.playing){if(this._stats.fps!==0)return;this.pause().then(()=>{this.emit(te.timeout,te.heartTimeout),this.emit(te.heartTimeout)})}},1e3*(((e=this._opt)===null||e===void 0?void 0:e.heartTimeout)||5)))}checkStatsInterval(){this._checkStatsInterval=setInterval(()=>{this.updateStats()},1e3)}clearCheckHeartTimeout(){this._checkHeartTimeout&&(clearTimeout(this._checkHeartTimeout),this._checkHeartTimeout=null)}checkLoadingTimeout(){this._opt.loadingTimeout!==0&&(this._checkLoadingTimeout=setTimeout(()=>{this.playing||(this.clearCheckLoadingTimeout(),this.pause().then(()=>{this.emit(te.timeout,te.loadingTimeout),this.emit(te.loadingTimeout)}).catch(()=>{}))},1e3*this._opt.loadingTimeout))}clearCheckLoadingTimeout(){this._checkLoadingTimeout&&(clearTimeout(this._checkLoadingTimeout),this._checkLoadingTimeout=null)}clearStatsInterval(){this._checkStatsInterval&&(clearInterval(this._checkStatsInterval),this._checkStatsInterval=null)}handleRender(){this.loading&&(this.emit(te.start),this.loading=!1),this.clearCheckLoadingTimeout(),this.playing||(this.playing=!0),this.checkHeart()}updateStats(e){e=e||{},this._startBpsTime||(this._startBpsTime=Wt()),Pn(e.ts)&&(this._stats.ts=e.ts),Pn(e.buf)&&(this._stats.buf=e.buf),e.fps&&(this._stats.fps+=1),e.abps&&(this._stats.abps+=e.abps),e.vbps&&(this._stats.vbps+=e.vbps);const i=Wt();i-this._startBpsTime<1e3||(this.emit(te.stats,this._stats),this._stats.fps=0,this._stats.abps=0,this._stats.vbps=0,this._startBpsTime=i)}resetStats(){this._startBpsTime=null,this._stats={buf:0,fps:0,abps:0,vbps:0,ts:0}}enableWakeLock(){this._opt.keepScreenOn&&this.keepScreenOn&&this.keepScreenOn.enable()}releaseWakeLock(){this._opt.keepScreenOn&&this.keepScreenOn&&this.keepScreenOn.disable()}handlePlayToRenderTimes(){const e=this._times;e.playTimestamp=e.playStart-e.playInitStart,e.streamTimestamp=e.streamStart-e.playStart,e.streamResponseTimestamp=e.streamResponse-e.streamStart,e.demuxTimestamp=e.demuxStart-e.streamResponse,e.decodeTimestamp=e.decodeStart-e.demuxStart,e.videoTimestamp=e.videoStart-e.decodeStart,e.allTimestamp=e.videoStart-e.playInitStart,this.emit(te.playToRenderTimes,e)}getOption(){return this._opt}emitError(e,i=""){at.report(51,{event:e,value:i}),this.emit(te.error,e,i),this.emit(e,i)}_enableSoundOnUserInteraction(){var e,i,d;this.muted||!((e=this.audio)===null||e===void 0)&&e.isStateSuspended()&&((d=(i=this.audio).audioEnabled)===null||d===void 0||d.call(i,!0))}}var no,ro={exports:{}},kt=(no||(no=1,function(u,e){(function(i,d){u.exports=d()})(self,()=>(()=>{var i={62:(l,p,t)=>{var a=t(1465)("span").classList,n=a&&a.constructor&&a.constructor.prototype;l.exports=n===Object.prototype?void 0:n},63:(l,p,t)=>{var a=t(4152);l.exports=function(n){return a(n)||n===null}},115:(l,p,t)=>{var a=t(815),n=t(4152),s=t(5727),h=t(452),E=t(6908),v=t(7553),S=TypeError,B=v("toPrimitive");l.exports=function(x,P){if(!n(x)||s(x))return x;var M,F=h(x,B);if(F){if(P===void 0&&(P="default"),M=a(F,x,P),!n(M)||s(M))return M;throw new S("Can't convert object to primitive value")}return P===void 0&&(P="number"),E(x,P)}},219:(l,p,t)=>{var a=t(2719),n=t(7024),s=t(256),h=function(E){return function(v,S,B){var x=a(v),P=s(x);if(P===0)return!E&&-1;var M,F=n(B,P);if(E&&S!=S){for(;P>F;)if((M=x[F++])!=M)return!0}else for(;P>F;F++)if((E||F in x)&&x[F]===S)return E||F||0;return!E&&-1}};l.exports={includes:h(!0),indexOf:h(!1)}},256:(l,p,t)=>{var a=t(2420);l.exports=function(n){return a(n.length)}},279:(l,p,t)=>{var a=t(815),n=t(5736),s=t(7749),h=t(4985),E=t(9273),v=TypeError;l.exports=function(S,B){var x=arguments.length<2?E(S):B;if(n(x))return s(a(x,S));throw new v(h(S)+" is not iterable")}},309:(l,p,t)=>{var a=t(9922),n=t(497);l.exports=a?{}.toString:function(){return"[object "+n(this)+"]"}},452:(l,p,t)=>{var a=t(5736),n=t(5599);l.exports=function(s,h){var E=s[h];return n(E)?void 0:a(E)}},458:(l,p,t)=>{var a=t(526),n=t(6458);l.exports=function(s){if(a(s)==="Function")return n(s)}},497:(l,p,t)=>{var a=t(9922),n=t(9211),s=t(526),h=t(7553)("toStringTag"),E=Object,v=s(function(){return arguments}())==="Arguments";l.exports=a?s:function(S){var B,x,P;return S===void 0?"Undefined":S===null?"Null":typeof(x=function(M,F){try{return M[F]}catch{}}(B=E(S),h))=="string"?x:v?s(B):(P=s(B))==="Object"&&n(B.callee)?"Arguments":P}},526:(l,p,t)=>{var a=t(6458),n=a({}.toString),s=a("".slice);l.exports=function(h){return s(n(h),8,-1)}},550:(l,p,t)=>{t.d(p,{A:()=>a});const a={IO_ERROR:"io_error",DEMUX_ERROR:"demux_error",INIT_SEGMENT:"init_segment",MEDIA_SEGMENT:"media_segment",LOADING_COMPLETE:"loading_complete",RECOVERED_EARLY_EOF:"recovered_early_eof",MEDIA_INFO:"media_info",METADATA_ARRIVED:"metadata_arrived",SCRIPTDATA_ARRIVED:"scriptdata_arrived",TIMED_ID3_METADATA_ARRIVED:"timed_id3_metadata_arrived",SMPTE2038_METADATA_ARRIVED:"smpte2038_metadata_arrived",SCTE35_METADATA_ARRIVED:"scte35_metadata_arrived",PES_PRIVATE_DATA_DESCRIPTOR:"pes_private_data_descriptor",PES_PRIVATE_DATA_ARRIVED:"pes_private_data_arrived",STATISTICS_INFO:"statistics_info",RECOMMEND_SEEKPOINT:"recommend_seekpoint"}},577:(l,p,t)=>{var a=t(3463),n=t(1002),s=a("keys");l.exports=function(h){return s[h]||(s[h]=n(h))}},594:l=>{var p=TypeError;l.exports=function(t,a){if(t<a)throw new p("Not enough arguments");return t}},605:(l,p,t)=>{var a=t(7553);p.f=a},648:(l,p,t)=>{t(2578),t(4579);var a=t(9364),n=t(1562),s=t(2363),h=t(5057),E=t(815),v=t(6458),S=t(9646),B=t(6666),x=t(3930),P=t(1176),M=t(8873),F=t(1541),G=t(7712),K=t(3587),H=t(2757),Z=t(9211),ie=t(4347),T=t(7042),m=t(497),g=t(7749),f=t(4152),O=t(6677),j=t(6122),Q=t(6330),ee=t(279),ue=t(9273),fe=t(1567),me=t(594),ge=t(7553),Oe=t(986),Ee=ge("iterator"),Be="URLSearchParams",De=Be+"Iterator",nt=K.set,Ke=K.getterFor(Be),We=K.getterFor(De),Me=s("fetch"),W=s("Request"),L=s("Headers"),U=W&&W.prototype,V=L&&L.prototype,X=n.TypeError,J=n.encodeURIComponent,le=String.fromCharCode,ce=h("String","fromCodePoint"),ye=parseInt,ae=v("".charAt),Ce=v([].join),pe=v([].push),Re=v("".replace),Et=v([].shift),ct=v([].splice),Se=v("".split),Ye=v("".slice),rt=v(/./.exec),zt=/\+/g,Je=/^[0-9a-f]+$/i,st=function(he,Te){var Ie=Ye(he,Te,Te+2);return rt(Je,Ie)?ye(Ie,16):NaN},bt=function(he){for(var Te=0,Ie=128;Ie>0&&he&Ie;Ie>>=1)Te++;return Te},Tt=function(he){var Te=null;switch(he.length){case 1:Te=he[0];break;case 2:Te=(31&he[0])<<6|63&he[1];break;case 3:Te=(15&he[0])<<12|(63&he[1])<<6|63&he[2];break;case 4:Te=(7&he[0])<<18|(63&he[1])<<12|(63&he[2])<<6|63&he[3]}return Te>1114111?null:Te},gt=function(he){for(var Te=(he=Re(he,zt," ")).length,Ie="",xe=0;xe<Te;){var ze=ae(he,xe);if(ze==="%"){if(ae(he,xe+1)==="%"||xe+3>Te){Ie+="%",xe++;continue}var it=st(he,xe+1);if(it!=it){Ie+=ze,xe++;continue}xe+=2;var ht=bt(it);if(ht===0)ze=le(it);else{if(ht===1||ht>4){Ie+="�",xe++;continue}for(var lt=[it],Rt=1;Rt<ht&&!(3+ ++xe>Te||ae(he,xe)!=="%");){var St=st(he,xe+1);if(St!=St){xe+=3;break}if(St>191||St<128)break;pe(lt,St),xe+=2,Rt++}if(lt.length!==ht){Ie+="�";continue}var jt=Tt(lt);jt===null?Ie+="�":ze=ce(jt)}}Ie+=ze,xe++}return Ie},Vt=/[!'()~]|%20/g,xt={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},Pt=function(he){return xt[he]},Kt=function(he){return Re(J(he),Vt,Pt)},ti=G(function(he,Te){nt(this,{type:De,target:Ke(he).entries,index:0,kind:Te})},Be,function(){var he=We(this),Te=he.target,Ie=he.index++;if(!Te||Ie>=Te.length)return he.target=null,fe(void 0,!0);var xe=Te[Ie];switch(he.kind){case"keys":return fe(xe.key,!1);case"values":return fe(xe.value,!1)}return fe([xe.key,xe.value],!1)},!0),$e=function(he){this.entries=[],this.url=null,he!==void 0&&(f(he)?this.parseObject(he):this.parseQuery(typeof he=="string"?ae(he,0)==="?"?Ye(he,1):he:O(he)))};$e.prototype={type:Be,bindURL:function(he){this.url=he,this.update()},parseObject:function(he){var Te,Ie,xe,ze,it,ht,lt,Rt=this.entries,St=ue(he);if(St)for(Ie=(Te=ee(he,St)).next;!(xe=E(Ie,Te)).done;){if(it=(ze=ee(g(xe.value))).next,(ht=E(it,ze)).done||(lt=E(it,ze)).done||!E(it,ze).done)throw new X("Expected sequence with length 2");pe(Rt,{key:O(ht.value),value:O(lt.value)})}else for(var jt in he)ie(he,jt)&&pe(Rt,{key:jt,value:O(he[jt])})},parseQuery:function(he){if(he)for(var Te,Ie,xe=this.entries,ze=Se(he,"&"),it=0;it<ze.length;)(Te=ze[it++]).length&&(Ie=Se(Te,"="),pe(xe,{key:gt(Et(Ie)),value:gt(Ce(Ie,"="))}))},serialize:function(){for(var he,Te=this.entries,Ie=[],xe=0;xe<Te.length;)he=Te[xe++],pe(Ie,Kt(he.key)+"="+Kt(he.value));return Ce(Ie,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var Ue=function(){H(this,Fe);var he=nt(this,new $e(arguments.length>0?arguments[0]:void 0));S||(this.size=he.entries.length)},Fe=Ue.prototype;if(M(Fe,{append:function(he,Te){var Ie=Ke(this);me(arguments.length,2),pe(Ie.entries,{key:O(he),value:O(Te)}),S||this.length++,Ie.updateURL()},delete:function(he){for(var Te=Ke(this),Ie=me(arguments.length,1),xe=Te.entries,ze=O(he),it=Ie<2?void 0:arguments[1],ht=it===void 0?it:O(it),lt=0;lt<xe.length;){var Rt=xe[lt];if(Rt.key!==ze||ht!==void 0&&Rt.value!==ht)lt++;else if(ct(xe,lt,1),ht!==void 0)break}S||(this.size=xe.length),Te.updateURL()},get:function(he){var Te=Ke(this).entries;me(arguments.length,1);for(var Ie=O(he),xe=0;xe<Te.length;xe++)if(Te[xe].key===Ie)return Te[xe].value;return null},getAll:function(he){var Te=Ke(this).entries;me(arguments.length,1);for(var Ie=O(he),xe=[],ze=0;ze<Te.length;ze++)Te[ze].key===Ie&&pe(xe,Te[ze].value);return xe},has:function(he){for(var Te=Ke(this).entries,Ie=me(arguments.length,1),xe=O(he),ze=Ie<2?void 0:arguments[1],it=ze===void 0?ze:O(ze),ht=0;ht<Te.length;){var lt=Te[ht++];if(lt.key===xe&&(it===void 0||lt.value===it))return!0}return!1},set:function(he,Te){var Ie=Ke(this);me(arguments.length,1);for(var xe,ze=Ie.entries,it=!1,ht=O(he),lt=O(Te),Rt=0;Rt<ze.length;Rt++)(xe=ze[Rt]).key===ht&&(it?ct(ze,Rt--,1):(it=!0,xe.value=lt));it||pe(ze,{key:ht,value:lt}),S||(this.size=ze.length),Ie.updateURL()},sort:function(){var he=Ke(this);Oe(he.entries,function(Te,Ie){return Te.key>Ie.key?1:-1}),he.updateURL()},forEach:function(he){for(var Te,Ie=Ke(this).entries,xe=T(he,arguments.length>1?arguments[1]:void 0),ze=0;ze<Ie.length;)xe((Te=Ie[ze++]).value,Te.key,this)},keys:function(){return new ti(this,"keys")},values:function(){return new ti(this,"values")},entries:function(){return new ti(this,"entries")}},{enumerable:!0}),x(Fe,Ee,Fe.entries,{name:"entries"}),x(Fe,"toString",function(){return Ke(this).serialize()},{enumerable:!0}),S&&P(Fe,"size",{get:function(){return Ke(this).entries.length},configurable:!0,enumerable:!0}),F(Ue,Be),a({global:!0,constructor:!0,forced:!B},{URLSearchParams:Ue}),!B&&Z(L)){var Xe=v(V.has),ut=v(V.set),si=function(he){if(f(he)){var Te,Ie=he.body;if(m(Ie)===Be)return Te=he.headers?new L(he.headers):new L,Xe(Te,"content-type")||ut(Te,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),j(he,{body:Q(0,O(Ie)),headers:Q(0,Te)})}return he};if(Z(Me)&&a({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(he){return Me(he,arguments.length>1?si(arguments[1]):{})}}),Z(W)){var Xt=function(he){return H(this,U),new W(he,arguments.length>1?si(arguments[1]):{})};U.constructor=Xt,Xt.prototype=U,a({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:Xt})}}l.exports={URLSearchParams:Ue,getState:Ke}},719:(l,p,t)=>{t.d(p,{A:()=>a});const a=function(){function n(){this.mimeType=null,this.duration=null,this.hasAudio=null,this.hasVideo=null,this.audioCodec=null,this.videoCodec=null,this.audioDataRate=null,this.videoDataRate=null,this.audioSampleRate=null,this.audioChannelCount=null,this.width=null,this.height=null,this.fps=null,this.profile=null,this.level=null,this.refFrames=null,this.chromaFormat=null,this.sarNum=null,this.sarDen=null,this.metadata=null,this.segments=null,this.segmentCount=null,this.hasKeyframesIndex=null,this.keyframesIndex=null}return n.prototype.isComplete=function(){return!this.hasAudio||this.hasAudio&&this.audioCodec!=null&&this.audioSampleRate!=null&&this.audioChannelCount,!this.hasVideo||this.hasVideo&&this.videoCodec!=null&&this.width!=null&&this.height!=null&&this.fps!=null&&this.profile!=null&&this.level!=null&&this.refFrames!=null&&this.chromaFormat!=null&&this.sarNum!=null&&this.sarDen,this.mimeType!=null},n.prototype.isSeekable=function(){return this.hasKeyframesIndex},n.prototype.getNearestKeyframe=function(s){if(this.keyframesIndex==null)return null;var h=this.keyframesIndex,E=this._search(h.times,s);return{index:E,milliseconds:h.times[E],fileposition:h.filepositions[E]}},n.prototype._search=function(s,h){var E=0,v=s.length-1,S=0,B=0,x=v;for(h<s[0]&&(E=0,B=x+1);B<=x;){if((S=B+Math.floor((x-B)/2))===v||h>=s[S]&&h<s[S+1]){E=S;break}s[S]<h?B=S+1:x=S-1}return E},n}()},730:(l,p,t)=>{var a=t(9364),n=t(815);a({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return n(URL.prototype.toString,this)}})},775:(l,p,t)=>{var a=t(9845),n=t(1562),s=t(4191),h="__core-js_shared__",E=l.exports=n[h]||s(h,{});(E.versions||(E.versions=[])).push({version:"3.40.0",mode:a?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.40.0/LICENSE",source:"https://github.com/zloirock/core-js"})},778:(l,p,t)=>{t(4220)},804:(l,p,t)=>{var a=t(9364),n=t(5057),s=t(4347),h=t(6677),E=t(3463),v=t(9266),S=E("string-to-symbol-registry"),B=E("symbol-to-string-registry");a({target:"Symbol",stat:!0,forced:!v},{for:function(x){var P=h(x);if(s(S,P))return S[P];var M=n("Symbol")(P);return S[P]=M,B[M]=P,M}})},815:(l,p,t)=>{var a=t(6898),n=Function.prototype.call;l.exports=a?n.bind(n):function(){return n.apply(n,arguments)}},834:(l,p,t)=>{t(6383)},947:(l,p,t)=>{var a=t(9364),n=t(7917),s=t(2809),h=t(7819),E=t(9083);a({target:"Object",stat:!0,forced:!n||s(function(){h.f(1)})},{getOwnPropertySymbols:function(v){var S=h.f;return S?S(E(v)):[]}})},986:(l,p,t)=>{var a=t(8626),n=Math.floor,s=function(h,E){var v=h.length;if(v<8)for(var S,B,x=1;x<v;){for(B=x,S=h[x];B&&E(h[B-1],S)>0;)h[B]=h[--B];B!==x++&&(h[B]=S)}else for(var P=n(v/2),M=s(a(h,0,P),E),F=s(a(h,P),E),G=M.length,K=F.length,H=0,Z=0;H<G||Z<K;)h[H+Z]=H<G&&Z<K?E(M[H],F[Z])<=0?M[H++]:F[Z++]:H<G?M[H++]:F[Z++];return h};l.exports=s},1002:(l,p,t)=>{var a=t(6458),n=0,s=Math.random(),h=a(1 .toString);l.exports=function(E){return"Symbol("+(E===void 0?"":E)+")_"+h(++n+s,36)}},1031:(l,p,t)=>{var a=t(7553),n=t(6122),s=t(3643).f,h=a("unscopables"),E=Array.prototype;E[h]===void 0&&s(E,h,{configurable:!0,value:n(null)}),l.exports=function(v){E[h][v]=!0}},1068:(l,p,t)=>{var a=t(63),n=String,s=TypeError;l.exports=function(h){if(a(h))return h;throw new s("Can't set "+n(h)+" as a prototype")}},1144:(l,p,t)=>{var a=t(815),n=t(4347),s=t(9615),h=t(7677),E=RegExp.prototype;l.exports=function(v){var S=v.flags;return S!==void 0||"flags"in E||n(v,"flags")||!s(E,v)?S:a(h,v)}},1147:(l,p,t)=>{var a,n,s,h=t(2809),E=t(9211),v=t(4152),S=t(6122),B=t(8125),x=t(3930),P=t(7553),M=t(9845),F=P("iterator"),G=!1;[].keys&&("next"in(s=[].keys())?(n=B(B(s)))!==Object.prototype&&(a=n):G=!0),!v(a)||h(function(){var K={};return a[F].call(K)!==K})?a={}:M&&(a=S(a)),E(a[F])||x(a,F,function(){return this}),l.exports={IteratorPrototype:a,BUGGY_SAFARI_ITERATORS:G}},1176:(l,p,t)=>{var a=t(4233),n=t(3643);l.exports=function(s,h,E){return E.get&&a(E.get,h,{getter:!0}),E.set&&a(E.set,h,{setter:!0}),n.f(s,h,E)}},1209:(l,p,t)=>{var a=t(5057),n=t(6458),s=t(2630),h=t(7819),E=t(7749),v=n([].concat);l.exports=a("Reflect","ownKeys")||function(S){var B=s.f(E(S)),x=h.f;return x?v(B,x(S)):B}},1432:(l,p,t)=>{var a=t(6458),n=t(5736);l.exports=function(s,h,E){try{return a(n(Object.getOwnPropertyDescriptor(s,h)[E]))}catch{}}},1454:(l,p,t)=>{t(648)},1464:(l,p,t)=>{var a=t(9364),n=t(4979).map;a({target:"Array",proto:!0,forced:!t(8611)("map")},{map:function(s){return n(this,s,arguments.length>1?arguments[1]:void 0)}})},1465:(l,p,t)=>{var a=t(1562),n=t(4152),s=a.document,h=n(s)&&n(s.createElement);l.exports=function(E){return h?s.createElement(E):{}}},1541:(l,p,t)=>{var a=t(3643).f,n=t(4347),s=t(7553)("toStringTag");l.exports=function(h,E,v){h&&!v&&(h=h.prototype),h&&!n(h,s)&&a(h,s,{configurable:!0,value:E})}},1562:function(l){var p=function(t){return t&&t.Math===Math&&t};l.exports=p(typeof globalThis=="object"&&globalThis)||p(typeof window=="object"&&window)||p(typeof self=="object"&&self)||p(typeof Ut=="object"&&Ut)||p(typeof this=="object"&&this)||function(){return this}()||Function("return this")()},1567:l=>{l.exports=function(p,t){return{value:p,done:t}}},1684:(l,p,t)=>{var a=t(5736),n=t(9083),s=t(5273),h=t(256),E=TypeError,v="Reduce of empty array with no initial value",S=function(B){return function(x,P,M,F){var G=n(x),K=s(G),H=h(G);if(a(P),H===0&&M<2)throw new E(v);var Z=B?H-1:0,ie=B?-1:1;if(M<2)for(;;){if(Z in K){F=K[Z],Z+=ie;break}if(Z+=ie,B?Z<0:H<=Z)throw new E(v)}for(;B?Z>=0:H>Z;Z+=ie)Z in K&&(F=P(F,K[Z],Z,G));return F}};l.exports={left:S(!1),right:S(!0)}},1766:(l,p,t)=>{var a=t(9364),n=t(4347),s=t(5727),h=t(4985),E=t(3463),v=t(9266),S=E("symbol-to-string-registry");a({target:"Symbol",stat:!0,forced:!v},{keyFor:function(B){if(!s(B))throw new TypeError(h(B)+" is not a symbol");if(n(S,B))return S[B]}})},1900:(l,p,t)=>{l.exports=t(2632).default},1951:(l,p,t)=>{t.d(p,{$_:()=>a,EX:()=>s,EZ:()=>n,Sc:()=>h});var a=function(E,v,S,B,x){this.dts=E,this.pts=v,this.duration=S,this.originalDts=B,this.isSyncPoint=x,this.fileposition=null},n=function(){function E(){this.beginDts=0,this.endDts=0,this.beginPts=0,this.endPts=0,this.originalBeginDts=0,this.originalEndDts=0,this.syncPoints=[],this.firstSample=null,this.lastSample=null}return E.prototype.appendSyncPoint=function(v){v.isSyncPoint=!0,this.syncPoints.push(v)},E}(),s=function(){function E(){this._list=[]}return E.prototype.clear=function(){this._list=[]},E.prototype.appendArray=function(v){var S=this._list;v.length!==0&&(S.length>0&&v[0].originalDts<S[S.length-1].originalDts&&this.clear(),Array.prototype.push.apply(S,v))},E.prototype.getLastSyncPointBeforeDts=function(v){if(this._list.length===0)return null;var S=this._list,B=0,x=S.length-1,P=0,M=0,F=x;for(v<S[0].dts&&(B=0,M=F+1);M<=F;){if((P=M+Math.floor((F-M)/2))===x||v>=S[P].dts&&v<S[P+1].dts){B=P;break}S[P].dts<v?M=P+1:F=P-1}return this._list[B]},E}(),h=function(){function E(v){this._type=v,this._list=[],this._lastAppendLocation=-1}return Object.defineProperty(E.prototype,"type",{get:function(){return this._type},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"length",{get:function(){return this._list.length},enumerable:!1,configurable:!0}),E.prototype.isEmpty=function(){return this._list.length===0},E.prototype.clear=function(){this._list=[],this._lastAppendLocation=-1},E.prototype._searchNearestSegmentBefore=function(v){var S,B=this._list;if(B.length===0)return-2;var x=B.length-1,P=0,M=0,F=x,G=0;if(v<B[0].originalBeginDts)return-1;for(;M<=F;){if((P=M+Math.floor((F-M)/2))===x||v>(((S=B[P].lastSample)===null||S===void 0?void 0:S.originalDts)||0)&&v<B[P+1].originalBeginDts){G=P;break}B[P].originalBeginDts<v?M=P+1:F=P-1}return G},E.prototype._searchNearestSegmentAfter=function(v){return this._searchNearestSegmentBefore(v)+1},E.prototype.append=function(v){var S,B,x=this._list,P=v,M=this._lastAppendLocation,F=0;M!==-1&&M<x.length&&P.originalBeginDts>=(((B=(S=x[M])===null||S===void 0?void 0:S.lastSample)===null||B===void 0?void 0:B.originalDts)||0)&&(M===x.length-1||M<x.length-1&&P.originalBeginDts<x[M+1].originalBeginDts)?F=M+1:x.length>0&&(F=this._searchNearestSegmentBefore(P.originalBeginDts)+1),this._lastAppendLocation=F,this._list.splice(F,0,P)},E.prototype.getLastSegmentBefore=function(v){var S=this._searchNearestSegmentBefore(v);return S>=0?this._list[S]:null},E.prototype.getLastSampleBefore=function(v){var S=this.getLastSegmentBefore(v);return S!=null?S.lastSample:null},E.prototype.getLastSyncPointBefore=function(v){for(var S=this._searchNearestSegmentBefore(v),B=this._list[S].syncPoints;B.length===0&&S>0;)S--,B=this._list[S].syncPoints;return B.length>0?B[B.length-1]:null},E}()},2139:(l,p,t)=>{t.d(p,{A:()=>a});const a=t(5307)},2250:(l,p,t)=>{var a=t(6458),n=t(3930),s=Date.prototype,h="Invalid Date",E="toString",v=a(s[E]),S=a(s.getTime);String(new Date(NaN))!==h&&n(s,E,function(){var B=S(this);return B==B?v(this):h})},2327:l=>{l.exports={}},2363:(l,p,t)=>{var a=t(1562),n=t(9646),s=Object.getOwnPropertyDescriptor;l.exports=function(h){if(!n)return a[h];var E=s(a,h);return E&&E.value}},2377:(l,p,t)=>{var a=t(4979).forEach,n=t(5888)("forEach");l.exports=n?[].forEach:function(s){return a(this,s,arguments.length>1?arguments[1]:void 0)}},2382:(l,p,t)=>{var a=t(9364),n=t(815),s=t(9845),h=t(6656),E=t(9211),v=t(7712),S=t(8125),B=t(6641),x=t(1541),P=t(9277),M=t(3930),F=t(7553),G=t(2327),K=t(1147),H=h.PROPER,Z=h.CONFIGURABLE,ie=K.IteratorPrototype,T=K.BUGGY_SAFARI_ITERATORS,m=F("iterator"),g="keys",f="values",O="entries",j=function(){return this};l.exports=function(Q,ee,ue,fe,me,ge,Oe){v(ue,ee,fe);var Ee,Be,De,nt=function(V){if(V===me&&L)return L;if(!T&&V&&V in Me)return Me[V];switch(V){case g:case f:case O:return function(){return new ue(this,V)}}return function(){return new ue(this)}},Ke=ee+" Iterator",We=!1,Me=Q.prototype,W=Me[m]||Me["@@iterator"]||me&&Me[me],L=!T&&W||nt(me),U=ee==="Array"&&Me.entries||W;if(U&&(Ee=S(U.call(new Q)))!==Object.prototype&&Ee.next&&(s||S(Ee)===ie||(B?B(Ee,ie):E(Ee[m])||M(Ee,m,j)),x(Ee,Ke,!0,!0),s&&(G[Ke]=j)),H&&me===f&&W&&W.name!==f&&(!s&&Z?P(Me,"name",f):(We=!0,L=function(){return n(W,this)})),me)if(Be={values:nt(f),keys:ge?L:nt(g),entries:nt(O)},Oe)for(De in Be)(T||We||!(De in Me))&&M(Me,De,Be[De]);else a({target:ee,proto:!0,forced:T||We},Be);return s&&!Oe||Me[m]===L||M(Me,m,L,{name:me}),G[ee]=L,Be}},2420:(l,p,t)=>{var a=t(4685),n=Math.min;l.exports=function(s){var h=a(s);return h>0?n(h,9007199254740991):0}},2460:(l,p,t)=>{t.d(p,{A:()=>n});var a=t(2139);const n=function(){function s(){}return s.e=function(h,E){var v;h&&!s.FORCE_GLOBAL_TAG||(h=s.GLOBAL_TAG);var S="[".concat(h,"] > ").concat(E);s.ENABLE_CALLBACK&&((v=s.emitter)===null||v===void 0||v.emit("log","error",S)),s.ENABLE_ERROR&&(console.error?console.error(S):console.warn?console.warn(S):console.log(S))},s.i=function(h,E){h&&!s.FORCE_GLOBAL_TAG||(h=s.GLOBAL_TAG);var v="[".concat(h,"] > ").concat(E);s.ENABLE_CALLBACK&&s.emitter.emit("log","info",v),s.ENABLE_INFO&&(console.info?console.info(v):console.log(v))},s.w=function(h,E){h&&!s.FORCE_GLOBAL_TAG||(h=s.GLOBAL_TAG);var v="[".concat(h,"] > ").concat(E);s.ENABLE_CALLBACK&&s.emitter.emit("log","warn",v),s.ENABLE_WARN&&(console.warn?console.warn(v):console.log(v))},s.d=function(h,E){var v;h&&!s.FORCE_GLOBAL_TAG||(h=s.GLOBAL_TAG);var S="[".concat(h,"] > ").concat(E);s.ENABLE_CALLBACK&&((v=s.emitter)===null||v===void 0||v.emit("log","debug",S)),s.ENABLE_DEBUG&&(console.debug?console.debug(S):console.log(S))},s.v=function(h,E){var v;h&&!s.FORCE_GLOBAL_TAG||(h=s.GLOBAL_TAG);var S="[".concat(h,"] > ").concat(E);s.ENABLE_CALLBACK&&((v=s.emitter)===null||v===void 0||v.emit("log","verbose",S)),s.ENABLE_VERBOSE&&console.log(S)},s.FORCE_GLOBAL_TAG=!1,s.GLOBAL_TAG="ezuikit-flv",s.ENABLE_CALLBACK=!1,s.emitter=new a.A,s.ENABLE_ERROR=!0,s.ENABLE_INFO=!0,s.ENABLE_WARN=!0,s.ENABLE_DEBUG=!0,s.ENABLE_VERBOSE=!0,s}()},2578:(l,p,t)=>{var a=t(2719),n=t(1031),s=t(2327),h=t(3587),E=t(3643).f,v=t(2382),S=t(1567),B=t(9845),x=t(9646),P="Array Iterator",M=h.set,F=h.getterFor(P);l.exports=v(Array,"Array",function(K,H){M(this,{type:P,target:a(K),index:0,kind:H})},function(){var K=F(this),H=K.target,Z=K.index++;if(!H||Z>=H.length)return K.target=null,S(void 0,!0);switch(K.kind){case"keys":return S(Z,!1);case"values":return S(H[Z],!1)}return S([Z,H[Z]],!1)},"values");var G=s.Arguments=s.Array;if(n("keys"),n("values"),n("entries"),!B&&x&&G.name!=="values")try{E(G,"name",{value:"values"})}catch{}},2630:(l,p,t)=>{var a=t(3430),n=t(6853).concat("length","prototype");p.f=Object.getOwnPropertyNames||function(s){return a(s,n)}},2632:(l,p,t)=>{t.d(p,{default:()=>Me});var a={h264:1,h265:2,h266:4,vp8:8,vp9:16,av1:32},n=t(8098),s={enableWorker:!1,enableStashBuffer:!0,stashInitialSize:void 0,isLive:!1,liveBufferLatencyChasing:!1,liveBufferLatencyMaxLatency:1.5,liveBufferLatencyMinRemain:.5,lazyLoad:!0,lazyLoadMaxDuration:180,lazyLoadRecoverDuration:30,deferLoadAfterSourceOpen:!0,autoCleanupMaxBackwardDuration:180,autoCleanupMinBackwardDuration:120,statisticsInfoReportInterval:600,fixAudioTimestampGap:!0,accurateSeek:!1,seekType:"range",seekParamStart:"bstart",seekParamEnd:"bend",rangeLoadZeroStart:!1,customSeekHandler:void 0,reuseRedirectedURL:!1,headers:void 0,customLoader:void 0,url:void 0,redirectedURL:void 0,cors:!1};function h(){return Object.assign({},s)}var E=function(){function W(){}return W.supportMSEH264Playback=function(){var L;return(L=window.MediaSource)===null||L===void 0?void 0:L.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"')},W.supportMSEH265Playback=function(){var L;return(L=window.MediaSource)===null||L===void 0?void 0:L.isTypeSupported('video/mp4; codecs="hvc1.1.6.L93.B0"')},W.supportNetworkStreamIO=function(){var L=new n.A({},h()),U=L.loaderType;return L.destroy(),U==="fetch-stream-loader"||U==="xhr-moz-chunked-loader"},W.getNetworkLoaderTypeName=function(){var L=new n.A({},h()),U=L.loaderType;return L.destroy(),U},W.supportNativeMediaPlayback=function(L){W.videoElement===void 0&&(W.videoElement=window.document.createElement("video"));var U=W.videoElement.canPlayType(L);return U==="probably"||U==="maybe"},W.getFeatureList=function(){var L={msePlayback:!1,mseLivePlayback:!1,mseH265Playback:!1,networkStreamIO:!1,networkLoaderName:"",nativeMP4H264Playback:!1,nativeMP4H265Playback:!1,nativeWebmVP8Playback:!1,nativeWebmVP9Playback:!1};return L.msePlayback=W.supportMSEH264Playback(),L.networkStreamIO=W.supportNetworkStreamIO(),L.networkLoaderName=W.getNetworkLoaderTypeName()||"",L.mseLivePlayback=L.msePlayback&&L.networkStreamIO,L.mseH265Playback=W.supportMSEH265Playback(),L.nativeMP4H264Playback=W.supportNativeMediaPlayback('video/mp4; codecs="avc1.42001E, mp4a.40.2"'),L.nativeMP4H265Playback=W.supportNativeMediaPlayback('video/mp4; codecs="hvc1.1.6.L93.B0"'),L.nativeWebmVP8Playback=W.supportNativeMediaPlayback('video/webm; codecs="vp8.0, vorbis"'),L.nativeWebmVP9Playback=W.supportNativeMediaPlayback('video/webm; codecs="vp9"'),L},W}();const v=E;var S=t(9034),B=t(2139),x=t(2460),P=t(8870);const M={ERROR:"error",LOADING_COMPLETE:"loading_complete",RECOVERED_EARLY_EOF:"recovered_early_eof",MEDIA_INFO:"media_info",METADATA_ARRIVED:"metadata_arrived",SCRIPTDATA_ARRIVED:"scriptdata_arrived",TIMED_ID3_METADATA_ARRIVED:"timed_id3_metadata_arrived",SMPTE2038_METADATA_ARRIVED:"smpte2038_metadata_arrived",SCTE35_METADATA_ARRIVED:"scte35_metadata_arrived",PES_PRIVATE_DATA_DESCRIPTOR:"pes_private_data_descriptor",PES_PRIVATE_DATA_ARRIVED:"pes_private_data_arrived",STATISTICS_INFO:"statistics_info",DESTROYING:"destroying"};t(6041),t(8845),t(6815),t(9688),t(5758),t(5347),t(2578),t(5336),t(1464),t(4742),t(2250),t(6033),t(3813),t(4659),t(3074),t(9917),t(3478),t(5597),t(6263),t(6810),t(6728),t(7958),t(834),t(8862),t(4879),t(778),t(730),t(1454);var F=function(){var W=ENTRY_MODULE,L={};function U(X){if(L[X])return L[X].exports;var J=L[X]={exports:{}};return W[X](J,J.exports,U),J.exports}U.m=W,U.n=function(X){var J=X&&X.__esModule?function(){return X.default}:function(){return X};return U.d(J,{a:J}),J},U.d=function(X,J){for(var le in J)U.o(J,le)&&!U.o(X,le)&&Object.defineProperty(X,le,{enumerable:!0,get:J[le]})},U.g=function(){if(Object.prototype.toString.call(globalThis)==="[object Object]")return globalThis;try{return this||new Function("return this")()}catch{if(Object.prototype.toString.call(window)==="[object Object]")return window}}(),U.o=function(X,J){return Object.prototype.hasOwnProperty.call(X,J)},U.r=function(X){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(X,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(X,"__esModule",{value:!0})};var V=U(ENTRY_MODULE);return V.default||V},G="[\\.|\\-|\\+|\\w|/|@]+",K="\\(\\s*(/\\*.*?\\*/)?\\s*.*?("+G+").*?\\)";function H(W){return(W+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function Z(W,L,U){var V={};V[U]=[];var X,J=L.toString(),le=J.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/)||J.match(/^\(\w+,\s*\w+,\s*(\w+)\)\s?\=\s?\>/);if(!le)return V;for(var ce,ye=le[1],ae=new RegExp("(\\\\n|\\W)"+H(ye)+K,"g");ce=ae.exec(J);)ce[3]!=="dll-reference"&&V[U].push(ce[3]);for(ae=new RegExp("\\("+H(ye)+'\\("(dll-reference\\s('+G+'))"\\)\\)'+K,"g");ce=ae.exec(J);)W[ce[2]]||(V[U].push(ce[1]),W[ce[2]]=t(ce[1]).m),V[ce[2]]=V[ce[2]]||[],V[ce[2]].push(ce[4]);for(var Ce=Object.keys(V),pe=0;pe<Ce.length;pe++)for(var Re=0;Re<V[Ce[pe]].length;Re++)X=V[Ce[pe]][Re],!isNaN(1*X)&&(V[Ce[pe]][Re]=1*V[Ce[pe]][Re]);return V}function ie(W){return Object.keys(W).reduce(function(L,U){return L||W[U].length>0},!1)}function T(W,L,U,V){var X=W[V].map(function(le){return'"'.concat(le,'": ').concat(L[V][le].toString())}).join(","),J=F.toString().split("ENTRY_MODULE");return"".concat(J[0],"{").concat(X,"}").concat(J[1],'"').concat(U,'"').concat(J[2])}var m=t(8635),g=t(9953),f=t(550),O=t(719);const j=function(){function W(L,U){if(this.TAG="Transmuxer",this._workerDestroying=!1,this._controller=null,this._emitter=new B.A,U.enableWorker&&typeof Worker<"u")try{this._worker=this._worker=function(X,J){J=J||{};var le={main:t.m},ce=J.all?{main:Object.keys(le.main)}:function(Re,Et){for(var ct={main:[7477]},Se={main:[]},Ye={main:{}};ie(ct);)for(var rt=Object.keys(ct),zt=0;zt<rt.length;zt++){var Je=rt[zt],st=ct[Je].pop();if(Ye[Je]=Ye[Je]||{},!Ye[Je][st]&&Re[Je][st]){Ye[Je][st]=!0,Se[Je]=Se[Je]||[],Se[Je].push(st);for(var bt=Z(Re,Re[Je][st],Je),Tt=Object.keys(bt),gt=0;gt<Tt.length;gt++)ct[Tt[gt]]=ct[Tt[gt]]||[],ct[Tt[gt]]=ct[Tt[gt]].concat(bt[Tt[gt]])}}return Se}(le),ye="";Object.keys(ce).filter(function(Re){return Re!=="main"}).forEach(function(Re){for(var Et=0;ce[Re][Et];)Et++;ce[Re].push(Et),le[Re][Et]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",ye+="var ".concat(Re," = (").concat(T(ce,le,Et,modules),`)();
  149. `)}),ye+="(".concat(T(ce,le,7477,"main"),")();");var ae=new window.Blob([ye],{type:"text/javascript"});if(J.bare)return ae;var Ce=(window.URL||window.webkitURL||window.mozURL||window.msURL).createObjectURL(ae),pe=new window.Worker(Ce);return pe.objectURL=Ce,pe}(),this._workerDestroying=!1,this._worker.addEventListener("message",this._onWorkerMessage.bind(this)),this._worker.postMessage({cmd:"init",param:[L,U]}),this.e={onLoggingConfigChanged:this._onLoggingConfigChanged.bind(this)},m.A.registerListener(this.e.onLoggingConfigChanged),this._worker.postMessage({cmd:"logging_config",param:m.A.getConfig()})}catch{x.A.e(this.TAG,"Error while initialize transmuxing worker, fallback to inline transmuxing"),this._worker=null,this._controller=new g.A(L,U)}else this._controller=new g.A(L,U);if(this._controller){var V=this._controller;V==null||V.on(f.A.IO_ERROR,this._onIOError.bind(this)),V==null||V.on(f.A.DEMUX_ERROR,this._onDemuxError.bind(this)),V==null||V.on(f.A.INIT_SEGMENT,this._onInitSegment.bind(this)),V==null||V.on(f.A.MEDIA_SEGMENT,this._onMediaSegment.bind(this)),V==null||V.on(f.A.LOADING_COMPLETE,this._onLoadingComplete.bind(this)),V==null||V.on(f.A.RECOVERED_EARLY_EOF,this._onRecoveredEarlyEof.bind(this)),V==null||V.on(f.A.MEDIA_INFO,this._onMediaInfo.bind(this)),V==null||V.on(f.A.METADATA_ARRIVED,this._onMetaDataArrived.bind(this)),V==null||V.on(f.A.SCRIPTDATA_ARRIVED,this._onScriptDataArrived.bind(this)),V==null||V.on(f.A.TIMED_ID3_METADATA_ARRIVED,this._onTimedID3MetadataArrived.bind(this)),V==null||V.on(f.A.SMPTE2038_METADATA_ARRIVED,this._onSMPTE2038MetadataArrived.bind(this)),V==null||V.on(f.A.SCTE35_METADATA_ARRIVED,this._onSCTE35MetadataArrived.bind(this)),V==null||V.on(f.A.PES_PRIVATE_DATA_DESCRIPTOR,this._onPESPrivateDataDescriptor.bind(this)),V==null||V.on(f.A.PES_PRIVATE_DATA_ARRIVED,this._onPESPrivateDataArrived.bind(this)),V==null||V.on(f.A.STATISTICS_INFO,this._onStatisticsInfo.bind(this)),V==null||V.on(f.A.RECOMMEND_SEEKPOINT,this._onRecommendSeekpoint.bind(this))}}return W.prototype.destroy=function(){var L;this._worker?this._workerDestroying||(this._workerDestroying=!0,this._worker.postMessage({cmd:"transmuxing-worker destroy"}),m.A.removeListener(this.e.onLoggingConfigChanged),this.e=null):((L=this._controller)===null||L===void 0||L.destroy(),this._controller=null),this._emitter.removeAllListeners(),this._emitter=null},W.prototype.on=function(L,U){this._emitter.addListener(L,U)},W.prototype.off=function(L,U){this._emitter.removeListener(L,U)},W.prototype.hasWorker=function(){return this._worker!=null},W.prototype.open=function(){var L;this._worker?this._worker.postMessage({cmd:"start"}):(L=this._controller)===null||L===void 0||L.start()},W.prototype.close=function(){var L;this._worker?this._worker.postMessage({cmd:"stop"}):(L=this._controller)===null||L===void 0||L.stop()},W.prototype.seek=function(L){var U;this._worker?this._worker.postMessage({cmd:"seek",param:L}):(U=this._controller)===null||U===void 0||U.seek(L)},W.prototype.pause=function(){var L;this._worker?this._worker.postMessage({cmd:"pause"}):(L=this._controller)===null||L===void 0||L.pause()},W.prototype.resume=function(){var L;this._worker?this._worker.postMessage({cmd:"resume"}):(L=this._controller)===null||L===void 0||L.resume()},W.prototype._onInitSegment=function(L,U){var V=this;Promise.resolve().then(function(){V._emitter.emit(f.A.INIT_SEGMENT,L,U)})},W.prototype._onMediaSegment=function(L,U){var V=this;Promise.resolve().then(function(){V._emitter.emit(f.A.MEDIA_SEGMENT,L,U)})},W.prototype._onLoadingComplete=function(){var L=this;Promise.resolve().then(function(){L._emitter.emit(f.A.LOADING_COMPLETE)})},W.prototype._onRecoveredEarlyEof=function(){var L=this;Promise.resolve().then(function(){L._emitter.emit(f.A.RECOVERED_EARLY_EOF)})},W.prototype._onMediaInfo=function(L){var U=this;Promise.resolve().then(function(){U._emitter.emit(f.A.MEDIA_INFO,L)})},W.prototype._onMetaDataArrived=function(L){var U=this;Promise.resolve().then(function(){U._emitter.emit(f.A.METADATA_ARRIVED,L)})},W.prototype._onScriptDataArrived=function(L){var U=this;Promise.resolve().then(function(){U._emitter.emit(f.A.SCRIPTDATA_ARRIVED,L)})},W.prototype._onTimedID3MetadataArrived=function(L){var U=this;Promise.resolve().then(function(){U._emitter.emit(f.A.TIMED_ID3_METADATA_ARRIVED,L)})},W.prototype._onSMPTE2038MetadataArrived=function(L){var U=this;Promise.resolve().then(function(){U._emitter.emit(f.A.SMPTE2038_METADATA_ARRIVED,L)})},W.prototype._onSCTE35MetadataArrived=function(L){var U=this;Promise.resolve().then(function(){U._emitter.emit(f.A.SCTE35_METADATA_ARRIVED,L)})},W.prototype._onPESPrivateDataDescriptor=function(L){var U=this;Promise.resolve().then(function(){U._emitter.emit(f.A.PES_PRIVATE_DATA_DESCRIPTOR,L)})},W.prototype._onPESPrivateDataArrived=function(L){var U=this;Promise.resolve().then(function(){U._emitter.emit(f.A.PES_PRIVATE_DATA_ARRIVED,L)})},W.prototype._onStatisticsInfo=function(L){var U=this;Promise.resolve().then(function(){U._emitter.emit(f.A.STATISTICS_INFO,L)})},W.prototype._onIOError=function(L,U){var V=this;Promise.resolve().then(function(){V._emitter.emit(f.A.IO_ERROR,L,U)})},W.prototype._onDemuxError=function(L,U){var V=this;Promise.resolve().then(function(){V._emitter.emit(f.A.DEMUX_ERROR,L,U)})},W.prototype._onRecommendSeekpoint=function(L){var U=this;Promise.resolve().then(function(){U._emitter.emit(f.A.RECOMMEND_SEEKPOINT,L)})},W.prototype._onLoggingConfigChanged=function(L){this._worker&&this._worker.postMessage({cmd:"logging_config",param:L})},W.prototype._onWorkerMessage=function(L){var U=L.data,V=U==null?void 0:U.data;if(U.msg==="destroyed"||this._workerDestroying)return this._workerDestroying=!1,this._worker.terminate(),void(this._worker=null);switch(U.msg){case f.A.INIT_SEGMENT:case f.A.MEDIA_SEGMENT:this._emitter.emit(U.msg,V.type,V.data);break;case f.A.LOADING_COMPLETE:case f.A.RECOVERED_EARLY_EOF:this._emitter.emit(U.msg);break;case f.A.MEDIA_INFO:Object.setPrototypeOf(V,O.A.prototype),this._emitter.emit(U.msg,V);break;case f.A.METADATA_ARRIVED:case f.A.SCRIPTDATA_ARRIVED:case f.A.TIMED_ID3_METADATA_ARRIVED:case f.A.SMPTE2038_METADATA_ARRIVED:case f.A.SCTE35_METADATA_ARRIVED:case f.A.PES_PRIVATE_DATA_DESCRIPTOR:case f.A.PES_PRIVATE_DATA_ARRIVED:case f.A.STATISTICS_INFO:this._emitter.emit(U.msg,V);break;case f.A.IO_ERROR:case f.A.DEMUX_ERROR:this._emitter.emit(U.msg,V.type,V.info);break;case f.A.RECOMMEND_SEEKPOINT:this._emitter.emit(U.msg,V);break;case"logcat_callback":x.A.emitter.emit("log",V.type,V.logcat)}},W}(),Q="error",ee="source_open",ue="update_end",fe="buffer_full";var me=t(1951),ge=t(4383);const Oe=function(){function W(L){this.TAG="MSEController",this._config=L,this._emitter=new B.A,this._config.isLive&&this._config.autoCleanupSourceBuffer===void 0&&(this._config.autoCleanupSourceBuffer=!0),this.e={onSourceOpen:this._onSourceOpen.bind(this),onSourceEnded:this._onSourceEnded.bind(this),onSourceClose:this._onSourceClose.bind(this),onSourceBufferError:this._onSourceBufferError.bind(this),onSourceBufferUpdateEnd:this._onSourceBufferUpdateEnd.bind(this)},this._mediaSource=null,this._mediaSourceObjectURL=null,this._mediaElement=null,this._isBufferFull=!1,this._hasPendingEos=!1,this._requireSetMediaDuration=!1,this._pendingMediaDuration=0,this._pendingSourceBufferInit=[],this._mimeTypes={video:null,audio:null},this._sourceBuffers={video:null,audio:null},this._lastInitSegments={video:null,audio:null},this._pendingSegments={video:[],audio:[]},this._pendingRemoveRanges={video:[],audio:[]},this._idrList=new me.EX}return W.prototype.destroy=function(){(this._mediaElement||this._mediaSource)&&this.detachMediaElement(),this.e=null,this._emitter.removeAllListeners(),this._emitter=null},W.prototype.on=function(L,U){this._emitter.addListener(L,U)},W.prototype.off=function(L,U){this._emitter.removeListener(L,U)},W.prototype.attachMediaElement=function(L){if(this._mediaSource)throw new ge.j4("MediaSource has been attached to an HTMLMediaElement!");var U=this._mediaSource=new window.MediaSource;U.addEventListener("sourceopen",this.e.onSourceOpen),U.addEventListener("sourceended",this.e.onSourceEnded),U.addEventListener("sourceclose",this.e.onSourceClose),this._mediaElement=L,this._mediaSourceObjectURL=window.URL.createObjectURL(this._mediaSource),L.src=this._mediaSourceObjectURL},W.prototype.detachMediaElement=function(){if(this._mediaSource){var L=this._mediaSource;for(var U in this._sourceBuffers){var V=this._pendingSegments[U];V.splice(0,V.length),this._pendingSegments[U]=null,this._pendingRemoveRanges[U]=null,this._lastInitSegments[U]=null;var X=this._sourceBuffers[U];if(X){if(L.readyState!=="closed"){try{L.removeSourceBuffer(X)}catch(J){x.A.e(this.TAG,J.message)}X==null||X.removeEventListener("error",this.e.onSourceBufferError),X==null||X.removeEventListener("updateend",this.e.onSourceBufferUpdateEnd)}this._mimeTypes[U]=null,this._sourceBuffers[U]=null}}if(L.readyState==="open")try{L.endOfStream()}catch(J){x.A.e(this.TAG,J.message)}L.removeEventListener("sourceopen",this.e.onSourceOpen),L.removeEventListener("sourceended",this.e.onSourceEnded),L.removeEventListener("sourceclose",this.e.onSourceClose),this._pendingSourceBufferInit=[],this._isBufferFull=!1,this._idrList.clear(),this._mediaSource=null}this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src"),this._mediaElement=null),this._mediaSourceObjectURL&&(window.URL.revokeObjectURL(this._mediaSourceObjectURL),this._mediaSourceObjectURL=null)},W.prototype.appendInitSegment=function(L,U){var V;if(!this._mediaSource||this._mediaSource.readyState!=="open")return this._pendingSourceBufferInit.push(L),void this._pendingSegments[L.type].push(L);var X=L,J="".concat(X.container);X.codec&&X.codec.length>0&&(J+=";codecs=".concat(X.codec));var le=!1;if(x.A.v(this.TAG,"Received Initialization Segment, mimeType: "+J),this._lastInitSegments[X.type]=X,J!==this._mimeTypes[X.type]){if(this._mimeTypes[X.type])x.A.v(this.TAG,"Notice: ".concat(X.type," mimeType changed, origin: ").concat(this._mimeTypes[X.type]||"",", target: ").concat(J));else{le=!0;try{var ce=this._sourceBuffers[X.type]=this._mediaSource.addSourceBuffer(J);ce.addEventListener("error",this.e.onSourceBufferError),ce.addEventListener("updateend",this.e.onSourceBufferUpdateEnd)}catch(ye){return x.A.e(this.TAG,ye.message),void this._emitter.emit(Q,{code:ye.code,msg:ye.message})}}this._mimeTypes[X.type]=J}U||this._pendingSegments[X.type].push(X),le||this._sourceBuffers[X.type]&&!(!((V=this._sourceBuffers[X.type])===null||V===void 0)&&V.updating)&&this._doAppendSegments(),P.A.safari&&X.container==="audio/mpeg"&&X.mediaDuration>0&&(this._requireSetMediaDuration=!0,this._pendingMediaDuration=X.mediaDuration/1e3,this._updateMediaSourceDuration())},W.prototype.appendMediaSegment=function(L){var U=L;this._pendingSegments[U.type].push(U),this._config.autoCleanupSourceBuffer&&this._needCleanupSourceBuffer()&&this._doCleanupSourceBuffer();var V=this._sourceBuffers[U.type];!V||V.updating||this._hasPendingRemoveRanges()||this._doAppendSegments()},W.prototype.seek=function(L){var U,V;for(var X in this._sourceBuffers)if(this._sourceBuffers[X]){var J=this._sourceBuffers[X];if(((U=this._mediaSource)===null||U===void 0?void 0:U.readyState)==="open")try{J==null||J.abort()}catch(pe){x.A.e(this.TAG,pe.message)}this._idrList.clear();var le=this._pendingSegments[X];if(le.splice(0,le.length),((V=this._mediaSource)===null||V===void 0?void 0:V.readyState)!=="closed"){if(J){for(var ce=0;ce<J.buffered.length;ce++){var ye=J.buffered.start(ce),ae=J.buffered.end(ce);this._pendingRemoveRanges[X].push({start:ye,end:ae})}J!=null&&J.updating||this._doRemoveRanges()}if(P.A.safari){var Ce=this._lastInitSegments[X];Ce&&(this._pendingSegments[X].push(Ce),J!=null&&J.updating||this._doAppendSegments())}}}},W.prototype.endOfStream=function(){var L,U,V=this._mediaSource,X=this._sourceBuffers;V&&V.readyState==="open"?!((L=X.video)===null||L===void 0)&&L.updating||!((U=X.audio)===null||U===void 0)&&U.updating?this._hasPendingEos=!0:(this._hasPendingEos=!1,V.endOfStream()):V&&V.readyState==="closed"&&this._hasPendingSegments()&&(this._hasPendingEos=!0)},W.prototype.getNearestKeyframe=function(L){return this._idrList.getLastSyncPointBeforeDts(L)},W.prototype._needCleanupSourceBuffer=function(){var L,U;if(!this._config.autoCleanupSourceBuffer)return!1;var V=(L=this._mediaElement)===null||L===void 0?void 0:L.currentTime;for(var X in this._sourceBuffers){var J=this._sourceBuffers[X];if(J){var le=J.buffered;if(le.length>=1&&V-le.start(0)>=(((U=this._config)===null||U===void 0?void 0:U.autoCleanupMaxBackwardDuration)||0))return!0}}return!1},W.prototype._doCleanupSourceBuffer=function(){var L,U,V,X=(L=this._mediaElement)===null||L===void 0?void 0:L.currentTime;for(var J in this._sourceBuffers){var le=this._sourceBuffers[J];if(le){for(var ce=le.buffered,ye=!1,ae=0;ae<ce.length;ae++){var Ce=ce.start(ae),pe=ce.end(ae);if(Ce<=X&&X<pe+3){if(X-Ce>=(((U=this._config)===null||U===void 0?void 0:U.autoCleanupMaxBackwardDuration)||0)){ye=!0;var Re=X-(((V=this._config)===null||V===void 0?void 0:V.autoCleanupMinBackwardDuration)||0);this._pendingRemoveRanges[J].push({start:Ce,end:Re})}}else pe<X&&(ye=!0,this._pendingRemoveRanges[J].push({start:Ce,end:pe}))}ye&&!le.updating&&this._doRemoveRanges()}}},W.prototype._updateMediaSourceDuration=function(){var L,U,V,X,J=this._sourceBuffers;if(((L=this._mediaElement)===null||L===void 0?void 0:L.readyState)!==0&&((U=this._mediaSource)===null||U===void 0?void 0:U.readyState)==="open"&&!(!((V=J.video)===null||V===void 0)&&V.updating)&&!(!((X=J.audio)===null||X===void 0)&&X.updating)){var le=this._mediaSource.duration,ce=this._pendingMediaDuration;ce>0&&(isNaN(le)||ce>le)&&(x.A.v(this.TAG,"Update MediaSource duration from ".concat(le," to ").concat(ce)),this._mediaSource.duration=ce),this._requireSetMediaDuration=!1,this._pendingMediaDuration=0}},W.prototype._doRemoveRanges=function(){var L;for(var U in this._pendingRemoveRanges)if(this._sourceBuffers[U]&&!(!((L=this._sourceBuffers[U])===null||L===void 0)&&L.updating))for(var V=this._sourceBuffers[U],X=this._pendingRemoveRanges[U];X.length&&!(V!=null&&V.updating);){var J=X.shift();V==null||V.remove(J.start,J.end)}},W.prototype._doAppendSegments=function(){var L,U,V,X=this._pendingSegments;for(var J in X)if(this._sourceBuffers[J]&&!(!((L=this._sourceBuffers[J])===null||L===void 0)&&L.updating)&&X[J].length>0){var le=X[J].shift();if(le!=null&&le.timestampOffset){var ce=((U=this._sourceBuffers[J])===null||U===void 0?void 0:U.timestampOffset)||0,ye=le.timestampOffset/1e3;Math.abs(ce-ye)>.1&&(x.A.v(this.TAG,"Update MPEG audio timestampOffset from ".concat(ce," to ").concat(ye)),this._sourceBuffers[J]&&(this._sourceBuffers[J].timestampOffset=ye)),delete le.timestampOffset}if(!le.data||le.data.byteLength===0)continue;try{(V=this._sourceBuffers[J])===null||V===void 0||V.appendBuffer(le.data),this._isBufferFull=!1,J==="video"&&le.hasOwnProperty("info")&&this._idrList.appendArray(le.info.syncPoints)}catch(ae){this._pendingSegments[J].unshift(le),ae.code===22?(this._isBufferFull||this._emitter.emit(fe),this._isBufferFull=!0):(x.A.e(this.TAG,ae.message),this._emitter.emit(Q,{code:ae.code,msg:ae.message}))}}},W.prototype._onSourceOpen=function(){var L;if(x.A.v(this.TAG,"MediaSource onSourceOpen"),(L=this._mediaSource)===null||L===void 0||L.removeEventListener("sourceopen",this.e.onSourceOpen),this._pendingSourceBufferInit.length>0)for(var U=this._pendingSourceBufferInit;U.length;){var V=U.shift();this.appendInitSegment(V,!0)}this._hasPendingSegments()&&this._doAppendSegments(),this._emitter.emit(ee)},W.prototype._onSourceEnded=function(){x.A.v(this.TAG,"MediaSource onSourceEnded")},W.prototype._onSourceClose=function(){x.A.v(this.TAG,"MediaSource onSourceClose"),this._mediaSource&&this.e!=null&&(this._mediaSource.removeEventListener("sourceopen",this.e.onSourceOpen),this._mediaSource.removeEventListener("sourceended",this.e.onSourceEnded),this._mediaSource.removeEventListener("sourceclose",this.e.onSourceClose))},W.prototype._hasPendingSegments=function(){var L=this._pendingSegments;return L.video.length>0||L.audio.length>0},W.prototype._hasPendingRemoveRanges=function(){var L=this._pendingRemoveRanges;return L.video.length>0||L.audio.length>0},W.prototype._onSourceBufferUpdateEnd=function(){this._requireSetMediaDuration?this._updateMediaSourceDuration():this._hasPendingRemoveRanges()?this._doRemoveRanges():this._hasPendingSegments()?this._doAppendSegments():this._hasPendingEos&&this.endOfStream(),this._emitter.emit(ue)},W.prototype._onSourceBufferError=function(L){x.A.e(this.TAG,"SourceBuffer Error: ".concat(L))},W}();var Ee=t(6399),Be={NETWORK_ERROR:"NetworkError",MEDIA_ERROR:"MediaError",OTHER_ERROR:"OtherError"},De={NETWORK_EXCEPTION:S.Xv.EXCEPTION,NETWORK_STATUS_CODE_INVALID:S.Xv.HTTP_STATUS_CODE_INVALID,NETWORK_TIMEOUT:S.Xv.CONNECTING_TIMEOUT,NETWORK_UNRECOVERABLE_EARLY_EOF:S.Xv.UNRECOVERABLE_EARLY_EOF,MEDIA_MSE_ERROR:"MediaMSEError",MEDIA_FORMAT_ERROR:Ee.A.FORMAT_ERROR,MEDIA_FORMAT_UNSUPPORTED:Ee.A.FORMAT_UNSUPPORTED,MEDIA_CODEC_UNSUPPORTED:Ee.A.CODEC_UNSUPPORTED};const nt=function(){function W(L,U){var V,X,J;this.TAG="MSEPlayer",this._type="MSEPlayer",this._emitter=new B.A,this._config=h(),typeof U=="object"&&Object.assign(this._config,U);var le=L.type.toLowerCase();if(le!=="mse"&&le!=="mpegts"&&le!=="m2ts"&&le!=="flv")throw new ge.Qn("MSEPlayer requires an mpegts/m2ts/flv MediaDataSource input!");L.isLive&&(this._config.isLive=!0),this.e={onvLoadedMetadata:this._onvLoadedMetadata.bind(this),onvSeeking:this._onvSeeking.bind(this),onvCanPlay:this._onvCanPlay.bind(this),onvStalled:this._onvStalled.bind(this),onvProgress:this._onvProgress.bind(this)},self.performance&&self.performance.now?this._now=self.performance.now.bind(self.performance):this._now=Date.now,this._pendingSeekTime=null,this._requestSetTime=!1,this._seekpointRecord=null,this._progressChecker=null,this._mediaDataSource=L,this._mediaElement=null,this._msectl=null,this._transmuxer=null,this._mseSourceOpened=!1,this._hasPendingLoad=!1,this._receivedCanPlay=!1,this._mediaInfo=null,this._statisticsInfo=null;var ce=P.A.chrome&&(P.A.version&&((V=P.A.version)===null||V===void 0?void 0:V.major)<50||P.A.version&&((X=P.A===null||P.A===void 0?void 0:P.A.version)===null||X===void 0?void 0:X.major)===50&&(((J=P.A===null||P.A===void 0?void 0:P.A.version)===null||J===void 0?void 0:J.build)||-1)<2661);this._alwaysSeekKeyframe=!!(ce||P.A.msedge||P.A.msie),this._alwaysSeekKeyframe&&(this._config.accurateSeek=!1)}return W.prototype.destroy=function(){this._emitter.emit(M.DESTROYING),this._progressChecker!=null&&(window.clearInterval(this._progressChecker),this._progressChecker=null),this._transmuxer&&this.unload(),this._mediaElement&&this.detachMediaElement(),this.e=null,this._mediaDataSource=null,this._emitter.removeAllListeners(),this._emitter=null},W.prototype.on=function(L,U){var V=this;L===M.MEDIA_INFO?this._mediaInfo!=null&&Promise.resolve().then(function(){V._emitter.emit(M.MEDIA_INFO,V.mediaInfo)}):L===M.STATISTICS_INFO&&this._statisticsInfo!=null&&Promise.resolve().then(function(){V._emitter.emit(M.STATISTICS_INFO,V.statisticsInfo)}),this._emitter.addListener(L,U)},W.prototype.off=function(L,U){this._emitter.removeListener(L,U)},W.prototype.attachMediaElement=function(L){var U,V,X,J,le,ce=this;if(this._mediaElement=L,L.addEventListener("loadedmetadata",this.e.onvLoadedMetadata),L.addEventListener("seeking",this.e.onvSeeking),L.addEventListener("canplay",this.e.onvCanPlay),L.addEventListener("stalled",this.e.onvStalled),L.addEventListener("progress",this.e.onvProgress),this._msectl=new Oe(this._config),(U=this._msectl)===null||U===void 0||U.on(ue,this._onmseUpdateEnd.bind(this)),(V=this._msectl)===null||V===void 0||V.on(fe,this._onmseBufferFull.bind(this)),(X=this._msectl)===null||X===void 0||X.on(ee,function(){ce._mseSourceOpened=!0,ce._hasPendingLoad&&(ce._hasPendingLoad=!1,ce.load())}),(J=this._msectl)===null||J===void 0||J.on(Q,function(ye){ce._emitter.emit(M.ERROR,Be.MEDIA_ERROR,De.MEDIA_MSE_ERROR,ye)}),(le=this._msectl)===null||le===void 0||le.attachMediaElement(L),this._pendingSeekTime!=null)try{L.currentTime=this._pendingSeekTime,this._pendingSeekTime=null}catch{}},W.prototype.detachMediaElement=function(){var L;this._mediaElement&&((L=this._msectl)===null||L===void 0||L.detachMediaElement(),this._mediaElement.removeEventListener("loadedmetadata",this.e.onvLoadedMetadata),this._mediaElement.removeEventListener("seeking",this.e.onvSeeking),this._mediaElement.removeEventListener("canplay",this.e.onvCanPlay),this._mediaElement.removeEventListener("stalled",this.e.onvStalled),this._mediaElement.removeEventListener("progress",this.e.onvProgress),this._mediaElement=null),this._msectl&&(this._msectl.destroy(),this._msectl=null)},W.prototype.load=function(){var L=this;if(!this._mediaElement)throw new ge.j4("HTMLMediaElement must be attached before load()!");if(this._transmuxer)throw new ge.j4("MSEPlayer.load() has been called, please call unload() first!");this._hasPendingLoad||(!this._config.deferLoadAfterSourceOpen||this._mseSourceOpened?(this._mediaElement.readyState>0&&(this._requestSetTime=!0,this._mediaElement.currentTime=0),this._transmuxer=new j(this._mediaDataSource,this._config),this._transmuxer.on(f.A.INIT_SEGMENT,function(U,V){var X;(X=L._msectl)===null||X===void 0||X.appendInitSegment(V)}),this._transmuxer.on(f.A.MEDIA_SEGMENT,function(U,V){var X,J,le;if((X=L._msectl)===null||X===void 0||X.appendMediaSegment(V),L._config.lazyLoad&&!L._config.isLive){var ce=(J=L._mediaElement)===null||J===void 0?void 0:J.currentTime;V.info.endDts>=1e3*(ce+(((le=L._config)===null||le===void 0?void 0:le.lazyLoadMaxDuration)||0))&&L._progressChecker==null&&(x.A.v(L.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),L._suspendTransmuxer())}}),this._transmuxer.on(f.A.LOADING_COMPLETE,function(){var U;(U=L._msectl)===null||U===void 0||U.endOfStream(),L._emitter.emit(M.LOADING_COMPLETE)}),this._transmuxer.on(f.A.RECOVERED_EARLY_EOF,function(){L._emitter.emit(M.RECOVERED_EARLY_EOF)}),this._transmuxer.on(f.A.IO_ERROR,function(U,V){L._emitter.emit(M.ERROR,Be.NETWORK_ERROR,U,V)}),this._transmuxer.on(f.A.DEMUX_ERROR,function(U,V){L._emitter.emit(M.ERROR,Be.MEDIA_ERROR,U,{code:-1,msg:V})}),this._transmuxer.on(f.A.MEDIA_INFO,function(U){L._mediaInfo=U,L._emitter.emit(M.MEDIA_INFO,Object.assign({},U))}),this._transmuxer.on(f.A.METADATA_ARRIVED,function(U){L._emitter.emit(M.METADATA_ARRIVED,U)}),this._transmuxer.on(f.A.SCRIPTDATA_ARRIVED,function(U){L._emitter.emit(M.SCRIPTDATA_ARRIVED,U)}),this._transmuxer.on(f.A.TIMED_ID3_METADATA_ARRIVED,function(U){L._emitter.emit(M.TIMED_ID3_METADATA_ARRIVED,U)}),this._transmuxer.on(f.A.SMPTE2038_METADATA_ARRIVED,function(U){L._emitter.emit(M.SMPTE2038_METADATA_ARRIVED,U)}),this._transmuxer.on(f.A.SCTE35_METADATA_ARRIVED,function(U){L._emitter.emit(M.SCTE35_METADATA_ARRIVED,U)}),this._transmuxer.on(f.A.PES_PRIVATE_DATA_DESCRIPTOR,function(U){L._emitter.emit(M.PES_PRIVATE_DATA_DESCRIPTOR,U)}),this._transmuxer.on(f.A.PES_PRIVATE_DATA_ARRIVED,function(U){L._emitter.emit(M.PES_PRIVATE_DATA_ARRIVED,U)}),this._transmuxer.on(f.A.STATISTICS_INFO,function(U){L._statisticsInfo=L._fillStatisticsInfo(U),L._emitter.emit(M.STATISTICS_INFO,Object.assign({},L._statisticsInfo))}),this._transmuxer.on(f.A.RECOMMEND_SEEKPOINT,function(U){L._mediaElement&&!L._config.accurateSeek&&(L._requestSetTime=!0,L._mediaElement.currentTime=U/1e3)}),this._transmuxer.open()):this._hasPendingLoad=!0)},W.prototype.unload=function(){this._mediaElement&&this._mediaElement.pause(),this._msectl&&this._msectl.seek(0),this._transmuxer&&(this._transmuxer.close(),this._transmuxer.destroy(),this._transmuxer=null)},W.prototype.play=function(){var L,U,V,X;return U=this,X=function(){return function(J,le){var ce,ye,ae,Ce,pe={label:0,sent:function(){if(1&ae[0])throw ae[1];return ae[1]},trys:[],ops:[]};return Ce={next:Re(0),throw:Re(1),return:Re(2)},typeof Symbol=="function"&&(Ce[Symbol.iterator]=function(){return this}),Ce;function Re(Et){return function(ct){return function(Se){if(ce)throw new TypeError("Generator is already executing.");for(;Ce&&(Ce=0,Se[0]&&(pe=0)),pe;)try{if(ce=1,ye&&(ae=2&Se[0]?ye.return:Se[0]?ye.throw||((ae=ye.return)&&ae.call(ye),0):ye.next)&&!(ae=ae.call(ye,Se[1])).done)return ae;switch(ye=0,ae&&(Se=[2&Se[0],ae.value]),Se[0]){case 0:case 1:ae=Se;break;case 4:return pe.label++,{value:Se[1],done:!1};case 5:pe.label++,ye=Se[1],Se=[0];continue;case 7:Se=pe.ops.pop(),pe.trys.pop();continue;default:if(!((ae=(ae=pe.trys).length>0&&ae[ae.length-1])||Se[0]!==6&&Se[0]!==2)){pe=0;continue}if(Se[0]===3&&(!ae||Se[1]>ae[0]&&Se[1]<ae[3])){pe.label=Se[1];break}if(Se[0]===6&&pe.label<ae[1]){pe.label=ae[1],ae=Se;break}if(ae&&pe.label<ae[2]){pe.label=ae[2],pe.ops.push(Se);break}ae[2]&&pe.ops.pop(),pe.trys.pop();continue}Se=le.call(J,pe)}catch(Ye){Se=[6,Ye],ye=0}finally{ce=ae=0}if(5&Se[0])throw Se[1];return{value:Se[0]?Se[1]:void 0,done:!0}}([Et,ct])}}}(this,function(J){switch(J.label){case 0:return[4,(L=this._mediaElement)===null||L===void 0?void 0:L.play()];case 1:return[2,J.sent()]}})},new((V=void 0)||(V=Promise))(function(J,le){function ce(Ce){try{ae(X.next(Ce))}catch(pe){le(pe)}}function ye(Ce){try{ae(X.throw(Ce))}catch(pe){le(pe)}}function ae(Ce){var pe;Ce.done?J(Ce.value):(pe=Ce.value,pe instanceof V?pe:new V(function(Re){Re(pe)})).then(ce,ye)}ae((X=X.apply(U,[])).next())})},W.prototype.pause=function(){var L;(L=this._mediaElement)===null||L===void 0||L.pause()},Object.defineProperty(W.prototype,"type",{get:function(){return this._type},enumerable:!1,configurable:!0}),Object.defineProperty(W.prototype,"buffered",{get:function(){var L;return(L=this._mediaElement)===null||L===void 0?void 0:L.buffered},enumerable:!1,configurable:!0}),Object.defineProperty(W.prototype,"duration",{get:function(){var L;return(L=this._mediaElement)===null||L===void 0?void 0:L.duration},enumerable:!1,configurable:!0}),Object.defineProperty(W.prototype,"volume",{get:function(){var L;return(L=this._mediaElement)===null||L===void 0?void 0:L.volume},set:function(L){this._mediaElement&&(this._mediaElement.volume=L)},enumerable:!1,configurable:!0}),Object.defineProperty(W.prototype,"muted",{get:function(){var L;return(L=this._mediaElement)===null||L===void 0?void 0:L.muted},set:function(L){this._mediaElement&&(this._mediaElement.muted=L)},enumerable:!1,configurable:!0}),Object.defineProperty(W.prototype,"currentTime",{get:function(){return this._mediaElement?this._mediaElement.currentTime:0},set:function(L){this._mediaElement?this._internalSeek(L):this._pendingSeekTime=L},enumerable:!1,configurable:!0}),Object.defineProperty(W.prototype,"mediaInfo",{get:function(){return Object.assign({},this._mediaInfo)},enumerable:!1,configurable:!0}),Object.defineProperty(W.prototype,"statisticsInfo",{get:function(){return this._statisticsInfo==null&&(this._statisticsInfo={}),this._statisticsInfo=this._fillStatisticsInfo(this._statisticsInfo),Object.assign({},this._statisticsInfo)},enumerable:!1,configurable:!0}),W.prototype._fillStatisticsInfo=function(L){if(L.playerType=this._type,!(this._mediaElement instanceof HTMLVideoElement))return L;var U=!0,V=0,X=0;if(this._mediaElement.getVideoPlaybackQuality){var J=this._mediaElement.getVideoPlaybackQuality();V=J.totalVideoFrames,X=J.droppedVideoFrames}else this._mediaElement.webkitDecodedFrameCount!==void 0?(V=this._mediaElement.webkitDecodedFrameCount,X=this._mediaElement.webkitDroppedFrameCount):U=!1;return U&&(L.decodedFrames=V,L.droppedFrames=X),L},W.prototype._onmseUpdateEnd=function(){var L,U,V,X,J=(L=this._mediaElement)===null||L===void 0?void 0:L.buffered,le=((U=this._mediaElement)===null||U===void 0?void 0:U.currentTime)||0;if(this._config.isLive&&this._config.liveBufferLatencyChasing&&(J==null?void 0:J.length)>0&&!(!((V=this._mediaElement)===null||V===void 0)&&V.paused)){var ce=J.end(J.length-1);if(ce>(((X=this._config)===null||X===void 0?void 0:X.liveBufferLatencyMaxLatency)||0)&&ce-le>(this._config.liveBufferLatencyMaxLatency||0)){var ye=ce-(this._config.liveBufferLatencyMinRemain||0);this.currentTime=ye}}if(this._config.lazyLoad&&!this._config.isLive){for(var ae=0,Ce=0;Ce<J.length;Ce++){var pe=J.start(Ce),Re=J.end(Ce);if(pe<=le&&le<Re){ae=Re;break}}ae>=le+(this._config.lazyLoadMaxDuration||0)&&this._progressChecker==null&&(x.A.v(this.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),this._suspendTransmuxer())}},W.prototype._onmseBufferFull=function(){x.A.v(this.TAG,"MSE SourceBuffer is full, suspend transmuxing task"),this._progressChecker==null&&this._suspendTransmuxer()},W.prototype._suspendTransmuxer=function(){this._transmuxer&&(this._transmuxer.pause(),this._progressChecker==null&&(this._progressChecker=window.setInterval(this._checkProgressAndResume.bind(this),1e3)))},W.prototype._checkProgressAndResume=function(){for(var L,U,V,X=((L=this._mediaElement)===null||L===void 0?void 0:L.currentTime)||0,J=((U=this._mediaElement)===null||U===void 0?void 0:U.buffered)||[],le=!1,ce=0;ce<J.length;ce++){var ye=J.start(ce),ae=J.end(ce);if(X>=ye&&X<ae){X>=ae-(this._config.lazyLoadRecoverDuration||0)&&(le=!0);break}}le&&(window.clearInterval(this._progressChecker),this._progressChecker=null,le&&(x.A.v(this.TAG,"Continue loading from paused position"),(V=this._transmuxer)===null||V===void 0||V.resume()))},W.prototype._isTimepointBuffered=function(L){for(var U,V=(U=this._mediaElement)===null||U===void 0?void 0:U.buffered,X=0;X<V.length;X++){var J=V.start(X),le=V.end(X);if(L>=J&&L<le)return!0}return!1},W.prototype._internalSeek=function(L){var U,V,X,J=this._isTimepointBuffered(L),le=!1,ce=0;if(L<1&&this._mediaElement.buffered.length>0){var ye=this._mediaElement.buffered.start(0);(ye<1&&L<ye||P.A.safari)&&(le=!0,ce=P.A.safari?.1:ye)}if(le)this._requestSetTime=!0,this._mediaElement&&(this._mediaElement.currentTime=ce);else if(J){if(this._alwaysSeekKeyframe){var ae=(U=this._msectl)===null||U===void 0?void 0:U.getNearestKeyframe(Math.floor(1e3*L));this._requestSetTime=!0,this._mediaElement&&(this._mediaElement.currentTime=ae!=null?ae.dts/1e3:L)}else this._requestSetTime=!0,this._mediaElement&&(this._mediaElement.currentTime=L);this._progressChecker!=null&&this._checkProgressAndResume()}else this._progressChecker!=null&&(window.clearInterval(this._progressChecker),this._progressChecker=null),(V=this._msectl)===null||V===void 0||V.seek(L),(X=this._transmuxer)===null||X===void 0||X.seek(Math.floor(1e3*L)),this._config.accurateSeek&&(this._requestSetTime=!0,this._mediaElement&&(this._mediaElement.currentTime=L))},W.prototype._checkAndApplyUnbufferedSeekpoint=function(){var L,U,V,X;if(this._seekpointRecord)if((((L=this._seekpointRecord)===null||L===void 0?void 0:L.recordTime)||0)<=this._now()-100){var J=(U=this._mediaElement)===null||U===void 0?void 0:U.currentTime;this._seekpointRecord=null,this._isTimepointBuffered(J)||(this._progressChecker!=null&&(window.clearTimeout(this._progressChecker),this._progressChecker=null),(V=this._msectl)===null||V===void 0||V.seek(J),(X=this._transmuxer)===null||X===void 0||X.seek(Math.floor(1e3*J)),this._config.accurateSeek&&(this._requestSetTime=!0,this._mediaElement&&(this._mediaElement.currentTime=J)))}else window.setTimeout(this._checkAndApplyUnbufferedSeekpoint.bind(this),50)},W.prototype._checkAndResumeStuckPlayback=function(L){var U=this._mediaElement;if(L||!this._receivedCanPlay||U.readyState<2){var V=U.buffered;V.length>0&&U.currentTime<V.start(0)&&(x.A.w(this.TAG,"Playback seems stuck at ".concat(U.currentTime,", seek to ").concat(V.start(0))),this._requestSetTime=!0,this._mediaElement&&(this._mediaElement.currentTime=V.start(0),this._mediaElement.removeEventListener("progress",this.e.onvProgress)))}else this._mediaElement&&this._mediaElement.removeEventListener("progress",this.e.onvProgress)},W.prototype._onvLoadedMetadata=function(L){this._pendingSeekTime!=null&&(this._mediaElement&&(this._mediaElement.currentTime=this._pendingSeekTime),this._pendingSeekTime=null)},W.prototype._onvSeeking=function(L){var U,V,X,J=(U=this._mediaElement)===null||U===void 0?void 0:U.currentTime,le=(V=this._mediaElement)===null||V===void 0?void 0:V.buffered;if(this._requestSetTime)this._requestSetTime=!1;else{if(J<1&&le.length>0){var ce=le.start(0);if(ce<1&&J<ce||P.A.safari)return this._requestSetTime=!0,void(this._mediaElement&&(P.A.safari?this._mediaElement.currentTime=.1:this._mediaElement.currentTime=ce))}if(this._isTimepointBuffered(J)){if(this._alwaysSeekKeyframe){var ye=(X=this._msectl)===null||X===void 0?void 0:X.getNearestKeyframe(Math.floor(1e3*J));ye!=null&&(this._requestSetTime=!0,this._mediaElement&&(this._mediaElement.currentTime=ye.dts/1e3))}this._progressChecker!=null&&this._checkProgressAndResume()}else this._seekpointRecord={seekPoint:J,recordTime:this._now()},window.setTimeout(this._checkAndApplyUnbufferedSeekpoint.bind(this),50)}},W.prototype._onvCanPlay=function(L){var U;this._receivedCanPlay=!0,(U=this._mediaElement)===null||U===void 0||U.removeEventListener("canplay",this.e.onvCanPlay)},W.prototype._onvStalled=function(L){this._checkAndResumeStuckPlayback(!0)},W.prototype._onvProgress=function(L){this._checkAndResumeStuckPlayback()},W}(),Ke=function(){function W(L,U){this.TAG="NativePlayer",this._type="NativePlayer",this._emitter=new B.A,this._config=h(),typeof U=="object"&&Object.assign(this._config,U);var V=L.type.toLowerCase();if(V==="mse"||V==="mpegts"||V==="m2ts"||V==="flv")throw new ge.Qn("NativePlayer does't support mse/mpegts/m2ts/flv MediaDataSource input!");if(L.hasOwnProperty("segments"))throw new ge.Qn("NativePlayer(".concat(L.type,") doesn't support multipart playback!"));this.e={onvLoadedMetadata:this._onvLoadedMetadata.bind(this)},this._pendingSeekTime=null,this._statisticsReporter=null,this._mediaDataSource=L,this._mediaElement=null}return W.prototype.destroy=function(){var L;this._emitter.emit(M.DESTROYING),this._mediaElement&&(this.unload(),this.detachMediaElement()),this.e=null,this._mediaDataSource=null,(L=this._emitter)===null||L===void 0||L.removeAllListeners(),this._emitter=null},W.prototype.on=function(L,U){var V=this;L===M.MEDIA_INFO?this._mediaElement!=null&&this._mediaElement.readyState!==0&&Promise.resolve().then(function(){V._emitter.emit(M.MEDIA_INFO,V.mediaInfo)}):L===M.STATISTICS_INFO&&this._mediaElement!=null&&this._mediaElement.readyState!==0&&Promise.resolve().then(function(){V._emitter.emit(M.STATISTICS_INFO,V.statisticsInfo)}),this._emitter.addListener(L,U)},W.prototype.off=function(L,U){this._emitter.removeListener(L,U)},W.prototype.attachMediaElement=function(L){if(this._mediaElement=L,L.addEventListener("loadedmetadata",this.e.onvLoadedMetadata),this._pendingSeekTime!=null)try{L.currentTime=this._pendingSeekTime,this._pendingSeekTime=null}catch{}},W.prototype.detachMediaElement=function(){this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src"),this._mediaElement.removeEventListener("loadedmetadata",this.e.onvLoadedMetadata),this._mediaElement=null),this._statisticsReporter!=null&&(window.clearInterval(this._statisticsReporter),this._statisticsReporter=null)},W.prototype.load=function(){var L;if(!this._mediaElement)throw new ge.j4("HTMLMediaElement must be attached before load()!");this._mediaElement.src=((L=this._mediaDataSource)===null||L===void 0?void 0:L.url)||"",this._mediaElement.readyState>0&&(this._mediaElement.currentTime=0),this._mediaElement.preload="auto",this._mediaElement.load(),this._statisticsReporter=window.setInterval(this._reportStatisticsInfo.bind(this),this._config.statisticsInfoReportInterval)},W.prototype.unload=function(){this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src")),this._statisticsReporter!=null&&(window.clearInterval(this._statisticsReporter),this._statisticsReporter=null)},W.prototype.play=function(){var L,U,V,X;return U=this,X=function(){return function(J,le){var ce,ye,ae,Ce,pe={label:0,sent:function(){if(1&ae[0])throw ae[1];return ae[1]},trys:[],ops:[]};return Ce={next:Re(0),throw:Re(1),return:Re(2)},typeof Symbol=="function"&&(Ce[Symbol.iterator]=function(){return this}),Ce;function Re(Et){return function(ct){return function(Se){if(ce)throw new TypeError("Generator is already executing.");for(;Ce&&(Ce=0,Se[0]&&(pe=0)),pe;)try{if(ce=1,ye&&(ae=2&Se[0]?ye.return:Se[0]?ye.throw||((ae=ye.return)&&ae.call(ye),0):ye.next)&&!(ae=ae.call(ye,Se[1])).done)return ae;switch(ye=0,ae&&(Se=[2&Se[0],ae.value]),Se[0]){case 0:case 1:ae=Se;break;case 4:return pe.label++,{value:Se[1],done:!1};case 5:pe.label++,ye=Se[1],Se=[0];continue;case 7:Se=pe.ops.pop(),pe.trys.pop();continue;default:if(!((ae=(ae=pe.trys).length>0&&ae[ae.length-1])||Se[0]!==6&&Se[0]!==2)){pe=0;continue}if(Se[0]===3&&(!ae||Se[1]>ae[0]&&Se[1]<ae[3])){pe.label=Se[1];break}if(Se[0]===6&&pe.label<ae[1]){pe.label=ae[1],ae=Se;break}if(ae&&pe.label<ae[2]){pe.label=ae[2],pe.ops.push(Se);break}ae[2]&&pe.ops.pop(),pe.trys.pop();continue}Se=le.call(J,pe)}catch(Ye){Se=[6,Ye],ye=0}finally{ce=ae=0}if(5&Se[0])throw Se[1];return{value:Se[0]?Se[1]:void 0,done:!0}}([Et,ct])}}}(this,function(J){switch(J.label){case 0:return[4,(L=this._mediaElement)===null||L===void 0?void 0:L.play()];case 1:return[2,J.sent()]}})},new((V=void 0)||(V=Promise))(function(J,le){function ce(Ce){try{ae(X.next(Ce))}catch(pe){le(pe)}}function ye(Ce){try{ae(X.throw(Ce))}catch(pe){le(pe)}}function ae(Ce){var pe;Ce.done?J(Ce.value):(pe=Ce.value,pe instanceof V?pe:new V(function(Re){Re(pe)})).then(ce,ye)}ae((X=X.apply(U,[])).next())})},W.prototype.pause=function(){var L;(L=this._mediaElement)===null||L===void 0||L.pause()},Object.defineProperty(W.prototype,"type",{get:function(){return this._type},enumerable:!1,configurable:!0}),Object.defineProperty(W.prototype,"buffered",{get:function(){var L;return(L=this._mediaElement)===null||L===void 0?void 0:L.buffered},enumerable:!1,configurable:!0}),Object.defineProperty(W.prototype,"duration",{get:function(){var L;return(L=this._mediaElement)===null||L===void 0?void 0:L.duration},enumerable:!1,configurable:!0}),Object.defineProperty(W.prototype,"volume",{get:function(){var L;return(L=this._mediaElement)===null||L===void 0?void 0:L.volume},set:function(L){this._mediaElement&&(this._mediaElement.volume=L)},enumerable:!1,configurable:!0}),Object.defineProperty(W.prototype,"muted",{get:function(){var L;return(L=this._mediaElement)===null||L===void 0?void 0:L.muted},set:function(L){this._mediaElement&&(this._mediaElement.muted=L)},enumerable:!1,configurable:!0}),Object.defineProperty(W.prototype,"currentTime",{get:function(){return this._mediaElement?this._mediaElement.currentTime:0},set:function(L){this._mediaElement?this._mediaElement.currentTime=L:this._pendingSeekTime=L},enumerable:!1,configurable:!0}),Object.defineProperty(W.prototype,"mediaInfo",{get:function(){var L={mimeType:(this._mediaElement instanceof HTMLAudioElement?"audio/":"video/")+this._mediaDataSource.type};return this._mediaElement&&(L.duration=Math.floor(1e3*this._mediaElement.duration),this._mediaElement instanceof HTMLVideoElement&&(L.width=this._mediaElement.videoWidth,L.height=this._mediaElement.videoHeight)),L},enumerable:!1,configurable:!0}),Object.defineProperty(W.prototype,"statisticsInfo",{get:function(){var L={playerType:this._type,url:this._mediaDataSource.url};if(!(this._mediaElement instanceof HTMLVideoElement))return L;var U=!0,V=0,X=0;if(this._mediaElement.getVideoPlaybackQuality){var J=this._mediaElement.getVideoPlaybackQuality();V=J.totalVideoFrames,X=J.droppedVideoFrames}else this._mediaElement.webkitDecodedFrameCount!==void 0?(V=this._mediaElement.webkitDecodedFrameCount,X=this._mediaElement.webkitDroppedFrameCount):U=!1;return U&&(L.decodedFrames=V,L.droppedFrames=X),L},enumerable:!1,configurable:!0}),W.prototype._onvLoadedMetadata=function(L){this._pendingSeekTime!=null&&(this._mediaElement&&(this._mediaElement.currentTime=this._pendingSeekTime),this._pendingSeekTime=null),this._emitter.emit(M.MEDIA_INFO,this.mediaInfo)},W.prototype._reportStatisticsInfo=function(){this._emitter.emit(M.STATISTICS_INFO,this.statisticsInfo)},W}();var We={createPlayer:function(W,L){W!=null&&W.url&&(W.url=function(V,X){X===void 0&&(X=["h264"]);var J=(X||["h264"]).reduce(function(ye,ae){return ae=ae.toLowerCase(),ye+(a[ae]||0)},0),le=V.split("?")[0],ce=V.split("?")[1];return ce=(ce||"").split("&").filter(function(ye){return!/^vc=\d?/.test(ye)}).join("&"),le+"?"+ce+(ce?"&":"")+"vc="+J}(W.url,["h264","h265"]));var U=W;if(U==null||typeof U!="object")throw new ge.Qn("MediaDataSource must be an javascript object!");if(!Object.prototype.hasOwnProperty.call(U,"type"))throw new ge.Qn("MediaDataSource must has type field to indicate video file type!");switch(U.type){case"mse":case"mpegts":case"m2ts":case"flv":return new nt(U,L);default:return new Ke(U,L)}},isSupported:function(){return v.supportMSEH264Playback()},getFeatureList:function(){return v.getFeatureList()},BaseLoader:S.HC,LoaderStatus:S.eO,LoaderErrors:S.Xv,version:"",Events:M,ErrorTypes:Be,ErrorDetails:De,MSEPlayer:nt,NativePlayer:Ke,LoggingControl:m.A};Object.defineProperty(We,"version",{enumerable:!0,get:function(){return"2.0.1"}});const Me=We},2671:(l,p,t)=>{var a=t(6458),n=t(2809),s=t(9211),h=t(497),E=t(5057),v=t(3732),S=function(){},B=E("Reflect","construct"),x=/^\s*(?:class|function)\b/,P=a(x.exec),M=!x.test(S),F=function(K){if(!s(K))return!1;try{return B(S,[],K),!0}catch{return!1}},G=function(K){if(!s(K))return!1;switch(h(K)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return M||!!P(x,v(K))}catch{return!0}};G.sham=!0,l.exports=!B||n(function(){var K;return F(F.call)||!F(Object)||!F(function(){K=!0})||K})?G:F},2719:(l,p,t)=>{var a=t(5273),n=t(5840);l.exports=function(s){return a(n(s))}},2757:(l,p,t)=>{var a=t(9615),n=TypeError;l.exports=function(s,h){if(a(h,s))return s;throw new n("Incorrect invocation")}},2792:(l,p,t)=>{var a=t(9646),n=t(2809);l.exports=a&&n(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42})},2807:(l,p,t)=>{var a=t(9047);l.exports=function(n,s){return new(a(n))(s===0?0:s)}},2809:l=>{l.exports=function(p){try{return!!p()}catch{return!0}}},2897:(l,p,t)=>{var a=t(9646),n=t(815),s=t(7403),h=t(6330),E=t(2719),v=t(4151),S=t(4347),B=t(6071),x=Object.getOwnPropertyDescriptor;p.f=a?x:function(P,M){if(P=E(P),M=v(M),B)try{return x(P,M)}catch{}if(S(P,M))return h(!n(s.f,P,M),P[M])}},2915:(l,p,t)=>{var a=t(7553),n=t(2327),s=a("iterator"),h=Array.prototype;l.exports=function(E){return E!==void 0&&(n.Array===E||h[s]===E)}},3074:(l,p,t)=>{var a=t(9364),n=t(9083),s=t(7642);a({target:"Object",stat:!0,forced:t(2809)(function(){s(1)})},{keys:function(h){return s(n(h))}})},3430:(l,p,t)=>{var a=t(6458),n=t(4347),s=t(2719),h=t(219).indexOf,E=t(7923),v=a([].push);l.exports=function(S,B){var x,P=s(S),M=0,F=[];for(x in P)!n(E,x)&&n(P,x)&&v(F,x);for(;B.length>M;)n(P,x=B[M++])&&(~h(F,x)||v(F,x));return F}},3439:(l,p,t)=>{var a=t(9646),n=t(6458),s=t(815),h=t(2809),E=t(7642),v=t(7819),S=t(7403),B=t(9083),x=t(5273),P=Object.assign,M=Object.defineProperty,F=n([].concat);l.exports=!P||h(function(){if(a&&P({b:1},P(M({},"a",{enumerable:!0,get:function(){M(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var G={},K={},H=Symbol("assign detection"),Z="abcdefghijklmnopqrst";return G[H]=7,Z.split("").forEach(function(ie){K[ie]=ie}),P({},G)[H]!==7||E(P({},K)).join("")!==Z})?function(G,K){for(var H=B(G),Z=arguments.length,ie=1,T=v.f,m=S.f;Z>ie;)for(var g,f=x(arguments[ie++]),O=T?F(E(f),T(f)):E(f),j=O.length,Q=0;j>Q;)g=O[Q++],a&&!s(m,f,g)||(H[g]=f[g]);return H}:P},3463:(l,p,t)=>{var a=t(775);l.exports=function(n,s){return a[n]||(a[n]=s||{})}},3478:(l,p,t)=>{var a=t(9646),n=t(1562),s=t(6458),h=t(4346),E=t(5405),v=t(9277),S=t(6122),B=t(2630).f,x=t(9615),P=t(9666),M=t(6677),F=t(1144),G=t(8587),K=t(9614),H=t(3930),Z=t(2809),ie=t(4347),T=t(3587).enforce,m=t(9603),g=t(7553),f=t(7517),O=t(6288),j=g("match"),Q=n.RegExp,ee=Q.prototype,ue=n.SyntaxError,fe=s(ee.exec),me=s("".charAt),ge=s("".replace),Oe=s("".indexOf),Ee=s("".slice),Be=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,De=/a/g,nt=/a/g,Ke=new Q(De)!==De,We=G.MISSED_STICKY,Me=G.UNSUPPORTED_Y;if(h("RegExp",a&&(!Ke||We||f||O||Z(function(){return nt[j]=!1,Q(De)!==De||Q(nt)===nt||String(Q(De,"i"))!=="/a/i"})))){for(var W=function(V,X){var J,le,ce,ye,ae,Ce,pe=x(ee,this),Re=P(V),Et=X===void 0,ct=[],Se=V;if(!pe&&Re&&Et&&V.constructor===W)return V;if((Re||x(ee,V))&&(V=V.source,Et&&(X=F(Se))),V=V===void 0?"":M(V),X=X===void 0?"":M(X),Se=V,f&&"dotAll"in De&&(le=!!X&&Oe(X,"s")>-1)&&(X=ge(X,/s/g,"")),J=X,We&&"sticky"in De&&(ce=!!X&&Oe(X,"y")>-1)&&Me&&(X=ge(X,/y/g,"")),O&&(ye=function(Ye){for(var rt,zt=Ye.length,Je=0,st="",bt=[],Tt=S(null),gt=!1,Vt=!1,xt=0,Pt="";Je<=zt;Je++){if((rt=me(Ye,Je))==="\\")rt+=me(Ye,++Je);else if(rt==="]")gt=!1;else if(!gt)switch(!0){case rt==="[":gt=!0;break;case rt==="(":if(st+=rt,Ee(Ye,Je+1,Je+3)==="?:")continue;fe(Be,Ee(Ye,Je+1))&&(Je+=2,Vt=!0),xt++;continue;case(rt===">"&&Vt):if(Pt===""||ie(Tt,Pt))throw new ue("Invalid capture group name");Tt[Pt]=!0,bt[bt.length]=[Pt,xt],Vt=!1,Pt="";continue}Vt?Pt+=rt:st+=rt}return[st,bt]}(V),V=ye[0],ct=ye[1]),ae=E(Q(V,X),pe?this:ee,W),(le||ce||ct.length)&&(Ce=T(ae),le&&(Ce.dotAll=!0,Ce.raw=W(function(Ye){for(var rt,zt=Ye.length,Je=0,st="",bt=!1;Je<=zt;Je++)(rt=me(Ye,Je))!=="\\"?bt||rt!=="."?(rt==="["?bt=!0:rt==="]"&&(bt=!1),st+=rt):st+="[\\s\\S]":st+=rt+me(Ye,++Je);return st}(V),J)),ce&&(Ce.sticky=!0),ct.length&&(Ce.groups=ct)),V!==Se)try{v(ae,"source",Se===""?"(?:)":Se)}catch{}return ae},L=B(Q),U=0;L.length>U;)K(W,Q,L[U++]);ee.constructor=W,W.prototype=ee,H(n,"RegExp",W,{constructor:!0})}m("RegExp")},3479:(l,p,t)=>{var a=t(5993);l.exports=a==="NODE"},3587:(l,p,t)=>{var a,n,s,h=t(4468),E=t(1562),v=t(4152),S=t(9277),B=t(4347),x=t(775),P=t(577),M=t(7923),F="Object already initialized",G=E.TypeError,K=E.WeakMap;if(h||x.state){var H=x.state||(x.state=new K);H.get=H.get,H.has=H.has,H.set=H.set,a=function(ie,T){if(H.has(ie))throw new G(F);return T.facade=ie,H.set(ie,T),T},n=function(ie){return H.get(ie)||{}},s=function(ie){return H.has(ie)}}else{var Z=P("state");M[Z]=!0,a=function(ie,T){if(B(ie,Z))throw new G(F);return T.facade=ie,S(ie,Z,T),T},n=function(ie){return B(ie,Z)?ie[Z]:{}},s=function(ie){return B(ie,Z)}}l.exports={set:a,get:n,has:s,enforce:function(ie){return s(ie)?n(ie):a(ie,{})},getterFor:function(ie){return function(T){var m;if(!v(T)||(m=n(T)).type!==ie)throw new G("Incompatible receiver, "+ie+" required");return m}}}},3643:(l,p,t)=>{var a=t(9646),n=t(6071),s=t(2792),h=t(7749),E=t(4151),v=TypeError,S=Object.defineProperty,B=Object.getOwnPropertyDescriptor,x="enumerable",P="configurable",M="writable";p.f=a?s?function(F,G,K){if(h(F),G=E(G),h(K),typeof F=="function"&&G==="prototype"&&"value"in K&&M in K&&!K[M]){var H=B(F,G);H&&H[M]&&(F[G]=K.value,K={configurable:P in K?K[P]:H[P],enumerable:x in K?K[x]:H[x],writable:!1})}return S(F,G,K)}:S:function(F,G,K){if(h(F),G=E(G),h(K),n)try{return S(F,G,K)}catch{}if("get"in K||"set"in K)throw new v("Accessors not supported");return"value"in K&&(F[G]=K.value),F}},3732:(l,p,t)=>{var a=t(6458),n=t(9211),s=t(775),h=a(Function.toString);n(s.inspectSource)||(s.inspectSource=function(E){return h(E)}),l.exports=s.inspectSource},3813:(l,p,t)=>{t(1541)(Math,"Math",!0)},3930:(l,p,t)=>{var a=t(9211),n=t(3643),s=t(4233),h=t(4191);l.exports=function(E,v,S,B){B||(B={});var x=B.enumerable,P=B.name!==void 0?B.name:v;if(a(S)&&s(S,P,B),B.global)x?E[v]=S:h(v,S);else{try{B.unsafe?E[v]&&(x=!0):delete E[v]}catch{}x?E[v]=S:n.f(E,v,{value:S,enumerable:!1,configurable:!B.nonConfigurable,writable:!B.nonWritable})}return E}},3992:(l,p,t)=>{var a=t(9364),n=t(5057),s=t(8891),h=t(815),E=t(6458),v=t(2809),S=t(9211),B=t(5727),x=t(8626),P=t(9695),M=t(7917),F=String,G=n("JSON","stringify"),K=E(/./.exec),H=E("".charAt),Z=E("".charCodeAt),ie=E("".replace),T=E(1 .toString),m=/[\uD800-\uDFFF]/g,g=/^[\uD800-\uDBFF]$/,f=/^[\uDC00-\uDFFF]$/,O=!M||v(function(){var ue=n("Symbol")("stringify detection");return G([ue])!=="[null]"||G({a:ue})!=="{}"||G(Object(ue))!=="{}"}),j=v(function(){return G("\uDF06\uD834")!=='"\\udf06\\ud834"'||G("\uDEAD")!=='"\\udead"'}),Q=function(ue,fe){var me=x(arguments),ge=P(fe);if(S(ge)||ue!==void 0&&!B(ue))return me[1]=function(Oe,Ee){if(S(ge)&&(Ee=h(ge,this,F(Oe),Ee)),!B(Ee))return Ee},s(G,null,me)},ee=function(ue,fe,me){var ge=H(me,fe-1),Oe=H(me,fe+1);return K(g,ue)&&!K(f,Oe)||K(f,ue)&&!K(g,ge)?"\\u"+T(Z(ue,0),16):ue};G&&a({target:"JSON",stat:!0,arity:3,forced:O||j},{stringify:function(ue,fe,me){var ge=x(arguments),Oe=s(O?Q:G,null,ge);return j&&typeof Oe=="string"?ie(Oe,m,ee):Oe}})},4151:(l,p,t)=>{var a=t(115),n=t(5727);l.exports=function(s){var h=a(s,"string");return n(h)?h:h+""}},4152:(l,p,t)=>{var a=t(9211);l.exports=function(n){return typeof n=="object"?n!==null:a(n)}},4160:(l,p,t)=>{var a=t(815),n=t(5057),s=t(7553),h=t(3930);l.exports=function(){var E=n("Symbol"),v=E&&E.prototype,S=v&&v.valueOf,B=s("toPrimitive");v&&!v[B]&&h(v,B,function(x){return a(S,this)},{arity:1})}},4191:(l,p,t)=>{var a=t(1562),n=Object.defineProperty;l.exports=function(s,h){try{n(a,s,{value:h,configurable:!0,writable:!0})}catch{a[s]=h}return h}},4220:(l,p,t)=>{t(6810);var a,n=t(9364),s=t(9646),h=t(6666),E=t(1562),v=t(7042),S=t(6458),B=t(3930),x=t(1176),P=t(2757),M=t(4347),F=t(3439),G=t(4478),K=t(8626),H=t(4417).codeAt,Z=t(4955),ie=t(6677),T=t(1541),m=t(594),g=t(648),f=t(3587),O=f.set,j=f.getterFor("URL"),Q=g.URLSearchParams,ee=g.getState,ue=E.URL,fe=E.TypeError,me=E.parseInt,ge=Math.floor,Oe=Math.pow,Ee=S("".charAt),Be=S(/./.exec),De=S([].join),nt=S(1 .toString),Ke=S([].pop),We=S([].push),Me=S("".replace),W=S([].shift),L=S("".split),U=S("".slice),V=S("".toLowerCase),X=S([].unshift),J="Invalid scheme",le="Invalid host",ce="Invalid port",ye=/[a-z]/i,ae=/[\d+-.a-z]/i,Ce=/\d/,pe=/^0x/i,Re=/^[0-7]+$/,Et=/^\d+$/,ct=/^[\da-f]+$/i,Se=/[\0\t\n\r #%/:<>?@[\\\]^|]/,Ye=/[\0\t\n\r #/:<>?@[\\\]^|]/,rt=/^[\u0000-\u0020]+/,zt=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,Je=/[\t\n\r]/g,st=function(_){var I,k,$,D;if(typeof _=="number"){for(I=[],k=0;k<4;k++)X(I,_%256),_=ge(_/256);return De(I,".")}if(typeof _=="object"){for(I="",$=function(N){for(var z=null,q=1,R=null,Y=0,se=0;se<8;se++)N[se]!==0?(Y>q&&(z=R,q=Y),R=null,Y=0):(R===null&&(R=se),++Y);return Y>q?R:z}(_),k=0;k<8;k++)D&&_[k]===0||(D&&(D=!1),$===k?(I+=k?":":"::",D=!0):(I+=nt(_[k],16),k<7&&(I+=":")));return"["+I+"]"}return _},bt={},Tt=F({},bt,{" ":1,'"':1,"<":1,">":1,"`":1}),gt=F({},Tt,{"#":1,"?":1,"{":1,"}":1}),Vt=F({},gt,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),xt=function(_,I){var k=H(_,0);return k>32&&k<127&&!M(I,_)?_:encodeURIComponent(_)},Pt={ftp:21,file:null,http:80,https:443,ws:80,wss:443},Kt=function(_,I){var k;return _.length===2&&Be(ye,Ee(_,0))&&((k=Ee(_,1))===":"||!I&&k==="|")},ti=function(_){var I;return _.length>1&&Kt(U(_,0,2))&&(_.length===2||(I=Ee(_,2))==="/"||I==="\\"||I==="?"||I==="#")},$e=function(_){return _==="."||V(_)==="%2e"},Ue={},Fe={},Xe={},ut={},si={},Xt={},he={},Te={},Ie={},xe={},ze={},it={},ht={},lt={},Rt={},St={},jt={},Zt={},Lt={},di={},c={},A=function(_,I,k){var $,D,N,z=ie(_);if(I){if(D=this.parse(z))throw new fe(D);this.searchParams=null}else{if(k!==void 0&&($=new A(k,!0)),D=this.parse(z,null,$))throw new fe(D);(N=ee(new Q)).bindURL(this),this.searchParams=N}};A.prototype={type:"URL",parse:function(_,I,k){var $,D,N,z,q,R=this,Y=I||Ue,se=0,re="",de=!1,oe=!1,_e=!1;for(_=ie(_),I||(R.scheme="",R.username="",R.password="",R.host=null,R.port=null,R.path=[],R.query=null,R.fragment=null,R.cannotBeABaseURL=!1,_=Me(_,rt,""),_=Me(_,zt,"$1")),_=Me(_,Je,""),$=G(_);se<=$.length;){switch(D=$[se],Y){case Ue:if(!D||!Be(ye,D)){if(I)return J;Y=Xe;continue}re+=V(D),Y=Fe;break;case Fe:if(D&&(Be(ae,D)||D==="+"||D==="-"||D==="."))re+=V(D);else{if(D!==":"){if(I)return J;re="",Y=Xe,se=0;continue}if(I&&(R.isSpecial()!==M(Pt,re)||re==="file"&&(R.includesCredentials()||R.port!==null)||R.scheme==="file"&&!R.host))return;if(R.scheme=re,I)return void(R.isSpecial()&&Pt[R.scheme]===R.port&&(R.port=null));re="",R.scheme==="file"?Y=lt:R.isSpecial()&&k&&k.scheme===R.scheme?Y=ut:R.isSpecial()?Y=Te:$[se+1]==="/"?(Y=si,se++):(R.cannotBeABaseURL=!0,We(R.path,""),Y=Lt)}break;case Xe:if(!k||k.cannotBeABaseURL&&D!=="#")return J;if(k.cannotBeABaseURL&&D==="#"){R.scheme=k.scheme,R.path=K(k.path),R.query=k.query,R.fragment="",R.cannotBeABaseURL=!0,Y=c;break}Y=k.scheme==="file"?lt:Xt;continue;case ut:if(D!=="/"||$[se+1]!=="/"){Y=Xt;continue}Y=Ie,se++;break;case si:if(D==="/"){Y=xe;break}Y=Zt;continue;case Xt:if(R.scheme=k.scheme,D===a)R.username=k.username,R.password=k.password,R.host=k.host,R.port=k.port,R.path=K(k.path),R.query=k.query;else if(D==="/"||D==="\\"&&R.isSpecial())Y=he;else if(D==="?")R.username=k.username,R.password=k.password,R.host=k.host,R.port=k.port,R.path=K(k.path),R.query="",Y=di;else{if(D!=="#"){R.username=k.username,R.password=k.password,R.host=k.host,R.port=k.port,R.path=K(k.path),R.path.length--,Y=Zt;continue}R.username=k.username,R.password=k.password,R.host=k.host,R.port=k.port,R.path=K(k.path),R.query=k.query,R.fragment="",Y=c}break;case he:if(!R.isSpecial()||D!=="/"&&D!=="\\"){if(D!=="/"){R.username=k.username,R.password=k.password,R.host=k.host,R.port=k.port,Y=Zt;continue}Y=xe}else Y=Ie;break;case Te:if(Y=Ie,D!=="/"||Ee(re,se+1)!=="/")continue;se++;break;case Ie:if(D!=="/"&&D!=="\\"){Y=xe;continue}break;case xe:if(D==="@"){de&&(re="%40"+re),de=!0,N=G(re);for(var ve=0;ve<N.length;ve++){var Ae=N[ve];if(Ae!==":"||_e){var Le=xt(Ae,Vt);_e?R.password+=Le:R.username+=Le}else _e=!0}re=""}else if(D===a||D==="/"||D==="?"||D==="#"||D==="\\"&&R.isSpecial()){if(de&&re==="")return"Invalid authority";se-=G(re).length+1,re="",Y=ze}else re+=D;break;case ze:case it:if(I&&R.scheme==="file"){Y=St;continue}if(D!==":"||oe){if(D===a||D==="/"||D==="?"||D==="#"||D==="\\"&&R.isSpecial()){if(R.isSpecial()&&re==="")return le;if(I&&re===""&&(R.includesCredentials()||R.port!==null))return;if(z=R.parseHost(re))return z;if(re="",Y=jt,I)return;continue}D==="["?oe=!0:D==="]"&&(oe=!1),re+=D}else{if(re==="")return le;if(z=R.parseHost(re))return z;if(re="",Y=ht,I===it)return}break;case ht:if(!Be(Ce,D)){if(D===a||D==="/"||D==="?"||D==="#"||D==="\\"&&R.isSpecial()||I){if(re!==""){var we=me(re,10);if(we>65535)return ce;R.port=R.isSpecial()&&we===Pt[R.scheme]?null:we,re=""}if(I)return;Y=jt;continue}return ce}re+=D;break;case lt:if(R.scheme="file",D==="/"||D==="\\")Y=Rt;else{if(!k||k.scheme!=="file"){Y=Zt;continue}switch(D){case a:R.host=k.host,R.path=K(k.path),R.query=k.query;break;case"?":R.host=k.host,R.path=K(k.path),R.query="",Y=di;break;case"#":R.host=k.host,R.path=K(k.path),R.query=k.query,R.fragment="",Y=c;break;default:ti(De(K($,se),""))||(R.host=k.host,R.path=K(k.path),R.shortenPath()),Y=Zt;continue}}break;case Rt:if(D==="/"||D==="\\"){Y=St;break}k&&k.scheme==="file"&&!ti(De(K($,se),""))&&(Kt(k.path[0],!0)?We(R.path,k.path[0]):R.host=k.host),Y=Zt;continue;case St:if(D===a||D==="/"||D==="\\"||D==="?"||D==="#"){if(!I&&Kt(re))Y=Zt;else if(re===""){if(R.host="",I)return;Y=jt}else{if(z=R.parseHost(re))return z;if(R.host==="localhost"&&(R.host=""),I)return;re="",Y=jt}continue}re+=D;break;case jt:if(R.isSpecial()){if(Y=Zt,D!=="/"&&D!=="\\")continue}else if(I||D!=="?")if(I||D!=="#"){if(D!==a&&(Y=Zt,D!=="/"))continue}else R.fragment="",Y=c;else R.query="",Y=di;break;case Zt:if(D===a||D==="/"||D==="\\"&&R.isSpecial()||!I&&(D==="?"||D==="#")){if((q=V(q=re))===".."||q==="%2e."||q===".%2e"||q==="%2e%2e"?(R.shortenPath(),D==="/"||D==="\\"&&R.isSpecial()||We(R.path,"")):$e(re)?D==="/"||D==="\\"&&R.isSpecial()||We(R.path,""):(R.scheme==="file"&&!R.path.length&&Kt(re)&&(R.host&&(R.host=""),re=Ee(re,0)+":"),We(R.path,re)),re="",R.scheme==="file"&&(D===a||D==="?"||D==="#"))for(;R.path.length>1&&R.path[0]==="";)W(R.path);D==="?"?(R.query="",Y=di):D==="#"&&(R.fragment="",Y=c)}else re+=xt(D,gt);break;case Lt:D==="?"?(R.query="",Y=di):D==="#"?(R.fragment="",Y=c):D!==a&&(R.path[0]+=xt(D,bt));break;case di:I||D!=="#"?D!==a&&(D==="'"&&R.isSpecial()?R.query+="%27":R.query+=D==="#"?"%23":xt(D,bt)):(R.fragment="",Y=c);break;case c:D!==a&&(R.fragment+=xt(D,Tt))}se++}},parseHost:function(_){var I,k,$;if(Ee(_,0)==="["){if(Ee(_,_.length-1)!=="]"||(I=function(D){var N,z,q,R,Y,se,re,de=[0,0,0,0,0,0,0,0],oe=0,_e=null,ve=0,Ae=function(){return Ee(D,ve)};if(Ae()===":"){if(Ee(D,1)!==":")return;ve+=2,_e=++oe}for(;Ae();){if(oe===8)return;if(Ae()!==":"){for(N=z=0;z<4&&Be(ct,Ae());)N=16*N+me(Ae(),16),ve++,z++;if(Ae()==="."){if(z===0||(ve-=z,oe>6))return;for(q=0;Ae();){if(R=null,q>0){if(!(Ae()==="."&&q<4))return;ve++}if(!Be(Ce,Ae()))return;for(;Be(Ce,Ae());){if(Y=me(Ae(),10),R===null)R=Y;else{if(R===0)return;R=10*R+Y}if(R>255)return;ve++}de[oe]=256*de[oe]+R,++q!=2&&q!==4||oe++}if(q!==4)return;break}if(Ae()===":"){if(ve++,!Ae())return}else if(Ae())return;de[oe++]=N}else{if(_e!==null)return;ve++,_e=++oe}}if(_e!==null)for(se=oe-_e,oe=7;oe!==0&&se>0;)re=de[oe],de[oe--]=de[_e+se-1],de[_e+--se]=re;else if(oe!==8)return;return de}(U(_,1,-1)),!I))return le;this.host=I}else if(this.isSpecial()){if(_=Z(_),Be(Se,_)||(I=function(D){var N,z,q,R,Y,se,re,de=L(D,".");if(de.length&&de[de.length-1]===""&&de.length--,(N=de.length)>4)return D;for(z=[],q=0;q<N;q++){if((R=de[q])==="")return D;if(Y=10,R.length>1&&Ee(R,0)==="0"&&(Y=Be(pe,R)?16:8,R=U(R,Y===8?1:2)),R==="")se=0;else{if(!Be(Y===10?Et:Y===8?Re:ct,R))return D;se=me(R,Y)}We(z,se)}for(q=0;q<N;q++)if(se=z[q],q===N-1){if(se>=Oe(256,5-N))return null}else if(se>255)return null;for(re=Ke(z),q=0;q<z.length;q++)re+=z[q]*Oe(256,3-q);return re}(_),I===null))return le;this.host=I}else{if(Be(Ye,_))return le;for(I="",k=G(_),$=0;$<k.length;$++)I+=xt(k[$],bt);this.host=I}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||this.scheme==="file"},includesCredentials:function(){return this.username!==""||this.password!==""},isSpecial:function(){return M(Pt,this.scheme)},shortenPath:function(){var _=this.path,I=_.length;!I||this.scheme==="file"&&I===1&&Kt(_[0],!0)||_.length--},serialize:function(){var _=this,I=_.scheme,k=_.username,$=_.password,D=_.host,N=_.port,z=_.path,q=_.query,R=_.fragment,Y=I+":";return D!==null?(Y+="//",_.includesCredentials()&&(Y+=k+($?":"+$:"")+"@"),Y+=st(D),N!==null&&(Y+=":"+N)):I==="file"&&(Y+="//"),Y+=_.cannotBeABaseURL?z[0]:z.length?"/"+De(z,"/"):"",q!==null&&(Y+="?"+q),R!==null&&(Y+="#"+R),Y},setHref:function(_){var I=this.parse(_);if(I)throw new fe(I);this.searchParams.update()},getOrigin:function(){var _=this.scheme,I=this.port;if(_==="blob")try{return new o(_.path[0]).origin}catch{return"null"}return _!=="file"&&this.isSpecial()?_+"://"+st(this.host)+(I!==null?":"+I:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(_){this.parse(ie(_)+":",Ue)},getUsername:function(){return this.username},setUsername:function(_){var I=G(ie(_));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var k=0;k<I.length;k++)this.username+=xt(I[k],Vt)}},getPassword:function(){return this.password},setPassword:function(_){var I=G(ie(_));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var k=0;k<I.length;k++)this.password+=xt(I[k],Vt)}},getHost:function(){var _=this.host,I=this.port;return _===null?"":I===null?st(_):st(_)+":"+I},setHost:function(_){this.cannotBeABaseURL||this.parse(_,ze)},getHostname:function(){var _=this.host;return _===null?"":st(_)},setHostname:function(_){this.cannotBeABaseURL||this.parse(_,it)},getPort:function(){var _=this.port;return _===null?"":ie(_)},setPort:function(_){this.cannotHaveUsernamePasswordPort()||((_=ie(_))===""?this.port=null:this.parse(_,ht))},getPathname:function(){var _=this.path;return this.cannotBeABaseURL?_[0]:_.length?"/"+De(_,"/"):""},setPathname:function(_){this.cannotBeABaseURL||(this.path=[],this.parse(_,jt))},getSearch:function(){var _=this.query;return _?"?"+_:""},setSearch:function(_){(_=ie(_))===""?this.query=null:(Ee(_,0)==="?"&&(_=U(_,1)),this.query="",this.parse(_,di)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var _=this.fragment;return _?"#"+_:""},setHash:function(_){(_=ie(_))!==""?(Ee(_,0)==="#"&&(_=U(_,1)),this.fragment="",this.parse(_,c)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var o=function(_){var I=P(this,r),k=m(arguments.length,1)>1?arguments[1]:void 0,$=O(I,new A(_,!1,k));s||(I.href=$.serialize(),I.origin=$.getOrigin(),I.protocol=$.getProtocol(),I.username=$.getUsername(),I.password=$.getPassword(),I.host=$.getHost(),I.hostname=$.getHostname(),I.port=$.getPort(),I.pathname=$.getPathname(),I.search=$.getSearch(),I.searchParams=$.getSearchParams(),I.hash=$.getHash())},r=o.prototype,y=function(_,I){return{get:function(){return j(this)[_]()},set:I&&function(k){return j(this)[I](k)},configurable:!0,enumerable:!0}};if(s&&(x(r,"href",y("serialize","setHref")),x(r,"origin",y("getOrigin")),x(r,"protocol",y("getProtocol","setProtocol")),x(r,"username",y("getUsername","setUsername")),x(r,"password",y("getPassword","setPassword")),x(r,"host",y("getHost","setHost")),x(r,"hostname",y("getHostname","setHostname")),x(r,"port",y("getPort","setPort")),x(r,"pathname",y("getPathname","setPathname")),x(r,"search",y("getSearch","setSearch")),x(r,"searchParams",y("getSearchParams")),x(r,"hash",y("getHash","setHash"))),B(r,"toJSON",function(){return j(this).serialize()},{enumerable:!0}),B(r,"toString",function(){return j(this).serialize()},{enumerable:!0}),ue){var C=ue.createObjectURL,w=ue.revokeObjectURL;C&&B(o,"createObjectURL",v(C,ue)),w&&B(o,"revokeObjectURL",v(w,ue))}T(o,"URL"),n({global:!0,constructor:!0,forced:!h,sham:!s},{URL:o})},4233:(l,p,t)=>{var a=t(6458),n=t(2809),s=t(9211),h=t(4347),E=t(9646),v=t(6656).CONFIGURABLE,S=t(3732),B=t(3587),x=B.enforce,P=B.get,M=String,F=Object.defineProperty,G=a("".slice),K=a("".replace),H=a([].join),Z=E&&!n(function(){return F(function(){},"length",{value:8}).length!==8}),ie=String(String).split("String"),T=l.exports=function(m,g,f){G(M(g),0,7)==="Symbol("&&(g="["+K(M(g),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),f&&f.getter&&(g="get "+g),f&&f.setter&&(g="set "+g),(!h(m,"name")||v&&m.name!==g)&&(E?F(m,"name",{value:g,configurable:!0}):m.name=g),Z&&f&&h(f,"arity")&&m.length!==f.arity&&F(m,"length",{value:f.arity});try{f&&h(f,"constructor")&&f.constructor?E&&F(m,"prototype",{writable:!1}):m.prototype&&(m.prototype=void 0)}catch{}var O=x(m);return h(O,"source")||(O.source=H(ie,typeof g=="string"?g:"")),m};Function.prototype.toString=T(function(){return s(this)&&P(this).source||S(this)},"toString")},4346:(l,p,t)=>{var a=t(2809),n=t(9211),s=/#|\.prototype\./,h=function(x,P){var M=v[E(x)];return M===B||M!==S&&(n(P)?a(P):!!P)},E=h.normalize=function(x){return String(x).replace(s,".").toLowerCase()},v=h.data={},S=h.NATIVE="N",B=h.POLYFILL="P";l.exports=h},4347:(l,p,t)=>{var a=t(6458),n=t(9083),s=a({}.hasOwnProperty);l.exports=Object.hasOwn||function(h,E){return s(n(h),E)}},4383:(l,p,t)=>{t.d(p,{Al:()=>s,Qn:()=>E,Xu:()=>v,j4:()=>h});var a,n=(a=function(S,B){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,P){x.__proto__=P}||function(x,P){for(var M in P)Object.prototype.hasOwnProperty.call(P,M)&&(x[M]=P[M])},a(S,B)},function(S,B){if(typeof B!="function"&&B!==null)throw new TypeError("Class extends value "+String(B)+" is not a constructor or null");function x(){this.constructor=S}a(S,B),S.prototype=B===null?Object.create(B):(x.prototype=B.prototype,new x)}),s=function(){function S(B){this.name="RuntimeException",this._message=B}return Object.defineProperty(S.prototype,"message",{get:function(){return this._message},enumerable:!1,configurable:!0}),S.prototype.toString=function(){return this.name+": "+this.message},S}(),h=function(S){function B(x){var P=S.call(this,x)||this;return P.name="IllegalStateException",P}return n(B,S),B}(s),E=function(S){function B(x){var P=S.call(this,x)||this;return P.name="InvalidArgumentException",P}return n(B,S),B}(s),v=function(S){function B(x){var P=S.call(this,x)||this;return P.name="NotImplementedException",P}return n(B,S),B}(s)},4417:(l,p,t)=>{var a=t(6458),n=t(4685),s=t(6677),h=t(5840),E=a("".charAt),v=a("".charCodeAt),S=a("".slice),B=function(x){return function(P,M){var F,G,K=s(h(P)),H=n(M),Z=K.length;return H<0||H>=Z?x?"":void 0:(F=v(K,H))<55296||F>56319||H+1===Z||(G=v(K,H+1))<56320||G>57343?x?E(K,H):F:x?S(K,H,H+2):G-56320+(F-55296<<10)+65536}};l.exports={codeAt:B(!1),charAt:B(!0)}},4468:(l,p,t)=>{var a=t(1562),n=t(9211),s=a.WeakMap;l.exports=n(s)&&/native code/.test(String(s))},4478:(l,p,t)=>{var a=t(7042),n=t(815),s=t(9083),h=t(5957),E=t(2915),v=t(2671),S=t(256),B=t(8286),x=t(279),P=t(9273),M=Array;l.exports=function(F){var G=s(F),K=v(this),H=arguments.length,Z=H>1?arguments[1]:void 0,ie=Z!==void 0;ie&&(Z=a(Z,H>2?arguments[2]:void 0));var T,m,g,f,O,j,Q=P(G),ee=0;if(!Q||this===M&&E(Q))for(T=S(G),m=K?new this(T):M(T);T>ee;ee++)j=ie?Z(G[ee],ee):G[ee],B(m,ee,j);else for(m=K?new this:[],O=(f=x(G,Q)).next;!(g=n(O,f)).done;ee++)j=ie?h(f,Z,[g.value,ee],!0):g.value,B(m,ee,j);return m.length=ee,m}},4579:(l,p,t)=>{var a=t(9364),n=t(6458),s=t(7024),h=RangeError,E=String.fromCharCode,v=String.fromCodePoint,S=n([].join);a({target:"String",stat:!0,arity:1,forced:!!v&&v.length!==1},{fromCodePoint:function(B){for(var x,P=[],M=arguments.length,F=0;M>F;){if(x=+arguments[F++],s(x,1114111)!==x)throw new h(x+" is not a valid code point");P[F]=x<65536?E(x):E(55296+((x-=65536)>>10),x%1024+56320)}return S(P,"")}})},4659:(l,p,t)=>{var a=t(9364),n=t(9646),s=t(3643).f;a({target:"Object",stat:!0,forced:Object.defineProperty!==s,sham:!n},{defineProperty:s})},4685:(l,p,t)=>{var a=t(9879);l.exports=function(n){var s=+n;return s!=s||s===0?0:a(s)}},4715:(l,p,t)=>{var a=t(5057);l.exports=a("document","documentElement")},4742:(l,p,t)=>{var a=t(9364),n=t(1684).left,s=t(5888),h=t(4941);a({target:"Array",proto:!0,forced:!t(3479)&&h>79&&h<83||!s("reduce")},{reduce:function(E){var v=arguments.length;return n(this,E,v,v>1?arguments[1]:void 0)}})},4879:(l,p,t)=>{var a=t(1562),n=t(9402),s=t(62),h=t(2578),E=t(9277),v=t(1541),S=t(7553)("iterator"),B=h.values,x=function(M,F){if(M){if(M[S]!==B)try{E(M,S,B)}catch{M[S]=B}if(v(M,F,!0),n[F]){for(var G in h)if(M[G]!==h[G])try{E(M,G,h[G])}catch{M[G]=h[G]}}}};for(var P in n)x(a[P]&&a[P].prototype,P);x(s,"DOMTokenList")},4884:(l,p,t)=>{var a=t(526),n=t(2719),s=t(2630).f,h=t(8626),E=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];l.exports.f=function(v){return E&&a(v)==="Window"?function(S){try{return s(S)}catch{return h(E)}}(v):s(n(v))}},4941:(l,p,t)=>{var a,n,s=t(1562),h=t(8053),E=s.process,v=s.Deno,S=E&&E.versions||v&&v.version,B=S&&S.v8;B&&(n=(a=B.split("."))[0]>0&&a[0]<4?1:+(a[0]+a[1])),!n&&h&&(!(a=h.match(/Edge\/(\d+)/))||a[1]>=74)&&(a=h.match(/Chrome\/(\d+)/))&&(n=+a[1]),l.exports=n},4955:(l,p,t)=>{var a=t(6458),n=2147483647,s=/[^\0-\u007E]/,h=/[.\u3002\uFF0E\uFF61]/g,E="Overflow: input needs wider integers to process",v=RangeError,S=a(h.exec),B=Math.floor,x=String.fromCharCode,P=a("".charCodeAt),M=a([].join),F=a([].push),G=a("".replace),K=a("".split),H=a("".toLowerCase),Z=function(m){return m+22+75*(m<26)},ie=function(m,g,f){var O=0;for(m=f?B(m/700):m>>1,m+=B(m/g);m>455;)m=B(m/35),O+=36;return B(O+36*m/(m+38))},T=function(m){var g=[];m=function(We){for(var Me=[],W=0,L=We.length;W<L;){var U=P(We,W++);if(U>=55296&&U<=56319&&W<L){var V=P(We,W++);(64512&V)==56320?F(Me,((1023&U)<<10)+(1023&V)+65536):(F(Me,U),W--)}else F(Me,U)}return Me}(m);var f,O,j=m.length,Q=128,ee=0,ue=72;for(f=0;f<m.length;f++)(O=m[f])<128&&F(g,x(O));var fe=g.length,me=fe;for(fe&&F(g,"-");me<j;){var ge=n;for(f=0;f<m.length;f++)(O=m[f])>=Q&&O<ge&&(ge=O);var Oe=me+1;if(ge-Q>B((n-ee)/Oe))throw new v(E);for(ee+=(ge-Q)*Oe,Q=ge,f=0;f<m.length;f++){if((O=m[f])<Q&&++ee>n)throw new v(E);if(O===Q){for(var Ee=ee,Be=36;;){var De=Be<=ue?1:Be>=ue+26?26:Be-ue;if(Ee<De)break;var nt=Ee-De,Ke=36-De;F(g,x(Z(De+nt%Ke))),Ee=B(nt/Ke),Be+=36}F(g,x(Z(Ee))),ue=ie(ee,Oe,me===fe),ee=0,me++}}ee++,Q++}return M(g,"")};l.exports=function(m){var g,f,O=[],j=K(G(H(m),h,"."),".");for(g=0;g<j.length;g++)f=j[g],F(O,S(s,f)?"xn--"+T(f):f);return M(O,".")}},4979:(l,p,t)=>{var a=t(7042),n=t(6458),s=t(5273),h=t(9083),E=t(256),v=t(2807),S=n([].push),B=function(x){var P=x===1,M=x===2,F=x===3,G=x===4,K=x===6,H=x===7,Z=x===5||K;return function(ie,T,m,g){for(var f,O,j=h(ie),Q=s(j),ee=E(Q),ue=a(T,m),fe=0,me=g||v,ge=P?me(ie,ee):M||H?me(ie,0):void 0;ee>fe;fe++)if((Z||fe in Q)&&(O=ue(f=Q[fe],fe,j),x))if(P)ge[fe]=O;else if(O)switch(x){case 3:return!0;case 5:return f;case 6:return fe;case 2:S(ge,f)}else switch(x){case 4:return!1;case 7:S(ge,f)}return K?-1:F||G?G:ge}};l.exports={forEach:B(0),map:B(1),filter:B(2),some:B(3),every:B(4),find:B(5),findIndex:B(6),filterReject:B(7)}},4985:l=>{var p=String;l.exports=function(t){try{return p(t)}catch{return"Object"}}},5057:(l,p,t)=>{var a=t(1562),n=t(9211);l.exports=function(s,h){return arguments.length<2?(E=a[s],n(E)?E:void 0):a[s]&&a[s][h];var E}},5273:(l,p,t)=>{var a=t(6458),n=t(2809),s=t(526),h=Object,E=a("".split);l.exports=n(function(){return!h("z").propertyIsEnumerable(0)})?function(v){return s(v)==="String"?E(v,""):h(v)}:h},5307:l=>{var p=Object.prototype.hasOwnProperty,t="~";function a(){}function n(v,S,B){this.fn=v,this.context=S,this.once=B||!1}function s(v,S,B,x,P){if(typeof B!="function")throw new TypeError("The listener must be a function");var M=new n(B,x||v,P),F=t?t+S:S;return v._events[F]?v._events[F].fn?v._events[F]=[v._events[F],M]:v._events[F].push(M):(v._events[F]=M,v._eventsCount++),v}function h(v,S){--v._eventsCount==0?v._events=new a:delete v._events[S]}function E(){this._events=new a,this._eventsCount=0}Object.create&&(a.prototype=Object.create(null),new a().__proto__||(t=!1)),E.prototype.eventNames=function(){var v,S,B=[];if(this._eventsCount===0)return B;for(S in v=this._events)p.call(v,S)&&B.push(t?S.slice(1):S);return Object.getOwnPropertySymbols?B.concat(Object.getOwnPropertySymbols(v)):B},E.prototype.listeners=function(v){var S=t?t+v:v,B=this._events[S];if(!B)return[];if(B.fn)return[B.fn];for(var x=0,P=B.length,M=new Array(P);x<P;x++)M[x]=B[x].fn;return M},E.prototype.listenerCount=function(v){var S=t?t+v:v,B=this._events[S];return B?B.fn?1:B.length:0},E.prototype.emit=function(v,S,B,x,P,M){var F=t?t+v:v;if(!this._events[F])return!1;var G,K,H=this._events[F],Z=arguments.length;if(H.fn){switch(H.once&&this.removeListener(v,H.fn,void 0,!0),Z){case 1:return H.fn.call(H.context),!0;case 2:return H.fn.call(H.context,S),!0;case 3:return H.fn.call(H.context,S,B),!0;case 4:return H.fn.call(H.context,S,B,x),!0;case 5:return H.fn.call(H.context,S,B,x,P),!0;case 6:return H.fn.call(H.context,S,B,x,P,M),!0}for(K=1,G=new Array(Z-1);K<Z;K++)G[K-1]=arguments[K];H.fn.apply(H.context,G)}else{var ie,T=H.length;for(K=0;K<T;K++)switch(H[K].once&&this.removeListener(v,H[K].fn,void 0,!0),Z){case 1:H[K].fn.call(H[K].context);break;case 2:H[K].fn.call(H[K].context,S);break;case 3:H[K].fn.call(H[K].context,S,B);break;case 4:H[K].fn.call(H[K].context,S,B,x);break;default:if(!G)for(ie=1,G=new Array(Z-1);ie<Z;ie++)G[ie-1]=arguments[ie];H[K].fn.apply(H[K].context,G)}}return!0},E.prototype.on=function(v,S,B){return s(this,v,S,B,!1)},E.prototype.once=function(v,S,B){return s(this,v,S,B,!0)},E.prototype.removeListener=function(v,S,B,x){var P=t?t+v:v;if(!this._events[P])return this;if(!S)return h(this,P),this;var M=this._events[P];if(M.fn)M.fn!==S||x&&!M.once||B&&M.context!==B||h(this,P);else{for(var F=0,G=[],K=M.length;F<K;F++)(M[F].fn!==S||x&&!M[F].once||B&&M[F].context!==B)&&G.push(M[F]);G.length?this._events[P]=G.length===1?G[0]:G:h(this,P)}return this},E.prototype.removeAllListeners=function(v){var S;return v?(S=t?t+v:v,this._events[S]&&h(this,S)):(this._events=new a,this._eventsCount=0),this},E.prototype.off=E.prototype.removeListener,E.prototype.addListener=E.prototype.on,E.prefixed=t,E.EventEmitter=E,l.exports=E},5336:(l,p,t)=>{var a=t(9364),n=t(6458),s=t(5273),h=t(2719),E=t(5888),v=n([].join);a({target:"Array",proto:!0,forced:s!==Object||!E("join",",")},{join:function(S){return v(h(this),S===void 0?",":S)}})},5347:(l,p,t)=>{var a=t(9364),n=t(2377);a({target:"Array",proto:!0,forced:[].forEach!==n},{forEach:n})},5405:(l,p,t)=>{var a=t(9211),n=t(4152),s=t(6641);l.exports=function(h,E,v){var S,B;return s&&a(S=E.constructor)&&S!==v&&n(B=S.prototype)&&B!==v.prototype&&s(h,B),h}},5597:(l,p,t)=>{var a=t(9364),n=t(9377);a({target:"RegExp",proto:!0,forced:/./.exec!==n},{exec:n})},5599:l=>{l.exports=function(p){return p==null}},5716:(l,p,t)=>{var a=t(6458),n=t(9083),s=Math.floor,h=a("".charAt),E=a("".replace),v=a("".slice),S=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,B=/\$([$&'`]|\d{1,2})/g;l.exports=function(x,P,M,F,G,K){var H=M+x.length,Z=F.length,ie=B;return G!==void 0&&(G=n(G),ie=S),E(K,ie,function(T,m){var g;switch(h(m,0)){case"$":return"$";case"&":return x;case"`":return v(P,0,M);case"'":return v(P,H);case"<":g=G[v(m,1,-1)];break;default:var f=+m;if(f===0)return T;if(f>Z){var O=s(f/10);return O===0?T:O<=Z?F[O-1]===void 0?h(m,1):F[O-1]+h(m,1):T}g=F[f-1]}return g===void 0?"":g})}},5727:(l,p,t)=>{var a=t(5057),n=t(9211),s=t(9615),h=t(9742),E=Object;l.exports=h?function(v){return typeof v=="symbol"}:function(v){var S=a("Symbol");return n(S)&&s(S.prototype,E(v))}},5736:(l,p,t)=>{var a=t(9211),n=t(4985),s=TypeError;l.exports=function(h){if(a(h))return h;throw new s(n(h)+" is not a function")}},5758:(l,p,t)=>{var a=t(9364),n=t(4979).filter;a({target:"Array",proto:!0,forced:!t(8611)("filter")},{filter:function(s){return n(this,s,arguments.length>1?arguments[1]:void 0)}})},5810:(l,p,t)=>{var a=t(526);l.exports=Array.isArray||function(n){return a(n)==="Array"}},5840:(l,p,t)=>{var a=t(5599),n=TypeError;l.exports=function(s){if(a(s))throw new n("Can't call method on "+s);return s}},5888:(l,p,t)=>{var a=t(2809);l.exports=function(n,s){var h=[][n];return!!h&&a(function(){h.call(null,s||function(){return 1},1)})}},5957:(l,p,t)=>{var a=t(7749),n=t(8401);l.exports=function(s,h,E,v){try{return v?h(a(E)[0],E[1]):h(E)}catch(S){n(s,"throw",S)}}},5993:(l,p,t)=>{var a=t(1562),n=t(8053),s=t(526),h=function(E){return n.slice(0,E.length)===E};l.exports=h("Bun/")?"BUN":h("Cloudflare-Workers")?"CLOUDFLARE":h("Deno/")?"DENO":h("Node.js/")?"NODE":a.Bun&&typeof Bun.version=="string"?"BUN":a.Deno&&typeof Deno.version=="object"?"DENO":s(a.process)==="process"?"NODE":a.window&&a.document?"BROWSER":"REST"},6033:(l,p,t)=>{var a=t(1562);t(1541)(a.JSON,"JSON",!0)},6041:(l,p,t)=>{t(7267),t(804),t(1766),t(3992),t(947)},6071:(l,p,t)=>{var a=t(9646),n=t(2809),s=t(1465);l.exports=!a&&!n(function(){return Object.defineProperty(s("div"),"a",{get:function(){return 7}}).a!==7})},6122:(l,p,t)=>{var a,n=t(7749),s=t(7815),h=t(6853),E=t(7923),v=t(4715),S=t(1465),B=t(577),x="prototype",P="script",M=B("IE_PROTO"),F=function(){},G=function(Z){return"<"+P+">"+Z+"</"+P+">"},K=function(Z){Z.write(G("")),Z.close();var ie=Z.parentWindow.Object;return Z=null,ie},H=function(){try{a=new ActiveXObject("htmlfile")}catch{}var Z,ie,T;H=typeof document<"u"?document.domain&&a?K(a):(ie=S("iframe"),T="java"+P+":",ie.style.display="none",v.appendChild(ie),ie.src=String(T),(Z=ie.contentWindow.document).open(),Z.write(G("document.F=Object")),Z.close(),Z.F):K(a);for(var m=h.length;m--;)delete H[x][h[m]];return H()};E[M]=!0,l.exports=Object.create||function(Z,ie){var T;return Z!==null?(F[x]=n(Z),T=new F,F[x]=null,T[M]=Z):T=H(),ie===void 0?T:s.f(T,ie)}},6263:(l,p,t)=>{var a=t(6656).PROPER,n=t(3930),s=t(7749),h=t(6677),E=t(2809),v=t(1144),S="toString",B=RegExp.prototype,x=B[S],P=E(function(){return x.call({source:"a",flags:"b"})!=="/a/b"}),M=a&&x.name!==S;(P||M)&&n(B,S,function(){var F=s(this);return"/"+h(F.source)+"/"+h(v(F))},{unsafe:!0})},6285:(l,p,t)=>{var a=t(1562);l.exports=a},6288:(l,p,t)=>{var a=t(2809),n=t(1562).RegExp;l.exports=a(function(){var s=n("(?<a>b)","g");return s.exec("b").groups.a!=="b"||"b".replace(s,"$<a>c")!=="bc"})},6330:l=>{l.exports=function(p,t){return{enumerable:!(1&p),configurable:!(2&p),writable:!(4&p),value:t}}},6383:(l,p,t)=>{var a=t(9364),n=t(1562);a({global:!0,forced:n.globalThis!==n},{globalThis:n})},6399:(l,p,t)=>{t.d(p,{A:()=>a});const a={OK:"OK",FORMAT_ERROR:"FormatError",FORMAT_UNSUPPORTED:"FormatUnsupported",CODEC_UNSUPPORTED:"CodecUnsupported"}},6458:(l,p,t)=>{var a=t(6898),n=Function.prototype,s=n.call,h=a&&n.bind.bind(s,s);l.exports=a?h:function(E){return function(){return s.apply(E,arguments)}}},6641:(l,p,t)=>{var a=t(1432),n=t(4152),s=t(5840),h=t(1068);l.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var E,v=!1,S={};try{(E=a(Object.prototype,"__proto__","set"))(S,[]),v=S instanceof Array}catch{}return function(B,x){return s(B),h(x),n(B)&&(v?E(B,x):B.__proto__=x),B}}():void 0)},6656:(l,p,t)=>{var a=t(9646),n=t(4347),s=Function.prototype,h=a&&Object.getOwnPropertyDescriptor,E=n(s,"name"),v=E&&(function(){}).name==="something",S=E&&(!a||a&&h(s,"name").configurable);l.exports={EXISTS:E,PROPER:v,CONFIGURABLE:S}},6666:(l,p,t)=>{var a=t(2809),n=t(7553),s=t(9646),h=t(9845),E=n("iterator");l.exports=!a(function(){var v=new URL("b?a=1&b=2&c=3","https://a"),S=v.searchParams,B=new URLSearchParams("a=1&a=2&b=3"),x="";return v.pathname="c%20d",S.forEach(function(P,M){S.delete("b"),x+=M+P}),B.delete("a",2),B.delete("b",void 0),h&&(!v.toJSON||!B.has("a",1)||B.has("a",2)||!B.has("a",void 0)||B.has("b"))||!S.size&&(h||!s)||!S.sort||v.href!=="https://a/c%20d?a=1&c=3"||S.get("c")!=="3"||String(new URLSearchParams("?a=1"))!=="a=1"||!S[E]||new URL("https://a@b").username!=="a"||new URLSearchParams(new URLSearchParams("a=b")).get("a")!=="b"||new URL("https://тест").host!=="xn--e1aybc"||new URL("https://a#б").hash!=="#%D0%B1"||x!=="a1c3"||new URL("https://x",void 0).host!=="x"})},6677:(l,p,t)=>{var a=t(497),n=String;l.exports=function(s){if(a(s)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return n(s)}},6728:(l,p,t)=>{var a=t(815),n=t(9518),s=t(7749),h=t(5599),E=t(2420),v=t(6677),S=t(5840),B=t(452),x=t(9987),P=t(9260);n("match",function(M,F,G){return[function(K){var H=S(this),Z=h(K)?void 0:B(K,M);return Z?a(Z,K,H):new RegExp(K)[M](v(H))},function(K){var H=s(this),Z=v(K),ie=G(F,H,Z);if(ie.done)return ie.value;if(!H.global)return P(H,Z);var T=H.unicode;H.lastIndex=0;for(var m,g=[],f=0;(m=P(H,Z))!==null;){var O=v(m[0]);g[f]=O,O===""&&(H.lastIndex=x(Z,E(H.lastIndex),T)),f++}return f===0?null:g}]})},6810:(l,p,t)=>{var a=t(4417).charAt,n=t(6677),s=t(3587),h=t(2382),E=t(1567),v="String Iterator",S=s.set,B=s.getterFor(v);h(String,"String",function(x){S(this,{type:v,string:n(x),index:0})},function(){var x,P=B(this),M=P.string,F=P.index;return F>=M.length?E(void 0,!0):(x=a(M,F),P.index+=x.length,E(x,!1))})},6815:(l,p,t)=>{var a=t(5057),n=t(7225),s=t(1541);n("toStringTag"),s(a("Symbol"),"Symbol")},6853:l=>{l.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},6898:(l,p,t)=>{var a=t(2809);l.exports=!a(function(){var n=(function(){}).bind();return typeof n!="function"||n.hasOwnProperty("prototype")})},6908:(l,p,t)=>{var a=t(815),n=t(9211),s=t(4152),h=TypeError;l.exports=function(E,v){var S,B;if(v==="string"&&n(S=E.toString)&&!s(B=a(S,E))||n(S=E.valueOf)&&!s(B=a(S,E))||v!=="string"&&n(S=E.toString)&&!s(B=a(S,E)))return B;throw new h("Can't convert object to primitive value")}},7024:(l,p,t)=>{var a=t(4685),n=Math.max,s=Math.min;l.exports=function(h,E){var v=a(h);return v<0?n(v+E,0):s(v,E)}},7042:(l,p,t)=>{var a=t(458),n=t(5736),s=t(6898),h=a(a.bind);l.exports=function(E,v){return n(E),v===void 0?E:s?h(E,v):function(){return E.apply(v,arguments)}}},7225:(l,p,t)=>{var a=t(6285),n=t(4347),s=t(605),h=t(3643).f;l.exports=function(E){var v=a.Symbol||(a.Symbol={});n(v,E)||h(v,E,{value:s.f(E)})}},7267:(l,p,t)=>{var a=t(9364),n=t(1562),s=t(815),h=t(6458),E=t(9845),v=t(9646),S=t(7917),B=t(2809),x=t(4347),P=t(9615),M=t(7749),F=t(2719),G=t(4151),K=t(6677),H=t(6330),Z=t(6122),ie=t(7642),T=t(2630),m=t(4884),g=t(7819),f=t(2897),O=t(3643),j=t(7815),Q=t(7403),ee=t(3930),ue=t(1176),fe=t(3463),me=t(577),ge=t(7923),Oe=t(1002),Ee=t(7553),Be=t(605),De=t(7225),nt=t(4160),Ke=t(1541),We=t(3587),Me=t(4979).forEach,W=me("hidden"),L="Symbol",U="prototype",V=We.set,X=We.getterFor(L),J=Object[U],le=n.Symbol,ce=le&&le[U],ye=n.RangeError,ae=n.TypeError,Ce=n.QObject,pe=f.f,Re=O.f,Et=m.f,ct=Q.f,Se=h([].push),Ye=fe("symbols"),rt=fe("op-symbols"),zt=fe("wks"),Je=!Ce||!Ce[U]||!Ce[U].findChild,st=function($e,Ue,Fe){var Xe=pe(J,Ue);Xe&&delete J[Ue],Re($e,Ue,Fe),Xe&&$e!==J&&Re(J,Ue,Xe)},bt=v&&B(function(){return Z(Re({},"a",{get:function(){return Re(this,"a",{value:7}).a}})).a!==7})?st:Re,Tt=function($e,Ue){var Fe=Ye[$e]=Z(ce);return V(Fe,{type:L,tag:$e,description:Ue}),v||(Fe.description=Ue),Fe},gt=function($e,Ue,Fe){$e===J&&gt(rt,Ue,Fe),M($e);var Xe=G(Ue);return M(Fe),x(Ye,Xe)?(Fe.enumerable?(x($e,W)&&$e[W][Xe]&&($e[W][Xe]=!1),Fe=Z(Fe,{enumerable:H(0,!1)})):(x($e,W)||Re($e,W,H(1,Z(null))),$e[W][Xe]=!0),bt($e,Xe,Fe)):Re($e,Xe,Fe)},Vt=function($e,Ue){M($e);var Fe=F(Ue),Xe=ie(Fe).concat(ti(Fe));return Me(Xe,function(ut){v&&!s(xt,Fe,ut)||gt($e,ut,Fe[ut])}),$e},xt=function($e){var Ue=G($e),Fe=s(ct,this,Ue);return!(this===J&&x(Ye,Ue)&&!x(rt,Ue))&&(!(Fe||!x(this,Ue)||!x(Ye,Ue)||x(this,W)&&this[W][Ue])||Fe)},Pt=function($e,Ue){var Fe=F($e),Xe=G(Ue);if(Fe!==J||!x(Ye,Xe)||x(rt,Xe)){var ut=pe(Fe,Xe);return!ut||!x(Ye,Xe)||x(Fe,W)&&Fe[W][Xe]||(ut.enumerable=!0),ut}},Kt=function($e){var Ue=Et(F($e)),Fe=[];return Me(Ue,function(Xe){x(Ye,Xe)||x(ge,Xe)||Se(Fe,Xe)}),Fe},ti=function($e){var Ue=$e===J,Fe=Et(Ue?rt:F($e)),Xe=[];return Me(Fe,function(ut){!x(Ye,ut)||Ue&&!x(J,ut)||Se(Xe,Ye[ut])}),Xe};S||(ee(ce=(le=function(){if(P(ce,this))throw new ae("Symbol is not a constructor");var $e=arguments.length&&arguments[0]!==void 0?K(arguments[0]):void 0,Ue=Oe($e),Fe=function(Xe){var ut=this===void 0?n:this;ut===J&&s(Fe,rt,Xe),x(ut,W)&&x(ut[W],Ue)&&(ut[W][Ue]=!1);var si=H(1,Xe);try{bt(ut,Ue,si)}catch(Xt){if(!(Xt instanceof ye))throw Xt;st(ut,Ue,si)}};return v&&Je&&bt(J,Ue,{configurable:!0,set:Fe}),Tt(Ue,$e)})[U],"toString",function(){return X(this).tag}),ee(le,"withoutSetter",function($e){return Tt(Oe($e),$e)}),Q.f=xt,O.f=gt,j.f=Vt,f.f=Pt,T.f=m.f=Kt,g.f=ti,Be.f=function($e){return Tt(Ee($e),$e)},v&&(ue(ce,"description",{configurable:!0,get:function(){return X(this).description}}),E||ee(J,"propertyIsEnumerable",xt,{unsafe:!0}))),a({global:!0,constructor:!0,wrap:!0,forced:!S,sham:!S},{Symbol:le}),Me(ie(zt),function($e){De($e)}),a({target:L,stat:!0,forced:!S},{useSetter:function(){Je=!0},useSimple:function(){Je=!1}}),a({target:"Object",stat:!0,forced:!S,sham:!v},{create:function($e,Ue){return Ue===void 0?Z($e):Vt(Z($e),Ue)},defineProperty:gt,defineProperties:Vt,getOwnPropertyDescriptor:Pt}),a({target:"Object",stat:!0,forced:!S},{getOwnPropertyNames:Kt}),nt(),Ke(le,L),ge[W]=!0},7403:(l,p)=>{var t={}.propertyIsEnumerable,a=Object.getOwnPropertyDescriptor,n=a&&!t.call({1:2},1);p.f=n?function(s){var h=a(this,s);return!!h&&h.enumerable}:t},7477:(l,p,t)=>{var a=t(8635),n=t(9953),s=t(550),h=null,E=function(O,j){self.postMessage({msg:"logcat_callback",data:{type:O,logcat:j}})};function v(O,j){var Q={msg:s.A.INIT_SEGMENT,data:{type:O,data:j}};self.postMessage(Q,[j.data])}function S(O,j){var Q={msg:s.A.MEDIA_SEGMENT,data:{type:O,data:j}};self.postMessage(Q,[j.data])}function B(){var O={msg:s.A.LOADING_COMPLETE};self.postMessage(O)}function x(){var O={msg:s.A.RECOVERED_EARLY_EOF};self.postMessage(O)}function P(O){var j={msg:s.A.MEDIA_INFO,data:O};self.postMessage(j)}function M(O){var j={msg:s.A.METADATA_ARRIVED,data:O};self.postMessage(j)}function F(O){var j={msg:s.A.SCRIPTDATA_ARRIVED,data:O};self.postMessage(j)}function G(O){var j={msg:s.A.TIMED_ID3_METADATA_ARRIVED,data:O};self.postMessage(j)}function K(O){var j={msg:s.A.SMPTE2038_METADATA_ARRIVED,data:O};self.postMessage(j)}function H(O){var j={msg:s.A.SCTE35_METADATA_ARRIVED,data:O};self.postMessage(j)}function Z(O){var j={msg:s.A.PES_PRIVATE_DATA_DESCRIPTOR,data:O};self.postMessage(j)}function ie(O){var j={msg:s.A.PES_PRIVATE_DATA_ARRIVED,data:O};self.postMessage(j)}function T(O){var j={msg:s.A.STATISTICS_INFO,data:O};self.postMessage(j)}function m(O,j){self.postMessage({msg:s.A.IO_ERROR,data:{type:O,info:j}})}function g(O,j){self.postMessage({msg:s.A.DEMUX_ERROR,data:{type:O,info:j}})}function f(O){self.postMessage({msg:s.A.RECOMMEND_SEEKPOINT,data:O})}self.addEventListener("message",function(O){switch(O.data.cmd){case"init":(h=new n.A(O.data.param[0],O.data.param[1])).on(s.A.IO_ERROR,m),h.on(s.A.DEMUX_ERROR,g),h.on(s.A.INIT_SEGMENT,v),h.on(s.A.MEDIA_SEGMENT,S),h.on(s.A.LOADING_COMPLETE,B),h.on(s.A.RECOVERED_EARLY_EOF,x),h.on(s.A.MEDIA_INFO,P),h.on(s.A.METADATA_ARRIVED,M),h.on(s.A.SCRIPTDATA_ARRIVED,F),h.on(s.A.TIMED_ID3_METADATA_ARRIVED,G),h.on(s.A.SMPTE2038_METADATA_ARRIVED,K),h.on(s.A.SCTE35_METADATA_ARRIVED,H),h.on(s.A.PES_PRIVATE_DATA_DESCRIPTOR,Z),h.on(s.A.PES_PRIVATE_DATA_ARRIVED,ie),h.on(s.A.STATISTICS_INFO,T),h.on(s.A.RECOMMEND_SEEKPOINT,f);break;case"destroy":h&&(h.destroy(),h=null),self.postMessage({msg:"destroyed"});break;case"start":h==null||h.start();break;case"stop":h==null||h.stop();break;case"seek":h==null||h.seek(O.data.param);break;case"pause":h==null||h.pause();break;case"resume":h==null||h.resume();break;case"logging_config":var j=O.data.param;a.A.applyConfig(j),j.enableCallback===!0?a.A.addLogListener(E):a.A.removeLogListener(E)}})},7478:(l,p,t)=>{var a=t(4347),n=t(1209),s=t(2897),h=t(3643);l.exports=function(E,v,S){for(var B=n(v),x=h.f,P=s.f,M=0;M<B.length;M++){var F=B[M];a(E,F)||S&&a(S,F)||x(E,F,P(v,F))}}},7517:(l,p,t)=>{var a=t(2809),n=t(1562).RegExp;l.exports=a(function(){var s=n(".","s");return!(s.dotAll&&s.test(`
  150. `)&&s.flags==="s")})},7553:(l,p,t)=>{var a=t(1562),n=t(3463),s=t(4347),h=t(1002),E=t(7917),v=t(9742),S=a.Symbol,B=n("wks"),x=v?S.for||S:S&&S.withoutSetter||h;l.exports=function(P){return s(B,P)||(B[P]=E&&s(S,P)?S[P]:x("Symbol."+P)),B[P]}},7642:(l,p,t)=>{var a=t(3430),n=t(6853);l.exports=Object.keys||function(s){return a(s,n)}},7677:(l,p,t)=>{var a=t(7749);l.exports=function(){var n=a(this),s="";return n.hasIndices&&(s+="d"),n.global&&(s+="g"),n.ignoreCase&&(s+="i"),n.multiline&&(s+="m"),n.dotAll&&(s+="s"),n.unicode&&(s+="u"),n.unicodeSets&&(s+="v"),n.sticky&&(s+="y"),s}},7712:(l,p,t)=>{var a=t(1147).IteratorPrototype,n=t(6122),s=t(6330),h=t(1541),E=t(2327),v=function(){return this};l.exports=function(S,B,x,P){var M=B+" Iterator";return S.prototype=n(a,{next:s(+!P,x)}),h(S,M,!1,!0),E[M]=v,S}},7749:(l,p,t)=>{var a=t(4152),n=String,s=TypeError;l.exports=function(h){if(a(h))return h;throw new s(n(h)+" is not an object")}},7815:(l,p,t)=>{var a=t(9646),n=t(2792),s=t(3643),h=t(7749),E=t(2719),v=t(7642);p.f=a&&!n?Object.defineProperties:function(S,B){h(S);for(var x,P=E(B),M=v(B),F=M.length,G=0;F>G;)s.f(S,x=M[G++],P[x]);return S}},7819:(l,p)=>{p.f=Object.getOwnPropertySymbols},7917:(l,p,t)=>{var a=t(4941),n=t(2809),s=t(1562).String;l.exports=!!Object.getOwnPropertySymbols&&!n(function(){var h=Symbol("symbol detection");return!s(h)||!(Object(h)instanceof Symbol)||!Symbol.sham&&a&&a<41})},7923:l=>{l.exports={}},7955:l=>{var p=TypeError;l.exports=function(t){if(t>9007199254740991)throw p("Maximum allowed index exceeded");return t}},7958:(l,p,t)=>{var a=t(8891),n=t(815),s=t(6458),h=t(9518),E=t(2809),v=t(7749),S=t(9211),B=t(5599),x=t(4685),P=t(2420),M=t(6677),F=t(5840),G=t(9987),K=t(452),H=t(5716),Z=t(9260),ie=t(7553)("replace"),T=Math.max,m=Math.min,g=s([].concat),f=s([].push),O=s("".indexOf),j=s("".slice),Q="a".replace(/./,"$0")==="$0",ee=!!/./[ie]&&/./[ie]("a","$0")==="";h("replace",function(ue,fe,me){var ge=ee?"$":"$0";return[function(Oe,Ee){var Be=F(this),De=B(Oe)?void 0:K(Oe,ie);return De?n(De,Oe,Be,Ee):n(fe,M(Be),Oe,Ee)},function(Oe,Ee){var Be=v(this),De=M(Oe);if(typeof Ee=="string"&&O(Ee,ge)===-1&&O(Ee,"$<")===-1){var nt=me(fe,Be,De,Ee);if(nt.done)return nt.value}var Ke=S(Ee);Ke||(Ee=M(Ee));var We,Me=Be.global;Me&&(We=Be.unicode,Be.lastIndex=0);for(var W,L=[];(W=Z(Be,De))!==null&&(f(L,W),Me);)M(W[0])===""&&(Be.lastIndex=G(De,P(Be.lastIndex),We));for(var U,V="",X=0,J=0;J<L.length;J++){for(var le,ce=M((W=L[J])[0]),ye=T(m(x(W.index),De.length),0),ae=[],Ce=1;Ce<W.length;Ce++)f(ae,(U=W[Ce])===void 0?U:String(U));var pe=W.groups;if(Ke){var Re=g([ce],ae,ye,De);pe!==void 0&&f(Re,pe),le=M(a(Ee,void 0,Re))}else le=H(ce,De,ye,ae,pe,Ee);ye>=X&&(V+=j(De,X,ye)+le,X=ye+ce.length)}return V+j(De,X)}]},!!E(function(){var ue=/./;return ue.exec=function(){var fe=[];return fe.groups={a:"7"},fe},"".replace(ue,"$<a>")!=="7"})||!Q||ee)},8053:(l,p,t)=>{var a=t(1562).navigator,n=a&&a.userAgent;l.exports=n?String(n):""},8098:(l,p,t)=>{t.d(p,{A:()=>ie});var a=t(2460);const n=function(){function T(){var m;this._firstCheckpoint=0,this._lastCheckpoint=0,this._intervalBytes=0,this._totalBytes=0,this._lastSecondBytes=0,!((m=self.performance)===null||m===void 0)&&m.now?this._now=self.performance.now.bind(self.performance):this._now=Date.now}return T.prototype.reset=function(){this._firstCheckpoint=this._lastCheckpoint=0,this._totalBytes=this._intervalBytes=0,this._lastSecondBytes=0},T.prototype.addBytes=function(m){this._firstCheckpoint===0?(this._firstCheckpoint=this._now(),this._lastCheckpoint=this._firstCheckpoint,this._intervalBytes+=m,this._totalBytes+=m):this._now()-this._lastCheckpoint<1e3?(this._intervalBytes+=m,this._totalBytes+=m):(this._lastSecondBytes=this._intervalBytes,this._intervalBytes=m,this._totalBytes+=m,this._lastCheckpoint=this._now())},Object.defineProperty(T.prototype,"currentKBps",{get:function(){this.addBytes(0);var m=(this._now()-this._lastCheckpoint)/1e3;return m===0&&(m=1),this._intervalBytes/m/1024},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"lastSecondKBps",{get:function(){return this.addBytes(0),this._lastSecondBytes!==0?this._lastSecondBytes/1024:this._now()-this._lastCheckpoint>=500?this.currentKBps:0},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"averageKBps",{get:function(){var m=(this._now()-this._firstCheckpoint)/1e3;return this._totalBytes/m/1024},enumerable:!1,configurable:!0}),T}();var s,h=t(9034),E=t(8870),v=t(4383),S=(s=function(T,m){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,f){g.__proto__=f}||function(g,f){for(var O in f)Object.prototype.hasOwnProperty.call(f,O)&&(g[O]=f[O])},s(T,m)},function(T,m){if(typeof m!="function"&&m!==null)throw new TypeError("Class extends value "+String(m)+" is not a constructor or null");function g(){this.constructor=T}s(T,m),T.prototype=m===null?Object.create(m):(g.prototype=m.prototype,new g)});const B=function(T){function m(g,f){var O=T.call(this,"fetch-stream-loader")||this;return O.TAG="FetchStreamLoader",O._seekHandler=g,O._config=f,O._needStash=!0,O._requestAbort=!1,O._abortController=null,O._contentLength=null,O._receivedLength=0,O}return S(m,T),m.isSupported=function(){var g;try{var f=E.A.msedge&&(((g=E.A===null||E.A===void 0?void 0:E.A.version)===null||g===void 0?void 0:g.minor)||0)>=15048&&!E.A.webkit,O=!E.A.msedge||f;return self.fetch&&self.ReadableStream&&O}catch{return!1}},m.prototype.destroy=function(){this.isWorking()&&this.abort(),T.prototype.destroy.call(this)},m.prototype.open=function(g,f){var O=this;this._dataSource=g,this._range=f;var j=g.url;this._config.reuseRedirectedURL&&g.redirectedURL!==void 0&&(j=g.redirectedURL);var Q=this._seekHandler.getConfig(j,f),ee=new self.Headers;if(typeof Q.headers=="object"){var ue=Q.headers;for(var fe in ue)ue.hasOwnProperty(fe)&&ee.append(fe,ue[fe])}var me={method:"GET",headers:ee,mode:"cors",cache:"default",referrerPolicy:"no-referrer-when-downgrade"};if(typeof this._config.headers=="object")for(var fe in this._config.headers)ee.append(fe,this._config.headers[fe]);g.cors||(me.mode="same-origin"),g.withCredentials&&(me.credentials="include"),g!=null&&g.referrerPolicy&&(me.referrerPolicy=g.referrerPolicy),self.AbortController&&(this._abortController=new self.AbortController,this._abortController&&(me.signal=this._abortController.signal)),this._status=h.eO.kConnecting,self.fetch(Q.url,me).then(function(ge){var Oe,Ee;if(O._requestAbort)return O._status=h.eO.kIdle,void((Oe=ge.body)===null||Oe===void 0||Oe.cancel());if(ge.ok&&ge.status>=200&&ge.status<=299){if(ge.url!==Q.url&&O._onURLRedirect){var Be=O._seekHandler.removeURLParameters(ge.url);O._onURLRedirect(Be)}var De=ge.headers.get("Content-Length");return De!=null&&(O._contentLength=parseInt(De),O._contentLength!==0&&O._onContentLengthKnown&&O._onContentLengthKnown(O._contentLength)),O._pump.call(O,(Ee=ge.body)===null||Ee===void 0?void 0:Ee.getReader())}if(O._status=h.eO.kError,!O._onError)throw new v.Al("FetchStreamLoader: Http code invalid, "+ge.status+" "+ge.statusText);O._onError(h.Xv.HTTP_STATUS_CODE_INVALID,{code:ge.status,msg:ge.statusText})}).catch(function(ge){var Oe;if(!(!((Oe=O._abortController)===null||Oe===void 0)&&Oe.signal.aborted)){if(O._status=h.eO.kError,!O._onError)throw ge;O._onError(h.Xv.EXCEPTION,{code:-1,msg:ge.message})}})},m.prototype.abort=function(){var g;if(this._requestAbort=!0,(this._status!==h.eO.kBuffering||!E.A.chrome)&&this._abortController)try{(g=this._abortController)===null||g===void 0||g.abort()}catch{}},m.prototype._pump=function(g){var f=this;return g.read().then(function(O){var j,Q,ee,ue;if(O.done)if(f._contentLength!==null&&f._receivedLength<f._contentLength){f._status=h.eO.kError;var fe=h.Xv.EARLY_EOF,me={code:-1,msg:"Fetch stream meet Early-EOF"};if(!f._onError)throw new v.Al(me.msg);f._onError(fe,me)}else f._status=h.eO.kComplete,f._onComplete&&f._onComplete(((j=f._range)===null||j===void 0?void 0:j.from)||0,(((Q=f._range)===null||Q===void 0?void 0:Q.from)||0)+f._receivedLength-1);else{if(!((ee=f._abortController)===null||ee===void 0)&&ee.signal.aborted)return void(f._status=h.eO.kComplete);if(f._requestAbort)return f._status=h.eO.kComplete,g.cancel();f._status=h.eO.kBuffering;var ge=O.value.buffer,Oe=(((ue=f._range)===null||ue===void 0?void 0:ue.from)||0)+f._receivedLength;f._receivedLength+=ge.byteLength,f._onDataArrival&&f._onDataArrival(ge,Oe,f._receivedLength),f._pump(g)}}).catch(function(O){var j,Q;if(!((Q=(j=f._abortController)===null||j===void 0?void 0:j.signal)===null||Q===void 0)&&Q.aborted)f._status=h.eO.kComplete;else if(O.code!==11||!E.A.msedge){f._status=h.eO.kError;var ee=0,ue=null;if(O.code!==19&&O.message!=="network error"||!(f._contentLength===null||f._contentLength!==null&&f._receivedLength<f._contentLength)?(ee=h.Xv.EXCEPTION,ue={code:O.code,msg:O.message}):(ee=h.Xv.EARLY_EOF,ue={code:O.code,msg:"Fetch stream meet Early-EOF"}),!f._onError)throw new v.Al(ue.msg);f._onError(ee,ue)}})},m}(h.HC);var x=function(){var T=function(m,g){return T=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,O){f.__proto__=O}||function(f,O){for(var j in O)Object.prototype.hasOwnProperty.call(O,j)&&(f[j]=O[j])},T(m,g)};return function(m,g){if(typeof g!="function"&&g!==null)throw new TypeError("Class extends value "+String(g)+" is not a constructor or null");function f(){this.constructor=m}T(m,g),m.prototype=g===null?Object.create(g):(f.prototype=g.prototype,new f)}}();const P=function(T){function m(g,f){var O=T.call(this,"xhr-moz-chunked-loader")||this;return O.TAG="MozChunkedLoader",O._seekHandler=g,O._config=f,O._needStash=!0,O._xhr=null,O._requestAbort=!1,O._contentLength=null,O._receivedLength=0,O}return x(m,T),m.isSupported=function(){try{var g=new XMLHttpRequest;return g.open("GET","https://example.com",!0),g.responseType="moz-chunked-arraybuffer",g.responseType==="moz-chunked-arraybuffer"}catch(f){return a.A.w("MozChunkedLoader",f.message),!1}},m.prototype.destroy=function(){this.isWorking()&&this.abort(),this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onloadend=null,this._xhr.onerror=null,this._xhr=null),T.prototype.destroy.call(this)},m.prototype.open=function(g,f){this._dataSource=g,this._range=f;var O=g.url;this._config.reuseRedirectedURL&&g.redirectedURL!==void 0&&(O=g.redirectedURL);var j=this._seekHandler.getConfig(O,f);this._requestURL=j.url;var Q=this._xhr=new XMLHttpRequest;if(Q.open("GET",j.url,!0),Q.responseType="moz-chunked-arraybuffer",Q.onreadystatechange=this._onReadyStateChange.bind(this),Q.onprogress=this._onProgress.bind(this),Q.onloadend=this._onLoadEnd.bind(this),Q.onerror=this._onXhrError.bind(this),g.withCredentials&&(Q.withCredentials=!0),typeof j.headers=="object"){var ee=j.headers;for(var ue in ee)ee.hasOwnProperty(ue)&&Q.setRequestHeader(ue,ee[ue])}if(typeof this._config.headers=="object")for(var ue in ee=this._config.headers)ee.hasOwnProperty(ue)&&Q.setRequestHeader(ue,ee[ue]);this._status=h.eO.kConnecting,Q.send()},m.prototype.abort=function(){this._requestAbort=!0,this._xhr&&this._xhr.abort(),this._status=h.eO.kComplete},m.prototype._onReadyStateChange=function(g){var f=g.target;if(f.readyState===2){if(f.responseURL!==void 0&&f.responseURL!==this._requestURL&&this._onURLRedirect){var O=this._seekHandler.removeURLParameters(f.responseURL);this._onURLRedirect(O)}if(f.status!==0&&(f.status<200||f.status>299)){if(this._status=h.eO.kError,!this._onError)throw new v.Al("MozChunkedLoader: Http code invalid, "+f.status+" "+f.statusText);this._onError(h.Xv.HTTP_STATUS_CODE_INVALID,{code:f.status,msg:f.statusText})}else this._status=h.eO.kBuffering}},m.prototype._onProgress=function(g){var f;if(this._status!==h.eO.kError){this._contentLength===null&&g.total!==null&&g.total!==0&&(this._contentLength=g.total,this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength));var O=g.target.response,j=(((f=this._range)===null||f===void 0?void 0:f.from)||0)+this._receivedLength;this._receivedLength+=O.byteLength,this._onDataArrival&&this._onDataArrival(O,j,this._receivedLength)}},m.prototype._onLoadEnd=function(g){this._requestAbort?this._requestAbort=!1:this._status!==h.eO.kError&&(this._status=h.eO.kComplete,this._onComplete&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1))},m.prototype._onXhrError=function(g){this._status=h.eO.kError;var f=0,O=null;if(this._contentLength&&g.loaded<this._contentLength?(f=h.Xv.EARLY_EOF,O={code:-1,msg:"Moz-Chunked stream meet Early-Eof"}):(f=h.Xv.EXCEPTION,O={code:-1,msg:g.constructor.name+" "+g.type}),!this._onError)throw new v.Al(O.msg);this._onError(f,O)},m}(h.HC);var M=function(){var T=function(m,g){return T=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,O){f.__proto__=O}||function(f,O){for(var j in O)Object.prototype.hasOwnProperty.call(O,j)&&(f[j]=O[j])},T(m,g)};return function(m,g){if(typeof g!="function"&&g!==null)throw new TypeError("Class extends value "+String(g)+" is not a constructor or null");function f(){this.constructor=m}T(m,g),m.prototype=g===null?Object.create(g):(f.prototype=g.prototype,new f)}}();const F=function(T){function m(g,f){var O=T.call(this,"xhr-range-loader")||this;return O.TAG="RangeLoader",O._seekHandler=g,O._config=f,O._needStash=!1,O._chunkSizeKBList=[128,256,384,512,768,1024,1536,2048,3072,4096,5120,6144,7168,8192],O._currentChunkSizeKB=384,O._currentSpeedNormalized=0,O._zeroSpeedChunkCount=0,O._xhr=null,O._speedSampler=new n,O._requestAbort=!1,O._waitForTotalLength=!1,O._totalLengthReceived=!1,O._currentRequestURL=null,O._currentRedirectedURL=null,O._currentRequestRange=null,O._totalLength=null,O._contentLength=null,O._receivedLength=0,O._lastTimeLoaded=0,O}return M(m,T),m.isSupported=function(){try{var g=new XMLHttpRequest;return g.open("GET","https://example.com",!0),g.responseType="arraybuffer",g.responseType==="arraybuffer"}catch(f){return a.A.w("RangeLoader",f.message),!1}},m.prototype.destroy=function(){this.isWorking()&&this.abort(),this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onload=null,this._xhr.onerror=null,this._xhr=null),T.prototype.destroy.call(this)},Object.defineProperty(m.prototype,"currentSpeed",{get:function(){return this._speedSampler.lastSecondKBps},enumerable:!1,configurable:!0}),m.prototype.open=function(g,f){this._dataSource=g,this._range=f,this._status=h.eO.kConnecting;var O=!1;this._dataSource.filesize!=null&&this._dataSource.filesize!==0&&(O=!0,this._totalLength=this._dataSource.filesize),this._totalLengthReceived||O?this._openSubRange():(this._waitForTotalLength=!0,this._internalOpen(this._dataSource,{from:0,to:-1}))},m.prototype._openSubRange=function(){var g,f,O=1024*this._currentChunkSizeKB,j=(((g=this._range)===null||g===void 0?void 0:g.from)||0)+this._receivedLength,Q=j+O;this._contentLength!=null&&Q-this._range.from>=this._contentLength&&(Q=(((f=this._range)===null||f===void 0?void 0:f.from)||0)+this._contentLength-1),this._currentRequestRange={from:j,to:Q},this._internalOpen(this._dataSource,this._currentRequestRange)},m.prototype._internalOpen=function(g,f){this._lastTimeLoaded=0;var O=g.url;this._config.reuseRedirectedURL&&(this._currentRedirectedURL!=null?O=this._currentRedirectedURL:g.redirectedURL!=null&&(O=g.redirectedURL));var j=this._seekHandler.getConfig(O,f);this._currentRequestURL=j.url;var Q=this._xhr=new XMLHttpRequest;if(Q.open("GET",j.url,!0),Q.responseType="arraybuffer",Q.onreadystatechange=this._onReadyStateChange.bind(this),Q.onprogress=this._onProgress.bind(this),Q.onload=this._onLoad.bind(this),Q.onerror=this._onXhrError.bind(this),g.withCredentials&&(Q.withCredentials=!0),typeof j.headers=="object"){var ee=j.headers;for(var ue in ee)ee.hasOwnProperty(ue)&&Q.setRequestHeader(ue,ee[ue])}if(typeof this._config.headers=="object")for(var ue in ee=this._config.headers)ee.hasOwnProperty(ue)&&Q.setRequestHeader(ue,ee[ue]);Q.send()},m.prototype.abort=function(){this._requestAbort=!0,this._internalAbort(),this._status=h.eO.kComplete},m.prototype._internalAbort=function(){this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onload=null,this._xhr.onerror=null,this._xhr.abort(),this._xhr=null)},m.prototype._onReadyStateChange=function(g){var f=g.target;if(f.readyState===2){if(f.responseURL!=null){var O=this._seekHandler.removeURLParameters(f.responseURL);f.responseURL!==this._currentRequestURL&&O!==this._currentRedirectedURL&&(this._currentRedirectedURL=O,this._onURLRedirect&&this._onURLRedirect(O))}if(f.status>=200&&f.status<=299){if(this._waitForTotalLength)return;this._status=h.eO.kBuffering}else{if(this._status=h.eO.kError,!this._onError)throw new v.Al("RangeLoader: Http code invalid, "+f.status+" "+f.statusText);this._onError(h.Xv.HTTP_STATUS_CODE_INVALID,{code:f.status,msg:f.statusText})}}},m.prototype._onProgress=function(g){if(this._status!==h.eO.kError){if(this._contentLength===null){var f=!1;if(this._waitForTotalLength){this._waitForTotalLength=!1,this._totalLengthReceived=!0,f=!0;var O=g.total;this._internalAbort(),O!=null&&O!==0&&(this._totalLength=O)}if(this._range.to===-1?this._contentLength=(this._totalLength||0)-this._range.from:this._contentLength=this._range.to-this._range.from+1,f)return void this._openSubRange();this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength)}var j=g.loaded-this._lastTimeLoaded;this._lastTimeLoaded=g.loaded,this._speedSampler.addBytes(j)}},m.prototype._normalizeSpeed=function(g){var f=this._chunkSizeKBList,O=f.length-1,j=0,Q=0,ee=O;if(g<f[0])return f[0];for(;Q<=ee;){if((j=Q+Math.floor((ee-Q)/2))===O||g>=f[j]&&g<f[j+1])return f[j];f[j]<g?Q=j+1:ee=j-1}},m.prototype._onLoad=function(g){if(this._status!==h.eO.kError)if(this._waitForTotalLength)this._waitForTotalLength=!1;else{this._lastTimeLoaded=0;var f=this._speedSampler.lastSecondKBps;if(f===0&&(this._zeroSpeedChunkCount++,this._zeroSpeedChunkCount>=3&&(f=this._speedSampler.currentKBps)),f!==0){var O=this._normalizeSpeed(f);this._currentSpeedNormalized!==O&&(this._currentSpeedNormalized=O,this._currentChunkSizeKB=O)}var j=g.target.response,Q=this._range.from+this._receivedLength;this._receivedLength+=j.byteLength;var ee=!1;this._contentLength!=null&&this._receivedLength<this._contentLength?this._openSubRange():ee=!0,this._onDataArrival&&this._onDataArrival(j,Q,this._receivedLength),ee&&(this._status=h.eO.kComplete,this._onComplete&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1))}},m.prototype._onXhrError=function(g){this._status=h.eO.kError;var f=0,O=null;if(this._contentLength&&this._receivedLength>0&&this._receivedLength<this._contentLength?(f=h.Xv.EARLY_EOF,O={code:-1,msg:"RangeLoader meet Early-Eof"}):(f=h.Xv.EXCEPTION,O={code:-1,msg:g.constructor.name+" "+g.type}),!this._onError)throw new v.Al(O.msg);this._onError(f,O)},m}(h.HC);var G=function(){var T=function(m,g){return T=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,O){f.__proto__=O}||function(f,O){for(var j in O)Object.prototype.hasOwnProperty.call(O,j)&&(f[j]=O[j])},T(m,g)};return function(m,g){if(typeof g!="function"&&g!==null)throw new TypeError("Class extends value "+String(g)+" is not a constructor or null");function f(){this.constructor=m}T(m,g),m.prototype=g===null?Object.create(g):(f.prototype=g.prototype,new f)}}();const K=function(T){function m(g,f){var O=T.call(this,"websocket-loader")||this;return O.TAG="WebSocketLoader",O._needStash=!0,O._ws=null,O._requestAbort=!1,O._receivedLength=0,O}return G(m,T),m.isSupported=function(){try{return self.WebSocket!==void 0}catch{return!1}},m.prototype.destroy=function(){this._ws&&this.abort(),T.prototype.destroy.call(this)},m.prototype.open=function(g){try{var f=this._ws=new self.WebSocket(g.url);f.binaryType="arraybuffer",f.onopen=this._onWebSocketOpen.bind(this),f.onclose=this._onWebSocketClose.bind(this),f.onmessage=this._onWebSocketMessage.bind(this),f.onerror=this._onWebSocketError.bind(this),this._status=h.eO.kConnecting}catch(j){this._status=h.eO.kError;var O={code:j.code,msg:j.message};if(!this._onError)throw new v.Al(O.msg);this._onError(h.Xv.EXCEPTION,O)}},m.prototype.abort=function(){var g=this._ws;!g||g.readyState!==0&&g.readyState!==1||(this._requestAbort=!0,g.close()),this._ws=null,this._status=h.eO.kComplete},m.prototype._onWebSocketOpen=function(g){this._status=h.eO.kBuffering},m.prototype._onWebSocketClose=function(g){this._requestAbort?this._requestAbort=!1:(this._status=h.eO.kComplete,this._onComplete&&this._onComplete(0,this._receivedLength-1))},m.prototype._onWebSocketMessage=function(g){var f=this;if(g.data instanceof ArrayBuffer)this._dispatchArrayBuffer(g.data);else if(g.data instanceof Blob){var O=new FileReader;O.onload=function(){f._dispatchArrayBuffer(O==null?void 0:O.result)},O.readAsArrayBuffer(g.data)}else{this._status=h.eO.kError;var j={code:-1,msg:"Unsupported WebSocket message type: "+g.data.constructor.name};if(!this._onError)throw new v.Al(j.msg);this._onError(h.Xv.EXCEPTION,j)}},m.prototype._dispatchArrayBuffer=function(g){var f=g,O=this._receivedLength;this._receivedLength+=f.byteLength,this._onDataArrival&&this._onDataArrival(f,O,this._receivedLength)},m.prototype._onWebSocketError=function(g){this._status=h.eO.kError;var f={code:g.code,msg:g.message};if(!this._onError)throw new v.Al(f.msg);this._onError(h.Xv.EXCEPTION,f)},m}(h.HC),H=function(){function T(m){this._zeroStart=m||!1}return T.prototype.getConfig=function(m,g){var f,O={};return g.from!==0||g.to!==-1?(f=g.to!==-1?"bytes=".concat(g.from.toString(),"-").concat(g.to.toString()):"bytes=".concat(g.from.toString(),"-"),O.Range=f):this._zeroStart&&(O.Range="bytes=0-"),{url:m,headers:O}},T.prototype.removeURLParameters=function(m){return m},T}(),Z=function(){function T(m,g){this._startName=m,this._endName=g}return T.prototype.getConfig=function(m,g){var f=m;if(g.from!==0||g.to!==-1){var O=!0;f.includes("?")||(f+="?",O=!1),O&&(f+="&"),f+="".concat(this._startName,"=").concat(g.from.toString()),g.to!==-1&&(f+="&".concat(this._endName,"=").concat(g.to.toString()))}return{url:f,headers:{}}},T.prototype.removeURLParameters=function(m){var g,f=m.split("?")[0],O=m.indexOf("?");O!==-1&&(g=m.substring(O+1));var j="";if(g!==void 0&&g.length>0)for(var Q=g.split("&"),ee=0;ee<Q.length;ee++){var ue=Q[ee].split("="),fe=ee>0;ue[0]!==this._startName&&ue[0]!==this._endName&&(fe&&(j+="&"),j+=Q[ee])}return j.length===0?f:f+"?"+j},T}(),ie=function(){function T(m,g,f){this.TAG="IOController",this._config=g,this._extraData=f,this._stashInitialSize=65536,g.stashInitialSize!==void 0&&g.stashInitialSize>0&&(this._stashInitialSize=g.stashInitialSize),this._stashUsed=0,this._stashSize=this._stashInitialSize,this._bufferSize=3145728,this._stashBuffer=new ArrayBuffer(this._bufferSize),this._stashByteStart=0,this._enableStash=!0,g.enableStashBuffer||(this._enableStash=!1),this._loader=null,this._loaderClass=null,this._seekHandler=null,this._dataSource=m,this._isWebSocketURL=/wss?:\/\/(.+?)/.test(m.url||""),this._refTotalLength=m.filesize?m.filesize:null,this._totalLength=this._refTotalLength,this._fullRequestFlag=!1,this._currentRange=null,this._redirectedURL=null,this._speedNormalized=0,this._speedSampler=new n,this._speedNormalizeList=[32,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096],this._isEarlyEofReconnecting=!1,this._paused=!1,this._resumeFrom=0,this._onDataArrival=null,this._onSeeked=null,this._onError=null,this._onComplete=null,this._onRedirect=null,this._onRecoveredEarlyEof=null,this._selectSeekHandler(),this._selectLoader(),this._createLoader()}return T.prototype.destroy=function(){var m,g,f;!((m=this._loader)===null||m===void 0)&&m.isWorking()&&((g=this._loader)===null||g===void 0||g.abort()),(f=this._loader)===null||f===void 0||f.destroy(),this._loader=null,this._loaderClass=null,this._dataSource=null,this._stashBuffer=null,this._stashUsed=this._stashSize=this._bufferSize=this._stashByteStart=0,this._currentRange=null,this._speedSampler=null,this._isEarlyEofReconnecting=!1,this._onDataArrival=null,this._onSeeked=null,this._onError=null,this._onComplete=null,this._onRedirect=null,this._onRecoveredEarlyEof=null,this._extraData=null},T.prototype.isWorking=function(){var m;return((m=this._loader)===null||m===void 0?void 0:m.isWorking())&&!this._paused},T.prototype.isPaused=function(){return this._paused},Object.defineProperty(T.prototype,"status",{get:function(){var m;return(m=this._loader)===null||m===void 0?void 0:m.status},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"extraData",{get:function(){return this._extraData},set:function(m){this._extraData=m},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"onDataArrival",{get:function(){return this._onDataArrival},set:function(m){this._onDataArrival=m},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"onSeeked",{get:function(){return this._onSeeked},set:function(m){this._onSeeked=m},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"onError",{get:function(){return this._onError},set:function(m){this._onError=m},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"onComplete",{get:function(){return this._onComplete},set:function(m){this._onComplete=m},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"onRedirect",{get:function(){return this._onRedirect},set:function(m){this._onRedirect=m},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"onRecoveredEarlyEof",{get:function(){return this._onRecoveredEarlyEof},set:function(m){this._onRecoveredEarlyEof=m},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"currentURL",{get:function(){var m;return(m=this._dataSource)===null||m===void 0?void 0:m.url},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"hasRedirect",{get:function(){var m;return this._redirectedURL!=null||((m=this._dataSource)===null||m===void 0?void 0:m.redirectedURL)!==void 0},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"currentRedirectedURL",{get:function(){var m;return this._redirectedURL||((m=this._dataSource)===null||m===void 0?void 0:m.redirectedURL)},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"currentSpeed",{get:function(){var m,g;return this._loaderClass===F?(m=this._loader)===null||m===void 0?void 0:m.currentSpeed:(g=this._speedSampler)===null||g===void 0?void 0:g.lastSecondKBps},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"loaderType",{get:function(){var m;return(m=this._loader)===null||m===void 0?void 0:m.type},enumerable:!1,configurable:!0}),T.prototype._selectSeekHandler=function(){var m=this._config;if(m.seekType==="range")this._seekHandler=new H(!!this._config.rangeLoadZeroStart);else if(m.seekType==="param"){var g=m.seekParamStart||"bstart",f=m.seekParamEnd||"bend";this._seekHandler=new Z(g,f)}else{if(m.seekType!=="custom")throw new v.Qn("Invalid seekType in config: ".concat((m==null?void 0:m.seekType)||""));if(typeof m.customSeekHandler!="function")throw new v.Qn("Custom seekType specified in config but invalid customSeekHandler!");this._seekHandler=new m.customSeekHandler}},T.prototype._selectLoader=function(){var m;if(this._config.customLoader!=null)this._loaderClass=((m=this._config)===null||m===void 0?void 0:m.customLoader)||null;else if(this._isWebSocketURL)this._loaderClass=K;else if(B.isSupported())this._loaderClass=B;else if(P.isSupported())this._loaderClass=P;else{if(!F.isSupported())throw new v.Al("Your browser doesn't support xhr with arraybuffer responseType!");this._loaderClass=F}},T.prototype._createLoader=function(){var m;this._loaderClass&&(this._loader=new this._loaderClass(this._seekHandler,this._config),!((m=this._loader)===null||m===void 0)&&m.needStashBuffer||(this._enableStash=!1),this._loader&&(this._loader.onContentLengthKnown=this._onContentLengthKnown.bind(this),this._loader.onURLRedirect=this._onURLRedirect.bind(this),this._loader.onDataArrival=this._onLoaderChunkArrival.bind(this),this._loader.onComplete=this._onLoaderComplete.bind(this),this._loader.onError=this._onLoaderError.bind(this)))},T.prototype.open=function(m){var g,f;this._currentRange={from:0,to:-1},m&&(this._currentRange.from=m),(g=this._speedSampler)===null||g===void 0||g.reset(),m||(this._fullRequestFlag=!0),(f=this._loader)===null||f===void 0||f.open(this._dataSource,Object.assign({},this._currentRange))},T.prototype.abort=function(){var m;(m=this._loader)===null||m===void 0||m.abort(),this._paused&&(this._paused=!1,this._resumeFrom=0)},T.prototype.pause=function(){var m,g;this.isWorking()&&((m=this._loader)===null||m===void 0||m.abort(),this._stashUsed!==0?(this._resumeFrom=this._stashByteStart,this._currentRange&&(this._currentRange.to=this._stashByteStart-1)):this._resumeFrom=(((g=this._currentRange)===null||g===void 0?void 0:g.to)||0)+1,this._stashUsed=0,this._stashByteStart=0,this._paused=!0)},T.prototype.resume=function(){if(this._paused){this._paused=!1;var m=this._resumeFrom;this._resumeFrom=0,this._internalSeek(m,!0)}},T.prototype.seek=function(m){this._paused=!1,this._stashUsed=0,this._stashByteStart=0,this._internalSeek(m,!0)},T.prototype._internalSeek=function(m,g){var f,O,j,Q;!((f=this._loader)===null||f===void 0)&&f.isWorking()&&((O=this._loader)===null||O===void 0||O.abort()),this._flushStashBuffer(g),(j=this._loader)===null||j===void 0||j.destroy(),this._loader=null;var ee={from:m,to:-1};this._currentRange={from:ee.from,to:-1},(Q=this._speedSampler)===null||Q===void 0||Q.reset(),this._stashSize=this._stashInitialSize,this._createLoader(),this._loader.open(this._dataSource,ee),this._onSeeked&&this._onSeeked()},T.prototype.updateUrl=function(m){if(!m||typeof m!="string"||m.length===0)throw new v.Qn("Url must be a non-empty string!");this._dataSource.url=m},T.prototype._expandBuffer=function(m){for(var g=this._stashSize;g+1048576<m;)g*=2;if((g+=1048576)!==this._bufferSize){var f=new ArrayBuffer(g);if(this._stashUsed>0){var O=new Uint8Array(this._stashBuffer,0,this._stashUsed);new Uint8Array(f,0,g).set(O,0)}this._stashBuffer=f,this._bufferSize=g}},T.prototype._normalizeSpeed=function(m){var g=this._speedNormalizeList,f=g.length-1,O=0,j=0,Q=f;if(m<g[0])return g[0];for(;j<=Q;){if((O=j+Math.floor((Q-j)/2))===f||m>=g[O]&&m<g[O+1])return g[O];g[O]<m?j=O+1:Q=O-1}},T.prototype._adjustStashSize=function(m){var g=0;(g=this._config.isLive?m/8:m<512?m:m>=512&&m<=1024?Math.floor(1.5*m):2*m)>8192&&(g=8192);var f=1024*g+1048576;this._bufferSize<f&&this._expandBuffer(f),this._stashSize=1024*g},T.prototype._dispatchChunks=function(m,g){return this._currentRange&&(this._currentRange.to=g+m.byteLength-1),this._onDataArrival?this._onDataArrival(m,g):0},T.prototype._onURLRedirect=function(m){this._redirectedURL=m,this._onRedirect&&this._onRedirect(m)},T.prototype._onContentLengthKnown=function(m){m&&this._fullRequestFlag&&(this._totalLength=m,this._fullRequestFlag=!1)},T.prototype._onLoaderChunkArrival=function(m,g,f){var O,j;if(!this._onDataArrival)throw new v.j4("IOController: No existing consumer (onDataArrival) callback!");if(!this._paused){this._isEarlyEofReconnecting&&(this._isEarlyEofReconnecting=!1,this._onRecoveredEarlyEof&&this._onRecoveredEarlyEof()),(O=this._speedSampler)===null||O===void 0||O.addBytes(m.byteLength);var Q=(j=this._speedSampler)===null||j===void 0?void 0:j.lastSecondKBps;if(Q!==0){var ee=this._normalizeSpeed(Q);this._speedNormalized!==ee&&(this._speedNormalized=ee,this._adjustStashSize(ee))}if(this._enableStash)if(this._stashUsed===0&&this._stashByteStart===0&&(this._stashByteStart=g),this._stashUsed+m.byteLength<=this._stashSize)(me=new Uint8Array(this._stashBuffer,0,this._stashSize)).set(new Uint8Array(m),this._stashUsed),this._stashUsed+=m.byteLength;else if(me=new Uint8Array(this._stashBuffer,0,this._bufferSize),this._stashUsed>0){var ue=this._stashBuffer.slice(0,this._stashUsed);(ge=this._dispatchChunks(ue,this._stashByteStart))<ue.byteLength?ge>0&&(Oe=new Uint8Array(ue,ge),me.set(Oe,0),this._stashUsed=Oe.byteLength,this._stashByteStart+=ge):(this._stashUsed=0,this._stashByteStart+=ge),this._stashUsed+m.byteLength>this._bufferSize&&(this._expandBuffer(this._stashUsed+m.byteLength),me=new Uint8Array(this._stashBuffer,0,this._bufferSize)),me.set(new Uint8Array(m),this._stashUsed),this._stashUsed+=m.byteLength}else(ge=this._dispatchChunks(m,g))<m.byteLength&&((fe=m.byteLength-ge)>this._bufferSize&&(this._expandBuffer(fe),me=new Uint8Array(this._stashBuffer,0,this._bufferSize)),me.set(new Uint8Array(m,ge),0),this._stashUsed+=fe,this._stashByteStart=g+ge);else if(this._stashUsed===0){var fe;(ge=this._dispatchChunks(m,g))<m.byteLength&&((fe=m.byteLength-ge)>this._bufferSize&&this._expandBuffer(fe),(me=new Uint8Array(this._stashBuffer,0,this._bufferSize)).set(new Uint8Array(m,ge),0),this._stashUsed+=fe,this._stashByteStart=g+ge)}else{var me,ge;if(this._stashUsed+m.byteLength>this._bufferSize&&this._expandBuffer(this._stashUsed+m.byteLength),(me=new Uint8Array(this._stashBuffer,0,this._bufferSize)).set(new Uint8Array(m),this._stashUsed),this._stashUsed+=m.byteLength,(ge=this._dispatchChunks(this._stashBuffer.slice(0,this._stashUsed),this._stashByteStart))<this._stashUsed&&ge>0){var Oe=new Uint8Array(this._stashBuffer,ge);me.set(Oe,0)}this._stashUsed-=ge,this._stashByteStart+=ge}}},T.prototype._flushStashBuffer=function(m){if(this._stashUsed>0){var g=this._stashBuffer.slice(0,this._stashUsed),f=this._dispatchChunks(g,this._stashByteStart),O=g.byteLength-f;if(f<g.byteLength){if(!m){if(f>0){var j=new Uint8Array(this._stashBuffer,0,this._bufferSize),Q=new Uint8Array(g,f);j.set(Q,0),this._stashUsed=Q.byteLength,this._stashByteStart+=f}return 0}a.A.w(this.TAG,"".concat(O," bytes unconsumed data remain when flush buffer, dropped"))}return this._stashUsed=0,this._stashByteStart=0,O}return 0},T.prototype._onLoaderComplete=function(m,g){this._flushStashBuffer(!0),this._onComplete&&this._onComplete(this._extraData)},T.prototype._onLoaderError=function(m,g){var f;switch(a.A.e(this.TAG,"Loader error, code = ".concat(g.code,", msg = ").concat(g.msg)),this._flushStashBuffer(!1),this._isEarlyEofReconnecting&&(this._isEarlyEofReconnecting=!1,m=h.Xv.UNRECOVERABLE_EARLY_EOF),m){case h.Xv.EARLY_EOF:if(!this._config.isLive&&this._totalLength){var O=(((f=this._currentRange)===null||f===void 0?void 0:f.to)||0)+1;return void(O<this._totalLength&&(a.A.w(this.TAG,"Connection lost, trying reconnect..."),this._isEarlyEofReconnecting=!0,this._internalSeek(O,!1)))}m=h.Xv.UNRECOVERABLE_EARLY_EOF;case h.Xv.UNRECOVERABLE_EARLY_EOF:case h.Xv.CONNECTING_TIMEOUT:case h.Xv.HTTP_STATUS_CODE_INVALID:case h.Xv.EXCEPTION:}if(!this._onError)throw new v.Al("IOException: "+g.msg);this._onError(m,g)},T}()},8125:(l,p,t)=>{var a=t(4347),n=t(9211),s=t(9083),h=t(577),E=t(8465),v=h("IE_PROTO"),S=Object,B=S.prototype;l.exports=E?S.getPrototypeOf:function(x){var P=s(x);if(a(P,v))return P[v];var M=P.constructor;return n(M)&&P instanceof M?M.prototype:P instanceof S?B:null}},8286:(l,p,t)=>{var a=t(9646),n=t(3643),s=t(6330);l.exports=function(h,E,v){a?n.f(h,E,s(0,v)):h[E]=v}},8401:(l,p,t)=>{var a=t(815),n=t(7749),s=t(452);l.exports=function(h,E,v){var S,B;n(h);try{if(!(S=s(h,"return"))){if(E==="throw")throw v;return v}S=a(S,h)}catch(x){B=!0,S=x}if(E==="throw")throw v;if(B)throw S;return n(S),v}},8465:(l,p,t)=>{var a=t(2809);l.exports=!a(function(){function n(){}return n.prototype.constructor=null,Object.getPrototypeOf(new n)!==n.prototype})},8587:(l,p,t)=>{var a=t(2809),n=t(1562).RegExp,s=a(function(){var v=n("a","y");return v.lastIndex=2,v.exec("abcd")!==null}),h=s||a(function(){return!n("a","y").sticky}),E=s||a(function(){var v=n("^r","gy");return v.lastIndex=2,v.exec("str")!==null});l.exports={BROKEN_CARET:E,MISSED_STICKY:h,UNSUPPORTED_Y:s}},8611:(l,p,t)=>{var a=t(2809),n=t(7553),s=t(4941),h=n("species");l.exports=function(E){return s>=51||!a(function(){var v=[];return(v.constructor={})[h]=function(){return{foo:1}},v[E](Boolean).foo!==1})}},8626:(l,p,t)=>{var a=t(6458);l.exports=a([].slice)},8635:(l,p,t)=>{t.d(p,{A:()=>s});var a=t(2139),n=t(2460);const s=function(){function h(){}return Object.defineProperty(h,"forceGlobalTag",{get:function(){return n.A.FORCE_GLOBAL_TAG},set:function(E){n.A.FORCE_GLOBAL_TAG=E,h._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(h,"globalTag",{get:function(){return n.A.GLOBAL_TAG},set:function(E){n.A.GLOBAL_TAG=E,h._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(h,"enableAll",{get:function(){return n.A.ENABLE_VERBOSE&&n.A.ENABLE_DEBUG&&n.A.ENABLE_INFO&&n.A.ENABLE_WARN&&n.A.ENABLE_ERROR},set:function(E){n.A.ENABLE_VERBOSE=E,n.A.ENABLE_DEBUG=E,n.A.ENABLE_INFO=E,n.A.ENABLE_WARN=E,n.A.ENABLE_ERROR=E,h._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(h,"enableDebug",{get:function(){return n.A.ENABLE_DEBUG},set:function(E){n.A.ENABLE_DEBUG=E,h._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(h,"enableVerbose",{get:function(){return n.A.ENABLE_VERBOSE},set:function(E){n.A.ENABLE_VERBOSE=E,h._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(h,"enableInfo",{get:function(){return n.A.ENABLE_INFO},set:function(E){n.A.ENABLE_INFO=E,h._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(h,"enableWarn",{get:function(){return n.A.ENABLE_WARN},set:function(E){n.A.ENABLE_WARN=E,h._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(h,"enableError",{get:function(){return n.A.ENABLE_ERROR},set:function(E){n.A.ENABLE_ERROR=E,h._notifyChange()},enumerable:!1,configurable:!0}),h.getConfig=function(){return{globalTag:n.A.GLOBAL_TAG,forceGlobalTag:n.A.FORCE_GLOBAL_TAG,enableVerbose:n.A.ENABLE_VERBOSE,enableDebug:n.A.ENABLE_DEBUG,enableInfo:n.A.ENABLE_INFO,enableWarn:n.A.ENABLE_WARN,enableError:n.A.ENABLE_ERROR,enableCallback:n.A.ENABLE_CALLBACK}},h.applyConfig=function(E){n.A.GLOBAL_TAG=E.globalTag,n.A.FORCE_GLOBAL_TAG=E.forceGlobalTag,n.A.ENABLE_VERBOSE=E.enableVerbose,n.A.ENABLE_DEBUG=E.enableDebug,n.A.ENABLE_INFO=E.enableInfo,n.A.ENABLE_WARN=E.enableWarn,n.A.ENABLE_ERROR=E.enableError,n.A.ENABLE_CALLBACK=!!E.enableCallback},h._notifyChange=function(){var E=h.emitter;if(E.listenerCount("change")>0){var v=h.getConfig();E.emit("change",v)}},h.registerListener=function(E){h.emitter.addListener("change",E)},h.removeListener=function(E){h.emitter.removeListener("change",E)},h.addLogListener=function(E){n.A.emitter.addListener("log",E),n.A.emitter.listenerCount("log")>0&&(n.A.ENABLE_CALLBACK=!0,h._notifyChange())},h.removeLogListener=function(E){n.A.emitter.removeListener("log",E),n.A.emitter.listenerCount("log")===0&&(n.A.ENABLE_CALLBACK=!1,h._notifyChange())},h.emitter=new a.A,h}()},8845:(l,p,t)=>{var a=t(9364),n=t(9646),s=t(1562),h=t(6458),E=t(4347),v=t(9211),S=t(9615),B=t(6677),x=t(1176),P=t(7478),M=s.Symbol,F=M&&M.prototype;if(n&&v(M)&&(!("description"in F)||M().description!==void 0)){var G={},K=function(){var f=arguments.length<1||arguments[0]===void 0?void 0:B(arguments[0]),O=S(F,this)?new M(f):f===void 0?M():M(f);return f===""&&(G[O]=!0),O};P(K,M),K.prototype=F,F.constructor=K;var H=String(M("description detection"))==="Symbol(description detection)",Z=h(F.valueOf),ie=h(F.toString),T=/^Symbol\((.*)\)[^)]+$/,m=h("".replace),g=h("".slice);x(F,"description",{configurable:!0,get:function(){var f=Z(this);if(E(G,f))return"";var O=ie(f),j=H?g(O,7,-1):m(O,T,"$1");return j===""?void 0:j}}),a({global:!0,constructor:!0,forced:!0},{Symbol:K})}},8862:(l,p,t)=>{var a=t(1562),n=t(9402),s=t(62),h=t(2377),E=t(9277),v=function(B){if(B&&B.forEach!==h)try{E(B,"forEach",h)}catch{B.forEach=h}};for(var S in n)n[S]&&v(a[S]&&a[S].prototype);v(s)},8870:(l,p,t)=>{t.d(p,{A:()=>n});var a={};(function(){var s=self.navigator.userAgent.toLowerCase(),h=/(edge)\/([\w.]+)/.exec(s)||/(opr)[\/]([\w.]+)/.exec(s)||/(chrome)[ \/]([\w.]+)/.exec(s)||/(iemobile)[\/]([\w.]+)/.exec(s)||/(version)(applewebkit)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(s)||/(webkit)[ \/]([\w.]+).*(version)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(s)||/(webkit)[ \/]([\w.]+)/.exec(s)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(s)||/(msie) ([\w.]+)/.exec(s)||s.includes("trident")&&/(rv)(?::| )([\w.]+)/.exec(s)||!s.includes("compatible")&&/(firefox)[ \/]([\w.]+)/.exec(s)||[],E=/(ipad)/.exec(s)||/(ipod)/.exec(s)||/(windows phone)/.exec(s)||/(iphone)/.exec(s)||/(kindle)/.exec(s)||/(android)/.exec(s)||/(windows)/.exec(s)||/(mac)/.exec(s)||/(linux)/.exec(s)||/(cros)/.exec(s)||[],v={browser:h[5]||h[3]||h[1]||"",version:h[2]||h[4]||"0",majorVersion:h[4]||h[2]||"0",platform:E[0]||""},S={};if(v.browser){S[v.browser]=!0;var B=v.majorVersion.split(".");S.version={major:parseInt(v.majorVersion,10),string:v.version},B.length>1&&(S.version.minor=parseInt(B[1],10)),B.length>2&&(S.version.build=parseInt(B[2],10))}if(v.platform&&(S[v.platform]=!0),(S.chrome||S.opr||S.safari)&&(S.webkit=!0),S.rv||S.iemobile){S.rv&&delete S.rv;var x="msie";v.browser=x,S[x]=!0}if(S.edge){delete S.edge;var P="msedge";v.browser=P,S[P]=!0}if(S.opr){var M="opera";v.browser=M,S[M]=!0}if(S.safari&&S.android){var F="android";v.browser=F,S[F]=!0}for(var G in S.name=v.browser,S.platform=v.platform,a)Object.prototype.hasOwnProperty.call(a,G)&&delete a[G];Object.assign(a,S)})();const n=a},8873:(l,p,t)=>{var a=t(3930);l.exports=function(n,s,h){for(var E in s)a(n,E,s[E],h);return n}},8891:(l,p,t)=>{var a=t(6898),n=Function.prototype,s=n.apply,h=n.call;l.exports=typeof Reflect=="object"&&Reflect.apply||(a?h.bind(s):function(){return h.apply(s,arguments)})},9034:(l,p,t)=>{t.d(p,{HC:()=>h,Xv:()=>s,eO:()=>n});var a=t(4383),n={kIdle:0,kConnecting:1,kBuffering:2,kError:3,kComplete:4},s={OK:"OK",EXCEPTION:"Exception",HTTP_STATUS_CODE_INVALID:"HttpStatusCodeInvalid",CONNECTING_TIMEOUT:"ConnectingTimeout",EARLY_EOF:"EarlyEof",UNRECOVERABLE_EARLY_EOF:"UnrecoverableEarlyEof"},h=function(){function E(v){this._type=v||"undefined",this._status=n.kIdle,this._needStash=!1,this._onContentLengthKnown=null,this._onURLRedirect=null,this._onDataArrival=null,this._onError=null,this._onComplete=null}return E.prototype.destroy=function(){this._status=n.kIdle,this._onContentLengthKnown=null,this._onURLRedirect=null,this._onDataArrival=null,this._onError=null,this._onComplete=null},E.prototype.isWorking=function(){return this._status===n.kConnecting||this._status===n.kBuffering},Object.defineProperty(E.prototype,"type",{get:function(){return this._type},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"status",{get:function(){return this._status},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"needStashBuffer",{get:function(){return this._needStash},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"onContentLengthKnown",{get:function(){return this._onContentLengthKnown},set:function(v){this._onContentLengthKnown=v},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"onURLRedirect",{get:function(){return this._onURLRedirect},set:function(v){this._onURLRedirect=v},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"onDataArrival",{get:function(){return this._onDataArrival},set:function(v){this._onDataArrival=v},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"onError",{get:function(){return this._onError},set:function(v){this._onError=v},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"onComplete",{get:function(){return this._onComplete},set:function(v){this._onComplete=v},enumerable:!1,configurable:!0}),E.prototype.open=function(v,S){throw new a.Xu("Unimplemented abstract function!")},E.prototype.abort=function(){throw new a.Xu("Unimplemented abstract function!")},E}()},9047:(l,p,t)=>{var a=t(5810),n=t(2671),s=t(4152),h=t(7553)("species"),E=Array;l.exports=function(v){var S;return a(v)&&(S=v.constructor,(n(S)&&(S===E||a(S.prototype))||s(S)&&(S=S[h])===null)&&(S=void 0)),S===void 0?E:S}},9083:(l,p,t)=>{var a=t(5840),n=Object;l.exports=function(s){return n(a(s))}},9211:l=>{var p=typeof document=="object"&&document.all;l.exports=p===void 0&&p!==void 0?function(t){return typeof t=="function"||t===p}:function(t){return typeof t=="function"}},9260:(l,p,t)=>{var a=t(815),n=t(7749),s=t(9211),h=t(526),E=t(9377),v=TypeError;l.exports=function(S,B){var x=S.exec;if(s(x)){var P=a(x,S,B);return P!==null&&n(P),P}if(h(S)==="RegExp")return a(E,S,B);throw new v("RegExp#exec called on incompatible receiver")}},9266:(l,p,t)=>{var a=t(7917);l.exports=a&&!!Symbol.for&&!!Symbol.keyFor},9273:(l,p,t)=>{var a=t(497),n=t(452),s=t(5599),h=t(2327),E=t(7553)("iterator");l.exports=function(v){if(!s(v))return n(v,E)||n(v,"@@iterator")||h[a(v)]}},9277:(l,p,t)=>{var a=t(9646),n=t(3643),s=t(6330);l.exports=a?function(h,E,v){return n.f(h,E,s(1,v))}:function(h,E,v){return h[E]=v,h}},9364:(l,p,t)=>{var a=t(1562),n=t(2897).f,s=t(9277),h=t(3930),E=t(4191),v=t(7478),S=t(4346);l.exports=function(B,x){var P,M,F,G,K,H=B.target,Z=B.global,ie=B.stat;if(P=Z?a:ie?a[H]||E(H,{}):a[H]&&a[H].prototype)for(M in x){if(G=x[M],F=B.dontCallGetSet?(K=n(P,M))&&K.value:P[M],!S(Z?M:H+(ie?".":"#")+M,B.forced)&&F!==void 0){if(typeof G==typeof F)continue;v(G,F)}(B.sham||F&&F.sham)&&s(G,"sham",!0),h(P,M,G,B)}}},9377:(l,p,t)=>{var a,n,s=t(815),h=t(6458),E=t(6677),v=t(7677),S=t(8587),B=t(3463),x=t(6122),P=t(3587).get,M=t(7517),F=t(6288),G=B("native-string-replace",String.prototype.replace),K=RegExp.prototype.exec,H=K,Z=h("".charAt),ie=h("".indexOf),T=h("".replace),m=h("".slice),g=(n=/b*/g,s(K,a=/a/,"a"),s(K,n,"a"),a.lastIndex!==0||n.lastIndex!==0),f=S.BROKEN_CARET,O=/()??/.exec("")[1]!==void 0;(g||O||f||M||F)&&(H=function(j){var Q,ee,ue,fe,me,ge,Oe,Ee=this,Be=P(Ee),De=E(j),nt=Be.raw;if(nt)return nt.lastIndex=Ee.lastIndex,Q=s(H,nt,De),Ee.lastIndex=nt.lastIndex,Q;var Ke=Be.groups,We=f&&Ee.sticky,Me=s(v,Ee),W=Ee.source,L=0,U=De;if(We&&(Me=T(Me,"y",""),ie(Me,"g")===-1&&(Me+="g"),U=m(De,Ee.lastIndex),Ee.lastIndex>0&&(!Ee.multiline||Ee.multiline&&Z(De,Ee.lastIndex-1)!==`
  151. `)&&(W="(?: "+W+")",U=" "+U,L++),ee=new RegExp("^(?:"+W+")",Me)),O&&(ee=new RegExp("^"+W+"$(?!\\s)",Me)),g&&(ue=Ee.lastIndex),fe=s(K,We?ee:Ee,U),We?fe?(fe.input=m(fe.input,L),fe[0]=m(fe[0],L),fe.index=Ee.lastIndex,Ee.lastIndex+=fe[0].length):Ee.lastIndex=0:g&&fe&&(Ee.lastIndex=Ee.global?fe.index+fe[0].length:ue),O&&fe&&fe.length>1&&s(G,fe[0],ee,function(){for(me=1;me<arguments.length-2;me++)arguments[me]===void 0&&(fe[me]=void 0)}),fe&&Ke)for(fe.groups=ge=x(null),me=0;me<Ke.length;me++)ge[(Oe=Ke[me])[0]]=fe[Oe[1]];return fe}),l.exports=H},9402:l=>{l.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}},9518:(l,p,t)=>{t(5597);var a=t(815),n=t(3930),s=t(9377),h=t(2809),E=t(7553),v=t(9277),S=E("species"),B=RegExp.prototype;l.exports=function(x,P,M,F){var G=E(x),K=!h(function(){var T={};return T[G]=function(){return 7},""[x](T)!==7}),H=K&&!h(function(){var T=!1,m=/a/;return x==="split"&&((m={}).constructor={},m.constructor[S]=function(){return m},m.flags="",m[G]=/./[G]),m.exec=function(){return T=!0,null},m[G](""),!T});if(!K||!H||M){var Z=/./[G],ie=P(G,""[x],function(T,m,g,f,O){var j=m.exec;return j===s||j===B.exec?K&&!O?{done:!0,value:a(Z,m,g,f)}:{done:!0,value:a(T,g,m,f)}:{done:!1}});n(String.prototype,x,ie[0]),n(B,G,ie[1])}F&&v(B[G],"sham",!0)}},9603:(l,p,t)=>{var a=t(5057),n=t(1176),s=t(7553),h=t(9646),E=s("species");l.exports=function(v){var S=a(v);h&&S&&!S[E]&&n(S,E,{configurable:!0,get:function(){return this}})}},9614:(l,p,t)=>{var a=t(3643).f;l.exports=function(n,s,h){h in n||a(n,h,{configurable:!0,get:function(){return s[h]},set:function(E){s[h]=E}})}},9615:(l,p,t)=>{var a=t(6458);l.exports=a({}.isPrototypeOf)},9646:(l,p,t)=>{var a=t(2809);l.exports=!a(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7})},9666:(l,p,t)=>{var a=t(4152),n=t(526),s=t(7553)("match");l.exports=function(h){var E;return a(h)&&((E=h[s])!==void 0?!!E:n(h)==="RegExp")}},9688:(l,p,t)=>{var a=t(9364),n=t(2809),s=t(5810),h=t(4152),E=t(9083),v=t(256),S=t(7955),B=t(8286),x=t(2807),P=t(8611),M=t(7553),F=t(4941),G=M("isConcatSpreadable"),K=F>=51||!n(function(){var Z=[];return Z[G]=!1,Z.concat()[0]!==Z}),H=function(Z){if(!h(Z))return!1;var ie=Z[G];return ie!==void 0?!!ie:s(Z)};a({target:"Array",proto:!0,arity:1,forced:!K||!P("concat")},{concat:function(Z){var ie,T,m,g,f,O=E(this),j=x(O,0),Q=0;for(ie=-1,m=arguments.length;ie<m;ie++)if(H(f=ie===-1?O:arguments[ie]))for(g=v(f),S(Q+g),T=0;T<g;T++,Q++)T in f&&B(j,Q,f[T]);else S(Q+1),B(j,Q++,f);return j.length=Q,j}})},9695:(l,p,t)=>{var a=t(6458),n=t(5810),s=t(9211),h=t(526),E=t(6677),v=a([].push);l.exports=function(S){if(s(S))return S;if(n(S)){for(var B=S.length,x=[],P=0;P<B;P++){var M=S[P];typeof M=="string"?v(x,M):typeof M!="number"&&h(M)!=="Number"&&h(M)!=="String"||v(x,E(M))}var F=x.length,G=!0;return function(K,H){if(G)return G=!1,H;if(n(this))return H;for(var Z=0;Z<F;Z++)if(x[Z]===K)return H}}}},9742:(l,p,t)=>{var a=t(7917);l.exports=a&&!Symbol.sham&&typeof Symbol.iterator=="symbol"},9845:l=>{l.exports=!1},9879:l=>{var p=Math.ceil,t=Math.floor;l.exports=Math.trunc||function(a){var n=+a;return(n>0?t:p)(n)}},9917:(l,p,t)=>{var a=t(9922),n=t(3930),s=t(309);a||n(Object.prototype,"toString",s,{unsafe:!0})},9922:(l,p,t)=>{var a={};a[t(7553)("toStringTag")]="z",l.exports=String(a)==="[object z]"},9953:(l,p,t)=>{t.d(p,{A:()=>di});var a=t(2139),n=t(2460),s=t(8870),h=t(719);function E(c,A,o){var r=c;if(A+o<r.length){for(;o--;)if((192&r[++A])!=128)return!1;return!0}return!1}const v=function(c){for(var A=[],o=c,r=0,y=c.length;r<y;)if(o[r]<128)A.push(String.fromCharCode(o[r])),++r;else{if(!(o[r]<192)){if(o[r]<224){if(E(o,r,1)&&(C=(31&o[r])<<6|63&o[r+1])>=128){A.push(String.fromCharCode(65535&C)),r+=2;continue}}else if(o[r]<240){if(E(o,r,2)&&(C=(15&o[r])<<12|(63&o[r+1])<<6|63&o[r+2])>=2048&&(63488&C)!=55296){A.push(String.fromCharCode(65535&C)),r+=3;continue}}else if(o[r]<248){var C;if(E(o,r,3)&&(C=(7&o[r])<<18|(63&o[r+1])<<12|(63&o[r+2])<<6|63&o[r+3])>65536&&C<1114112){C-=65536,A.push(String.fromCharCode(C>>>10|55296)),A.push(String.fromCharCode(1023&C|56320)),r+=4;continue}}}A.push("�"),++r}return A.join("")};var S,B=t(4383),x=(S=new ArrayBuffer(2),new DataView(S).setInt16(0,256,!0),new Int16Array(S)[0]===256);const P=function(){function c(){}return c.parseScriptData=function(A,o,r){var y={};try{var C=c.parseValue(A,o,r),w=c.parseValue(A,o+C.size,r-C.size);y[C.data]=w.data}catch(_){n.A.e("AMF",_.toString())}return y},c.parseObject=function(A,o,r){if(r<3)throw new B.j4("Data not enough when parse ScriptDataObject");var y=c.parseString(A,o,r),C=c.parseValue(A,o+y.size,r-y.size),w=C.objectEnd;return{data:{name:y.data,value:C.data},size:y.size+C.size,objectEnd:w}},c.parseVariable=function(A,o,r){return c.parseObject(A,o,r)},c.parseString=function(A,o,r){if(r<2)throw new B.j4("Data not enough when parse String");var y=new DataView(A,o,r).getUint16(0,!x);return{data:y>0?v(new Uint8Array(A,o+2,y)):"",size:2+y}},c.parseLongString=function(A,o,r){if(r<4)throw new B.j4("Data not enough when parse LongString");var y=new DataView(A,o,r).getUint32(0,!x);return{data:y>0?v(new Uint8Array(A,o+4,y)):"",size:4+y}},c.parseDate=function(A,o,r){if(r<10)throw new B.j4("Data size invalid when parse Date");var y=new DataView(A,o,r),C=y.getFloat64(0,!x),w=y.getInt16(8,!x);return{data:new Date(C+=60*w*1e3),size:10}},c.parseValue=function(A,o,r){if(r<1)throw new B.j4("Data not enough when parse Value");var y,C=new DataView(A,o,r),w=1,_=C.getUint8(0),I=!1;try{switch(_){case 0:y=C.getFloat64(1,!x),w+=8;break;case 1:y=!!C.getUint8(1),w+=1;break;case 2:var k=c.parseString(A,o+1,r-1);y=k.data,w+=k.size;break;case 3:y={};var $=0;for((16777215&C.getUint32(r-4,!x))==9&&($=3);w<r-4;){var D=c.parseObject(A,o+w,r-w-$);if(D.objectEnd)break;y[D.data.name]=D.data.value,w+=D.size}w<=r-3&&(16777215&C.getUint32(w-1,!x))==9&&(w+=3);break;case 8:for(y={},w+=4,$=0,(16777215&C.getUint32(r-4,!x))==9&&($=3);w<r-8;){var N=c.parseVariable(A,o+w,r-w-$);if(N.objectEnd)break;y[N.data.name]=N.data.value,w+=N.size}w<=r-3&&(16777215&C.getUint32(w-1,!x))==9&&(w+=3);break;case 9:y=void 0,w=1,I=!0;break;case 10:y=[];var z=C.getUint32(1,!x);w+=4;for(var q=0;q<z;q++){var R=c.parseValue(A,o+w,r-w);y.push(R.data),w+=R.size}break;case 11:var Y=c.parseDate(A,o+1,r-1);y=Y.data,w+=Y.size;break;case 12:var se=c.parseString(A,o+1,r-1);y=se.data,w+=se.size;break;default:w=r,n.A.w("AMF","Unsupported AMF value type "+_.toString())}}catch(re){n.A.e("AMF",re.toString())}return{data:y,size:w,objectEnd:I}},c}(),M=function(){function c(A){this.TAG="ExpGolomb",this._buffer=A,this._buffer_index=0,this._total_bytes=A.byteLength,this._total_bits=8*A.byteLength,this._current_word=0,this._current_word_bits_left=0}return c.prototype.destroy=function(){this._buffer=null},c.prototype._fillCurrentWord=function(){var A,o=this._total_bytes-this._buffer_index;if(o<=0)throw new B.j4("ExpGolomb: _fillCurrentWord() but no bytes available");var r=Math.min(4,o),y=new Uint8Array(4);y.set((A=this._buffer)===null||A===void 0?void 0:A.subarray(this._buffer_index,this._buffer_index+r)),this._current_word=new DataView(y.buffer).getUint32(0,!1),this._buffer_index+=r,this._current_word_bits_left=8*r},c.prototype.readBits=function(A){if(A>32)throw new B.Qn("ExpGolomb: readBits() bits exceeded max 32bits!");if(A<=this._current_word_bits_left){var o=this._current_word>>>32-A;return this._current_word<<=A,this._current_word_bits_left-=A,o}var r=this._current_word_bits_left?this._current_word:0;r>>>=32-this._current_word_bits_left;var y=A-this._current_word_bits_left;this._fillCurrentWord();var C=Math.min(y,this._current_word_bits_left),w=this._current_word>>>32-C;return this._current_word<<=C,this._current_word_bits_left-=C,r<<C|w},c.prototype.readBool=function(){return this.readBits(1)===1},c.prototype.readByte=function(){return this.readBits(8)},c.prototype._skipLeadingZero=function(){var A;for(A=0;A<this._current_word_bits_left;A++)if(this._current_word&2147483648>>>A)return this._current_word<<=A,this._current_word_bits_left-=A,A;return this._fillCurrentWord(),A+this._skipLeadingZero()},c.prototype.readUEG=function(){var A=this._skipLeadingZero();return this.readBits(A+1)-1},c.prototype.readSEG=function(){var A=this.readUEG();return 1&A?A+1>>>1:-1*(A>>>1)},c}(),F=function(){function c(){}return c._ebsp2rbsp=function(A){for(var o=A,r=o.byteLength,y=new Uint8Array(r),C=0,w=0;w<r;w++)w>=2&&o[w]===3&&o[w-1]===0&&o[w-2]===0||(y[C]=o[w],C++);return new Uint8Array(y.buffer,0,C)},c.parseSPS=function(A){for(var o=A.subarray(1,4),r="avc1.",y=0;y<3;y++){var C=o[y].toString(16);C.length<2&&(C="0"+C),r+=C}var w=c._ebsp2rbsp(A),_=new M(w);_.readByte();var I=_.readByte();_.readByte();var k=_.readByte();_.readUEG();var $=c.getProfileString(I),D=c.getLevelString(k),N=1,z=420,q=8,R=8;if((I===100||I===110||I===122||I===244||I===44||I===83||I===86||I===118||I===128||I===138||I===144)&&((N=_.readUEG())===3&&_.readBits(1),N<=3&&(z=[0,420,422,444][N]),q=_.readUEG()+8,R=_.readUEG()+8,_.readBits(1),_.readBool()))for(var Y=N!==3?8:12,se=0;se<Y;se++)_.readBool()&&(se<6?c._skipScalingList(_,16):c._skipScalingList(_,64));_.readUEG();var re=_.readUEG();if(re===0)_.readUEG();else if(re===1){_.readBits(1),_.readSEG(),_.readSEG();var de=_.readUEG();for(se=0;se<de;se++)_.readSEG()}var oe=_.readUEG();_.readBits(1);var _e=_.readUEG(),ve=_.readUEG(),Ae=_.readBits(1);Ae===0&&_.readBits(1),_.readBits(1);var Le=0,we=0,be=0,He=0;_.readBool()&&(Le=_.readUEG(),we=_.readUEG(),be=_.readUEG(),He=_.readUEG());var At=1,ke=1,pt=0,Ne=!0,Qe=0,Ve=0;if(_.readBool()){if(_.readBool()){var je=_.readByte();je>0&&je<16?(At=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2][je-1],ke=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1][je-1]):je===255&&(At=_.readByte()<<8|_.readByte(),ke=_.readByte()<<8|_.readByte())}if(_.readBool()&&_.readBool(),_.readBool()&&(_.readBits(4),_.readBool()&&_.readBits(24)),_.readBool()&&(_.readUEG(),_.readUEG()),_.readBool()){var $t=_.readBits(32),Jt=_.readBits(32);Ne=_.readBool(),pt=(Qe=Jt)/(Ve=2*$t)}}var et=1;At===1&&ke===1||(et=At/ke);var ot=0,qe=0;N===0?(ot=1,qe=2-Ae):(ot=N===3?1:2,qe=(N===1?2:1)*(2-Ae));var Ze=16*(_e+1),Gt=16*(ve+1)*(2-Ae);Ze-=(Le+we)*ot,Gt-=(be+He)*qe;var hi=Math.ceil(Ze*et);return _.destroy(),_=null,{codec_mimetype:r,profile_idc:I,level_idc:k,profile_string:$,level_string:D,chroma_format_idc:N,bit_depth:q,bit_depth_luma:q,bit_depth_chroma:R,ref_frames:oe,chroma_format:z,chroma_format_string:c.getChromaFormatString(z),frame_rate:{fixed:Ne,fps:pt,fps_den:Ve,fps_num:Qe},sar_ratio:{width:At,height:ke},codec_size:{width:Ze,height:Gt},present_size:{width:hi,height:Gt}}},c._skipScalingList=function(A,o){for(var r=8,y=8,C=0;C<o;C++)y!==0&&(y=(r+A.readSEG()+256)%256),r=y===0?r:y},c.getProfileString=function(A){switch(A){case 66:return"Baseline";case 77:return"Main";case 88:return"Extended";case 100:return"High";case 110:return"High10";case 122:return"High422";case 244:return"High444";default:return"Unknown"}},c.getLevelString=function(A){return(A/10).toFixed(1)},c.getChromaFormatString=function(A){switch(A){case 420:return"4:2:0";case 422:return"4:2:2";case 444:return"4:4:4";default:return"Unknown"}},c}();var G=t(6399);const K=function(){function c(){}return c._ebsp2rbsp=function(A){for(var o=A,r=o.byteLength,y=new Uint8Array(r),C=0,w=0;w<r;w++)w>=2&&o[w]===3&&o[w-1]===0&&o[w-2]===0||(y[C]=o[w],C++);return new Uint8Array(y.buffer,0,C)},c.parseVPS=function(A){var o=c._ebsp2rbsp(A),r=new M(o);return r.readByte(),r.readByte(),r.readBits(4),r.readBits(2),r.readBits(6),{num_temporal_layers:r.readBits(3)+1,temporal_id_nested:r.readBool()}},c.parseSPS=function(A){var o=c._ebsp2rbsp(A),r=new M(o);r.readByte(),r.readByte();for(var y=0,C=0,w=0,_=0,I=(r.readBits(4),r.readBits(3)),k=(r.readBool(),r.readBits(2)),$=r.readBool(),D=r.readBits(5),N=r.readByte(),z=r.readByte(),q=r.readByte(),R=r.readByte(),Y=r.readByte(),se=r.readByte(),re=r.readByte(),de=r.readByte(),oe=r.readByte(),_e=r.readByte(),ve=r.readByte(),Ae=[],Le=[],we=0;we<I;we++)Ae.push(r.readBool()),Le.push(r.readBool());if(I>0)for(we=I;we<8;we++)r.readBits(2);for(we=0;we<I;we++)Ae[we]&&(r.readByte(),r.readByte(),r.readByte(),r.readByte(),r.readByte(),r.readByte(),r.readByte(),r.readByte(),r.readByte(),r.readByte(),r.readByte()),Le[we]&&r.readByte();r.readUEG();var be=r.readUEG();be===3&&r.readBits(1);var He=r.readUEG(),At=r.readUEG();r.readBool()&&(y+=r.readUEG(),C+=r.readUEG(),w+=r.readUEG(),_+=r.readUEG());var ke=r.readUEG(),pt=r.readUEG(),Ne=r.readUEG();for(we=r.readBool()?0:I;we<=I;we++)r.readUEG(),r.readUEG(),r.readUEG();if(r.readUEG(),r.readUEG(),r.readUEG(),r.readUEG(),r.readUEG(),r.readUEG(),r.readBool()&&r.readBool())for(var Qe=0;Qe<4;Qe++)for(var Ve=0;Ve<(Qe===3?2:6);Ve++)if(r.readBool()){var je=Math.min(64,1<<4+(Qe<<1));for(Qe>1&&r.readSEG(),we=0;we<je;we++)r.readSEG()}else r.readUEG();r.readBool(),r.readBool(),r.readBool()&&(r.readByte(),r.readUEG(),r.readUEG(),r.readBool());var $t=r.readUEG(),Jt=0;for(we=0;we<$t;we++){var et=!1;if(we!==0&&(et=r.readBool()),et){we===$t&&r.readUEG(),r.readBool(),r.readUEG();for(var ot=0,qe=0;qe<=Jt;qe++){var Ze=r.readBool(),Gt=!1;Ze||(Gt=r.readBool()),(Ze||Gt)&&ot++}Jt=ot}else{var hi=r.readUEG(),Wi=r.readUEG();for(Jt=hi+Wi,qe=0;qe<hi;qe++)r.readUEG(),r.readBool();for(qe=0;qe<Wi;qe++)r.readUEG(),r.readBool()}}if(r.readBool()){var qi=r.readUEG();for(we=0;we<qi;we++){for(qe=0;qe<Ne+4;qe++)r.readBits(1);r.readBits(1)}}var ii=0,pi=1,Qt=1,Ti=!1,Kn=1,Yn=1;if(r.readBool(),r.readBool(),r.readBool()){if(r.readBool()){var Pi=r.readByte();Pi>0&&Pi<=16?(pi=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2][Pi-1],Qt=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1][Pi-1]):Pi===255&&(pi=r.readBits(16),Qt=r.readBits(16))}if(r.readBool()&&r.readBool(),r.readBool()&&(r.readBits(3),r.readBool(),r.readBool()&&(r.readByte(),r.readByte(),r.readByte())),r.readBool()&&(r.readUEG(),r.readUEG()),r.readBool(),r.readBool(),r.readBool(),r.readBool()&&(r.readUEG(),r.readUEG(),r.readUEG(),r.readUEG()),r.readBool()&&(Kn=r.readBits(32),Yn=r.readBits(32),r.readBool()&&r.readUEG(),r.readBool())){var Xn,Zn,Ki=!1;for(Xn=r.readBool(),Zn=r.readBool(),(Xn||Zn)&&((Ki=r.readBool())&&(r.readByte(),r.readBits(5),r.readBool(),r.readBits(5)),r.readBits(4),r.readBits(4),Ki&&r.readBits(4),r.readBits(5),r.readBits(5),r.readBits(5)),we=0;we<=I;we++){var po=r.readBool();Ti=po;var fo=!1,Jn=1;po||(fo=r.readBool());var mo=!1;if(fo?r.readSEG():mo=r.readBool(),mo||(Jn=r.readUEG()+1),Xn)for(qe=0;qe<Jn;qe++)r.readUEG(),r.readUEG(),Ki&&(r.readUEG(),r.readUEG());if(Zn)for(qe=0;qe<Jn;qe++)r.readUEG(),r.readUEG(),Ki&&(r.readUEG(),r.readUEG())}}r.readBool()&&(r.readBool(),r.readBool(),r.readBool(),ii=r.readUEG(),r.readUEG(),r.readUEG(),r.readUEG(),r.readUEG())}r.readBool();var qa="hvc1.".concat(D,".1.L").concat(ve,".B0"),_o=He-(y+C)*(be===1||be===2?2:1),vo=At-(w+_)*(be===1?2:1),go=1;return pi!==1&&Qt!==1&&(go=pi/Qt),r.destroy(),r=null,{codec_mimetype:qa,level_string:c.getLevelString(ve),profile_idc:D,bit_depth:ke+8,ref_frames:1,chroma_format:be,chroma_format_string:c.getChromaFormatString(be),general_level_idc:ve,general_profile_space:k,general_tier_flag:$,general_profile_idc:D,general_profile_compatibility_flags_1:N,general_profile_compatibility_flags_2:z,general_profile_compatibility_flags_3:q,general_profile_compatibility_flags_4:R,general_constraint_indicator_flags_1:Y,general_constraint_indicator_flags_2:se,general_constraint_indicator_flags_3:re,general_constraint_indicator_flags_4:de,general_constraint_indicator_flags_5:oe,general_constraint_indicator_flags_6:_e,min_spatial_segmentation_idc:ii,constant_frame_rate:0,chroma_format_idc:be,bit_depth_luma_minus8:ke,bit_depth_chroma_minus8:pt,frame_rate:{fixed:Ti,fps:Yn/Kn,fps_den:Kn,fps_num:Yn},sar_ratio:{width:pi,height:Qt},codec_size:{width:_o,height:vo},present_size:{width:_o*go,height:vo}}},c.parsePPS=function(A){var o=c._ebsp2rbsp(A),r=new M(o);r.readByte(),r.readByte(),r.readUEG(),r.readUEG(),r.readBool(),r.readBool(),r.readBits(3),r.readBool(),r.readBool(),r.readUEG(),r.readUEG(),r.readSEG(),r.readBool(),r.readBool(),r.readBool()&&r.readUEG(),r.readSEG(),r.readSEG(),r.readBool(),r.readBool(),r.readBool(),r.readBool();var y=r.readBool(),C=r.readBool(),w=1;return C&&y?w=0:C?w=3:y&&(w=2),{parallelismType:w}},c.getChromaFormatString=function(A){switch(A){case 0:return"4:0:0";case 1:return"4:2:0";case 2:return"4:2:2";case 3:return"4:4:4";default:return"Unknown"}},c.getProfileString=function(A){switch(A){case 1:return"Main";case 2:return"Main10";case 3:return"MainSP";case 4:return"Rext";case 9:return"SCC";default:return"Unknown"}},c.getLevelString=function(A){return(A/30).toFixed(1)},c}();function H(c){return c.byteOffset%2==0&&c.byteLength%2==0}function Z(c){return c.byteOffset%4==0&&c.byteLength%4==0}function ie(c,A){for(var o=0;o<c.length;o++)if(c[o]!==A[o])return!1;return!0}const T=function(c,A){return c.byteLength===A.byteLength&&(Z(c)&&Z(A)?function(o,r){return ie(new Uint32Array(o.buffer,o.byteOffset,o.byteLength/4),new Uint32Array(r.buffer,r.byteOffset,r.byteLength/4))}(c,A):H(c)&&H(A)?function(o,r){return ie(new Uint16Array(o.buffer,o.byteOffset,o.byteLength/2),new Uint16Array(r.buffer,r.byteOffset,r.byteLength/2))}(c,A):function(o,r){return ie(o,r)}(c,A))},m=function(){function c(){}return c.parseOBUs=function(A){for(var o=null,r=0;r<A.byteLength;){A[r];var y=(120&A[r])>>3,C=!!(4&A[r]),w=!!(2&A[r]);A[r],r+=1,C&&(r+=1);var _=Number.POSITIVE_INFINITY;if(w){_=0;for(var I=0;_|=(127&A[r])<<7*I,128&A[r+=1];I++);}y===1&&(o=c.parseSeuqneceHeader(A.subarray(r,r+_))),r+=_}return o},c.parseSeuqneceHeader=function(A){var o=new M(A),r=o.readBits(3),y=(o.readBool(),o.readBool()),C=!0,w=0,_=0,I=[];if(y)I.push({operating_point_idc:0,level:o.readBits(5),tier:0});else{if(o.readBool()){var k=o.readBits(32),$=o.readBits(32),D=o.readBool();if(D){for(var N=0;o.readBits(1)===0;)N+=1;N>=32||o.readBits(N)}w=$,_=k,C=D,o.readBool()&&(o.readBits(5),o.readBits(32),o.readBits(5),o.readBits(5))}for(var z=o.readBool(),q=o.readBits(5),R=0;R<=q;R++){var Y=o.readBits(12),se=o.readBits(5),re=se>7?o.readBits(1):0;I.push({operating_point_idc:Y,level:se,tier:re}),z&&o.readBool()&&o.readBits(4)}}var de=I[0],oe=de.level,_e=de.tier,ve=o.readBits(4),Ae=o.readBits(4),Le=o.readBits(ve+1)+1,we=o.readBits(Ae+1)+1,be=!1;y||(be=o.readBool()),be&&(o.readBits(4),o.readBits(4)),o.readBool(),o.readBool(),o.readBool();var He=!1;y||(o.readBool(),o.readBool(),o.readBool(),o.readBool(),(He=o.readBool())&&(o.readBool(),o.readBool()),(o.readBool()||o.readBits(1))&&(o.readBool()||o.readBits(1)),He&&o.readBits(3)),o.readBool(),o.readBool(),o.readBool();var At=o.readBool(),ke=8;ke=r===2&&At?o.readBool()?12:10:At?10:8;var pt=!1;r!==1&&(pt=o.readBool()),o.readBool()&&(o.readBits(8),o.readBits(8),o.readBits(8));var Ne=1,Qe=1;return pt?(o.readBits(1),Ne=1,Qe=1):(o.readBits(1),r===0?(Ne=1,Qe=1):r===1?(Ne=0,Qe=0):ke===12?o.readBits(1)&&o.readBits(1):(Ne=1,Qe=0),Ne&&Qe&&o.readBits(2),o.readBits(1)),o.readBool(),o.destroy(),o=null,{codec_mimetype:"av01.".concat(r,".").concat(c.getLevelString(oe,_e),".").concat(ke.toString(10).padStart(2,"0")),level:oe,tier:_e,level_string:c.getLevelString(oe,_e),profile_idc:r,profile_string:"".concat(r),bit_depth:ke,ref_frames:1,chroma_format:c.getChromaFormat(pt,Ne,Qe),chroma_format_string:c.getChromaFormatString(pt,Ne,Qe),frame_rate:{fixed:C,fps:w/_,fps_den:_,fps_num:w},sar_ratio:{width:1,height:1},codec_size:{width:Le,height:we},present_size:{width:1*Le,height:we}}},c.getLevelString=function(A,o){return"".concat(A.toString(10).padStart(2,"0")).concat(o===0?"M":"H")},c.getChromaFormat=function(A,o,r){return A?0:o===0&&r===0?3:o===1&&r===0?2:o===1&&r===1?1:Number.NaN},c.getChromaFormatString=function(A,o,r){return A?"4:0:0":o===0&&r===0?"4:4:4":o===1&&r===0?"4:2:2":o===1&&r===1?"4:2:0":"Unknown"},c}();var g=function(){function c(A,o){this.TAG="FLVDemuxer",this._config=o,this._onError=null,this._onMediaInfo=null,this._onMetaDataArrived=null,this._onScriptDataArrived=null,this._onTrackMetadata=null,this._onDataAvailable=null,this._dataOffset=A.dataOffset,this._firstParse=!0,this._dispatch=!1,this._hasAudio=A.hasAudioTrack,this._hasVideo=A.hasVideoTrack,this._hasAudioFlagOverrided=!1,this._hasVideoFlagOverrided=!1,this._audioInitialMetadataDispatched=!1,this._videoInitialMetadataDispatched=!1,this._mediaInfo=new h.A,this._mediaInfo.hasAudio=this._hasAudio,this._mediaInfo.hasVideo=this._hasVideo,this._metadata=null,this._audioMetadata=null,this._videoMetadata=null,this._naluLengthSize=4,this._timestampBase=0,this._timescale=1e3,this._duration=0,this._durationOverrided=!1,this._referenceFrameRate={fixed:!0,fps:23.976,fps_num:23976,fps_den:1e3},this._flvSoundRateTable=[5500,11025,22050,44100,48e3],this._mpegSamplingRates=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],this._mpegAudioV10SampleRateTable=[44100,48e3,32e3,0],this._mpegAudioV20SampleRateTable=[22050,24e3,16e3,0],this._mpegAudioV25SampleRateTable=[11025,12e3,8e3,0],this._mpegAudioL1BitRateTable=[0,32,64,96,128,160,192,224,256,288,320,352,384,416,448,-1],this._mpegAudioL2BitRateTable=[0,32,48,56,64,80,96,112,128,160,192,224,256,320,384,-1],this._mpegAudioL3BitRateTable=[0,32,40,48,56,64,80,96,112,128,160,192,224,256,320,-1],this._videoTrack={type:"video",id:1,sequenceNumber:0,samples:[],length:0},this._audioTrack={type:"audio",id:2,sequenceNumber:0,samples:[],length:0},this._littleEndian=function(){var r=new ArrayBuffer(2);return new DataView(r).setInt16(0,256,!0),new Int16Array(r)[0]===256}()}return c.prototype.destroy=function(){this._mediaInfo=null,this._metadata=null,this._audioMetadata=null,this._videoMetadata=null,this._videoTrack=null,this._audioTrack=null,this._onError=null,this._onMediaInfo=null,this._onMetaDataArrived=null,this._onScriptDataArrived=null,this._onTrackMetadata=null,this._onDataAvailable=null},c.probe=function(A){var o=new Uint8Array(A);if(o.byteLength<9)return{needMoreData:!0};var r={match:!1};if(o[0]!==70||o[1]!==76||o[2]!==86||o[3]!==1)return r;var y,C=(4&o[4])>>>2!=0,w=!!(1&o[4]),_=(y=o)[5]<<24|y[6]<<16|y[7]<<8|y[8];return _<9?r:{match:!0,consumed:_,dataOffset:_,hasAudioTrack:C,hasVideoTrack:w}},c.prototype.bindDataSource=function(A){return A.onDataArrival=this.parseChunks.bind(this),this},Object.defineProperty(c.prototype,"onTrackMetadata",{get:function(){return this._onTrackMetadata},set:function(A){this._onTrackMetadata=A},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"onMediaInfo",{get:function(){return this._onMediaInfo},set:function(A){this._onMediaInfo=A},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"onMetaDataArrived",{get:function(){return this._onMetaDataArrived},set:function(A){this._onMetaDataArrived=A},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"onScriptDataArrived",{get:function(){return this._onScriptDataArrived},set:function(A){this._onScriptDataArrived=A},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"onError",{get:function(){return this._onError},set:function(A){this._onError=A},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"onDataAvailable",{get:function(){return this._onDataAvailable},set:function(A){this._onDataAvailable=A},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"timestampBase",{get:function(){return this._timestampBase},set:function(A){this._timestampBase=A},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"overridedDuration",{get:function(){return this._duration},set:function(A){this._durationOverrided=!0,this._duration=A,this._mediaInfo&&(this._mediaInfo.duration=A)},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"overridedHasAudio",{set:function(A){this._hasAudioFlagOverrided=!0,this._hasAudio=A,this._mediaInfo&&(this._mediaInfo.hasAudio=A)},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"overridedHasVideo",{set:function(A){this._hasVideoFlagOverrided=!0,this._hasVideo=A,this._mediaInfo&&(this._mediaInfo.hasVideo=A)},enumerable:!1,configurable:!0}),c.prototype.resetMediaInfo=function(){this._mediaInfo=new h.A},c.prototype._isInitialMetadataDispatched=function(){return this._hasAudio&&this._hasVideo?this._audioInitialMetadataDispatched&&this._videoInitialMetadataDispatched:this._hasAudio&&!this._hasVideo?this._audioInitialMetadataDispatched:!(this._hasAudio||!this._hasVideo)&&this._videoInitialMetadataDispatched},c.prototype.parseChunks=function(A,o){var r,y;if(!(this._onError&&this._onMediaInfo&&this._onTrackMetadata&&this._onDataAvailable))throw new B.j4("Flv: onError & onMediaInfo & onTrackMetadata & onDataAvailable callback must be specified");var C=0,w=this._littleEndian;if(o===0){if(!(A.byteLength>13))return 0;var _=c.probe(A);C=(_==null?void 0:_.dataOffset)||0}for(this._firstParse&&(this._firstParse=!1,o+C!==this._dataOffset&&n.A.w(this.TAG,"First time parsing but chunk byteStart invalid!"),(I=new DataView(A,C)).getUint32(0,!w)!==0&&n.A.w(this.TAG,"PrevTagSize0 !== 0 !!!"),C+=4);C<A.byteLength;){this._dispatch=!0;var I=new DataView(A,C);if(C+11+4>A.byteLength)break;var k=I.getUint8(0),$=16777215&I.getUint32(0,!w);if(C+11+$+4>A.byteLength)break;if(k===8||k===9||k===18){var D=I.getUint8(4),N=I.getUint8(5),z=I.getUint8(6)|N<<8|D<<16|I.getUint8(7)<<24;16777215&I.getUint32(7,!w)&&n.A.w(this.TAG,"Meet tag which has StreamID != 0!");var q=C+11;switch(k){case 8:this._parseAudioData(A,q,$,z);break;case 9:this._parseVideoData(A,q,$,z,o+C);break;case 18:this._parseScriptData(A,q,$)}var R=I.getUint32(11+$,!w);R!==11+$&&n.A.w(this.TAG,"Invalid PrevTagSize ".concat(R)),C+=11+$+4}else n.A.w(this.TAG,"Unsupported tag type ".concat(k,", skipped")),C+=11+$+4}return this._isInitialMetadataDispatched()&&this._dispatch&&(!((r=this._audioTrack)===null||r===void 0)&&r.length||!((y=this._videoTrack)===null||y===void 0)&&y.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack),C},c.prototype._parseScriptData=function(A,o,r){var y,C,w,_=P.parseScriptData(A,o,r);if(_.hasOwnProperty("onMetaData")){if(_.onMetaData==null||typeof _.onMetaData!="object")return void n.A.w(this.TAG,"Invalid onMetaData structure!");this._metadata&&n.A.w(this.TAG,"Found another onMetaData tag!"),this._metadata=_;var I=(y=this._metadata)===null||y===void 0?void 0:y.onMetaData;if(this._onMetaDataArrived&&this._onMetaDataArrived(Object.assign({},I)),typeof(I==null?void 0:I.hasAudio)=="boolean"&&(this._hasAudioFlagOverrided||(this._hasAudio=I.hasAudio,this._mediaInfo&&(this._mediaInfo.hasAudio=this._hasAudio))),typeof(I==null?void 0:I.hasVideo)=="boolean"&&(this._hasVideoFlagOverrided||(this._hasVideo=I.hasVideo,this._mediaInfo&&(this._mediaInfo.hasVideo=this._hasVideo))),typeof(I==null?void 0:I.audiodatarate)=="number"&&this._mediaInfo&&(this._mediaInfo.audioDataRate=I.audiodatarate),typeof(I==null?void 0:I.videodatarate)=="number"&&this._mediaInfo&&(this._mediaInfo.videoDataRate=I.videodatarate),typeof(I==null?void 0:I.width)=="number"&&this._mediaInfo&&(this._mediaInfo.width=I.width),typeof(I==null?void 0:I.height)=="number"&&this._mediaInfo&&(this._mediaInfo.height=I.height),typeof(I==null?void 0:I.duration)=="number"){if(!this._durationOverrided){var k=Math.floor(I.duration*this._timescale);this._duration=k,this._mediaInfo&&(this._mediaInfo.duration=k)}}else this._mediaInfo&&(this._mediaInfo.duration=0);if(typeof(I==null?void 0:I.framerate)=="number"){var $=Math.floor(1e3*I.framerate);if($>0){var D=$/1e3;this._referenceFrameRate.fixed=!0,this._referenceFrameRate.fps=D,this._referenceFrameRate.fps_num=$,this._referenceFrameRate.fps_den=1e3,this._mediaInfo&&(this._mediaInfo.fps=D)}}if(typeof(I==null?void 0:I.keyframes)=="object"){this._mediaInfo&&(this._mediaInfo.hasKeyframesIndex=!0);var N=I.keyframes;this._mediaInfo&&(this._mediaInfo.keyframesIndex=this._parseKeyframesIndex(N)),I.keyframes=null}else this._mediaInfo&&(this._mediaInfo.hasKeyframesIndex=!1);this._dispatch=!1,this._mediaInfo&&(this._mediaInfo.metadata=I),n.A.v(this.TAG,"Parsed onMetaData"),!((C=this._mediaInfo)===null||C===void 0)&&C.isComplete()&&((w=this._onMediaInfo)===null||w===void 0||w.call(this,this._mediaInfo))}Object.keys(_).length>0&&this._onScriptDataArrived&&this._onScriptDataArrived(Object.assign({},_))},c.prototype._parseKeyframesIndex=function(A){for(var o=[],r=[],y=1;y<A.times.length;y++){var C=this._timestampBase+Math.floor(1e3*A.times[y]);o.push(C),r.push(A.filepositions[y])}return{times:o,filepositions:r}},c.prototype._parseAudioData=function(A,o,r,y){var C,w,_,I,k,$,D,N,z,q;if(r<=1)n.A.w(this.TAG,"Flv: Invalid audio packet, missing SoundData payload!");else if(!this._hasAudioFlagOverrided||this._hasAudio!==!1){this._littleEndian;var R=new DataView(A,o,r).getUint8(0),Y=R>>>4;if(Y===2||Y===10){var se=0,re=(12&R)>>>2;if(re>=0&&re<=4){se=this._flvSoundRateTable[re];var de=1&R,oe=this._audioMetadata,_e=this._audioTrack;if(oe||(this._hasAudio!==!1||this._hasAudioFlagOverrided||(this._hasAudio=!0,this._mediaInfo&&(this._mediaInfo.hasAudio=!0)),(oe=this._audioMetadata={}).type="audio",oe.id=_e==null?void 0:_e.id,oe.timescale=this._timescale,oe.duration=this._duration,oe.audioSampleRate=se,oe.channelCount=de===0?1:2),Y===10){var ve=this._parseAACAudioData(A,o+1,r-1);if(ve===void 0)return;if((ve==null?void 0:ve.packetType)===0){if(oe!=null&&oe.config){if(T(ve.data.config,oe==null?void 0:oe.config))return;n.A.w(this.TAG,"AudioSpecificConfig has been changed, re-generate initialization segment")}var Ae=ve.data;oe.audioSampleRate=Ae==null?void 0:Ae.samplingRate,oe.channelCount=Ae==null?void 0:Ae.channelCount,oe.codec=Ae==null?void 0:Ae.codec,oe.originalCodec=Ae==null?void 0:Ae.originalCodec,oe.config=Ae==null?void 0:Ae.config,oe.refSampleDuration=1024/oe.audioSampleRate*oe.timescale,n.A.v(this.TAG,"Parsed AudioSpecificConfig"),this._isInitialMetadataDispatched()?this._dispatch&&(!((_=this._audioTrack)===null||_===void 0)&&_.length||!((I=this._videoTrack)===null||I===void 0)&&I.length)&&((k=this._onDataAvailable)===null||k===void 0||k.call(this,this._audioTrack,this._videoTrack)):this._audioInitialMetadataDispatched=!0,this._dispatch=!1,($=this._onTrackMetadata)===null||$===void 0||$.call(this,"audio",oe),(be=this._mediaInfo).audioCodec=oe.originalCodec||"",be.audioSampleRate=oe.audioSampleRate,be.audioChannelCount=oe.channelCount,be.hasVideo?be.videoCodec!=null&&(be.mimeType='video/x-flv; codecs="'+be.videoCodec+","+be.audioCodec+'"'):be.mimeType='video/x-flv; codecs="'+be.audioCodec+'"',be!=null&&be.isComplete()&&((D=this._onMediaInfo)===null||D===void 0||D.call(this,be))}else if(ve.packetType===1){var Le=this._timestampBase+y,we={unit:ve.data,length:ve.data.byteLength,dts:Le,pts:Le};_e&&(_e==null||_e.samples.push(we),_e.length+=((N=ve==null?void 0:ve.data)===null||N===void 0?void 0:N.length)||0)}else n.A.e(this.TAG,"Flv: Unsupported AAC data type ".concat(ve.packetType))}else if(Y===2){if(!oe.codec){var be;if((Ae=this._parseMP3AudioData(A,o+1,r-1,!0))===void 0)return;oe.audioSampleRate=Ae.samplingRate,oe.channelCount=Ae.channelCount,oe.codec=Ae.codec,oe.originalCodec=Ae.originalCodec,oe.refSampleDuration=1152/oe.audioSampleRate*oe.timescale,n.A.v(this.TAG,"Parsed MPEG Audio Frame Header"),this._audioInitialMetadataDispatched=!0,(z=this._onTrackMetadata)===null||z===void 0||z.call(this,"audio",oe),(be=this._mediaInfo).audioCodec=oe.codec,be.audioSampleRate=oe.audioSampleRate,be.audioChannelCount=oe.channelCount,be.audioDataRate=Ae.bitRate,be!=null&&be.hasVideo?be.videoCodec!=null&&(be.mimeType='video/x-flv; codecs="'+be.videoCodec+","+be.audioCodec+'"'):be.mimeType='video/x-flv; codecs="'+be.audioCodec+'"',be.isComplete()&&((q=this._onMediaInfo)===null||q===void 0||q.call(this,be))}var He=this._parseMP3AudioData(A,o+1,r-1,!1);if(He===void 0)return;Le=this._timestampBase+y;var At={unit:He,length:He.byteLength,dts:Le,pts:Le};_e==null||_e.samples.push(At),_e&&(_e.length+=He.length)}}else(w=this._onError)===null||w===void 0||w.call(this,G.A.FORMAT_ERROR,"Flv: Invalid audio sample rate idx: "+re)}else(C=this._onError)===null||C===void 0||C.call(this,G.A.CODEC_UNSUPPORTED,"Flv: Unsupported audio codec idx: "+Y)}},c.prototype._parseAACAudioData=function(A,o,r){if(!(r<=1)){var y={},C=new Uint8Array(A,o,r);return y.packetType=C[0],C[0]===0?y.data=this._parseAACAudioSpecificConfig(A,o+1,r-1):y.data=C.subarray(1),y}n.A.w(this.TAG,"Flv: Invalid AAC packet, missing AACPacketType or/and Data!")},c.prototype._parseAACAudioSpecificConfig=function(A,o,r){var y,C,w,_,I=new Uint8Array(A,o,r),k=null,$=0,D=null;if($=w=I[0]>>>3,(_=(7&I[0])<<1|I[1]>>>7)<0||_>=this._mpegSamplingRates.length)(y=this._onError)===null||y===void 0||y.call(this,G.A.FORMAT_ERROR,"Flv: AAC invalid sampling frequency index!");else{var N=this._mpegSamplingRates[_],z=(120&I[1])>>>3;if(!(z<0||z>=8)){$===5&&(D=(7&I[1])<<1|I[2]>>>7,I[2]);var q=self.navigator.userAgent.toLowerCase();return q.includes("firefox")?_>=6?($=5,k=new Array(4),D=_-3):($=2,k=new Array(2),D=_):q.includes("android")?($=2,k=new Array(2),D=_):($=5,D=_,k=new Array(4),_>=6?D=_-3:z===1&&($=2,k=new Array(2),D=_)),k[0]=$<<3,k[0]|=(15&_)>>>1,k[1]=(15&_)<<7,k[1]|=(15&z)<<3,$===5&&(k[1]|=(15&D)>>>1,k[2]=(1&D)<<7,k[2]|=8,k[3]=0),{config:k,samplingRate:N,channelCount:z,codec:"mp4a.40."+$,originalCodec:"mp4a.40."+w}}(C=this._onError)===null||C===void 0||C.call(this,G.A.FORMAT_ERROR,"Flv: AAC invalid channel configuration")}},c.prototype._parseMP3AudioData=function(A,o,r,y){if(!(r<4)){this._littleEndian;var C,w=new Uint8Array(A,o,r);if(y){if(w[0]!==255)return;var _=w[1]>>>3&3,I=(6&w[1])>>1,k=(240&w[2])>>>4,$=(12&w[2])>>>2,D=3&~(w[3]>>>6)?2:1,N=0,z=0;switch(_){case 0:N=this._mpegAudioV25SampleRateTable[$];break;case 2:N=this._mpegAudioV20SampleRateTable[$];break;case 3:N=this._mpegAudioV10SampleRateTable[$]}switch(I){case 1:k<this._mpegAudioL3BitRateTable.length&&(z=this._mpegAudioL3BitRateTable[k]);break;case 2:k<this._mpegAudioL2BitRateTable.length&&(z=this._mpegAudioL2BitRateTable[k]);break;case 3:k<this._mpegAudioL1BitRateTable.length&&(z=this._mpegAudioL1BitRateTable[k])}C={bitRate:z,samplingRate:N,channelCount:D,codec:"mp3",originalCodec:"mp3"}}else C=w;return C}n.A.w(this.TAG,"Flv: Invalid MP3 packet, header missing!")},c.prototype._parseVideoData=function(A,o,r,y,C){var w,_;if(r<=1)n.A.w(this.TAG,"Flv: Invalid video packet, missing VideoData payload!");else if(!this._hasVideoFlagOverrided||this._hasVideo!==!1){var I=new Uint8Array(A,o,r)[0],k=(112&I)>>>4;if(128&I){var $=15&I,D=String.fromCharCode.apply(String,function(z,q,R){if(arguments.length===2)for(var Y,se=0,re=q.length;se<re;se++)!Y&&se in q||(Y||(Y=Array.prototype.slice.call(q,0,se)),Y[se]=q[se]);return z.concat(Y||Array.prototype.slice.call(q))}([],function(z,q){var R=typeof Symbol=="function"&&z[Symbol.iterator];if(!R)return z;var Y,se,re=R.call(z),de=[];try{for(;(q===void 0||q-- >0)&&!(Y=re.next()).done;)de.push(Y.value)}catch(oe){se={error:oe}}finally{try{Y&&!Y.done&&(R=re.return)&&R.call(re)}finally{if(se)throw se.error}}return de}(new Uint8Array(A,o,r).slice(1,5)),!1));D==="hvc1"?this._parseEnhancedHEVCVideoPacket(A,o+5,r-5,y,C,k,$):D==="av01"?this._parseEnhancedAV1VideoPacket(A,o+5,r-5,y,C,k,$):(_=this._onError)===null||_===void 0||_.call(this,G.A.CODEC_UNSUPPORTED,"Flv: Unsupported codec in video frame: ".concat(D))}else{var N=15&I;N===7?this._parseAVCVideoPacket(A,o+1,r-1,y,C,k):N===12?this._parseHEVCVideoPacket(A,o+1,r-1,y,C,k):(w=this._onError)===null||w===void 0||w.call(this,G.A.CODEC_UNSUPPORTED,"Flv: Unsupported codec in video frame: ".concat(N))}}},c.prototype._parseAVCVideoPacket=function(A,o,r,y,C,w){var _;if(r<4)n.A.w(this.TAG,"Flv: Invalid AVC packet, missing AVCPacketType or/and CompositionTime");else{var I=this._littleEndian,k=new DataView(A,o,r),$=k.getUint8(0),D=(16777215&k.getUint32(0,!I))<<8>>8;$===0?this._parseAVCDecoderConfigurationRecord(A,o+4,r-4):$===1?this._parseAVCVideoData(A,o+4,r-4,y,C,w,D):$===2||(_=this._onError)===null||_===void 0||_.call(this,G.A.FORMAT_ERROR,"Flv: Invalid video packet type ".concat($))}},c.prototype._parseHEVCVideoPacket=function(A,o,r,y,C,w){var _;if(r<4)n.A.w(this.TAG,"Flv: Invalid HEVC packet, missing HEVCPacketType or/and CompositionTime");else{var I=this._littleEndian,k=new DataView(A,o,r),$=k.getUint8(0),D=(16777215&k.getUint32(0,!I))<<8>>8;$===0?this._parseHEVCDecoderConfigurationRecord(A,o+4,r-4):$===1?this._parseHEVCVideoData(A,o+4,r-4,y,C,w,D):$===2||(_=this._onError)===null||_===void 0||_.call(this,G.A.FORMAT_ERROR,"Flv: Invalid video packet type ".concat($))}},c.prototype._parseEnhancedHEVCVideoPacket=function(A,o,r,y,C,w,_){var I,k=this._littleEndian,$=new DataView(A,o,r);if(_===0)this._parseHEVCDecoderConfigurationRecord(A,o,r);else if(_===1){var D=(4294967040&$.getUint32(0,!k))>>8;this._parseHEVCVideoData(A,o+3,r-3,y,C,w,D)}else _===3?this._parseHEVCVideoData(A,o,r,y,C,w,0):_===2||(I=this._onError)===null||I===void 0||I.call(this,G.A.FORMAT_ERROR,"Flv: Invalid video packet type ".concat(_))},c.prototype._parseEnhancedAV1VideoPacket=function(A,o,r,y,C,w,_){var I,k;this._littleEndian,_===0?this._parseAV1CodecConfigurationRecord(A,o,r):_===1?this._parseAV1VideoData(A,o,r,y,C,w,0):_===5?(I=this._onError)===null||I===void 0||I.call(this,G.A.FORMAT_ERROR,"Flv: Not Suported MP2T AV1 video packet type ".concat(_)):_===2||(k=this._onError)===null||k===void 0||k.call(this,G.A.FORMAT_ERROR,"Flv: Invalid video packet type ".concat(_))},c.prototype._parseAVCDecoderConfigurationRecord=function(A,o,r){var y,C,w,_,I,k,$,D,N,z,q;if(r<7)n.A.w(this.TAG,"Flv: Invalid AVCDecoderConfigurationRecord, lack of data!");else{var R=this._videoMetadata,Y=this._videoTrack,se=this._littleEndian,re=new DataView(A,o,r);if(R){if(R.avcc!==void 0){var de=new Uint8Array(A,o,r);if(T(de,R.avcc))return;n.A.w(this.TAG,"AVCDecoderConfigurationRecord has been changed, re-generate initialization segment")}}else this._hasVideo!==!1||this._hasVideoFlagOverrided||(this._hasVideo=!0,this._mediaInfo&&(this._mediaInfo.hasVideo=!0)),(R=this._videoMetadata={}).type="video",R.id=Y==null?void 0:Y.id,R.timescale=this._timescale,R.duration=this._duration;var oe=re.getUint8(0),_e=re.getUint8(1);if(re.getUint8(2),re.getUint8(3),oe===1&&_e!==0)if(this._naluLengthSize=1+(3&re.getUint8(4)),this._naluLengthSize===3||this._naluLengthSize===4){var ve=31&re.getUint8(5);if(ve!==0){ve>1&&n.A.w(this.TAG,"Flv: Strange AVCDecoderConfigurationRecord: SPS Count = ".concat(ve));for(var Ae=6,Le=0;Le<ve;Le++){var we=re.getUint16(Ae,!se);if(Ae+=2,we!==0){var be=new Uint8Array(A,o+Ae,we);Ae+=we;var He=F.parseSPS(be);if(Le===0){R.codecWidth=He.codec_size.width,R.codecHeight=He.codec_size.height,R.presentWidth=He.present_size.width,R.presentHeight=He.present_size.height,R.profile=He.profile_string,R.level=He.level_string,R.bitDepth=He.bit_depth,R.chromaFormat=He.chroma_format,R.sarRatio=He.sar_ratio,R.frameRate=He.frame_rate,He.frame_rate.fixed&&He.frame_rate.fps_num!==0&&He.frame_rate.fps_den!==0||(R.frameRate=this._referenceFrameRate);var At=(_=R.frameRate)===null||_===void 0?void 0:_.fps_den,ke=(I=R.frameRate)===null||I===void 0?void 0:I.fps_num;R.refSampleDuration=R.timescale*(At/ke);for(var pt=be.subarray(1,4),Ne="avc1.",Qe=0;Qe<3;Qe++){var Ve=pt[Qe].toString(16);Ve.length<2&&(Ve="0"+Ve),Ne+=Ve}R.codec=Ne;var je=this._mediaInfo;je.width=R.codecWidth,je.height=R.codecHeight,je.fps=R.frameRate.fps,je.profile=R.profile,je.level=R.level,je.refFrames=He.ref_frames,je.chromaFormat=He.chroma_format_string,je.sarNum=R.sarRatio.width,je.sarDen=R.sarRatio.height,je.videoCodec=Ne,je.hasAudio?je.audioCodec!=null&&(je.mimeType='video/x-flv; codecs="'+je.videoCodec+","+je.audioCodec+'"'):je.mimeType='video/x-flv; codecs="'+je.videoCodec+'"',je.isComplete()&&((k=this._onMediaInfo)===null||k===void 0||k.call(this,je))}}}var $t=re.getUint8(Ae);if($t!==0){for($t>1&&n.A.w(this.TAG,"Flv: Strange AVCDecoderConfigurationRecord: PPS Count = ".concat($t)),Ae++,Le=0;Le<$t;Le++)we=re.getUint16(Ae,!se),Ae+=2,we!==0&&(Ae+=we);R.avcc=new Uint8Array(r),R.avcc.set(new Uint8Array(A,o,r),0),n.A.v(this.TAG,"Parsed AVCDecoderConfigurationRecord"),this._isInitialMetadataDispatched()?this._dispatch&&(!((D=this._audioTrack)===null||D===void 0)&&D.length||!((N=this._videoTrack)===null||N===void 0)&&N.length)&&((z=this._onDataAvailable)===null||z===void 0||z.call(this,this._audioTrack,this._videoTrack)):this._videoInitialMetadataDispatched=!0,this._dispatch=!1,(q=this._onTrackMetadata)===null||q===void 0||q.call(this,"video",R)}else($=this._onError)===null||$===void 0||$.call(this,G.A.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord: No PPS")}else(w=this._onError)===null||w===void 0||w.call(this,G.A.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord: No SPS")}else(C=this._onError)===null||C===void 0||C.call(this,G.A.FORMAT_ERROR,"Flv: Strange NaluLengthSizeMinusOne: ".concat(this._naluLengthSize-1));else(y=this._onError)===null||y===void 0||y.call(this,G.A.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord")}},c.prototype._parseHEVCDecoderConfigurationRecord=function(A,o,r){var y,C,w,_,I,k,$;if(r<22)n.A.w(this.TAG,"Flv: Invalid HEVCDecoderConfigurationRecord, lack of data!");else{var D=this._videoMetadata,N=this._videoTrack,z=this._littleEndian,q=new DataView(A,o,r);if(D){if(D.hvcc!==void 0){var R=new Uint8Array(A,o,r);if(T(R,D.hvcc))return;n.A.w(this.TAG,"HEVCDecoderConfigurationRecord has been changed, re-generate initialization segment")}}else this._hasVideo!==!1||this._hasVideoFlagOverrided||(this._hasVideo=!0,this._mediaInfo&&(this._mediaInfo.hasVideo=!0)),(D=this._videoMetadata={}).type="video",D.id=N==null?void 0:N.id,D.timescale=this._timescale,D.duration=this._duration;var Y=q.getUint8(0),se=31&q.getUint8(1);if(Y===1&&se!==0)if(this._naluLengthSize=1+(3&q.getUint8(21)),this._naluLengthSize===3||this._naluLengthSize===4){for(var re=q.getUint8(22),de=0,oe=23;de<re;de++){var _e=63&q.getUint8(oe+0),ve=q.getUint16(oe+1,!z);oe+=3;for(var Ae=0;Ae<ve;Ae++){var Le=q.getUint16(oe+0,!z);if(Ae===0)if(_e===33){oe+=2;var we=new Uint8Array(A,o+oe,Le),be=K.parseSPS(we);D.codecWidth=be.codec_size.width,D.codecHeight=be.codec_size.height,D.presentWidth=be.present_size.width,D.presentHeight=be.present_size.height,D.profile=be==null?void 0:be.profile_string,D.level=be.level_string,D.bitDepth=be.bit_depth,D.chromaFormat=be.chroma_format,D.sarRatio=be.sar_ratio,D.frameRate=be.frame_rate,be.frame_rate.fixed&&be.frame_rate.fps_num!==0&&be.frame_rate.fps_den!==0||(D.frameRate=this._referenceFrameRate);var He=D.frameRate.fps_den,At=D.frameRate.fps_num;D.refSampleDuration=D.timescale*(He/At),D.codec=be.codec_mimetype;var ke=this._mediaInfo;ke.width=D.codecWidth,ke.height=D.codecHeight,ke.fps=D.frameRate.fps,ke.profile=D.profile,ke.level=D.level,ke.refFrames=be.ref_frames,ke.chromaFormat=be.chroma_format_string,ke.sarNum=D.sarRatio.width,ke.sarDen=D.sarRatio.height,ke.videoCodec=be.codec_mimetype,ke.hasAudio?ke.audioCodec!=null&&(ke.mimeType='video/x-flv; codecs="'+ke.videoCodec+","+ke.audioCodec+'"'):ke.mimeType='video/x-flv; codecs="'+ke.videoCodec+'"',ke.isComplete()&&((w=this._onMediaInfo)===null||w===void 0||w.call(this,ke)),oe+=Le}else oe+=2+Le;else oe+=2+Le}}D.hvcc=new Uint8Array(r),D.hvcc.set(new Uint8Array(A,o,r),0),n.A.v(this.TAG,"Parsed HEVCDecoderConfigurationRecord"),this._isInitialMetadataDispatched()?this._dispatch&&(!((_=this._audioTrack)===null||_===void 0)&&_.length||!((I=this._videoTrack)===null||I===void 0)&&I.length)&&((k=this._onDataAvailable)===null||k===void 0||k.call(this,this._audioTrack,this._videoTrack)):this._videoInitialMetadataDispatched=!0,this._dispatch=!1,($=this._onTrackMetadata)===null||$===void 0||$.call(this,"video",D)}else(C=this._onError)===null||C===void 0||C.call(this,G.A.FORMAT_ERROR,"Flv: Strange NaluLengthSizeMinusOne: ".concat(this._naluLengthSize-1));else(y=this._onError)===null||y===void 0||y.call(this,G.A.FORMAT_ERROR,"Flv: Invalid HEVCDecoderConfigurationRecord")}},c.prototype._parseAV1CodecConfigurationRecord=function(A,o,r){var y,C,w,_,I,k,$,D,N,z,q;if(r<4)n.A.w(this.TAG,"Flv: Invalid AV1CodecConfigurationRecord, lack of data!");else{var R=this._videoMetadata,Y=this._videoTrack,se=(this._littleEndian,new DataView(A,o,r));R?R.av1c!==void 0&&n.A.w(this.TAG,"Found another AV1CodecConfigurationRecord!"):(this._hasVideo!==!1||this._hasVideoFlagOverrided||(this._hasVideo=!0,this._mediaInfo&&(this._mediaInfo.hasVideo=!0)),(R=this._videoMetadata={}).type="video",R.id=Y==null?void 0:Y.id,R.timescale=this._timescale,R.duration=this._duration);var re=127&se.getUint8(0);if(se.getUint8(1),se.getUint8(1),se.getUint8(2),re===1){var de=m.parseOBUs(new Uint8Array(A,o+4,r-4));if(de!=null){R.codecWidth=(w=de==null?void 0:de.codec_size)===null||w===void 0?void 0:w.width,R.codecHeight=(_=de==null?void 0:de.codec_size)===null||_===void 0?void 0:_.height,R.presentWidth=(I=de==null?void 0:de.present_size)===null||I===void 0?void 0:I.width,R.presentHeight=(k=de==null?void 0:de.present_size)===null||k===void 0?void 0:k.height,R.profile=de.profile_string,R.level=de.level_string,R.bitDepth=de.bit_depth,R.chromaFormat=de.chroma_format,R.sarRatio=de.sar_ratio,R.frameRate=de.frame_rate,de.frame_rate.fixed&&de.frame_rate.fps_num!==0&&de.frame_rate.fps_den!==0||(R.frameRate=this._referenceFrameRate);var oe=R.frameRate.fps_den,_e=R.frameRate.fps_num;R.refSampleDuration=R.timescale*(oe/_e),R.codec=de.codec_mimetype;var ve=this._mediaInfo;ve.width=R.codecWidth,ve.height=R.codecHeight,ve.fps=R.frameRate.fps,ve.profile=R.profile,ve.level=R.level,ve.refFrames=de.ref_frames,ve.chromaFormat=de.chroma_format_string,ve.sarNum=R.sarRatio.width,ve.sarDen=R.sarRatio.height,ve.videoCodec=de.codec_mimetype,ve.hasAudio?ve.audioCodec!=null&&(ve.mimeType='video/x-flv; codecs="'+ve.videoCodec+","+ve.audioCodec+'"'):ve.mimeType='video/x-flv; codecs="'+ve.videoCodec+'"',ve.isComplete()&&(($=this._onMediaInfo)===null||$===void 0||$.call(this,ve)),R.av1c=new Uint8Array(r),R.av1c.set(new Uint8Array(A,o,r),0),n.A.v(this.TAG,"Parsed AV1CodecConfigurationRecord"),this._isInitialMetadataDispatched()?this._dispatch&&(!((D=this._audioTrack)===null||D===void 0)&&D.length||!((N=this._videoTrack)===null||N===void 0)&&N.length)&&((z=this._onDataAvailable)===null||z===void 0||z.call(this,this._audioTrack,this._videoTrack)):this._videoInitialMetadataDispatched=!0,this._dispatch=!1,(q=this._onTrackMetadata)===null||q===void 0||q.call(this,"video",R)}else(C=this._onError)===null||C===void 0||C.call(this,G.A.FORMAT_ERROR,"Flv: Invalid AV1CodecConfigurationRecord")}else(y=this._onError)===null||y===void 0||y.call(this,G.A.FORMAT_ERROR,"Flv: Invalid AV1CodecConfigurationRecord")}},c.prototype._parseAVCVideoData=function(A,o,r,y,C,w,_){for(var I=this._littleEndian,k=new DataView(A,o,r),$=[],D=0,N=0,z=this._naluLengthSize,q=this._timestampBase+y,R=w===1;N<r;){if(N+4>=r){n.A.w(this.TAG,"Malformed Nalu near timestamp ".concat(q,", offset = ").concat(N,", dataSize = ").concat(r));break}var Y=k.getUint32(N,!I);if(z===3&&(Y>>>=8),Y>r-z)return void n.A.w(this.TAG,"Malformed Nalus near timestamp ".concat(q,", NaluSize > DataSize!"));var se=31&k.getUint8(N+z);se===5&&(R=!0);var re=new Uint8Array(A,o+N,z+Y),de={type:se,data:re};$.push(de),D+=re.byteLength,N+=z+Y}if($.length){var oe=this._videoTrack,_e={units:$,length:D,isKeyframe:R,dts:q,cts:_,pts:q+_};R&&(_e.fileposition=C),oe&&(oe.samples.push(_e),oe.length+=D)}},c.prototype._parseHEVCVideoData=function(A,o,r,y,C,w,_){for(var I=this._littleEndian,k=new DataView(A,o,r),$=[],D=0,N=0,z=this._naluLengthSize,q=this._timestampBase+y,R=w===1;N<r;){if(N+4>=r){n.A.w(this.TAG,"Malformed Nalu near timestamp ".concat(q,", offset = ").concat(N,", dataSize = ").concat(r));break}var Y=k.getUint32(N,!I);if(z===3&&(Y>>>=8),Y>r-z)return void n.A.w(this.TAG,"Malformed Nalus near timestamp ".concat(q,", NaluSize > DataSize!"));var se=31&k.getUint8(N+z);se!==19&&se!==20||(R=!0);var re=new Uint8Array(A,o+N,z+Y),de={type:se,data:re};$.push(de),D+=re.byteLength,N+=z+Y}if($.length){var oe=this._videoTrack,_e={units:$,length:D,isKeyframe:R,dts:q,cts:_,pts:q+_};R&&(_e.fileposition=C),oe&&(oe==null||oe.samples.push(_e),oe.length+=D)}},c.prototype._parseAV1VideoData=function(A,o,r,y,C,w,_){this._littleEndian;var I,k=[],$=this._timestampBase+y,D=w===1;if(I=r,k.push({unitType:0,data:new Uint8Array(A,o+0,r)}),k.length){var N=this._videoTrack,z={units:k,length:I,isKeyframe:D,dts:$,cts:_,pts:$+_};D&&(z.fileposition=C),N&&(N==null||N.samples.push(z),N.length+=I)}},c}();const f=g,O=function(){function c(){}return c.prototype.destroy=function(){this.onError=null,this.onMediaInfo=null,this.onMetaDataArrived=null,this.onTrackMetadata=null,this.onDataAvailable=null,this.onTimedID3Metadata=null,this.onSMPTE2038Metadata=null,this.onSCTE35Metadata=null,this.onPESPrivateData=null,this.onPESPrivateDataDescriptor=null},c}();var j,Q=function(){this.program_pmt_pid={}};(function(c){c[c.kMPEG1Audio=3]="kMPEG1Audio",c[c.kMPEG2Audio=4]="kMPEG2Audio",c[c.kPESPrivateData=6]="kPESPrivateData",c[c.kADTSAAC=15]="kADTSAAC",c[c.kLOASAAC=17]="kLOASAAC",c[c.kAC3=129]="kAC3",c[c.kEAC3=135]="kEAC3",c[c.kID3=21]="kID3",c[c.kSCTE35=134]="kSCTE35",c[c.kH264=27]="kH264",c[c.kH265=36]="kH265"})(j||(j={}));var ee,ue=function(){this.pid_stream_type={},this.common_pids={h264:void 0,h265:void 0,adts_aac:void 0,loas_aac:void 0,opus:void 0,ac3:void 0,eac3:void 0,mp3:void 0},this.pes_private_data_pids={},this.timed_id3_pids={},this.scte_35_pids={},this.smpte2038_pids={}},fe=function(){},me=function(){},ge=function(){this.slices=[],this.total_length=0,this.expected_length=0,this.file_position=0,this.random_access_indicator=0};(function(c){c[c.kUnspecified=0]="kUnspecified",c[c.kSliceNonIDR=1]="kSliceNonIDR",c[c.kSliceDPA=2]="kSliceDPA",c[c.kSliceDPB=3]="kSliceDPB",c[c.kSliceDPC=4]="kSliceDPC",c[c.kSliceIDR=5]="kSliceIDR",c[c.kSliceSEI=6]="kSliceSEI",c[c.kSliceSPS=7]="kSliceSPS",c[c.kSlicePPS=8]="kSlicePPS",c[c.kSliceAUD=9]="kSliceAUD",c[c.kEndOfSequence=10]="kEndOfSequence",c[c.kEndOfStream=11]="kEndOfStream",c[c.kFiller=12]="kFiller",c[c.kSPSExt=13]="kSPSExt",c[c.kReserved0=14]="kReserved0"})(ee||(ee={}));var Oe,Ee,Be=function(){},De=function(c){var A=c.data.byteLength;this.type=c.type,this.data=new Uint8Array(4+A),new DataView(this.data.buffer).setUint32(0,A),this.data.set(c.data,4)},nt=function(){function c(A){this.TAG="H264AnnexBParser",this.current_startcode_offset_=0,this.eof_flag_=!1,this.data_=A,this.current_startcode_offset_=this.findNextStartCodeOffset(0),this.eof_flag_&&n.A.e(this.TAG,"Could not find H264 startcode until payload end!")}return c.prototype.findNextStartCodeOffset=function(A){for(var o=A,r=this.data_;;){if(o+3>=r.byteLength)return this.eof_flag_=!0,r.byteLength;var y=r[o+0]<<24|r[o+1]<<16|r[o+2]<<8|r[o+3],C=r[o+0]<<16|r[o+1]<<8|r[o+2];if(y===1||C===1)return o;o++}},c.prototype.readNextNaluPayload=function(){for(var A=this.data_,o=null;o==null&&!this.eof_flag_;){var r=this.current_startcode_offset_,y=31&A[r+=(A[r]<<24|A[r+1]<<16|A[r+2]<<8|A[r+3])==1?4:3],C=(128&A[r])>>>7,w=this.findNextStartCodeOffset(r);if(this.current_startcode_offset_=w,!(y>=ee.kReserved0)&&C===0){var _=A.subarray(r,w);(o=new Be).type=y,o.data=_}}return o},c}(),Ke=function(){function c(A,o,r){var y=8+A.byteLength+1+2+o.byteLength,C=!1;A[3]!==66&&A[3]!==77&&A[3]!==88&&(C=!0,y+=4);var w=this.data=new Uint8Array(y);w[0]=1,w[1]=A[1],w[2]=A[2],w[3]=A[3],w[4]=255,w[5]=225;var _=A.byteLength;w[6]=_>>>8,w[7]=255&_;var I=8;w.set(A,8),w[I+=_]=1;var k=o.byteLength;w[I+1]=k>>>8,w[I+2]=255&k,w.set(o,I+3),I+=3+k,C&&(w[I]=252|r.chroma_format_idc,w[I+1]=248|r.bit_depth_luma-8,w[I+2]=248|r.bit_depth_chroma-8,w[I+3]=0,I+=4)}return c.prototype.getData=function(){return this.data},c}();(function(c){c[c.kNull=0]="kNull",c[c.kAACMain=1]="kAACMain",c[c.kAAC_LC=2]="kAAC_LC",c[c.kAAC_SSR=3]="kAAC_SSR",c[c.kAAC_LTP=4]="kAAC_LTP",c[c.kAAC_SBR=5]="kAAC_SBR",c[c.kAAC_Scalable=6]="kAAC_Scalable",c[c.kLayer1=32]="kLayer1",c[c.kLayer2=33]="kLayer2",c[c.kLayer3=34]="kLayer3"})(Oe||(Oe={})),function(c){c[c.k96000Hz=0]="k96000Hz",c[c.k88200Hz=1]="k88200Hz",c[c.k64000Hz=2]="k64000Hz",c[c.k48000Hz=3]="k48000Hz",c[c.k44100Hz=4]="k44100Hz",c[c.k32000Hz=5]="k32000Hz",c[c.k24000Hz=6]="k24000Hz",c[c.k22050Hz=7]="k22050Hz",c[c.k16000Hz=8]="k16000Hz",c[c.k12000Hz=9]="k12000Hz",c[c.k11025Hz=10]="k11025Hz",c[c.k8000Hz=11]="k8000Hz",c[c.k7350Hz=12]="k7350Hz"}(Ee||(Ee={}));var We,Me,W=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],L=(We=function(c,A){return We=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,r){o.__proto__=r}||function(o,r){for(var y in r)Object.prototype.hasOwnProperty.call(r,y)&&(o[y]=r[y])},We(c,A)},function(c,A){if(typeof A!="function"&&A!==null)throw new TypeError("Class extends value "+String(A)+" is not a constructor or null");function o(){this.constructor=c}We(c,A),c.prototype=A===null?Object.create(A):(o.prototype=A.prototype,new o)}),U=function(){},V=function(c){function A(){return c!==null&&c.apply(this,arguments)||this}return L(A,c),A}(U),X=function(){function c(A){this.TAG="AACADTSParser",this.data_=A,this.current_syncword_offset_=this.findNextSyncwordOffset(0),this.eof_flag_&&n.A.e(this.TAG,"Could not found ADTS syncword until payload end")}return c.prototype.findNextSyncwordOffset=function(A){for(var o=A,r=this.data_;;){if(o+7>=r.byteLength)return this.eof_flag_=!0,r.byteLength;if((r[o+0]<<8|r[o+1])>>>4==4095)return o;o++}},c.prototype.readNextAACFrame=function(){for(var A=this.data_,o=null;o==null&&!this.eof_flag_;){var r=this.current_syncword_offset_,y=(8&A[r+1])>>>3,C=(6&A[r+1])>>>1,w=1&A[r+1],_=(192&A[r+2])>>>6,I=(60&A[r+2])>>>2,k=(1&A[r+2])<<2|(192&A[r+3])>>>6,$=(3&A[r+3])<<11|A[r+4]<<3|(224&A[r+5])>>>5;if(A[r+6],r+$>this.data_.byteLength){this.eof_flag_=!0,this.has_last_incomplete_data=!0;break}var D=w===1?7:9,N=$-D;r+=D;var z=this.findNextSyncwordOffset(r+N);if(this.current_syncword_offset_=z,(y===0||y===1)&&C===0){var q=A.subarray(r,r+N);(o=new U).audio_object_type=_+1,o.sampling_freq_index=I,o.sampling_frequency=W[I],o.channel_config=k,o.data=q}}return o},c.prototype.hasIncompleteData=function(){return this.has_last_incomplete_data},c.prototype.getIncompleteData=function(){return this.has_last_incomplete_data?this.data_.subarray(this.current_syncword_offset_):null},c}(),J=function(){function c(A){this.TAG="AACLOASParser",this.data_=A,this.current_syncword_offset_=this.findNextSyncwordOffset(0),this.eof_flag_&&n.A.e(this.TAG,"Could not found LOAS syncword until payload end")}return c.prototype.findNextSyncwordOffset=function(A){for(var o=A,r=this.data_;;){if(o+1>=r.byteLength)return this.eof_flag_=!0,r.byteLength;if((r[o+0]<<3|r[o+1]>>>5)==695)return o;o++}},c.prototype.getLATMValue=function(A){for(var o=A.readBits(2),r=0,y=0;y<=o;y++)r<<=8,r|=A.readByte();return r},c.prototype.readNextAACFrame=function(A){for(var o=this.data_,r=null;r==null&&!this.eof_flag_;){var y=this.current_syncword_offset_,C=(31&o[y+1])<<8|o[y+2];if(y+3+C>=this.data_.byteLength){this.eof_flag_=!0,this.has_last_incomplete_data=!0;break}var w=new M(o.subarray(y+3,y+3+C)),_=null;if(w.readBool()){if(A==null){n.A.w(this.TAG,"StreamMuxConfig Missing"),this.current_syncword_offset_=this.findNextSyncwordOffset(y+3+C),w.destroy();continue}_=A}else{var I=w.readBool();if(I&&w.readBool()){n.A.e(this.TAG,"audioMuxVersionA is Not Supported"),w.destroy();break}if(I&&this.getLATMValue(w),!w.readBool()){n.A.e(this.TAG,"allStreamsSameTimeFraming zero is Not Supported"),w.destroy();break}if(w.readBits(6)!==0){n.A.e(this.TAG,"more than 2 numSubFrames Not Supported"),w.destroy();break}if(w.readBits(4)!==0){n.A.e(this.TAG,"more than 2 numProgram Not Supported"),w.destroy();break}if(w.readBits(3)!==0){n.A.e(this.TAG,"more than 2 numLayer Not Supported"),w.destroy();break}var k=I?this.getLATMValue(w):0,$=w.readBits(5);k-=5;var D=w.readBits(4);k-=4;var N=w.readBits(4);k-=4,w.readBits(3),(k-=3)>0&&w.readBits(k);var z=w.readBits(3);if(z!==0){n.A.e(this.TAG,"frameLengthType = ".concat(z,". Only frameLengthType = 0 Supported")),w.destroy();break}w.readByte();var q=w.readBool();if(q)if(I)this.getLATMValue(w);else{for(var R=0;;){R<<=8;var Y=w.readBool();if(R+=w.readByte(),!Y)break}console.log(R)}w.readBool()&&w.readByte(),(_=new V).audio_object_type=$,_.sampling_freq_index=D,_.sampling_frequency=W[_.sampling_freq_index],_.channel_config=N,_.other_data_present=q}for(var se=0;;){var re=w.readByte();if(se+=re,re!==255)break}for(var de=new Uint8Array(se),oe=0;oe<se;oe++)de[oe]=w.readByte();(r=new V).audio_object_type=_.audio_object_type,r.sampling_freq_index=_.sampling_freq_index,r.sampling_frequency=W[_.sampling_freq_index],r.channel_config=_.channel_config,r.other_data_present=_.other_data_present,r.data=de,this.current_syncword_offset_=this.findNextSyncwordOffset(y+3+C)}return r},c.prototype.hasIncompleteData=function(){return this.has_last_incomplete_data},c.prototype.getIncompleteData=function(){return this.has_last_incomplete_data?this.data_.subarray(this.current_syncword_offset_):null},c}(),le=function(c){var A=[],o=c.audio_object_type,r=c.audio_object_type,y=c.sampling_freq_index,C=c.channel_config,w=0,_=navigator.userAgent.toLowerCase();_.includes("firefox")?y>=6?(r=5,A=new Array(4),w=y-3):(r=2,A=new Array(2),w=y):_.includes("android")?(r=2,A=new Array(2),w=y):(r=5,w=y,A=new Array(4),y>=6?w=y-3:C===1&&(r=2,A=new Array(2),w=y)),A[0]=r<<3,A[0]|=(15&y)>>>1,A[1]=(15&y)<<7,A[1]|=(15&C)<<3,r===5&&(A[1]|=(15&w)>>>1,A[2]=(1&w)<<7,A[2]|=8,A[3]=0),this.config=A,this.sampling_rate=W[y],this.channel_count=C,this.codec_mimetype="mp4a.40."+r.toString(),this.original_codec_mimetype="mp4a.40."+o.toString()},ce=function(){},ye=function(){};(function(c){c[c.kSpliceNull=0]="kSpliceNull",c[c.kSpliceSchedule=4]="kSpliceSchedule",c[c.kSpliceInsert=5]="kSpliceInsert",c[c.kTimeSignal=6]="kTimeSignal",c[c.kBandwidthReservation=7]="kBandwidthReservation",c[c.kPrivateCommand=255]="kPrivateCommand"})(Me||(Me={}));var ae,Ce=function(c){var A=c.readBool();return A?(c.readBits(6),{time_specified_flag:A,pts_time:4*c.readBits(31)+c.readBits(2)}):(c.readBits(7),{time_specified_flag:A})},pe=function(c){var A=c.readBool();return c.readBits(6),{auto_return:A,duration:4*c.readBits(31)+c.readBits(2)}},Re=function(c,A){var o=A.readBits(8);return c?{component_tag:o}:{component_tag:o,splice_time:Ce(A)}},Et=function(c){return{component_tag:c.readBits(8),utc_splice_time:c.readBits(32)}},ct=function(c){var A=c.readBits(32),o=c.readBool();c.readBits(7);var r={splice_event_id:A,splice_event_cancel_indicator:o};if(o)return r;if(r.out_of_network_indicator=c.readBool(),r.program_splice_flag=c.readBool(),r.duration_flag=c.readBool(),c.readBits(5),r.program_splice_flag)r.utc_splice_time=c.readBits(32);else{r.component_count=c.readBits(8),r.components=[];for(var y=0;y<r.component_count;y++)r.components.push(Et(c))}return r.duration_flag&&(r.break_duration=pe(c)),r.unique_program_id=c.readBits(16),r.avail_num=c.readBits(8),r.avails_expected=c.readBits(8),r},Se=function(c,A,o,r){return{descriptor_tag:c,descriptor_length:A,identifier:o,provider_avail_id:r.readBits(32)}},Ye=function(c,A,o,r){var y=r.readBits(8),C=r.readBits(3);r.readBits(5);for(var w="",_=0;_<C;_++)w+=String.fromCharCode(r.readBits(8));return{descriptor_tag:c,descriptor_length:A,identifier:o,preroll:y,dtmf_count:C,DTMF_char:w}},rt=function(c){var A=c.readBits(8);return c.readBits(7),{component_tag:A,pts_offset:4*c.readBits(31)+c.readBits(2)}},zt=function(c,A,o,r){var y=r.readBits(32),C=r.readBool();r.readBits(7);var w={descriptor_tag:c,descriptor_length:A,identifier:o,segmentation_event_id:y,segmentation_event_cancel_indicator:C};if(C)return w;if(w.program_segmentation_flag=r.readBool(),w.segmentation_duration_flag=r.readBool(),w.delivery_not_restricted_flag=r.readBool(),w.delivery_not_restricted_flag?r.readBits(5):(w.web_delivery_allowed_flag=r.readBool(),w.no_regional_blackout_flag=r.readBool(),w.archive_allowed_flag=r.readBool(),w.device_restrictions=r.readBits(2)),!w.program_segmentation_flag){w.component_count=r.readBits(8),w.components=[];for(var _=0;_<w.component_count;_++)w.components.push(rt(r))}w.segmentation_duration_flag&&(w.segmentation_duration=r.readBits(40)),w.segmentation_upid_type=r.readBits(8),w.segmentation_upid_length=r.readBits(8);var I=new Uint8Array(w.segmentation_upid_length);for(_=0;_<w.segmentation_upid_length;_++)I[_]=r.readBits(8);return w.segmentation_upid=I.buffer,w.segmentation_type_id=r.readBits(8),w.segment_num=r.readBits(8),w.segments_expected=r.readBits(8),w.segmentation_type_id!==52&&w.segmentation_type_id!==54&&w.segmentation_type_id!==56&&w.segmentation_type_id!==58||(w.sub_segment_num=r.readBits(8),w.sub_segments_expected=r.readBits(8)),w},Je=function(c,A,o,r){return{descriptor_tag:c,descriptor_length:A,identifier:o,TAI_seconds:r.readBits(48),TAI_ns:r.readBits(32),UTC_offset:r.readBits(16)}},st=function(c){return{component_tag:c.readBits(8),ISO_code:String.fromCharCode(c.readBits(8),c.readBits(8),c.readBits(8)),Bit_Stream_Mode:c.readBits(3),Num_Channels:c.readBits(4),Full_Srvc_Audio:c.readBool()}},bt=function(c,A,o,r){for(var y=r.readBits(4),C=[],w=0;w<y;w++)C.push(st(r));return{descriptor_tag:c,descriptor_length:A,identifier:o,audio_count:y,components:C}};(function(c){c[c.kSliceIDR_W_RADL=19]="kSliceIDR_W_RADL",c[c.kSliceIDR_N_LP=20]="kSliceIDR_N_LP",c[c.kSliceCRA_NUT=21]="kSliceCRA_NUT",c[c.kSliceVPS=32]="kSliceVPS",c[c.kSliceSPS=33]="kSliceSPS",c[c.kSlicePPS=34]="kSlicePPS",c[c.kSliceAUD=35]="kSliceAUD"})(ae||(ae={}));var Tt=function(){},gt=function(c){var A=c.data.byteLength;this.type=c.type,this.data=new Uint8Array(4+A),new DataView(this.data.buffer).setUint32(0,A),this.data.set(c.data,4)},Vt=function(){function c(A){this.TAG="H265AnnexBParser",this.current_startcode_offset_=0,this.eof_flag_=!1,this.data_=A,this.current_startcode_offset_=this.findNextStartCodeOffset(0),this.eof_flag_&&n.A.e(this.TAG,"Could not find H265 startcode until payload end!")}return c.prototype.findNextStartCodeOffset=function(A){for(var o=A,r=this.data_;;){if(o+3>=r.byteLength)return this.eof_flag_=!0,r.byteLength;var y=r[o+0]<<24|r[o+1]<<16|r[o+2]<<8|r[o+3],C=r[o+0]<<16|r[o+1]<<8|r[o+2];if(y===1||C===1)return o;o++}},c.prototype.readNextNaluPayload=function(){for(var A=this.data_,o=null;o==null&&!this.eof_flag_;){var r=this.current_startcode_offset_,y=A[r+=(A[r]<<24|A[r+1]<<16|A[r+2]<<8|A[r+3])==1?4:3]>>1&63,C=(128&A[r])>>>7,w=this.findNextStartCodeOffset(r);if(this.current_startcode_offset_=w,C===0){var _=A.subarray(r,w);(o=new Tt).type=y,o.data=_}}return o},c}(),xt=function(){function c(A,o,r,y){var C=23+(5+A.byteLength)+(5+o.byteLength)+(5+r.byteLength),w=this.data=new Uint8Array(C);w[0]=1,w[1]=(3&y.general_profile_space)<<6|(y.general_tier_flag?1:0)<<5|31&y.general_profile_idc,w[2]=y.general_profile_compatibility_flags_1,w[3]=y.general_profile_compatibility_flags_2,w[4]=y.general_profile_compatibility_flags_3,w[5]=y.general_profile_compatibility_flags_4,w[6]=y.general_constraint_indicator_flags_1,w[7]=y.general_constraint_indicator_flags_2,w[8]=y.general_constraint_indicator_flags_3,w[9]=y.general_constraint_indicator_flags_4,w[10]=y.general_constraint_indicator_flags_5,w[11]=y.general_constraint_indicator_flags_6,w[12]=y.general_level_idc,w[13]=240|(3840&y.min_spatial_segmentation_idc)>>8,w[14]=255&y.min_spatial_segmentation_idc,w[15]=252|3&y.parallelismType,w[16]=252|3&y.chroma_format_idc,w[17]=248|7&y.bit_depth_luma_minus8,w[18]=248|7&y.bit_depth_chroma_minus8,w[19]=0,w[20]=0,w[21]=(3&y.constant_frame_rate)<<6|(7&y.num_temporal_layers)<<3|(y.temporal_id_nested?1:0)<<2|3,w[22]=3,w[23]=128|ae.kSliceVPS,w[24]=0,w[25]=1,w[26]=(65280&A.byteLength)>>8,w[27]=255&A.byteLength,w.set(A,28),w[23+(5+A.byteLength)+0]=128|ae.kSliceSPS,w[23+(5+A.byteLength)+1]=0,w[23+(5+A.byteLength)+2]=1,w[23+(5+A.byteLength)+3]=(65280&o.byteLength)>>8,w[23+(5+A.byteLength)+4]=255&o.byteLength,w.set(o,23+(5+A.byteLength)+5),w[23+(5+A.byteLength+5+o.byteLength)+0]=128|ae.kSlicePPS,w[23+(5+A.byteLength+5+o.byteLength)+1]=0,w[23+(5+A.byteLength+5+o.byteLength)+2]=1,w[23+(5+A.byteLength+5+o.byteLength)+3]=(65280&r.byteLength)>>8,w[23+(5+A.byteLength+5+o.byteLength)+4]=255&r.byteLength,w.set(r,23+(5+A.byteLength+5+o.byteLength)+5)}return c.prototype.getData=function(){return this.data},c}(),Pt=function(){},Kt=function(){},ti=function(){},$e=[[64,64,80,80,96,96,112,112,128,128,160,160,192,192,224,224,256,256,320,320,384,384,448,448,512,512,640,640,768,768,896,896,1024,1024,1152,1152,1280,1280],[69,70,87,88,104,105,121,122,139,140,174,175,208,209,243,244,278,279,348,349,417,418,487,488,557,558,696,697,835,836,975,976,1114,1115,1253,1254,1393,1394],[96,96,120,120,144,144,168,168,192,192,240,240,288,288,336,336,384,384,480,480,576,576,672,672,768,768,960,960,1152,1152,1344,1344,1536,1536,1728,1728,1920,1920]],Ue=function(){function c(A){this.TAG="AC3Parser",this.data_=A,this.current_syncword_offset_=this.findNextSyncwordOffset(0),this.eof_flag_&&n.A.e(this.TAG,"Could not found AC3 syncword until payload end")}return c.prototype.findNextSyncwordOffset=function(A){for(var o=A,r=this.data_;;){if(o+7>=r.byteLength)return this.eof_flag_=!0,r.byteLength;if((r[o+0]<<8|r[o+1])==2935)return o;o++}},c.prototype.readNextAC3Frame=function(){for(var A=this.data_,o=null;o==null&&!this.eof_flag_;){var r=this.current_syncword_offset_,y=A[r+4]>>6,C=[48e3,44200,33e3][y],w=63&A[r+4],_=2*$e[y][w];if(r+_>this.data_.byteLength){this.eof_flag_=!0,this.has_last_incomplete_data=!0;break}var I=this.findNextSyncwordOffset(r+_);this.current_syncword_offset_=I;var k=A[r+5]>>3,$=7&A[r+5],D=A[r+6]>>5,N=0;1&D&&D!==1&&(N+=2),4&D&&(N+=2),D===2&&(N+=2);var z=(A[r+6]<<8|A[r+7])>>12-N&1,q=[2,1,2,3,3,4,4,5][D]+z;(o=new ti).sampling_frequency=C,o.channel_count=q,o.channel_mode=D,o.bit_stream_identification=k,o.low_frequency_effects_channel_on=z,o.bit_stream_mode=$,o.frame_size_code=w,o.data=A.subarray(r,r+_)}return o},c.prototype.hasIncompleteData=function(){return this.has_last_incomplete_data},c.prototype.getIncompleteData=function(){return this.has_last_incomplete_data?this.data_.subarray(this.current_syncword_offset_):null},c}(),Fe=function(c){var A;A=[c.sampling_rate_code<<6|c.bit_stream_identification<<1|c.bit_stream_mode>>2,(3&c.bit_stream_mode)<<6|c.channel_mode<<3|c.low_frequency_effects_channel_on<<2|c.frame_size_code>>4,c.frame_size_code<<4&224],this.config=A,this.sampling_rate=c.sampling_frequency,this.bit_stream_identification=c.bit_stream_identification,this.bit_stream_mode=c.bit_stream_mode,this.low_frequency_effects_channel_on=c.low_frequency_effects_channel_on,this.channel_count=c.channel_count,this.channel_mode=c.channel_mode,this.codec_mimetype="ac-3",this.original_codec_mimetype="ac-3"},Xe=function(){},ut=function(){function c(A){this.TAG="EAC3Parser",this.data_=A,this.current_syncword_offset_=this.findNextSyncwordOffset(0),this.eof_flag_&&n.A.e(this.TAG,"Could not found AC3 syncword until payload end")}return c.prototype.findNextSyncwordOffset=function(A){for(var o=A,r=this.data_;;){if(o+7>=r.byteLength)return this.eof_flag_=!0,r.byteLength;if((r[o+0]<<8|r[o+1])==2935)return o;o++}},c.prototype.readNextEAC3Frame=function(){for(var A=this.data_,o=null;o==null&&!this.eof_flag_;){var r=this.current_syncword_offset_,y=new M(A.subarray(r+2)),C=(y.readBits(2),y.readBits(3),y.readBits(11)+1<<1),w=y.readBits(2),_=null,I=null;w===3?(_=[24e3,22060,16e3][w=y.readBits(2)],I=3):(_=[48e3,44100,32e3][w],I=y.readBits(2));var k=y.readBits(3),$=y.readBits(1),D=y.readBits(5);if(r+C>this.data_.byteLength){this.eof_flag_=!0,this.has_last_incomplete_data=!0;break}var N=this.findNextSyncwordOffset(r+C);this.current_syncword_offset_=N;var z=[2,1,2,3,3,4,4,5][k]+$;y.destroy(),(o=new Xe).sampling_frequency=_,o.channel_count=z,o.channel_mode=k,o.bit_stream_identification=D,o.low_frequency_effects_channel_on=$,o.frame_size=C,o.num_blks=[1,2,3,6][I],o.data=A.subarray(r,r+C)}return o},c.prototype.hasIncompleteData=function(){return this.has_last_incomplete_data},c.prototype.getIncompleteData=function(){return this.has_last_incomplete_data?this.data_.subarray(this.current_syncword_offset_):null},c}(),si=function(c){var A,o=Math.floor(c.frame_size*c.sampling_frequency/(16*c.num_blks));A=[255&o,248&o,c.sampling_rate_code<<6|c.bit_stream_identification<<1,c.channel_mode<<1|c.low_frequency_effects_channel_on,0],this.config=A,this.sampling_rate=c.sampling_frequency,this.bit_stream_identification=c.bit_stream_identification,this.num_blks=c.num_blks,this.low_frequency_effects_channel_on=c.low_frequency_effects_channel_on,this.channel_count=c.channel_count,this.channel_mode=c.channel_mode,this.codec_mimetype="ec-3",this.original_codec_mimetype="ec-3"},Xt=function(){var c=function(A,o){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,y){r.__proto__=y}||function(r,y){for(var C in y)Object.prototype.hasOwnProperty.call(y,C)&&(r[C]=y[C])},c(A,o)};return function(A,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function r(){this.constructor=A}c(A,o),A.prototype=o===null?Object.create(o):(r.prototype=o.prototype,new r)}}(),he=function(){return he=Object.assign||function(c){for(var A,o=1,r=arguments.length;o<r;o++)for(var y in A=arguments[o])Object.prototype.hasOwnProperty.call(A,y)&&(c[y]=A[y]);return c},he.apply(this,arguments)},Te=function(c,A){var o=typeof Symbol=="function"&&c[Symbol.iterator];if(!o)return c;var r,y,C=o.call(c),w=[];try{for(;(A===void 0||A-- >0)&&!(r=C.next()).done;)w.push(r.value)}catch(_){y={error:_}}finally{try{r&&!r.done&&(o=C.return)&&o.call(C)}finally{if(y)throw y.error}}return w},Ie=function(c,A,o){if(arguments.length===2)for(var r,y=0,C=A.length;y<C;y++)!r&&y in A||(r||(r=Array.prototype.slice.call(A,0,y)),r[y]=A[y]);return c.concat(r||Array.prototype.slice.call(A))},xe=function(c){function A(o,r){var y=c.call(this)||this;return y.TAG="TSDemuxer",y.first_parse_=!0,y.media_info_=new h.A,y.timescale_=90,y.duration_=0,y.current_pmt_pid_=-1,y.program_pmt_map_={},y.pes_slice_queues_={},y.section_slice_queues_={},y.video_metadata_={vps:void 0,sps:void 0,pps:void 0,details:void 0},y.audio_metadata_={codec:void 0,audio_object_type:void 0,sampling_freq_index:void 0,sampling_frequency:void 0,channel_config:void 0},y.aac_last_sample_pts_=void 0,y.aac_last_incomplete_data_=null,y.has_video_=!1,y.has_audio_=!1,y.video_init_segment_dispatched_=!1,y.audio_init_segment_dispatched_=!1,y.video_metadata_changed_=!1,y.audio_metadata_changed_=!1,y.loas_previous_frame=null,y.video_track_={type:"video",id:1,sequenceNumber:0,samples:[],length:0},y.audio_track_={type:"audio",id:2,sequenceNumber:0,samples:[],length:0},y.ts_packet_size_=o.ts_packet_size,y.sync_offset_=o.sync_offset,y.config_=r,y}return Xt(A,c),A.prototype.destroy=function(){this.media_info_=null,this.pes_slice_queues_=null,this.section_slice_queues_=null,this.video_metadata_=null,this.audio_metadata_=null,this.aac_last_incomplete_data_=null,this.video_track_=null,this.audio_track_=null,c.prototype.destroy.call(this)},A.probe=function(o){var r=new Uint8Array(o),y=-1,C=188;if(r.byteLength<=3*C)return{needMoreData:!0};for(;y===-1;){for(var w=Math.min(1e3,r.byteLength-3*C),_=0;_<w;){if(r[_]===71&&r[_+C]===71&&r[_+2*C]===71){y=_;break}_++}if(y===-1)if(C===188)C=192;else{if(C!==192)break;C=204}}return y===-1?{match:!1}:(C===192&&y>=4?(n.A.v("TSDemuxer","ts_packet_size = 192, m2ts mode"),y-=4):C===204&&n.A.v("TSDemuxer","ts_packet_size = 204, RS encoded MPEG2-TS stream"),{match:!0,consumed:0,ts_packet_size:C,sync_offset:y})},A.prototype.bindDataSource=function(o){return o.onDataArrival=this.parseChunks.bind(this),this},A.prototype.resetMediaInfo=function(){this.media_info_=new h.A},A.prototype.parseChunks=function(o,r){var y;if(!(this.onError&&this.onMediaInfo&&this.onTrackMetadata&&this.onDataAvailable))throw new B.j4("onError & onMediaInfo & onTrackMetadata & onDataAvailable callback must be specified");var C=0;for(this.first_parse_&&(this.first_parse_=!1,C=this.sync_offset_);C+this.ts_packet_size_<=o.byteLength;){var w=r+C;this.ts_packet_size_===192&&(C+=4);var _=new Uint8Array(o,C,188),I=_[0];if(I!==71){n.A.e(this.TAG,"sync_byte = ".concat(I,", not 0x47"));break}var k=(64&_[1])>>>6,$=(_[1],(31&_[1])<<8|_[2]),D=(48&_[3])>>>4,N=15&_[3],z={},q=4;if(D===2||D===3){var R=_[4];if(5+R===188){C+=188,this.ts_packet_size_===204&&(C+=16);continue}R>0&&(z=this.parseAdaptationField(o,C+4,1+R)),q=5+R}if(D===1||D===3){if($===0||$===this.current_pmt_pid_||this.pmt_!==void 0&&this.pmt_.pid_stream_type[$]===j.kSCTE35){var Y=188-q;this.handleSectionSlice(o,C+q,Y,{pid:$,file_position:w,payload_unit_start_indicator:k,continuity_conunter:N,random_access_indicator:z.random_access_indicator})}else if(((y=this.pmt_)===null||y===void 0?void 0:y.pid_stream_type[$])!==void 0){Y=188-q;var se=this.pmt_.pid_stream_type[$];($===this.pmt_.common_pids.h264||$===this.pmt_.common_pids.h265||$===this.pmt_.common_pids.adts_aac||$===this.pmt_.common_pids.loas_aac||$===this.pmt_.common_pids.ac3||$===this.pmt_.common_pids.eac3||$===this.pmt_.common_pids.opus||$===this.pmt_.common_pids.mp3||this.pmt_.pes_private_data_pids[$]||this.pmt_.timed_id3_pids[$])&&this.handlePESSlice(o,C+q,Y,{pid:$,stream_type:se,file_position:w,payload_unit_start_indicator:k,continuity_conunter:N,random_access_indicator:z.random_access_indicator})}}C+=188,this.ts_packet_size_===204&&(C+=16)}return this.dispatchAudioVideoMediaSegment(),C},A.prototype.parseAdaptationField=function(o,r,y){var C=new Uint8Array(o,r,y),w=C[0];return w>0?w>183?(n.A.w(this.TAG,"Illegal adaptation_field_length: ".concat(w)),{}):{discontinuity_indicator:(128&C[1])>>>7,random_access_indicator:(64&C[1])>>>6,elementary_stream_priority_indicator:(32&C[1])>>>5}:{}},A.prototype.handleSectionSlice=function(o,r,y,C){var w=new Uint8Array(o,r,y),_=this.section_slice_queues_?this.section_slice_queues_[C.pid]:{};if(C.payload_unit_start_indicator){var I=w[0];if(_!==void 0&&(_==null?void 0:_.total_length)!==0){var k=new Uint8Array(o,r+1,Math.min(y,I));_.slices.push(k),_.total_length+=k.byteLength,_.total_length===_.expected_length?this.emitSectionSlices(_,C):this.clearSlices(_,C)}for(var $=1+I;$<w.byteLength&&w[$+0]!==255;){var D=(15&w[$+1])<<8|w[$+2];this.section_slice_queues_&&(this.section_slice_queues_[C.pid]=new ge,_=this.section_slice_queues_[C.pid]),_.expected_length=D+3,_.file_position=C.file_position,_.random_access_indicator=C.random_access_indicator,k=new Uint8Array(o,r+$,Math.min(y-$,_.expected_length-_.total_length)),_.slices.push(k),_.total_length+=k.byteLength,_.total_length===_.expected_length?this.emitSectionSlices(_,C):_.total_length>=_.expected_length&&this.clearSlices(_,C),$+=k.byteLength}}else _!==void 0&&_.total_length!==0&&(k=new Uint8Array(o,r,Math.min(y,_.expected_length-_.total_length)),_.slices.push(k),_.total_length+=k.byteLength,_.total_length===_.expected_length?this.emitSectionSlices(_,C):_.total_length>=_.expected_length&&this.clearSlices(_,C))},A.prototype.handlePESSlice=function(o,r,y,C){var w=new Uint8Array(o,r,y),_=w[0]<<16|w[1]<<8|w[2],I=(w[3],w[4]<<8|w[5]);if(C.payload_unit_start_indicator){if(_!==1)return void n.A.e(this.TAG,"handlePESSlice: packet_start_code_prefix should be 1 but with value ".concat(_));var k=this.pes_slice_queues_[C.pid];k&&(k.expected_length===0||k.expected_length===k.total_length?this.emitPESSlices(k,C):this.clearSlices(k,C)),this.pes_slice_queues_&&(this.pes_slice_queues_[C.pid]=new ge,this.pes_slice_queues_[C.pid].file_position=C.file_position,this.pes_slice_queues_[C.pid].random_access_indicator=C.random_access_indicator)}if(this.pes_slice_queues_[C.pid]!==void 0){var $=this.pes_slice_queues_[C.pid];$.slices.push(w),C.payload_unit_start_indicator&&($.expected_length=I===0?0:I+6),$.total_length+=w.byteLength,$.expected_length>0&&$.expected_length===$.total_length?this.emitPESSlices($,C):$.expected_length>0&&$.expected_length<$.total_length&&this.clearSlices($,C)}},A.prototype.emitSectionSlices=function(o,r){for(var y=new Uint8Array(o.total_length),C=0,w=0;C<o.slices.length;C++){var _=o.slices[C];y.set(_,w),w+=_.byteLength}o.slices=[],o.expected_length=-1,o.total_length=0;var I=new me;I.pid=r.pid,I.data=y,I.file_position=o.file_position,I.random_access_indicator=o.random_access_indicator,this.parseSection(I)},A.prototype.emitPESSlices=function(o,r){for(var y=new Uint8Array(o.total_length),C=0,w=0;C<o.slices.length;C++){var _=o.slices[C];y.set(_,w),w+=_.byteLength}o.slices=[],o.expected_length=-1,o.total_length=0;var I=new fe;I.pid=r.pid,I.data=y,I.stream_type=r.stream_type,I.file_position=o.file_position,I.random_access_indicator=o.random_access_indicator,this.parsePES(I)},A.prototype.clearSlices=function(o,r){o.slices=[],o.expected_length=-1,o.total_length=0},A.prototype.parseSection=function(o){var r,y=o.data,C=o.pid;C===0?this.parsePAT(y):C===this.current_pmt_pid_?this.parsePMT(y):!((r=this.pmt_)===null||r===void 0)&&r.scte_35_pids[C]&&this.parseSCTE35(y)},A.prototype.parsePES=function(o){var r=o.data,y=r[0]<<16|r[1]<<8|r[2],C=r[3],w=r[4]<<8|r[5];if(y===1)if(C!==188&&C!==190&&C!==191&&C!==240&&C!==241&&C!==255&&C!==242&&C!==248){r[6];var _=(192&r[7])>>>6,I=r[8],k=void 0,$=void 0;_!==2&&_!==3||(k=536870912*(14&r[9])+4194304*(255&r[10])+16384*(254&r[11])+128*(255&r[12])+(254&r[13])/2,$=_===3?536870912*(14&r[14])+4194304*(255&r[15])+16384*(254&r[16])+128*(255&r[17])+(254&r[18])/2:k);var D=9+I,N=void 0;if(w!==0){if(w<3+I)return void n.A.v(this.TAG,"Malformed PES: PES_packet_length < 3 + PES_header_data_length");N=w-3-I}else N=r.byteLength-D;var z=r.subarray(D,D+N);switch(o.stream_type){case j.kMPEG1Audio:case j.kMPEG2Audio:this.parseMP3Payload(z,k);break;case j.kPESPrivateData:this.pmt_.common_pids.opus===o.pid?this.parseOpusPayload(z,k):this.pmt_.common_pids.ac3===o.pid?this.parseAC3Payload(z,k):this.pmt_.common_pids.eac3===o.pid?this.parseEAC3Payload(z,k):this.pmt_.smpte2038_pids[o.pid]?this.parseSMPTE2038MetadataPayload(z,k,$,o.pid,C):this.parsePESPrivateDataPayload(z,k,$,o.pid,C);break;case j.kADTSAAC:this.parseADTSAACPayload(z,k);break;case j.kLOASAAC:this.parseLOASAACPayload(z,k);break;case j.kAC3:this.parseAC3Payload(z,k);break;case j.kEAC3:this.parseEAC3Payload(z,k);break;case j.kID3:this.parseTimedID3MetadataPayload(z,k,$,o.pid,C);break;case j.kH264:this.parseH264Payload(z,k,$,o.file_position,o.random_access_indicator);break;case j.kH265:this.parseH265Payload(z,k,$,o.file_position,o.random_access_indicator)}}else C!==188&&C!==191&&C!==240&&C!==241&&C!==255&&C!==242&&C!==248||o.stream_type!==j.kPESPrivateData||(D=6,N=void 0,N=w!==0?w:r.byteLength-D,z=r.subarray(D,D+N),this.parsePESPrivateDataPayload(z,void 0,void 0,o.pid,C));else n.A.e(this.TAG,"parsePES: packet_start_code_prefix should be 1 but with value ".concat(y))},A.prototype.parsePAT=function(o){var r=o[0];if(r===0){var y=(15&o[1])<<8|o[2],C=(o[3],o[4],(62&o[5])>>>1),w=1&o[5],_=o[6],I=(o[7],null);if(w===1&&_===0)(I=new Q).version_number=C;else if((I=this.pat_)==null)return;for(var k=y-5-4,$=-1,D=-1,N=8;N<8+k;N+=4){var z=o[N]<<8|o[N+1],q=(31&o[N+2])<<8|o[N+3];z===0?I.network_pid=q:(I.program_pmt_pid[z]=q,$===-1&&($=z),D===-1&&(D=q))}w===1&&_===0&&(this.pat_===void 0&&n.A.v(this.TAG,"Parsed first PAT: ".concat(JSON.stringify(I))),this.pat_=I,this.current_program_=$,this.current_pmt_pid_=D)}else n.A.e(this.TAG,"parsePAT: table_id ".concat(r," is not corresponded to PAT!"))},A.prototype.parsePMT=function(o){var r=o[0];if(r===2){var y=(15&o[1])<<8|o[2],C=o[3]<<8|o[4],w=(62&o[5])>>>1,_=1&o[5],I=o[6],k=(o[7],null);if(_===1&&I===0)(k=new ue).program_number=C,k.version_number=w,this.program_pmt_map_[C]=k;else if((k=this.program_pmt_map_[C])==null)return;o[8],o[9];for(var $=(15&o[10])<<8|o[11],D=12+$,N=y-9-$-4,z=D;z<D+N;){var q=o[z],R=(31&o[z+1])<<8|o[z+2],Y=(15&o[z+3])<<8|o[z+4];k.pid_stream_type[R]=q;var se=k.common_pids.h264||k.common_pids.h265,re=k.common_pids.adts_aac||k.common_pids.loas_aac||k.common_pids.ac3||k.common_pids.eac3||k.common_pids.opus||k.common_pids.mp3;if(q!==j.kH264||se)if(q!==j.kH265||se)if(q!==j.kADTSAAC||re)if(q!==j.kLOASAAC||re)if(q!==j.kAC3||re)if(q!==j.kEAC3||re)if(q!==j.kMPEG1Audio&&q!==j.kMPEG2Audio||re)if(q===j.kPESPrivateData){if(k.pes_private_data_pids[R]=!0,Y>0){for(var de=z+5;de<z+5+Y;){var oe=o[de+0],_e=o[de+1];if(oe===5){var ve=String.fromCharCode.apply(String,Ie([],Te(Array.from(o.subarray(de+2,de+2+_e))),!1));ve==="VANC"?k.smpte2038_pids[R]=!0:ve==="Opus"&&(k.common_pids.opus=R)}else if(oe===127&&R===k.common_pids.opus){var Ae=null;if(o[de+2]===128&&(Ae=o[de+3]),Ae==null){n.A.e(this.TAG,"Not Supported Opus channel count.");continue}var Le={codec:"opus",channel_count:15&Ae?15&Ae:2,channel_config_code:Ae,sample_rate:48e3},we={codec:"opus",meta:Le};this.audio_init_segment_dispatched_?this.detectAudioMetadataChange(we)&&(this.dispatchAudioMediaSegment(),this.dispatchAudioInitSegment(we)):(this.audio_metadata_=Le,this.dispatchAudioInitSegment(we))}de+=2+_e}var be=o.subarray(z+5,z+5+Y);this.dispatchPESPrivateDataDescriptor(R,q,be)}}else q===j.kID3?k.timed_id3_pids[R]=!0:q===j.kSCTE35&&(k.scte_35_pids[R]=!0);else k.common_pids.mp3=R;else k.common_pids.eac3=R;else k.common_pids.ac3=R;else k.common_pids.loas_aac=R;else k.common_pids.adts_aac=R;else k.common_pids.h265=R;else k.common_pids.h264=R;z+=5+Y}C===this.current_program_&&(this.pmt_===void 0&&n.A.v(this.TAG,"Parsed first PMT: ".concat(JSON.stringify(k))),this.pmt_=k,(k.common_pids.h264||k.common_pids.h265)&&(this.has_video_=!0),(k.common_pids.adts_aac||k.common_pids.loas_aac||k.common_pids.ac3||k.common_pids.opus||k.common_pids.mp3)&&(this.has_audio_=!0))}else n.A.e(this.TAG,"parsePMT: table_id ".concat(r," is not corresponded to PMT!"))},A.prototype.parseSCTE35=function(o){var r=function(C){var w,_,I,k,$,D,N=new M(C),z=N.readBits(8),q=N.readBool(),R=N.readBool();N.readBits(2);var Y=N.readBits(12),se=N.readBits(8),re=N.readBool(),de=N.readBits(6),oe=4*N.readBits(31)+N.readBits(2),_e=N.readBits(8),ve=N.readBits(12),Ae=N.readBits(12),Le=N.readBits(8),we=null;Le===Me.kSpliceNull?we={}:Le===Me.kSpliceSchedule?we=function(et){for(var ot=et.readBits(8),qe=[],Ze=0;Ze<ot;Ze++)qe.push(ct(et));return{splice_count:ot,events:qe}}(N):Le===Me.kSpliceInsert?we=function(et){var ot=et.readBits(32),qe=et.readBool();et.readBits(7);var Ze={splice_event_id:ot,splice_event_cancel_indicator:qe};if(qe)return Ze;if(Ze.out_of_network_indicator=et.readBool(),Ze.program_splice_flag=et.readBool(),Ze.duration_flag=et.readBool(),Ze.splice_immediate_flag=et.readBool(),et.readBits(4),Ze.program_splice_flag&&!Ze.splice_immediate_flag&&(Ze.splice_time=Ce(et)),!Ze.program_splice_flag){Ze.component_count=et.readBits(8),Ze.components=[];for(var Gt=0;Gt<Ze.component_count;Gt++)Ze.components.push(Re(Ze.splice_immediate_flag,et))}return Ze.duration_flag&&(Ze.break_duration=pe(et)),Ze.unique_program_id=et.readBits(16),Ze.avail_num=et.readBits(8),Ze.avails_expected=et.readBits(8),Ze}(N):Le===Me.kTimeSignal?we=function(et){return{splice_time:Ce(et)}}(N):Le===Me.kBandwidthReservation?we={}:Le===Me.kPrivateCommand?we=function(et,ot){for(var qe=String.fromCharCode(ot.readBits(8),ot.readBits(8),ot.readBits(8),ot.readBits(8)),Ze=new Uint8Array(et-4),Gt=0;Gt<et-4;Gt++)Ze[Gt]=ot.readBits(8);return{identifier:qe,private_data:Ze.buffer}}(Ae,N):N.readBits(8*Ae);for(var be=[],He=N.readBits(16),At=0;At<He;){var ke=N.readBits(8),pt=N.readBits(8),Ne=String.fromCharCode(N.readBits(8),N.readBits(8),N.readBits(8),N.readBits(8));ke===0?be.push(Se(ke,pt,Ne,N)):ke===1?be.push(Ye(ke,pt,Ne,N)):ke===2?be.push(zt(ke,pt,Ne,N)):ke===3?be.push(Je(ke,pt,Ne,N)):ke===4?be.push(bt(ke,pt,Ne,N)):N.readBits(8*(pt-4)),At+=2+pt}var Qe={table_id:z,section_syntax_indicator:q,private_indicator:R,section_length:Y,protocol_version:se,encrypted_packet:re,encryption_algorithm:de,pts_adjustment:oe,cw_index:_e,tier:ve,splice_command_length:Ae,splice_command_type:Le,splice_command:we,descriptor_loop_length:He,splice_descriptors:be,E_CRC32:re?N.readBits(32):void 0,CRC32:N.readBits(32)};if(Le===Me.kSpliceInsert){var Ve=we;if(Ve.splice_event_cancel_indicator)return{splice_command_type:Le,detail:Qe,data:C};if(Ve.program_splice_flag&&!Ve.splice_immediate_flag){var je=Ve.duration_flag?(w=Ve==null?void 0:Ve.break_duration)===null||w===void 0?void 0:w.auto_return:void 0,$t=Ve.duration_flag?(((_=Ve==null?void 0:Ve.break_duration)===null||_===void 0?void 0:_.duration)||0)/90:void 0;return!((I=Ve.splice_time)===null||I===void 0)&&I.time_specified_flag?{splice_command_type:Le,pts:(oe+(((k=Ve==null?void 0:Ve.splice_time)===null||k===void 0?void 0:k.pts_time)||0))%Math.pow(2,33),auto_return:je,duraiton:$t,detail:Qe,data:C}:{splice_command_type:Le,auto_return:je,duraiton:$t,detail:Qe,data:C}}return{splice_command_type:Le,auto_return:je=Ve.duration_flag?($=Ve.break_duration)===null||$===void 0?void 0:$.auto_return:void 0,duraiton:$t=Ve.duration_flag?(((D=Ve.break_duration)===null||D===void 0?void 0:D.duration)||0)/90:void 0,detail:Qe,data:C}}if(Le===Me.kTimeSignal){var Jt=we;return Jt.splice_time.time_specified_flag?{splice_command_type:Le,pts:(oe+(Jt.splice_time.pts_time||0))%Math.pow(2,33),detail:Qe,data:C}:{splice_command_type:Le,detail:Qe,data:C}}return{splice_command_type:Le,detail:Qe,data:C}}(o);if(r.pts!==void 0){var y=Math.floor(r.pts/this.timescale_);r.pts=y}else r.nearest_pts=this.aac_last_sample_pts_;this.onSCTE35Metadata&&this.onSCTE35Metadata(r)},A.prototype.parseH264Payload=function(o,r,y,C,w){for(var _,I,k=new nt(o),$=null,D=[],N=0,z=!1;($=k.readNextNaluPayload())!=null;){var q=new De($);if(q.type===ee.kSliceSPS){var R=F.parseSPS($.data);this.video_init_segment_dispatched_?this.detectVideoMetadataChange(q,R)&&(n.A.v(this.TAG,"H264: Critical h264 metadata has been changed, attempt to re-generate InitSegment"),this.video_metadata_changed_=!0,this.video_metadata_={vps:void 0,sps:q,pps:void 0,details:R}):this.video_metadata_&&(this.video_metadata_.sps=q,this.video_metadata_.details=R)}else q.type===ee.kSlicePPS?this.video_init_segment_dispatched_&&!this.video_metadata_changed_||(this.video_metadata_&&(this.video_metadata_.pps=q),!((_=this.video_metadata_)===null||_===void 0)&&_.sps&&(!((I=this.video_metadata_)===null||I===void 0)&&I.pps)&&(this.video_metadata_changed_&&this.dispatchVideoMediaSegment(),this.dispatchVideoInitSegment())):(q.type===ee.kSliceIDR||q.type===ee.kSliceNonIDR&&w===1)&&(z=!0);this.video_init_segment_dispatched_&&(D.push(q),N+=q.data.byteLength)}var Y=Math.floor(r/this.timescale_),se=Math.floor(y/this.timescale_);if(D.length){var re=this.video_track_,de={units:D,length:N,isKeyframe:z,dts:se,pts:Y,cts:Y-se,file_position:C};re&&(re.samples.push(de),re.length+=N)}},A.prototype.parseH265Payload=function(o,r,y,C,w){for(var _,I,k,$,D,N,z,q=new Vt(o),R=null,Y=[],se=0,re=!1;(R=q.readNextNaluPayload())!=null;){var de=new gt(R);if(de.type===ae.kSliceVPS){if(!this.video_init_segment_dispatched_){var oe=K.parseVPS(R.data);this.video_metadata_&&(this.video_metadata_.vps=de,this.video_metadata_.details=he(he({},(_=this.video_metadata_)===null||_===void 0?void 0:_.details),oe))}}else de.type===ae.kSliceSPS?(oe=K.parseSPS(R.data),this.video_init_segment_dispatched_?this.detectVideoMetadataChange(de,oe)&&(n.A.v(this.TAG,"H265: Critical h265 metadata has been changed, attempt to re-generate InitSegment"),this.video_metadata_changed_=!0,this.video_metadata_={vps:void 0,sps:de,pps:void 0,details:oe}):this.video_metadata_&&(this.video_metadata_.sps=de,this.video_metadata_.details=he(he({},(I=this.video_metadata_)===null||I===void 0?void 0:I.details),oe))):de.type===ae.kSlicePPS?this.video_init_segment_dispatched_&&!this.video_metadata_changed_||(oe=K.parsePPS(R.data),this.video_metadata_&&(this.video_metadata_.pps=de,this.video_metadata_.details=he(he({},(k=this.video_metadata_)===null||k===void 0?void 0:k.details),oe)),!(($=this.video_metadata_)===null||$===void 0)&&$.vps&&(!((D=this.video_metadata_)===null||D===void 0)&&D.sps)&&(!((N=this.video_metadata_)===null||N===void 0)&&N.pps)&&(this.video_metadata_changed_&&this.dispatchVideoMediaSegment(),this.dispatchVideoInitSegment())):de.type!==ae.kSliceIDR_W_RADL&&de.type!==ae.kSliceIDR_N_LP&&de.type!==ae.kSliceCRA_NUT||(re=!0);this.video_init_segment_dispatched_&&(Y.push(de),se+=de.data.byteLength)}var _e=Math.floor(r/this.timescale_),ve=Math.floor(y/this.timescale_);if(Y.length){var Ae=this.video_track_,Le={units:Y,length:se,isKeyframe:re,dts:ve,pts:_e,cts:_e-ve,file_position:C};Ae&&((z=Ae.samples)===null||z===void 0||z.push(Le),Ae.length+=se)}},A.prototype.detectVideoMetadataChange=function(o,r){var y,C,w,_,I,k,$,D,N,z;if(r.codec_mimetype!==((C=(y=this.video_metadata_)===null||y===void 0?void 0:y.details)===null||C===void 0?void 0:C.codec_mimetype))return n.A.v(this.TAG,"Video: Codec mimeType changed from "+"".concat((w=this.video_metadata_)===null||w===void 0?void 0:w.details.codec_mimetype," to ").concat(r==null?void 0:r.codec_mimetype)),!0;if(r.codec_size.width!==((I=(_=this.video_metadata_)===null||_===void 0?void 0:_.details)===null||I===void 0?void 0:I.codec_size.width)||r.codec_size.height!==(($=(k=this.video_metadata_)===null||k===void 0?void 0:k.details)===null||$===void 0?void 0:$.codec_size.height)){var q=(D=this.video_metadata_)===null||D===void 0?void 0:D.details.codec_size,R=r.codec_size;return n.A.v(this.TAG,"Video: Coded Resolution changed from "+"".concat(q.width,"x").concat(q.height," to ").concat(R.width,"x").concat(R.height)),!0}return r.present_size.width!==((N=this.video_metadata_)===null||N===void 0?void 0:N.details.present_size.width)&&(n.A.v(this.TAG,"Video: Present resolution width changed from "+"".concat((z=this.video_metadata_)===null||z===void 0?void 0:z.details.present_size.width," to ").concat(r==null?void 0:r.present_size.width)),!0)},A.prototype.isInitSegmentDispatched=function(){return this.has_video_&&this.has_audio_?this.video_init_segment_dispatched_&&this.audio_init_segment_dispatched_:this.has_video_&&!this.has_audio_?this.video_init_segment_dispatched_:!(this.has_video_||!this.has_audio_)&&this.audio_init_segment_dispatched_},A.prototype.dispatchVideoInitSegment=function(){var o,r,y,C,w,_,I,k,$,D,N,z,q=(o=this.video_metadata_)===null||o===void 0?void 0:o.details,R={type:"video"};R.id=(r=this.video_track_)===null||r===void 0?void 0:r.id,R.timescale=1e3,R.duration=this.duration_,R.codecWidth=q.codec_size.width,R.codecHeight=q.codec_size.height,R.presentWidth=q.present_size.width,R.presentHeight=q.present_size.height,R.profile=q.profile_string,R.level=q.level_string,R.bitDepth=q.bit_depth,R.chromaFormat=q.chroma_format,R.sarRatio=q.sar_ratio,R.frameRate=q.frame_rate;var Y=R.frameRate.fps_den,se=R.frameRate.fps_num;if(R.refSampleDuration=Y/se*1e3,R.codec=q.codec_mimetype,(y=this.video_metadata_)===null||y===void 0?void 0:y.vps){var re=(C=this.video_metadata_)===null||C===void 0?void 0:C.vps.data.subarray(4),de=(_=(w=this.video_metadata_)===null||w===void 0?void 0:w.sps)===null||_===void 0?void 0:_.data.subarray(4),oe=(k=(I=this.video_metadata_)===null||I===void 0?void 0:I.pps)===null||k===void 0?void 0:k.data.subarray(4),_e=new xt(re,de,oe,q);R.hvcc=_e.getData(),this.video_init_segment_dispatched_||n.A.v(this.TAG,"Generated first HEVCDecoderConfigurationRecord for mimeType: ".concat(R.codec))}else{de=(D=($=this.video_metadata_)===null||$===void 0?void 0:$.sps)===null||D===void 0?void 0:D.data.subarray(4),oe=(z=(N=this.video_metadata_)===null||N===void 0?void 0:N.pps)===null||z===void 0?void 0:z.data.subarray(4);var ve=new Ke(de,oe,q);R.avcc=ve.getData(),this.video_init_segment_dispatched_||n.A.v(this.TAG,"Generated first AVCDecoderConfigurationRecord for mimeType: ".concat(R.codec))}this.onTrackMetadata&&this.onTrackMetadata("video",R),this.video_init_segment_dispatched_=!0,this.video_metadata_changed_=!1;var Ae=this.media_info_;Ae.hasVideo=!0,Ae.width=R.codecWidth,Ae.height=R.codecHeight,Ae.fps=R.frameRate.fps,Ae.profile=R.profile,Ae.level=R.level,Ae.refFrames=q.ref_frames,Ae.chromaFormat=q.chroma_format_string,Ae.sarNum=R.sarRatio.width,Ae.sarDen=R.sarRatio.height,Ae.videoCodec=R.codec,Ae.hasAudio&&Ae.audioCodec?Ae.mimeType='video/mp2t; codecs="'.concat(Ae.videoCodec,",").concat(Ae.audioCodec,'"'):Ae.mimeType='video/mp2t; codecs="'.concat(Ae.videoCodec,'"'),Ae.isComplete()&&this.onMediaInfo&&this.onMediaInfo(Ae)},A.prototype.dispatchVideoMediaSegment=function(){var o;this.isInitSegmentDispatched()&&(!((o=this.video_track_)===null||o===void 0)&&o.length)&&this.onDataAvailable&&this.onDataAvailable(null,this.video_track_)},A.prototype.dispatchAudioMediaSegment=function(){var o;this.isInitSegmentDispatched()&&(!((o=this.audio_track_)===null||o===void 0)&&o.length)&&this.onDataAvailable&&this.onDataAvailable(this.audio_track_,null)},A.prototype.dispatchAudioVideoMediaSegment=function(){var o,r;this.isInitSegmentDispatched()&&(!((o=this.audio_track_)===null||o===void 0)&&o.length||!((r=this.video_track_)===null||r===void 0)&&r.length)&&this.onDataAvailable&&this.onDataAvailable(this.audio_track_,this.video_track_)},A.prototype.parseADTSAACPayload=function(o,r){var y,C,w;if(!this.has_video_||this.video_init_segment_dispatched_){if(this.aac_last_incomplete_data_){var _=new Uint8Array(o.byteLength+this.aac_last_incomplete_data_.byteLength);_.set(this.aac_last_incomplete_data_,0),_.set(o,this.aac_last_incomplete_data_.byteLength),o=_}var I,k=0;if(r!==void 0&&(k=r/this.timescale_),((y=this.audio_metadata_)===null||y===void 0?void 0:y.codec)==="aac"){if(r===void 0&&this.aac_last_sample_pts_!==void 0)I=1024/((C=this.audio_metadata_)===null||C===void 0?void 0:C.sampling_frequency)*1e3,k=this.aac_last_sample_pts_+I;else if(r===void 0)return void n.A.w(this.TAG,"AAC: Unknown pts");if(this.aac_last_incomplete_data_&&this.aac_last_sample_pts_){I=1024/this.audio_metadata_.sampling_frequency*1e3;var $=this.aac_last_sample_pts_+I;Math.abs($-k)>1&&(n.A.w(this.TAG,"AAC: Detected pts overlapped, "+"expected: ".concat($,"ms, PES pts: ").concat(k,"ms")),k=$)}}for(var D=new X(o),N=null,z=k,q=0;(N=D.readNextAACFrame())!=null;){I=1024/N.sampling_frequency*1e3;var R={codec:"aac",data:N};this.audio_init_segment_dispatched_?this.detectAudioMetadataChange(R)&&(this.dispatchAudioMediaSegment(),this.dispatchAudioInitSegment(R)):(this.audio_metadata_={codec:"aac",audio_object_type:N.audio_object_type,sampling_freq_index:N.sampling_freq_index,sampling_frequency:N.sampling_frequency,channel_config:N.channel_config},this.dispatchAudioInitSegment(R)),q=z;var Y=Math.floor(z),se={unit:N.data,length:N.data.byteLength,pts:Y,dts:Y};this.audio_track_&&((w=this.audio_track_)===null||w===void 0||w.samples.push(se),this.audio_track_.length+=N.data.byteLength),z+=I}D.hasIncompleteData()&&(this.aac_last_incomplete_data_=D.getIncompleteData()),q&&(this.aac_last_sample_pts_=q)}},A.prototype.parseLOASAACPayload=function(o,r){var y,C,w;if(!this.has_video_||this.video_init_segment_dispatched_){if(this.aac_last_incomplete_data_){var _=new Uint8Array(o.byteLength+this.aac_last_incomplete_data_.byteLength);_.set(this.aac_last_incomplete_data_,0),_.set(o,this.aac_last_incomplete_data_.byteLength),o=_}var I,k=0;if(r!==void 0&&(k=r/this.timescale_),((y=this.audio_metadata_)===null||y===void 0?void 0:y.codec)==="aac"){if(r===void 0&&this.aac_last_sample_pts_!==void 0)I=1024/this.audio_metadata_.sampling_frequency*1e3,k=this.aac_last_sample_pts_+I;else if(r===void 0)return void n.A.w(this.TAG,"AAC: Unknown pts");if(this.aac_last_incomplete_data_&&this.aac_last_sample_pts_){I=1024/this.audio_metadata_.sampling_frequency*1e3;var $=this.aac_last_sample_pts_+I;Math.abs($-k)>1&&(n.A.w(this.TAG,"AAC: Detected pts overlapped, "+"expected: ".concat($,"ms, PES pts: ").concat(k,"ms")),k=$)}}for(var D=new J(o),N=null,z=k,q=0;(N=D.readNextAACFrame((C=this.loas_previous_frame)!==null&&C!==void 0?C:void 0))!=null;){this.loas_previous_frame=N,I=1024/N.sampling_frequency*1e3;var R={codec:"aac",data:N};this.audio_init_segment_dispatched_?this.detectAudioMetadataChange(R)&&(this.dispatchAudioMediaSegment(),this.dispatchAudioInitSegment(R)):(this.audio_metadata_={codec:"aac",audio_object_type:N.audio_object_type,sampling_freq_index:N.sampling_freq_index,sampling_frequency:N.sampling_frequency,channel_config:N.channel_config},this.dispatchAudioInitSegment(R)),q=z;var Y=Math.floor(z),se={unit:N.data,length:N.data.byteLength,pts:Y,dts:Y};this.audio_track_&&((w=this.audio_track_)===null||w===void 0||w.samples.push(se),this.audio_track_.length+=N.data.byteLength),z+=I}D.hasIncompleteData()&&(this.aac_last_incomplete_data_=D.getIncompleteData()),q&&(this.aac_last_sample_pts_=q)}},A.prototype.parseAC3Payload=function(o,r){var y,C;if(!this.has_video_||this.video_init_segment_dispatched_){var w,_=0;if(r!==void 0&&(_=r/this.timescale_),((y=this.audio_metadata_)===null||y===void 0?void 0:y.codec)==="ac-3"){if(r===void 0&&this.aac_last_sample_pts_!==void 0)w=1536/this.audio_metadata_.sampling_frequency*1e3,_=this.aac_last_sample_pts_+w;else if(r===void 0)return void n.A.w(this.TAG,"AC3: Unknown pts")}for(var I=new Ue(o),k=null,$=_,D=0;(k=I.readNextAC3Frame())!=null;){w=1536/k.sampling_frequency*1e3;var N={codec:"ac-3",data:k};this.audio_init_segment_dispatched_?this.detectAudioMetadataChange(N)&&(this.dispatchAudioMediaSegment(),this.dispatchAudioInitSegment(N)):(this.audio_metadata_={codec:"ac-3",sampling_frequency:k.sampling_frequency,bit_stream_identification:k.bit_stream_identification,bit_stream_mode:k.bit_stream_mode,low_frequency_effects_channel_on:k.low_frequency_effects_channel_on,channel_mode:k.channel_mode},this.dispatchAudioInitSegment(N)),D=$;var z=Math.floor($),q={unit:k.data,length:k.data.byteLength,pts:z,dts:z};this.audio_track_&&((C=this.audio_track_)===null||C===void 0||C.samples.push(q),this.audio_track_.length+=k.data.byteLength),$+=w}D&&(this.aac_last_sample_pts_=D)}},A.prototype.parseEAC3Payload=function(o,r){var y,C;if(!this.has_video_||this.video_init_segment_dispatched_){var w,_=0;if(r!==void 0&&(_=r/this.timescale_),((y=this.audio_metadata_)===null||y===void 0?void 0:y.codec)==="ec-3"){if(r===void 0&&this.aac_last_sample_pts_!==void 0)w=256*(this.audio_metadata_.num_blks||0)/(this.audio_metadata_.sampling_frequency||0)*1e3,_=this.aac_last_sample_pts_+w;else if(r===void 0)return void n.A.w(this.TAG,"EAC3: Unknown pts")}for(var I=new ut(o),k=null,$=_,D=0;(k=I.readNextEAC3Frame())!=null;){w=1536/k.sampling_frequency*1e3;var N={codec:"ec-3",data:k};this.audio_init_segment_dispatched_?this.detectAudioMetadataChange(N)&&(this.dispatchAudioMediaSegment(),this.dispatchAudioInitSegment(N)):(this.audio_metadata_={codec:"ec-3",sampling_frequency:k.sampling_frequency,bit_stream_identification:k.bit_stream_identification,low_frequency_effects_channel_on:k.low_frequency_effects_channel_on,num_blks:k.num_blks,channel_mode:k.channel_mode},this.dispatchAudioInitSegment(N)),D=$;var z=Math.floor($),q={unit:k.data,length:k.data.byteLength,pts:z,dts:z};this.audio_track_&&((C=this.audio_track_)===null||C===void 0||C.samples.push(q),this.audio_track_.length+=k.data.byteLength),$+=w}D&&(this.aac_last_sample_pts_=D)}},A.prototype.parseOpusPayload=function(o,r){var y,C;if(!this.has_video_||this.video_init_segment_dispatched_){var w,_=0;if(r!==void 0&&(_=r/this.timescale_),((y=this.audio_metadata_)===null||y===void 0?void 0:y.codec)==="opus"){if(r===void 0&&this.aac_last_sample_pts_!==void 0)w=20,_=this.aac_last_sample_pts_+w;else if(r===void 0)return void n.A.w(this.TAG,"Opus: Unknown pts")}for(var I=_,k=0,$=0;$<o.length;){w=20;for(var D=!!(16&o[$+1]),N=!!(8&o[$+1]),z=$+2,q=0;o[z]===255;)q+=255,z+=1;q+=o[z],z+=1,z+=D?2:0,z+=N?2:0,k=I;var R=Math.floor(I),Y=o.slice(z,z+q),se={unit:Y,length:Y.byteLength,pts:R,dts:R};this.audio_track_&&((C=this.audio_track_)===null||C===void 0||C.samples.push(se),this.audio_track_.length+=Y.byteLength),I+=w,$=z+q}k&&(this.aac_last_sample_pts_=k)}},A.prototype.parseMP3Payload=function(o,r){var y;if(!this.has_video_||this.video_init_segment_dispatched_){var C=o[1]>>>3&3,w=(6&o[1])>>1,_=(o[2],(12&o[2])>>>2),I=3&~(o[3]>>>6)?2:1,k=0,$=34;switch(C){case 0:k=[11025,12e3,8e3,0][_];break;case 2:k=[22050,24e3,16e3,0][_];break;case 3:k=[44100,48e3,32e3,0][_]}switch(w){case 1:$=34;break;case 2:$=33;break;case 3:$=32}var D=new Kt;D.object_type=$,D.sample_rate=k,D.channel_count=I,D.data=o;var N={codec:"mp3",data:D};this.audio_init_segment_dispatched_?this.detectAudioMetadataChange(N)&&(this.dispatchAudioMediaSegment(),this.dispatchAudioInitSegment(N)):(this.audio_metadata_={codec:"mp3",object_type:$,sample_rate:k,channel_count:I},this.dispatchAudioInitSegment(N));var z={unit:o,length:o.byteLength,pts:r/this.timescale_,dts:r/this.timescale_};this.audio_track_&&((y=this.audio_track_)===null||y===void 0||y.samples.push(z),this.audio_track_.length+=o.byteLength)}},A.prototype.detectAudioMetadataChange=function(o){var r,y,C,w;if(o.codec!==((r=this.audio_metadata_)===null||r===void 0?void 0:r.codec))return n.A.v(this.TAG,"Audio: Audio Codecs changed from "+"".concat((y=this.audio_metadata_)===null||y===void 0?void 0:y.codec," to ").concat(o.codec)),!0;if(o.codec==="aac"&&this.audio_metadata_.codec==="aac"){if((_=o.data).audio_object_type!==this.audio_metadata_.audio_object_type)return n.A.v(this.TAG,"AAC: AudioObjectType changed from "+"".concat(this.audio_metadata_.audio_object_type," to ").concat(_.audio_object_type)),!0;if(_.sampling_freq_index!==this.audio_metadata_.sampling_freq_index)return n.A.v(this.TAG,"AAC: SamplingFrequencyIndex changed from "+"".concat(this.audio_metadata_.sampling_freq_index," to ").concat(_.sampling_freq_index)),!0;if(_.channel_config!==this.audio_metadata_.channel_config)return n.A.v(this.TAG,"AAC: Channel configuration changed from "+"".concat((C=this.audio_metadata_)===null||C===void 0?void 0:C.channel_config," to ").concat(_.channel_config)),!0}else if(o.codec==="ac-3"&&this.audio_metadata_.codec==="ac-3"){var _;if((_=o.data).sampling_frequency!==this.audio_metadata_.sampling_frequency)return n.A.v(this.TAG,"AC3: Sampling Frequency changed from "+"".concat((w=this.audio_metadata_)===null||w===void 0?void 0:w.sampling_frequency," to ").concat(_.sampling_frequency)),!0;if(_.bit_stream_identification!==this.audio_metadata_.bit_stream_identification)return n.A.v(this.TAG,"AC3: Bit Stream Identification changed from "+"".concat(this.audio_metadata_.bit_stream_identification," to ").concat(_.bit_stream_identification)),!0;if(_.bit_stream_mode!==this.audio_metadata_.bit_stream_mode)return n.A.v(this.TAG,"AC3: BitStream Mode changed from "+"".concat(this.audio_metadata_.bit_stream_mode," to ").concat(_.bit_stream_mode)),!0;if(_.channel_mode!==this.audio_metadata_.channel_mode)return n.A.v(this.TAG,"AC3: Channel Mode changed from "+"".concat(this.audio_metadata_.channel_mode," to ").concat(_.channel_mode)),!0;if(_.low_frequency_effects_channel_on!==this.audio_metadata_.low_frequency_effects_channel_on)return n.A.v(this.TAG,"AC3: Low Frequency Effects Channel On changed from "+"".concat(this.audio_metadata_.low_frequency_effects_channel_on," to ").concat(_.low_frequency_effects_channel_on)),!0}else if(o.codec==="opus"&&this.audio_metadata_.codec==="opus"){if((I=o.meta).sample_rate!==this.audio_metadata_.sample_rate)return n.A.v(this.TAG,"Opus: SamplingFrequencyIndex changed from "+"".concat(this.audio_metadata_.sample_rate," to ").concat(I.sample_rate)),!0;if(I.channel_count!==this.audio_metadata_.channel_count)return n.A.v(this.TAG,"Opus: Channel count changed from "+"".concat(this.audio_metadata_.channel_count," to ").concat(I.channel_count)),!0}else if(o.codec==="mp3"&&this.audio_metadata_.codec==="mp3"){var I;if((I=o.data).object_type!==this.audio_metadata_.object_type)return n.A.v(this.TAG,"MP3: AudioObjectType changed from "+"".concat(this.audio_metadata_.object_type," to ").concat(I.object_type)),!0;if(I.sample_rate!==this.audio_metadata_.sample_rate)return n.A.v(this.TAG,"MP3: SamplingFrequencyIndex changed from "+"".concat(this.audio_metadata_.sample_rate," to ").concat(I.sample_rate)),!0;if(I.channel_count!==this.audio_metadata_.channel_count)return n.A.v(this.TAG,"MP3: Channel count changed from "+"".concat(this.audio_metadata_.channel_count," to ").concat(I.channel_count)),!0}return!1},A.prototype.dispatchAudioInitSegment=function(o){var r,y,C,w,_,I,k={type:"audio"};if(k.id=(r=this.audio_track_)===null||r===void 0?void 0:r.id,k.timescale=1e3,k.duration=this.duration_,((y=this.audio_metadata_)===null||y===void 0?void 0:y.codec)==="aac"){var $=o.codec==="aac"?o.data:null,D=new le($);k.audioSampleRate=D.sampling_rate,k.channelCount=D.channel_count,k.codec=D.codec_mimetype,k.originalCodec=D.original_codec_mimetype,k.config=D.config,k.refSampleDuration=1024/k.audioSampleRate*k.timescale}else if(((C=this.audio_metadata_)===null||C===void 0?void 0:C.codec)==="ac-3"){var N=o.codec==="ac-3"?o.data:null,z=new Fe(N);k.audioSampleRate=z.sampling_rate,k.channelCount=z.channel_count,k.codec=z.codec_mimetype,k.originalCodec=z.original_codec_mimetype,k.config=z.config,k.refSampleDuration=1536/k.audioSampleRate*k.timescale}else if(((w=this.audio_metadata_)===null||w===void 0?void 0:w.codec)==="ec-3"){var q=o.codec==="ec-3"?o.data:null,R=new si(q);k.audioSampleRate=R.sampling_rate,k.channelCount=R.channel_count,k.codec=R.codec_mimetype,k.originalCodec=R.original_codec_mimetype,k.config=R.config,k.refSampleDuration=256*R.num_blks/k.audioSampleRate*k.timescale}else((_=this.audio_metadata_)===null||_===void 0?void 0:_.codec)==="opus"?(k.audioSampleRate=this.audio_metadata_.sample_rate,k.channelCount=this.audio_metadata_.channel_count,k.channelConfigCode=this.audio_metadata_.channel_config_code,k.codec="opus",k.originalCodec="opus",k.config=void 0,k.refSampleDuration=20):((I=this.audio_metadata_)===null||I===void 0?void 0:I.codec)==="mp3"&&(k.audioSampleRate=this.audio_metadata_.sample_rate,k.channelCount=this.audio_metadata_.channel_count,k.codec="mp3",k.originalCodec="mp3",k.config=void 0);this.audio_init_segment_dispatched_||n.A.v(this.TAG,"Generated first AudioSpecificConfig for mimeType: ".concat(k.codec)),this.onTrackMetadata&&this.onTrackMetadata("audio",k),this.audio_init_segment_dispatched_=!0,this.video_metadata_changed_=!1;var Y=this.media_info_;Y.hasAudio=!0,Y.audioCodec=k.originalCodec,Y.audioSampleRate=k.audioSampleRate,Y.audioChannelCount=k.channelCount,Y.hasVideo&&Y.videoCodec?Y.mimeType='video/mp2t; codecs="'.concat(Y.videoCodec,",").concat(Y.audioCodec,'"'):Y.mimeType='video/mp2t; codecs="'.concat(Y.audioCodec,'"'),Y.isComplete()&&this.onMediaInfo&&this.onMediaInfo(Y)},A.prototype.dispatchPESPrivateDataDescriptor=function(o,r,y){var C=new ye;C.pid=o,C.stream_type=r,C.descriptor=y,this.onPESPrivateDataDescriptor&&this.onPESPrivateDataDescriptor(C)},A.prototype.parsePESPrivateDataPayload=function(o,r,y,C,w){var _=new ce;if(_.pid=C,_.stream_id=w,_.len=o.byteLength,_.data=o,r!==void 0){var I=Math.floor(r/this.timescale_);_.pts=I}else _.nearest_pts=this.aac_last_sample_pts_;if(y!==void 0){var k=Math.floor(y/this.timescale_);_.dts=k}this.onPESPrivateData&&this.onPESPrivateData(_)},A.prototype.parseTimedID3MetadataPayload=function(o,r,y,C,w){var _=new ce;if(_.pid=C,_.stream_id=w,_.len=o.byteLength,_.data=o,r!==void 0){var I=Math.floor(r/this.timescale_);_.pts=I}if(y!==void 0){var k=Math.floor(y/this.timescale_);_.dts=k}this.onTimedID3Metadata&&this.onTimedID3Metadata(_)},A.prototype.parseSMPTE2038MetadataPayload=function(o,r,y,C,w){var _=new Pt;if(_.pid=C,_.stream_id=w,_.len=o.byteLength,_.data=o,r!==void 0){var I=Math.floor(r/this.timescale_);_.pts=I}if(_.nearest_pts=this.aac_last_sample_pts_,y!==void 0){var k=Math.floor(y/this.timescale_);_.dts=k}_.ancillaries=function($){for(var D=new M($),N=0,z=[];N+=6,D.readBits(6)===0;){var q=D.readBool();N+=1;var R=D.readBits(11);N+=11;var Y=D.readBits(12);N+=12;var se=255&D.readBits(10);N+=10;var re=255&D.readBits(10);N+=10;var de=255&D.readBits(10);N+=10;for(var oe=new Uint8Array(de),_e=0;_e<de;_e++){var ve=255&D.readBits(10);N+=10,oe[_e]=ve}D.readBits(10),N+=10;var Ae="User Defined";se===65?re===7&&(Ae="SCTE-104"):se===95?re===220?Ae="ARIB STD-B37 (1SEG)":re===221?Ae="ARIB STD-B37 (ANALOG)":re===222?Ae="ARIB STD-B37 (SD)":re===223&&(Ae="ARIB STD-B37 (HD)"):se===97&&(re===1?Ae="EIA-708":re===2&&(Ae="EIA-608")),z.push({yc_indicator:q,line_number:R,horizontal_offset:Y,did:se,sdid:re,user_data:oe,description:Ae,information:{}}),D.readBits(8-(N-Math.floor(N/8))%8),N+=(8-(N-Math.floor(N/8)))%8}return D.destroy(),D=null,z}(o),this.onSMPTE2038Metadata&&this.onSMPTE2038Metadata(_)},A}(O);const ze=xe;var it=new Uint8Array([0,0,0,0,0,0,0,0]),ht=function(){function c(){}return c.init=function(){for(var A in c.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],hvc1:[],hvcC:[],av01:[],av1C:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[],".mp3":[],Opus:[],dOps:[],"ac-3":[],dac3:[],"ec-3":[],dec3:[]},c.types)c.types.hasOwnProperty(A)&&(c.types[A]=[A.charCodeAt(0),A.charCodeAt(1),A.charCodeAt(2),A.charCodeAt(3)])},c.box=function(A){for(var o=[],r=1;r<arguments.length;r++)o[r-1]=arguments[r];for(var y=8,C=null,w=Array.prototype.slice.call(arguments,1),_=w.length,I=0;I<_;I++)y+=w[I].byteLength;(C=new Uint8Array(y))[0]=y>>>24&255,C[1]=y>>>16&255,C[2]=y>>>8&255,C[3]=255&y,C.set(A,4);var k=8;for(I=0;I<_;I++)C.set(w[I],k),k+=w[I].byteLength;return C},c.generateInitSegment=function(A){var o=c.box(c.types.ftyp,c.constants.FTYP),r=c.moov(A),y=new Uint8Array(o.byteLength+r.byteLength);return y.set(o,0),y.set(r,o.byteLength),y},c.moov=function(A){var o=c.mvhd(A.timescale,A.duration),r=c.trak(A),y=c.mvex(A);return c.box(c.types.moov,o,r,y)},c.mvhd=function(A,o){return c.box(c.types.mvhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,A>>>24&255,A>>>16&255,A>>>8&255,255&A,o>>>24&255,o>>>16&255,o>>>8&255,255&o,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]))},c.trak=function(A){return c.box(c.types.trak,c.tkhd(A),c.mdia(A))},c.tkhd=function(A){var o=A.id,r=A.duration,y=A.presentWidth,C=A.presentHeight;return c.box(c.types.tkhd,new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,o>>>24&255,o>>>16&255,o>>>8&255,255&o,0,0,0,0,r>>>24&255,r>>>16&255,r>>>8&255,255&r,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,y>>>8&255,255&y,0,0,C>>>8&255,255&C,0,0]))},c.mdia=function(A){return c.box(c.types.mdia,c.mdhd(A),c.hdlr(A),c.minf(A))},c.mdhd=function(A){var o=A.timescale,r=A.duration;return c.box(c.types.mdhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,o>>>24&255,o>>>16&255,o>>>8&255,255&o,r>>>24&255,r>>>16&255,r>>>8&255,255&r,85,196,0,0]))},c.hdlr=function(A){var o;return o=A.type==="audio"?c.constants.HDLR_AUDIO:c.constants.HDLR_VIDEO,c.box(c.types.hdlr,o)},c.minf=function(A){var o;return o=A.type==="audio"?c.box(c.types.smhd,c.constants.SMHD):c.box(c.types.vmhd,c.constants.VMHD),c.box(c.types.minf,o,c.dinf(),c.stbl(A))},c.dinf=function(){return c.box(c.types.dinf,c.box(c.types.dref,c.constants.DREF))},c.stbl=function(A){return c.box(c.types.stbl,c.stsd(A),c.box(c.types.stts,c.constants.STTS),c.box(c.types.stsc,c.constants.STSC),c.box(c.types.stsz,c.constants.STSZ),c.box(c.types.stco,c.constants.STCO))},c.stsd=function(A){return A.type==="audio"?A.codec==="mp3"?c.box(c.types.stsd,c.constants.STSD_PREFIX,c.mp3(A)):A.codec==="ac-3"?c.box(c.types.stsd,c.constants.STSD_PREFIX,c.ac3(A)):A.codec==="ec-3"?c.box(c.types.stsd,c.constants.STSD_PREFIX,c.ec3(A)):A.codec==="opus"?c.box(c.types.stsd,c.constants.STSD_PREFIX,c.Opus(A)):c.box(c.types.stsd,c.constants.STSD_PREFIX,c.mp4a(A)):A.type==="video"&&A.codec.startsWith("hvc1")?c.box(c.types.stsd,c.constants.STSD_PREFIX,c.hvc1(A)):A.type==="video"&&A.codec.startsWith("av01")?c.box(c.types.stsd,c.constants.STSD_PREFIX,c.av01(A)):c.box(c.types.stsd,c.constants.STSD_PREFIX,c.avc1(A))},c.mp3=function(A){var o=A.channelCount,r=A.audioSampleRate,y=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,o,0,16,0,0,0,0,r>>>8&255,255&r,0,0]);return c.box(c.types[".mp3"],y)},c.mp4a=function(A){var o=A.channelCount,r=A.audioSampleRate,y=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,o,0,16,0,0,0,0,r>>>8&255,255&r,0,0]);return c.box(c.types.mp4a,y,c.esds(A))},c.ac3=function(A){var o,r=A.channelCount,y=A.audioSampleRate,C=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,r,0,16,0,0,0,0,y>>>8&255,255&y,0,0]);return c.box(c.types["ac-3"],C,c.box(c.types.dac3,new Uint8Array((o=A.config)!==null&&o!==void 0?o:[])))},c.ec3=function(A){var o,r=A.channelCount,y=A.audioSampleRate,C=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,r,0,16,0,0,0,0,y>>>8&255,255&y,0,0]);return c.box(c.types["ec-3"],C,c.box(c.types.dec3,new Uint8Array((o=A.config)!==null&&o!==void 0?o:[])))},c.esds=function(A){var o,r=(o=A.config)!==null&&o!==void 0?o:[],y=r.length,C=new Uint8Array([0,0,0,0,3,23+y,0,1,0,4,15+y,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([y]).concat(r).concat([6,1,2]));return c.box(c.types.esds,C)},c.Opus=function(A){var o=A.channelCount,r=A.audioSampleRate,y=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,o,0,16,0,0,0,0,r>>>8&255,255&r,0,0]);return c.box(c.types.Opus,y,c.dOps(A))},c.dOps=function(A){var o=A.channelCount,r=A.channelConfigCode,y=A.audioSampleRate,C=[];switch(r){case 1:case 2:C=[0];break;case 0:C=[255,1,1,0,1];break;case 128:C=[255,2,0,0,1];break;case 3:C=[1,2,1,0,2,1];break;case 4:C=[1,2,2,0,1,2,3];break;case 5:C=[1,3,2,0,4,1,2,3];break;case 6:C=[1,4,2,0,4,1,2,3,5];break;case 7:C=[1,4,2,0,4,1,2,3,5,6];break;case 8:C=[1,5,3,0,6,1,2,3,4,5,7];break;case 130:C=[1,1,2,0,1];break;case 131:C=[1,1,3,0,1,2];break;case 132:C=[1,1,4,0,1,2,3];break;case 133:C=[1,1,5,0,1,2,3,4];break;case 134:C=[1,1,6,0,1,2,3,4,5];break;case 135:C=[1,1,7,0,1,2,3,4,5,6];break;case 136:C=[1,1,8,0,1,2,3,4,5,6,7]}var w=new Uint8Array(function(_,I,k){if(arguments.length===2)for(var $,D=0,N=I.length;D<N;D++)!$&&D in I||($||($=Array.prototype.slice.call(I,0,D)),$[D]=I[D]);return _.concat($||Array.prototype.slice.call(I))}([0,o,0,0,y>>>24&255,y>>>17&255,y>>>8&255,y>>>0&255,0,0],function(_,I){var k=typeof Symbol=="function"&&_[Symbol.iterator];if(!k)return _;var $,D,N=k.call(_),z=[];try{for(;(I===void 0||I-- >0)&&!($=N.next()).done;)z.push($.value)}catch(q){D={error:q}}finally{try{$&&!$.done&&(k=N.return)&&k.call(N)}finally{if(D)throw D.error}}return z}(C),!1));return c.box(c.types.dOps,w)},c.avc1=function(A){var o=A.avcc,r=A.codecWidth,y=A.codecHeight,C=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,r>>>8&255,255&r,y>>>8&255,255&y,0,72,0,0,0,72,0,0,0,0,0,0,0,1,10,120,113,113,47,102,108,118,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,255,255]);return c.box(c.types.avc1,C,c.box(c.types.avcC,o))},c.hvc1=function(A){var o=A.hvcc,r=A.codecWidth,y=A.codecHeight,C=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,r>>>8&255,255&r,y>>>8&255,255&y,0,72,0,0,0,72,0,0,0,0,0,0,0,1,10,120,113,113,47,102,108,118,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,255,255]);return c.box(c.types.hvc1,C,c.box(c.types.hvcC,o))},c.av01=function(A){var o,r,y=A.av1c,C=(o=A.codecWidth)!==null&&o!==void 0?o:192,w=(r=A.codecHeight)!==null&&r!==void 0?r:108,_=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,C>>>8&255,255&C,w>>>8&255,255&w,0,72,0,0,0,72,0,0,0,0,0,0,0,1,10,120,113,113,47,102,108,118,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,255,255]);return c.box(c.types.av01,_,c.box(c.types.av1C,y))},c.mvex=function(A){return c.box(c.types.mvex,c.trex(A))},c.trex=function(A){var o=A.id,r=new Uint8Array([0,0,0,0,o>>>24&255,o>>>16&255,o>>>8&255,255&o,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return c.box(c.types.trex,r)},c.moof=function(A,o){return c.box(c.types.moof,c.mfhd(A.sequenceNumber),c.traf(A,o))},c.mfhd=function(A){var o=new Uint8Array([0,0,0,0,A>>>24&255,A>>>16&255,A>>>8&255,255&A]);return c.box(c.types.mfhd,o)},c.traf=function(A,o){var r=A.id,y=c.box(c.types.tfhd,new Uint8Array([0,0,0,0,r>>>24&255,r>>>16&255,r>>>8&255,255&r])),C=c.box(c.types.tfdt,new Uint8Array([0,0,0,0,o>>>24&255,o>>>16&255,o>>>8&255,255&o])),w=c.sdtp(A),_=c.trun(A,w.byteLength+16+16+8+16+8+8);return c.box(c.types.traf,y,C,_,w)},c.sdtp=function(A){for(var o=A.samples||[],r=o.length,y=new Uint8Array(4+r),C=0;C<r;C++){var w=o[C].flags;y[C+4]=w.isLeading<<6|w.dependsOn<<4|w.isDependedOn<<2|w.hasRedundancy}return c.box(c.types.sdtp,y)},c.trun=function(A,o){var r=A.samples||[],y=r.length,C=12+16*y,w=new Uint8Array(C);o+=8+C,w.set([0,0,15,1,y>>>24&255,y>>>16&255,y>>>8&255,255&y,o>>>24&255,o>>>16&255,o>>>8&255,255&o],0);for(var _=0;_<y;_++){var I=r[_].duration,k=r[_].size,$=r[_].flags,D=r[_].cts;w.set([I>>>24&255,I>>>16&255,I>>>8&255,255&I,k>>>24&255,k>>>16&255,k>>>8&255,255&k,$.isLeading<<2|$.dependsOn,$.isDependedOn<<6|$.hasRedundancy<<4|$.isNonSync,0,0,D>>>24&255,D>>>16&255,D>>>8&255,255&D],12+16*_)}return c.box(c.types.trun,w)},c.mdat=function(A){return c.box(c.types.mdat,A)},c.constants={FTYP:new Uint8Array([105,115,111,109,0,0,0,1,105,115,111,109,97,118,99,49]),STSD_PREFIX:new Uint8Array([0,0,0,0,0,0,0,1]),STTS:it,STSC:it,STCO:it,STSZ:new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),HDLR_VIDEO: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]),HDLR_AUDIO: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]),DREF:new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),SMHD:new Uint8Array([0,0,0,0,0,0,0,0]),VMHD:new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])},c}();ht.init();const lt=ht,Rt=function(){function c(){}return c.getSilentFrame=function(A,o){if(A==="mp4a.40.2"){if(o===1)return new Uint8Array([0,200,0,128,35,128]);if(o===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(o===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(o===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(o===5)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(o===6)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(o===1)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(o===2)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(o===3)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},c}();var St=t(1951);const jt=function(){function c(A){var o;this.TAG="MP4Remuxer",this._fillSilentAfterSeek=!1,this._config=A,this._isLive=!!A.isLive,this._dtsBase=-1,this._dtsBaseInited=!1,this._audioDtsBase=1/0,this._videoDtsBase=1/0,this._audioNextDts=void 0,this._videoNextDts=void 0,this._audioStashedLastSample=null,this._videoStashedLastSample=null,this._audioMeta=null,this._videoMeta=null,this._audioSegmentInfoList=new St.Sc("audio"),this._videoSegmentInfoList=new St.Sc("video"),this._onInitSegment=null,this._onMediaSegment=null,this._forceFirstIDR=!(!s.A.chrome||!(s.A.version&&s.A.version.major<50||s.A.version&&s.A.version.major===50&&(((o=s.A.version)===null||o===void 0?void 0:o.build)||0)<2661)),this._fillSilentAfterSeek=!(!s.A.msedge&&!s.A.msie),this._mp3UseMpegAudio=!s.A.firefox,this._fillAudioTimestampGap=this._config.fixAudioTimestampGap}return c.prototype.destroy=function(){this._dtsBase=-1,this._dtsBaseInited=!1,this._audioMeta=null,this._videoMeta=null,this._audioSegmentInfoList.clear(),this._audioSegmentInfoList=null,this._videoSegmentInfoList.clear(),this._videoSegmentInfoList=null,this._onInitSegment=null,this._onMediaSegment=null},c.prototype.bindDataSource=function(A){var o;return A.onDataAvailable=(o=this.remux)===null||o===void 0?void 0:o.bind(this),A.onTrackMetadata=this._onTrackMetadataReceived.bind(this),this},Object.defineProperty(c.prototype,"onInitSegment",{get:function(){return this._onInitSegment},set:function(A){this._onInitSegment=A},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"onMediaSegment",{get:function(){return this._onMediaSegment},set:function(A){this._onMediaSegment=A},enumerable:!1,configurable:!0}),c.prototype.insertDiscontinuity=function(){this._audioNextDts=this._videoNextDts=void 0},c.prototype.seek=function(A){this._audioStashedLastSample=null,this._videoStashedLastSample=null,this._videoSegmentInfoList.clear(),this._audioSegmentInfoList.clear()},c.prototype.remux=function(A,o){if(!this._onMediaSegment)throw new B.j4("MP4Remuxer: onMediaSegment callback must be specificed!");this._dtsBaseInited||this._calculateDtsBase(A,o),o&&this._remuxVideo(o),A&&this._remuxAudio(A)},c.prototype._onTrackMetadataReceived=function(A,o){var r=null,y="mp4",C=o.codec;if(A==="audio")this._audioMeta=o,o.codec==="mp3"&&this._mp3UseMpegAudio?(y="mpeg",C="",r=new Uint8Array):r=lt.generateInitSegment(o);else{if(A!=="video")return;this._videoMeta=o,r=lt.generateInitSegment(o)}if(!this._onInitSegment)throw new B.j4("MP4Remuxer: onInitSegment callback must be specified!");this._onInitSegment(A,{type:A,data:r.buffer,codec:C,container:"".concat(A,"/").concat(y),mediaDuration:o.duration})},c.prototype._calculateDtsBase=function(A,o){var r,y;this._dtsBaseInited||(!((r=A==null?void 0:A.samples)===null||r===void 0)&&r.length&&(this._audioDtsBase=A.samples[0].dts),!((y=o==null?void 0:o.samples)===null||y===void 0)&&y.length&&(this._videoDtsBase=o.samples[0].dts),this._dtsBase=Math.min(this._audioDtsBase,this._videoDtsBase),this._dtsBaseInited=!0)},c.prototype.getTimestampBase=function(){if(this._dtsBaseInited)return this._dtsBase},c.prototype.flushStashedSamples=function(){var A=this._videoStashedLastSample,o=this._audioStashedLastSample,r={type:"video",id:1,sequenceNumber:0,samples:[],length:0};A!=null&&(r.samples.push(A),r.length=A==null?void 0:A.length);var y={type:"audio",id:2,sequenceNumber:0,samples:[],length:0};o!=null&&(y.samples.push(o),y.length=o==null?void 0:o.length),this._videoStashedLastSample=null,this._audioStashedLastSample=null,this._remuxVideo(r,!0),this._remuxAudio(y,!0)},c.prototype._remuxAudio=function(A,o){var r,y,C,w,_,I,k;if(this._audioMeta!=null){var $,D,N=A,z=N.samples,q=-1,R=this._audioMeta.refSampleDuration,Y=this._audioMeta.codec==="mp3"&&this._mp3UseMpegAudio,se=this._dtsBaseInited&&this._audioNextDts===void 0,re=!1;if(z&&z.length!==0&&(z.length!==1||o)){var de=0,oe=null,_e=0;Y?(de=0,_e=N.length):(de=8,_e=8+N.length);var ve=null;if(z.length>1&&(_e-=(ve=z.pop()).length),this._audioStashedLastSample!=null){var Ae=this._audioStashedLastSample;this._audioStashedLastSample=null,z.unshift(Ae),_e+=Ae.length}ve!=null&&(this._audioStashedLastSample=ve);var Le=z[0].dts-this._dtsBase;if(this._audioNextDts)$=Le-this._audioNextDts;else if(this._audioSegmentInfoList.isEmpty())$=0,this._fillSilentAfterSeek&&!this._videoSegmentInfoList.isEmpty()&&this._audioMeta.originalCodec!=="mp3"&&(re=!0);else{var we=this._audioSegmentInfoList.getLastSampleBefore(Le);if(we!=null){var be=Le-(we.originalDts+we.duration);be<=3&&(be=0),$=Le-(we.dts+we.duration+be)}else $=0}if(re){var He=Le-$,At=this._videoSegmentInfoList.getLastSegmentBefore(Le);if(At!=null&&At.beginDts<He){if(qe=Rt.getSilentFrame((r=this._audioMeta)===null||r===void 0?void 0:r.originalCodec,(y=this._audioMeta)===null||y===void 0?void 0:y.channelCount)){var ke=At.beginDts,pt=He-At.beginDts;n.A.v(this.TAG,"InsertPrefixSilentAudio: dts: ".concat(ke,", duration: ").concat(pt)),z.unshift({unit:qe,dts:ke,pts:ke}),_e+=qe.byteLength}}else re=!1}for(var Ne=[],Qe=0;Qe<z.length;Qe++){var Ve=(Ae=z[Qe]).unit,je=Ae.dts-this._dtsBase,$t=(ke=je,!1),Jt=null,et=0;if(!(je<-.001)){if(this._audioMeta.codec!=="mp3"){var ot=je;if(this._audioNextDts&&(ot=this._audioNextDts),($=je-ot)<=-3*(R||0)){n.A.w(this.TAG,"Dropping 1 audio frame (originalDts: ".concat(je," ms ,curRefDts: ").concat(ot," ms) due to dtsCorrection: ").concat($," ms overlap."));continue}if($>=3*(R||0)&&this._fillAudioTimestampGap&&!s.A.safari){$t=!0;var qe,Ze=Math.floor($/(R||0));n.A.w(this.TAG,`Large audio timestamp gap detected, may cause AV sync to drift. Silent frames will be generated to avoid unsync.
  152. `+"originalDts: ".concat(je," ms, curRefDts: ").concat(ot," ms, ")+"dtsCorrection: ".concat(Math.round($)," ms, generate: ").concat(Ze," frames")),ke=Math.floor(ot),et=Math.floor(ot+(R||0))-ke,(qe=Rt.getSilentFrame((C=this._audioMeta)===null||C===void 0?void 0:C.originalCodec,this._audioMeta.channelCount))==null&&(n.A.w(this.TAG,"Unable to generate silent frame for "+"".concat((w=this._audioMeta)===null||w===void 0?void 0:w.originalCodec," with ").concat(this._audioMeta.channelCount," channels, repeat last frame")),qe=Ve),Jt=[];for(var Gt=0;Gt<Ze;Gt++){ot+=R||0;var hi=Math.floor(ot),Wi=Math.floor(ot+(R||0))-hi,qi={dts:hi,pts:hi,cts:0,unit:qe,size:qe.byteLength,duration:Wi,originalDts:je,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}};Jt.push(qi),_e+=qi.size}this._audioNextDts=ot+(R||0)}else ke=Math.floor(ot),et=Math.floor(ot+(R||0))-ke,this._audioNextDts=ot+(R||0)}else ke=je-$,et=Qe!==z.length-1?z[Qe+1].dts-this._dtsBase-$-ke:ve!=null?ve.dts-this._dtsBase-$-ke:Ne.length>=1?(_=Ne[Ne.length-1])===null||_===void 0?void 0:_.duration:Math.floor(R||0),this._audioNextDts=ke+et;q===-1&&(q=ke),Ne.push({dts:ke,pts:ke,cts:0,unit:Ae.unit,size:(I=Ae.unit)===null||I===void 0?void 0:I.byteLength,duration:et,originalDts:je,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}}),$t&&Ne.push.apply(Ne,Jt)}}if(Ne.length===0)return N.samples=[],void(N.length=0);for(Y?oe=new Uint8Array(_e):((oe=new Uint8Array(_e))[0]=_e>>>24&255,oe[1]=_e>>>16&255,oe[2]=_e>>>8&255,oe[3]=255&_e,oe.set(lt.types.mdat,4)),Qe=0;Qe<Ne.length;Qe++)Ve=Ne[Qe].unit,oe.set(Ve,de),de+=Ve.byteLength||0;var ii=Ne[Ne.length-1];D=ii.dts+ii.duration;var pi,Qt=new St.EZ;Qt.beginDts=q,Qt.endDts=D,Qt.beginPts=q,Qt.endPts=D,Qt.originalBeginDts=Ne[0].originalDts,Qt.originalEndDts=ii.originalDts+ii.duration,Qt.firstSample=new St.$_(Ne[0].dts,Ne[0].pts,Ne[0].duration,Ne[0].originalDts,!1),Qt.lastSample=new St.$_(ii.dts,ii.pts,ii.duration,ii.originalDts,!1),this._isLive||this._audioSegmentInfoList.append(Qt),N.samples=Ne,N.sequenceNumber++,pi=Y?new Uint8Array:lt.moof(N,q),N.samples=[],N.length=0;var Ti={type:"audio",data:this._mergeBoxes(pi,oe).buffer,sampleCount:Ne.length,info:Qt};Y&&se&&Ti&&(Ti.timestampOffset=q),(k=this._onMediaSegment)===null||k===void 0||k.call(this,"audio",Ti)}}},c.prototype._remuxVideo=function(A,o){var r,y;if(this._videoMeta!=null){var C,w,_,I=A,k=I.samples,$=-1,D=-1;if(k&&k.length!==0&&(k.length!==1||o)){var N=8,z=null,q=8+A.length,R=null;if(k.length>1&&(q-=(R=k.pop()).length),this._videoStashedLastSample!=null){var Y=this._videoStashedLastSample;this._videoStashedLastSample=null,k.unshift(Y),q+=(Y==null?void 0:Y.length)||0}R!=null&&(this._videoStashedLastSample=R);var se=k[0].dts-this._dtsBase;if(this._videoNextDts)C=se-this._videoNextDts;else if(this._videoSegmentInfoList.isEmpty())C=0;else{var re=this._videoSegmentInfoList.getLastSampleBefore(se);if(re!=null){var de=se-(re.originalDts+re.duration);de<=3&&(de=0),C=se-(re.dts+re.duration+de)}else C=0}for(var oe=new St.EZ,_e=[],ve=0;ve<k.length;ve++){var Ae,Le=(Y=k[ve]).dts-this._dtsBase,we=Y.isKeyframe,be=Le-C,He=Y.cts,At=be+He;if($===-1&&($=be,D=At),Ae=ve!==k.length-1?k[ve+1].dts-this._dtsBase-C-be:R!=null?R.dts-this._dtsBase-C-be:_e.length>=1?_e[_e.length-1].duration:Math.floor(((r=this._videoMeta)===null||r===void 0?void 0:r.refSampleDuration)||0),we){var ke=new St.$_(be,At,Ae,Y.dts,!0);ke.fileposition=Y.fileposition,oe.appendSyncPoint(ke)}_e.push({dts:be,pts:At,cts:He,units:Y.units,size:Y.length,isKeyframe:we,duration:Ae,originalDts:Le,flags:{isLeading:0,dependsOn:we?2:1,isDependedOn:we?1:0,hasRedundancy:0,isNonSync:we?0:1}})}for((z=new Uint8Array(q))[0]=q>>>24&255,z[1]=q>>>16&255,z[2]=q>>>8&255,z[3]=255&q,z.set(lt.types.mdat,4),ve=0;ve<_e.length;ve++)for(var pt=_e[ve].units;pt!=null&&pt.length;){var Ne=pt.shift(),Qe=Ne==null?void 0:Ne.data;z.set(Qe,N),N+=Qe.byteLength}var Ve=_e[_e.length-1];if(w=Ve.dts+Ve.duration,_=Ve.pts+Ve.duration,this._videoNextDts=w,oe.beginDts=$,oe.endDts=w,oe.beginPts=D,oe.endPts=_,oe.originalBeginDts=_e[0].originalDts,oe.originalEndDts=Ve.originalDts+Ve.duration,oe.firstSample=new St.$_(_e[0].dts,_e[0].pts,_e[0].duration,_e[0].originalDts,!!_e[0].isKeyframe),oe.lastSample=new St.$_(Ve.dts,Ve.pts,Ve.duration,Ve.originalDts,!!Ve.isKeyframe),this._isLive||this._videoSegmentInfoList.append(oe),I.samples=_e,I.sequenceNumber++,this._forceFirstIDR){var je=_e[0].flags;je.dependsOn=2,je.isNonSync=0}var $t=lt.moof(I,$);I.samples=[],I.length=0,(y=this._onMediaSegment)===null||y===void 0||y.call(this,"video",{type:"video",data:this._mergeBoxes($t,z).buffer,sampleCount:_e.length,info:oe})}}},c.prototype._mergeBoxes=function(A,o){var r=new Uint8Array(A.byteLength+o.byteLength);return r.set(A,0),r.set(o,A.byteLength),r},c}();var Zt=t(8098),Lt=t(550);const di=function(){function c(A,o){var r;this.TAG="TransmuxingController",this._emitter=new a.A,this._config=o,A.segments||(A.segments=[{duration:A.duration,filesize:A.filesize,url:A.url}]),typeof A.cors!="boolean"&&(A.cors=!0),typeof A.withCredentials!="boolean"&&(A.withCredentials=!1),this._mediaDataSource=A,this._currentSegmentIndex=0;var y=0;(r=this._mediaDataSource.segments)===null||r===void 0||r.forEach(function(C){C.timestampBase=y,y+=C.duration,C.cors=A.cors,C.withCredentials=A.withCredentials,o.referrerPolicy&&(C.referrerPolicy=o.referrerPolicy)}),isNaN(y)||this._mediaDataSource.duration===y||(this._mediaDataSource.duration=y),this._mediaInfo=null,this._demuxer=null,this._remuxer=null,this._ioctl=null,this._pendingSeekTime=null,this._pendingResolveSeekPoint=null,this._statisticsReporter=null}return c.prototype.destroy=function(){var A,o,r;this._mediaInfo=null,this._mediaDataSource=null,this._statisticsReporter&&this._disableStatisticsReporter(),this._ioctl&&((A=this._ioctl)===null||A===void 0||A.destroy(),this._ioctl=null),this._demuxer&&((o=this._demuxer)===null||o===void 0||o.destroy(),this._demuxer=null),this._remuxer&&((r=this._remuxer)===null||r===void 0||r.destroy(),this._remuxer=null),this._emitter.removeAllListeners(),this._emitter=null},c.prototype.on=function(A,o){this._emitter.addListener(A,o)},c.prototype.off=function(A,o){this._emitter.removeListener(A,o)},c.prototype.start=function(){this._loadSegment(0),this._enableStatisticsReporter()},c.prototype._loadSegment=function(A,o){var r,y,C;if(this._currentSegmentIndex=A,(r=this._mediaDataSource)===null||r===void 0?void 0:r.segments){var w=(y=this._mediaDataSource)===null||y===void 0?void 0:y.segments[A],_=this._ioctl=new Zt.A(w,this._config,A);_.onError=this._onIOException.bind(this),_.onSeeked=this._onIOSeeked.bind(this),_.onComplete=this._onIOComplete.bind(this),_.onRedirect=this._onIORedirect.bind(this),_.onRecoveredEarlyEof=this._onIORecoveredEarlyEof.bind(this),o?(C=this._demuxer)===null||C===void 0||C.bindDataSource(this._ioctl):_.onDataArrival=this._onInitChunkArrival.bind(this),_.open(o)}},c.prototype.stop=function(){this._internalAbort(),this._disableStatisticsReporter()},c.prototype._internalAbort=function(){this._ioctl&&(this._ioctl.destroy(),this._ioctl=null)},c.prototype.pause=function(){var A;!((A=this._ioctl)===null||A===void 0)&&A.isWorking()&&(this._ioctl.pause(),this._disableStatisticsReporter())},c.prototype.resume=function(){var A;!((A=this._ioctl)===null||A===void 0)&&A.isPaused()&&(this._ioctl.resume(),this._enableStatisticsReporter())},c.prototype.seek=function(A){var o,r,y,C,w,_,I,k,$,D,N,z,q,R;if(this._mediaInfo!=null&&(!((o=this._mediaInfo)===null||o===void 0)&&o.isSeekable())){var Y=this._searchSegmentIndexContains(A);if(Y===this._currentSegmentIndex){var se=!((r=this._mediaInfo)===null||r===void 0)&&r.segments?(y=this._mediaInfo)===null||y===void 0?void 0:y.segments[Y]:{};if(se===void 0)this._pendingSeekTime=A;else{var re=se==null?void 0:se.getNearestKeyframe(A);(C=this._remuxer)===null||C===void 0||C.seek(re==null?void 0:re.milliseconds),(w=this._ioctl)===null||w===void 0||w.seek(re==null?void 0:re.fileposition),this._pendingResolveSeekPoint=re==null?void 0:re.milliseconds}}else{var de=!((_=this._mediaInfo)===null||_===void 0)&&_.segments?(I=this._mediaInfo)===null||I===void 0?void 0:I.segments[Y]:{};de===void 0?(this._pendingSeekTime=A,this._internalAbort(),(k=this._remuxer)===null||k===void 0||k.seek(),($=this._remuxer)===null||$===void 0||$.insertDiscontinuity(),this._loadSegment(Y)):(re=de.getNearestKeyframe(A),this._internalAbort(),(D=this._remuxer)===null||D===void 0||D.seek(A),(N=this._remuxer)===null||N===void 0||N.insertDiscontinuity(),this._demuxer&&((z=this._demuxer)===null||z===void 0||z.resetMediaInfo(),this._demuxer.timestampBase=!((q=this._mediaDataSource)===null||q===void 0)&&q.segments?(R=this._mediaDataSource)===null||R===void 0?void 0:R.segments[Y].timestampBase:0),this._loadSegment(Y,re==null?void 0:re.fileposition),this._pendingResolveSeekPoint=re==null?void 0:re.milliseconds,this._reportSegmentMediaInfo(Y))}this._enableStatisticsReporter()}},c.prototype._searchSegmentIndexContains=function(A){var o,r=this._mediaDataSource.segments,y=((r==null?void 0:r.length)||0)-1;if(((r==null?void 0:r.length)||0)===0)return y;for(var C=0;C<((r==null?void 0:r.length)||0);C++)if(r&&A<(((o=r[C])===null||o===void 0?void 0:o.timestampBase)||0)){y=C-1;break}return y},c.prototype._onInitChunkArrival=function(A,o){var r,y,C,w,_,I=this,k=0;if(o>0)(r=this._demuxer)===null||r===void 0||r.bindDataSource(this._ioctl),this._demuxer.timestampBase=this._mediaDataSource.segments?(y=this._mediaDataSource.segments[this._currentSegmentIndex])===null||y===void 0?void 0:y.timestampBase:0,k=((C=this._demuxer)===null||C===void 0?void 0:C.parseChunks(A,o))||0;else{var $=null;($=f.probe(A)).match&&(this._setupFLVDemuxerRemuxer($),k=((w=this._demuxer)===null||w===void 0?void 0:w.parseChunks(A,o))||0),$.match||$!=null&&$.needMoreData||($=ze.probe(A)).match&&(this._setupTSDemuxerRemuxer($),k=((_=this._demuxer)===null||_===void 0?void 0:_.parseChunks(A,o))||0),$.match||$!=null&&$.needMoreData||($=null,n.A.e(this.TAG,"Non MPEG-TS/FLV, Unsupported media type!"),Promise.resolve().then(function(){I._internalAbort()}),this._emitter.emit(Lt.A.DEMUX_ERROR,G.A.FORMAT_UNSUPPORTED,"Non MPEG-TS/FLV, Unsupported media type!"))}return k},c.prototype._setupFLVDemuxerRemuxer=function(A){var o;this._demuxer=new f(A,this._config),this._remuxer||(this._remuxer=new jt(this._config));var r=this._mediaDataSource;r.duration===void 0||isNaN(r.duration)||(this._demuxer.overridedDuration=r.duration),typeof r.hasAudio=="boolean"&&(this._demuxer.overridedHasAudio=r.hasAudio),typeof r.hasVideo=="boolean"&&(this._demuxer.overridedHasVideo=r.hasVideo),r.segments&&this._demuxer&&this._remuxer&&(this._demuxer.timestampBase=(o=r==null?void 0:r.segments[this._currentSegmentIndex])===null||o===void 0?void 0:o.timestampBase,this._demuxer.onError=this._onDemuxException.bind(this),this._demuxer.onMediaInfo=this._onMediaInfo.bind(this),this._demuxer.onMetaDataArrived=this._onMetaDataArrived.bind(this),this._demuxer.onScriptDataArrived=this._onScriptDataArrived.bind(this),this._remuxer.bindDataSource(this._demuxer.bindDataSource(this._ioctl)),this._remuxer.onInitSegment=this._onRemuxerInitSegmentArrival.bind(this),this._remuxer.onMediaSegment=this._onRemuxerMediaSegmentArrival.bind(this))},c.prototype._setupTSDemuxerRemuxer=function(A){var o=this._demuxer=new ze(A,this._config);this._remuxer||(this._remuxer=new jt(this._config)),o.onError=this._onDemuxException.bind(this),o.onMediaInfo=this._onMediaInfo.bind(this),o.onMetaDataArrived=this._onMetaDataArrived.bind(this),o.onTimedID3Metadata=this._onTimedID3Metadata.bind(this),o.onSMPTE2038Metadata=this._onSMPTE2038Metadata.bind(this),o.onSCTE35Metadata=this._onSCTE35Metadata.bind(this),o.onPESPrivateDataDescriptor=this._onPESPrivateDataDescriptor.bind(this),o.onPESPrivateData=this._onPESPrivateData.bind(this),this._remuxer.bindDataSource(this._demuxer),this._demuxer.bindDataSource(this._ioctl),this._remuxer.onInitSegment=this._onRemuxerInitSegmentArrival.bind(this),this._remuxer.onMediaSegment=this._onRemuxerMediaSegmentArrival.bind(this)},c.prototype._onMediaInfo=function(A){var o,r,y=this;this._mediaInfo==null&&(this._mediaInfo=Object.assign({},A),this._mediaInfo.keyframesIndex=null,this._mediaInfo.segments=[],this._mediaInfo.segmentCount=((r=(o=this._mediaDataSource)===null||o===void 0?void 0:o.segments)===null||r===void 0?void 0:r.length)||0,Object.setPrototypeOf(this._mediaInfo,h.A.prototype));var C=Object.assign({},A);Object.setPrototypeOf(C,h.A.prototype),this._mediaInfo.segments&&(this._mediaInfo.segments[this._currentSegmentIndex]=C),this._reportSegmentMediaInfo(this._currentSegmentIndex),this._pendingSeekTime!=null&&Promise.resolve().then(function(){var w=y._pendingSeekTime;y._pendingSeekTime=null,y.seek(w)})},c.prototype._onMetaDataArrived=function(A){this._emitter.emit(Lt.A.METADATA_ARRIVED,A)},c.prototype._onScriptDataArrived=function(A){this._emitter.emit(Lt.A.SCRIPTDATA_ARRIVED,A)},c.prototype._onTimedID3Metadata=function(A){var o,r=(o=this._remuxer)===null||o===void 0?void 0:o.getTimestampBase();r!==void 0&&(A.pts!==void 0&&(A.pts-=r),A.dts!==void 0&&(A.dts-=r),this._emitter.emit(Lt.A.TIMED_ID3_METADATA_ARRIVED,A))},c.prototype._onSMPTE2038Metadata=function(A){var o,r=(o=this._remuxer)===null||o===void 0?void 0:o.getTimestampBase();r!==void 0&&(A.pts!==void 0&&(A.pts-=r),A.dts!==void 0&&(A.dts-=r),A.nearest_pts!==void 0&&(A.nearest_pts-=r),this._emitter.emit(Lt.A.SMPTE2038_METADATA_ARRIVED,A))},c.prototype._onSCTE35Metadata=function(A){var o,r=(o=this._remuxer)===null||o===void 0?void 0:o.getTimestampBase();r!==void 0&&(A.pts!==void 0&&(A.pts-=r),A.nearest_pts!==void 0&&(A.nearest_pts-=r),this._emitter.emit(Lt.A.SCTE35_METADATA_ARRIVED,A))},c.prototype._onPESPrivateDataDescriptor=function(A){this._emitter.emit(Lt.A.PES_PRIVATE_DATA_DESCRIPTOR,A)},c.prototype._onPESPrivateData=function(A){var o,r=(o=this._remuxer)===null||o===void 0?void 0:o.getTimestampBase();r!==void 0&&(A.pts!==void 0&&(A.pts-=r),A.nearest_pts!==void 0&&(A.nearest_pts-=r),A.dts!==void 0&&(A.dts-=r),this._emitter.emit(Lt.A.PES_PRIVATE_DATA_ARRIVED,A))},c.prototype._onIOSeeked=function(){var A;(A=this._remuxer)===null||A===void 0||A.insertDiscontinuity()},c.prototype._onIOComplete=function(A){var o,r,y=A+1;y<(((r=(o=this._mediaDataSource)===null||o===void 0?void 0:o.segments)===null||r===void 0?void 0:r.length)||0)?(this._internalAbort(),this._remuxer&&this._remuxer.flushStashedSamples(),this._loadSegment(y)):(this._remuxer&&this._remuxer.flushStashedSamples(),this._emitter.emit(Lt.A.LOADING_COMPLETE),this._disableStatisticsReporter())},c.prototype._onIORedirect=function(A){var o,r=(o=this._ioctl)===null||o===void 0?void 0:o.extraData;this._mediaDataSource.segments&&(this._mediaDataSource.segments[r].redirectedURL=A)},c.prototype._onIORecoveredEarlyEof=function(){this._emitter.emit(Lt.A.RECOVERED_EARLY_EOF)},c.prototype._onIOException=function(A,o){n.A.e(this.TAG,"IOException: type = ".concat(A,", code = ").concat(o.code,", msg = ").concat(o.msg)),this._emitter.emit(Lt.A.IO_ERROR,A,o),this._disableStatisticsReporter()},c.prototype._onDemuxException=function(A,o){n.A.e(this.TAG,"DemuxException: type = ".concat(A,", info = ").concat(o)),this._emitter.emit(Lt.A.DEMUX_ERROR,A,o)},c.prototype._onRemuxerInitSegmentArrival=function(A,o){this._emitter.emit(Lt.A.INIT_SEGMENT,A,o)},c.prototype._onRemuxerMediaSegmentArrival=function(A,o){if(this._pendingSeekTime==null&&(this._emitter.emit(Lt.A.MEDIA_SEGMENT,A,o),this._pendingResolveSeekPoint!=null&&A==="video")){var r=o.info.syncPoints,y=this._pendingResolveSeekPoint;this._pendingResolveSeekPoint=null,s.A.safari&&r.length>0&&r[0].originalDts===y&&(y=r[0].pts),this._emitter.emit(Lt.A.RECOMMEND_SEEKPOINT,y)}},c.prototype._enableStatisticsReporter=function(){this._statisticsReporter==null&&this._reportStatisticsInfo&&(this._statisticsReporter=self.setInterval(this._reportStatisticsInfo.bind(this),this._config.statisticsInfoReportInterval))},c.prototype._disableStatisticsReporter=function(){this._statisticsReporter&&(self.clearInterval(this._statisticsReporter),this._statisticsReporter=null)},c.prototype._reportSegmentMediaInfo=function(A){var o,r,y,C,w=!((o=this._mediaInfo)===null||o===void 0)&&o.segments?(r=this._mediaInfo)===null||r===void 0?void 0:r.segments[A]:{},_=Object.assign({},w);_.duration=(y=this._mediaInfo)===null||y===void 0?void 0:y.duration,_.segmentCount=(C=this._mediaInfo)===null||C===void 0?void 0:C.segmentCount,delete _.segments,delete _.keyframesIndex,this._emitter.emit(Lt.A.MEDIA_INFO,_)},c.prototype._reportStatisticsInfo=function(){var A,o,r,y,C,w,_={};_.url=(A=this._ioctl)===null||A===void 0?void 0:A.currentURL,_.hasRedirect=(o=this._ioctl)===null||o===void 0?void 0:o.hasRedirect,_.hasRedirect&&(_.redirectedURL=(r=this._ioctl)===null||r===void 0?void 0:r.currentRedirectedURL),_.speed=(y=this._ioctl)===null||y===void 0?void 0:y.currentSpeed,_.loaderType=(C=this._ioctl)===null||C===void 0?void 0:C.loaderType,_.currentSegmentIndex=this._currentSegmentIndex,_.totalSegmentCount=(w=this._mediaDataSource.segments)===null||w===void 0?void 0:w.length,this._emitter.emit(Lt.A.STATISTICS_INFO,_)},c}()},9987:(l,p,t)=>{var a=t(4417).charAt;l.exports=function(n,s,h){return s+(h?a(n,s).length:1)}}},d={};function b(l){var p=d[l];if(p!==void 0)return p.exports;var t=d[l]={exports:{}};return i[l].call(t.exports,t,t.exports,b),t.exports}return b.m=i,b.d=(l,p)=>{for(var t in p)b.o(p,t)&&!b.o(l,t)&&Object.defineProperty(l,t,{enumerable:!0,get:p[t]})},b.o=(l,p)=>Object.prototype.hasOwnProperty.call(l,p),b(1900)})())}(ro)),ro.exports);class oo extends qr{constructor(e){var i,d;super(e),this._videoMuted=!0,this.player=e;const b=document.createElement("video"),l=document.createElement("canvas");this.$posterElement=document.createElement("img"),b.oncontextmenu=t=>{t.preventDefault()},b.crossOrigin="anonymous",this._videoMuted=!window.___enableSoundOnUserInteraction___&&this.player._opt.autoPlay||this.player._opt.muted||!this.player._opt.hasAudio,b.muted=this._videoMuted,b.style.position="absolute",b.style.top="0px",b.style.left="0px",this._delayPlay=!1,e.$container.appendChild(b),this.videoInfo={width:"",height:"",encType:""},this.$videoElement=b,this.$canvasElement=l,this.canvasContext=l.getContext("2d"),this.fixChromeVideoFlashBug(),this.resize();const{proxy:p}=this.player.events;p(this.$videoElement,"loadstart",()=>{this.player.emit("loadstart")}),p(this.$videoElement,"loadeddata",()=>{this.player.debug.log("Video",`loadeddata ${this._delayPlay}`),this.player.emit(te.streamSuccess)}),p(this.$videoElement,"canplay",()=>{this.player.debug.log("Video",`canplay and _delayPlay is ${this._delayPlay}`),this._delayPlay&&this._play(),this.player.$container.contains(this.$posterElement)&&this.$posterElement&&this.player.$container.removeChild(this.$posterElement)}),p(this.$videoElement,"waiting",()=>{this.player.emit(te.videoWaiting)}),p(this.$videoElement,"timeupdate",()=>{this.player.emit(te.timeUpdate,this.currentTime),!this.isPlaying()&&this.init&&(this.player.debug.log("Video","timeupdate and this.isPlaying is false and retry play"),this.$videoElement.play())}),(d=(i=this.player.debug)===null||i===void 0?void 0:i.log)===null||d===void 0||d.call(i,"Video","init"),this._enableSoundOnUserInteraction=this._enableSoundOnUserInteraction.bind(this),window.addEventListener("mouseup",this._enableSoundOnUserInteraction),window.addEventListener("click",this._enableSoundOnUserInteraction),window.addEventListener("touchstart",this._enableSoundOnUserInteraction),window.addEventListener("keydown",this._enableSoundOnUserInteraction)}destroy(){var e;this.$canvasElement=null,this.canvasContext=null,this.$videoElement&&(this.$videoElement.pause(),this.$videoElement.currentTime=0,this.$videoElement.src="",this.$videoElement.removeAttribute("src")),this.trackGenerator&&(this.trackGenerator.stop(),this.trackGenerator=null),this.vwriter&&(this.vwriter.close(),this.vwriter=null),!((e=this.player.$container)===null||e===void 0)&&e.contains(this.$posterElement)&&this.$posterElement&&this.player.$container.removeChild(this.$posterElement),super.destroy(),this.player.debug.log("Video","destroy")}fixChromeVideoFlashBug(){const e=function(){const d=navigator.userAgent.toLowerCase(),b={},l={IE:window.ActiveXObject||"ActiveXObject"in window,Chrome:d.indexOf("chrome")>-1&&d.indexOf("safari")>-1,Firefox:d.indexOf("firefox")>-1,Opera:d.indexOf("opera")>-1,Safari:d.indexOf("safari")>-1&&d.indexOf("chrome")===-1,Edge:d.indexOf("edge")>-1,QQBrowser:/qqbrowser/.test(d),WeixinBrowser:/MicroMessenger/i.test(d)};for(let p in l)if(l[p]){let t="";if(p==="IE")t=d.match(/(msie\s|trident.*rv:)([\w.]+)/)[2];else if(p==="Chrome"){for(const a in navigator.mimeTypes)navigator.mimeTypes[a].type==="application/360softmgrplugin"&&(p="360");t=d.match(/chrome\/([\d.]+)/)[1]}else p==="Firefox"?t=d.match(/firefox\/([\d.]+)/)[1]:p==="Opera"?t=d.match(/opera\/([\d.]+)/)[1]:p==="Safari"?t=d.match(/version\/([\d.]+)/)[1]:p==="Edge"?t=d.match(/edge\/([\d.]+)/)[1]:p==="QQBrowser"&&(t=d.match(/qqbrowser\/([\d.]+)/)[1]);b.type=p,b.version=parseInt(t)}return b}(),i=e.type.toLowerCase();(i==="chrome"||i==="edge")&&(this.player.$container.style.backdropFilter="blur(0px)")}play(){if(this.$videoElement){const e=this._getVideoReadyState();if(this.player.debug.log("Video",`play and readyState: ${e}`),e===0)return this.player.debug.warn("Video","readyState is 0 and set _delayPlay to true"),void(this._delayPlay=!0);this._play()}}_getVideoReadyState(){let e=0;return this.$videoElement&&(e=this.$videoElement.readyState),e}_play(){if(this.$videoElement){const e=setTimeout(()=>{this.$videoElement.play().then(()=>{this._delayPlay=!1,this.player.debug.log("Video","_play success"),setTimeout(()=>{this.isPlaying()||(this.player.debug.warn("Video","play failed and retry play"),this._play())},100)}).catch(i=>{this.player.debug.error("Video","_play error",i)}).finally(()=>{clearTimeout(e)})},20)}}pause(e){this._poster(),this.$videoElement.paused||(e?this.$videoElement&&this.$videoElement.pause():setTimeout(()=>{this.$videoElement&&this.$videoElement.pause()},100))}clearView(){}screenshot(e,i,d,b){var l;e=e||Wt()+"",b=b||oi.download,i=i||"png";const p={png:"image/png",jpeg:"image/jpeg",webp:"image/webp"};typeof d!="number"&&(d=Number(d||.92));const t=this.$videoElement,a=this.$canvasElement;a.width=t.videoWidth,a.height=t.videoHeight,(l=this.canvasContext)===null||l===void 0||l.drawImage(t,0,0,a.width,a.height);const n=a.toDataURL(p[i]||p.png,d);if(setTimeout(()=>{var s;(s=this.canvasContext)===null||s===void 0||s.clearRect(0,0,a.width,a.height),a.width=0,a.height=0},2e3),n!=="data:,"){if(b===oi.base64)return n;{const s=Qr(n,e+"."+i);return b===oi.blob?s:b===oi.download?(Un(s,e),s):void 0}}}initCanvasViewSize(){this.resize()}_poster(){const e=this.screenshot("poster","png",.75,oi.base64);e===void 0||e.length<10||(this.$posterElement.src=e,this.$posterElement.style.position="absolute",this.$posterElement.style.top="0px",this.$posterElement.style.left="0px",this.$posterElement.style.zIndex="1",this.$posterElement.style.objectFit="contain",this.$posterElement.style.pointerEvents="none",this.player.$container.appendChild(this.$posterElement),this.resize())}render(e){this.vwriter&&this.vwriter.write(e.videoFrame)}resize(){this._resizeElement(this.$videoElement),this._resizeElement(this.$posterElement)}_resizeElement(e){const i=this.player._opt;let d=this.player.width,b=this.player.height;const l=i.rotate;this._isFullScreen&&[0,180].includes(this._orientation)&&Mt()&&([d,b]=[b,d]),e.width=d,e.height=b,l!==270&&l!==90||(e.width=b,e.height=d);const p=(d-e.width)/2,t=(b-e.height)/2;let a="contain";i.scaleMode===bi.full&&(a="fill"),i.scaleMode===bi.fullAuto&&(a="cover"),e.style.objectFit=a,e.style.transform="rotate("+l+"deg)",e.style.left=p+"px",e.style.top=t+"px"}isPlaying(){return this.$videoElement&&!this.$videoElement.paused}get currentTime(){var e;return((e=this.$videoElement)===null||e===void 0?void 0:e.currentTime)||0}_enableSoundOnUserInteraction(){!this.player._opt.autoPlay||this.player.muted||window.____enableSoundOnUserInteraction___||(this.$videoElement.muted=!1),window.____enableSoundOnUserInteraction___=!0,window.removeEventListener("mouseup",this._enableSoundOnUserInteraction),window.removeEventListener("click",this._enableSoundOnUserInteraction),window.removeEventListener("touchstart",this._enableSoundOnUserInteraction),window.removeEventListener("keydown",this._enableSoundOnUserInteraction)}}class $a extends eo{constructor(e,i){super(e,i,oo),this._checkLoadingTimeout=null,this._opt.useMSE=!0,this.emit(te.decoderLoaded),i.autoPlay&&this._createPlayer(i)}close(){}_createPlayer(e){var i;this._opt=Object.assign({},this._opt,e),this._removeFlvEvents(),this.player&&(this.player.unload(),this.player.detachMediaElement(),this.player.destroy(),this.player=null),this.events||(this.events=new Gn(this)),this.video||(this.video=new oo(this)),(i=kt.LoggingControl)===null||i===void 0||i.applyConfig({globalTag:"EzuikitFlv",enableVerbose:!!this._opt.debug,enableDebug:!!this._opt.debug,enableInfo:!!this._opt.debug,enableWarn:!!this._opt.debug,enableError:!0}),this.player=kt.createPlayer({type:"flv",url:e.url,isLive:e.isLive},{stashInitialSize:128,enableWorker:!0,liveBufferLatencyChasing:!0,autoCleanupSourceBuffer:!0,lazyLoadMaxDuration:86400,fixAudioTimestampGap:!1}),this.player.attachMediaElement(this.video.$videoElement),this._flvEvents()}_removeFlvEvents(){this.player&&(this.player.off(kt.Events.ERROR),this.player.off(kt.Events.LOADING_COMPLETE),this.player.off(kt.Events.RECOVERED_EARLY_EOF),this.player.off(kt.Events.MEDIA_INFO),this.player.off(kt.Events.STATISTICS_INFO),this.player.off(kt.Events.DESTROYING))}_flvEvents(){if(this.player){let e=0;this.player.on(kt.Events.ERROR,(i,d,b)=>{var l;if(i==="MediaError"&&d==="MediaMSEError"&&b.code===9&&this.emit(vt.mediaSourceH265NotSupport,b),this.emit(te.error,{errorTypes:i,errorDetails:d,info:b}),i.indexOf("NetworkError")>-1&&(this.emit(te.streamError,{errorTypes:i,errorDetails:d,info:b,api:this._opt.url,type:"stream"}),this.player))try{this.pause().then(()=>{this.emit(te.delayTimeout)}).catch(()=>{this.emit(te.delayTimeout)})}catch{}if(i==="MediaError"&&d==="CodecUnsupported"&&b.code===-1&&b.msg.indexOf("Unsupported audio codec"))e===0&&(at.report(51,{event:i,value:b}),e=1,this.debug.error(`${kt.Events.ERROR}`,i,d,JSON.stringify(b)),this.emit(te.audioCodecUnsupported,!0));else if(!((l=b.msg)===null||l===void 0)&&l.includes("SourceBuffer is full")){const p=this.player._msectl._sourceBuffers[0];try{const t=this.video.$videoElement.currentTime;Math.max(0,t-5)>0&&p&&!p.updating&&p.remove(0,Math.max(0,t-5))}catch{}at.report(51,{event:i,value:b}),this.debug.error(`${kt.Events.ERROR}`,i,d,JSON.stringify(b))}else i==="NetworkError"&&d==="UnrecoverableEarlyEof"||(at.report(51,{event:i,value:b}),this.debug.error(`${kt.Events.ERROR}`,i,d,JSON.stringify(b)))}),this.player.on(kt.Events.LOADING_COMPLETE,i=>{this.debug.warn(`${kt.Events.LOADING_COMPLETE}`,JSON.stringify(i))}),this.player.on(kt.Events.RECOVERED_EARLY_EOF,i=>{this.debug.warn(`${kt.Events.RECOVERED_EARLY_EOF}`,i)}),this.player.on("media_info",i=>{this.clearCheckLoadingTimeout(),this.video.updateVideoInfo(Object.assign({encTypeCode:(i==null?void 0:i.videoCodec.indexOf("avc"))>=0?7:12},i))}),this.player.on(kt.Events.STATISTICS_INFO,i=>{i.decodedFrames===this._decodedFrames&&this._checkHeartTimeout===null?this.checkHeartTimeout():i.decodedFrames!==this._decodedFrames&&(this.clearCheckHeartTimeout(),this._decodedFrames=i.decodedFrames)}),this.player.on(kt.Events.DESTROYING,i=>{this.debug.log(`${kt.Events.DESTROYING}`,JSON.stringify(i))}),this.on(te.videoWaiting,()=>{this.clearCheckHeartTimeout(),this._checkHeartTimeout===null&&this.handleRender()}),this._onVideoLoadstart=this._onVideoLoadstart.bind(this),this.off("loadstart"),this.on("loadstart",this._onVideoLoadstart),this.on(te.timeUpdate,()=>{this.clearCheckHeartTimeout()}),this._onVideoStreamSuccess=this._onVideoStreamSuccess.bind(this),this.off(te.streamSuccess,this._onVideoStreamSuccess),this.on(te.streamSuccess,this._onVideoStreamSuccess)}}_onVideoLoadstart(){this.checkLoadingTimeout()}_onVideoStreamSuccess(){this.clearCheckLoadingTimeout()}getOption(){return this._opt}emitError(e,i=""){this.emit(te.error,e,i),this.emit(e,i)}destroy(){this._destroy(),this.clearCheckHeartTimeout(),this.clearCheckLoadingTimeout(),this.video&&(this.video.destroy(),this.video=null),this.events&&(this.events.destroy(),this.events=null),this.emit("destroy"),this.off(),this.debug.log("play","destroy end")}_destroy(){this.player&&this.playing&&this.player.pause(),this._flvPlayerDestroy(),this._loading=!1,this._playing=!1,this._times={playInitStart:"",playStart:"",streamStart:"",streamResponse:"",demuxStart:"",decodeStart:"",videoStart:"",playTimestamp:"",streamTimestamp:"",streamResponseTimestamp:"",demuxTimestamp:"",decodeTimestamp:"",videoTimestamp:"",allTimestamp:""},this.resetStats(),this._audioTimestamp=0,this._videoTimestamp=0}resetStats(){}get loaded(){return!0}set playing(e){e&&(this.loading=!1),this.playing!==e&&(this._playing=e,this.emit(te.playing,e),e?this.emit(te.play):this.emit(te.pause))}get playing(){return this._playing}get muted(){return this._muted}set muted(e){this.video&&(this.video.$videoElement.muted=e,this.player&&(this.player.muted=e)),super._updateMuted(e)}get volume(){return this._volume}set volume(e){super._updateVolume(e),this.video&&(this.video.$videoElement.volume=e)}set loading(e){this.loading!==e&&(this._loading=e,this.emit(te.loading,this._loading),e||this.emit(te.loaded))}get loading(){return this._loading}set audioTimestamp(e){e!==null&&(this._audioTimestamp=e)}get audioTimestamp(){return this._audioTimestamp}set videoTimestamp(e){e!==null&&(this._videoTimestamp=e)}get videoTimestamp(){return this._videoTimestamp}get isDebug(){return!!this._opt.debug}checkLoadingTimeout(){var e;this._opt.loadingTimeout!==0&&(this._checkLoadingTimeout=setTimeout(()=>{this.clearCheckLoadingTimeout();try{this.pause().then(()=>{this.emit(te.timeout,te.loadingTimeout),this.emit(te.loadingTimeout)}).catch(()=>{this.emit(te.timeout,te.loadingTimeout),this.emit(te.loadingTimeout)})}catch{}},1e3*(((e=this._opt)===null||e===void 0?void 0:e.loadingTimeout)||10)))}clearCheckLoadingTimeout(){this._checkLoadingTimeout&&(clearTimeout(this._checkLoadingTimeout),this._checkLoadingTimeout=null)}checkHeart(){this.clearCheckHeartTimeout(),this.checkHeartTimeout()}clearCheckHeartTimeout(){this._checkHeartTimeout&&(clearTimeout(this._checkHeartTimeout),this._checkHeartTimeout=null)}checkHeartTimeout(){var e,i;if(this._opt.heartTimeout===0)return;const d=((e=this.video)===null||e===void 0?void 0:e.currentTime)||0;this._checkHeartTimeout=setTimeout(()=>{var b;if(this._checkHeartTimeout&&this.clearCheckHeartTimeout(),this.playing&&this.video){if(d!==(((b=this.video)===null||b===void 0?void 0:b.currentTime)||0))return;try{this.pause().then(()=>{this.emit(te.timeout,te.heartTimeout),this.emit(te.heartTimeout)}).catch(()=>{this.emit(te.timeout,te.heartTimeout),this.emit(te.heartTimeout)})}catch{}}},1e3*(((i=this._opt)===null||i===void 0?void 0:i.heartTimeout)||5))}handleRender(){this.loading&&(this.emit(te.start),this.loading=!1),this.playing||(this.playing=!0),this.checkHeart()}updateOption(e){var i;super.updateOption(e),(i=kt.LoggingControl)===null||i===void 0||i.applyConfig({globalTag:"EzuikitFlv",enableVerbose:!!e.debug,enableDebug:!!e.debug,enableInfo:!!e.debug,enableWarn:!!e.debug,enableError:!0})}play(e={}){return this._play(e)}_play(e={}){return this.player&&this._destroy(),this.clearCheckHeartTimeout(),this._createPlayer(Object.assign({},this._opt,e)),this.loading=!0,this._playing=!1,this._times.playInitStart=Wt(),this.player?(this.player.load(),new Promise((i,d)=>{this.player.play().then(()=>{this.loading=!1,this.playing=!0,this._opt.muted||(this.muted=!1),i()}).catch(b=>{d(b)})})):Promise.reject()}_flvPlayerDestroy(){this.player&&(this.video.pause(),this.player.unload(),this._removeFlvEvents(),this.player.detachMediaElement(),this.player.destroy(),this.player=null)}_close(){return new Promise(e=>{this._loading=!1,this._playing=!1,this._times={playInitStart:"",playStart:"",streamStart:"",streamResponse:"",demuxStart:"",decodeStart:"",videoStart:"",playTimestamp:"",streamTimestamp:"",streamResponseTimestamp:"",demuxTimestamp:"",decodeTimestamp:"",videoTimestamp:"",allTimestamp:""},this.video&&this.video.resetInit(),this.clearCheckHeartTimeout(),this.clearCheckLoadingTimeout(),this.player&&(this._flvPlayerDestroy(),this._pause=!0),this.resetStats(),this._audioTimestamp=0,this._videoTimestamp=0,setTimeout(()=>{e()},110)})}pause(){return this._close()}resumeAudioAfterPause(){}}class Qn{constructor(e,i){return this._opt=Object.assign({},Oi,i),(Wr()||na().browser==="360EE")&&(this._opt.useMSE=!1),new(Qn.getLoaderFactory(this._opt.useMSE))(e,this._opt)}static getLoaderFactory(e){return e?$a:Pa}}function ao(u){let e=arguments.length>1&&arguments[1]!==void 0&&arguments[1];const i=new URL(u),d=u.split("?")[1];let b={};if(d){const p=d.split("&");for(let t of p){if(t==="")continue;const a=t.split("=");a[0]&&(b[a[0]]=a[1])}}const l={protocol:i.protocol,hostname:i.hostname,port:i.port,pathname:i.pathname,search:i.search,query:b,url:u};if(e&&/_(\d+)_(\d+)\.flv/.test(u)){const p=i.pathname.split("/")[i.pathname.split("/").length-1].replace(/.flv$/,"").split("_");p[0].indexOf("-")>=0?(l.streamName=p[0].split("-")[0],l.deviceSerial=p[0].split("-")[1]):l.deviceSerial=p[0],l.channelNo=+p[1],l.streamTypeIn=+p[2]}return l}var so,lo={exports:{}},Ao=wt(Object.freeze({__proto__:null,default:{}})),Ua=(so||(so=1,function(u){(function(){var e="input is invalid type",i=typeof window=="object",d=i?window:{};d.JS_MD5_NO_WINDOW&&(i=!1);var b=!i&&typeof self=="object",l=!d.JS_MD5_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;l?d=Ut:b&&(d=self);var p,t=!d.JS_MD5_NO_COMMON_JS&&u.exports,a=!d.JS_MD5_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",n="0123456789abcdef".split(""),s=[128,32768,8388608,-2147483648],h=[0,8,16,24],E=["hex","array","digest","buffer","arrayBuffer","base64"],v="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),S=[];if(a){var B=new ArrayBuffer(68);p=new Uint8Array(B),S=new Uint32Array(B)}var x=Array.isArray;!d.JS_MD5_NO_NODE_JS&&x||(x=function(T){return Object.prototype.toString.call(T)==="[object Array]"});var P=ArrayBuffer.isView;!a||!d.JS_MD5_NO_ARRAY_BUFFER_IS_VIEW&&P||(P=function(T){return typeof T=="object"&&T.buffer&&T.buffer.constructor===ArrayBuffer});var M=function(T){var m=typeof T;if(m==="string")return[T,!0];if(m!=="object"||T===null)throw new Error(e);if(a&&T.constructor===ArrayBuffer)return[new Uint8Array(T),!1];if(!x(T)&&!P(T))throw new Error(e);return[T,!1]},F=function(T){return function(m){return new H(!0).update(m)[T]()}},G=function(T){var m,g=Ao,f=Ao.Buffer;return m=f.from&&!d.JS_MD5_NO_BUFFER_FROM?f.from:function(O){return new f(O)},function(O){if(typeof O=="string")return g.createHash("md5").update(O,"utf8").digest("hex");if(O==null)throw new Error(e);return O.constructor===ArrayBuffer&&(O=new Uint8Array(O)),x(O)||P(O)||O.constructor===f?g.createHash("md5").update(m(O)).digest("hex"):T(O)}},K=function(T){return function(m,g){return new Z(m,!0).update(g)[T]()}};function H(T){if(T)S[0]=S[16]=S[1]=S[2]=S[3]=S[4]=S[5]=S[6]=S[7]=S[8]=S[9]=S[10]=S[11]=S[12]=S[13]=S[14]=S[15]=0,this.blocks=S,this.buffer8=p;else if(a){var m=new ArrayBuffer(68);this.buffer8=new Uint8Array(m),this.blocks=new Uint32Array(m)}else this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.h0=this.h1=this.h2=this.h3=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0}function Z(T,m){var g,f=M(T);if(T=f[0],f[1]){var O,j=[],Q=T.length,ee=0;for(g=0;g<Q;++g)(O=T.charCodeAt(g))<128?j[ee++]=O:O<2048?(j[ee++]=192|O>>>6,j[ee++]=128|63&O):O<55296||O>=57344?(j[ee++]=224|O>>>12,j[ee++]=128|O>>>6&63,j[ee++]=128|63&O):(O=65536+((1023&O)<<10|1023&T.charCodeAt(++g)),j[ee++]=240|O>>>18,j[ee++]=128|O>>>12&63,j[ee++]=128|O>>>6&63,j[ee++]=128|63&O);T=j}T.length>64&&(T=new H(!0).update(T).array());var ue=[],fe=[];for(g=0;g<64;++g){var me=T[g]||0;ue[g]=92^me,fe[g]=54^me}H.call(this,m),this.update(fe),this.oKeyPad=ue,this.inner=!0,this.sharedMemory=m}H.prototype.update=function(T){if(this.finalized)throw new Error("finalize already called");var m=M(T);T=m[0];for(var g,f,O=m[1],j=0,Q=T.length,ee=this.blocks,ue=this.buffer8;j<Q;){if(this.hashed&&(this.hashed=!1,ee[0]=ee[16],ee[16]=ee[1]=ee[2]=ee[3]=ee[4]=ee[5]=ee[6]=ee[7]=ee[8]=ee[9]=ee[10]=ee[11]=ee[12]=ee[13]=ee[14]=ee[15]=0),O)if(a)for(f=this.start;j<Q&&f<64;++j)(g=T.charCodeAt(j))<128?ue[f++]=g:g<2048?(ue[f++]=192|g>>>6,ue[f++]=128|63&g):g<55296||g>=57344?(ue[f++]=224|g>>>12,ue[f++]=128|g>>>6&63,ue[f++]=128|63&g):(g=65536+((1023&g)<<10|1023&T.charCodeAt(++j)),ue[f++]=240|g>>>18,ue[f++]=128|g>>>12&63,ue[f++]=128|g>>>6&63,ue[f++]=128|63&g);else for(f=this.start;j<Q&&f<64;++j)(g=T.charCodeAt(j))<128?ee[f>>>2]|=g<<h[3&f++]:g<2048?(ee[f>>>2]|=(192|g>>>6)<<h[3&f++],ee[f>>>2]|=(128|63&g)<<h[3&f++]):g<55296||g>=57344?(ee[f>>>2]|=(224|g>>>12)<<h[3&f++],ee[f>>>2]|=(128|g>>>6&63)<<h[3&f++],ee[f>>>2]|=(128|63&g)<<h[3&f++]):(g=65536+((1023&g)<<10|1023&T.charCodeAt(++j)),ee[f>>>2]|=(240|g>>>18)<<h[3&f++],ee[f>>>2]|=(128|g>>>12&63)<<h[3&f++],ee[f>>>2]|=(128|g>>>6&63)<<h[3&f++],ee[f>>>2]|=(128|63&g)<<h[3&f++]);else if(a)for(f=this.start;j<Q&&f<64;++j)ue[f++]=T[j];else for(f=this.start;j<Q&&f<64;++j)ee[f>>>2]|=T[j]<<h[3&f++];this.lastByteIndex=f,this.bytes+=f-this.start,f>=64?(this.start=f-64,this.hash(),this.hashed=!0):this.start=f}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296|0,this.bytes=this.bytes%4294967296),this},H.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var T=this.blocks,m=this.lastByteIndex;T[m>>>2]|=s[3&m],m>=56&&(this.hashed||this.hash(),T[0]=T[16],T[16]=T[1]=T[2]=T[3]=T[4]=T[5]=T[6]=T[7]=T[8]=T[9]=T[10]=T[11]=T[12]=T[13]=T[14]=T[15]=0),T[14]=this.bytes<<3,T[15]=this.hBytes<<3|this.bytes>>>29,this.hash()}},H.prototype.hash=function(){var T,m,g,f,O,j,Q=this.blocks;this.first?m=((m=((T=((T=Q[0]-680876937)<<7|T>>>25)-271733879|0)^(g=((g=(-271733879^(f=((f=(-1732584194^2004318071&T)+Q[1]-117830708)<<12|f>>>20)+T|0)&(-271733879^T))+Q[2]-1126478375)<<17|g>>>15)+f|0)&(f^T))+Q[3]-1316259209)<<22|m>>>10)+g|0:(T=this.h0,m=this.h1,g=this.h2,m=((m+=((T=((T+=((f=this.h3)^m&(g^f))+Q[0]-680876936)<<7|T>>>25)+m|0)^(g=((g+=(m^(f=((f+=(g^T&(m^g))+Q[1]-389564586)<<12|f>>>20)+T|0)&(T^m))+Q[2]+606105819)<<17|g>>>15)+f|0)&(f^T))+Q[3]-1044525330)<<22|m>>>10)+g|0),m=((m+=((T=((T+=(f^m&(g^f))+Q[4]-176418897)<<7|T>>>25)+m|0)^(g=((g+=(m^(f=((f+=(g^T&(m^g))+Q[5]+1200080426)<<12|f>>>20)+T|0)&(T^m))+Q[6]-1473231341)<<17|g>>>15)+f|0)&(f^T))+Q[7]-45705983)<<22|m>>>10)+g|0,m=((m+=((T=((T+=(f^m&(g^f))+Q[8]+1770035416)<<7|T>>>25)+m|0)^(g=((g+=(m^(f=((f+=(g^T&(m^g))+Q[9]-1958414417)<<12|f>>>20)+T|0)&(T^m))+Q[10]-42063)<<17|g>>>15)+f|0)&(f^T))+Q[11]-1990404162)<<22|m>>>10)+g|0,m=((m+=((T=((T+=(f^m&(g^f))+Q[12]+1804603682)<<7|T>>>25)+m|0)^(g=((g+=(m^(f=((f+=(g^T&(m^g))+Q[13]-40341101)<<12|f>>>20)+T|0)&(T^m))+Q[14]-1502002290)<<17|g>>>15)+f|0)&(f^T))+Q[15]+1236535329)<<22|m>>>10)+g|0,m=((m+=((f=((f+=(m^g&((T=((T+=(g^f&(m^g))+Q[1]-165796510)<<5|T>>>27)+m|0)^m))+Q[6]-1069501632)<<9|f>>>23)+T|0)^T&((g=((g+=(T^m&(f^T))+Q[11]+643717713)<<14|g>>>18)+f|0)^f))+Q[0]-373897302)<<20|m>>>12)+g|0,m=((m+=((f=((f+=(m^g&((T=((T+=(g^f&(m^g))+Q[5]-701558691)<<5|T>>>27)+m|0)^m))+Q[10]+38016083)<<9|f>>>23)+T|0)^T&((g=((g+=(T^m&(f^T))+Q[15]-660478335)<<14|g>>>18)+f|0)^f))+Q[4]-405537848)<<20|m>>>12)+g|0,m=((m+=((f=((f+=(m^g&((T=((T+=(g^f&(m^g))+Q[9]+568446438)<<5|T>>>27)+m|0)^m))+Q[14]-1019803690)<<9|f>>>23)+T|0)^T&((g=((g+=(T^m&(f^T))+Q[3]-187363961)<<14|g>>>18)+f|0)^f))+Q[8]+1163531501)<<20|m>>>12)+g|0,m=((m+=((f=((f+=(m^g&((T=((T+=(g^f&(m^g))+Q[13]-1444681467)<<5|T>>>27)+m|0)^m))+Q[2]-51403784)<<9|f>>>23)+T|0)^T&((g=((g+=(T^m&(f^T))+Q[7]+1735328473)<<14|g>>>18)+f|0)^f))+Q[12]-1926607734)<<20|m>>>12)+g|0,m=((m+=((j=(f=((f+=((O=m^g)^(T=((T+=(O^f)+Q[5]-378558)<<4|T>>>28)+m|0))+Q[8]-2022574463)<<11|f>>>21)+T|0)^T)^(g=((g+=(j^m)+Q[11]+1839030562)<<16|g>>>16)+f|0))+Q[14]-35309556)<<23|m>>>9)+g|0,m=((m+=((j=(f=((f+=((O=m^g)^(T=((T+=(O^f)+Q[1]-1530992060)<<4|T>>>28)+m|0))+Q[4]+1272893353)<<11|f>>>21)+T|0)^T)^(g=((g+=(j^m)+Q[7]-155497632)<<16|g>>>16)+f|0))+Q[10]-1094730640)<<23|m>>>9)+g|0,m=((m+=((j=(f=((f+=((O=m^g)^(T=((T+=(O^f)+Q[13]+681279174)<<4|T>>>28)+m|0))+Q[0]-358537222)<<11|f>>>21)+T|0)^T)^(g=((g+=(j^m)+Q[3]-722521979)<<16|g>>>16)+f|0))+Q[6]+76029189)<<23|m>>>9)+g|0,m=((m+=((j=(f=((f+=((O=m^g)^(T=((T+=(O^f)+Q[9]-640364487)<<4|T>>>28)+m|0))+Q[12]-421815835)<<11|f>>>21)+T|0)^T)^(g=((g+=(j^m)+Q[15]+530742520)<<16|g>>>16)+f|0))+Q[2]-995338651)<<23|m>>>9)+g|0,m=((m+=((f=((f+=(m^((T=((T+=(g^(m|~f))+Q[0]-198630844)<<6|T>>>26)+m|0)|~g))+Q[7]+1126891415)<<10|f>>>22)+T|0)^((g=((g+=(T^(f|~m))+Q[14]-1416354905)<<15|g>>>17)+f|0)|~T))+Q[5]-57434055)<<21|m>>>11)+g|0,m=((m+=((f=((f+=(m^((T=((T+=(g^(m|~f))+Q[12]+1700485571)<<6|T>>>26)+m|0)|~g))+Q[3]-1894986606)<<10|f>>>22)+T|0)^((g=((g+=(T^(f|~m))+Q[10]-1051523)<<15|g>>>17)+f|0)|~T))+Q[1]-2054922799)<<21|m>>>11)+g|0,m=((m+=((f=((f+=(m^((T=((T+=(g^(m|~f))+Q[8]+1873313359)<<6|T>>>26)+m|0)|~g))+Q[15]-30611744)<<10|f>>>22)+T|0)^((g=((g+=(T^(f|~m))+Q[6]-1560198380)<<15|g>>>17)+f|0)|~T))+Q[13]+1309151649)<<21|m>>>11)+g|0,m=((m+=((f=((f+=(m^((T=((T+=(g^(m|~f))+Q[4]-145523070)<<6|T>>>26)+m|0)|~g))+Q[11]-1120210379)<<10|f>>>22)+T|0)^((g=((g+=(T^(f|~m))+Q[2]+718787259)<<15|g>>>17)+f|0)|~T))+Q[9]-343485551)<<21|m>>>11)+g|0,this.first?(this.h0=T+1732584193|0,this.h1=m-271733879|0,this.h2=g-1732584194|0,this.h3=f+271733878|0,this.first=!1):(this.h0=this.h0+T|0,this.h1=this.h1+m|0,this.h2=this.h2+g|0,this.h3=this.h3+f|0)},H.prototype.hex=function(){this.finalize();var T=this.h0,m=this.h1,g=this.h2,f=this.h3;return n[T>>>4&15]+n[15&T]+n[T>>>12&15]+n[T>>>8&15]+n[T>>>20&15]+n[T>>>16&15]+n[T>>>28&15]+n[T>>>24&15]+n[m>>>4&15]+n[15&m]+n[m>>>12&15]+n[m>>>8&15]+n[m>>>20&15]+n[m>>>16&15]+n[m>>>28&15]+n[m>>>24&15]+n[g>>>4&15]+n[15&g]+n[g>>>12&15]+n[g>>>8&15]+n[g>>>20&15]+n[g>>>16&15]+n[g>>>28&15]+n[g>>>24&15]+n[f>>>4&15]+n[15&f]+n[f>>>12&15]+n[f>>>8&15]+n[f>>>20&15]+n[f>>>16&15]+n[f>>>28&15]+n[f>>>24&15]},H.prototype.toString=H.prototype.hex,H.prototype.digest=function(){this.finalize();var T=this.h0,m=this.h1,g=this.h2,f=this.h3;return[255&T,T>>>8&255,T>>>16&255,T>>>24&255,255&m,m>>>8&255,m>>>16&255,m>>>24&255,255&g,g>>>8&255,g>>>16&255,g>>>24&255,255&f,f>>>8&255,f>>>16&255,f>>>24&255]},H.prototype.array=H.prototype.digest,H.prototype.arrayBuffer=function(){this.finalize();var T=new ArrayBuffer(16),m=new Uint32Array(T);return m[0]=this.h0,m[1]=this.h1,m[2]=this.h2,m[3]=this.h3,T},H.prototype.buffer=H.prototype.arrayBuffer,H.prototype.base64=function(){for(var T,m,g,f="",O=this.array(),j=0;j<15;)T=O[j++],m=O[j++],g=O[j++],f+=v[T>>>2]+v[63&(T<<4|m>>>4)]+v[63&(m<<2|g>>>6)]+v[63&g];return T=O[j],f+=v[T>>>2]+v[T<<4&63]+"=="},Z.prototype=new H,Z.prototype.finalize=function(){if(H.prototype.finalize.call(this),this.inner){this.inner=!1;var T=this.array();H.call(this,this.sharedMemory),this.update(this.oKeyPad),this.update(T),H.prototype.finalize.call(this)}};var ie=function(){var T=F("hex");l&&(T=G(T)),T.create=function(){return new H},T.update=function(f){return T.create().update(f)};for(var m=0;m<E.length;++m){var g=E[m];T[g]=F(g)}return T}();ie.md5=ie,ie.md5.hmac=function(){var T=K("hex");T.create=function(f){return new Z(f)},T.update=function(f,O){return T.create(f).update(O)};for(var m=0;m<E.length;++m){var g=E[m];T[g]=K(g)}return T}(),t?u.exports=ie:d.md5=ie})()}(lo)),lo.exports),Fa=tt(Ua);const zn="/api/v3/device/local/video/unify/query",Hn="/api/service/device/capacity/video/quality",co="/api/v3/device/setVideoLevel",Na="/api/lapp/v2/live/address/get",Va="/api/service/media/live/cdn/config",ja="/api/service/media/live/record/cdn/config",Ga="/api/service/media/streammanage/interrupt/info";function Ot(u){return u<10?"0"+u:u+""}const Hi={0:"流畅",1:"标清",2:"高清",3:"超清",4:"极清",5:"3K",6:"4K"},Qa=[{videoLevel:1,name:Hi[1],streamTypeIn:2,type:"compatible"},{videoLevel:2,name:Hi[2],streamTypeIn:1,type:"compatible"}];class uo{constructor(e,i){this._player=e,this.baseURL=(i.baseURL||"https://open.ys7.com").replace(/\/$/,""),this.accessToken=i.accessToken,this.deviceSerial=i.deviceSerial,this.channelNo=i.channelNo,this.appName=i.appName,this.v=i.v}fetch(e){let i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const d=/http[s]?:\/\//.test(e)?e:`${this.baseURL}${e}`,b=i.headers;return delete i.headers,fetch(d,{...i||{},...b===null?{}:{headers:{clientType:"ezuikit-flv",accessToken:this.accessToken,deviceSerial:this.deviceSerial,localIndex:this.channelNo,...b||{}}}})}get(e){let i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.fetch(e,{...i||{},method:"get"})}post(e){let i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.fetch(e,{...i||{},method:"post"})}setVideoLevelService(e){const i=new FormData;return i.append("videoLevel",parseInt(e)),this.post(`${co}`,{body:i}).then(d=>d.json()).catch(d=>{var b,l;(b=(l=this._player).emit)===null||b===void 0||b.call(l,vt.fetchError,{api:co,error:d})})}async getLocalVideoUnifyQueryService(e){var i,d,b,l;const p=(e.startTime+36e5*(((i=this._player._opt)===null||i===void 0?void 0:i.timeZone)||0))/1e3,t=(e.endTime+36e5*(((d=this._player._opt)===null||d===void 0?void 0:d.timeZone)||0))/1e3,a=async s=>{let h=[];try{var E,v,S;const M=await this.get(`${zn}?startTime=${s.startTime}&endTime=${s.endTime}&pageSize=${s.pageSize||200}`).then(F=>F.json()).catch(F=>{var G,K;(G=(K=this._player).emit)===null||G===void 0||G.call(K,vt.fetchError,{api:zn,error:F})});var B,x,P;if((M==null||(E=M.meta)===null||E===void 0?void 0:E.code)!==200)return(B=(x=this._player).emit)===null||B===void 0||B.call(x,vt.fetchError,{api:zn,error:M==null?void 0:M.meta}),h;M!=null&&(v=M.data)!==null&&v!==void 0&&(v=v.records)!==null&&v!==void 0&&v.length&&(h=h.concat(M.data.records||[])),M!=null&&(S=M.data)!==null&&S!==void 0&&S.hasMore&&(h=h.concat(await a({...s,startTime:M==null||(P=M.data)===null||P===void 0?void 0:P.nextFileTime})))}catch{}return h},n=await a({...e,startTime:p,endTime:t})||[];return this._player.playbackRecords=(n||[]).map(s=>{var h,E;return{...s,startTime:s.startTime-3600*(((h=this._player._opt)===null||h===void 0?void 0:h.timeZone)||0),endTime:s.endTime-3600*(((E=this._player._opt)===null||E===void 0?void 0:E.timeZone)||0)}}).reduce((s,h)=>{const E=s[s.length-1];return E&&E.endTime===h.startTime?E.endTime=h.endTime:s.push(h),s},[]),(b=(l=this._player).emit)===null||b===void 0||b.call(l,te.localVideoRecords,this._player.playbackRecords),n}async getVideoQualityService(){let e=Qa;try{var i,d;const p=await this.get(`${Hn}?deviceSerial=${this.deviceSerial}`).then(t=>t.json()).catch(t=>{this._player.emit(vt.fetchError,{api:Hn,error:t})});var b,l;if((p==null||(i=p.meta)===null||i===void 0?void 0:i.code)!==200)return(b=(l=this._player).emit)===null||b===void 0||b.call(l,vt.fetchError,{api:Hn,error:p==null?void 0:p.meta}),e;p!=null&&(d=p.data)!==null&&d!==void 0&&d.length&&(e=p.data)}catch{}return e=e.map(p=>({...p,name:Hi[p.videoLevel]||"未知"})),e}getPlayAddressService(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const i=new FormData;return Object.keys(e).forEach(d=>{i.append(d,e[d])}),i.append("protocol",4),i.append("accessToken",this.accessToken),i.append("deviceSerial",this.deviceSerial),i.append("channelNo",this.channelNo),this.post(`${Na}`,{body:i}).then(d=>d.json()).then(d=>{var b;return+d.code==200?d==null||(b=d.data)===null||b===void 0?void 0:b.url:""})}getRecordAddressService(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return this.appName&&this.v?(delete e.expireTime,this.getCDNRecordAddressService(e)):this.getPlayAddressService({...e,type:2})}getLiveAddressService(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return this.appName&&this.v?(delete e.expireTime,this.getCDNLiveAddressService(e)):this.getPlayAddressService({...e,type:1})}getCDNPlayAddressService(e){let i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const d=new FormData,b=new Date,l=`${b.getFullYear()}-${Ot(b.getMonth()+1)}-${Ot(b.getDate())} 00:00:00`,p=`${b.getFullYear()}-${Ot(b.getMonth()+1)}-${Ot(b.getDate())} 23:59:59`;return d.append("startTime",l),d.append("endTime",p),d.append("playProtocol",2),d.append("streamName",Fa((function(t,a){var n,s="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),h=[];for(a=a||s.length,n=0;n<t;n++)h[n]=s[0|Math.random()*a];return h.join("")}(32)+"_"+new Date().getTime()).replace(/-/gi,"")+"_"+this.deviceSerial+"_"+this.channelNo+"_"+i.quality)),d.append("supportH265",1),d.append("appName",this.appName),Object.keys(i).forEach(t=>{d.append(t,i[t])}),this.post(e,{body:d}).then(t=>t.json()).then(t=>{var a,n;return+((a=t.meta)===null||a===void 0?void 0:a.code)==200?(n=t.data)===null||n===void 0?void 0:n.cdnUrl:""})}async getCDNLiveAddressService(e){return this.getCDNPlayAddressService(`${Va}`,e)}async getCDNRecordAddressService(e){return this.getCDNPlayAddressService(`${ja}`,{recordStartTime:e.startTime,recordEndTime:e.stopTime,quality:e.quality,type:e.type||1})}async getStreamInterreputInfo(e){const i=new FormData;return i.append("streamId",e),this.post(Ga,{body:i,headers:null}).then(d=>d.json())}}function Mi(u){return new Date(Wn(u,arguments.length>1&&arguments[1]!==void 0?arguments[1]:"/"))}function Wn(u){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"/";return`${(u=u.replace(/\//gi,"").replace(/-/gi,"").replace(/:/gi,"").replace(/ /gi,"")).substring(0,4)}${e}${u.substring(4,6)}${e}${u.substring(6,8)} ${u.substring(8,10)}:${u.substring(10,12)}:${u.substring(12,14)}`}function qn(u){let e=null;if(e=typeof u=="string"?document.querySelector("#"+u.replace(/^#/,"")):u,!e)throw new Error("Flv required node can be a string (dom id) or dom (HTMLElement node)");if(e.nodeName==="CANVAS"||e.nodeName==="VIDEO")throw new Error(`Flv container type can not be ${e.nodeName} type`);return e}var za={95e3:"服务端内部处理异常",95400:"私有化协议vtm检测私有化协议中码流类型小于0或者设备序列号为空等非法参数场景返回(app不重试取流)",95402:"回放找不到录像文件",95403:"操作码或信令密钥与设备不匹配",95404:"设备不在线 检查设备网络",95405:"流媒体向设备发送或接受信令超时/cas响应超时",95406:"token失效",95407:"客户端的URL格式错误",95409:"预览开启隐私保护",95411:"token无权限",95412:"session不存在",95413:"token验证失败 刷新重试",95415:"设备通道错",95416:"设备资源受限 刷新重试",95417:"设备4G流量耗尽",95451:"设备不支持的码流类型",95452:"设备链接流媒体服务器失败",95454:"流媒体中关于设备取流会话不存在",95455:"设备通道未关联",95456:"设备通道关联设备不在线",95457:"客户端不支持端到端加密",95458:"设备不支持当前并发ECDH密",95459:"VTDU 处理ECDH 加密失败",95460:"手表正在拍照或录像",95461:"手表正在视频聊天",95462:"手表正在识图",95463:"手表正在QQ视频",95464:"手表正在坐姿检测",95465:"手表温度过高",95466:"设备视频通话中,不支持预览",95492:"设备不支持的命令",95500:"服务器处理失败",95503:"vtm返回分配vtdu失败, 请稍后重试",95504:"服务器负载达到上限,请稍后重试",95505:"vtm ecdh解密失败",95506:"vtm 返回IPC不支持取流(需要IPC添加NVR后支持)",95507:"不支持该4G卡套餐在非萤石App取流",95544:"设备返回无视频源",95545:"视频分享时间已经结束",95546:"取流并发路数限制",95547:"开放平台用户并发限制",95556:"ticket校验失败",95557:"回放服务器等待流头超时, 刷新重试,检测设备网络,重启设备",95558:"查找录像开始时间错误",95560:"群组分享取流二次验证失败",95561:"分享群组用户被锁住",95562:"群组分享用户权限变更",95563:"认证服务连接失败",95564:"认证超时",95565:"缓存无效",95566:"不在分享时间内预览",95567:"分享通道被锁定",95568:"未找到认证类型",95569:"认证返回的参数异常",95600:"分享设备不在分享时间内",95601:"群组分享用户没权限",95602:"群组分享权限变更",95530:"机房故障不可用, 刷新重试",95610:"接收流头失败",95620:"心跳超时",95701:"cas信令返回格式错误",95702:"SPGW请求Cas、Status透传超时,刷新重试",95703:"SPGW请求http不通,刷新重试",96001:"客户端参数出错",96002:"等待客户端侧心跳超时(20秒无心跳包)",96099:"客户端默认错误",96101:"不支持的命令",96102:"设备流头发送失败, 刷新重试",96103:"cas/设备返回错误1, 刷新重试",96104:"cas/设备返回错误-1, 刷新重试",96105:"设备返回错误码3, 刷新重试",96106:"设备返回错误码4, 刷新重试",96107:"设备返回错误码5, 刷新重试",96108:"cas信令回应重复, 刷新重试",96109:"视频广场取消分享",96110:"设备信令默认错误 设备错返回的错误码,不具体 刷新重试,或者重启设备",96501:"设备数据链路和实际链路不匹配, 刷新重试",96502:"设备数据链路重复建立连接, 刷新重试",96503:"设备数据链路端口不匹配, 刷新重试",96504:"缓存设备数据链路失败, 刷新重试",96505:"设备发送确认头消息重复, 刷新重试",96506:"设备数据先于确定头部到达, 刷新重试",96508:"设备数据头部长度非法, 刷新重试,或者重启设备",96509:"索引找不到设备数据管理块, 刷新重试",96510:"设备数据链路vtdu内存块协议状态不匹配",96511:"设备数据头部没有streamkey错误",96512:"设备数据头部非法",96513:"设备数据长度过小",96514:"设备老协议推流头部没有streamkey错误",96515:"设备老协议推流数据非法",96516:"设备老协议索引找不到内存管理块",96517:"设备老协议推流数据非法",96518:"设备数据包过大, 刷新重试,或者重启设备",96519:"设备推流链路网络不稳定, 设备长时间未推流超时",96520:"设备推流链路网络不稳定, 设备网络异常",90601:"流ID不存在",90602:"流被禁用",90603:"不在可用时间区间",90604:"用户设备关系验证失败",90605:"通道被隐藏",90606:"4G无限流量卡",4050:"服务内部调用向vtdu取流的接口失败",4054:"服务内部生成ticket失败",4056:"vtm服务信息为空",4057:"取流url非法(可能是格式、参数错误)",4058:"取流url过期(不在可用时间)",9048:"并发限制",9049:"带宽限制",9053:"不支持H265",9057:"设备码流加密",9060:"设备取流校验不通过",9061:"auth认证不通过",9062:"auth认证网络有问题"},Ha={95e3:"Internal server processing error",95400:"Private protocol VTM detection failed: Invalid parameters (stream type < 0 or empty device serial number), (App should not retry streaming)",95402:"Playback failed: Recording file not found",95403:"Operation code/signaling key mismatch with the device",95404:"Device offline, Check device network",95405:"Stream server timeout when sending/receiving device signaling or CAS response timeout, Check device network or restart device",95406:"Token expired, Refresh token or restart device",95407:"Invalid client URL format",95409:"Privacy protection enabled during preview",95411:"Token lacks permissions/user unauthorized",95412:"Session does not exist",95413:"Token verification failed, Refresh token",95415:"Invalid device channel",95416:"Device resource limit reached, Retry later",95417:"Device 4G data quota exhausted",95451:"Unsupported stream type by device",95452:"Device failed to connect to stream server",95454:"Streaming session not found in stream server",95455:"Device channel not associated",95456:"Associated device channel offline",95457:"Client does not support end-to-end encryption",95458:"Device does not support current concurrent ECDH encryption",95459:"VTDU failed to process ECDH encryption",95460:"Watch is capturing photos/video",95461:"Watch is in video chat",95462:"Watch is performing image recognition",95463:"Watch is in QQ video call",95464:"Watch is performing posture detection",95465:"Watch temperature too high",95466:"Device in video call; preview not supported",95492:"Unsupported command by device",95500:"Server processing failure",95503:"VTM failed to allocate VTDU, Retry later (VTDU service issue)",95504:"Server overloaded, Retry later",95505:"VTM ECDH decryption failed",95506:"IPC streaming not supported (requires NVR binding)",95507:"4G plan does not support non-EZVIZ app streaming",95544:"No video source from device",95545:"Video sharing period ended",95546:"Stream concurrency limit reached",95547:"Open platform user concurrency limit exceeded",95556:"Ticket validation failed",95557:"Playback server timeout waiting for stream header, Retry later or check device network.",95558:"Invalid playback start time",95560:"Group sharing stream secondary validation failed",95561:"Group shared user locked",95562:"Group sharing permissions modified",95563:"Authentication service connection failed",95564:"Authentication timeout",95565:"Invalid cache",95566:"Preview outside sharing period",95567:"Shared channel locked",95568:"Authentication type not found",95569:"Invalid authentication parameters",95600:"Shared device not in sharing period",95601:"Group user lacks permissions",95602:"Group sharing permissions modified",95530:"Data center outage, Retry later",95610:"Failed to receive stream header",95620:"Heartbeat timeout",95701:"CAS signaling format error",95702:"SPGW request to CAS/Status timeout, Retry later",95703:"SPGW HTTP request failed, Retry later",96001:"Client parameter error",96002:"Client heartbeat timeout (20s no packet)",96099:"Default client error",96101:"Unsupported command",96102:"Device stream header delivery failed, Retry later",96103:"CAS/device returned error code 1, Retry later",96104:"CAS/device returned error code -1, Retry later",96105:"Device returned error code 3, Retry later",96106:"Device returned error code 4, Retry later",96107:"Device returned error code 5, Retry later",96108:"Duplicate CAS signaling response, Retry later",96109:"Video sharing canceled by platform",96110:"Default device signaling error, Retry or restart device",96501:"Device data path mismatch, Retry later",96502:"Duplicate device data path connection, Retry later",96503:"Device data port mismatch, Retry later",96504:"Failed to cache device data path (insufficient memory), Retry later",96505:"Duplicate device acknowledgment header, Retry later",96506:"Device data arrived before header confirmation, Retry later",96508:"Invalid device data header length, Retry or restart device",96509:"Data management block not found, Retry later",96510:"VTDU protocol state mismatch for device data path",96511:"Missing stream key in device data header",96512:"Invalid device data header",96513:"Device data length too small",96514:"Legacy protocol: Missing stream key in push header",96515:"Invalid legacy protocol push data",96516:"Legacy protocol: Data management block not found",96517:"Invalid legacy protocol push data",96518:"Device data packet too large, Retry or restart device",96519:"Unstable device push stream (timeout due to inactivity)",96520:"Unstable device push stream (network issue)",90601:"Stream ID does not exist",90602:"Stream is disabled",90603:"Not within the available time range",90604:"User-device relationship verification failed",90605:"Channel is hidden",90606:"4G unlimited data plan",4050:"Internal service call to VTDU for stream retrieval failed",4054:"Internal service failed to generate ticket",4056:"VTM service information is empty",4057:"Stream retrieval URL is invalid (possibly due to format or parameter error)",4058:"Stream retrieval URL has expired (not within valid time range)",9048:"Concurrency limit exceeded",9049:"Bandwidth limit exceeded",9053:"H265 encoding not supported",9057:"Device stream is encrypted",9060:"Device stream retrieval validation failed",9061:"Auth authentication failed",9062:"Auth authentication network issue"};const ho=["h264","h265"],Wa=[.5,1,2,4,8];class ai extends Yt{constructor(e){var i,d,b;super({...e,volumeOptions:{muted:e.muted??Oi.muted,volume:e.volume??Oi.volume,...e.volumeOptions||{}},container:qn(e.id||e.container),type:"flv"}),Dt(this,"urlInfo",{}),Dt(this,"services",null),Dt(this,"_loadingTimeoutDelayTimer",null),Dt(this,"_heartTimeoutDelayTimer",null),(i=this.i18n)===null||i===void 0||(d=i.appendTranslations)===null||d===void 0||d.call(i,{zh:za,en:Ha}),at.initMonitor(e.ignoreMonitor||e.disableColect);const l=Object.assign({},{isLive:!0,timeZone:0},Oi,e);let p=qn(e.id||e.container);if(!e.url)throw new Error("Flv url is empty");var t;at.url=e.url,at.report(1,{name:"constructor"}),p.classList.add("ezui-player-container","ezui-flv-container"),delete l.container,l.forceNoOffscreen=!0,Pn(l.videoBuffer)&&(l.videoBuffer=1e3*Number(l.videoBuffer)),this._opt=l,this.urlInfo=ao(l.url,this._opt.isEzviz),this.$container=p,this._heartTimeoutDelayTimes=0,this._loadingTimeoutReplayTimes=0,this.events=new Gn(this),this._initPlayer(p,l),this._videoInfo={},this._currentPlayDate=null,this.definitionList=[],this.definition={},this._playbackRate=1,this.playbackRateList=Wa,this.playbackRecords=[],this.services=new uo(this,{baseURL:((b=this._opt.env)===null||b===void 0?void 0:b.domain)||Gr,accessToken:this._opt.accessToken,deviceSerial:this.urlInfo.deviceSerial,channelNo:this.urlInfo.channelNo}),this._httpServices(),(t=this).on(te.volumechange,(a,n)=>{var s,h;((s=t.player)===null||s===void 0?void 0:s.volume)!==a&&(t.player.volume=a),((h=t.player)===null||h===void 0?void 0:h.muted)!==n&&(t.player.muted=n)}),t.on(te.control.play,a=>{a?t.play():t.pause()}),t.on(te.fullscreenChange,a=>{t.player.emit(te.fullscreenChange,a)}),t.on(te.orientationChange,a=>{t.player.emit(te.orientationChange,a)}),function(a){var n,s;(n=a.player)===null||n===void 0||n.on(te.volumechange,(h,E)=>{a.volume!==h&&(a.volume=h),a.muted!==E&&(a.muted=E)}),(s=a.player)===null||s===void 0||s.on(te.audioCodecUnsupported,h=>{a.emit(te.audioCodecUnsupported,h)})}(this),this.options.useMSE&&(this._onvisibilitychange=this._onvisibilitychange.bind(this),document.addEventListener("visibilitychange",this._onvisibilitychange))}_httpServices(){try{var e,i,d;if(this._opt.isEzviz&&(e=this._opt)!==null&&e!==void 0&&e.accessToken&&this.urlInfo.deviceSerial&&this.urlInfo.channelNo>=0&&this.urlInfo.streamTypeIn){if(this.services=new uo(this,{baseURL:(((i=this._opt.env)===null||i===void 0?void 0:i.domain)||Gr).replace(/\/$/,""),accessToken:this._opt.accessToken,deviceSerial:this.urlInfo.deviceSerial,channelNo:this.urlInfo.channelNo,appName:this._opt.appName,v:(d=this.urlInfo.query)===null||d===void 0?void 0:d.v}),this._isEzvizPlayback(this._opt.url)&&!this._opt.isLive){var b,l,p,t;this._playbackRate=+(((b=this.urlInfo)===null||b===void 0||(b=b.query)===null||b===void 0?void 0:b.playbackSpeed)||1),(l=this.services)===null||l===void 0||l.getLocalVideoUnifyQueryService({startTime:Mi((p=this.urlInfo)===null||p===void 0||(p=p.query)===null||p===void 0?void 0:p.begin).getTime(),endTime:Mi((t=this.urlInfo)===null||t===void 0||(t=t.query)===null||t===void 0?void 0:t.end).getTime()});let S=null,B=0;this.on(te.timeUpdate,x=>{const P=this.playbackRecords.length;if(P>0){var M,F;const Z=Mi(this.urlInfo.query.begin).getTime()/1e3;let ie=(M=this.playbackRecords[B])===null||M===void 0?void 0:M.startTime,T=(F=this.playbackRecords[B])===null||F===void 0?void 0:F.endTime;if(Z<=this.playbackRecords[0].startTime)B=0;else{if(Z>=this.playbackRecords[this.playbackRecords.length-1].endTime)return;for(let f=0;f<P;f++){const O=this.playbackRecords[f];if(Z>=O.startTime&&Z<=O.endTime){var G;B=f,ie=Z,T=(G=this.playbackRecords[B])===null||G===void 0?void 0:G.endTime;break}{const j=this.playbackRecords[f+1];if(Z>=O.endTime&&Z<=j.startTime){var K,H;B=f+1,ie=(K=this.playbackRecords[B])===null||K===void 0?void 0:K.startTime,T=(H=this.playbackRecords[B])===null||H===void 0?void 0:H.endTime;break}}}}let m=parseInt(ie+x,10);if(x===0)return;this.emit(te.timeUpdateOSD,{currentTime:x,currentFragmentPlayEnd:ie+x>=T,currentSliceIndex:B,osd:m}),m+3>=this.playbackRecords[P-1].endTime&&(S&&clearTimeout(S),S=setTimeout(()=>{this.emit(te.end),clearTimeout(S),this.pause()},3e3)),ie+x>=T&&B<P-1&&B++;const g=new Date(1e3*m);this._currentPlayDate=`${g.getFullYear()}${Ot(g.getMonth()+1)}${Ot(g.getDate())}${Ot(g.getHours())}${Ot(g.getMinutes())}${Ot(g.getSeconds())}`}})}else if(!this._isEzvizPlayback(this._opt.url)&&this._opt.isLive){var a,n,s,h;const S=(a=this.urlInfo)!==null&&a!==void 0&&(a=a.query)!==null&&a!==void 0&&a.expire?parseInt((1e3*this.urlInfo.query.expire-new Date().getTime())/1e3):void 0;Promise.all([(n=this.services)===null||n===void 0?void 0:n.getVideoQualityService(),(s=this.services)===null||s===void 0?void 0:s.getLiveAddressService({quality:((h=this.urlInfo)===null||h===void 0?void 0:h.streamTypeIn)=="1"?2:1,expireTime:S})]).then(B=>{let x=[this.urlInfo.url,B[1]].sort((M,F)=>{const G=K=>{const H=K.match(/_(\d+)\.flv/);return H?parseInt(H[1],10):0};return G(M)-G(F)});const P=B[0].map((M,F)=>({...M,url:M.streamTypeIn===1?x[0]:x[1]}));this.definitionList=P,this.emit(te.getDefinitionListResult,P),this.emit(te.definitionListChange,P)})}}}catch(S){var E,v;(E=this.player)===null||E===void 0||(E=E.debug)===null||E===void 0||(v=E.error)===null||v===void 0||v.call(E,S)}}setDefinitionList(e){this.player&&(this.definitionList=e,this.emit(te.definitionListChange,e))}switchDefinition(e){if(this.player){if(e.videoLevel>=0&&[1,2].includes(e.streamTypeIn)){const p=this.definitionList.find(t=>t.videoLevel===e.videoLevel);if(p){if(this.emit(te.definitionChange,p),this.definition=p,p.url){var i;return p.type!=="compatible"&&((i=this.services)===null||i===void 0||i.setVideoLevelService(p.videoLevel)),this.playing?this.pause().then(()=>{this.play({url:p.url})}):this.play({url:p.url}),Promise.resolve(0)}var d;return(d=this.player.debug)===null||d===void 0||d.warn("play url is not found"),Promise.resolve(1)}var b;return(b=this.player.debug)===null||b===void 0||b.warn("definition is not found"),Promise.resolve(1)}var l;return(l=this.player.debug)===null||l===void 0||l.warn(`not support ${e==null?void 0:e.videoLevel}`),Promise.resolve(1)}}setPlaybackRateList(e){this.player&&(this.playbackRateList=e,this.emit(te.playbackRateListChange,e))}get playbackRate(){return this._playbackRate}set playbackRate(e){this.switchPlaybackRate(e)}switchPlaybackRate(e){var i,d,b;return this.player&&this._isEzvizPlayback(this._opt.url)?(e=+e,(i=this.playbackRateList)!==null&&i!==void 0&&i.includes(e)?this._getNewRecordPlayUrl({playbackRate:e}).then(l=>l?(this._playbackRate=e,this.emit(te.playbackRateChange,e),this.playing?this.pause().then(p=>{this.play({url:l})}):this.play({url:l}),0):1):((d=this.player)===null||d===void 0||(d=d.debug)===null||d===void 0||d.warn(`not support ${e}`),Promise.resolve(1))):((b=this.player)===null||b===void 0||(b=b.debug)===null||b===void 0||b.warn(`not support ${e}`),Promise.resolve(1))}_getNewRecordPlayUrl(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(this.player&&this._isEzvizPlayback(this._opt.url)){var i,d,b,l;const p=Mi(this._currentPlayDate||((i=this.urlInfo)===null||i===void 0||(i=i.query)===null||i===void 0?void 0:i.begin)),t=Mi((d=this.urlInfo)===null||d===void 0||(d=d.query)===null||d===void 0?void 0:d.end);return(b=this.services)===null||b===void 0?void 0:b.getRecordAddressService({expireTime:parseInt((new Date(1e3*((l=this.urlInfo.query)===null||l===void 0?void 0:l.expire)).getTime()-new Date().getTime())/1e3,10),startTime:`${p.getFullYear()}-${Ot(p.getMonth()+1)}-${Ot(p.getDate())} ${Ot(p.getHours())}:${Ot(p.getMinutes())}:${Ot(p.getSeconds())}`,stopTime:`${t.getFullYear()}-${Ot(t.getMonth()+1)}-${Ot(t.getDate())} ${Ot(t.getHours())}:${Ot(t.getMinutes())}:${Ot(t.getSeconds())}`,playbackSpeed:e.playbackRate||this.playbackRate,quality:this.urlInfo.streamTypeIn})}return Promise.resolve("")}_isEzvizPlayback(e){return this._opt.isEzviz&&/rec=(local|cloud)/.test(this._opt.url)}static _setOptions(e){const i=qn((e=Object.assign({},{isLive:!0,timeZone:0},Oi,e)).id||e.container);return e.container=i,e}destroy(){this.events&&(this.events.destroy(),this.events=null),super.destroy(),this.player&&(this.player.destroy(),this.player=null),this.$container&&(this.$container.classList.remove("ezui-flv-container"),this.$container.classList.remove("ezui-player-container"),this.$container=null),this.definitionList=[],this.definition={},this._videoInfo={},this._currentPlayDate=null,this.urlInfo={},this._playbackRate=1,this.playbackRateList=[],this.playbackRecords=[],this.$container=null,this._opt={},this._loadingTimeoutReplayTimes=0,this.removeAllListeners(),document.removeEventListener("visibilitychange",this._onvisibilitychange),at.report(50,{name:"destroy"})}_handlevideoInfo(e){this._videoInfo=e||{}}_initPlayer(e,i){var d,b,l,p;i.url&&(i.url=_i(i.url,ho)),this.player=new Qn(this.contentControl.$container,Object.assign({},i,{orientation:this.orientationAngle})),(d=this.player.debug)===null||d===void 0||d.log("Flv","version",ai.version),(b=this.player.debug)===null||b===void 0||b.log("Flv","_initPlayer",JSON.stringify(i)),this._bindEvents(),i.autoPlay&&this.play(),this._handlevideoInfo=this._handlevideoInfo.bind(this),(l=this.player)===null||l===void 0||l.off(te.videoInfo,this._handlevideoInfo),(p=this.player)===null||p===void 0||p.on(te.videoInfo,this._handlevideoInfo)}_resetPlayer(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.player.destroy(),this.player=null,this._opt=Object.assign(this._opt,e),this._initPlayer(this.$container,this._opt)}_bindEvents(){Object.keys(Vr).forEach(e=>{[te.volumechange,te.play].includes(e)||this.player.on(Vr[e],i=>{this.emit(e,i)})})}setDebug(e){this.player.updateOption({debug:e}),at.report(50,{name:"setDebug"})}setLogger(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.player.updateOption({loggerOptions:{...this.player._opt.loggerOptions||{},...e}})}closeSound(){this.setVolume(0),at.report(50,{name:"closeSound"})}openSound(){this.setVolume(.8),at.report(50,{name:"openSound"})}setVolume(e){this.volume=e}getVolume(){return at.report(50,{name:"getVolume"}),this.volume}audioResume(){var e,i;(e=this.player)===null||e===void 0||(e=e.audio)===null||e===void 0||(i=e.audioEnabled)===null||i===void 0||i.call(e,!0),at.report(50,{name:"audioResume"})}setScaleMode(e){return new Promise((i,d)=>{try{e=Number(e)}catch(b){return void d(b)}[bi.full,bi.auto,bi.fullAuto].includes(e)?(this.player.updateOption({scaleMode:e}),this.player.resize(),i(),at.report(50,{name:"setScaleMode"})):d("scale mode 0 | 1 | 2")})}pause(){var e,i;return at.report(50,{name:"pause"}),this._delayTimeoutTimer&&(clearTimeout(this._delayTimeoutTimer),this._delayTimeoutTimer=null),this._heartTimeoutDelayTimer&&(clearTimeout(this._heartTimeoutDelayTimer),this._heartTimeoutDelayTimer=null),this._loadingTimeoutDelayTimer&&(clearTimeout(this._loadingTimeoutDelayTimer),this._loadingTimeoutDelayTimer=null),this.playing=!1,(e=this.player)===null||e===void 0||(i=e.pause)===null||i===void 0?void 0:i.call(e)}clearView(){this.player.video.clearView(),at.report(50,{name:"clearView"})}async play(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return this._loadingTimeoutReplayTimes=0,this.__play(e)}async __play(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(this.loading=!0,e.url&&(at.url=e.url),typeof e=="string"&&(e={url:e}),this._currentPlayDate&&!e.url&&this._isEzvizPlayback())try{e.url=await this.services.getRecordAddressService({expireTime:86400,quality:this.urlInfo.streamTypeIn,startTime:Wn(this._currentPlayDate,"-"),stopTime:Wn(this.urlInfo.query.end,"-"),playbackSpeed:this.playbackRate}),this._currentPlayDate=null}catch{}const i=_i(e.url||this._opt.url,ho);return this.urlInfo=ao(i,this._opt.isEzviz),this._playbackRate=this.urlInfo.query.playbackSpeed||1,this._opt=Object.assign({},this._opt,e||{},{url:i}),this._opt.urlQuery=io(e.url),at.report(50,{name:"play"}),this.playing=!0,await new Promise((d,b)=>{var l;if(!this._opt.url)return this.emit(te.error,vt.playError),void b("play url is empty");(l=this.player)!==null&&l!==void 0&&l.playing?(this.clearView(),this.player.play({...this._opt,muted:this.muted,volume:this.volume}).then(()=>{this.loading=!1,this.posterControl.hide(),d()}).catch(p=>{this.player.debug.warn("Flv","pause -> play and play error",p),this.player.pause().then(()=>{b(p)})})):this._play({...this._opt,muted:this.muted,volume:this.volume}).then(()=>{this.loading=!1,this.posterControl.hide(),d()}).catch(p=>{this.player.debug.warn("Flv","this._play error",p),b(p)})})}_play(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return new Promise((i,d)=>{const b=e.url.indexOf("http")===0,l=b?Rr:ra,p=b||e.url.indexOf(".flv")!==-1||this._opt.isFlv?Rn:Dr;this.player.updateOption({protocol:l,demuxType:p}),this.player.once(vt.webglAlignmentError,()=>{this.player.off(vt.webglAlignmentError),this.pause().then(()=>{this.player.debug.log("Flv","webglAlignmentError"),this._resetPlayer({openWebglAlignment:!0}),this.play(e).then(()=>{this.player.debug.log("Flv","webglAlignmentError and play success")}).catch(()=>{this.player.debug.log("Flv","webglAlignmentError and play error")})})}),this.player.once(vt.mediaSourceH265NotSupport,()=>{this.player.off(vt.mediaSourceH265NotSupport),this.pause().then(()=>{this.player._opt.autoWasm&&(this.player.debug.log("Flv","auto wasm [mse-> wasm] reset player and play"),this._resetPlayer({useMSE:!1}),this.play(e).then(()=>{this.player.debug.log("Flv","auto wasm [mse-> wasm] reset player and play success")}).catch(()=>{this.player.debug.log("Flv","auto wasm [mse-> wasm] reset player and play error")}))})}),this.player.once(vt.mediaSourceFull,()=>{this.pause().then(()=>{this.player.debug.log("Flv","media source full"),this._resetPlayer(),this.play(e).then(()=>{this.player.debug.log("Flv","media source full and reset player and play success")}).catch(()=>{this.player.debug.warn("Flv","media source full and reset player and play error")})})}),this.player.once(vt.mediaSourceAppendBufferError,()=>{this.pause().then(()=>{this.player.debug.log("Flv","media source append buffer error"),this._resetPlayer(),this.play(e).then(()=>{this.player.debug.log("Flv","media source append buffer error and reset player and play success")}).catch(()=>{this.player.debug.warn("Flv","media source append buffer error and reset player and play error")})})}),this.player.once(vt.mediaSourceBufferListLarge,()=>{this.pause().then(()=>{this.player.debug.log("Flv","media source buffer list large"),this._resetPlayer(),this.play(e).then(()=>{this.player.debug.log("Flv","media source buffer list large and reset player and play success")}).catch(()=>{this.player.debug.warn("Flv","media source buffer list large and reset player and play error")})})}),this.player.once(vt.mediaSourceAppendBufferEndTimeout,()=>{this.pause().then(()=>{this.player.debug.log("Flv","media source append buffer end timeout"),this._resetPlayer(),this.play(e).then(()=>{this.player.debug.log("Flv","media source append buffer end timeout and reset player and play success")}).catch(()=>{this.player.debug.warn("Flv","media source append buffer end timeout and reset player and play error")})})}),this.player.once(vt.mseSourceBufferError,()=>{this.pause().then(()=>{this.player.debug.log("Flv","mseSourceBufferError close success")})}),this.player.once(vt.webcodecsH265NotSupport,()=>{this.pause().then(()=>{this.player._opt.autoWasm&&(this.player.debug.log("Flv","auto wasm [wcs-> wasm] reset player and play"),this._resetPlayer({useWCS:!1}),this.play(e).then(()=>{this.player.debug.log("Flv","auto wasm [wcs-> wasm] reset player and play success")}).catch(()=>{this.player.debug.warn("Flv","auto wasm [wcs-> wasm] reset player and play error")}))})}),this.player.once(vt.wasmDecodeError,()=>{this.player._opt.wasmDecodeErrorReplay&&this.pause().then(()=>{this.player.debug.log("Flv","wasm decode error and reset player and play"),this._resetPlayer({useWCS:!1}),this.play(e).then(()=>{this.player.debug.log("Flv","wasm decode error and reset player and play success")}).catch(()=>{this.player.debug.warn("Flv","wasm decode error and reset player and play error")})})}),this.player.off(te.delayTimeout,this._onDelayTimeout),this._onDelayTimeout=this._onDelayTimeout.bind(this),this.player.once(te.delayTimeout,this._onDelayTimeout),this.player.off(te.heartTimeout,this._onHeartTimeout),this._onHeartTimeout=this._onHeartTimeout.bind(this),this.player.once(te.heartTimeout,this._onHeartTimeout),this.player.off(te.loadingTimeout,this._onLoadingTimeout),this._onLoadingTimeout=this._onLoadingTimeout.bind(this),this.player.once(te.loadingTimeout,this._onLoadingTimeout),this.player.off(te.streamSuccess,this._onStreamSuccess),this._onStreamSuccess=this._onStreamSuccess.bind(this),this.player.once(te.streamSuccess,this._onStreamSuccess),this.player.off(te.streamError,this._onStreamError),this._onStreamError=this._onStreamError.bind(this),this.player.once(te.streamError,this._onStreamError),this.hasLoaded()?this.player.play(e).then(()=>{var t,a;(t=this.player)!==null&&t!==void 0&&(t=t.video)!==null&&t!==void 0&&t.$videoElement&&((a=this.urlInfo.query)===null||a===void 0?void 0:a.playbackSpeed)>=1&&(this.player.video.$videoElement.playbackRate=this.urlInfo.query.playbackSpeed),i()}).catch(t=>{if(this.player){this.player.debug.warn("Flv","hasLoaded and play error",t),t==null||t.name;try{this.player.pause().then(()=>{d(t)})}catch{}}}):this.player.once(te.decoderWorkerInit,()=>{this.player.play(e).then(()=>{var t,a;(t=this.player)!==null&&t!==void 0&&(t=t.video)!==null&&t!==void 0&&t.$videoElement&&((a=this.urlInfo.query)===null||a===void 0?void 0:a.playbackSpeed)>=1&&(this.player.video.$videoElement.playbackRate=this.urlInfo.query.playbackSpeed),i()}).catch(t=>{if(this.player){this.player.debug.warn("Flv","decoderWorkerInit and play error",t);try{this.player.pause().then(()=>{d(t)})}catch{}}})})})}_onDelayTimeout(e){this._delayTimeoutTimer=setTimeout(()=>{this._delayTimeoutTimer&&(clearTimeout(this._delayTimeoutTimer),this._delayTimeoutTimer=null),this._loadingTimeoutReplayTimes<+this.player._opt.loadingTimeoutReplayTimes||+this.player._opt.loadingTimeoutReplayTimes==-1?(this._loadingTimeoutReplayTimes+=1,this.player.debug.warn("Flv",`delay timeout replay time is ${this._loadingTimeoutReplayTimes}`),this.player.off(te.delayTimeout,this._onDelayTimeout),this.emit(te.loadingRetryTimes,this._loadingTimeoutReplayTimes),this.__play(this._opt).then(()=>{this._loadingTimeoutReplayTimes=0})):this._getDeviceStreamErrorInfo()},1e3*(this._opt.loadingTimeoutDelay||3))}_onHeartTimeout(){this._heartTimeoutDelayTimes<+this.player._opt.heartTimeoutReplayTimes||+this.player._opt.heartTimeoutReplayTimes==-1?(this._heartTimeoutDelayTimes+=1,this.player.debug.warn("Flv",`heart timeout replay time is ${this._heartTimeoutDelayTimes}`),this.player.off(te.heartTimeout,this._onLoadingTimeout),this.emit(te.heartRetryTimes,this._heartTimeoutDelayTimes),this.__play(this._opt).then(()=>{this._heartTimeoutDelayTimes=0})):this._getDeviceStreamErrorInfo()}_onLoadingTimeout(){this._loadingTimeoutDelayTimer=setTimeout(()=>{this._loadingTimeoutDelayTimer&&(clearTimeout(this._loadingTimeoutDelayTimer),this._loadingTimeoutDelayTimer=null),this._loadingTimeoutReplayTimes<+this.player._opt.loadingTimeoutReplayTimes||+this.player._opt.loadingTimeoutReplayTimes==-1?(this._loadingTimeoutReplayTimes+=1,this.player.debug.warn("Flv",`loading timeout replay time is ${this._loadingTimeoutReplayTimes}`),this.player.off(te.delayTimeout,this._onLoadingTimeout),this.emit(te.loadingRetryTimes,this._loadingTimeoutReplayTimes),this.__play(this._opt).then(()=>{this._loadingTimeoutReplayTimes=0})):this._getDeviceStreamErrorInfo()},1e3*(this._opt.loadingTimeoutDelay||3))}_getDeviceStreamErrorInfo(){var e,i;this.services&&(e=this.urlInfo)!==null&&e!==void 0&&(e=e.query)!==null&&e!==void 0&&e.sid?this.services.getStreamInterreputInfo((i=this.urlInfo)===null||i===void 0||(i=i.query)===null||i===void 0?void 0:i.sid).then(d=>{if(this.playing=!1,d.meta.code===200){var b,l;let p=this.i18n.t((b=d.data)===null||b===void 0?void 0:b.intrCode);/^\[missing /.test(p)?(l=d.data)!==null&&l!==void 0&&l.intrCode?this.emit(te.message,this.i18n.t("fetchError")+` [${d.data.intrCode}]`,"fetchError"):this.emit(te.message,this.i18n.t("fetchError"),"fetchError"):this.emit(te.message,p+` [${d.data.intrCode}]`,"fetchError")}else this.emit(te.message,this.i18n.t("fetchError"),"fetchError")}).catch(()=>{this.playing=!1,this.emit(te.message,this.i18n.t("fetchError"),"fetchError")}):(this.playing=!1,this.emit(te.message,this.i18n.t("fetchError"),"fetchError"))}_onStreamSuccess(){this.emit(te.streamSuccess)}_onStreamError(){this.emit(te.streamError)}setBufferTime(e){var i,d;e=Number(e),this.player.updateOption({videoBuffer:1e3*e}),(i=this.player)===null||i===void 0||(i=i.decoderWorker)===null||i===void 0||(d=i.updateWorkConfig)===null||d===void 0||d.call(i,{key:"videoBuffer",value:1e3*e})}setRotate(e){at.report(50,{name:"setRotate",value:e});try{e=parseInt(e,10)}catch{return Promise.reject("rotate 0 | 90 | 180 | 270")}return new Promise((i,d)=>{ai.ROTATE.includes(e)?(this.player.updateOption({rotate:e}),this.player.resize(),i()):d("rotate 0 | 90 | 180 | 270")})}hasLoaded(){return this.player.loaded}setKeepScreenOn(){this.player.updateOption({keepScreenOn:!0}),at.report(50,{name:"setKeepScreenOn"})}get videoInfo(){return this._videoInfo}get currentTime(){return this.player.video?this.player.video.currentTime:0}screenshot(e){let i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"png",d=arguments.length>2&&arguments[2]!==void 0?arguments[2]:.92,b=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"download";if(this.player.video)return d=+d,this.player.video.screenshot(e,i,d,b)}getState(){return{playing:!!this.player&&this.player.playing,muted:!(this.player&&this.muted),fullscreen:this.currentFullscreen,loaded:!!this.player&&this.player.loaded,volume:this.player?parseFloat(this.player.volume).toFixed(2):0,isDebug:!!this.player&&this.player.isDebug}}getOptions(){return this.player?this.player._opt:{}}getVersion(){return at.report(50,{name:"getVersion"}),"2.0.2"}static supportType(e){if(e.type==="flv")return!0;if(e.url){let i=e.url;i.startsWith("http://")||i.startsWith("https://")||(i=/^\/\//.test(i)?"http:"+i:location.origin+location.pathname+i);try{return/\.flv$/i.test(new URL(i).pathname)}catch{}}return!1}_onvisibilitychange(){!document.hidden&&this.playing&&this.muted&&this.options.isLive&&this.pause().finally(()=>{var e;(e=this.play)===null||e===void 0||e.call(this).catch(i=>{})})}}return Dt(ai,"ERROR",vt),Dt(ai,"EVENTS",te),Dt(ai,"QUALITY_ENUM",Hi),Dt(ai,"ROTATE",[0,90,180,270]),Dt(ai,"TIMEOUT",{delayTimeout:te.delayTimeout}),Dt(ai,"version","2.0.2"),ai})})(yo);var fs=yo.exports;const ms=hs(fs),Ji=Ka.create({baseURL:"https://home.ynims.com:6060",headers:{"Content-Type":"application/json"}});Ji.interceptors.request.use(yt=>(yt.headers={"Content-Type":"application/json"},yt),yt=>{console.log(yt),Promise.reject(yt)});Ji.interceptors.response.use(yt=>{const _t=yt.data;return yt.status===200?_t.code===0||(_t.code===401?Promise.reject(_t):_t.code===-1&&Zi.error(_t.errorMsg)):Ya.open({message:"提示",description:_t.errorMsg,icon:()=>Xa(Za,{style:"color: #ff4d4f"}),onClick:()=>{console.log("Notification Clicked!")}}),_t},yt=>(console.log("err"+yt),Promise.reject(yt)));const lr=yt=>(is("data-v-6581adc9"),yt=yt(),ns(),yt),_s={class:"the-box9"},vs={class:"change-num"},gs={key:0,class:"btn",src:or,alt:""},ys={key:1,class:"icon",src:ar,alt:""},bs={key:2,class:"icon",src:sr,alt:""},Es=lr(()=>Ge("div",{class:"text"},"本周菜品",-1)),Ss={key:0,class:"btn",src:or,alt:""},Cs={key:1,class:"icon",src:ar,alt:""},ws={key:2,class:"icon",src:sr,alt:""},ks=lr(()=>Ge("div",{class:"text"},"本周活动",-1)),Ts={key:0,class:"btn",src:or,alt:""},Ls={key:1,class:"icon",src:ar,alt:""},Bs={key:2,class:"icon",src:sr,alt:""},Is=lr(()=>Ge("div",{class:"text"},"监控视频",-1)),Os={class:"info_contenbox"},xs={key:0,class:"activebox"},Rs={key:0,class:"scollrcontent"},Ds={class:"week_name"},Ms=["innerHTML"],Ps=["innerHTML"],$s=["innerHTML"],Us={key:1,class:"activebox"},Fs=ts('<div class="headoinfo" data-v-6581adc9><p class="time_name" data-v-6581adc9>上午</p><p class="time_text1" data-v-6581adc9>08:00-09:00</p><p class="time_text2" data-v-6581adc9></p><p class="time_name" data-v-6581adc9>下午</p><p class="time_text1" data-v-6581adc9>16:00-17:00</p></div>',1),Ns={class:"scollrcontent"},Vs={class:"time_name"},js={class:"time_text1"},Gs={class:"time_text1"},Qs={key:2,id:"video_content",style:{width:"430px !important",height:"280px !important","margin-left":"-15px !important"}},zs={__name:"Toast",props:["pageinfo"],setup(yt){const _t=fi(0),Dt=fi(null),Mt=yt;console.log("props.pageinfo",Mt.pageinfo);const mi=Ut=>{console.log(Ut),_t.value=Ut,Ut==2&&_i()},_i=()=>{var Ut;if(!Mt.pageinfo.tenantList||!((Ut=Mt.pageinfo.tenantList)!=null&&Ut.length)||!Mt.pageinfo.tenantList[0].tenantId)return Zi.error("暂无监控资源!");try{Ji.get("/v2/api/screen/getCameraAddress?organizationId="+Mt.pageinfo.tenantList[0].tenantId).then(tt=>{if(tt.code==200){const wt=tt.data.data.url;if(!wt)return Zi.error("暂无监控资源!");setTimeout(()=>{Dt.value=new ms({url:wt,id:"video_content",decoder:"/decoder.js",autoPlay:!0})},500)}})}catch(tt){console.log("error",tt),Zi.error("暂无监控资源!")}};return es(()=>{Dt.value&&Dt.value.destroy()}),(Ut,tt)=>(ft(),mt("div",_s,[Ge("div",vs,[Ge("div",{class:er(["change-num-item",{isActive:_t.value===0}]),onClick:tt[0]||(tt[0]=wt=>mi(0))},[_t.value===0?(ft(),mt("img",gs)):ci("",!0),_t.value===0?(ft(),mt("img",ys)):(ft(),mt("img",bs)),Es],2),Ge("div",{class:er(["change-num-item",{isActive:_t.value===1}]),onClick:tt[1]||(tt[1]=wt=>mi(1))},[_t.value===1?(ft(),mt("img",Ss)):ci("",!0),_t.value===1?(ft(),mt("img",Cs)):(ft(),mt("img",ws)),ks],2),Ge("div",{class:er(["change-num-item",{isActive:_t.value===2}]),onClick:tt[2]||(tt[2]=wt=>mi(2))},[_t.value===2?(ft(),mt("img",Ts)):ci("",!0),_t.value===2?(ft(),mt("img",Ls)):(ft(),mt("img",Bs)),Is],2)]),Ge("div",Os,[_t.value==0?(ft(),mt("div",xs,[yt.pageinfo.weekDishes?(ft(),mt("div",Rs,[(ft(!0),mt(nr,null,rr(yt.pageinfo.weekDishes,(wt,ni)=>(ft(),mt("div",{class:"list_dishe",key:ni},[Ge("p",Ds,Ci(wt[0]),1),Ge("p",{class:"valuetext",innerHTML:wt[1]},null,8,Ms),Ge("p",{class:"valuetext",innerHTML:wt[2]},null,8,Ps),Ge("p",{class:"valuetext",innerHTML:wt[3]},null,8,$s)]))),128))])):ci("",!0)])):ci("",!0),_t.value==1?(ft(),mt("div",Us,[Fs,Ge("div",Ns,[(ft(!0),mt(nr,null,rr(yt.pageinfo.weekActivity,(wt,ni)=>(ft(),mt("div",{class:"list_detial",key:ni},[Ge("p",Vs,Ci(wt.weekday),1),Ge("div",js,[Ge("p",null,Ci(wt.morning),1)]),Ge("div",Gs,[Ge("p",null,Ci(wt.afternoon),1)])]))),128))])])):ci("",!0),_t.value==2?(ft(),mt("div",Qs)):ci("",!0)])]))}},Hs=Ja(zs,[["__scopeId","data-v-6581adc9"]]),Ws="/assets/backbtnimg-CkMcIRZk.png",qs="/assets/index_todayactive-PLRCv3o7.png",Ks="/assets/index_detailtoast-D3OGocAM.png",Ys={class:"room_info"},Xs={class:"left_infocontent"},Zs={class:"left-top",style:{display:"flex","align-items":"baseline"}},Js=["src"],el=Ge("span",{class:"btn-icon"},"▶",-1),tl=Ge("span",{class:"btn-text"},"视频介绍",-1),il=[el,tl],nl=Ge("div",{class:"btn-hint"},"点击查看机构介绍视频",-1),rl={class:"desc_imgvideobox"},ol=["src"],al={class:"backPlateBox boxwidthele"},sl={class:"roomdesctextbox"},ll={class:"right_infcontnet"},Al={class:"backPlateBox todayactive"},dl={class:"toady_activebox"},cl={class:"left_text"},ul={class:"backPlateBox toastbox"},hl={class:"video-modal-header"},pl={class:"video-container"},fl={key:0,class:"video-player",id:"videoPlayer",controls:"",autoplay:""},ml=["src"],_l={key:1,class:"no-video"},vl=Ge("p",null,"暂无视频介绍",-1),gl=[vl],wl={__name:"roomdetail",emits:["dow_map"],setup(yt,{emit:_t}){const Dt=_t,Mt=rs(),mi=os(),_i=as(),Ut=fi([]),tt=fi({}),wt=fi(""),ni=fi(!1),vi=fi(""),en=fi(localStorage.getItem("isGrid")),Li={石溪:"https://kyj-bucket.oss-cn-hangzhou.aliyuncs.com/%E7%9F%B3%E6%BA%AA%E9%99%A2.mp4",东涌:"https://kyj-bucket.oss-cn-hangzhou.aliyuncs.com/%E4%B8%9C%E6%B6%8C%E9%99%A2.mp4",海珠:"https://kyj-bucket.oss-cn-hangzhou.aliyuncs.com/%E6%B5%B7%E7%8F%A0%E9%99%A2.mp4",五心:"https://kyj-bucket.oss-cn-hangzhou.aliyuncs.com/%E4%BA%94%E5%BF%83%E9%99%A2.mp4",南沙:"https://kyj-bucket.oss-cn-hangzhou.aliyuncs.com/%E5%8D%97%E6%B2%99%E9%99%A2.mp4",天河老人院:"https://kyj-bucket.oss-cn-hangzhou.aliyuncs.com/%E5%A4%A9%E6%B2%B3%E5%88%86%E9%99%A2%E4%BB%8B%E7%BB%8D.mp4",天河颐养:"https://kyj-bucket.oss-cn-hangzhou.aliyuncs.com/%E5%A4%A9%E6%B2%B3%E5%8C%BB%E5%85%BB%E9%99%A2.mp4",从化:"https://kyj-bucket.oss-cn-hangzhou.aliyuncs.com/%E4%BB%8E%E5%8C%96%E9%99%A2.mp4",花都:"https://kyj-bucket.oss-cn-hangzhou.aliyuncs.com/%E8%8A%B1%E9%83%BD%E9%99%A2.mp4",黄冈:"https://kyj-bucket.oss-cn-hangzhou.aliyuncs.com/%E9%BB%84%E5%86%88%E9%99%A2.mp4",秭归:"",麻城:"https://kyj-bucket.oss-cn-hangzhou.aliyuncs.com/%E9%BA%BB%E5%9F%8E%E9%99%A2.mp4",阳新:"https://kyj-bucket.oss-cn-hangzhou.aliyuncs.com/%E9%98%B3%E6%96%B0%E9%99%A2.mp4",沙市:"",鄂州:"https://kyj-bucket.oss-cn-hangzhou.aliyuncs.com/%E9%84%82%E5%B7%9E%E9%99%A2.mp4"};ss(()=>{Mt.setIsRoomDetailpage(!0),Mt.tenantId=_i.query.tenantId,wt.value=_i.query.title,Ii(),ls.on("roomDetails",Ft=>{console.log("监听全局emit预警事件data",Ft),Ft&&Bi(Ft)})});const Bi=async Ft=>{if(Ft.data.organizationId==Mt.tenantId)try{Ji.get("/v2/api/screen/getTodayData?tenantId="+Ft.data.organizationId).then(Nt=>{Nt.code==200&&(Ut.value=Nt.data)})}catch(Nt){console.log("error",Nt),message.error("暂无监控资源!")}},tn=()=>{Dt("dow_map",1),mi.push({path:"/index/main"})},ei=()=>{for(const Ft in Li)wt.value.includes(Ft)&&(vi.value=Li[Ft]);ni.value=!0},Ui=()=>{ni.value=!1,vi.value=""},Ii=()=>{let Ft={};Mt.isRoomDetailpage?Ft={tenantIds:Mt.tenantId,queryFlag:2}:Ft={tenantIds:Mt.tenantId,queryFlag:1},us(Ft).then(Nt=>{Nt.data.todayUpdate.length?Ut.value=Nt.data.todayUpdate:Ut.value=[],tt.value=Nt.data,Dt("dow_map",Nt.data)})};return As(()=>{Mt.setIsRoomDetailpage(!1)}),(Ft,Nt)=>(ft(),mt("div",Ys,[Ge("div",Xs,[Ge("div",Zs,[en.value==0?(ft(),mt("div",{key:0,class:"backbtn",onClick:tn},[Ge("img",{src:Yi(Ws),alt:""},null,8,Js)])):ci("",!0),Ge("div",{class:"video-play-btn-wrapper"},[Ge("div",{class:"video-play-btn",onClick:ei},il),nl])]),Ge("div",rl,[Ge("img",{src:tt.value&&tt.value.tenantList&&tt.value.tenantList[0].picture?tt.value.tenantList[0].picture:"",alt:""},null,8,ol)]),Ge("div",al,[Xi(ir,{title:tt.value&&tt.value.tenantList&&tt.value.tenantList[0].enterpriseName?tt.value.tenantList[0].enterpriseName:"",url:Yi(ps)},{default:tr(()=>[Ge("div",sl,Ci(tt.value&&tt.value.tenantList&&tt.value.tenantList[0].introduction?tt.value.tenantList[0].introduction:"暂无介绍"),1)]),_:1},8,["title","url"])])]),Ge("div",ll,[Ge("div",Al,[Xi(ir,{title:"今日动态",url:Yi(qs)},{default:tr(()=>[Ge("div",dl,[(ft(!0),mt(nr,null,rr(Ut.value,(ri,nn)=>(ft(),mt("div",{class:"list_acitve",key:nn},[Ge("p",cl,Ci(ri.content),1)]))),128))])]),_:1},8,["url"])]),Ge("div",ul,[Xi(ir,{title:"院级公告",url:Yi(Ks)},{default:tr(()=>[Xi(Hs,{pageinfo:tt.value},null,8,["pageinfo"])]),_:1},8,["url"])])]),ni.value?(ft(),mt("div",{key:0,class:"video-modal",onClick:Ui},[Ge("div",{class:"video-modal-content",onClick:Nt[0]||(Nt[0]=cs(()=>{},["stop"]))},[Ge("div",hl,[Ge("h3",null,Ci(wt.value)+" - 视频介绍",1),Ge("span",{class:"close-btn",onClick:Ui},"×")]),Ge("div",pl,[vi.value?(ft(),mt("video",fl,[Ge("source",{src:vi.value,type:"video/mp4"},null,8,ml),ds(" 您的浏览器不支持视频播放 ")])):(ft(),mt("div",_l,gl))])])])):ci("",!0)]))}};export{wl as default};