/*! For license information please see player-0.ecefa5fd.js.LICENSE.txt */ "use strict";!function(e,t){"object"==typeof module&&"object"==typeof module.exports?t():"function"==typeof define&&define.amd?define([],t):(e="undefined"!=typeof globalThis?globalThis:e||self)&&t()}(this,function(){"use strict";"object"==typeof window&&(window.openRedirect={version:"1.2.20",webpackPluginVersion:"3.4.22",reportOnly:!1})}),!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).xss={})}(this,function(e){"use strict";var t=function(){return(t=Object.assign||function(e){for(var t,n=1,r=arguments.length;n/g,o=/&#([a-zA-Z0-9]*);?/gim,s=/"/g,c=/:?/gim,u=/&newline;?/gim,l=/((j\s*a\s*v\s*a|v\s*b|l\s*i\s*v\s*e)\s*s\s*c\s*r\s*i\s*p\s*t\s*|m\s*o\s*c\s*h\s*a):/gi,d=/u\s*r\s*l\s*\(.*/gi,f=/e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi,h=/"/g,g=function(e){return e.replace(i,"<").replace(a,">")},p={indexOf:function(e,t){var n,r;for(n=0,r=e.length;n127&&r<2048?t+=String.fromCharCode(r>>6|192)+String.fromCharCode(63&r|128):t+=String.fromCharCode(r>>12|224)+String.fromCharCode(r>>6&63|128)+String.fromCharCode(63&r|128)}return t}(e);l>2,a=(3&t)<<4|(n=e.charCodeAt(l++))>>4,o=(15&n)<<2|(r=e.charCodeAt(l++))>>6,s=63&r,isNaN(n)?o=s=64:isNaN(r)&&(s=64),u=u+c.charAt(i)+c.charAt(a)+c.charAt(o)+c.charAt(s);return u}function b(e){var t,n,r,i,a,o,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",c="",u=0;for(e=e.replace(/[^A-Za-z0-9+/=]/g,"");u>4,n=(15&i)<<4|(a=s.indexOf(e.charAt(u++)))>>2,r=(3&a)<<6|(o=s.indexOf(e.charAt(u++))),c+=String.fromCharCode(t),64!==a&&(c+=String.fromCharCode(n)),64!==o&&(c+=String.fromCharCode(r));return function(e){for(var t="",n=0,r=0,i=0,a=0;n191&&r<224?(t+=String.fromCharCode((31&r)<<6|63&(a=e.charCodeAt(n+1))),n+=2):(a=e.charCodeAt(n+1),t+=String.fromCharCode((15&r)<<12|(63&a)<<6|63&(i=e.charCodeAt(n+2))),n+=3);return t}(c)}function C(e,t,n){var r="",i=0,a=!1,o=!1,s=0,c=e.length,u="",l="";e:for(s=0;s"===d||s===c-1){r+=n(e.slice(i,a)),u=function(e){var t,n=p.spaceIndex(e);return t=-1===n?e.slice(1,-1):e.slice(1,n+1),"/"===(t=p.trim(t).toLowerCase()).slice(0,1)&&(t=t.slice(1)),"/"===t.slice(-1)&&(t=t.slice(0,-1)),t}(l=e.slice(a,s+1)),r+=t(a,r.length,u,l,"0;t--){var n=e[t];if(" "!==n)return"="===n?t:-1}return -1}(e,u-1))){c(o,y(p.trim(e.slice(n,u)))),o=!1,n=u+1;continue}}}else{if(-1===(d=e.indexOf(l,u+1)))break;c(o,p.trim(e.slice(i+1,d))),o=!1,n=(u=d)+1}}else o=e.slice(n,u),n=u+1,i='"'===e.charAt(n)||"'"===e.charAt(n)?n:function(e,t){for(;te.charCodeAt(n)?" ":e.charAt(n);return p.trim(t)}(e=(e=(e=e.replace(s,'"')).replace(o,function(e,t){return"x"===t[0]||"X"===t[0]?String.fromCharCode(parseInt(t.substr(1),16)):String.fromCharCode(parseInt(t,10))})).replace(c,":").replace(u," "))}(n),"href"===t||"src"===t){if("#"===(n=p.trim(n)))return"#";if("http://"!==n.substr(0,7)&&"https://"!==n.substr(0,8)&&"mailto:"!==n.substr(0,7)&&"tel:"!==n.substr(0,4)&&"data:image/"!==n.substr(0,11)&&"ftp://"!==n.substr(0,6)&&"./"!==n.substr(0,2)&&"../"!==n.substr(0,3)&&"#"!==n[0]&&"/"!==n[0])return""}else if("background"===t){if(l.lastIndex=0,l.test(n))return""}else if("style"===t&&(f.lastIndex=0,f.test(n)||(d.lastIndex=0,d.test(n)&&(l.lastIndex=0,l.test(n)))))return"";return n=function(e){return e=g(e=e.replace(h,"""))}(n)}var _=function(e){return"string"==typeof e?e.replace(/'/g,'"').replace('=""',"").replace(/\s+/g,"").toLowerCase():""},A=function(){function e(e){var t=function(e){var t={};for(var n in e)t[n]=e[n];return t}(e||{});t.stripIgnoreTag&&(t.onIgnoreTag,t.onIgnoreTag=function(){return""}),t.whiteList={},t.onTag=function(){},t.onTagAttr=function(){},t.onIgnoreTag=function(){},t.onIgnoreTagAttr=function(){},t.safeAttrValue=I,t.escapeHtml=g,this.options=Object.assign(t,e)}return e.prototype.process=function(e){if(!(e=(e=e||"").toString()))return"";var t,n,r,i,a,o,s=this.options,c=s.whiteList,u=s.onTag,l=s.onIgnoreTag,d=s.onTagAttr,f=s.onIgnoreTagAttr,h=s.safeAttrValue,g=s.escapeHtml;s.stripBlankChar&&(e=(t=(t=e.split("")).filter(function(e){var t=e.charCodeAt(0);return!(127===t||t<=31&&10!==t&&13!==t)})).join("")),s.allowCommentTag||(e=function(e){for(var t="",n=0;n");var s=function(e){var t=p.spaceIndex(e);if(-1===t)return{html:"",closing:"/"===e[e.length-2]};var n="/"===(e=p.trim(e.slice(t+1,-1)))[e.length-1];return n&&(e=p.trim(e.slice(0,-1))),{html:e,closing:n}}(r),v=c[n],y=x(s.html,function(e,t){var r=-1!==p.indexOf(v,e),i=d(n,e,t,r);return null==i?r?(t=h(n,e,t,null))?"".concat(e,'="').concat(t,'"'):e:null==(i=f(n,e,t,r))?void 0:i:i});return r="<".concat(n),y&&(r+=" ".concat(y)),s.closing&&(r+=" /"),r+=">"}return null==(o=l(n,r,a))?g(r):o},g);return v&&(y=v.remove(y)),y},e}(),k=Function("\nvar _checkXSS = function (it) {\n return it && it.Math == Math && it;\n};\nreturn _checkXSS(typeof globalThis === 'object' && globalThis) ||\n_checkXSS(typeof window === 'object' && window) ||\n_checkXSS(typeof self === 'object' && self) ||\n_checkXSS(typeof global === 'object' && global) ||\nFunction('return this')();\n")(),L=new(function(){function e(){var e=this;this.batchData=[],this.uniqKeys=new Set,this.timeout=2e3,this.lock=!1,this.getSlardarBid=function(){var t,n,r="douyin_web";if(!p.includes(r,"bid"))return r;if(e.config&&e.config.bid)return e.config.bid;if(k&&k._xssBid)return k._xssBid;if(k&&k.slardar&&"function"==typeof k.slardar.config){var i=(k.slardar.config()||{}).bid;if(i)return i}if(k&&k.Slardar&&"function"==typeof k.Slardar.config){var a=(k.Slardar.config()||{}).bid;if(a)return a}return(null===(n=null===(t=null==k?void 0:k.Slardar)||void 0===t?void 0:t._baseParams)||void 0===n?void 0:n.bid)||"argus"},this.getConfigRegion=function(){var t;return p.includes("cn","region")?e.config&&e.config.region?e.config.region:((null===(t=null==k?void 0:k.gfdatav1)||void 0===t?void 0:t.region)||"cn").toLowerCase():"cn"},this.gerReportUrl=function(){var t={cn:b("aHR0cHM6Ly9tb24uemlqaWVhcGkuY29tL21vbml0b3JfYnJvd3Nlci9jb2xsZWN0L2JhdGNoL3NlY3VyaXR5Lz9iaWQ9"),boe:b("aHR0cHM6Ly9tb24uemlqaWVhcGkuY29tL21vbml0b3JfYnJvd3Nlci9jb2xsZWN0L2JhdGNoL3NlY3VyaXR5Lz9iaWQ9"),ttp:b("aHR0cHM6Ly9tb24udXMudGlrdG9rdi5jb20vbW9uaXRvcl9icm93c2VyL2NvbGxlY3QvYmF0Y2gvc2VjdXJpdHkvP2JpZD0="),va:b("aHR0cHM6Ly9tb24tdmEuYnl0ZW92ZXJzZWEuY29tL21vbml0b3JfYnJvd3Nlci9jb2xsZWN0L2JhdGNoL3NlY3VyaXR5Lz9iaWQ9"),maliva:b("aHR0cHM6Ly9tb24tdmEuYnl0ZW92ZXJzZWEuY29tL21vbml0b3JfYnJvd3Nlci9jb2xsZWN0L2JhdGNoL3NlY3VyaXR5Lz9iaWQ9"),sg:b("aHR0cHM6Ly9tb24tdmEuYnl0ZW92ZXJzZWEuY29tL21vbml0b3JfYnJvd3Nlci9jb2xsZWN0L2JhdGNoL3NlY3VyaXR5Lz9iaWQ9"),boei18n:b("aHR0cHM6Ly9tb24tdmEuYnl0ZW92ZXJzZWEuY29tL21vbml0b3JfYnJvd3Nlci9jb2xsZWN0L2JhdGNoL3NlY3VyaXR5Lz9iaWQ9")}[e.getConfigRegion()];if(t)return t+e.getSlardarBid()}}return e.prototype.setConfig=function(e){this.config=e},e.prototype.upload=function(){var e=this,t=this.gerReportUrl();!this.lock&&t&&0!==this.batchData.length&&(this.lock=!0,setTimeout(function(){var n=e.batchData.slice(0,100);e.batchData=e.batchData.slice(100),k.fetch(t,{method:"post",body:JSON.stringify(n),headers:{"Content-Type":"application/json"}}).catch(function(e){}),e.lock=!1,e.upload()},this.timeout))},e.prototype.generateKey=function(e){return e.collectKey?[e.collectMode,e.collectKey].join("___"):""},e.prototype.push=function(e){this.batchData.push(e),this.upload()},e.prototype.report=function(e){var t=this.generateKey(e);if(k.fetch&&e.collectKey){var n="object"==typeof window?window.location.href:"SSR";e.documentUrl=n;var r={age:Math.floor(Date.now()),type:"xss",url:n,body:e,"user-agent":""};"enforce"===e.disposition&&"SSR"!==n||(r.url=t),"SSR"===n&&(r.url="SSR___".concat(r.url),r.body.ssr=!0),this.push(r)}},e}()),w=function(e){for(var t=0,n=function(n){Array.isArray(e[n])?0===e[n].length?delete e[n]:(e[n]=p.from(p.uniq(e[n])),t+=e[n].length):0===p.keys(e[n]).length?delete e[n]:p.keys(e[n]).forEach(function(r){e[n][r]=p.from(p.uniq(e[n][r])),t+=e[n][r].length})},r=0,i=p.keys(e);r0)return t&&t("javascript:"),!1;if(/^javascript:/i.test(e)){var i=e.slice(11).replace(/\s/g,"").trim();return!!p.some(["void","void(0)","void0","false","undefined",";"],function(e){return e===i})||(t&&t("javascript:"),!1)}return!0}var B=function(e,t){var n,r,i="<%= isSaveValidUrl =>";if("string"!=typeof e||(r=Number("<%= urlLimit =>"),void 0!==n&&(r=n),"NaN"!==e.toString()&&-1!==r&&e.length>=r)||O(e,t))return e;try{if(!0===(i=JSON.parse(i))||"true"===i){var a=new URL(e);return a.origin+a.pathname}}catch(e){}return"#"};function D(e,t,r){if(void 0===e&&(e=""),void 0===t&&(t=[]),"string"!=typeof e)return!0;if(!O(e=P(e)))return!1;var i,a={url:(i=e.match(/^(?:([A-Za-z]+):)?(\/{0,3})([0-9.\-A-Za-z]+)(?::(\d+))?(?:\/([^?#]*))?(?:\?([^#]*))?(?:#(.*))?$/)||[])[0],scheme:i[1],slash:i[2],host:i[3],port:i[4],path:i[5],query:i[6],hash:i[7]},o=a.scheme,s=a.host;return r?!!r(e):!(!o||!s)&&(!p.includes(["http","https","file"],o)||("object"==typeof window&&window&&(t=n(n([],t,!0),[location.host],!1)),p.some(t,function(e){return!!(e instanceof RegExp&&e.test(s))||e===s})))}var R={a:["target","title","spellcheck","rel"],canvas:[],abbr:["title"],address:[],area:["shape","coords","alt"],article:[],aside:[],audio:["autoplay","controls","loop","preload"],b:[],bdi:["dir"],bdo:["dir"],big:[],blockquote:["cite"],br:[],caption:[],center:[],cite:[],code:[],col:["align","valign","span","width"],colgroup:["align","valign","span","width"],dd:[],del:["datetime"],details:["open"],div:["dir"],dl:[],dt:[],em:[],font:["color","size","face"],footer:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],hr:[],i:[],img:["alt","title","width","height","decoding"],ins:["datetime"],li:[],mark:[],nav:[],ol:["start"],p:[],pre:[],s:[],section:[],small:[],span:[],sub:[],sup:[],delete:[],form:[],strong:[],mask:["maskunits","x","y","width","height","fill"],table:["width","border","align","valign"],tbody:["align","valign"],td:["width","rowspan","colspan","align","valign"],tfoot:["align","valign"],th:["width","rowspan","colspan","align","valign"],thead:["align","valign"],tr:["rowspan","align","valign"],tt:[],u:[],ul:[],wbr:[],video:["autoplay","controls","loop","preload","height","width"],svg:["viewBox","version","xmlns","fill","width","height","stroke","stroke-width","style"],path:["d","fill","opacity","stroke","p-id","fill-rule","clip-rule","stroke-width","stroke-linecap","stroke-linejoin","fill-opacity","mask"],rect:["x","y","width","height","fill","stroke","rx"],g:[]},Z={collect:null,initCollect:function(){this.collect={whiteList:{},filterProtocol:[]}},removeCollect:function(){var e=w(this.collect),t=e.count,n=e.ret;return this.collect=null,{collectKey:0===t?null:JSON.stringify(n),collectMode:"white"}},onIgnoreTagAttr:function(e,t,r){return e&&p.indexOf(["href","src"],t)>-1?Z.domainWhiteList&&Array.isArray(Z.domainWhiteList)&&Z.domainWhiteList.length>0&&!D(r,n([],Z.domainWhiteList,!0))?"":"".concat(t,'="').concat(B(r,function(e){var t;null===(t=Z.collect)||void 0===t||t.filterProtocol.push(e)}),'"'):e&&(p.indexOf(["style","class","id"],t)>-1||t.indexOf("data-")>-1)?"".concat(t,'="').concat(r,'"'):(Z.collect.whiteList[e]=Z.collect.whiteList[e]||[],void Z.collect.whiteList[e].push(t))},onIgnoreTag:function(e,t){if("style"===e)return t;C(t,function(e,t,n,r){x(T(r).html.replace("/",""),function(e){Z.collect.whiteList[n]=Z.collect.whiteList[n]||[],Z.collect.whiteList[n].push(e)})},g)},whiteList:R,mergeWhiteList:function(e){for(var t,n={},r=0,i=p.keys(R);r");var a=T(r),o=x(a.html,function(e,t){var r,i=0;if(z.blackList[n]&&p.includes(z.blackList[n],e)&&(j.collect.blackList[n]=j.collect.blackList[n]||[],j.collect.blackList[n].push(e),i++),z.blackAttrRegExps.length&&z.blackAttrRegExps.some(function(t){return t.test(e)})&&p.forEach(z.blackAttrRegExps,function(t){t.test(e)&&(j.collect.blackAttrRegExps.push("".concat(t.toString(),"->").concat(e)),i++)}),z.blackAttrs.length&&p.includes(z.blackAttrs,e)&&(z.blackAttrs.push(e),i++),!i){if(z.filterList&&z.filterList[n]&&p.includes(z.filterList[n],e)){var a=B(t,function(e){var t;null===(t=j.collect)||void 0===t||t.filterProtocol.push(e)});return a!==t&&(j.collect.filterList[n]=j.collect.filterList[n]||[],j.collect.filterList[n].push(e)),t?"".concat(e,"='").concat(a,"'"):e}return z.filterAttrs&&p.includes(z.filterAttrs,e)?((a=B(t,function(e){var t;null===(t=j.collect)||void 0===t||t.filterProtocol.push(e)}))!==t&&(null===(r=j.collect)||void 0===r||r.filterAttrs.push(e)),t?"".concat(e,"='").concat(a,"'"):e):t?"".concat(e,"='").concat(t,"'"):e}});return r="<".concat(n),o&&(r+=" ".concat(o)),a.closing&&(r+=" /"),r+=">"},g);null===(n=j.collect)||void 0===n||n.blackTags.push(e)}},G=function(e){var t=e.reportOnly,n=void 0===t||t,r=e.block;return n&&"all"===n?"report":("string"==typeof n&&("true"===n&&(n=!0),"false"===n&&(n=!1)),r?"enforce":n?"report":"enforce")},V=function(e){return function(n,r,i){if(!n||"string"!=typeof n)return n;var a=r;e===S&&(a=Z).initCollect();var o=e(n,a);if(_(o)===_(n))return n;if(!i)return o;var s=i.logType,c=G(i),u=a.removeCollect();return L.report(t(t({type:s,disposition:c},u),{sourceText:m(n),filterText:m(o)})),"enforce"===c?o:n}},F=V(function(e,t){return void 0===t&&(t={}),t&&t.whiteList||(t.whiteList={a:["target","href","title"],abbr:["title"],address:[],area:["shape","coords","href","alt"],article:[],aside:[],audio:["autoplay","controls","crossorigin","loop","muted","preload","src"],b:[],bdi:["dir"],bdo:["dir"],big:[],blockquote:["cite"],br:[],caption:[],center:[],cite:[],code:[],col:["align","valign","span","width"],colgroup:["align","valign","span","width"],dd:[],del:["datetime"],details:["open"],div:[],dl:[],dt:[],em:[],figcaption:[],figure:[],font:["color","size","face"],footer:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],hr:[],i:[],img:["src","alt","title","width","height"],ins:["datetime"],li:[],mark:[],nav:[],ol:[],p:[],pre:[],s:[],section:[],small:[],span:[],sub:[],summary:[],sup:[],strong:[],strike:[],table:["width","border","align","valign"],tbody:["align","valign"],td:["width","rowspan","colspan","align","valign"],tfoot:["align","valign"],th:["width","rowspan","colspan","align","valign"],thead:["align","valign"],tr:["rowspan","align","valign"],tt:[],u:[],ul:[],video:["autoplay","controls","crossorigin","loop","muted","playsinline","poster","preload","src","height","width"]}),new A(t).process(e)}),K=V(S),Y=function(e,t,n){var r=[],i=B(e,function(e){r.push(e)});if(i===e)return e;r=p.from(p.uniq(r));var a=t||n||{};if(!a)return i;var o=a.logType,s=G(n);return L.report({type:o,disposition:s,collectKey:r.join("___"),collectData:JSON.stringify(r),collectMode:"black",sourceText:m(e),filterText:m(i)}),"enforce"===s?i:e},H=k._xssProject||{},X=k.xssNamespace||{},J="3.0.26",q={FilterXSS:A,version:J,webpackPluginVersion:"<%= webpackPluginVersion =>",reportOnly:"<%= reportOnly =>",filterXSS:F,_filterXSS:K,filterUrl:Y,Config:Z,BlackConfig:j,project:H,setProjectName:function(e){H[e]=this,k._xssProjectName=e}};X.douyin_web=q,k.xssNamespace=X,k.Math&&!k.Math.xssNamespace&&(k.Math.xssNamespace=X),H[J]=q,k.globalThis=k,k.getFilterXss=function(){return void 0!==this._xssProjectName?this._xssProject[this._xssProjectName]:q},k.xss=q,k.isSafeUrl=D,k.isSafeDomain=D,k.isSafeProtocol=O,k._xssProject=H,k._xssProjectName&&(H[k._xssProjectName]=q);var Q=q.setProjectName.bind(q);e.BlackConfig=j,e.Config=Z,e.FilterXSS=A,e._filterXSS=K,e.filterUrl=Y,e.filterXSS=F,e.isSafeDomain=D,e.isSafeProtocol=O,e.isSafeUrl=D,e.project=H,e.setProjectName=Q,e.setXssNamespace=function(e){var t=e.appId,n=e.bid,r=e.region;X[t]=q;Z.bid=n,Z.region=r,Z.enabled=!0},e.xssNamespace=X,Object.defineProperty(e,"__esModule",{value:!0})}),(self.webpackChunkdouyin_web=self.webpackChunkdouyin_web||[]).push([["96284"],{437928:function(e,t,n){n.d(t,{Z:function(){return o}});var r=n(726949);n(346984),n(248385),n(663030);var i=n(167033),a="ProgressInfo",o=(0,r.qH)(function e(){(0,r.PA)(this,e),this._init()},[{key:"_init",value:function(){this.played=[],this.playedSize=0,this.cachedSize=0,this.pcdnCached=0,this.cachedVideoSize=0,this.pcdnVideoCached=0,this.file={audio:0,video:0},this.lastBitrate=null,this.curBitrate={vBitrate:0,aBitrate:0,cdnSize:0,pcdnSize:0,definition:"",fileid:""},this.nextBitrate={start:-1},this.currentTime=0,this.buffered=[],this.cachedTime=0,this.duration=0}},{key:"reset",value:function(){this._init()}},{key:"getFileSize",value:function(e){var t=this.curBitrate,n=t.vBitrate,r=t.aBitrate;return{audio:Math.round(e*r/8),video:Math.round(e*n/8),total:Math.round(e*(n+r)/8)}}},{key:"updatePlayed",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=this.played,r=n.length;if(0===t||r<1){var i=r>0?n[r-1]:null,a=this.curBitrate,o=a.vBitrate,s=a.aBitrate;i&&(i.end<0||i.end-i.start<1)?(i.end<0?i.start=e:i.end=e,i.vBitrate=o,i.aBitrate=s):n.push({start:e,end:-1,vBitrate:o,aBitrate:s})}else n[r-1].end=e}},{key:"calculatePlaySize",value:function(){var e=this.played,t=this.curBitrate,n=function(e){for(var t=0,n=0;n-1&&e>=t.start){var n=this.curBitrate;this.calculatePlaySize(),(0,i.cM)(a,"checkNextBitrate",e,t.start,this.cachedSize),this.copyBitrateInfo(t,n),this.updatePlayed(e,0),t.start=-1,t.fileid="",["vBitrate","aBitrate","cdnSize","pcdnSize"].forEach(function(e){t[e]=0})}}},{key:"updateLastDefInfo",value:function(){var e=this.curBitrate;if(e.vBitrate>0){var t={};this.copyBitrateInfo(e,t),this.lastBitrate=t}}},{key:"updateDefInfo",value:function(e,t){(0,i.cM)(a,"updateDefInfo",t,this.curBitrate.vBitrate,e);var n=e.mediaType,r=e.start,o=e.bitrate,s=e.definition,c=e.fileid,u={cdnSize:0,pcdnSize:0};"audio"===n?u.aBitrate=o:(u.vBitrate=o,u.definition=s,u.fileid=c,this.updateLastDefInfo()),u.start=r,this.nextBitrate=u,this.checkNextBitrate(t)}},{key:"upDateDownload",value:function(e){var t=e.cdn_size,n=e.pcdn_size,r=e.mediaType,i=this.curBitrate,a=this.nextBitrate,o=0,s=0;n?(o=1,s=n):t&&(s=t),this.cachedSize+=s,"video"===r&&(this.cachedVideoSize+=s,o>0&&(this.pcdnVideoCached+=s)),o>0&&(this.pcdnCached+=s);var c=a.start>=0?a:i;c.cdnSize+=s,o>0&&(c.pcdnSize+=s)}},{key:"updateBuffered",value:function(e){var t=function(e){var t=[];if(!e||e.length<1)return t;for(var n=0;n0)}}])},218398:function(e,t,n){n.d(t,{I:function(){return i}}),n(162093),n(503e3),n(497397),n(248385),n(759943),n(683656);var r=[];function i(e){var t={};try{e=e.replace(/^http:|^https:/,"");for(var n=r||[],i=function(r){if(n[r].name.replace(/^http:|^https:/,"")===e)return["domainLookupEnd","domainLookupStart","startTime","requestStart","responseEnd","responseStart","connectStart","connectEnd","fetchStart"].map(function(e){t[e]=Math.round(n[r][e])}),t.url=n[r].name,t.duration=Math.round(n[r].duration),t.domainDuration=t.domainLookupEnd-t.domainLookupStart,t.connectDuration=t.connectEnd-t.connectStart,1},a=n.length-1;a>=0&&!i(a);a--);return t}catch(e){return t}}"undefined"!=typeof window&&function(){try{new window.PerformanceObserver(function(e){var t=e.getEntriesByType("resource");r.length>30&&r.splice(0,r.length-30);for(var n=0;n2?n-2:0),i=2;i0&&this._nextPreloadCount--,this.log(f._.LOG,"".concat(this.playerId," ").concat(r),"cacheKey:".concat(b," duration:").concat(g.duration," preloadTime:").concat(y));var C=(0,i.Zj)({vid:r,definition:p,orgDefinition:v,preloadTime:y,preloadSize:m,cacheKey:b,codecType:l,vtype:u,steps:a,stepIdx:o,payload:e},g);return e.reqOptions&&(C.reqOptions=e.reqOptions),this.log(f._.LOG,"start preload,".concat(r," playerId:").concat(this.playerId)),C}},{key:"start",value:(t=(0,i.x)((0,i.l5)().mark(function e(t,n){var r,a,o,s,u,l,d,f,h;return(0,i.l5)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(a=this._beforeStart(t,n)){e.next=3;break}return e.abrupt("return",{remove:!0});case 3:if(s=(o=Promise.withResolvers()).promise,u=o.resolve,l=a.codecType,this._pendingTask.resolve=u,this._pendingTask.data=a,null!==(r=this.options)&&void 0!==r&&null!==(r=r.pcdnConfig)&&void 0!==r&&r.openPreloadPCDN&&(d=Object.assign({},{productConfig:g.tE},this.options.pcdnConfig),this._pcdn=new c.e(d,void 0,void 0,void 0)),f=null,!this.stepwise){e.next=13;break}return e.next=12,this.getPreLoadData(a);case 12:f=e.sent;case 13:return h=t.loadRangeType||this.loadRangeType,(l!==A.H265||this.options.supportHevc)&&h!==g.TJ.UNMUX?h===g.TJ.GOP?this.loadByPreloadTime(a,f):h===g.TJ.SIZE?this.loadByChunkSize(a,f):h===g.TJ.ONLY_SIZE&&this.loadByChunkSizeOnly(a,f):this.loadByChunkSizeUnMux(a,f),e.next=17,s;case 17:return e.abrupt("return",{remove:!this.stepwise});case 18:case"end":return e.stop()}},e,this)})),function(e,n){return t.apply(this,arguments)})},{key:"_getRangeByOffsetMap",value:function(e,t){var n=this,r=null==e?void 0:e.find(function(e){var r;return(null==e?void 0:e.time)===((null===(r=n.options)||void 0===r?void 0:r.firstLoadTimePos)||t)});return null==r?void 0:r.offset}},{key:"_decideRequestRange",value:function(e){var t=e.pktOffsetMap,n=e.bitrate,r=e.size,i=e.duration,a=[0,8e5],o=this._getRangeByOffsetMap(t,g.he),s=0;if("number"==typeof o&&o>0)a[1]=o,s=g.he;else{var c=r||x.Z.getFileSize(n,i),u=(0,p.T)(i,8e5,c);a[1]=u,s=1}return{range:a,duration:s}}},{key:"loadByChunkSizeOnly",value:(n=(0,i.x)((0,i.l5)().mark(function e(t,n){var r,a,o,s,c,u,l,d,g,p,y,m,I,_,A,k,L,w,S,T,P,O,B,D,R,Z,E;return(0,i.l5)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.vid,a=t.cacheKey,o=t.definition,s=t.orgDefinition,c=t.duration,u=t.bitrate,l=t.codecType,d=t.vtype,g=t.size,p=this._getLoadUrl(t)){e.next=5;break}return this._endLoadFragments(!1),e.abrupt("return");case 5:return p=x.Z.extUrl(p,{__vid:r}),m=(y=this._decideRequestRange({bitrate:u,size:g,duration:c,pktOffsetMap:t.pktOffsetMap})).range,I=y.duration,this.log(f._.LOG,"".concat(r," loadByChunkSize ").concat(m[0],"-").concat(m[1]),t.cacheKey,t.definition,I),_={vid:r,definition:o,orgDefinition:s,cacheKey:a,codecType:l,vtype:d,fileSize:g,bitrate:u||0,byteLength:0,preloadTime:I,buffer:new ArrayBuffer(0)},A=this.getRequestOption((0,i.Zj)((0,i.Zj)({},t),{},{url:p})),k=new h.mf({responseType:"arraybuffer",changeUrlRetry:this.options.changeUrlRetry,dynamicTimeoutIns:this.options.dynamicTimeoutIns,urlList:this._getLoadBackUrlList(t)}),L=x.Z.nowTime(),e.prev=12,e.next=15,k.load(p,(0,i.Zj)({range:m},A));case 15:S=e.sent,!_.fileSize&&(T=(0,C.Xz)(S.headers),_.fileSize=T),(null==S||null===(w=S.data)||void 0===w?void 0:w.byteLength)>0&&(D=(B=S.data).byteLength||0,(R={codecType:l,vtype:d,vid:r,definition:o,orgDefinition:s,cacheKey:a,bitrate:u,memory:0,byteLength:D,preloadSize:D,preloadTime:0,buffer:B,fileSize:_.fileSize}).preloadTime=I||0,R.buffer&&R.buffer.byteLength>0&&(R.memory+=(null==B?void 0:B.byteLength)||0,this.setItem(t,R)),Z=(null==S||null===(P=S.options)||void 0===P||null===(P=P.priOptions)||void 0===P?void 0:P.type)||v._R.CDN,E=(0,b.pl)(D,x.Z.nowTime()-L),this.bwEventEmit(r,Z,D,E,a,!0,(null==S||null===(O=S.options)||void 0===O||null===(O=O.priOptions)||void 0===O?void 0:O.rtt)||0)),e.next=23;break;case 20:e.prev=20,e.t0=e.catch(12);case 23:this._endLoadFragments(!1);case 24:case"end":return e.stop()}},e,this,[[12,20]])})),function(e,t){return n.apply(this,arguments)})},{key:"getInitDefinition",value:function(e,t){for(var n=null,r=0,i=0;i0&&(L.memory+=(null==d?void 0:d.byteLength)||0,this.setItem(t,L))):(L.mediaSegList=[],L.duration=h,L.byteLength=g||0,L.preloadTime=p||0,L.initSeg=C,L.memory+=(null==C?void 0:C.byteLength)||0,L.fileSize=v,null==r||r.forEach(function(e){var t;L.memory+=(null==e||null===(t=e.buffer)||void 0===t?void 0:t.byteLength)||0,L.mediaSegList.push(e)}),o&&0===r.length?(this.log(f._.LOG,"[Preloader] meta setPreLoadData1 success",k,null==L||null===(w=L.mediaSegList)||void 0===w?void 0:w.length),this.setItem(t,L)):(T=r.every(function(e){return!!e.buffer&&e.state}),this.log(f._.LOG,"[Preloader] mediaSegList setPreLoadData1 success",k,null==L||null===(S=L.mediaSegList)||void 0===S?void 0:S.length,T),T&&this.setItem(t,L).then(function(){P.log(f._.LOG,"[Preloader] setPreLoadData1 success",k)})));case 4:case"end":return e.stop()}},e,this)})),function(e,t){return r.apply(this,arguments)})},{key:"getInitCacheData",value:function(e,t){var n={type:e,meta:null,byteLength:0,fileSize:0,bitrate:0,preloadTime:0};return e===a.dJ.DURATION?(n.mediaSegList=[],n.initSeg=null,n.duration=0):n.buffer=null,Object.keys(t).map(function(e){n[e]=t[e]}),n}},{key:"updatePreCacheData",value:function(e,t,n,r,i,o,s,c,u,d){var h,g=e.mediaSegList;if(e.type===a.dJ.SIZE||-1===i)return e.buffer=l()(Uint8Array,(null===(h=e.buffer)||void 0===h?void 0:h.buffer)||[],new Uint8Array(t)),e;var p=-1;if(g){for(var v=0;v-1&&g)t&&(g[p].buffer=l()(Uint8Array,g[p].buffer||[],new Uint8Array(t))),n.length>1&&(g[p].range.length>1?g[p].range[1]=n[1]:g[p].range=n),s&&-1!==s[1]&&(r=g[p].range[1]>=s[1]),g[p].state=r;else{e.duration=y[1],g&&g.push({buffer:t,range:n||[],index:i,totalRange:s||[],timeRange:[y[0],y[1]],muxSampleIdxRange:c,unMuxPos:u,state:r});var m="".concat(null==t?void 0:t.byteLength,",").concat(JSON.stringify(n),",").concat(i,",").concat(JSON.stringify(s),",").concat(JSON.stringify(o));this.log(f._.DEBUG,"[Preloader] ".concat(e.cacheKey," mediaSegList set, dataLen"),m)}return r&&(e.byteLength+=n[1]-n[0],e.preloadTime+=d),r}},{key:"checkCacheKey",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:s.l0.MP4,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:s.u7.H264;if(n){var a=this.generateUniqueKey({vid:e,definition:n,vtype:r,codecType:i});return a&&this.hasItemSameVid(a)?a:null}for(var o=0;o0){var t,n,i=(null==e||null===(t=e.priOptions)||void 0===t?void 0:t.type)||v._R.CDN,a=(0,b.pl)(e.len,e.time),s=(null==e||null===(n=e.priOptions)||void 0===n?void 0:n.rtt)||0;U.bwEventEmit(r,i,e.len,a,o,0,s)}}),this.mp4Loader.on("networkError",function(e){var t;null===(t=U.preloadManager.player)||void 0===t||t.emit("networkError",e)}),e.prev=18,D=new Uint8Array(3145728),R=0,Z=0,E=-1,N=null,M=null,z=function(){var e=(0,i.x)((0,i.l5)().mark(function e(n,a,s,c,u){var l,d,h,g,p,y,m,b,I,_,A,k,w,S,T,P,B;return(0,i.l5)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:!O.fileSize&&(O.fileSize=Number((0,C.Xz)(u.headers))),n&&(E>0?(l=D.slice(E-R,R+Z),(null==n?void 0:n.byteLength)+Z>D.byteLength?((d=x.Z.newUint8Array(D.byteLength+n.byteLength)).set(l,0),d.set(n,l.byteLength),D=d):(D.set(l,0),D.set(n,l.byteLength)),R=E,Z=l.byteLength+n.byteLength):((null==n?void 0:n.byteLength)>(null===(h=D)||void 0===h?void 0:h.byteLength)&&(D=x.Z.newUint8Array(D.byteLength+n.byteLength)),D.set(n,0),Z+=(null==n?void 0:n.byteLength)||0,R=s.range[0])),s.meta&&(y=(null==n||null===(g=n.priOptions)||void 0===g?void 0:g.type)||v._R.CDN,U.bwEventEmit(r,y,Z,null,o,0,(null==n||null===(p=n.priOptions)||void 0===p?void 0:p.rtt)||0),b=(m=s.meta).videoSegments,I=m.audioSegments,!O.fileSize&&(O.fileSize=x.Z.getEndFramePos(b,I)),E=x.Z.getFirstFrameStartRange(b,I),M=(0,i.Zj)((0,i.Zj)({},m.meta),{},{ext:{videoTrak:b,audioTrak:I}}),O.meta=M,N=x.Z.getFragRange(0,b,I),O.buffer=D.subarray(0,Z),O.byteLength=O.buffer.byteLength,_=x.Z.getFragRange(1,b,I),A=[],_[0]<_[1]&&N[1]>_[0]&&(A=[_[0],N[1]]),w=(k=(null==b?void 0:b.length)>0?b:I)[0].startTime,T={startTime:w,endTime:S=k[0].endTime,range:(0,i.u)(N),repeatRange:A,duration:S-w,downloaded:!1,isLoading:!1,timeRangeIdx:[0,1]},O.adaptTimeRange=[T],U.log(f._.LOG,"".concat(r," loadMetaProcess ret"),o,D.byteLength,JSON.stringify(N),O.buffer.byteLength,JSON.stringify(A)),U.setPreLoadData(t,O),B=[P=R+Z,N[1]],U.log(f._.LOG,"".concat(o," loadMetaProcess end, loadOneChunk start"),a,JSON.stringify(B),P,D.byteLength),U.loadOneChunk(O,B,L,T.duration,t));case 3:case"end":return e.stop()}},e)}));return function(t,n,r,i,a){return e.apply(this,arguments)}}(),!this.mp4Loader){e.next=29;break}return e.next=29,this.mp4Loader.loadMetaProcess(this.mp4Loader.cache,[0,T||P],z,{});case 29:e.next=35;break;case 31:e.prev=31,e.t0=e.catch(18),this._endLoadFragments(!1);case 35:case"end":return e.stop()}},e,this,[[18,31]])})),function(e,t){return o.apply(this,arguments)})},{key:"loadOneChunk",value:(u=(0,i.x)((0,i.l5)().mark(function e(t,n,r,a,o){var s,c,u,l,d,h,g,p,y,m,b;return(0,i.l5)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!((null==n?void 0:n.length)>0&&n[0]>=n[1])){e.next=3;break}return this._endLoadFragments(),e.abrupt("return");case 3:return(c=(null===(s=this._pcdnNodeList)||void 0===s?void 0:s.length)>0?x.Z.extUrl(this._pcdnNodeList[0].url,{__vid:t.vid}):null)&&v.Yx.pcdn_download_request_cnt++,this.log(f._.LOG,"".concat(null==t?void 0:t.cacheKey," loadOneChunk start"),JSON.stringify(n),",loadType,",!!c),u=c||r,l=t.vid,d=t.cacheKey,h=t.buffer,e.prev=8,e.next=11,null===(g=this.mp4Loader)||void 0===g?void 0:g.loadData(n,this.mp4Loader.cache,{index:0,url:u,headers:c?{"X-Origin-Server-Host":x.Z.getHostFromUrl(r)}:null,priOptions:{type:c?v._R.PCDN:v._R.CDN}});case 11:p=e.sent,this.log(f._.LOG,"".concat(l," loadOneChunk"),JSON.stringify(n),d),y=p.response,(m=p.data)?(this._endLoadFragments(),y&&y.headers&&(b=Number((0,C.Xz)(y.headers)))&&(t.fileSize=b),t.buffer=x.Z.concatData(h,m),t.byteLength=t.buffer.byteLength,t.preloadTime+=a,this.log(f._.LOG,"".concat(l," loadOneChunk ret"),d,t.buffer.byteLength,null==m?void 0:m.byteLength),t.from=4,this.setPreLoadData(o,t)):(v.Yx.pcdn_download_failed_cnt++,this._endLoadFragments(!1)),e.next=21;break;case 17:e.prev=17,e.t0=e.catch(8),this.log(f._.ERROR,"[Preloader] ".concat(l," loadByChunkSize error"),null===e.t0||void 0===e.t0?void 0:e.t0.message),this._endLoadFragments(!1);case 21:case"end":return e.stop()}},e,this,[[8,17]])})),function(e,t,n,r,i){return u.apply(this,arguments)})},{key:"loadByPreloadTime",value:(w=(0,i.x)((0,i.l5)().mark(function e(t,n){var r,o,s,c,u,l,d,h,g,p,m,b,C,I,_,A,k,L,w,S,T,P,O=this;return(0,i.l5)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.vid,o=t.cacheKey,s=t.preloadTime,c=t.definition,u=t.orgDefinition,l=t.duration,d=t.bitrate,h=t.codecType,g=t.vtype,p=t.size,m=t.uri,b=t.file_id,C=this._getLoadUrl(t)){e.next=6;break}return this._endLoadFragments(!1),e.abrupt("return");case 6:return C=x.Z.extUrl(C,{__vid:r}),I=s>=this.options.segmentMinDuration?this.options.segmentMinDuration:s,_=this.getRequestOption((0,i.Zj)((0,i.Zj)({},t),{},{_url:C})),this.log(f._.DEBUG,"[Preloader] loadByPreloadTime","".concat(t.cacheKey,", definition:").concat(t.definition,",segmentMinDuration:").concat(I),_),A=p||x.Z.getFileSize(d,l),k=this.getRangeStartPos(t),L=this.createConfig(t,_,k,A,I),w=this._getLoadBackUrlList(t),this.mp4=new y.Z(C,d,L,w,"[Preloader]"),S=this.getInitCacheData(a.dJ.DURATION,{vid:r,definition:c,orgDefinition:u,cacheKey:o,codecType:h,vtype:g,bitrate:d||0}),this.startPCDN(C,m,r,d,b,g.toLowerCase()||"mp4",Math.floor(l),A),null!=n&&null!==(T=n.meta)&&void 0!==T&&T.ext?(this.uddatePreCacheInfoByCache(n,S),this.updateMP4InfoByCache(n)):this.mp4.once(v.kL.META_READY,function(){var e=(0,i.x)((0,i.l5)().mark(function e(n,r){var a;return(0,i.l5)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(!r||r.hasDestroyed)){e.next=2;break}return e.abrupt("return");case 2:return O.log(f._.DEBUG,"[Preloader] ".concat(t.vid," metaReady ").concat(null==S||null===(a=S.mediaSegList)||void 0===a?void 0:a.length)),S.meta=n,S.from=2,S.fileSize=r.size,e.next=8,r.cancelLoading();case 8:if(!r.hasDestroyed){e.next=10;break}return e.abrupt("return");case 10:return r.metaLoading=!1,e.next=13,O.setPreLoadData(t,S);case 13:if(!r.hasDestroyed){e.next=15;break}return e.abrupt("return");case 15:O.startLoadByFragments(S,t);case 16:case"end":return e.stop()}},e)}));return function(t,n){return e.apply(this,arguments)}}()),this.mp4EventAdd(t.vid,S.cacheKey),e.next=21,this.mp4.init(n);case 21:if(this.mp4){e.next=23;break}return e.abrupt("return");case 23:null!=n&&null!==(P=n.meta)&&void 0!==P&&P.ext&&this.startLoadByFragments(S,t);case 24:case"end":return e.stop()}},e,this)})),function(e,t){return w.apply(this,arguments)})},{key:"bwEventEmit",value:function(e,t,n,r,i,a,o){var c,u,l=(null===(c=this._pendingTask.data)||void 0===c?void 0:c.duration)||0,d=(null===(u=this._pendingTask.data)||void 0===u?void 0:u.bitrate)||0;this.preloadManager.bwEventEmit({vid:e,loadType:t,size:n,speed:r,cacheKey:i,vtype:s.l0.MP4,duration:l,bitrate:d,isV2Player:a,rtt:o})}},{key:"startPCDN",value:function(e,t,n,r,i,a,o,s){var c=this;if(this._pcdn){if(null===(u=this.mp4)||void 0===u||u.updatePCDNState(v.oy.OPEN),!(0,b.Pj)(e)){;e=document.location.protocol+e}this.curPCDNReqId=(l=t||n,d=r,l.slice(-20)+d);var u,l,d,h={vid:t,cdn_url:e,sfid:i,file_type:a,bitrate:r,duration:Math.floor(o),size:s};this.log(f._.DEBUG,"[Preloader] ".concat(n," get peer start")),this._pcdn.fetchPCDNNode(null,h,this.curPCDNReqId).then(function(e){var t;if(null!=e&&e.req_id&&e.req_id!==c.curPCDNReqId){c.log(f._.LOG,",[Preloader] fetchPCDNNode not match reqId",c.curPCDNReqId,", pcdnRet.req_id",e.req_id);return}c.log(f._.LOG,"[Preloader] ".concat(n," get peer end,pcdn node update,"),null==e||null===(t=e.nodes)||void 0===t?void 0:t.length),c.mp4?c.mp4.updateNode(null==e?void 0:e.nodes):c._pcdnNodeList=(null==e?void 0:e.nodes)||null}).catch(function(t){var n,r,i,a=x.Z.checkUrlIsExpired(e);1===a&&c._pcdn&&(c._pcdn=void 0);var o=(null==t||null===(n=t.response)||void 0===n?void 0:n.url)||(null===(r=c.options)||void 0===r||null===(r=r.pcdnConfig)||void 0===r?void 0:r.trackerUrl);c.emit("source_error",{host:x.Z.getHostFromUrl(o),src:o,errorCode:null==t||null===(i=t.response)||void 0===i?void 0:i.status,message:"".concat(null==t?void 0:t.message,"-").concat(a,"_preload")})})}}},{key:"_getLoadUrl",value:function(e){var t="Array"===x.Z.typeOf(e.url)?e.url[0].src:e.url;return this.preloadManager.preProcessUrl&&(t=this.preloadManager.preProcessUrl(t).url),t}},{key:"_getLoadBackUrlList",value:function(e){var t,n=this,r="Array"===x.Z.typeOf(e.url)&&(null===(t=e.url)||void 0===t?void 0:t.length)>1?e.url.slice(1).map(function(e){return String(e.src)}):[];return this.preloadManager.preProcessUrl&&r.length>0&&(r=r.map(function(e){return n.preloadManager.preProcessUrl(e).url})),r}},{key:"mp4EventAdd",value:function(e,t){var n,r,i=this;this.mp4.on(v.kL.ERROR,function(t){i.log(f._.ERROR,"[Preloader] ".concat(e," load error ").concat(null==t?void 0:t.errorCode,", ").concat((null==t?void 0:t.errorMessage)||(null==t?void 0:t.message)," ")),i._endLoadFragments(!1)}),this.mp4.on(v.kL.REMOVE_PCDN_NODE,function(e){i._pcdn&&e&&i._pcdn.removePCDNNode(e.vid,e.bitrate,e.url)}),this.mp4.on(v.kL.CANCEL_LOADED_LEN,function(n){i.bwEventEmit(e,n.load_type,n.len,null,t)}),null===(n=this.mp4.MP4Loader)||void 0===n||n.on("networkError",function(e){var t;null===(t=i.preloadManager.player)||void 0===t||t.emit("networkError",e)}),null===(r=this.mp4.MP4Loader)||void 0===r||r.on(g.kW,function(n){if((null==n?void 0:n.len)>0){var r,a,o=(null==n||null===(r=n.priOptions)||void 0===r?void 0:r.type)||v._R.CDN,s=(0,b.pl)(n.len,n.time);i.bwEventEmit(e,o,n.len,s,t,0,(null==n||null===(a=n.priOptions)||void 0===a?void 0:a.rtt)||0)}})}},{key:"createConfig",value:function(e,t,n,r,i){var a=e.vid,o=e.duration,s=this.options,c=s.preloadSize,u=s.memoryOpt,l=s.supportHevc,d=s.emitMediaListControl,f=s.audioGroupingStrategy,h=s.fixEditListOffsetThreshold,g=s.fixEditListOffset,p=s.segmentMinDuration,v=s.enableFixPreloadRepatLoad,y=s.changeUrlRetry,m=s.dynamicTimeoutIns,C=s.timeout;return{segmentDuration:i||p,codecType:this.codecType,chunkSize:c,firstLoadSize:n,duration:o,fileSize:r,playerId:this.playerId,vid:a,useUrlRange:!1,timeout:C,retryCount:1,retryDelay:1e3,supportHevc:l,retryCheckFunc:b.Wp,switchPCDNMaxCnt:Number.MAX_VALUE,logger:this.logger,reqOptions:t,memoryOpt:u,emitMediaListControl:d,audioGroupingStrategy:f,fixEditListOffset:g,fixEditListOffsetThreshold:h,enableFixPreloadRepatLoad:v,changeUrlRetry:y,dynamicTimeoutIns:m,loadRangeType:this.loadRangeType}}},{key:"uddatePreCacheInfoByCache",value:function(e,t){t.meta=e.meta,t.from=5,t.fileSize=e.fileSize,t.mediaSegList=e.mediaSegList||t.mediaSegList||[],t.repeatData=e.repeatData,t.repeatDataStartPos=e.repeatDataStartPos,t.initSeg=e.initSeg,t.adaptTimeRange=e.adaptTimeRange,t.byteLength=e.byteLength}},{key:"updateMP4InfoByCache",value:function(e){var t;if(e.initSeg&&(this.mp4._needInitSegment=!1),e.adaptTimeRange&&(this.mp4.adaptTimeRange=e.adaptTimeRange),(null===(t=e.mediaSegList)||void 0===t?void 0:t.length)>0){var n=e.mediaSegList,r=n[n.length-1].muxSampleIdxRange,i=r.video,a=r.audio;this.mp4.lastDemuxSampleIdxRange.video=i,this.mp4.lastDemuxSampleIdxRange.audio=a}}},{key:"loadByChunkSize",value:(S=(0,i.x)((0,i.l5)().mark(function e(t,n){var r,o,s,c,u,l,d,h,g,y,b,C,I,_,A,k,L,w,S,T,P=this;return(0,i.l5)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.vid,o=t.cacheKey,s=t.definition,c=t.orgDefinition,u=t.duration,l=t.bitrate,d=t.codecType,h=t.vtype,g=t.size,y=t.uri,b=t.file_id,this.options,C=this._getLoadUrl(t)){e.next=6;break}return this._endLoadFragments(!1),e.abrupt("return");case 6:if(C=x.Z.extUrl(C,{__vid:r}),I=g||x.Z.getFileSize(l,u),_=this.getRangeStartPos(t),A=(0,p.T)(u,8e5,I),this.log(f._.LOG,"".concat(r," loadByChunkSize"),t.cacheKey,t.definition,_||A),k=this.getInitCacheData(a.dJ.DURATION,{vid:r,definition:s,orgDefinition:c,cacheKey:o,codecType:d,vtype:h,fileSize:g,bitrate:l||0}),L=this.getRequestOption((0,i.Zj)((0,i.Zj)({},t),{},{url:C})),this.startPCDN(C,y,r,l,b,h.toLowerCase()||"mp4",Math.floor(u),I),w=this.createConfig(t,L,_||A,I,null),S=this._getLoadBackUrlList(t),this.mp4=new m.Z(C,l,w,S,"[Preloader]"),this.mp4EventAdd(t.vid,k.cacheKey),T=-1,!(null!=n&&n.meta)){e.next=27;break}return this.uddatePreCacheInfoByCache(n,k),this.updateMP4InfoByCache(n),e.next=24,this.mp4.init(n);case 24:this.startLoadBySize(k,t),e.next=30;break;case 27:this.mp4.once(v.kL.META_READY,function(){var e=(0,i.x)((0,i.l5)().mark(function e(n,r){return(0,i.l5)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(!r||r.hasDestroyed)){e.next=2;break}return e.abrupt("return");case 2:return P.log(f._.DEBUG,"[Preloader] ".concat(t.vid," metaReady, metaReq, ").concat(T)),k.meta=n,k.from=2,k.fileSize=r.size,e.next=8,P.setPreLoadData(t,k);case 8:if(!r.hasDestroyed){e.next=10;break}return e.abrupt("return");case 10:1===T&&(T=2,P.startLoadBySize(k,t));case 11:case"end":return e.stop()}},e)}));return function(t,n){return e.apply(this,arguments)}}()),this.mp4.once(v.kL.META_REQ_DONE,function(e){if(!!e&&!e.hasDestroyed){P.log(f._.DEBUG,"[Preloader] ".concat(t.vid," metaReq done,meta:, ").concat(!!e.meta));var n=e.repeatInfo,r=n.curDataPos,i=n.startPos,a=n.data;r>0&&(k.repeatData=a.subarray(0,r),k.repeatDataStartPos=i),e.meta?(T=2,P.startLoadBySize(k,t)):T=1}}),this.mp4.init(n);case 30:case"end":return e.stop()}},e,this)})),function(e,t){return S.apply(this,arguments)})},{key:"findLoadAdaptTimeRangeIdx",value:function(e){var t,n,r=this,i=e.steps,a=e.stepIdx,o=e.preloadTime,c=0,u=null===(t=this.mp4)||void 0===t?void 0:t.adaptTimeRange,l=!(null!==(n=this.options)&&void 0!==n&&n.openStepwiseType)||this.options.openStepwiseType.toUpperCase()===s.l0.MP4;if(this.stepwise&&l&&Array.isArray(i)&&i.length>0&&"number"==typeof a){var d,f=i[a];if((!u||(null==u?void 0:u.length)<(null==i?void 0:i.length))&&i.map(function(e,t,n){return e-(0===t?0:n[t-1])}).forEach(function(e){if(!Array.isArray(u)||0===u.length||u[u.length-1].endTime0&&n<(null==t?void 0:t.length)&&(t[n].downloaded=!0)})}},{key:"startLoadBySize",value:(T=(0,i.x)((0,i.l5)().mark(function e(t,n){var r,a,o,s,c,u,l,d,h,g,p,v,y=this;return(0,i.l5)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r=n.vid,a=this.mp4,o=this.findLoadAdaptTimeRangeIdx(n),!(!(s=null==a?void 0:a.adaptTimeRange)||!(null!=s&&s.length))){e.next=8;break}return this.log(f._.ERROR,"[Preloader] ".concat(r," adaptTimeRange is null")),this._endLoadFragments(!1),e.abrupt("return");case 8:if(this.updateAdaptTimeRangeState(t,s),(c=s.findIndex(function(e){return!e.downloaded}))>=0&&(o=Math.min(c,o)),u=s[o].range,this.log(f._.LOG,"[Preloader] ".concat(r,"$ startLoadBySize, loading ").concat(o),s?s[o].downloaded:"",s),!(s&&s[o].downloaded)){e.next=16;break}return this._endLoadFragments(),e.abrupt("return");case 16:if(e.prev=16,l=function(e){y.log(f._.ERROR,"[Preloader] ".concat(r," failedCallback error"),null==e?void 0:e.message),y._endLoadFragments(!1)},d=function(){var e=(0,i.x)((0,i.l5)().mark(function e(r){var a,o,c,u,h,g,p,m,b,C,x,I,_;return(0,i.l5)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(!(null!=r&&r.mp4)||null!=r&&r.mp4.hasDestroyed)){e.next=2;break}return e.abrupt("return");case 2:if(o=r.mp4,c=r.buffer,u=r.state,h=r.context,g=r.initSeg,p=r.lastRemainBufferInfo,m=o.adaptTimeRange,b=h.fragIndex,C=h.timeRange,x=null===(a=m[b])||void 0===a?void 0:a.range,!t.initSeg&&g&&(t.initSeg=g,t.adaptTimeRange=m),I=o.lastDemuxSampleIdxRange,t.repeatData=p.data,t.repeatDataStartPos=p.pos,y.log(f._.LOG,"[Preloader] ".concat(t.cacheKey," lastUnMuxData, ").concat(b,", \n appendLastUnMuxData start: ").concat(t.repeatDataStartPos," \n end: ").concat(t.repeatDataStartPos+t.repeatData.byteLength)),_=y.updatePreCacheData(t,c,x,u,b,C,x,I,p.pos,m[b].duration),y.log(f._.LOG,"[Preloader] ".concat(t.cacheKey," successCallback"),h.fragIndex,u,_),t.from=3,!_){e.next=27;break}return e.next=18,y.setPreLoadData(n,t);case 18:if(!(s&&b>=s.length-1||y.stepwise)){e.next=24;break}return y.log(f._.LOG,"[Preloader] ".concat(t.cacheKey," mp4.load end"),b),y._endLoadFragments(!0),e.abrupt("return");case 24:return y.appendLastUnMuxData(b+1,t),e.next=27,o.loadAllFragmentData(b+1,d,l,!1,v);case 27:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}(),h=t.repeatData,g=t.repeatDataStartPos,!this.checkCacheIsHasAllData(u,t)){e.next=26;break}return this.log(f._.LOG,"[Preloader] ".concat(r," startLoadBySize loadIdx:").concat(o," , cache has all data,loadIdx:").concat(o," range:").concat(u)),this.mp4._loadSuccessCallBack=d,this.mp4._mux(h.subarray(u[0]-g),u[0],o,!0),e.abrupt("return");case 26:return p=!this.options.enableFixPreloadRepatLoad||g+h.byteLength>=u[0],v=[(null==h?void 0:h.byteLength)>0&&g<=u[0]&&p&&g+h.byteLength0)&&!!((null==e?void 0:e[0])>=r)&&!!((null==e?void 0:e[1])<=r+(null==n?void 0:n.byteLength))||!1}},{key:"appendLastUnMuxData",value:function(e,t){var n;(null===(n=t.repeatData)||void 0===n?void 0:n.byteLength)>0&&(this.log(f._.LOG,"[Preloader] ".concat(t.cacheKey," appendLastUnMuxData, ").concat(e,", \n appendLastUnMuxData start: ").concat(t.repeatDataStartPos," \n end: ").concat(t.repeatDataStartPos+t.repeatData.byteLength)),this.mp4.setLastMuxRemainBufferInfo(t.repeatData,t.repeatDataStartPos))}},{key:"startLoadByFragments",value:(P=(0,i.x)((0,i.l5)().mark(function e(t,n){var r,a,o,s,c,u,l,d=this;return(0,i.l5)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r=n.vid,this.log(f._.LOG,"[Preloader] ".concat(r," startLoadByFragments"),n),a=this.findLoadAdaptTimeRangeIdx(n),!(!(o=null===(l=this.mp4)||void 0===l?void 0:l.adaptTimeRange)||!(null!=o&&o.length))){e.next=8;break}return this.log(f._.ERROR,"[Preloader] ".concat(r," adaptTimeRange is null")),this._endLoadFragments(!1),e.abrupt("return");case 8:if(this.updateAdaptTimeRangeState(t,o),(s=o.findIndex(function(e){return!e.downloaded}))>=0&&(a=Math.min(s,a)),this.log(f._.LOG,"[Preloader] loading ".concat(a),o?o[a].downloaded:"",o),!(o&&o[a].downloaded)){e.next=15;break}return this._endLoadFragments(),e.abrupt("return");case 15:if(c=function(e){d.log(f._.ERROR,"[Preloader] ".concat(r," failedCallback error"),null==e?void 0:e.message),d._endLoadFragments(!1)},u=function(){var e=(0,i.x)((0,i.l5)().mark(function e(r){var a,s,l,h,g,p,v,y,m,b,C,x,I,_,A,k;return(0,i.l5)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(!(null!=r&&r.mp4)||null!=r&&null!==(a=r.mp4)&&void 0!==a&&a.hasDestroyed)){e.next=2;break}return e.abrupt("return");case 2:if(h=r.mp4,g=r.buffer,p=r.context,v=r.state,y=r.initSeg,m=p.fragIndex,b=p.range,C=p.timeRange,x=h.repeatInfo,_=null===(s=(I=h.adaptTimeRange)[m])||void 0===s?void 0:s.range,!t.initSeg&&y&&(t.initSeg=y,t.adaptTimeRange=I),A=h.lastDemuxSampleIdxRange,t.repeatData=(null===(l=x.data)||void 0===l?void 0:l.slice(0,x.curDataPos))||[],k=d.updatePreCacheData(t,g,b,v,m,C,_,A,-1,I[m].duration),d.log(f._.LOG,"[Preloader] ".concat(t.cacheKey," successCallback"),m,v,k),t.from=3,!k){e.next=25;break}return e.next=16,d.setPreLoadData(n,t);case 16:if(!(o&&m>=o.length-1||d.stepwise)){e.next=22;break}return d.log(f._.LOG,"[Preloader] ".concat(t.cacheKey," mp4.load end"),m),d._endLoadFragments(!0),e.abrupt("return");case 22:return d.log(f._.LOG,"[Preloader] ".concat(t.cacheKey," mp4.load start"),m+1),e.next=25,h.loadAllFragmentData(m+1,u,c);case 25:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}(),!this.mp4){e.next=20;break}return e.next=20,this.mp4.loadAllFragmentData(a,u,c);case 20:case"end":return e.stop()}},e,this)})),function(e,t){return P.apply(this,arguments)})},{key:"_endLoadFragments",value:function(e){this.log(f._.LOG,"[Preloader] _endLoadFragments ".concat(this.playerId)),null!==(t=this._pendingTask)&&void 0!==t&&t.resolve&&(null===(i=this._pendingTask)||void 0===i||i.resolve(),this._pendingTask.resolve=void 0);var t,n,r,i,a=!(null!==(n=this.options)&&void 0!==n&&n.openStepwiseType)||this.options.openStepwiseType.toUpperCase()===s.l0.MP4;null!==(r=this._pendingTask)&&void 0!==r&&r.data&&(this.stepwise&&(!1===e||!a)&&this._pendingTask.data.payload&&(this._pendingTask.data.payload.stepIdx=1/0),this._pendingTask.data=void 0),this.mp4&&(this.mp4.destroy(),this.mp4.cancelLoading(),this.mp4=void 0),this.mp4Loader&&(this.mp4Loader.cancel(),this.mp4Loader.destroy(),this.mp4Loader=void 0)}},{key:"hasItemSameVid",value:function(e){if(!e)return null;for(var t=e.split("#"),n=this.allCachedKeys,r=0;r=4&&t.length>=4&&a[0]===t[0]){if(0===a[2].indexOf("pretime")&&0===t[2].indexOf("pretime"))return i;var o=[parseInt(a[2]),parseInt(a[3])],s=[parseInt(t[2]),parseInt(t[3])];if(s[0]>=o[0]&&s[1]>s[0]&&s[1]<=o[1])return i}}return null}},{key:"getItemSameVid",value:(O=(0,i.x)((0,i.l5)().mark(function e(t){var n,r,a;return(0,i.l5)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r=(n=B.generateUniqueKey(t))&&this.hasItemSameVid(n),this.log(f._.DEBUG,"getItemSameVid: key:".concat(n," checkResult:").concat(r)),r){e.next=5;break}return e.abrupt("return",{});case 5:return e.next=7,this.preloadManager.getItem(t);case 7:return a=e.sent,e.abrupt("return",{value:a,key:r});case 9:case"end":return e.stop()}},e,this)})),function(e){return O.apply(this,arguments)})},{key:"setItem",value:function(e,t){return this.preloadManager.setItem(e,t,!1)}},{key:"clearPreloaderList",value:function(){(0,i.Vx)(B,"clearPreloaderList",this,3)([])}},{key:"setUserSelectDefinition",value:function(e){this.preloadManager&&this.preloadManager.setUserSelectDefinition(e)}},{key:"getUserSelectDefinition",value:function(){return this.preloadManager.getUserSelectDefinition()}},{key:"cancel",value:function(){this.log(f._.LOG,"cancelLoading"),this._endLoadFragments()}},{key:"destroy",value:function(){this.cancel()}},{key:"on",value:function(e,t){for(var n=arguments.length,r=Array(n>2?n-2:0),a=2;a2?n-2:0),a=2;a0||n>0}function o(){return window.navigator.userAgent.toLowerCase().indexOf("qqbrowser")>-1}function s(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function c(){return navigator.userAgent.indexOf("Edge")>0}function u(){try{if(("undefined"==typeof WebAssembly?"undefined":(0,r.Ac)(WebAssembly))==="object"&&"function"==typeof WebAssembly.instantiate){var e=new WebAssembly.Module(Uint8Array.of(0,97,115,109,1,0,0,0));if(e instanceof WebAssembly.Module)return new WebAssembly.Instance(e) instanceof WebAssembly.Instance}}catch(e){}return!1}function l(){var e=window.MediaSource=window.MediaSource||window.WebKitMediaSource;return e&&"function"==typeof e.isTypeSupported}var d=['video/mp4; codecs="av01.0.01M.08,mp4a.40.5"'];function f(e){if(!l())return!1;for(var t=0;t-1||i.Xb.getItem("firefox_dash"))&&n.toLowerCase().indexOf("firefox")>-1),o=c(),!e&&!t&&!r&&!o)}function p(){return u()&&l()&&!a()}function v(){return u()&&l()&&!a()&&!o()}function y(e){return new Promise(function(t){(!u()||!l()||!navigator.requestMediaKeySystemAccess)&&t(void 0);var n=s(),r=navigator.userAgent.toLowerCase().indexOf("chrome")>-1,i=c();r&&!o()?navigator.requestMediaKeySystemAccess("com.widevine.alpha",[{initDataTypes:["keyids","webm"],audioCapabilities:[{contentType:'audio/mp4; codecs="mp4a.40.2"'}],videoCapabilities:[{contentType:'video/mp4; codecs="avc1.42c01e"'}]}]).then(function(){t("https://".concat(e,"/video/drm/v1/widevine?aid=32&kid="))},function(){t(void 0)}):i?t("https://".concat(e,"/video/drm/v1/playready?aid=32&kid=")):t(void 0)})}},648711:function(e,t,n){n.d(t,{Gb:function(){return a},HR:function(){return c},lE:function(){return u},rP:function(){return o}});var r=n(236699),i=["webgl2"];function a(){return function(){try{if(("undefined"==typeof WebAssembly?"undefined":(0,r.Ac)(WebAssembly))==="object"&&"function"==typeof WebAssembly.instantiate){var e=new WebAssembly.Module(Uint8Array.of(0,97,115,109,1,0,0,0));if(e instanceof WebAssembly.Module)return new WebAssembly.Instance(e) instanceof WebAssembly.Instance}}catch(e){}return!1}()&&c()}function o(){return!!HTMLVideoElement.prototype.getVideoPlaybackQuality}var s="xgplayer-webgl-hard-supported";function c(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=sessionStorage&&sessionStorage.getItem(s);if(!e&&null!==t)return 1===parseInt(t);var n=!1,r=null;try{r=document.createElement("canvas");for(var a=0;a0?(1-u/n)*i:0;return this.curPCDNInBuffer=Math.min(s,Math.max(c,l)),this.curPCDNInBuffer}},{key:"getPCDNOutBuffer",value:function(){var e=this.config,t=this.player,n=this.bitrate;if(!e.PCDNBufferControl)return null;var r=e.estPlayTime,i=r;e.estPTcontrol&&(i=Math.min(r,Math.max(0,this.duration-((null==t?void 0:t.currentTime)||0))));var a=e.safePCDNOutFactor,o=e.minBandwidth,s=e.maxPCDNOutBuffer,c=e.minPCDNOutBuffer,u=a*Math.max((null==t?void 0:t.avgSpeedPCDN)*1024||0,o),l=n>0?(1-u/n)*i:0;return this.curPCDNOutBuffer=Math.min(s,Math.max(c,l)),this.curPCDNOutBuffer}},{key:"getPCDNChangeCnt",value:function(){var e=this.config,t=e.PCDNCntControl,n=e.alpha,r=this.curPCDNInBuffer,i=this.player,a=(null==i?void 0:i.bufferedPoint)||null,o=a&&a.end?a.end-i.currentTime:0;return t?o>r+(this.PCDNChangeCnt-1)*n&&this.PCDNChangeCnt++:o>=r&&this.PCDNChangeCnt<2&&this.PCDNChangeCnt++,this.PCDNChangeCnt}}],[{key:"getDefaultConfig",value:function(){return{PCDNBufferControl:!1,PCDNCntControl:!1,estPTcontrol:!1,minPCDNInBuffer:8,maxPCDNInBuffer:12,minPCDNOutBuffer:3,maxPCDNOutBuffer:6,safePCDNInFactor:.1,safePCDNOutFactor:.4,alpha:.5,estPlayTime:12,minBandwidth:1e6}}}])},106140:function(e,t,n){n.d(t,{J:function(){return i}});var r,i=((r=i||{}).CHANGE_FLYING_PLUGIN_CONFIG="CHANGE_FLYING_PLUGIN_CONFIG",r)},284771:function(e,t,n){n.d(t,{Z:function(){return r}});var r=(0,n(227346).p)("Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwooZnVuY3Rpb24gKCkgewogICd1c2Ugc3RyaWN0JzsKCiAgdmFyIGRlY29kZXIgPSBudWxsOwoKICB2YXIgZnJhbWVRdWV1ZSA9IFtdOwoKICB2YXIgcmVjZWl2ZUZyYW1lVGltZXIgPSAwOwoKICB2YXIgaGFzUmVjZWl2ZUZyYW1lID0gZmFsc2U7CgogIHNlbGYuYWRkRXZlbnRMaXN0ZW5lcignbWVzc2FnZScsIGZ1bmN0aW9uIChlKSB7CiAgICBzd2l0Y2ggKGUuZGF0YS5tc2cpIHsKICAgICAgY2FzZSAnY29uZmlndXJhdGlvbic6CiAgICAgICAgZGVjb2RlciA9IG5ldyBzZWxmLlZpZGVvRGVjb2Rlcih7CiAgICAgICAgICBvdXRwdXQ6IGZ1bmN0aW9uIChmcmFtZSkgewogICAgICAgICAgICAvLyBjb25zb2xlLmxvZygnZGVjb2RlZCEnLCBkZWNvZGVyLmRlY29kZVF1ZXVlU2l6ZSwgZnJhbWVRdWV1ZS5sZW5ndGgpCgogICAgICAgICAgICBoYXNSZWNlaXZlRnJhbWUgPSB0cnVlOwoKICAgICAgICAgICAgaWYgKHJlY2VpdmVGcmFtZVRpbWVyKSB7CiAgICAgICAgICAgICAgY2xlYXJUaW1lb3V0KHJlY2VpdmVGcmFtZVRpbWVyKTsKICAgICAgICAgICAgfQoKICAgICAgICAgICAgY29uc3QgZiA9IGZyYW1lUXVldWUuc2hpZnQoKTsKICAgICAgICAgICAgaWYgKCFmKSB7CiAgICAgICAgICAgICAgZnJhbWUuY2xvc2UoKTsKICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICBzZWxmLnBvc3RNZXNzYWdlKHsKICAgICAgICAgICAgICAgIHR5cGU6ICdERUNPREVEJywKICAgICAgICAgICAgICAgIHdpZHRoOiBmcmFtZS5kaXNwbGF5V2lkdGgsCiAgICAgICAgICAgICAgICBoZWlnaHQ6IGZyYW1lLmRpc3BsYXlIZWlnaHQsCiAgICAgICAgICAgICAgICBpbmZvOiBmLAogICAgICAgICAgICAgICAgYnVmZmVyOiBmcmFtZQogICAgICAgICAgICAgIH0sIFtmcmFtZV0pOwogICAgICAgICAgICB9CgogICAgICAgICAgICBpZiAoZGVjb2Rlci5kZWNvZGVRdWV1ZVNpemUgPT09IGZyYW1lUXVldWUubGVuZ3RoKSB7CiAgICAgICAgICAgICAgc2VsZi5wb3N0TWVzc2FnZSh7CiAgICAgICAgICAgICAgICB0eXBlOiAnQkFUQ0hfRklOSVNIX0ZMQUcnCiAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIH0KICAgICAgICAgIH0sCiAgICAgICAgICBlcnJvcjogZnVuY3Rpb24gKGUpIHsKICAgICAgICAgICAgY29uc29sZS5sb2coJ1tXZWJjb2RlY1dvcmtlcl06JywgZSk7CiAgICAgICAgICAgIGlmIChlLm1lc3NhZ2UgPT09ICdDb2RlYyByZWNsYWltZWQgZHVlIHRvIGluYWN0aXZpdHkuJykgcmV0dXJuCiAgICAgICAgICAgIHNlbGYucG9zdE1lc3NhZ2UoewogICAgICAgICAgICAgIHR5cGU6ICdGQUlMRUQnLAogICAgICAgICAgICAgIG1lc3NhZ2U6IGUgJiYgZS5tZXNzYWdlCiAgICAgICAgICAgIH0pOwogICAgICAgICAgfQogICAgICAgIH0pOwogICAgICAgIHNlbGYuVmlkZW9EZWNvZGVyLmlzQ29uZmlnU3VwcG9ydGVkKGUuZGF0YS5kYXRhKQogICAgICAgICAgLnRoZW4oZnVuY3Rpb24gKHN0YXR1cykgewogICAgICAgICAgICBpZiAoc3RhdHVzLnN1cHBvcnRlZCkgewogICAgICAgICAgICAgIGRlY29kZXIuY29uZmlndXJlKGUuZGF0YS5kYXRhKTsKICAgICAgICAgICAgICBjb25zb2xlLmxvZygnW1dlYmNvZGVjV29ya2VyXTonLCAnaXNDb25maWdTdXBwb3J0ZWQnLCBzdGF0dXMpOwogICAgICAgICAgICB9CiAgICAgICAgICB9KQogICAgICAgICAgLnRoZW4oZnVuY3Rpb24gKCkgewogICAgICAgICAgICBzZWxmLnBvc3RNZXNzYWdlKHsgdHlwZTogJ0RFQ09ERVJfUkVBRFknIH0pOwoKICAgICAgICAgICAgLy8g5o6i5rWL6ZW/5pe26Ze05peg6Kej56CB5bin6L6T5Ye6LOmZjee6p+WIsHdhc20KICAgICAgICAgICAgcmVjZWl2ZUZyYW1lVGltZXIgPSBzZXRUaW1lb3V0KCgpID0+IHsKICAgICAgICAgICAgICBpZiAoaGFzUmVjZWl2ZUZyYW1lKSByZXR1cm4KICAgICAgICAgICAgICBzZWxmLnBvc3RNZXNzYWdlKHsgdHlwZTogJ0ZBSUxFRCcsIG1lc3NhZ2U6ICdubyBmcmFtZSBvdXRwdXQnIH0pOwogICAgICAgICAgICB9LCAyMDAwKTsKICAgICAgICAgIH0pCiAgICAgICAgICAuY2F0Y2goZnVuY3Rpb24gKGUpIHsKICAgICAgICAgICAgc2VsZi5wb3N0TWVzc2FnZSh7CiAgICAgICAgICAgICAgdHlwZTogJ0ZBSUxFRCcsCiAgICAgICAgICAgICAgbWVzc2FnZTogZSAmJiBlLm1lc3NhZ2UKICAgICAgICAgICAgfSk7CiAgICAgICAgICB9KTsKICAgICAgICBicmVhawogICAgICBjYXNlICdkZWNvZGUnOgogICAgICAgIHZhciBkID0gZS5kYXRhLmRhdGE7CgogICAgICAgIHZhciBzYW1wbGVJbmZvID0gZS5kYXRhLmluZm87CgogICAgICAgIGZyYW1lUXVldWUucHVzaChzYW1wbGVJbmZvKTsKCiAgICAgICAgdmFyIGZyYW1lU2l6ZSA9IGQuYnl0ZUxlbmd0aCAtIDQ7CgogICAgICAgIHZhciBkdiA9IG5ldyBEYXRhVmlldyhuZXcgQXJyYXlCdWZmZXIoNCkpOwoKICAgICAgICBkdi5zZXRVaW50MzIoMCwgZnJhbWVTaXplLCBmYWxzZSk7CgogICAgICAgIGQuc2V0KG5ldyBVaW50OEFycmF5KGR2LmJ1ZmZlciksIDApOwoKICAgICAgICBpZiAoc2FtcGxlSW5mby5rZXlmcmFtZSkgewogICAgICAgICAgZGVjb2Rlci5mbHVzaCgpOwogICAgICAgIH0KCiAgICAgICAgdmFyIGNodW5rID0gbmV3IHNlbGYuRW5jb2RlZFZpZGVvQ2h1bmsoewogICAgICAgICAgdHlwZTogc2FtcGxlSW5mby5rZXlmcmFtZSA/ICdrZXknIDogJ2RlbHRhJywKICAgICAgICAgIHRpbWVzdGFtcDogc2FtcGxlSW5mby5wdHMsCiAgICAgICAgICBkYXRhOiBkCiAgICAgICAgfSk7CiAgICAgICAgZGVjb2Rlci5kZWNvZGUoY2h1bmspOwogICAgICAgIGJyZWFrCiAgICAgIGNhc2UgJ2Rlc3Ryb3knOgogICAgICAgIGlmIChkZWNvZGVyKSB7CiAgICAgICAgICBkZWNvZGVyLmZsdXNoKCk7CiAgICAgICAgICBkZWNvZGVyLmNsb3NlKCk7CiAgICAgICAgfQogICAgICAgIGNsZWFyVGltZW91dChyZWNlaXZlRnJhbWVUaW1lcik7CiAgICAgICAgYnJlYWsKICAgICAgY2FzZSAnY2hlY2tEZWNvZGUnOgogICAgICAgIHNlbGYucG9zdE1lc3NhZ2UoewogICAgICAgICAgdHlwZTogJ0NIRUNLX1RPX0RFQ09ERScsCiAgICAgICAgICBkYXRhOiBNYXRoLmFicyhkZWNvZGVyLmRlY29kZVF1ZXVlU2l6ZSAtIGZyYW1lUXVldWUubGVuZ3RoKSA9PT0gMAogICAgICAgIH0pOwogICAgICAgIGJyZWFrCiAgICB9CiAgfSk7Cgp9KCkpOwoK",null,!1)},596857:function(e,t,n){n.d(t,{b:function(){return v}});var r=n(548814),i=n(403826),a=n(524992),o=n(637961),s=n(416556),c=n(500395),u=n(771098),l=n(264288),d=n(368166),f=n(43832),h=n(942155),g=n.n(h),p=["vid","cache"],v=function(e){(0,r.XW)(A,e);var t,n,h,g,v,y,m,b,C,x,I,_=(0,r.WY)(A);function A(e){(0,r.PA)(this,A),t=_.call(this),(0,r._x)((0,r.Lc)(t),"vid",""),(0,r._x)((0,r.Lc)(t),"url",""),(0,r._x)((0,r.Lc)(t),"meta",{}),(0,r._x)((0,r.Lc)(t),"downloadInfo",[]),(0,r._x)((0,r.Lc)(t),"videoSegments",[]),(0,r._x)((0,r.Lc)(t),"audioSegments",[]),(0,r._x)((0,r.Lc)(t),"cache",null),(0,r._x)((0,r.Lc)(t),"_currentSegmentIndex",-1),(0,r._x)((0,r.Lc)(t),"_currentLoadingSegmentIndex",-1),(0,r._x)((0,r.Lc)(t),"buffer",void 0),(0,r._x)((0,r.Lc)(t),"bufferDataLen",0),(0,r._x)((0,r.Lc)(t),"_error",void 0),(0,r._x)((0,r.Lc)(t),"_transformError",function(e){return e}),t._config=(0,u.i)(e);var t,n=t._config,s=n.vid,c=n.cache,l=(0,r.Kd)(n,p);return t.cache=c||new d.C,t.vid=s||l.url,t.url=l.url,l.transformError=t._transformError,t.logger=new i.Y("MP4Loader_"+t.vid),e.openLog&&i.Y.enable(),l.logger=t.logger,t.filesize=0,t._loader=new a.mf(l),t._loader.on(o.K.REAL_TIME_SPEED,function(e){t.emit(o.K.REAL_TIME_SPEED,e)}),t._loader.on("networkError",function(e){t.emit("networkError",e)}),t}return(0,r.qH)(A,[{key:"isMetaLoaded",get:function(){return this.videoSegments.length||this.audioSegments.length}},{key:"setCurrentSegment",value:function(e){(0,f.hj)(e)&&(this._currentSegmentIndex=e)}},{key:"isLastSegment",value:function(e){if((0,f.hj)(e)){var t,n;return e>=((null===(t=this.videoSegments[this.videoSegments.length-1])||void 0===t?void 0:t.index)||(null===(n=this.audioSegments[this.audioSegments.length-1])||void 0===n?void 0:n.index)||0)}return!1}},{key:"isSegmentLoading",value:function(e){return e===this._currentLoadingSegmentIndex}},{key:"changeUrl",value:(t=(0,r.x)((0,r.l5)().mark(function e(t){var n,i,a,o=arguments;return(0,r.l5)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=o.length>1&&void 0!==o[1]?o[1]:t,i=o.length>2?o[2]:void 0,a=o.length>3?o[3]:void 0,e.next=5,this.reset(a);case 5:t&&(this.url=t),n&&(this.vid=n),i&&(this._config.moovEnd=i);case 8:case"end":return e.stop()}},e,this)})),function(e){return t.apply(this,arguments)})},{key:"getOrLoadMeta",value:(n=(0,r.x)((0,r.l5)().mark(function e(t){return(0,r.l5)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(this.isMetaLoaded){e.next=3;break}return e.next=3,this.loadMeta(t);case 3:return e.abrupt("return",this.meta);case 4:case"end":return e.stop()}},e,this)})),function(e){return n.apply(this,arguments)})},{key:"newBufferArray",value:function(e,t){var n;if(this.buffer){if(t||(null===(n=this.buffer)||void 0===n?void 0:n.byteLength)3&&void 0!==v[3]?v[3]:{},this._error=!1,this.filesize=0,this.logger.debug("[loadMetaProcess start], range,",[d,h]),null!==(a=this._config)&&void 0!==a&&a.memoryOpt&&(!this.buffer||null!=g&&g.isExp))try{this.newBufferArray(h-d+1,null==g?void 0:g.isExp)}catch(e){i(null,!0,{},new l.c(null==e?void 0:e.message),{})}return p=function(){var e=(0,r.x)((0,r.l5)().mark(function e(n,a,u,p){var v,y,m,b,C,x,I,_,A,k,L,w,S,T,P,O,B,D,R,Z;return(0,r.l5)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!o.filesize&&null!=p&&p.headers&&(m=null===(v=(y=p.headers).get)||void 0===v?void 0:v.call(y,"content-range"))&&Array.isArray(b=m.split("/"))&&2===b.length&&(o.filesize=parseInt(b[1]),o.filesize>0&&h>o.filesize&&(h=o.filesize,o.logger.debug("[loadMetaProcess] moovEnd changed by content-range in header, [".concat(d,"-").concat(h,"]")))),!a&&o.meta&&null!=u&&u.range&&u.range.length>0&&u.range[1]>=h&&(a=!0,o.logger.debug("[loadMetaProcess],data done,setstate true,[",d,h,"]")),a&&null!=u&&u.range&&u.range.length>0&&u.range[1]0&&i(n,a,u,null,p),!(o.meta.moov||o._error)){e.next=7;break}return e.abrupt("return");case 7:if(!(n&&n.byteLength>0)){e.next=60;break}e.prev=8,null!==(x=o._config)&&void 0!==x&&x.memoryOpt?(o.buffer.set(n,o.bufferDataLen),o.bufferDataLen+=(null==n?void 0:n.byteLength)||0,C=o.buffer.subarray(0,o.bufferDataLen)):(o.buffer=(0,s.gJ)(o.buffer,n),C=o.buffer),e.next=16;break;case 12:return e.prev=12,e.t0=e.catch(8),i(null,a,u,new l.c(null===e.t0||void 0===e.t0?void 0:e.t0.message),p),e.abrupt("return");case 16:if(I=c.I.findBox(C,["moov"])[0]){e.next=31;break}if(_=c.I.findBox(C,["mdat"])[0],!a){e.next=31;break}if(_){e.next=26;break}return o._error=!0,i(null,a,u,new l.c("cannot find moov or mdat box"),p),e.abrupt("return");case 26:return A=_.start+_.size,e.next=29,o.loadData([A,""],t,g);case 29:(k=e.sent)&&(I=c.I.findBox(k.data,["moov"])[0]);case 31:if(!(I&&a&&I.size>I.data.length)){e.next=35;break}return o.logger.debug("[loadMetaProcess],moov not all, range,",u.range[1],",dataLen,",o.bufferDataLen,", state,",a),e.next=35,o.loadMetaProcess(t,[u.range[1],I.start+I.size-1],i,{isExp:!0});case 35:if(!(I&&I.size<=I.data.length&&!o.meta.moov)){e.next=60;break}if(w=c.I.moov(I)){e.next=41;break}return o._error=!0,i(null,a,u,new l.c("cannot parse moov box"),p),e.abrupt("return");case 41:if(S=(0,f._H)(w,o._config),T=function(){var e=(0,r.x)((0,r.l5)().mark(function e(n){var i,a;return(0,r.l5)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(i=c.I.findBox(o.buffer,[n])[0])){e.next=11;break}if(!(i.size>i.data.length)){e.next=10;break}return e.next=5,o.loadData([i.start,i.start+i.size-1],t,g);case 5:if(!(a=e.sent)){e.next=8;break}return e.abrupt("return",c.I.findBox(a.data,[n])[0]);case 8:e.next=11;break;case 10:return e.abrupt("return",i);case 11:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}(),P=!1,(0,f.d0)(S)){e.next=49;break}return e.next=47,T("sidx");case 47:(O=e.sent)&&(B=c.I.sidx(O))&&(S=(0,f.mt)(w,B),P=!0);case 49:if((0,f.d0)(S)){e.next=53;break}return o._error=!0,i(null,a,u,new l.c("cannot parse segments"),p),e.abrupt("return");case 53:o.meta=(0,f.$Z)(w,P),R=(D=S).videoSegments,Z=D.audioSegments,o.videoSegments=R,o.audioSegments=Z,null!==(L=o._config)&&void 0!==L&&L.memoryOpt&&(delete o.buffer,o.bufferDataLen=0),o.logger.debug("[loadMetaProcess] moov ok"),i(void 0,a,{meta:{meta:o.meta,videoSegments:R,audioSegments:Z}},null,p);case 60:case"end":return e.stop()}},e,null,[[8,12]])}));return function(t,n,r,i){return e.apply(this,arguments)}}(),e.next=9,this.loadData([d,h||this._config.moovEnd],t,(0,r.Zj)({onProgress:p},g));case 9:case"end":return e.stop()}},e,this)})),function(e,t,n){return h.apply(this,arguments)})},{key:"loadMeta",value:(g=(0,r.x)((0,r.l5)().mark(function e(t,n){var i=this,a,o,u,d,h,g,p,v,y,m,b,C,x,I,_,A=arguments;return(0,r.l5)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return a=A.length>2&&void 0!==A[2]?A[2]:{},o=[],this.logger.debug("[loadMeta start]"),e.next=5,this.loadData([0,n||this._config.moovEnd],t,a);case 5:if(u=e.sent){e.next=8;break}return e.abrupt("return");case 8:if(o.push(u),d=c.I.findBox(u.data,["moov"])[0]){e.next=24;break}if(h=c.I.findBox(u.data,["mdat"])[0]){e.next=14;break}throw new l.c("cannot find moov or mdat box",u.data);case 14:return g=h.start+h.size,e.next=17,this.loadData([g],t,a);case 17:if(u=e.sent){e.next=20;break}return e.abrupt("return");case 20:if(o.push(u),d=c.I.findBox(u.data,["moov"],g)[0]){e.next=24;break}throw new l.c("cannot find moov box",u.data);case 24:if(!(d.size>d.data.length)){e.next=32;break}return e.next=27,this.loadData([u.data.length,d.start+d.size-1],t,a);case 27:if(u=e.sent){e.next=30;break}return e.abrupt("return");case 30:o.push(u),d.data=(0,s.gJ)(d.data,u.data);case 32:if(p=c.I.moov(d)){e.next=35;break}throw new l.c("cannot parse moov box",d.data);case 35:if(v=(0,f._H)(p,this._config),(0,f.d0)(v)){e.next=42;break}return b=function(){var e=(0,r.x)((0,r.l5)().mark(function e(n,s){var u,l;return(0,r.l5)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(u=c.I.findBox(n,[s])[0]){e.next=3;break}return e.abrupt("return");case 3:if(!(u.size>u.data.length)){e.next=10;break}return e.next=6,i.loadData([u.start,u.start+u.size-1],t,a);case 6:if(!(l=e.sent)){e.next=10;break}return o.push(l),e.abrupt("return",c.I.findBox(l.data,[s],u.start)[0]);case 10:return e.abrupt("return",u);case 11:case"end":return e.stop()}},e)}));return function(t,n){return e.apply(this,arguments)}}(),e.next=40,b(null===(m=o[0])||void 0===m?void 0:m.data,"sidx");case 40:(C=e.sent)&&(y=c.I.sidx(C))&&(v=(0,f.mt)(p,y));case 42:if((0,f.d0)(v)){e.next=44;break}throw new l.c("cannot parse segments",d.data);case 44:return this.meta=(0,f.$Z)(p,!!y),I=(x=v).videoSegments,_=x.audioSegments,this.videoSegments=I,this.audioSegments=_,delete this.buffer,this.bufferDataLen=0,this.logger.debug("[load moov end!!!!!]"),e.abrupt("return",{meta:this.meta,videoSegments:I,audioSegments:_,responses:o});case 52:case"end":return e.stop()}},e,this)})),function(e,t){return g.apply(this,arguments)})},{key:"loadCacheMeta",value:function(e,t){var n=e.moov,r=(0,f._H)(n,this._config),i=r.videoSegments,a=r.audioSegments;this.videoSegments=i,this.audioSegments=a,this._currentSegmentIndex=t,this.meta=e}},{key:"getSegmentByTime",value:function(e){var t,n;return this.videoSegments.length?(t=this.videoSegments.find(function(t){return t.startTime<=e&&t.endTime>e}))&&(n=this.audioSegments[t.index]):n=this.audioSegments.find(function(t){return t.startTime<=e&&t.endTime>e}),{video:t,audio:n}}},{key:"loadSegmentByTime",value:(v=(0,r.x)((0,r.l5)().mark(function e(t,n){var i,a,o,s,c,u=arguments;return(0,r.l5)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(i=!(u.length>2)||void 0===u[2]||u[2],a=u.length>3&&void 0!==u[3]?u[3]:{},this.isMetaLoaded){e.next=5;break}return e.next=5,this.loadMeta(n);case 5:return s=(o=this.getSegmentByTime(t)).video,c=o.audio,e.abrupt("return",this._loadSegment(s,c,n,i,a));case 7:case"end":return e.stop()}},e,this)})),function(e,t){return v.apply(this,arguments)})},{key:"loadNextSegment",value:(y=(0,r.x)((0,r.l5)().mark(function e(t){var n,i,a,o,s=arguments;return(0,r.l5)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n=!(s.length>1)||void 0===s[1]||s[1],i=s.length>2&&void 0!==s[2]?s[2]:{},this.isMetaLoaded){e.next=5;break}return e.next=5,this.loadMeta();case 5:return a=this.videoSegments[this._currentSegmentIndex+1],o=this.audioSegments[this._currentSegmentIndex+1],e.abrupt("return",this._loadSegment(a,o,t,n,i));case 8:case"end":return e.stop()}},e,this)})),function(e){return y.apply(this,arguments)})},{key:"preload",value:(m=(0,r.x)((0,r.l5)().mark(function e(t){var n,i,a,o,s,c,u,l=this;return(0,r.l5)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(this.isMetaLoaded){e.next=3;break}return e.next=3,this.loadMeta(!0);case 3:if(!(!t||t<0)){e.next=5;break}return e.abrupt("return");case 5:if(i=(n=this.getSegmentByTime(t)).video,a=n.audio,o=Math.max((null==i?void 0:i.index)||0,(null==a?void 0:a.index)||0)){e.next=9;break}return e.abrupt("return");case 9:return s=this.videoSegments.slice(0,o),c=this.audioSegments.slice(0,o),u=function(){var e=(0,r.x)((0,r.l5)().mark(function e(t){return(0,r.l5)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t>o)){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,l._loadSegment(s[t],c[t],!0,!1);case 4:return e.next=6,u(t+1);case 6:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}(),e.next=14,u(0);case 14:case"end":return e.stop()}},e,this)})),function(e){return m.apply(this,arguments)})},{key:"cancel",value:function(){return this._loader.cancel()}},{key:"reset",value:(b=(0,r.x)((0,r.l5)().mark(function e(){var t,n=arguments;return(0,r.l5)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n.length>0&&void 0!==n[0]&&n[0]){e.next=5;break}return this.logger.debug("[MP4loader reset func call loader.cancel]"),e.next=5,this._loader.cancel();case 5:this.vid=this.url="",this.meta={},this.downloadInfo=[],this.videoSegments=[],this.audioSegments=[],this._currentSegmentIndex=-1,this._currentLoadingSegmentIndex=-1,null!==(t=this._config)&&void 0!==t&&t.memoryOpt&&(delete this.buffer,this.bufferDataLen=0);case 13:case"end":return e.stop()}},e,this)})),function(){return b.apply(this,arguments)})},{key:"destroy",value:(C=(0,r.x)((0,r.l5)().mark(function e(){return(0,r.l5)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.reset();case 2:this.cache.clear();case 3:case"end":return e.stop()}},e,this)})),function(){return C.apply(this,arguments)})},{key:"_loadSegment",value:(x=(0,r.x)((0,r.l5)().mark(function e(t,n,i,a,o){var s,c;return(0,r.l5)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(!t&&!n)){e.next=2;break}return e.abrupt("return");case 2:return s=(null==t?void 0:t.index)||(null==n?void 0:n.index)||0,this._currentLoadingSegmentIndex=s,e.prev=4,e.next=7,this.loadData([Math.min((null==t?void 0:t.range[0])||1/0,(null==n?void 0:n.range[0])||1/0),Math.max((null==t?void 0:t.range[1])||0,(null==n?void 0:n.range[1])||0)],i,o);case 7:c=e.sent;case 8:return e.prev=8,this._currentLoadingSegmentIndex=-1,e.finish(8);case 11:if(c){e.next=13;break}return e.abrupt("return");case 13:return a&&(this._currentSegmentIndex=s),c.video=t,c.audio=n,e.abrupt("return",c);case 17:case"end":return e.stop()}},e,this,[[4,,8,11]])})),function(e,t,n,r,i){return x.apply(this,arguments)})},{key:"loadData",value:(I=(0,r.x)((0,r.l5)().mark(function e(t,n){var i,a,o,s,c,u=arguments;return(0,r.l5)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return i=u.length>2&&void 0!==u[2]?u[2]:{},a=this._getCacheKey(t),e.next=4,this.cache.get(a);case 4:if(o=e.sent){e.next=12;break}return c=null!=i&&i.url?i.url:this.url,e.next=9,this._loader.load(c,(0,r.Zj)({range:t,vid:this.vid},i));case 9:s=e.sent,e.next=13;break;case 12:s={data:o,state:!0,options:{fromCache:!0,range:t,vid:this.vid}};case 13:if(s){e.next=15;break}return e.abrupt("return");case 15:return!o&&(s.data&&this.downloadInfo.push({startTime:s.startTime,endTime:s.endTime,size:s.data.byteLength,range:t}),this.downloadInfo&&this.downloadInfo.length>this._config.maxDownloadInfoSize&&(this.downloadInfo=this.downloadInfo.slice(-this._config.maxDownloadInfoSize))),e.abrupt("return",s);case 18:case"end":return e.stop()}},e,this)})),function(e,t){return I.apply(this,arguments)})},{key:"_getCacheKey",value:function(e){return(this.vid||this.url)+":"+e}}]),A}(g())},210359:function(e,t,n){n.d(t,{j:function(){return l}});var r=n(182432),i=n(801700),a=n(587220),o=n(275764),s=n(654175),c=n(942155),u=n.n(c),l=function(e){(0,r.XW)(c,e);var t,n=(0,r.WY)(c);function c(){var e;return(0,r.PA)(this,c),e=n.call(this),(0,r._x)((0,r.Lc)(e),"_abortController",null),(0,r._x)((0,r.Lc)(e),"_timeoutTimer",null),(0,r._x)((0,r.Lc)(e),"_reader",null),(0,r._x)((0,r.Lc)(e),"_response",null),(0,r._x)((0,r.Lc)(e),"_aborted",!1),(0,r._x)((0,r.Lc)(e),"_index",-1),(0,r._x)((0,r.Lc)(e),"_range",null),(0,r._x)((0,r.Lc)(e),"_receivedLength",0),(0,r._x)((0,r.Lc)(e),"_running",!1),(0,r._x)((0,r.Lc)(e),"_logger",null),(0,r._x)((0,r.Lc)(e),"_vid",""),(0,r._x)((0,r.Lc)(e),"_onProcessMinLen",0),(0,r._x)((0,r.Lc)(e),"_onCancel",null),(0,r._x)((0,r.Lc)(e),"_priOptions",null),e}return(0,r.qH)(c,[{key:"load",value:function(e){var t,n=this,c=e.url,u=e.vid,l=e.timeout,d=e.responseType,f=e.onProgress,h=e.index,g=e.onTimeout,p=e.onCancel,v=e.range,y=e.transformResponse,m=e.request,b=e.params,C=e.logger,x=e.method,I=e.headers,_=e.body,A=e.mode,k=e.credentials,L=e.cache,w=e.redirect,S=e.referrer,T=e.referrerPolicy,P=e.onProcessMinLen,O=e.priOptions;this._logger=C,this._aborted=!1,this._onProcessMinLen=P,this._onCancel=p,this._abortController="undefined"!=typeof AbortController&&new AbortController,this._running=!0,this._index=h,this._range=v||[0,0],this._vid=u||c,this._priOptions=O||{};var B={method:x,headers:I,body:_,mode:A,credentials:k,cache:L,redirect:w,referrer:S,referrerPolicy:T,signal:null===(t=this._abortController)||void 0===t?void 0:t.signal},D=!1;clearTimeout(this._timeoutTimer),c=(0,a.G7)(c,b);var R=(0,a.Gu)(v);R&&(I=m?m.headers:B.headers=B.headers||(Headers?new Headers:{}),Headers&&I instanceof Headers?I.append("Range",R):I.Range=R),l&&(this._timeoutTimer=setTimeout(function(){if(D=!0,n.cancel(),g){var e=new i.C(c,B,null,"timeout");e.isTimeout=!0,g(e,{index:n._index,range:n._range,vid:n._vid,priOptions:n._priOptions})}},l));var Z=Date.now();return this._logger.debug("[fetch load start], index,",h,",range,",v),new Promise(function(e,t){var u;fetch(m||c,m?void 0:B).then((u=(0,r.x)((0,r.l5)().mark(function u(l){var g,p,m,b;return(0,r.l5)().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:if(clearTimeout(n._timeoutTimer),n._response=l,!(n._aborted||!n._running)){r.next=4;break}return r.abrupt("return");case 4:if(y&&(l=y(l,c)||l),l.ok){r.next=7;break}throw new i.C(c,B,l,"bad network response");case 7:if(g=Date.now(),d!==o.U.TEXT){r.next=15;break}return r.next=11,l.text();case 11:case 18:p=r.sent,n._running=!1,r.next=37;break;case 15:if(d!==o.U.JSON){r.next=22;break}return r.next=18,l.json();case 22:if(!f){r.next=29;break}return n.resolve=e,n.reject=t,n._loadChunk(l,f,Z,g),r.abrupt("return");case 29:return r.next=31,l.arrayBuffer();case 31:p=new Uint8Array(p=r.sent),n._running=!1,m=Date.now()-Z,b=(0,a.pl)(p.byteLength,m),n.emit(s.K.REAL_TIME_SPEED,{speed:b,len:p.byteLength,time:m,vid:n._vid,index:n._index,range:n._range,priOptions:n._priOptions});case 37:n._logger.debug("[fetch load end], index,",h,",range,",v),e((0,a.rO)(p,!0,l,l.headers.get("Content-Length"),l.headers.get("age"),Z,g,h,v,n._vid,n._priOptions));case 39:case"end":return r.stop()}},u)})),function(e){return u.apply(this,arguments)})).catch(function(e){var r;clearTimeout(n._timeoutTimer),n._running=!1,(!n._aborted||D)&&((e=e instanceof i.C?e:new i.C(c,B,null,null===(r=e)||void 0===r?void 0:r.message)).startTime=Z,e.endTime=Date.now(),e.isTimeout=D,e.options={index:n._index,range:n._range,vid:n._vid,priOptions:n._priOptions},t(e))})})}},{key:"cancel",value:(t=(0,r.x)((0,r.l5)().mark(function e(){return(0,r.l5)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._aborted){e.next=2;break}return e.abrupt("return");case 2:if(this._aborted=!0,this._running=!1,!this._response){e.next=14;break}if(e.prev=5,!this._reader){e.next=9;break}return e.next=9,this._reader.cancel();case 9:e.next=13;break;case 11:e.prev=11,e.t0=e.catch(5);case 13:this._response=this._reader=null;case 14:if(this._abortController){try{this._abortController.abort()}catch(e){}this._abortController=null}this._onCancel&&this._onCancel({index:this._index,range:this._range,vid:this._vid,priOptions:this._priOptions});case 16:case"end":return e.stop()}},e,this,[[5,11]])})),function(){return t.apply(this,arguments)})},{key:"_loadChunk",value:function(e,t,n,o){var c,u,l,d,f=this;if(!e.body||!e.body.getReader){this._running=!1;var h=new i.C(e.url,"",e,"onProgress of bad response.body.getReader");h.options={index:this._index,range:this._range,vid:this._vid,priOptions:this._priOptions},this.reject(h);return}this._onProcessMinLen>0&&(this._cache=new Uint8Array(2097152),this._writeIdx=0);var g=this._reader=e.body.getReader();var p=(c=(0,r.x)((0,r.l5)().mark(function i(){var c,h,v,y,m,b,C,x;return(0,r.l5)().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return l=Date.now(),r.prev=1,r.next=4,g.read();case 4:u=r.sent,d=Date.now(),r.next=13;break;case 8:return r.prev=8,r.t0=r.catch(1),d=Date.now(),!f._aborted&&(f._running=!1,r.t0.options={index:f._index,range:f._range,vid:f._vid,priOptions:f._priOptions},f.reject(r.t0)),r.abrupt("return");case 13:if(v=(h=(null===(c=f._range)||void 0===c?void 0:c.length)>0?f._range[0]:0)+f._receivedLength,!f._aborted){r.next=19;break}return f._running=!1,t(void 0,!1,{range:[v,v],vid:f._vid,index:f._index,startTime:l,endTime:d,st:n,firstByteTime:o,priOptions:f._priOptions},e),r.abrupt("return");case 19:y=u.value?u.value.byteLength:0,f._receivedLength+=y,f._logger.debug("【fetchLoader,onProgress call】,task,",f._range,", start,",v,", end,",h+f._receivedLength,", done,",u.done),f._onProcessMinLen>0?f._writeIdx+y>=f._onProcessMinLen||u.done?((m=new Uint8Array(f._writeIdx+y)).set(f._cache.slice(0,f._writeIdx),0),y>0&&m.set(u.value,f._writeIdx),f._writeIdx=0,f._logger.debug("【fetchLoader,onProgress enough】,done,",u.done,",len,",m.byteLength,", writeIdx,",f._writeIdx)):y>0&&f._writeIdx+y<2097152?(f._cache.set(u.value,f._writeIdx),f._writeIdx+=y,f._logger.debug("【fetchLoader,onProgress cache】,len,",y,", writeIdx,",f._writeIdx)):y>0&&(b=new Uint8Array(f._writeIdx+y+2048),f._logger.debug("【fetchLoader,onProgress extra start】,size,",f._writeIdx+y+2048,", datalen,",y,", writeIdx,",f._writeIdx),b.set(f._cache.slice(0,f._writeIdx),0),y>0&&b.set(u.value,f._writeIdx),f._writeIdx+=y,delete f._cache,f._cache=b,f._logger.debug("【fetchLoader,onProgress extra end】,len,",y,", writeIdx,",f._writeIdx)):m=u.value,(m&&m.byteLength>0||u.done)&&t(m,u.done,{range:[f._range[0]+f._receivedLength-(m?m.byteLength:0),f._range[0]+f._receivedLength],vid:f._vid,index:f._index,startTime:l,endTime:d,st:n,firstByteTime:o,priOptions:f._priOptions},e),u.done?(C=Date.now()-n,x=(0,a.pl)(f._receivedLength,C),f.emit(s.K.REAL_TIME_SPEED,{speed:x,len:f._receivedLength,time:C,vid:f._vid,index:f._index,range:f._range,priOptions:f._priOptions}),f._running=!1,f._logger.debug("[fetchLoader onProgress end],task,",f._range,",done,",u.done),f.resolve((0,a.rO)(u,!0,e,e.headers.get("Content-Length"),e.headers.get("age"),n,o,f._index,f._range,f._vid,f._priOptions))):p();case 25:case"end":return r.stop()}},i,null,[[1,8]])})),function(){return c.apply(this,arguments)});p()}},{key:"receiveLen",get:function(){return this._receivedLength}},{key:"running",get:function(){return this._running},set:function(e){this._running=e}}],[{key:"isSupported",value:function(){return"undefined"!=typeof fetch}}]),c}(u())},55743:function(e,t,n){n.d(t,{mf:function(){return f}});var r=n(182432),i=n(210359),a=n(275764),o=n(976290),s=n(656775),c=n(815839),u=n(234086),l=n(654175),d=n(942155),f=function(e){(0,r.XW)(d,e);var t,n=(0,r.WY)(d);function d(e){var t;return(0,r.PA)(this,d),t=n.call(this,e),(0,r._x)((0,r.Lc)(t),"type",a.t.FETCH),(0,r._x)((0,r.Lc)(t),"_queue",[]),(0,r._x)((0,r.Lc)(t),"_alive",[]),(0,r._x)((0,r.Lc)(t),"_currentTask",null),(0,r._x)((0,r.Lc)(t),"_finnalUrl",""),(0,r._x)((0,r.Lc)(t),"_config",void 0),t._config=(0,o.i)(e),(t._config.loaderType===a.t.XHR||!i.j.isSupported())&&(t.type=a.t.XHR),t.log=e.logger,t}return(0,r.qH)(d,[{key:"isFetch",value:function(){return this.type===a.t.FETCH}},{key:"load",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};"string"!=typeof e&&e?n=e:n.url=e||n.url||this._config.url,(n=Object.assign({},this._config,n)).params&&(n.params=Object.assign({},n.params)),n.headers&&(0,c.PO)(n.headers)&&(n.headers=Object.assign({},n.headers)),n.body&&(0,c.PO)(n.body)&&(n.body=Object.assign({},n.body)),n.transformRequest&&(n=n.transformRequest(n)||n),n.logger=this.log;var r=new s.i(this.type,n);return r.loader.on(l.K.REAL_TIME_SPEED,function(e){t.emit(l.K.REAL_TIME_SPEED,e)}),this._queue.push(r),1===this._queue.length&&(!this._currentTask||!this._currentTask.running)&&this._processTask(),r.promise}},{key:"cancel",value:(t=(0,r.x)((0,r.l5)().mark(function e(){var t;return(0,r.l5)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=this._queue.map(function(e){return e.cancel()}).concat(this._alive.map(function(e){return e.cancel()})),this._currentTask&&t.push(this._currentTask.cancel()),this._queue=[],this._alive=[],e.next=6,Promise.all(t);case 6:return e.next=8,(0,u._v)();case 8:case"end":return e.stop()}},e,this)})),function(){return t.apply(this,arguments)})},{key:"_processTask",value:function(){var e=this;if(this._currentTask=this._queue.shift(),!!this._currentTask){this._currentTask.alive&&this._alive.push(this._currentTask);var t=this._currentTask.exec().catch(function(e){});t&&"function"==typeof t.finally&&t.finally(function(){var t,n;null!==(t=e._currentTask)&&void 0!==t&&t.alive&&(null===(n=e._alive)||void 0===n?void 0:n.length)>0&&(e._alive=e._alive.filter(function(t){return t&&t!==e._currentTask})),e._processTask()})}}}],[{key:"isFetchSupport",value:function(){return i.j.isSupported()}}]),d}(n.n(d)())},70427:function(e,t,n){function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function i(e){for(var t=1;t=0;--i){var a=this.tryEntries[i],o=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var s=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(s&&c){if(this.prev=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),_(n),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;_(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:k(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},e}function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e,t,n,r,i,a,o){try{var s=e[a](o),c=s.value}catch(e){n(e);return}s.done?t(c):Promise.resolve(c).then(r,i)}function c(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(e){s(a,r,i,o,c,"next",e)}function c(e){s(a,r,i,o,c,"throw",e)}o(void 0)})}}function u(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function l(e,t){for(var n=0;n=0)&&(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0))Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}}return i}function C(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function x(e){var t=v();return function(){var n,r=g(e);return n=t?Reflect.construct(r,arguments,g(this).constructor):r.apply(this,arguments),function(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return C(e)}(this,n)}}function I(){return(I="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=g(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function _(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{!o&&null!=n.return&&n.return()}finally{if(s)throw a}}}}function k(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}},908483:function(e,t,n){n.d(t,{j:function(){return r}});var r="undefined"!=typeof window},604165:function(e,t,n){n.d(t,{i:function(){return a}});var r=n(70427),i=n(265614);function a(e){return(0,r.Zj)({loaderType:i.t.FETCH,retry:0,retryDelay:0,timeout:0,request:null,onTimeout:void 0,onProgress:void 0,onRetryError:void 0,transformRequest:void 0,transformResponse:void 0,transformError:void 0,responseType:i.U.TEXT,range:void 0,url:"",params:void 0,method:"GET",headers:{},body:void 0,mode:void 0,credentials:void 0,cache:void 0,redirect:void 0,referrer:void 0,referrerPolicy:void 0,integrity:void 0,onProcessMinLen:0},e)}},699694:function(e,t,n){function r(){var e,t,n=new Promise(function(n,r){e=n,t=r});return n.used=!1,n.resolve=function(){return n.used=!0,e.apply(void 0,arguments)},n.reject=function(){return n.used=!0,t.apply(void 0,arguments)},n}function i(){try{return parseInt(performance.now(),10)}catch(e){return new Date().getTime()}}n.d(t,{Kp:function(){return a},Qo:function(){return r},je:function(){return i}});var a={stringify:function(e){try{return JSON.stringify(e)}catch(e){return""}},parse:function(e){try{return JSON.parse(e)}catch(e){return}}}},991372:function(e,t,n){n.d(t,{C:function(){return a}});var r=n(570783),i=n(65661),a=function(e){(0,r.XW)(n,e);var t=(0,r.WY)(n);function n(e,a,o,s){var c;return(0,r.PA)(this,n),c=t.call(this,s),(0,r._x)((0,r.Lc)(c),"retryCount",0),(0,r._x)((0,r.Lc)(c),"isTimeout",!1),(0,r._x)((0,r.Lc)(c),"loaderType",i.t.FETCH),(0,r._x)((0,r.Lc)(c),"startTime",0),(0,r._x)((0,r.Lc)(c),"endTime",0),(0,r._x)((0,r.Lc)(c),"options",{}),c.url=e,c.request=a,c.response=o,c}return(0,r.qH)(n)}((0,r.wm)(Error))},461449:function(e,t,n){n.d(t,{NI:function(){return h},YW:function(){return g},mA:function(){return f}});var r=n(697946),i=n(828792),a=n(745740),o=[],s=Object.create(null),c=Object.create(null),u=Object.create(null),l=[];function d(e){return(e||[]).filter(Boolean)}var f=new(function(){function e(){(0,r.PA)(this,e)}return(0,r.qH)(e,[{key:"register",value:function(e){if(!e||!e.id)throw Error("video codec id is required");var t,n=o.find(function(t){return t.id===e.id});return n&&this.unregister(n.id),o.push(e),d((t=e).sampleEntries).forEach(function(e){s[e]=t}),d(t.configBoxes).forEach(function(e){c[e]=t}),d(t.codecStringPrefixes).forEach(function(e){l.push({prefix:e,codec:t})}),t.codecType&&!u[t.codecType]&&(u[t.codecType]=t),e}},{key:"unregister",value:function(e){var t=o.findIndex(function(t){return t.id===e});if(!(t<0)){var n=o.splice(t,1),i=(0,r.ZQ)(n,1)[0];return!function(e){d(e.sampleEntries).forEach(function(t){s[t]===e&&delete s[t]}),d(e.configBoxes).forEach(function(t){c[t]===e&&delete c[t]}),e.codecType&&u[e.codecType]===e&&delete u[e.codecType];for(var t=l.length-1;t>=0;t--)l[t].codec===e&&l.splice(t,1)}(i),i}}},{key:"getBySampleEntry",value:function(e){return s[e]}},{key:"getByConfigBox",value:function(e){return c[e]}},{key:"getByCodecType",value:function(e){return u[e]}},{key:"getByCodecString",value:function(e){var t;if(e)return null===(t=l.find(function(t){return 0===e.indexOf(t.prefix)}))||void 0===t?void 0:t.codec}},{key:"getByTrack",value:function(e){if(e){var t=e.vvccSampleEntryType;if(t&&this.getBySampleEntry(t))return this.getBySampleEntry(t);var n=this.getByCodecString(e.codec);return n?n:this.getByCodecType(e.codecType)}}},{key:"list",value:function(){return o.slice()}}]),e}());function h(e){return f.register(e)}function g(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e.track?f.getByTrack(e.track):e.sampleEntry?f.getBySampleEntry(e.sampleEntry):e.configBox?f.getByConfigBox(e.configBox):e.codecType?f.getByCodecType(e.codecType):e.codec?f.getByCodecString(e.codec):void 0}h({id:"vvc",kind:"video",codecType:a._e.VVCC,sampleEntries:["vvc1","vvi1"],configBoxes:["vvcC"],codecStringPrefixes:["vvc1.","vvi1."],trackConfigKey:"vvcC",sampleEntryTrackKey:"vvccSampleEntryType",parseConfigBox:function(e){var t=e.data;e.box;var n=e.sampleEntryType;return i.i.parseVVCDecoderConfigurationRecord(t,n||"vvc1")},applyTrackConfig:function(e){var t,n,r,i,o,s,c;i=(t=e).track,o=t.entry,s=t.config,c=t.defaultSampleEntryType,i.codecType=a._e.VVCC,i.codec=s.codec,i.sps=s.sps,i.pps=s.pps,i.vps=s.vps,i.vvcC=s.data,s.nalUnitSize&&(i.nalUnitSize=s.nalUnitSize),i.vvccSampleEntryType="encv"===o.type?(null===(n=o.sinf)||void 0===n?void 0:null===(r=n.frma)||void 0===r?void 0:r.data_format)||s.sampleEntryType||(void 0===c?"vvc1":c):o.type},getSampleEntryType:function(e){return e.track.vvccSampleEntryType||"vvc1"},getConfigBoxType:function(e){return e.track,"vvcC"},buildConfigBox:function(e){var t,n,r,i,a=e.track;return n=(t={track:a,MP4:e.MP4,configBoxType:this.getConfigBoxType({track:a})}).track,r=t.MP4,i=t.configBoxType,r.box(r.type(void 0===i?"vvcC":i),new Uint8Array(n.vvcC))},buildFtyp:function(e){return e.track,e.MP4.FTYPVVC1},markSample:function(e){var t,n;t=e.sample,!(n=i.i.getNalInfo(t.units))||(t.sideData=(0,r.Zj)((0,r.Zj)({},t.sideData||{}),{},{vvcNalInfo:n}))}})},279781:function(e,t,n){n.d(t,{_:function(){return i}});var r=n(697946),i=function(){function e(t,n,i){(0,r.PA)(this,e),(0,r._x)(this,"flag",{}),(0,r._x)(this,"keyframe",!1),(0,r._x)(this,"gopId",0),(0,r._x)(this,"duration",0),(0,r._x)(this,"size",0),(0,r._x)(this,"units",[]),(0,r._x)(this,"chromaFormat",420),(0,r._x)(this,"sideData",null),this.originPts=this.pts=t,this.originDts=this.dts=n,i&&(this.units=i)}return(0,r.qH)(e,[{key:"cts",get:function(){return this.pts-this.dts}},{key:"setToKeyframe",value:function(){this.keyframe=!0,this.flag.dependsOn=2,this.flag.isNonSyncSample=0}}]),e}()},853906:function(e,t,n){n.d(t,{q:function(){return a}});var r=n(519357),i=n(258413),a=function(){function e(){(0,r.PA)(this,e),(0,r._x)(this,"id",1),(0,r._x)(this,"type",i.Vc.VIDEO),(0,r._x)(this,"codecType",i._e.AVC),(0,r._x)(this,"pid",-1),(0,r._x)(this,"hvcC",void 0),(0,r._x)(this,"codec",""),(0,r._x)(this,"timescale",0),(0,r._x)(this,"formatTimescale",0),(0,r._x)(this,"sequenceNumber",0),(0,r._x)(this,"baseMediaDecodeTime",0),(0,r._x)(this,"baseDts",0),(0,r._x)(this,"duration",0),(0,r._x)(this,"warnings",[]),(0,r._x)(this,"samples",[]),(0,r._x)(this,"pps",[]),(0,r._x)(this,"sps",[]),(0,r._x)(this,"vps",[]),(0,r._x)(this,"fpsNum",0),(0,r._x)(this,"fpsDen",0),(0,r._x)(this,"sarRatio",[]),(0,r._x)(this,"width",0),(0,r._x)(this,"height",0),(0,r._x)(this,"nalUnitSize",4),(0,r._x)(this,"present",!1),(0,r._x)(this,"isVideoEncryption",!1),(0,r._x)(this,"isAudioEncryption",!1),(0,r._x)(this,"isVideo",!0),(0,r._x)(this,"kid",null),(0,r._x)(this,"pssh",null),(0,r._x)(this,"ext",void 0)}return(0,r.qH)(e,[{key:"reset",value:function(){this.sequenceNumber=this.width=this.height=this.fpsDen=this.fpsNum=this.duration=this.baseMediaDecodeTime=this.timescale=0,this.codec="",this.present=!1,this.pid=-1,this.pps=[],this.sps=[],this.vps=[],this.sarRatio=[],this.samples=[],this.warnings=[],this.hvcC=null}},{key:"exist",value:function(){return!!(this.pps.length&&this.sps.length&&this.codec)}},{key:"hasSample",value:function(){return!!this.samples.length}},{key:"isEncryption",get:function(){return this.isVideoEncryption}}]),e}()}}]);