2 lines
139 KiB
Plaintext
2 lines
139 KiB
Plaintext
/*! For license information please see player-13.e74a8f6b.js.LICENSE.txt */
|
|
!function(t,e){"object"==typeof module&&"object"==typeof module.exports?e():"function"==typeof define&&define.amd?define([],e):(t="undefined"!=typeof globalThis?globalThis:t||self)&&e()}(this,function(){"use strict";"object"==typeof window&&(window.openRedirect={version:"1.2.20",webpackPluginVersion:"3.4.22",reportOnly:!1})}),!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).xss={})}(this,function(t){"use strict";var e=function(){return(e=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var i in e=arguments[r])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function r(t,e,r){if(r||2==arguments.length)for(var n,i=0,o=e.length;i<o;i++)!n&&i in e||(n||(n=Array.prototype.slice.call(e,0,i)),n[i]=e[i]);return t.concat(n||Array.prototype.slice.call(e))}var n=/[^a-zA-Z0-9\\_:.-]/gim,i=/</g,o=/>/g,a=/&#([a-zA-Z0-9]*);?/gim,s=/"/g,u=/:?/gim,c=/&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,f=/u\s*r\s*l\s*\(.*/gi,h=/e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi,d=/"/g,p=function(t){return t.replace(i,"<").replace(o,">")},g={indexOf:function(t,e){var r,n;for(r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return -1},forEach:function(t,e,r){var n,i;for(n=0,i=t.length;n<i;n++)e.call(r,t[n],n,t)},some:function(t,e,r){var n,i;for(n=0,i=t.length;n<i;n++)if(e.call(r,t[n],n,t))return!0;return!1},trim:function(t){return t.replace(/(^\s*)|(\s*$)/g,"")},includes:function(t,e){if("string"==typeof t)return -1!==t.indexOf(e);for(var r=0;r<t.length;r++)if(t[r]===e)return!0;return!1},spaceIndex:function(t){var e=/\s|\n|\t/.exec(t);return e?e.index:-1},uniq:function(t){for(var e={},r=[],n=0;n<t.length;n++)e[t[n]]||(r.push(t[n]),e[t[n]]=!0);return r},from:function(t){for(var e=[],r=0;r<t.length;r++)e.push(t[r]);return e},keys:function(t){var e=[];for(var r in t)e.push(r);return e}};function v(t){return null==t}function m(t){var e;return'"'===(e=t)[0]&&'"'===e[e.length-1]||"'"===e[0]&&"'"===e[e.length-1]?t.substr(1,t.length-2):t}function _(t){var e,r,n,i,o,a,s,u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",c="",l=0;for(t=function(t){t=t.replace(/rn/g,"n");for(var e="",r=0;r<t.length;r++){var n=t.charCodeAt(r);n<128?e+=String.fromCharCode(n):n>127&&n<2048?e+=String.fromCharCode(n>>6|192)+String.fromCharCode(63&n|128):e+=String.fromCharCode(n>>12|224)+String.fromCharCode(n>>6&63|128)+String.fromCharCode(63&n|128)}return e}(t);l<t.length;)i=(e=t.charCodeAt(l++))>>2,o=(3&e)<<4|(r=t.charCodeAt(l++))>>4,a=(15&r)<<2|(n=t.charCodeAt(l++))>>6,s=63&n,isNaN(r)?a=s=64:isNaN(n)&&(s=64),c=c+u.charAt(i)+u.charAt(o)+u.charAt(a)+u.charAt(s);return c}function y(t){var e,r,n,i,o,a,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",u="",c=0;for(t=t.replace(/[^A-Za-z0-9+/=]/g,"");c<t.length;)e=s.indexOf(t.charAt(c++))<<2|(i=s.indexOf(t.charAt(c++)))>>4,r=(15&i)<<4|(o=s.indexOf(t.charAt(c++)))>>2,n=(3&o)<<6|(a=s.indexOf(t.charAt(c++))),u+=String.fromCharCode(e),64!==o&&(u+=String.fromCharCode(r)),64!==a&&(u+=String.fromCharCode(n));return function(t){for(var e="",r=0,n=0,i=0,o=0;r<t.length;)(n=t.charCodeAt(r))<128?(e+=String.fromCharCode(n),r++):n>191&&n<224?(e+=String.fromCharCode((31&n)<<6|63&(o=t.charCodeAt(r+1))),r+=2):(o=t.charCodeAt(r+1),e+=String.fromCharCode((15&n)<<12|(63&o)<<6|63&(i=t.charCodeAt(r+2))),r+=3);return e}(u)}function b(t,e,r){var n="",i=0,o=!1,a=!1,s=0,u=t.length,c="",l="";t:for(s=0;s<u;s++){var f=t.charAt(s);if(!1===o){if("<"===f){o=s;continue}}else if(!1===a){if("<"===f){n+=r(t.slice(i,s)),o=s,i=s;continue}if(">"===f||s===u-1){n+=r(t.slice(i,o)),c=function(t){var e,r=g.spaceIndex(t);return e=-1===r?t.slice(1,-1):t.slice(1,r+1),"/"===(e=g.trim(e).toLowerCase()).slice(0,1)&&(e=e.slice(1)),"/"===e.slice(-1)&&(e=e.slice(0,-1)),e}(l=t.slice(o,s+1)),n+=e(o,n.length,c,l,"</"===l.slice(0,2)),i=s+1,o=!1;continue}if('"'===f||"'"===f)for(var h=1,d=t.charAt(s-h);""===d.trim()||"="===d;){if("="===d){a=f;continue t}d=t.charAt(s-++h)}}else if(f===a){a=!1;continue}}return i<u&&(n+=r(t.substr(i))),n}function x(t,e){var r=0,i=0,o=[],a=!1,s=t.length;function u(t,r){if(!((t=(t=g.trim(t)).replace(n,"").toLowerCase()).length<1)){var i=e(t,r||"");i&&o.push(i)}}for(var c=0;c<s;c++){var l=t.charAt(c),f=void 0;if(!1!==a||"="!==l){if(!1===a||c!==i){if(/\s|\n|\t/.test(l)){if(t=t.replace(/\s|\n|\t/g," "),!1===a){if(-1===(f=function(t,e){for(;e<t.length;e++){var r=t[e];if(" "!==r)return"="===r?e:-1}return -1}(t,c))){u(g.trim(t.slice(r,c))),a=!1,r=c+1;continue}c=f-1;continue}if(-1===(f=function(t,e){for(;e>0;e--){var r=t[e];if(" "!==r)return"="===r?e:-1}return -1}(t,c-1))){u(a,m(g.trim(t.slice(r,c)))),a=!1,r=c+1;continue}}}else{if(-1===(f=t.indexOf(l,c+1)))break;u(a,g.trim(t.slice(i+1,f))),a=!1,r=(c=f)+1}}else a=t.slice(r,c),r=c+1,i='"'===t.charAt(r)||"'"===t.charAt(r)?r:function(t,e){for(;e<t.length;e++){var r=t[e];if(" "!==r)return"'"===r||'"'===r?e:-1}return -1}(t,c+1)}return r<t.length&&(!1===a?u(t.slice(r)):u(a,m(g.trim(t.slice(r))))),g.trim(o.join(" "))}function w(t,e,r){if(r=function(t){return t=function(t){for(var e="",r=0,n=t.length;r<n;r++)e+=32>t.charCodeAt(r)?" ":t.charAt(r);return g.trim(e)}(t=(t=(t=t.replace(s,'"')).replace(a,function(t,e){return"x"===e[0]||"X"===e[0]?String.fromCharCode(parseInt(e.substr(1),16)):String.fromCharCode(parseInt(e,10))})).replace(u,":").replace(c," "))}(r),"href"===e||"src"===e){if("#"===(r=g.trim(r)))return"#";if("http://"!==r.substr(0,7)&&"https://"!==r.substr(0,8)&&"mailto:"!==r.substr(0,7)&&"tel:"!==r.substr(0,4)&&"data:image/"!==r.substr(0,11)&&"ftp://"!==r.substr(0,6)&&"./"!==r.substr(0,2)&&"../"!==r.substr(0,3)&&"#"!==r[0]&&"/"!==r[0])return""}else if("background"===e){if(l.lastIndex=0,l.test(r))return""}else if("style"===e&&(h.lastIndex=0,h.test(r)||(f.lastIndex=0,f.test(r)&&(l.lastIndex=0,l.test(r)))))return"";return r=function(t){return t=p(t=t.replace(d,"""))}(r)}var S=function(t){return"string"==typeof t?t.replace(/'/g,'"').replace('=""',"").replace(/\s+/g,"").toLowerCase():""},k=function(){function t(t){var e=function(t){var e={};for(var r in t)e[r]=t[r];return e}(t||{});e.stripIgnoreTag&&(e.onIgnoreTag,e.onIgnoreTag=function(){return""}),e.whiteList={},e.onTag=function(){},e.onTagAttr=function(){},e.onIgnoreTag=function(){},e.onIgnoreTagAttr=function(){},e.safeAttrValue=w,e.escapeHtml=p,this.options=Object.assign(e,t)}return t.prototype.process=function(t){if(!(t=(t=t||"").toString()))return"";var e,r,n,i,o,a,s=this.options,u=s.whiteList,c=s.onTag,l=s.onIgnoreTag,f=s.onTagAttr,h=s.onIgnoreTagAttr,d=s.safeAttrValue,p=s.escapeHtml;s.stripBlankChar&&(t=(e=(e=t.split("")).filter(function(t){var e=t.charCodeAt(0);return!(127===e||e<=31&&10!==e&&13!==e)})).join("")),s.allowCommentTag||(t=function(t){for(var e="",r=0;r<t.length;){var n=t.indexOf("\x3c!--",r);if(-1===n){e+=t.slice(r);break}e+=t.slice(r,n);var i=t.indexOf("--\x3e",n);if(-1===i)break;r=i+3}return e}(t));var v=!1;s.stripIgnoreTagBody&&(r=s.stripIgnoreTagBody,"function"!=typeof(n=l)&&(n=function(){}),i=!Array.isArray(r),o=[],a=!1,l=(v={onIgnoreTag:function(t,e,s){var u;if(u=t,i||-1!==g.indexOf(r,u)){if(s.isClosing){var c="[/removed]",l=s.position+c.length;return o.push([!1!==a?a:s.position,l]),a=!1,c}return a||(a=s.position),"[removed]"}return n(t,e,s)},remove:function(t){var e="",r=0;return g.forEach(o,function(n){e+=t.slice(r,n[0]),r=n[1]}),e+=t.slice(r)}}).onIgnoreTag);var m=b(t,function(t,e,r,n,i){var o={sourcePosition:t,position:e,isClosing:i,isWhite:Object.prototype.hasOwnProperty.call(u,r)},a=c(r,n,o);if(null!=a)return a;if(o.isWhite){if(o.isClosing)return"</".concat(r,">");var s=function(t){var e=g.spaceIndex(t);if(-1===e)return{html:"",closing:"/"===t[t.length-2]};var r="/"===(t=g.trim(t.slice(e+1,-1)))[t.length-1];return r&&(t=g.trim(t.slice(0,-1))),{html:t,closing:r}}(n),v=u[r],m=x(s.html,function(t,e){var n=-1!==g.indexOf(v,t),i=f(r,t,e,n);return null==i?n?(e=d(r,t,e,null))?"".concat(t,'="').concat(e,'"'):t:null==(i=h(r,t,e,n))?void 0:i:i});return n="<".concat(r),m&&(n+=" ".concat(m)),s.closing&&(n+=" /"),n+=">"}return null==(a=l(r,n,o))?p(n):a},p);return v&&(m=v.remove(m)),m},t}(),T=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")(),O=new(function(){function t(){var t=this;this.batchData=[],this.uniqKeys=new Set,this.timeout=2e3,this.lock=!1,this.getSlardarBid=function(){var e,r,n="douyin_web";if(!g.includes(n,"bid"))return n;if(t.config&&t.config.bid)return t.config.bid;if(T&&T._xssBid)return T._xssBid;if(T&&T.slardar&&"function"==typeof T.slardar.config){var i=(T.slardar.config()||{}).bid;if(i)return i}if(T&&T.Slardar&&"function"==typeof T.Slardar.config){var o=(T.Slardar.config()||{}).bid;if(o)return o}return(null===(r=null===(e=null==T?void 0:T.Slardar)||void 0===e?void 0:e._baseParams)||void 0===r?void 0:r.bid)||"argus"},this.getConfigRegion=function(){var e;return g.includes("cn","region")?t.config&&t.config.region?t.config.region:((null===(e=null==T?void 0:T.gfdatav1)||void 0===e?void 0:e.region)||"cn").toLowerCase():"cn"},this.gerReportUrl=function(){var e={cn:y("aHR0cHM6Ly9tb24uemlqaWVhcGkuY29tL21vbml0b3JfYnJvd3Nlci9jb2xsZWN0L2JhdGNoL3NlY3VyaXR5Lz9iaWQ9"),boe:y("aHR0cHM6Ly9tb24uemlqaWVhcGkuY29tL21vbml0b3JfYnJvd3Nlci9jb2xsZWN0L2JhdGNoL3NlY3VyaXR5Lz9iaWQ9"),ttp:y("aHR0cHM6Ly9tb24udXMudGlrdG9rdi5jb20vbW9uaXRvcl9icm93c2VyL2NvbGxlY3QvYmF0Y2gvc2VjdXJpdHkvP2JpZD0="),va:y("aHR0cHM6Ly9tb24tdmEuYnl0ZW92ZXJzZWEuY29tL21vbml0b3JfYnJvd3Nlci9jb2xsZWN0L2JhdGNoL3NlY3VyaXR5Lz9iaWQ9"),maliva:y("aHR0cHM6Ly9tb24tdmEuYnl0ZW92ZXJzZWEuY29tL21vbml0b3JfYnJvd3Nlci9jb2xsZWN0L2JhdGNoL3NlY3VyaXR5Lz9iaWQ9"),sg:y("aHR0cHM6Ly9tb24tdmEuYnl0ZW92ZXJzZWEuY29tL21vbml0b3JfYnJvd3Nlci9jb2xsZWN0L2JhdGNoL3NlY3VyaXR5Lz9iaWQ9"),boei18n:y("aHR0cHM6Ly9tb24tdmEuYnl0ZW92ZXJzZWEuY29tL21vbml0b3JfYnJvd3Nlci9jb2xsZWN0L2JhdGNoL3NlY3VyaXR5Lz9iaWQ9")}[t.getConfigRegion()];if(e)return e+t.getSlardarBid()}}return t.prototype.setConfig=function(t){this.config=t},t.prototype.upload=function(){var t=this,e=this.gerReportUrl();!this.lock&&e&&0!==this.batchData.length&&(this.lock=!0,setTimeout(function(){var r=t.batchData.slice(0,100);t.batchData=t.batchData.slice(100),T.fetch(e,{method:"post",body:JSON.stringify(r),headers:{"Content-Type":"application/json"}}).catch(function(t){}),t.lock=!1,t.upload()},this.timeout))},t.prototype.generateKey=function(t){return t.collectKey?[t.collectMode,t.collectKey].join("___"):""},t.prototype.push=function(t){this.batchData.push(t),this.upload()},t.prototype.report=function(t){var e=this.generateKey(t);if(T.fetch&&t.collectKey){var r="object"==typeof window?window.location.href:"SSR";t.documentUrl=r;var n={age:Math.floor(Date.now()),type:"xss",url:r,body:t,"user-agent":""};"enforce"===t.disposition&&"SSR"!==r||(n.url=e),"SSR"===r&&(n.url="SSR___".concat(n.url),n.body.ssr=!0),this.push(n)}},t}()),E=function(t){for(var e=0,r=function(r){Array.isArray(t[r])?0===t[r].length?delete t[r]:(t[r]=g.from(g.uniq(t[r])),e+=t[r].length):0===g.keys(t[r]).length?delete t[r]:g.keys(t[r]).forEach(function(n){t[r][n]=g.from(g.uniq(t[r][n])),e+=t[r][n].length})},n=0,i=g.keys(t);n<i.length;n++)r(i[n]);return{count:e,ret:t}};function R(t,e){return O.setConfig(e),new k(e).process(t)}function P(t){var e,r=(e=/\s|\n|\t/.exec(t))?e.index:-1;if(-1===r)return{html:"",closing:"/"===t[t.length-2]};var n="/"===(t=t.slice(r+1,-1).trim())[t.length-1];return n&&(t=t.slice(0,-1).trim()),{html:t,closing:n}}var L=function(t){return -1===(t=(t=(t=(t=t.replace(/:/gi,":")).replace(/&tab;/gi,"")).replace(/&newline;/gi,"")).replace(/(\t|\n|\r)/g,"")).indexOf("&#")?t.trim().toLowerCase():t.trim().replace(/&#(?:(x)([0-9a-f]+)|([0-9]+));?/gi,function(t,e,r,n){return String.fromCharCode(e?parseInt(r,16):parseInt(n))}).replace(/(\t|\n|\r)/g,"").toLowerCase()};function I(t,e){if(void 0===t&&(t=""),"string"!=typeof t)return!0;if(t=L(t),g.includes(t,"base64")&&!function(t){if(""===t||""===t.trim())return!0;try{return!g.includes(t,"data:text/html;base64")}catch(t){return!0}}(t))return e&&e("data:text/html;base64"),!1;var r=["expression(","behavior:","view-source:"];if(g.some(r,function(e){return -1!==t.indexOf(e)}))return g.forEach(r,function(r){-1!==t.indexOf(r)&&e&&e(r)}),!1;var n=["data:application","data:javascript","data:text/html","data:texthtml"];if(g.some(n,function(e){return -1!==t.indexOf(e)}))return g.forEach(n,function(r){-1!==t.indexOf(r)&&e&&e(r)}),!1;if(t.indexOf("javascript:")>0)return e&&e("javascript:"),!1;if(/^javascript:/i.test(t)){var i=t.slice(11).replace(/\s/g,"").trim();return!!g.some(["void","void(0)","void0","false","undefined",";"],function(t){return t===i})||(e&&e("javascript:"),!1)}return!0}var A=function(t,e){var r,n,i="<%= isSaveValidUrl =>";if("string"!=typeof t||(n=Number("<%= urlLimit =>"),void 0!==r&&(n=r),"NaN"!==t.toString()&&-1!==n&&t.length>=n)||I(t,e))return t;try{if(!0===(i=JSON.parse(i))||"true"===i){var o=new URL(t);return o.origin+o.pathname}}catch(t){}return"#"};function B(t,e,n){if(void 0===t&&(t=""),void 0===e&&(e=[]),"string"!=typeof t)return!0;if(!I(t=L(t)))return!1;var i,o={url:(i=t.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]},a=o.scheme,s=o.host;return n?!!n(t):!(!a||!s)&&(!g.includes(["http","https","file"],a)||("object"==typeof window&&window&&(e=r(r([],e,!0),[location.host],!1)),g.some(e,function(t){return!!(t instanceof RegExp&&t.test(s))||t===s})))}var C={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:[]},M={collect:null,initCollect:function(){this.collect={whiteList:{},filterProtocol:[]}},removeCollect:function(){var t=E(this.collect),e=t.count,r=t.ret;return this.collect=null,{collectKey:0===e?null:JSON.stringify(r),collectMode:"white"}},onIgnoreTagAttr:function(t,e,n){return t&&g.indexOf(["href","src"],e)>-1?M.domainWhiteList&&Array.isArray(M.domainWhiteList)&&M.domainWhiteList.length>0&&!B(n,r([],M.domainWhiteList,!0))?"":"".concat(e,'="').concat(A(n,function(t){var e;null===(e=M.collect)||void 0===e||e.filterProtocol.push(t)}),'"'):t&&(g.indexOf(["style","class","id"],e)>-1||e.indexOf("data-")>-1)?"".concat(e,'="').concat(n,'"'):(M.collect.whiteList[t]=M.collect.whiteList[t]||[],void M.collect.whiteList[t].push(e))},onIgnoreTag:function(t,e){if("style"===t)return e;b(e,function(t,e,r,n){x(P(n).html.replace("/",""),function(t){M.collect.whiteList[r]=M.collect.whiteList[r]||[],M.collect.whiteList[r].push(t)})},p)},whiteList:C,mergeWhiteList:function(t){for(var e,r={},n=0,i=g.keys(C);n<i.length;n++)r[e=i[n]]=g.from(C[e]);for(var o=0,a=g.keys(t);o<a.length;o++)r[e=a[o]]=e in C?C[e].concat(t[e]):g.from(t[e]);return r},setWhiteList:function(t){for(var e=0,r=g.keys(t);e<r.length;e++){var n=r[e];this.whiteList[n]=n in C?C[n].concat(t[n]):g.from(t[n])}}};try{var j={},N="merge";g.includes(N,"override")&&(M.whiteList=j.whiteList),g.includes(N,"merge")&&M.setWhiteList(j.whiteList)}catch(t){}var F=function(t,e){for(var r={},n=0,i=g.keys(t);n<i.length;n++){var o=i[n];Array.isArray(t[o])?r[o]=g.from(t[o]):r[o]=F({},t[o])}for(var a=0,s=g.keys(e);a<s.length;a++)(o=s[a])in t?Array.isArray(t[o])?r[o]=t[o].concat(e[o]):r[o]=F(t[o],e[o]):Array.isArray(e[o])?r[o]=g.from(e[o]):r[o]=F({},e[o]);return r},D={blackList:{a:["folder"],meta:["content"],iframe:["srcdoc"],input:["pattern"],vmlframe:["xmlns"]},blackTags:["script","xml","embed","isindex","object","base","set","handler","animate","payload","import"],blackAttrs:["charset","ns","namespace","formaction","xlink:href","xmlns:xlink","handler","repeat","repeat-start","repeat-end"],blackAttrRegExps:[/^on/],filterList:{param:["value"],video:["poster"],form:["action"]},filterAttrs:["href","src","background","style","dynsrc","lowsrc","content"]};try{var U={};U.blackAttrRegExps&&(U.blackAttrRegExps=U.blackAttrRegExps.map(function(t){return new RegExp(t.toString().slice(1,t.toString().length-1))}));var H="merge";g.includes(H,"override")&&(D=U),g.includes(H,"merge")&&(D=F(D,U))}catch(t){}var W={mode:"black",whiteList:{},blackConfig:D,collect:null,initCollect:function(){W.collect={blackList:{},blackTags:[],blackAttrs:[],blackAttrRegExps:[],filterAttrs:[],filterList:{},filterProtocol:[]}},removeCollect:function(){var t=E(W.collect),e=t.count,r=t.ret;return W.collect=null,{collectKey:0===e?null:JSON.stringify(r),collectMode:"black"}},onIgnoreTag:function(t,e){var r;if(!g.includes(D.blackTags,t))return b(e,function(t,e,r,n,i){if(-1!==r.indexOf("/"))return p(n);if(i)return"</".concat(r,">");var o=P(n),a=x(o.html,function(t,e){var n,i=0;if(D.blackList[r]&&g.includes(D.blackList[r],t)&&(W.collect.blackList[r]=W.collect.blackList[r]||[],W.collect.blackList[r].push(t),i++),D.blackAttrRegExps.length&&D.blackAttrRegExps.some(function(e){return e.test(t)})&&g.forEach(D.blackAttrRegExps,function(e){e.test(t)&&(W.collect.blackAttrRegExps.push("".concat(e.toString(),"->").concat(t)),i++)}),D.blackAttrs.length&&g.includes(D.blackAttrs,t)&&(D.blackAttrs.push(t),i++),!i){if(D.filterList&&D.filterList[r]&&g.includes(D.filterList[r],t)){var o=A(e,function(t){var e;null===(e=W.collect)||void 0===e||e.filterProtocol.push(t)});return o!==e&&(W.collect.filterList[r]=W.collect.filterList[r]||[],W.collect.filterList[r].push(t)),e?"".concat(t,"='").concat(o,"'"):t}return D.filterAttrs&&g.includes(D.filterAttrs,t)?((o=A(e,function(t){var e;null===(e=W.collect)||void 0===e||e.filterProtocol.push(t)}))!==e&&(null===(n=W.collect)||void 0===n||n.filterAttrs.push(t)),e?"".concat(t,"='").concat(o,"'"):t):e?"".concat(t,"='").concat(e,"'"):t}});return n="<".concat(r),a&&(n+=" ".concat(a)),o.closing&&(n+=" /"),n+=">"},p);null===(r=W.collect)||void 0===r||r.blackTags.push(t)}},z=function(t){var e=t.reportOnly,r=void 0===e||e,n=t.block;return r&&"all"===r?"report":("string"==typeof r&&("true"===r&&(r=!0),"false"===r&&(r=!1)),n?"enforce":r?"report":"enforce")},q=function(t){return function(r,n,i){if(!r||"string"!=typeof r)return r;var o=n;t===R&&(o=M).initCollect();var a=t(r,o);if(S(a)===S(r))return r;if(!i)return a;var s=i.logType,u=z(i),c=o.removeCollect();return O.report(e(e({type:s,disposition:u},c),{sourceText:_(r),filterText:_(a)})),"enforce"===u?a:r}},G=q(function(t,e){return void 0===e&&(e={}),e&&e.whiteList||(e.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 k(e).process(t)}),V=q(R),Y=function(t,e,r){var n=[],i=A(t,function(t){n.push(t)});if(i===t)return t;n=g.from(g.uniq(n));var o=e||r||{};if(!o)return i;var a=o.logType,s=z(r);return O.report({type:a,disposition:s,collectKey:n.join("___"),collectData:JSON.stringify(n),collectMode:"black",sourceText:_(t),filterText:_(i)}),"enforce"===s?i:t},J=T._xssProject||{},X=T.xssNamespace||{},Z="3.0.26",K={FilterXSS:k,version:Z,webpackPluginVersion:"<%= webpackPluginVersion =>",reportOnly:"<%= reportOnly =>",filterXSS:G,_filterXSS:V,filterUrl:Y,Config:M,BlackConfig:W,project:J,setProjectName:function(t){J[t]=this,T._xssProjectName=t}};X.douyin_web=K,T.xssNamespace=X,T.Math&&!T.Math.xssNamespace&&(T.Math.xssNamespace=X),J[Z]=K,T.globalThis=T,T.getFilterXss=function(){return void 0!==this._xssProjectName?this._xssProject[this._xssProjectName]:K},T.xss=K,T.isSafeUrl=B,T.isSafeDomain=B,T.isSafeProtocol=I,T._xssProject=J,T._xssProjectName&&(J[T._xssProjectName]=K);var Q=K.setProjectName.bind(K);t.BlackConfig=W,t.Config=M,t.FilterXSS=k,t._filterXSS=V,t.filterUrl=Y,t.filterXSS=G,t.isSafeDomain=B,t.isSafeProtocol=I,t.isSafeUrl=B,t.project=J,t.setProjectName=Q,t.setXssNamespace=function(t){var e=t.appId,r=t.bid,n=t.region;X[e]=K;M.bid=r,M.region=n,M.enabled=!0},t.xssNamespace=X,Object.defineProperty(t,"__esModule",{value:!0})}),(self.webpackChunkdouyin_web=self.webpackChunkdouyin_web||[]).push([["82166"],{455890:function(t,e,r){"use strict";r.d(e,{LH:function(){return c},O1:function(){return o},T3:function(){return v},UK:function(){return m},YL:function(){return h},av:function(){return u},bB:function(){return f},bJ:function(){return p},bT:function(){return n},c3:function(){return l},co:function(){return g},fp:function(){return s},iR:function(){return i},kU:function(){return a},qC:function(){return d}});var n={ONE_PLAY:"videoplayer_oneplay",ONE_OPERA:"videoplayer_oneopera",ONE_ERROR:"videoplayer_oneerror",ONE_EVENT:"videoplayer_oneevent",ONE_TEMP:"videoplayer_onetemp"},i={data:1e3,runtime:1002,parse:1004,network:1003,no_error_handler:9997,custom_error:9998,other:9999,notSupport:1005},o={1:-499991,2:-499992,3:-499993,4:-499994,5:-499995},a={STOP:0,PLAYING:1,PAUSE:2,ERROR:3,LOADING:4},s={UNKNOWN:0,PLAYABLE:1,STALLED:2,ERROR:3},u={UNSPECIFIED:0,ERROR:1,NEXT:2,ENDED:3,UNLOAD:4,DESTROY:5,PLAY_CATCH:6,PLAY_ERROR:7,PROGRESS_LEAVE:8},c={RETRY:"error_retry",ONEERROR:"oneerror",ONEEVENT:"oneevent",ONETEMP:"onetemp"},l={NO_CACHE:0,CACHED:1},f=864e5,h=36e5,d=["tag","subtag","device_type"],p=200,g=6e4,v=6e4,m={NO_FULLSCREEN:0,FULLSCREEN:1,CSS:2}},374260:function(t,e,r){"use strict";r.d(e,{Z:function(){return a}});var n=r(61072);r(346984),r(705574),r(941533),r(9498),r(503e3),r(232070),r(248385);var i=r(403826),o=r(861504),a=function(t){function e(t,r,i,a,s){var u;return(0,n.PA)(this,e),(u=(0,n.$w)(this,e,[t,r,i,a,s])).logTag="".concat(s,"_").concat(o.TJ.GOP)||"",u.lastDemuxSampleIdxRange.video=-1,u.lastDemuxSampleIdxRange.audio=-1,u.adaptTimeRange=[],u}return(0,n.XW)(e,t),(0,n.qH)(e,[{key:"updateAdaptTimeRange",value:function(t,e){!this.adaptTimeRange&&(this.adaptTimeRange=[]),this.lastTargetDur=e;var r=this.adaptTimeRange;null===t&&(t=r.length>0?r[r.length-1].timeRangeIdx[1]:0);for(var n=0;n<(null==r?void 0:r.length);n++){var o=r[n].timeRangeIdx;if(o&&t>=o[0]&&t<o[1])return this.log(i._.LOG,"has adaptTimeRange,startSrcIdx: ".concat(t,", adaptTimeRangeIdx: ").concat(n,", dur: ").concat(e),JSON.stringify(r[n])),n}var a=r.length>0?r[r.length-1].timeRangeIdx[1]:0;if(a>=this.timeRange.length)return r.length-1;for(;a<t;){var s=this.timeRange[a].startTime,u=this.timeRange[a].endTime,c={startTime:s,endTime:u,timeRangeIdx:[a,a+1],duration:u-s,downloaded:!1,isLoading:!1};this.adaptTimeRange.push(c),this.updateTimeRangeInAdaptTimeRangeIdx(c.timeRangeIdx,this.adaptTimeRange.length-1),this.log(i._.LOG,"gap adaptTimeRange,adaptTimeRangeIdx: ".concat(this.adaptTimeRange.length-1),JSON.stringify(c)),a++}for(var l=0,f=a,h=a;h<this.timeRange.length;h++)if(l<e)l+=this.timeRange[h].endTime-this.timeRange[h].startTime;else{f=h;break}h===this.timeRange.length&&(f=this.timeRange.length);var d=[a,f],p=this.timeRange[d[0]].startTime,g=d[1]===this.timeRange.length?this.timeRange[d[1]-1].endTime:this.timeRange[d[1]].startTime,v={startTime:p,endTime:g,timeRangeIdx:d,duration:g-p,downloaded:!1,isLoading:!1};return this.log(i._.LOG,"update adaptTimeRange,startIdx,",d[0],", dur,",e,JSON.stringify(v)),this.adaptTimeRange.push(v),this.updateTimeRangeInAdaptTimeRangeIdx(d,this.adaptTimeRange.length-1),this.adaptTimeRange.length-1}},{key:"getAdaptIdxBySrcIdx",value:function(t){var e,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.adaptTimeRange.length;if(!r&&t>=(null===(e=this.adaptTimeRange[n-1])||void 0===e?void 0:e.timeRangeIdx[1])){var i=this.lastTargetDur||5;this.updateAdaptTimeRange(t,i)}for(var o=0;o<this.adaptTimeRange.length;o++){var a=this.adaptTimeRange[o].timeRangeIdx;if(a&&t>=a[0]&&t<a[1])return o}return this.adaptTimeRange.length-1}},{key:"getFragmentIdx",value:function(t){if(!(null!==(e=this.videoTrak)&&void 0!==e&&e.length))return(n=null===(i=this.audioTrak)||void 0===i?void 0:i.find(function(e){return e.startTime<=t&&e.endTime>t}))?n.index:0;if(r=this.videoTrak.find(function(e){return e.startTime<=t&&e.endTime>t}),n=null===(o=this.audioTrak)||void 0===o?void 0:o.find(function(e){return e.startTime<=t&&e.endTime>t}),r&&n)return Math.min(r.index,n.index);if(r||n)return r?r.index:n.index;else{var e,r,n,i,o,a=Number.MAX_VALUE;return this.videoTrak.length>0&&(a=this.videoTrak.length-1),this.audioTrak&&this.audioTrak.length>0&&(a=Math.min(this.audioTrak.length-1,a)),a}}},{key:"resetFragmentLoadState",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.log(i._.LOG,", resetFragmentLoadState, fragIndex, ",t,",changeBitrate,",e);var r=this.adaptTimeRange.length;e&&(this.adaptTimeRange.splice(t+1,r-t-1),r=this.adaptTimeRange.length);for(var n=0;n<r;n++)if(n<t?(this.adaptTimeRange[n].downloaded=!0,this.adaptTimeRange[n].isLoading=!0):(this.adaptTimeRange[n].downloaded=!1,this.adaptTimeRange[n].isLoading=!1),e){this.adaptTimeRange[n].range=null;var o=this.adaptTimeRange[n].timeRangeIdx;if(o&&o[0]>=this.timeRange.length){this.log(i._.WARN,"fix adaptTimeRange fragIndex ".concat(t)," ,timeRangeIdx[0] >= this.timeRange.length, so end",o[0],this.timeRange.length,",endFragment,",n),this.adaptTimeRange=this.adaptTimeRange.slice(0,n);break}o&&o[1]>=this.timeRange.length&&(this.log(i._.WARN,"fix adaptTimeRange fragIndex",t," ,timeRangeIdx[1],",o[1],">>>>",this.timeRange.length,",endFragment,",n),o[1]=this.timeRange.length,this.adaptTimeRange=this.adaptTimeRange.slice(0,n+1)),this.adaptTimeRange[n].startTime=this.timeRange[o[0]].startTime,this.adaptTimeRange[n].endTime=o&&o[1]>=this.timeRange.length?this.timeRange[this.timeRange.length-1].endTime:this.timeRange[o[1]].startTime,this.adaptTimeRange[n].range=this.getFragRange(n)}}},{key:"calculateRange",value:function(t){var e,r,o,a,s=null,u=null,c=null,l=null,f=t<this.adaptTimeRange.length?this.adaptTimeRange[t].timeRangeIdx:null;if(!f){this.log(i._.WARN,"calculateRange err",t,JSON.stringify(this.adaptTimeRange));return}var h=f[0],d=f[1];this.log(i._.LOG,"getFragRange, timeRangeIdx,",JSON.stringify(f));var p=this.videoTrak;p&&(s=h<p.length?p[h]:p[p.length-1],u=d<p.length?p[d-1]:p[p.length-1]);var g=this.audioTrak;g&&(c=h<g.length?g[h]:g[g.length-1],l=d<g.length?g[d-1]:g[g.length-1]);var v=[Math.min((null===(e=s)||void 0===e?void 0:e.range[0])||1/0,(null===(r=c)||void 0===r?void 0:r.range[0])||1/0),Math.max.apply(Math,(0,n.u)([null===(o=u)||void 0===o?void 0:o.range[1],null===(a=l)||void 0===a?void 0:a.range[1]].filter(function(t){return"number"==typeof t})).concat([0]))];return this.log(i._.LOG,"calculateRange",t,v[0],"-",v[1]),v}},{key:"getTimeRangeByIdx",value:function(t){var e,r,n,i=null,o=this.videoTrak;o&&(i=t<o.length?o[t]:o[o.length-1]);var a=null,s=this.audioTrak;return s&&(a=t<s.length?s[t]:s[s.length-1]),[Math.min((null===(e=i)||void 0===e?void 0:e.range[0])||1/0,(null===(r=a)||void 0===r?void 0:r.range[0])||1/0),Math.max(i?i.range[1]-1:0,a?(null===(n=a)||void 0===n?void 0:n.range[1])-1:0)]}},{key:"getFragRange",value:function(t){if(t<this.adaptTimeRange.length&&null!==(e=this.adaptTimeRange[t])&&void 0!==e&&e.range)return this.log(i._.LOG,"getFragRange exist",t,JSON.stringify(this.adaptTimeRange[t].range)),this.adaptTimeRange[t].range;var e,r=this.calculateRange(t);if(r&&t<this.adaptTimeRange.length){this.adaptTimeRange[t].range=r;var n=this.adaptTimeRange[t].timeRangeIdx[1];if(n<this.timeRange.length){var o=this.getTimeRangeByIdx(n);(null==o?void 0:o.length)>1&&o[0]<o[1]&&r[1]>o[0]&&(this.adaptTimeRange[t].repeatRange=[o[0],r[1]])}}return r}},{key:"getSubRange",value:function(t,e,r){for(var n=this.adaptTimeRange[t].timeRangeIdx,o=n[0],a=n[0];a<n[1];a++)if(e>=this.timeRange[a].startTime&&e<this.timeRange[a].endTime){o=a;break}var s=[this.getSrcFragRange(o)[0],r[1]];return this.log(i._.LOG,">>>>>getSubRange finalRange ",JSON.stringify(s),",oldRange,",JSON.stringify(r)),s}},{key:"getSrcFragRange",value:function(t){var e,r,n,o=null,a=null;this.log(i._.LOG,"getFragRange, timeRangeIdx, srcFragment,",JSON.stringify(t));var s=this.videoTrak;s&&s.length>0&&(o=t<s.length?s[t]:s[s.length-1]);var u=this.audioTrak;u&&u.length>0&&(a=t<u.length?u[t]:u[u.length-1]);var c=[Math.min((null===(e=o)||void 0===e?void 0:e.range[0])||1/0,(null===(r=a)||void 0===r?void 0:r.range[0])||1/0),Math.max(o&&(null===(n=o)||void 0===n?void 0:n.range[1])-1||0,a&&a.range[1]-1||0)];return this.log(i._.LOG,",getSrcFragRange",t,c),c}},{key:"getSamplesRange",value:function(t,e){var r=void 0,n="video"===e?this.videoTrak:this.audioTrak,i=this.lastDemuxSampleIdxRange[e],o=this.adaptTimeRange[t].timeRangeIdx;if(n&&n.length>0){var a=o[1]-1,s=n.length,u=a<s?n[a].frames:n[s-1].frames;r=[i+1,u[u.length-1].index]}return r}}])}(r(614184).Yx)},751251:function(t,e,r){"use strict";r.d(e,{Z:function(){return s}});var n=r(61072),i=r(942155),o=r.n(i),a=r(810001),s=function(t){function e(){var t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,n.PA)(this,e),(t=(0,n.$w)(this,e)).options=r,t.worker=new a.Z,t.worker.onmessage=function(e){t.emit(e.data.method,e.data)};var i=t.options,o=i.memoryOpt,s=i.openLog,u=i.supportHevc,c=i.codecType;return t.worker.postMessage({method:"init",id:r.id||0,args:{memoryOpt:o,openLog:s,supportHevc:u,codecType:c}}),t}return(0,n.XW)(e,t),(0,n.qH)(e,[{key:"updateValue",value:function(t){var e,r;null===(e=this.worker)||void 0===e||e.postMessage({method:"updateValue",id:(null===(r=this.options)||void 0===r?void 0:r.id)||0,args:{value:t}})}},{key:"transmux",value:function(t,e,r,n,i,o,a,s,u,c,l,f,h){var d,p=e.buffer;null===(d=this.worker)||void 0===d||d.postMessage({method:"transmux",id:t,buffer:p,args:{start:r,videoIdx:n,audioIdx:i,moov:o,useEME:a,kidValue:s,context:u,videoTrak:c,audioTrak:l,lastUnMuxData:f,pos:h}},f?[p,f.buffer]:[p])}},{key:"reset",value:function(){this.worker&&this.worker.postMessage({method:"reset"})}},{key:"destroy",value:function(){this.worker&&this.worker.postMessage({method:"destroy"}),this.worker&&this.worker.terminate()}}])}(o())},648955:function(t,e,r){"use strict";function n(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}r.d(e,{$w:function(){return a},Ac:function(){return S},Kd:function(){return m},PA:function(){return s},XW:function(){return d},ZQ:function(){return b},Zj:function(){return v},_x:function(){return f},l5:function(){return _},qH:function(){return c},sf:function(){return l},u:function(){return x},x:function(){return o}});function i(t,e,r,n,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function o(t){return function(){var e=this,r=arguments;return new Promise(function(n,o){var a=t.apply(e,r);function s(t){i(a,n,o,s,u,"next",t)}function u(t){i(a,n,o,s,u,"throw",t)}s(void 0)})}}function a(t,e,r){return e=h(e),function(t,e){if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,p()?Reflect.construct(e,r||[],h(t).constructor):e.apply(t,r))}function s(t,e){if(!(t instanceof e))throw TypeError("Cannot call a class as a function")}function u(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,w(n.key),n)}}function c(t,e,r){return e&&u(t.prototype,e),r&&u(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function l(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=k(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},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 o,a=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}function f(t,e,r){return(e=w(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function h(t){return(h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function d(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&y(t,e)}function p(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(p=function(){return!!t})()}function g(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function v(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?g(Object(r),!0).forEach(function(e){f(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):g(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function m(t,e){if(null==t)return{};var r,n,i=function(t,e){if(null==t)return{};var r={};for(var n in t)if(({}).hasOwnProperty.call(t,n)){if(-1!==e.indexOf(n))continue;r[n]=t[n]}return r}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(n=0;n<o.length;n++)r=o[n],-1===e.indexOf(r)&&({}).propertyIsEnumerable.call(t,r)&&(i[r]=t[r])}return i}function _(){_=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function l(e,r,n,o){var a=Object.create((r&&r.prototype instanceof v?r:v).prototype);return i(a,"_invoke",{value:function(e,r,n){var i=h;return function(o,a){if(i===d)throw Error("Generator is already running");if(i===p){if("throw"===o)throw a;return{value:t,done:!0}}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var u=function e(r,n){var i=n.method,o=r.iterator[i];if(o===t)return n.delegate=null,"throw"===i&&r.iterator.return&&(n.method="return",n.arg=t,e(r,n),"throw"===n.method)||"return"!==i&&(n.method="throw",n.arg=TypeError("The iterator does not provide a '"+i+"' method")),g;var a=f(o,r.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,g;var s=a.arg;return s?s.done?(n[r.resultName]=s.value,n.next=r.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,g):s:(n.method="throw",n.arg=TypeError("iterator result is not an object"),n.delegate=null,g)}(s,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===h)throw i=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=d;var c=f(e,r,n);if("normal"===c.type){if(i=n.done?p:"suspendedYield",c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=p,n.method="throw",n.arg=c.arg)}}}(e,n,new R(o||[]))}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var h="suspendedStart",d="executing",p="completed",g={};function v(){}function m(){}function y(){}var b={};c(b,a,function(){return this});var x=Object.getPrototypeOf,w=x&&x(x(P([])));w&&w!==r&&n.call(w,a)&&(b=w);var S=y.prototype=v.prototype=Object.create(b);function k(t){["next","throw","return"].forEach(function(e){c(t,e,function(t){return this._invoke(e,t)})})}function T(t,e){var r;i(this,"_invoke",{value:function(i,o){function a(){return new e(function(r,a){!function r(i,o,a,s){var u=f(t[i],t,o);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==typeof l&&n.call(l,"__await")?e.resolve(l.__await).then(function(t){r("next",t,a,s)},function(t){r("throw",t,a,s)}):e.resolve(l).then(function(t){c.value=t,a(c)},function(t){return r("throw",t,a,s)})}s(u.arg)}(i,o,r,a)})}return r=r?r.then(a,a):a()}})}function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function P(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return o.next=o}}throw TypeError(typeof e+" is not iterable")}return m.prototype=y,i(S,"constructor",{value:y,configurable:!0}),i(y,"constructor",{value:m,configurable:!0}),m.displayName=c(y,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===m||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,y):(t.__proto__=y,c(t,u,"GeneratorFunction")),t.prototype=Object.create(S),t},e.awrap=function(t){return{__await:t}},k(T.prototype),c(T.prototype,s,function(){return this}),e.AsyncIterator=T,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var a=new T(l(t,r,n,i),o);return e.isGeneratorFunction(r)?a:a.next().then(function(t){return t.done?t.value:a.next()})},k(S),c(S,u,"Generator"),c(S,a,function(){return this}),c(S,"toString",function(){return"[object Generator]"}),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=P,R.prototype={constructor:R,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(E),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return s.type="throw",s.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;E(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:P(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function y(t,e){return(y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function b(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,i,o,a,s=[],u=!0,c=!1;try{if(o=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=o.call(r)).done)&&(s.push(n.value),s.length!==e);u=!0);}catch(t){c=!0,i=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(t,e)||k(t,e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function x(t){return function(t){if(Array.isArray(t))return n(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||k(t)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function w(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}function S(t){return(S="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function k(t,e){if(t){if("string"==typeof t)return n(t,e);var r=({}).toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(t,e):void 0}}},879525:function(t,e,r){"use strict";r.d(e,{N:function(){return o}});var n=r(552374);r(346984),r(705574),r(303846),r(124300),r(162093),r(117232),r(173757),r(932651),r(2885),r(248385),r(706056),r(851329),r(905442),r(446336),r(808483),r(840938),r(118438),r(325598),r(92999),r(611067),r(273723),r(724016),r(803903),r(214604),r(901250),r(755006),r(437048),r(488336),r(825666),r(177162),r(286633),r(943281),r(810658),r(82726),r(224727);var i={buffer:60,bbaControl:!1,bbaControl_2:!1,highLevel:15,lowLevel:7,bolaControl:!1,abrAgloType:0,hurryBuffer:-1,dangerBuffer:-1,safeBuffer:-1,safeThreshold:-1,safeFactor:.9,dangerFactor:.8,minSafeFactor:.7,minDangerFactor:.4,safeFactorChange:.05,dangerFactorChange:.1,rebufferDegrade:0,safeUpgrade:0,safeRebufferDegrade:0,hurryForseLowest:0,maxPlaySpeed:1,screen_factor:-1},o=(0,n.qH)(function t(e){(0,n.PA)(this,t),this._playInfo={playbackRate:1,maxCacheTimeAudio:0,maxCacheTimeVideo:0,buffer:0,downloadSpeed:0,seekState:0,currentTime:0,stallState:0,segmentBufferEnd:0},this._sortedMediaInfos={v_adaptation:[]},this.HEAP32=new Int32Array(7),this._debugMode=!1,this._currentBitrateIdx=-1,this._lastpredictTime=0,this._algoArg={buffer:60,bbaControl:!1,highLevel:15,lowLevel:7,bolaControl:!0,limitFirstUpSwitch:-1,limitFirstDownSwitch:-1,limitUpSwitchAfterUpSwitch:-1,limitUpSwitchAfterDownSwitch:-1,minUpSwitchPosition:-1,minDownSwitchPosition:-1,maxUpSwitchCount:-1,maxDownSwitchCount:-1,maxSwitchCount:-1,maxUpSwitchLevel:-1,maxDownSwitchLevel:-1,downSwitchType:-1,debugMode:0,debug_mode_3_interval:3,debug_mode_4_interval:10,libra_abr_version:0,max_debug_mode_2_change:0,abrAgloType:0,hurryBuffer:-1,dangerBuffer:-1,safeBuffer:-1,safeThreshold:-1,safeFactor:.9,dangerFactor:.8,minSafeFactor:.7,minDangerFactor:.4,safeFactorChange:.05,dangerFactorChange:.1,rebufferDegrade:0,safeUpgrade:0,safeRebufferDegrade:0,hurryForseLowest:0,maxPlaySpeed:1,screen_factor:-1},this._seekState=0,this._isSeekedPredict=!1,this._stat={buffer:0,target_birate:0,b_seek:!1,is_upper:!1,bitrate_list:"",video_quality_list:"",num_abr_call:0,download_position:-1,calc_bitrate:-1,change_level:-1,last_level:-1,target_level:-1,last_bitrate:-1,diff_download_position:-1,diff_buffer:-1,abr_time:-1,diff_abr_time:-1,hit_limitbitrate:0,dangerFactor:-1,safeFactor:-1,abrDownloadSpeed:0,hitSrRule:0,last_video_quality:-1,target_video_quality:-1,screen_factor:-1},this.numAbrCall=0,this.upSwitchCount=0,this.downSwitchCount=0,this.lastUpSwitch=-1,this.lastDownSwitch=-1,this.downloadPosition=-1,this.gopSize=-1,this._cacheBitrate=-1,this._prevDownloadPosition=-1,this._prevBuffer=-1,this._prevCurrentPosition=-1,this._abrStartTime=0,this._prevAbrStartTime=0,this._firstLevelIdx=0,this._dropFrameCount=0,this._currentDropFrameRate=0,this._maxBitrate=-1,this._isCurrentSafeBuffer=!1,this._hasSafeRebufferDegrade=!1,this._config=e,this._algoArg=Object.assign({},i,e.algoArg),this.onRuntimeInitialized(),this._dangerFactor=this._algoArg.dangerFactor,this._safeFactor=this._algoArg.safeFactor,this._maxSafeFactor=this._safeFactor,this._maxDangerFactor=this._dangerFactor},[{key:"onRuntimeInitialized",value:function(){this._config.promise.resolve()}},{key:"_setDebugModel",value:function(t){this._debugMode=t}},{key:"_logger",value:function(){if(this._debugMode){for(var t,e=arguments.length,r=Array(e),n=0;n<e;n++)r[n]=arguments[n];console&&(t=console).log.apply(t,["SAlgo"].concat(r))}}},{key:"_getPreloadBitrate",value:function(t){return null}},{key:"_updateDeviceInfo",value:function(t,e,r,n){this._videoHeight=e,this._videoWidth=t,this._devicePixelRatio=r,this._fps=n}},{key:"_updateSeekInfo",value:function(t){this._seekState=t,this._isSeekedPredict=!0}},{key:"_updateBufferInfo",value:function(t,e,r,n,i,o,a,s,u){var c=arguments.length>9&&void 0!==arguments[9]?arguments[9]:-1;this._playInfo={playbackRate:t,maxCacheTimeAudio:e,maxCacheTimeVideo:r,buffer:n,downloadSpeed:o,seekState:a,currentTime:s,stallState:u,segmentBufferEnd:i},this._maxBitrate=c}},{key:"updateDropFrame",value:function(t){this._currentDropFrameRate=t}},{key:"_updateSwitchInfo",value:function(t,e,r,n,i,o){}},{key:"_getPredictedBitrate",value:function(){var t=0,e=this._getMethodName();if(!e)return this.HEAP32[t]=-1,this._logger("abr method not found"),t;if(-1===this._currentBitrateIdx){this._logger("getPredictedBitrate _cacheBitrate",this._cacheBitrate);for(var r=this._sortedMediaInfos.v_adaptation,n=0;n<r.length;n++)if(r[n].bandwidth===this._cacheBitrate){this._currentBitrateIdx=n,this._firstLevelIdx=n;break}}-1===this._currentBitrateIdx&&(this._currentBitrateIdx=0,this._firstLevelIdx=0,this._logger("getPredictedBitrate fix idx")),0===this._abrStartTime&&(this._abrStartTime=performance.now());var i=this._algoArg,o=i.bbaControl,a=i.bbaControl_2,s=i.libra_abr_version,u=i.bolaControl;if(o||a&&1>=s||u){var c=this[e]().predictedBitrate;this.HEAP32[t]=c}else this.HEAP32[t]=0;return t++,this.HEAP32[t]=0,t++,this.HEAP32[t]=0,0}},{key:"_getMethodName",value:function(){var t="";return(this._algoArg.bbaControl||this._algoArg.bbaControl_2)&&(t="_getBitrateBBA"),this._algoArg.bolaControl&&(t="_getBitrateBOLA"),t}},{key:"_getBitrateBOLA",value:function(){return{predictedBitrate:0,predictSpeed:0}}},{key:"_doBufferControl",value:function(t,e){var r=this._algoArg,n=r.highLevel,i=r.lowLevel,o=-1;if(t>=n)this._currentBitrateIdx=e.length-1,o=e[this._currentBitrateIdx].bandwidth;else if(t<=i)this._currentBitrateIdx=0,o=e[this._currentBitrateIdx].bandwidth;else{var a=e[e.length-1].bandwidth-e[0].bandwidth,s=a/(n-i)*(t-i)+e[0].bandwidth;o=s;for(var u=e.length-1;u>-1;u--)if(s>=e[u].bandwidth){this._currentBitrateIdx=u;break}s>=e[e.length-1].bandwidth?this._currentBitrateIdx=e.length-1:s<=e[0].bandwidth&&(this._currentBitrateIdx=0),this._logger("bola mid",this._currentBitrateIdx,s,"chose",e[this._currentBitrateIdx].bandwidth)}return{calc_bitrate:o}}},{key:"_getCalcPlayrate",value:function(){return Math.min(Math.max(this._playInfo.playbackRate,1),this._algoArg.maxPlaySpeed)}},{key:"_filterIndexByBitrate",value:function(t,e){var r=!(arguments.length>2)||void 0===arguments[2]||arguments[2];t/=r?this._getCalcPlayrate():1;var n=!1,i=0;if(t>e[e.length-1].bandwidth)i=e.length-1;else{for(var o=0;o<e.length;o++)if(e[o].bandwidth>=t){n=!0,(i=o)>0&&r&&(i-=1);break}!n&&(i=0)}return this._logger("filterIndexByBitrate",i,"hasFound",n),i}},{key:"_doSpeedBufferControl",value:function(t,e){var r=-1,n=this._playInfo.downloadSpeed,i=this._algoArg,o=i.hurryBuffer,a=i.dangerBuffer,s=i.safeBuffer,u=i.safeThreshold,c=i.hurryForseLowest,l=i.safeUpgrade,f=i.dangerFactorChange,h=i.safeFactorChange,d=this._currentBitrateIdx;if(this._isCurrentSafeBuffer=!1,0===n)r=-1,this._currentBitrateIdx=Math.min(d,this._firstLevelIdx),this._logger("SpeedBuffer 网速为0, firstLevel",this._firstLevelIdx,"prev",d);else{var p=n*this._dangerFactor*8e3,g=n*this._safeFactor*8e3;if(t<o){if(r=p,0!==c)this._currentBitrateIdx=0;else{var v=this._filterIndexByBitrate(r,e);this._currentBitrateIdx=Math.max(0,Math.min(v-1,d))}}else if(o<=t&&t<a){r=p;var m=this._filterIndexByBitrate(r,e);this._currentBitrateIdx=Math.min(m,d)}else a<=t&&t<s?(r=g,this._currentBitrateIdx=this._filterIndexByBitrate(r,e)):s<=t&&(this._isCurrentSafeBuffer=!0,r=this._hasSafeRebufferDegrade?g:g*(1+(t-u)/this.gopSize),this._currentBitrateIdx=this._filterIndexByBitrate(r,e),l&&(this._dangerFactor+=f,this._safeFactor+=h),this._dangerFactor>this._maxDangerFactor&&(this._dangerFactor=this._maxDangerFactor),this._safeFactor>this._maxSafeFactor&&(this._safeFactor=this._maxSafeFactor))}return{calc_bitrate:r}}},{key:"_doSizeLimitControl",value:function(t){var e=this._algoArg.screen_factor;if(e>0&&this._videoHeight>0&&this._videoWidth>0){var r=this._currentBitrateIdx,n=t[r],i=this._videoWidth*e,o=this._videoHeight*e;if(n.width>i&&n.height>o){var a=t.concat();a.sort(function(t,e){return t.width<e.width?-1:1});for(var s=-1,u=0;u<a.length;u++)if(a[u].width>i&&a[u].height>o){s=u,this._logger("SizeLimitControl _currentBitrateIdx",u,"prev",r);break}if(s>-1){for(var c=a.filter(function(t){return t.width===a[s].width&&t.height===a[s].height}),l=-1,f=0;f<c.length;f++)c[f].bandwidth>l&&(l=c[f].bandwidth);l>-1&&(this._currentBitrateIdx=this._filterIndexByBitrate(l,t,!1),this._logger("SizeLimitControl maxBitrate",this._currentBitrateIdx,"prev",r))}}}}},{key:"_doLimitControl",value:function(t,e,r,n){var i=this._algoArg,o=i.limitFirstUpSwitch,a=i.limitFirstDownSwitch,s=i.minUpSwitchPosition,u=i.minDownSwitchPosition,c=i.maxUpSwitchLevel,l=i.maxDownSwitchLevel,f=i.maxUpSwitchCount,h=i.maxDownSwitchCount,d=i.maxSwitchCount,p=i.limitUpSwitchAfterUpSwitch,g=i.limitUpSwitchAfterDownSwitch,v=i.downSwitchType,m=i.debugMode,_=this._currentBitrateIdx>t,y=this._currentBitrateIdx<t;if(o>0&&this.numAbrCall<o&&_&&(this._currentBitrateIdx=t,this._logger("限制前".concat(o,"次上切, callTimes"),this.numAbrCall)),a>0&&this.numAbrCall<a&&y&&(this._currentBitrateIdx=t,this._logger("限制前".concat(a,"次下切, callTimes"),this.numAbrCall)),_&&s>=0&&this.downloadPosition>0&&this.downloadPosition<s&&(this._currentBitrateIdx=t,this._logger("限制minUp切换位置, minUpSwitchPosition",s,"downloadPos",this.downloadPosition)),y&&u>=0&&this.downloadPosition>0&&this.downloadPosition<u&&(this._currentBitrateIdx=t,this._logger("限制minDown切换位置, minDownSwitchPosition",u,"downloadPos",this.downloadPosition)),c>=0&&this._currentBitrateIdx-t>c&&(this._currentBitrateIdx=t+c,this._logger("限制上切幅度, maxUpSwitchLevel",c)),l>=0&&t-this._currentBitrateIdx>l&&(this._currentBitrateIdx=t-l,this._logger("限制下切幅度, maxDownSwitchLevel",l)),f>=0&&this.upSwitchCount>=f&&_&&(this._currentBitrateIdx=t,this._logger("限制上切切换次数, maxUpSwitchCount",f)),h>=0&&this.downSwitchCount>=h&&y&&(this._currentBitrateIdx=t,this._logger("限制下切切换次数, maxDownSwitchCount",h)),d>=0&&this.upSwitchCount+this.downSwitchCount>=d&&(this._currentBitrateIdx=t,this._logger("限制总切换次数, maxSwitchCount",d)),_&&(p>=0&&this.lastDownSwitch>=0&&this.numAbrCall-this.lastDownSwitch<=p&&(this._currentBitrateIdx=t,this._logger("限制上切后上切")),g>=0&&this.lastDownSwitch>=0&&this.numAbrCall-this.lastDownSwitch<=g&&(this._currentBitrateIdx=t,this._logger("下切后上切"))),this._currentBitrateIdx==t-1){var b=r[t].bandwidth;1==v?b=(r[t].bandwidth+r[t-1].bandwidth)/2:2==v&&(b=r[t-1].bandwidth),this._logger("下切灵敏度调节, downSwitchThreshold",b,"downSwitchType",v,"calc_bitrate",e),e>b&&(this._currentBitrateIdx=t)}var x=!1;if(this._maxBitrate>0&&r[this._currentBitrateIdx].bandwidth>=this._maxBitrate&&(this._currentBitrateIdx=n.length-1,x=!0),m>0&&!x&&(1==m||2==m||3==m||4==m)&&n.length>=2){var w=this._algoArg,S=w.max_debug_mode_2_change,k=w.debug_mode_3_interval,T=w.debug_mode_4_interval;if(this._firstLevelIdx>0){if((1==m||2==m||3==m)&&((1==m||2==m)&&(this._currentBitrateIdx=this._firstLevelIdx-(this.numAbrCall+1)%2),3==m&&1==(this.numAbrCall+1)%k&&(this._currentBitrateIdx=this._currentBitrateIdx===this._firstLevelIdx?this._firstLevelIdx-1:this._firstLevelIdx)),4==m){var O=(this.numAbrCall+T)%T;(0===O||1===O)&&(this._currentBitrateIdx=this._firstLevelIdx-(1-O))}}else this._currentBitrateIdx=0;this.numAbrCall>=S&&2==m&&(this._currentBitrateIdx=t)}return{hitLimitBitrate:x}}},{key:"_doReport",value:function(t,e,r,n,i,o,a,s,u){var c=-1===this._prevBuffer?-1:t-this._prevBuffer;this._prevBuffer=t,this._playInfo.segmentBufferEnd>0?this.downloadPosition=this._playInfo.segmentBufferEnd:this.downloadPosition=this.gopSize>0?this.gopSize:-1;var l=this.downloadPosition-this._prevDownloadPosition;-1===this._prevDownloadPosition&&(l=-1e4),this._prevDownloadPosition=this.downloadPosition,this._stat={buffer:t,target_birate:n,b_seek:this._isSeekedPredict,is_upper:i<this._currentBitrateIdx,bitrate_list:JSON.stringify(r.map(function(t){return t.bandwidth})),video_quality_list:JSON.stringify(r.map(function(t){return t.definition})),num_abr_call:this.numAbrCall,calc_bitrate:o,change_level:Math.abs(this._currentBitrateIdx-i),last_level:i,target_level:this._currentBitrateIdx,last_bitrate:e[i].bandwidth,download_position:this.downloadPosition,diff_download_position:l,diff_buffer:c,abr_time:0===this._prevAbrStartTime?0:(s-this._abrStartTime)/1e3,diff_abr_time:0===this._prevAbrStartTime?0:(s-this._prevAbrStartTime)/1e3,hit_limitbitrate:a?1:0,dangerFactor:this._dangerFactor,safeFactor:this._safeFactor,abrDownloadSpeed:8e3*this._playInfo.downloadSpeed,hitSrRule:u,last_video_quality:r[i].definition,target_video_quality:r[this._currentBitrateIdx].definition,screen_factor:this._algoArg.screen_factor},this._prevAbrStartTime=s,this._isSeekedPredict=!1,i<this._currentBitrateIdx&&(this.lastUpSwitch=this.numAbrCall,this.upSwitchCount++),i>this._currentBitrateIdx&&(this.lastDownSwitch=this.numAbrCall,this.downSwitchCount++),this.numAbrCall++}},{key:"_getBitrateBBA",value:function(){var t=this,e=0,r=0,n=this._algoArg,i=n.abrAgloType,o=n.getTargetSrName,a=n.isOpenSr,s=performance.now(),u=this._playInfo.buffer,c=this._sortedMediaInfos.v_adaptation,l=this._sortedMediaInfos.v_adaptation.filter(function(e){return!(t._maxBitrate>0)||e.bandwidth<=t._maxBitrate});this._logger("mediaBuffer",u);var f=this._currentBitrateIdx,h=-1;1===i&&(h=this._doSpeedBufferControl(u,l).calc_bitrate),0===i&&(h=this._doBufferControl(u,l).calc_bitrate);var d=this._doLimitControl(f,h,c,l).hitLimitBitrate;this._doSizeLimitControl(l);var p=0;if(a&&o&&"function"==typeof o){var g=o(l[this._currentBitrateIdx].gearName),v=l[this._currentBitrateIdx].bandwidth;if(g)for(var m=l.length-1;m>-1;m--){var _=l[m];if(_.gearName.includes(g)&&_.bandwidth<v){this._currentBitrateIdx=m,p=2,this._logger("hitSrRule 2");break}}}return e=l[this._currentBitrateIdx].bandwidth,r=0,this._doReport(u,c,l,e,f,h,d,s,p),{predictedBitrate:e,predictSpeed:r}}},{key:"_free",value:function(){}},{key:"ccall",value:function(t,e,r,n){this["_"+t](n)}},{key:"_parseMPD",value:function(){var t=JSON.parse(arguments.length<=0?void 0:arguments[0]);this._sortedMediaInfos=t,this._sortedMediaInfos.v_adaptation.sort(function(t,e){return t.bandwidth-e.bandwidth}),this._logger("MPD",this._sortedMediaInfos)}},{key:"updateSegmentDuration",value:function(t){this.gopSize=t}},{key:"updateBitrate",value:function(t){this._cacheBitrate=t}},{key:"getStat",value:function(){return this._stat}},{key:"updateWaitingState",value:function(t){if(t){var e=this._algoArg,r=e.minDangerFactor,n=e.dangerFactorChange,i=e.safeRebufferDegrade,o=e.safeFactorChange,a=e.minSafeFactor;e.rebufferDegrade&&(this._dangerFactor-=n,this._dangerFactor<=r&&(this._dangerFactor=r),this._safeFactor-=o,this._safeFactor<=a&&(this._safeFactor=a)),this._isCurrentSafeBuffer&&0!==i&&(this._hasSafeRebufferDegrade=!0)}}},{key:"setMatchSuperResolution",value:function(t){"function"==typeof t&&(this._algoArg.matchSuperResolution=t)}},{key:"setGetTargetSrName",value:function(t){"function"==typeof t&&(this._algoArg.getTargetSrName=t)}}])},261825:function(t,e,r){"use strict";r.d(e,{$w:function(){return n},Ac:function(){return g},PA:function(){return i},XW:function(){return c},Zj:function(){return h},_x:function(){return s},qH:function(){return a}});function n(t,e,r){return e=u(e),function(t,e){if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,l()?Reflect.construct(e,r||[],u(t).constructor):e.apply(t,r))}function i(t,e){if(!(t instanceof e))throw TypeError("Cannot call a class as a function")}function o(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,p(n.key),n)}}function a(t,e,r){return e&&o(t.prototype,e),r&&o(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function s(t,e,r){return(e=p(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function u(t){return(u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function c(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&d(t,e)}function l(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(l=function(){return!!t})()}function f(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function h(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?f(Object(r),!0).forEach(function(e){s(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):f(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function d(t,e){return(d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function p(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}function g(t){return(g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}},374510:function(t,e,r){"use strict";function n(t,e,r){if(!t)return!1;var n=o(t.buffered,t.currentTime),i=e.startPreloadControl,a=e.startPreloadMinBuffer,s=e.startPreloadMinPosTime,u=e.minBufferLength;if(i){var c=Math.max(n[1]-t.currentTime,0);if("number"==typeof a&&c>a){if("number"==typeof s&&t.currentTime>s||t.currentTime>t.duration/2)return null==r||r("log","[checkIfStartPreload] hit buffer",c,"startPreloadMinBuffer",a),!0}else if(t.currentTime+a+1>t.duration&&t.currentTime+c>t.duration-1)return null==r||r("log","[checkIfStartPreload] hit end"),!0}else{var l="number"==typeof u&&t.duration>u+5?u:t.duration/2,f=Math.min(t.currentTime+u,t.duration),h=n[1]-f;if(t.currentTime>l&&h>-1)return null==r||r("log","[checkIfStartPreload] hit minPos",l,"minCacheTime",f),!0}return!1}function i(t,e,r){var n=e.endPreloadControl,i=e.endPreloadMinBuffer,a=e.startPreloadMinBuffer;if(!t)return!1;if(n){if("number"==typeof a&&t.currentTime+a>=t.duration)return!1;var s=Math.max(o(t.buffered,t.currentTime)[1]-t.currentTime,0);if(s<=i)return null==r||r("log","[checkIfCancelPreload] hit buffer:",s,"endPreloadMinBuffer:",i,"video:","".concat(t.currentTime,"/").concat(t.duration)),!0}return!1}function o(t,e){var r=[0,0];if(t)for(var n=0,i=t.length;n<i&&(r[0]=t.start(n),r[1]=t.end(n),!(r[0]<=e)||!(e<=r[1]));n++);return r[0]-e<=0&&e-r[1]<=0?r:[0,0]}function a(t,e,r){for(var n=0;n<t.length;n++)if(r===t[n][e])return n;return -1}r.d(e,{PK:function(){return a},fQ:function(){return i},lh:function(){return o},xF:function(){return n}}),r(346984)},84303:function(t,e,r){"use strict";r.d(e,{Fc:function(){return d},wb:function(){return f}}),r(248385),r(149336);var n,i=r(315355),o=r(919209),a=r(625813),s=r(278997),u=r(508881),c=r(464948),l=r(272787),f={MANIFEST:"manifest",NETWORK:"network",NETWORK_TIMEOUT:"network_timeout",DEMUX:"demux",REMUX:"remux",MEDIA:"media",DRM:"drm",OTHER:"other",SUB_TYPES:{FLV:"FLV",HLS:"HLS",MP4:"MP4",FMP4:"FMP4",MSE_ADD_SB:"MSE_ADD_SB",MSE_APPEND_BUFFER:"MSE_APPEND_BUFFER",MSE_OTHER:"MSE_OTHER",OPTION:"OPTION"}},h=(n={},(0,l.Z)(n,f.MANIFEST,{HLS:1100}),(0,l.Z)(n,f.NETWORK,2100),(0,l.Z)(n,f.NETWORK_TIMEOUT,2101),(0,l.Z)(n,f.DEMUX,{FLV:3100,HLS:3200,MP4:3300,FMP4:3400}),(0,l.Z)(n,f.REMUX,{FMP4:4100,MP4:4200}),(0,l.Z)(n,f.MEDIA,{MSE_ADD_SB:5200,MSE_APPEND_BUFFER:5201,MSE_OTHER:5202}),(0,l.Z)(n,f.OTHER,8e3),n),d=function(t){(0,a.Z)(c,t);var e,r,n=(e=c,r=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}(),function(){var t,n=(0,u.Z)(e);return t=r?Reflect.construct(n,arguments,(0,u.Z)(this).constructor):n.apply(this,arguments),(0,s.Z)(this,t)});function c(t,e,r,o,a){var s;return(0,i.Z)(this,c),(s=n.call(this,a||(null==r?void 0:r.message))).errorType=t===f.NETWORK_TIMEOUT?f.NETWORK:t,s.originError=r,s.ext=o,s.errorCode=h[t][e]||h[t],s.errorMessage=s.message,!s.errorCode&&(s.errorType=f.OTHER,s.errorCode=h[s.errorType]),s}return(0,o.Z)(c,null,[{key:"create",value:function(t,e,r,n,i){return t instanceof c?t:(t instanceof Error&&(r=t,t=""),!t&&(t=f.OTHER),new c(t,e,r,n,i))}},{key:"network",value:function(t){var e;return new c(null!=t&&t.isTimeout?f.NETWORK_TIMEOUT:f.NETWORK,t,null,{url:null==t?void 0:t.url,response:null==t?void 0:t.response,httpCode:null==t?void 0:null===(e=t.response)||void 0===e?void 0:e.status})}}]),c}((0,c.Z)(Error))},801700:function(t,e,r){"use strict";r.d(e,{C:function(){return o}});var n=r(182432),i=r(275764),o=function(t){(0,n.XW)(r,t);var e=(0,n.WY)(r);function r(t,o,a,s){var u;return(0,n.PA)(this,r),u=e.call(this,s),(0,n._x)((0,n.Lc)(u),"retryCount",0),(0,n._x)((0,n.Lc)(u),"isTimeout",!1),(0,n._x)((0,n.Lc)(u),"loaderType",i.t.FETCH),(0,n._x)((0,n.Lc)(u),"startTime",0),(0,n._x)((0,n.Lc)(u),"endTime",0),(0,n._x)((0,n.Lc)(u),"options",{}),u.url=t,u.request=o,u.response=a,u}return(0,n.qH)(r)}((0,n.wm)(Error))},234086:function(t,e,r){"use strict";function n(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new Promise(function(e){return setTimeout(e,t)})}r.d(e,{_v:function(){return n}})},938310:function(t,e,r){"use strict";r.d(e,{d1:function(){return h}});var n=r(570783),i=r(364812),o=r(929415),a=r(674495),s=r(403826),u=r(264583);function c(){var t=!(arguments.length>0)||void 0===arguments[0]||arguments[0];try{if(!o.j)return null;if(t&&"undefined"!=typeof ManagedMediaSource)return ManagedMediaSource;return window.MediaSource}catch(t){}}function l(t){return/ManagedMediaSource/gi.test(Object.prototype.toString.call(t))}var f={APPEND:"appendBuffer",REMOVE:"removeBuffer",UPDATE_DURATION:"updateDuration"},h=function(){var t,e,r;function o(t,e){var r=this;(0,n.PA)(this,o),(0,n._x)(this,"media",null),(0,n._x)(this,"mediaSource",null),(0,n._x)(this,"_openPromise",(0,u.Qo)()),(0,n._x)(this,"_queue",Object.create(null)),(0,n._x)(this,"_sourceBuffer",Object.create(null)),(0,n._x)(this,"_mseFullFlag",{}),(0,n._x)(this,"_st",0),(0,n._x)(this,"_opst",0),(0,n._x)(this,"_logger",null),(0,n._x)(this,"_config",null),(0,n._x)(this,"_url",null),(0,n._x)(this,"_onStartStreaming",function(){r._logger.debug("startstreaming")}),(0,n._x)(this,"_onEndStreaming",function(){r._logger.debug("endstreaming")}),(0,n._x)(this,"_onSBUpdateEnd",function(t){var e=r._queue[t];if(e){var n=e[0];if((null==n?void 0:n.opName)!==f.UPDATE_DURATION&&e.shift(),n){var i,o,a=(0,u.je)()-r._opst;r._logger.debug("UpdateEnd(".concat(t,"/").concat(n.opName,")"),u.Kp.stringify(function(t){var e=[];if(t instanceof TimeRanges)for(var r=0;r<t.length;r++)e.push({start:t.start(r),end:t.end(r)});return e}(null===(i=r._sourceBuffer[t])||void 0===i?void 0:i.buffered)),a,n.context),n.promise.resolve({name:n.opName,context:n.context,costtime:a});var s=null===(o=n.context)||void 0===o?void 0:o.callback;s&&"function"==typeof s&&s(n.context),r._startQueue(t)}}}),(0,n._x)(this,"_onSBUpdateError",function(t,e){var n=r._queue[t];if(n){var i=n[0];i&&(r._logger.error("UpdateError",t,i.opName,i.context),i.promise.reject(new a.Fc(a.wb.MEDIA,a.wb.SUB_TYPES.MSE_APPEND_BUFFER,e)))}}),this._config=Object.assign(o.getDefaultConfig(),e),t&&this.bindMedia(t),this._logger=new s.Y("MSE"),this._config.openLog&&s.Y.enable()}return(0,n.qH)(o,[{key:"isOpened",get:function(){var t;return(null===(t=this.mediaSource)||void 0===t?void 0:t.readyState)==="open"}},{key:"hasOpTasks",get:function(){var t=this,e=!1;return Object.keys(this._queue).forEach(function(r){var n=t._queue[r];Array.isArray(n)&&(e||(e=n.length>0))}),e}},{key:"url",get:function(){return this._url}},{key:"duration",get:function(){var t;return(null===(t=this.mediaSource)||void 0===t?void 0:t.duration)||-1}},{key:"isEnded",get:function(){return!!this.mediaSource&&"ended"===this.mediaSource.readyState}},{key:"streaming",get:function(){return!l(this.mediaSource)||this.mediaSource.streaming}},{key:"isFull",value:function(t){return t?this._mseFullFlag[t]:this._mseFullFlag[o.VIDEO]}},{key:"updateDuration",value:function(t){var e=this,r=this.mediaSource&&this.mediaSource.duration>t;if(this.mediaSource&&this.mediaSource.duration>t){var n=0;if(Object.keys(this._sourceBuffer).forEach(function(t){try{n=Math.max(e.bufferEnd(t)||0,n)}catch(t){}}),t<n)return Promise.resolve()}return this._enqueueBlockingOp(function(){if(e.isEnded){e._logger.debug("setDuration but ended");return}e.mediaSource&&(e.mediaSource.duration=t,e._logger.debug("setDuration",t))},f.UPDATE_DURATION,{isReduceDuration:r})}},{key:"open",value:function(){var t=this;if(this._openPromise.used&&!this.isOpened&&this.mediaSource){var e=this.mediaSource;e.addEventListener("sourceopen",function r(){var n=(0,u.je)()-t._st;t._logger.debug("sourceopen",n),e.removeEventListener("sourceopen",r),t._openPromise.resolve({costtime:n})}),this._openPromise=(0,u.Qo)()}return this._openPromise}},{key:"bindMedia",value:(t=(0,n.x)((0,n.l5)().mark(function t(e){var r,i,o,a,s=this;return(0,n.l5)().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!(this.mediaSource||this.media)){t.next=3;break}return t.next=3,this.unbindMedia();case 3:if(r=c(this._config.preferMMS),!(!e||!r)){t.next=6;break}throw Error("Param media or MediaSource does not exist");case 6:return this.media=e,o=l(i=this.mediaSource=new r),this._st=(0,u.je)(),a=function t(){var r=(0,u.je)()-s._st;s._logger.debug("sourceopen"),i.removeEventListener("sourceopen",t),URL.revokeObjectURL(e.src),s._openPromise.resolve({costtime:r}),e.dispatchEvent(new CustomEvent("mseAttached"))},i.addEventListener("sourceopen",a),o&&(i.addEventListener("startstreaming",this._onStartStreaming),i.addEventListener("endstreaming",this._onEndStreaming)),this._url=URL.createObjectURL(i),e.src=this._url,e.disableRemotePlayback=o,e.dispatchEvent(new CustomEvent("mseAttaching")),t.abrupt("return",this._openPromise);case 18:case"end":return t.stop()}},t,this)})),function(e){return t.apply(this,arguments)})},{key:"unbindMedia",value:(e=(0,n.x)((0,n.l5)().mark(function t(){var e,r,i,o=this;return(0,n.l5)().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!this._openPromise.used&&this._openPromise.resolve(),e=this.mediaSource){if(Object.keys(this._queue).forEach(function(t){var e=o._queue[t];e&&e.forEach(function(t){var e,r;return null===(e=t.promise)||void 0===e?void 0:null===(r=e.resolve)||void 0===r?void 0:r.call(e)})}),r=!!this.media&&this.media.readyState>=1,i="open"===e.readyState,r&&i)try{e.endOfStream()}catch(t){}Object.keys(this._sourceBuffer).forEach(function(t){try{e.removeSourceBuffer(o._sourceBuffer[t])}catch(t){}}),l(e)&&(e.removeEventListener("startstreaming",this._onStartStreaming),e.removeEventListener("endstreaming",this._onEndStreaming))}if(this.media){this.media.disableRemotePlayback=!1,this.media.removeAttribute("src");try{this.media.load()}catch(t){}this.media=null}this.mediaSource=null,this._openPromise=(0,u.Qo)(),this._queue=Object.create(null),this._sourceBuffer=Object.create(null);case 8:case"end":return t.stop()}},t,this)})),function(){return e.apply(this,arguments)})},{key:"createSource",value:function(t,e){var r;if(!this._sourceBuffer[t]&&this.mediaSource){try{r=this._sourceBuffer[t]=this.mediaSource.addSourceBuffer(e)}catch(t){throw new a.Fc(a.wb.MEDIA,a.wb.SUB_TYPES.MSE_ADD_SB,t)}r.mimeType=e,r.addEventListener("updateend",this._onSBUpdateEnd.bind(this,t)),r.addEventListener("error",this._onSBUpdateError.bind(this,t))}}},{key:"changeType",value:function(t,e){var r=this,n=this._sourceBuffer[t];return this.mediaSource&&n&&n.mimeType!==e?"function"!=typeof n.changeType?Promise.reject(new a.Fc(a.wb.MEDIA,a.wb.SUB_TYPES.MSE_CHANGE_TYPE,Error("changeType is not a function"))):this._enqueueOp(t,function(){try{n.changeType(e)}catch(t){throw new a.Fc(a.wb.MEDIA,a.wb.SUB_TYPES.MSE_CHANGE_TYPE,t)}n.mimeType=e,r._onSBUpdateEnd(t)},"changeType",{mimeType:e}):Promise.resolve()}},{key:"createOrChangeSource",value:function(t,e){return this.createSource(t,e),this.changeType(t,e)}},{key:"append",value:function(t,e,r){var n=this;return e&&e.byteLength&&this._sourceBuffer[t]?this._enqueueOp(t,function(){var i;n.mediaSource&&!n.media.error&&(n._logger.debug("MSE APPEND START",r),n._opst=(0,u.je)(),null===(i=n._sourceBuffer[t])||void 0===i||i.appendBuffer(e))},f.APPEND,r):Promise.resolve()}},{key:"remove",value:function(t,e,r,n){var i=this,o=!1;return this._mseFullFlag[t]&&(o=!0),this._enqueueOp(t,function(){if(i.mediaSource&&!i.media.error){var o=i._sourceBuffer[t];if(e>=r||!o){i._onSBUpdateEnd(t);return}i._opst=(0,u.je)(),i._logger.debug("MSE REMOVE START",t,e,r,n),o.remove(e,r)}},f.REMOVE,n,o)}},{key:"clearBuffer",value:function(t,e){var r,n=this;return Object.keys(this._sourceBuffer).forEach(function(i){r=n.remove(i,t,e)}),r||Promise.resolve()}},{key:"clearAllBuffer",value:function(){var t,e=this;return Object.keys(this._sourceBuffer).forEach(function(r){var n=e._sourceBuffer[r];t=e.remove(r,0,i.l.end(i.l.get(n)))}),t}},{key:"clearOpQueues",value:function(t){var e=!(arguments.length>1)||void 0===arguments[1]||arguments[1],r=this._queue[t],n=this._sourceBuffer[t];this._logger.debug("MSE clearOpQueue",t,e,"sb updating: ",null==n?void 0:n.updating);var i=!1;if(null!=n&&n.updating&&(i=!0),e&&r){var o=i?Math.max(r.length-1,0):r.length;o>0&&r.splice(0,o);return}}},{key:"endOfStream",value:function(t){var e=this;return this.mediaSource&&"open"===this.mediaSource.readyState?this._enqueueBlockingOp(function(){var r=e.mediaSource;r&&"open"===r.readyState&&(e._logger.debug("MSE endOfStream START"),t?r.endOfStream(t):r.endOfStream())},"endOfStream"):Promise.resolve()}},{key:"setLiveSeekableRange",value:function(t,e){var r=this.mediaSource;!(t<0)&&!(e<t)&&null!=r&&r.setLiveSeekableRange&&"open"===r.readyState&&r.setLiveSeekableRange(t,e)}},{key:"getSourceBuffer",value:function(t){return this._sourceBuffer[t]}},{key:"buffered",value:function(t){return i.l.get(this._sourceBuffer[t])}},{key:"bufferStart",value:function(t){return i.l.start(this.buffered(t))}},{key:"bufferEnd",value:function(t){return i.l.end(this.buffered(t))}},{key:"_enqueueOp",value:function(t,e,r,n,i){var o=this;if(!this.mediaSource)return Promise.resolve();var a=this._queue[t]=this._queue[t]||[],s={exec:e,promise:(0,u.Qo)(),opName:r,context:n};return i?(a.splice(0,0,s),this._mseFullFlag[t]=!1,this._startQueue(t)):a.push(s),this.isOpened||this.isEnded?1===a.length&&this._startQueue(t):this._openPromise.then(function(){1===a.length&&o._startQueue(t)}),s.promise}},{key:"_enqueueBlockingOp",value:(r=(0,n.x)((0,n.l5)().mark(function t(e,r,i){var o,a,s=this;return(0,n.l5)().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(this.mediaSource){t.next=2;break}return t.abrupt("return",Promise.resolve());case 2:if((o=Object.keys(this._sourceBuffer)).length){t.next=5;break}return t.abrupt("return",e());case 5:return a=[],o.forEach(function(t){var e=s._queue[t],n=(0,u.Qo)();a.push(n),e.push({exec:function(){n.resolve()},promise:n,opName:r,context:i}),1===e.length&&s._startQueue(t)}),t.abrupt("return",Promise.all(a).then(function(){try{return e()}finally{o.forEach(function(t){var e=s._queue[t],r=s._sourceBuffer[t];null==e||e.shift(),(!r||!r.updating)&&s._startQueue(t)})}}));case 8:case"end":return t.stop()}},t,this)})),function(t,e,n){return r.apply(this,arguments)})},{key:"_startQueue",value:function(t){var e=this._queue[t];if(e){var r,i,o=e[0];if(o&&!this._mseFullFlag[t])try{o.exec()}catch(s){s&&s.message&&s.message.indexOf("SourceBuffer is full")>=0?(this._mseFullFlag[t]=!0,o.context&&"object"===(0,n.Ac)(o.context)&&(o.context.isFull=!0),this._logger.error("[MSE error], context,",o.context," ,name,",o.opName,",err,SourceBuffer is full"),null==o||null===(r=o.promise)||void 0===r||r.reject(new a.Fc(a.wb.MEDIA,a.wb.SUB_TYPES.MSE_FULL,s))):(this._logger.error(s),null==o||null===(i=o.promise)||void 0===i||i.reject(s.constructor===a.Fc?s:new a.Fc(a.wb.MEDIA,a.wb.SUB_TYPES.MSE_OTHER,s)),e.shift(),this._startQueue(t))}}}},{key:"setTimeoffset",value:function(t,e,r){var n=this;return this._enqueueOp(t,function(){e<0&&(e+=.001),n._sourceBuffer[t].timestampOffset=e,n._onSBUpdateEnd(t)},"setTimeoffset",r)}},{key:"abort",value:function(t,e){var r=this;return this.isOpened?this._enqueueOp(t,function(){var n;r._logger.debug("MSE abort",t,e),null===(n=r._sourceBuffer[t])||void 0===n||n.abort(),r._onSBUpdateEnd(t)},"abort",e):Promise.resolve()}}],[{key:"isSupported",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:'video/mp4; codecs="avc1.42E01E,mp4a.40.2"',e=!(arguments.length>1)||void 0===arguments[1]||arguments[1],r=c(e);if(!r)return!1;try{return r.isTypeSupported(t)}catch(e){return this._logger.error(t,e),!1}}},{key:"isMMSOnly",value:function(){return"undefined"!=typeof ManagedMediaSource&&"undefined"==typeof MediaSource}},{key:"getDefaultConfig",value:function(){return{openLog:!1,preferMMS:!1}}}]),o}();(0,n._x)(h,"VIDEO","video"),(0,n._x)(h,"AUDIO","audio")},205531:function(t,e,r){"use strict";r.d(e,{i:function(){return o}});var n=r(570783),i=r(65661);function o(t){return(0,n.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,processMaxGapTime:1/0},t)}},319049:function(t,e,r){"use strict";r.d(e,{j:function(){return l}});var n=r(570783),i=r(991372),o=r(602929),a=r(65661),s=r(637961),u=r(942155),c=r.n(u),l=function(t){(0,n.XW)(u,t);var e,r=(0,n.WY)(u);function u(){var t;return(0,n.PA)(this,u),t=r.call(this),(0,n._x)((0,n.Lc)(t),"_abortController",null),(0,n._x)((0,n.Lc)(t),"_timeoutTimer",null),(0,n._x)((0,n.Lc)(t),"_reader",null),(0,n._x)((0,n.Lc)(t),"_response",null),(0,n._x)((0,n.Lc)(t),"_aborted",!1),(0,n._x)((0,n.Lc)(t),"_index",-1),(0,n._x)((0,n.Lc)(t),"_range",null),(0,n._x)((0,n.Lc)(t),"_receivedLength",0),(0,n._x)((0,n.Lc)(t),"_running",!1),(0,n._x)((0,n.Lc)(t),"_logger",null),(0,n._x)((0,n.Lc)(t),"_vid",""),(0,n._x)((0,n.Lc)(t),"_firtstByte",0),(0,n._x)((0,n.Lc)(t),"_onProcessMinLen",0),(0,n._x)((0,n.Lc)(t),"_onCancel",null),(0,n._x)((0,n.Lc)(t),"_priOptions",null),(0,n._x)((0,n.Lc)(t),"_processMaxGapTime",1/0),(0,n._x)((0,n.Lc)(t),"curTimeout",0),t}return(0,n.qH)(u,[{key:"load",value:function(t){var e,r=this,u=t.url,c=t.vid,l=t.timeout,f=t.dynamicTimeoutIns,h=t.responseType,d=t.onProgress,p=t.index,g=t.onTimeout,v=t.onCancel,m=t.range,_=t.transformResponse,y=t.request,b=t.params,x=t.logger,w=t.method,S=t.headers,k=t.body,T=t.mode,O=t.credentials,E=t.cache,R=t.redirect,P=t.referrer,L=t.referrerPolicy,I=t.onProcessMinLen,A=t.priOptions,B=t.streamRes,C=t.firstMaxChunkSize,M=t.processMaxGapTime;this._logger=x,this._aborted=!1,this._onProcessMinLen=I,this._onCancel=v,this._abortController="undefined"!=typeof AbortController&&new AbortController,this._running=!0,this._receivedLength=0,this._index=p,this._range=m||[0,0],this._vid=c||u,this._priOptions=A||{},this._firstMaxChunkSize=C,this._processMaxGapTime=M;var j={method:w,headers:S,body:k,mode:T,credentials:O,cache:E,redirect:R,referrer:P,referrerPolicy:L,signal:null===(e=this._abortController)||void 0===e?void 0:e.signal},N=!1;clearTimeout(this._timeoutTimer),u=(0,o.G7)(u,b);var F=(0,o.Gu)(m);F&&(S=y?y.headers:j.headers=j.headers||(Headers?new Headers:{}),Headers&&S instanceof Headers?S.append("Range",F):S.Range=F);var D=f&&"function"==typeof f.getTimeout?f.getTimeout(l):l;this.curTimeout=D,D&&(this._timeoutTimer=setTimeout((0,n.x)((0,n.l5)().mark(function t(){var e;return(0,n.l5)().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return N=!0,f&&"function"==typeof f.update&&(r._logger.debug("[dytimeout] fetch timeout update rtt,",5*D),f.update(5*D)),t.next=4,r.cancel();case 4:g&&((e=new i.C(u,j,null,"timeout")).isTimeout=!0,g(e,{index:r._index,range:r._range,vid:r._vid,priOptions:r._priOptions}));case 5:case"end":return t.stop()}},t)})),D));var U=Date.now();return this._logger.debug("[fetch load start], index,",p,",range,",m,",[dytimeout]",D),new Promise(function(t,e){var c;(B?new Promise(function(t){t(B)}):fetch(y||u,y?void 0:j)).then((c=(0,n.x)((0,n.l5)().mark(function c(l){var g,v,y,b;return(0,n.l5)().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(clearTimeout(r._timeoutTimer),r._response=l,!(r._aborted||!r._running)){n.next=4;break}return n.abrupt("return");case 4:if(_&&(l=_(l,u)||l),l.ok){n.next=7;break}throw new i.C(u,j,l,"bad network response");case 7:if(g=Date.now(),r._priOptions.rtt=g-U,f&&"function"==typeof f.update&&(r._logger.debug("[dytimeout] fetch update rtt,",r._priOptions.rtt),f.update(r._priOptions.rtt)),h!==a.U.TEXT){n.next=17;break}return n.next=13,l.text();case 13:case 20:v=n.sent,r._running=!1,n.next=39;break;case 17:if(h!==a.U.JSON){n.next=24;break}return n.next=20,l.json();case 24:if(!d){n.next=31;break}return r.resolve=t,r.reject=e,r._loadChunk(l,d,U,g),n.abrupt("return");case 31:return n.next=33,l.arrayBuffer();case 33:v=new Uint8Array(v=n.sent),r._running=!1,y=Date.now()-U,b=(0,o.pl)(v.byteLength,y),r.emit(s.K.REAL_TIME_SPEED,{speed:b,len:v.byteLength,time:y,vid:r._vid,index:r._index,range:r._range,priOptions:r._priOptions});case 39:r._logger.debug("[fetch load end], index,",p,",range,",m),t((0,o.rO)(v,!0,l,l.headers.get("Content-Length"),l.headers.get("age"),U,g,p,m,r._vid,r._priOptions));case 41:case"end":return n.stop()}},c)})),function(t){return c.apply(this,arguments)})).catch(function(t){var n;clearTimeout(r._timeoutTimer),r._running=!1,(!r._aborted||N)&&((t=t instanceof i.C?t:new i.C(u,j,null,null===(n=t)||void 0===n?void 0:n.message)).startTime=U,t.endTime=Date.now(),t.isTimeout=N,t.options={index:r._index,range:r._range,vid:r._vid,priOptions:r._priOptions},e(t))})})}},{key:"cancel",value:(e=(0,n.x)((0,n.l5)().mark(function t(){return(0,n.l5)().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!this._aborted){t.next=2;break}return t.abrupt("return");case 2:if(this._aborted=!0,this._running=!1,!this._response){t.next=14;break}if(t.prev=5,!this._reader){t.next=9;break}return t.next=9,this._reader.cancel();case 9:t.next=13;break;case 11:t.prev=11,t.t0=t.catch(5);case 13:this._response=this._reader=null;case 14:if(this._abortController){try{this._abortController.abort()}catch(t){}this._abortController=null}this._onCancel&&this._onCancel({index:this._index,range:this._range,vid:this._vid,priOptions:this._priOptions});case 16:case"end":return t.stop()}},t,this,[[5,11]])})),function(){return e.apply(this,arguments)})},{key:"_loadChunk",value:function(t,e,r,a){var u,c,l,f,h=this;if(!t.body||!t.body.getReader){this._running=!1;var d=new i.C(t.url,"",t,"onProgress of bad response.body.getReader");d.options={index:this._index,range:this._range,vid:this._vid,priOptions:this._priOptions},this.reject(d);return}this._onProcessMinLen>0&&(this._cache=new Uint8Array(2097152),this._writeIdx=0);var p=this._reader=t.body.getReader(),g=Date.now();var v=(u=(0,n.x)((0,n.l5)().mark(function u(){var d,m,_,y,b,x,w,S,k,T,O;return(0,n.l5)().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return l=Date.now(),n.prev=1,n.next=4,p.read();case 4:c=n.sent,f=Date.now(),n.next=13;break;case 8:return n.prev=8,n.t0=n.catch(1),f=Date.now(),!h._aborted&&(h._running=!1,n.t0.options={index:h._index,range:h._range,vid:h._vid,priOptions:h._priOptions},h.reject(n.t0)),n.abrupt("return");case 13:if(_=(m=(null===(d=h._range)||void 0===d?void 0:d.length)>0?h._range[0]:0)+h._receivedLength,!h._aborted){n.next=19;break}return h._running=!1,e(void 0,!1,{range:[_,_],vid:h._vid,index:h._index,startTime:l,endTime:f,st:r,firstByteTime:a,priOptions:h._priOptions},t),n.abrupt("return");case 19:if(y=c.value?c.value.byteLength:0,h._receivedLength+=y,h._onProcessMinLen>0?h._writeIdx+y>=h._onProcessMinLen||c.done?((b=new Uint8Array(h._writeIdx+y)).set(h._cache.subarray(0,h._writeIdx),0),y>0&&b.set(c.value,h._writeIdx),h._writeIdx=0,h._logger.debug("【fetchLoader,onProgress enough】,done,",c.done,",len,",b.byteLength,", writeIdx,",h._writeIdx)):y>0&&h._writeIdx+y<2097152?(h._cache.set(c.value,h._writeIdx),h._writeIdx+=y,h._logger.debug("【fetchLoader,onProgress cache】,len,",y,", writeIdx,",h._writeIdx)):y>0&&(x=new Uint8Array(h._writeIdx+y+2048),h._logger.debug("【fetchLoader,onProgress extra start】,size,",h._writeIdx+y+2048,", datalen,",y,", writeIdx,",h._writeIdx),x.set(h._cache.subarray(0,h._writeIdx),0),y>0&&x.set(c.value,h._writeIdx),h._writeIdx+=y,delete h._cache,h._cache=x,h._logger.debug("【fetchLoader,onProgress extra end】,len,",y,", writeIdx,",h._writeIdx)):b=c.value,!(b&&b.byteLength>0||c.done)){n.next=29;break}h._firstMaxChunkSize&&(h._firtstByte?h._cacheData&&((S=new Uint8Array(h._cacheData.byteLength+b.byteLength)).set(h._cacheData,0),S.set(b,h._cacheData.byteLength),b=S,h._cacheData=null):(h._firtstByte++,w=b.slice(0,h._firstMaxChunkSize),h._cacheData=b.slice(h._firstMaxChunkSize),b=w)),h._logger.debug("【fetchLoader,onProgress call】,task,",h._range,", start,",_,", end,",m+h._receivedLength,", done,",c.done,r),e(b,c.done,{range:[h._range[0]+h._receivedLength-(b?b.byteLength:0),h._range[0]+h._receivedLength],vid:h._vid,index:h._index,startTime:l,endTime:f,st:r,firstByteTime:a,priOptions:h._priOptions},t),g=Date.now(),n.next=38;break;case 29:if(!(Date.now()-g>=h._processMaxGapTime)){n.next=38;break}return h._logger.debug("[onProgress timeout],task: ".concat(JSON.stringify(h._range)," done: ").concat(c.done," processMaxGapTime: ").concat(h._processMaxGapTime)),(k=new i.C(t.url,null,t,"process timeout")).options={index:h._index,range:h._range,vid:h._vid,priOptions:h._priOptions},h.running=!1,n.next=36,h.cancel();case 36:return h.reject(k),n.abrupt("return");case 38:c.done?(T=Date.now()-r,O=(0,o.pl)(h._receivedLength,T),h.emit(s.K.REAL_TIME_SPEED,{speed:O,len:h._receivedLength,time:T,vid:h._vid,index:h._index,range:h._range,priOptions:h._priOptions}),h._running=!1,h._logger.debug("[fetchLoader onProgress end],task,",h._range,",done,",c.done),h.resolve((0,o.rO)(c,!0,t,t.headers.get("Content-Length"),t.headers.get("age"),r,a,h._index,h._range,h._vid,h._priOptions))):h._firstMaxChunkSize?setTimeout(function(){v()},0):v();case 39:case"end":return n.stop()}},u,null,[[1,8]])})),function(){return u.apply(this,arguments)});v()}},{key:"receiveLen",get:function(){return this._receivedLength}},{key:"running",get:function(){return this._running},set:function(t){this._running=t}}],[{key:"isSupported",value:function(){return"undefined"!=typeof fetch}}]),u}(c())},178561:function(t){var e,r;e=0,r=function(){"use strict";function t(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function e(t,e){return t(e={exports:{}},e.exports),e.exports}function r(t){var e,r;this.promise=new t(function(t,n){if(void 0!==e||void 0!==r)throw TypeError("Bad Promise constructor");e=t,r=n}),this.resolve=P(e),this.reject=P(r)}function n(t){var e=t.length;return 3===e?(60*(60*Number(t[0])+Number(t[1]))*1e3+1e3*Number(t[2]))/1e3:2===e?(60*Number(t[0])*1e3+1e3*Number(t[1]))/1e3:Number(t[0])}function i(t){return t}function o(t,e){return t>=0&&t<e.length?e[t]:""}function a(t,e){if(!t)return!1;if(t.classList)return Array.prototype.some.call(t.classList,function(t){return t===e});var r=t.className&&"object"===eT(t.className)?t.getAttribute("class"):t.className;return r&&!!r.match(RegExp("(\\s|^)"+e+"(\\s|$)"))}function s(t,e){t&&(t.classList?e.replace(/(^\s+|\s+$)/g,"").split(/\s+/g).forEach(function(e){e&&t.classList.add(e)}):a(t,e)||(t.className&&"object"===eT(t.className)?t.setAttribute("class",t.getAttribute("class")+" "+e):t.className+=" "+e))}function u(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={code:r3[t].code,msg:r3[t].msg};return rW(e).map(function(t){r[t]=e[t]}),r}function c(t,e,r,n,i){i?r(u(2,i),{format:n.format}):n.format?(t.list=n.list,t.format=n.format,t.styles=n.styles,e(t)):r(u(3))}function l(t){return new rU(function(e,r){if(t.list)return void e(t);if(t.json){var n=r0.parseJson(t.json);return t.list=n,t.format="json",void e(t)}t.stringContent&&!t.url?r0.parse(t.stringContent,function(n,i){c(t,e,r,n,i)}):t.url?new rq({url:t.url,type:"text"}).then(function(n){r0.parse(n.res.response,function(n,i){c(t,e,r,n,i)})}).catch(function(e){r(u(1,{statusText:e.statusText,status:e.status,type:e.type,message:"http load error",url:t.url}))}):r(u(8))})}function f(t,e){return!!(t.id&&t.id===e.id||t.language&&t.language===e.language)}var h,d,p=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t},g=function(t){return Object(p(t))},v={}.hasOwnProperty,m=function(t,e){return v.call(t,e)},_=e(function(t){var e=t.exports={version:"2.6.12"};"number"==typeof __e&&(__e=e)}),y=(_.version,e(function(t){var e=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=e)})),b=e(function(t){var e=y["__core-js_shared__"]||(y["__core-js_shared__"]={});(t.exports=function(t,r){return e[t]||(e[t]=void 0!==r?r:{})})("versions",[]).push({version:_.version,mode:"pure",copyright:"\xa9 2020 Denis Pushkarev (zloirock.ru)"})}),x=0,w=Math.random(),S=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++x+w).toString(36))},k=b("keys"),T=function(t){return k[t]||(k[t]=S(t))},O=T("IE_PROTO"),E=Object.prototype,R=Object.getPrototypeOf||function(t){return m(t=g(t),O)?t[O]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?E:null},P=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t},L=function(t,e,r){if(P(t),void 0===e)return t;switch(r){case 1:return function(r){return t.call(e,r)};case 2:return function(r,n){return t.call(e,r,n)};case 3:return function(r,n,i){return t.call(e,r,n,i)}}return function(){return t.apply(e,arguments)}},I=function(t){return"object"==typeof t?null!==t:"function"==typeof t},A=function(t){if(!I(t))throw TypeError(t+" is not an object!");return t},B=function(t){try{return!!t()}catch(t){return!0}},C=!B(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}),M=y.document,j=I(M)&&I(M.createElement),N=function(t){return j?M.createElement(t):{}},F=!C&&!B(function(){return 7!=Object.defineProperty(N("div"),"a",{get:function(){return 7}}).a}),D=function(t,e){var r,n;if(!I(t))return t;if(e&&"function"==typeof(r=t.toString)&&!I(n=r.call(t))||"function"==typeof(r=t.valueOf)&&!I(n=r.call(t))||!e&&"function"==typeof(r=t.toString)&&!I(n=r.call(t)))return n;throw TypeError("Can't convert object to primitive value")},U=Object.defineProperty,H={f:C?Object.defineProperty:function(t,e,r){if(A(t),e=D(e,!0),A(r),F)try{return U(t,e,r)}catch(t){}if("get"in r||"set"in r)throw TypeError("Accessors not supported!");return"value"in r&&(t[e]=r.value),t}},W=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},z=C?function(t,e,r){return H.f(t,e,W(1,r))}:function(t,e,r){return t[e]=r,t},q=function(t,e,r){var n,i,o,a=t&q.F,s=t&q.G,u=t&q.S,c=t&q.P,l=t&q.B,f=t&q.W,h=s?_:_[e]||(_[e]={}),d=h.prototype,p=s?y:u?y[e]:(y[e]||{}).prototype;for(n in s&&(r=e),r)(i=!a&&p&&void 0!==p[n])&&m(h,n)||(o=i?p[n]:r[n],h[n]=s&&"function"!=typeof p[n]?r[n]:l&&i?L(o,y):f&&p[n]==o?function(t){var e=function(e,r,n){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,r)}return new t(e,r,n)}return t.apply(this,arguments)};return e.prototype=t.prototype,e}(o):c&&"function"==typeof o?L(Function.call,o):o,c&&((h.virtual||(h.virtual={}))[n]=o,t&q.R&&d&&!d[n]&&z(d,n,o)))};q.F=1,q.G=2,q.S=4,q.P=8,q.B=16,q.W=32,q.U=64,q.R=128;var G=function(t,e){var r=(_.Object||{})[t]||Object[t],n={};n[t]=e(r),q(q.S+q.F*B(function(){r(1)}),"Object",n)};G("getPrototypeOf",function(){return function(t){return R(g(t))}});var V=_.Object.getPrototypeOf,Y=t(e(function(t){t.exports={default:V,__esModule:!0}})),J=t(e(function(t,e){e.__esModule=!0,e.default=function(t,e){if(!(t instanceof e))throw TypeError("Cannot call a class as a function")}})),X=Math.ceil,Z=Math.floor,K=function(t){return isNaN(t=+t)?0:(t>0?Z:X)(t)},Q={},$={}.toString,tt=function(t){return $.call(t).slice(8,-1)},te=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==tt(t)?t.split(""):Object(t)},tr=function(t){return te(p(t))},tn=Math.min,ti=function(t){return t>0?tn(K(t),9007199254740991):0},to=Math.max,ta=Math.min,ts=(eF=!1,function(t,e,r){var n,i,o,a=tr(t),s=ti(a.length),u=(n=r,i=s,(n=K(n))<0?to(n+i,0):ta(n,i));if(eF&&e!=e){for(;s>u;)if((o=a[u++])!=o)return!0}else for(;s>u;u++)if((eF||u in a)&&a[u]===e)return eF||u||0;return!eF&&-1}),tu=T("IE_PROTO"),tc=function(t,e){var r,n=tr(t),i=0,o=[];for(r in n)r!=tu&&m(n,r)&&o.push(r);for(;e.length>i;)m(n,r=e[i++])&&(~ts(o,r)||o.push(r));return o},tl="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(","),tf=Object.keys||function(t){return tc(t,tl)},th=C?Object.defineProperties:function(t,e){A(t);for(var r,n=tf(e),i=n.length,o=0;i>o;)H.f(t,r=n[o++],e[r]);return t},td=y.document,tp=td&&td.documentElement,tg=T("IE_PROTO"),tv=function(){},tm=function(){var t,e=N("iframe"),r=tl.length;for(e.style.display="none",tp.appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),tm=t.F;r--;)delete tm.prototype[tl[r]];return tm()},t_=Object.create||function(t,e){var r;return null!==t?(tv.prototype=A(t),r=new tv,tv.prototype=null,r[tg]=t):r=tm(),void 0===e?r:th(r,e)},ty=e(function(t){var e=b("wks"),r=y.Symbol,n="function"==typeof r;(t.exports=function(t){return e[t]||(e[t]=n&&r[t]||(n?r:S)("Symbol."+t))}).store=e}),tb=H.f,tx=ty("toStringTag"),tw=function(t,e,r){t&&!m(t=r?t:t.prototype,tx)&&tb(t,tx,{configurable:!0,value:e})},tS={};z(tS,ty("iterator"),function(){return this});var tk=function(t,e,r){t.prototype=t_(tS,{next:W(1,r)}),tw(t,e+" Iterator")},tT=ty("iterator"),tO=!([].keys&&"next"in[].keys()),tE=function(){return this},tR=function(t,e,r,n,i,o,a){tk(r,e,n);var s,u,c,l=function(t){if(!tO&&t in p)return p[t];switch(t){case"keys":case"values":return function(){return new r(this,t)}}return function(){return new r(this,t)}},f=e+" Iterator",h="values"==i,d=!1,p=t.prototype,g=p[tT]||p["@@iterator"]||i&&p[i],v=g||l(i),m=i?h?l("entries"):v:void 0,_="Array"==e&&p.entries||g;if(_&&(c=R(_.call(new t)))!==Object.prototype&&c.next&&tw(c,f,!0),h&&g&&"values"!==g.name&&(d=!0,v=function(){return g.call(this)}),a&&(tO||d||!p[tT])&&z(p,tT,v),Q[e]=v,Q[f]=tE,i){if(s={values:h?v:l("values"),keys:o?v:l("keys"),entries:m},a)for(u in s)u in p||z(p,u,s[u]);else q(q.P+q.F*(tO||d),e,s)}return s},tP=(eD=!0,function(t,e){var r,n,i=String(p(t)),o=K(e),a=i.length;return o<0||o>=a?eD?"":void 0:(r=i.charCodeAt(o))<55296||r>56319||o+1===a||(n=i.charCodeAt(o+1))<56320||n>57343?eD?i.charAt(o):r:eD?i.slice(o,o+2):n-56320+(r-55296<<10)+65536});tR(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,r=this._i;return r>=e.length?{value:void 0,done:!0}:(t=tP(e,r),this._i+=t.length,{value:t,done:!1})});var tL=function(t,e){return{value:e,done:!!t}};tR(Array,"Array",function(t,e){this._t=tr(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,r=this._i++;return!t||r>=t.length?(this._t=void 0,tL(1)):"keys"==e?tL(0,r):"values"==e?tL(0,t[r]):tL(0,[r,t[r]])},"values"),Q.Arguments=Q.Array;for(var tI=ty("toStringTag"),tA="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),tB=0;tB<tA.length;tB++){var tC=tA[tB],tM=y[tC],tj=tM&&tM.prototype;tj&&!tj[tI]&&z(tj,tI,tC),Q[tC]=Q.Array}var tN={f:ty},tF=tN.f("iterator"),tD=e(function(t){t.exports={default:tF,__esModule:!0}});t(tD);var tU=e(function(t){var e=S("meta"),r=H.f,n=0,i=Object.isExtensible||function(){return!0},o=!B(function(){return i(Object.preventExtensions({}))}),a=function(t){r(t,e,{value:{i:"O"+ ++n,w:{}}})},s=t.exports={KEY:e,NEED:!1,fastKey:function(t,r){if(!I(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!m(t,e)){if(!i(t))return"F";if(!r)return"E";a(t)}return t[e].i},getWeak:function(t,r){if(!m(t,e)){if(!i(t))return!0;if(!r)return!1;a(t)}return t[e].w},onFreeze:function(t){return o&&s.NEED&&i(t)&&!m(t,e)&&a(t),t}}}),tH=(tU.KEY,tU.NEED,tU.fastKey,tU.getWeak,tU.onFreeze,H.f),tW=function(t){var e=_.Symbol||(_.Symbol={});"_"==t.charAt(0)||t in e||tH(e,t,{value:tN.f(t)})},tz={f:Object.getOwnPropertySymbols},tq={f:{}.propertyIsEnumerable},tG=function(t){var e=tf(t),r=tz.f;if(r)for(var n,i=r(t),o=tq.f,a=0;i.length>a;)o.call(t,n=i[a++])&&e.push(n);return e},tV=Array.isArray||function(t){return"Array"==tt(t)},tY=tl.concat("length","prototype"),tJ={f:Object.getOwnPropertyNames||function(t){return tc(t,tY)}},tX=tJ.f,tZ={}.toString,tK="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],tQ=function(t){try{return tX(t)}catch(t){return tK.slice()}},t$={f:function(t){return tK&&"[object Window]"==tZ.call(t)?tQ(t):tX(tr(t))}},t0=Object.getOwnPropertyDescriptor,t1={f:C?t0:function(t,e){if(t=tr(t),e=D(e,!0),F)try{return t0(t,e)}catch(t){}if(m(t,e))return W(!tq.f.call(t,e),t[e])}},t2=tU.KEY,t3=t1.f,t9=H.f,t4=t$.f,t5=y.Symbol,t6=y.JSON,t8=t6&&t6.stringify,t7=ty("_hidden"),et=ty("toPrimitive"),ee={}.propertyIsEnumerable,er=b("symbol-registry"),en=b("symbols"),ei=b("op-symbols"),eo=Object.prototype,ea="function"==typeof t5&&!!tz.f,es=y.QObject,eu=!es||!es.prototype||!es.prototype.findChild,ec=C&&B(function(){return 7!=t_(t9({},"a",{get:function(){return t9(this,"a",{value:7}).a}})).a})?function(t,e,r){var n=t3(eo,e);n&&delete eo[e],t9(t,e,r),n&&t!==eo&&t9(eo,e,n)}:t9,el=function(t){var e=en[t]=t_(t5.prototype);return e._k=t,e},ef=ea&&"symbol"==typeof t5.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof t5},eh=function(t,e,r){return t===eo&&eh(ei,e,r),A(t),e=D(e,!0),A(r),m(en,e)?(r.enumerable?(m(t,t7)&&t[t7][e]&&(t[t7][e]=!1),r=t_(r,{enumerable:W(0,!1)})):(m(t,t7)||t9(t,t7,W(1,{})),t[t7][e]=!0),ec(t,e,r)):t9(t,e,r)},ed=function(t,e){A(t);for(var r,n=tG(e=tr(e)),i=0,o=n.length;o>i;)eh(t,r=n[i++],e[r]);return t},ep=function(t,e){if(t=tr(t),e=D(e,!0),t!==eo||!m(en,e)||m(ei,e)){var r=t3(t,e);return!r||!m(en,e)||m(t,t7)&&t[t7][e]||(r.enumerable=!0),r}},eg=function(t){for(var e,r=t4(tr(t)),n=[],i=0;r.length>i;)m(en,e=r[i++])||e==t7||e==t2||n.push(e);return n},ev=function(t){for(var e,r=t===eo,n=t4(r?ei:tr(t)),i=[],o=0;n.length>o;)m(en,e=n[o++])&&(!r||m(eo,e))&&i.push(en[e]);return i};ea||(z((t5=function(){if(this instanceof t5)throw TypeError("Symbol is not a constructor!");var t=S(arguments.length>0?arguments[0]:void 0),e=function(r){this===eo&&e.call(ei,r),m(this,t7)&&m(this[t7],t)&&(this[t7][t]=!1),ec(this,t,W(1,r))};return C&&eu&&ec(eo,t,{configurable:!0,set:e}),el(t)}).prototype,"toString",function(){return this._k}),t1.f=ep,H.f=eh,tJ.f=t$.f=eg,tq.f=function(t){var e=ee.call(this,t=D(t,!0));return!(this===eo&&m(en,t)&&!m(ei,t))&&(!(e||!m(this,t)||!m(en,t)||m(this,t7)&&this[t7][t])||e)},tz.f=ev,tN.f=function(t){return el(ty(t))}),q(q.G+q.W+!ea*q.F,{Symbol:t5});for(var em="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),e_=0;em.length>e_;)ty(em[e_++]);for(var ey=tf(ty.store),eb=0;ey.length>eb;)tW(ey[eb++]);q(q.S+!ea*q.F,"Symbol",{for:function(t){return m(er,t+="")?er[t]:er[t]=t5(t)},keyFor:function(t){if(!ef(t))throw TypeError(t+" is not a symbol!");for(var e in er)if(er[e]===t)return e},useSetter:function(){eu=!0},useSimple:function(){eu=!1}}),q(q.S+!ea*q.F,"Object",{create:function(t,e){return void 0===e?t_(t):ed(t_(t),e)},defineProperty:eh,defineProperties:ed,getOwnPropertyDescriptor:ep,getOwnPropertyNames:eg,getOwnPropertySymbols:ev});var ex=B(function(){tz.f(1)});q(q.S+q.F*ex,"Object",{getOwnPropertySymbols:function(t){return tz.f(g(t))}}),t6&&q(q.S+q.F*(!ea||B(function(){var t=t5();return"[null]"!=t8([t])||"{}"!=t8({a:t})||"{}"!=t8(Object(t))})),"JSON",{stringify:function(t){for(var e,r,n=[t],i=1;arguments.length>i;)n.push(arguments[i++]);if(r=e=n[1],(I(e)||void 0!==t)&&!ef(t))return tV(e)||(e=function(t,e){if("function"==typeof r&&(e=r.call(this,t,e)),!ef(e))return e}),n[1]=e,t8.apply(t6,n)}}),t5.prototype[et]||z(t5.prototype,et,t5.prototype.valueOf),tw(t5,"Symbol"),tw(Math,"Math",!0),tw(y.JSON,"JSON",!0),tW("asyncIterator"),tW("observable");var ew=_.Symbol,eS=e(function(t){t.exports={default:ew,__esModule:!0}});t(eS);var ek=e(function(t,e){function r(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var n=r(tD),i=r(eS),o="function"==typeof i.default&&"symbol"==typeof n.default?function(t){return typeof t}:function(t){return t&&"function"==typeof i.default&&t.constructor===i.default&&t!==i.default.prototype?"symbol":typeof t};e.default="function"==typeof i.default&&"symbol"===o(n.default)?function(t){return void 0===t?"undefined":o(t)}:function(t){return t&&"function"==typeof i.default&&t.constructor===i.default&&t!==i.default.prototype?"symbol":void 0===t?"undefined":o(t)}}),eT=t(ek),eO=t(e(function(t,e){e.__esModule=!0;var r,n=(r=ek)&&r.__esModule?r:{default:r};e.default=function(t,e){if(!t)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&("object"===(void 0===e?"undefined":(0,n.default)(e))||"function"==typeof e)?e:t}}));q(q.S+!C*q.F,"Object",{defineProperty:H.f});var eE=_.Object,eR=function(t,e,r){return eE.defineProperty(t,e,r)},eP=e(function(t){t.exports={default:eR,__esModule:!0}});t(eP);var eL=t(e(function(t,e){e.__esModule=!0;var r,n=(r=eP)&&r.__esModule?r:{default:r};e.default=function(){function t(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),(0,n.default)(t,i.key,i)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}()})),eI=function(t,e){if(A(t),!I(e)&&null!==e)throw TypeError(e+": can't set as prototype!")},eA={set:Object.setPrototypeOf||("__proto__"in{}?function(t,e,r){try{(r=L(Function.call,t1.f(Object.prototype,"__proto__").set,2))(t,[]),e=!(t instanceof Array)}catch(t){e=!0}return function(t,n){return eI(t,n),e?t.__proto__=n:r(t,n),t}}({},!1):void 0),check:eI};q(q.S,"Object",{setPrototypeOf:eA.set});var eB=_.Object.setPrototypeOf,eC=e(function(t){t.exports={default:eB,__esModule:!0}});t(eC),q(q.S,"Object",{create:t_});var eM=_.Object,ej=function(t,e){return eM.create(t,e)},eN=e(function(t){t.exports={default:ej,__esModule:!0}});t(eN);var eF,eD,eU,eH,eW,ez=t(e(function(t,e){function r(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var n=r(eC),i=r(eN),o=r(ek);e.default=function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function, not "+(void 0===e?"undefined":(0,o.default)(e)));t.prototype=(0,i.default)(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(n.default?(0,n.default)(t,e):t.__proto__=e)}})),eq=ty("toStringTag"),eG="Arguments"==tt(function(){return arguments}()),eV=function(t,e){try{return t[e]}catch(t){}},eY=function(t){var e,r,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=eV(e=Object(t),eq))?r:eG?tt(e):"Object"==(n=tt(e))&&"function"==typeof e.callee?"Arguments":n},eJ=function(t,e,r,n){if(!(t instanceof e)||void 0!==n&&n in t)throw TypeError(r+": incorrect invocation!");return t},eX=function(t,e,r,n){try{return n?e(A(r)[0],r[1]):e(r)}catch(e){var i=t.return;throw void 0!==i&&A(i.call(t)),e}},eZ=ty("iterator"),eK=Array.prototype,eQ=ty("iterator"),e$=_.getIteratorMethod=function(t){if(void 0!=t)return t[eQ]||t["@@iterator"]||Q[eY(t)]},e0=e(function(t){var e={},r={},n=t.exports=function(t,n,i,o,a){var s,u,c,l,f,h=a?function(){return t}:e$(t),d=L(i,o,n?2:1),p=0;if("function"!=typeof h)throw TypeError(t+" is not iterable!");if(void 0!==(s=h)&&(Q.Array===s||eK[eZ]===s)){for(u=ti(t.length);u>p;p++)if((f=n?d(A(c=t[p])[0],c[1]):d(t[p]))===e||f===r)return f}else for(l=h.call(t);!(c=l.next()).done;)if((f=eX(l,d,c.value,n))===e||f===r)return f};n.BREAK=e,n.RETURN=r}),e1=ty("species"),e2=function(t,e){var r,n=A(t).constructor;return void 0===n||void 0==(r=A(n)[e1])?e:P(r)},e3=function(t,e,r){var n=void 0===r;switch(e.length){case 0:return n?t():t.call(r);case 1:return n?t(e[0]):t.call(r,e[0]);case 2:return n?t(e[0],e[1]):t.call(r,e[0],e[1]);case 3:return n?t(e[0],e[1],e[2]):t.call(r,e[0],e[1],e[2]);case 4:return n?t(e[0],e[1],e[2],e[3]):t.call(r,e[0],e[1],e[2],e[3])}return t.apply(r,e)},e9=y.process,e4=y.setImmediate,e5=y.clearImmediate,e6=y.MessageChannel,e8=y.Dispatch,e7=0,rt={},re=function(){var t=+this;if(rt.hasOwnProperty(t)){var e=rt[t];delete rt[t],e()}},rr=function(t){re.call(t.data)};e4&&e5||(e4=function(t){for(var e=[],r=1;arguments.length>r;)e.push(arguments[r++]);return rt[++e7]=function(){e3("function"==typeof t?t:Function(t),e)},eU(e7),e7},e5=function(t){delete rt[t]},"process"==tt(e9)?eU=function(t){e9.nextTick(L(re,t,1))}:e8&&e8.now?eU=function(t){e8.now(L(re,t,1))}:e6?(eW=(eH=new e6).port2,eH.port1.onmessage=rr,eU=L(eW.postMessage,eW,1)):y.addEventListener&&"function"==typeof postMessage&&!y.importScripts?(eU=function(t){y.postMessage(t+"","*")},y.addEventListener("message",rr,!1)):eU="onreadystatechange"in N("script")?function(t){tp.appendChild(N("script")).onreadystatechange=function(){tp.removeChild(this),re.call(t)}}:function(t){setTimeout(L(re,t,1),0)});var rn=e4,ri=y.MutationObserver||y.WebKitMutationObserver,ro=y.process,ra=y.Promise,rs="process"==tt(ro),ru={f:function(t){return new r(t)}},rc=function(t){try{return{e:!1,v:t()}}catch(t){return{e:!0,v:t}}},rl=y.navigator,rf=rl&&rl.userAgent||"",rh=function(t,e){if(A(t),I(e)&&e.constructor===t)return e;var r=ru.f(t);return(0,r.resolve)(e),r.promise},rd=ty("species"),rp=ty("iterator"),rg=!1;try{var rv=[7][rp]();rv.return=function(){rg=!0},Array.from(rv,function(){throw 2})}catch(t){}var rm,r_,ry,rb,rx=rn,rw=function(){var t,e,r,n=function(){var n,i;for(rs&&(n=ro.domain)&&n.exit();t;){i=t.fn,t=t.next;try{i()}catch(n){throw t?r():e=void 0,n}}e=void 0,n&&n.enter()};if(rs)r=function(){ro.nextTick(n)};else if(!ri||y.navigator&&y.navigator.standalone){if(ra&&ra.resolve){var i=ra.resolve(void 0);r=function(){i.then(n)}}else r=function(){rn.call(y,n)}}else{var o=!0,a=document.createTextNode("");new ri(n).observe(a,{characterData:!0}),r=function(){a.data=o=!o}}return function(n){var i={fn:n,next:void 0};e&&(e.next=i),t||(t=i,r()),e=i}}(),rS=y.TypeError,rk=y.process,rT=rk&&rk.versions,rO=rT&&rT.v8||"",rE=y.Promise,rR="process"==eY(rk),rP=function(){},rL=r_=ru.f,rI=!!function(){try{var t=rE.resolve(1),e=(t.constructor={})[ty("species")]=function(t){t(rP,rP)};return(rR||"function"==typeof PromiseRejectionEvent)&&t.then(rP) instanceof e&&0!==rO.indexOf("6.6")&&-1===rf.indexOf("Chrome/66")}catch(t){}}(),rA=function(t){var e;return!(!I(t)||"function"!=typeof(e=t.then))&&e},rB=function(t,e){if(!t._n){t._n=!0;var r=t._c;rw(function(){for(var n=t._v,i=1==t._s,o=0;r.length>o;)!function(e){var r,o,a,s=i?e.ok:e.fail,u=e.resolve,c=e.reject,l=e.domain;try{s?(i||(2==t._h&&rj(t),t._h=1),!0===s?r=n:(l&&l.enter(),r=s(n),l&&(l.exit(),a=!0)),r===e.promise?c(rS("Promise-chain cycle")):(o=rA(r))?o.call(r,u,c):u(r)):c(n)}catch(t){l&&!a&&l.exit(),c(t)}}(r[o++]);t._c=[],t._n=!1,e&&!t._h&&rC(t)})}},rC=function(t){rx.call(y,function(){var e,r,n,i=t._v,o=rM(t);if(o&&(e=rc(function(){rR?rk.emit("unhandledRejection",i,t):(r=y.onunhandledrejection)?r({promise:t,reason:i}):(n=y.console)&&n.error&&n.error("Unhandled promise rejection",i)}),t._h=rR||rM(t)?2:1),t._a=void 0,o&&e.e)throw e.v})},rM=function(t){return 1!==t._h&&0===(t._a||t._c).length},rj=function(t){rx.call(y,function(){var e;rR?rk.emit("rejectionHandled",t):(e=y.onrejectionhandled)&&e({promise:t,reason:t._v})})},rN=function(t){var e=this;e._d||(e._d=!0,(e=e._w||e)._v=t,e._s=2,e._a||(e._a=e._c.slice()),rB(e,!0))},rF=function(t){var e,r=this;if(!r._d){r._d=!0,r=r._w||r;try{if(r===t)throw rS("Promise can't be resolved itself");(e=rA(t))?rw(function(){var n={_w:r,_d:!1};try{e.call(t,L(rF,n,1),L(rN,n,1))}catch(t){rN.call(n,t)}}):(r._v=t,r._s=1,rB(r,!1))}catch(t){rN.call({_w:r,_d:!1},t)}}};rI||(rE=function(t){eJ(this,rE,"Promise","_h"),P(t),rm.call(this);try{t(L(rF,this,1),L(rN,this,1))}catch(t){rN.call(this,t)}},(rm=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=function(t,e,r){for(var n in e)z(t,n,e[n]);return t}(rE.prototype,{then:function(t,e){var r=rL(e2(this,rE));return r.ok="function"!=typeof t||t,r.fail="function"==typeof e&&e,r.domain=rR?rk.domain:void 0,this._c.push(r),this._a&&this._a.push(r),this._s&&rB(this,!1),r.promise},catch:function(t){return this.then(void 0,t)}}),ry=function(){var t=new rm;this.promise=t,this.resolve=L(rF,t,1),this.reject=L(rN,t,1)},ru.f=rL=function(t){return t===rE||t===rb?new ry(t):r_(t)}),q(q.G+q.W+!rI*q.F,{Promise:rE}),tw(rE,"Promise"),d="function"==typeof _[h="Promise"]?_[h]:y[h],C&&d&&!d[rd]&&H.f(d,rd,{configurable:!0,get:function(){return this}}),rb=_.Promise,q(q.S+!rI*q.F,"Promise",{reject:function(t){var e=rL(this);return(0,e.reject)(t),e.promise}}),q(q.S+!0*q.F,"Promise",{resolve:function(t){return rh(this===rb?rE:this,t)}}),q(q.S+!(rI&&function(t,e){if(!rg)return!1;var r=!1;try{var n=[7],i=n[rp]();i.next=function(){return{done:r=!0}},n[rp]=function(){return i},t(n)}catch(t){}return r}(function(t){rE.all(t).catch(rP)}))*q.F,"Promise",{all:function(t){var e=this,r=rL(e),n=r.resolve,i=r.reject,o=rc(function(){var r=[],o=0,a=1;e0(t,!1,function(t){var s=o++,u=!1;r.push(void 0),a++,e.resolve(t).then(function(t){u||(u=!0,r[s]=t,--a||n(r))},i)}),--a||n(r)});return o.e&&i(o.v),r.promise},race:function(t){var e=this,r=rL(e),n=r.reject,i=rc(function(){e0(t,!1,function(t){e.resolve(t).then(r.resolve,n)})});return i.e&&n(i.v),r.promise}}),q(q.P+q.R,"Promise",{finally:function(t){var e=e2(this,_.Promise||y.Promise),r="function"==typeof t;return this.then(r?function(r){return rh(e,t()).then(function(){return r})}:t,r?function(r){return rh(e,t()).then(function(){throw r})}:t)}}),q(q.S,"Promise",{try:function(t){var e=ru.f(this),r=rc(t);return(r.e?e.reject:e.resolve)(r.v),e.promise}});var rD=_.Promise,rU=t(e(function(t){t.exports={default:rD,__esModule:!0}}));G("keys",function(){return function(t){return tf(g(t))}});var rH=_.Object.keys,rW=t(e(function(t){t.exports={default:rH,__esModule:!0}})),rz=e(function(t){function e(){}function r(t,e,r){this.fn=t,this.context=e,this.once=r||!1}function n(t,e,n,i,o){if("function"!=typeof n)throw TypeError("The listener must be a function");var a=new r(n,i||t,o),u=s?s+e:e;return t._events[u]?t._events[u].fn?t._events[u]=[t._events[u],a]:t._events[u].push(a):(t._events[u]=a,t._eventsCount++),t}function i(t,r){0==--t._eventsCount?t._events=new e:delete t._events[r]}function o(){this._events=new e,this._eventsCount=0}var a=Object.prototype.hasOwnProperty,s="~";Object.create&&(e.prototype=Object.create(null),(new e).__proto__||(s=!1)),o.prototype.eventNames=function(){var t,e,r=[];if(0===this._eventsCount)return r;for(e in t=this._events)a.call(t,e)&&r.push(s?e.slice(1):e);return Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(t)):r},o.prototype.listeners=function(t){var e=s?s+t:t,r=this._events[e];if(!r)return[];if(r.fn)return[r.fn];for(var n=0,i=r.length,o=Array(i);n<i;n++)o[n]=r[n].fn;return o},o.prototype.listenerCount=function(t){var e=s?s+t:t,r=this._events[e];return r?r.fn?1:r.length:0},o.prototype.emit=function(t,e,r,n,i,o){var a=s?s+t:t;if(!this._events[a])return!1;var u,c,l=this._events[a],f=arguments.length;if(l.fn){switch(l.once&&this.removeListener(t,l.fn,void 0,!0),f){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,e),!0;case 3:return l.fn.call(l.context,e,r),!0;case 4:return l.fn.call(l.context,e,r,n),!0;case 5:return l.fn.call(l.context,e,r,n,i),!0;case 6:return l.fn.call(l.context,e,r,n,i,o),!0}for(c=1,u=Array(f-1);c<f;c++)u[c-1]=arguments[c];l.fn.apply(l.context,u)}else{var h,d=l.length;for(c=0;c<d;c++)switch(l[c].once&&this.removeListener(t,l[c].fn,void 0,!0),f){case 1:l[c].fn.call(l[c].context);break;case 2:l[c].fn.call(l[c].context,e);break;case 3:l[c].fn.call(l[c].context,e,r);break;case 4:l[c].fn.call(l[c].context,e,r,n);break;default:if(!u)for(h=1,u=Array(f-1);h<f;h++)u[h-1]=arguments[h];l[c].fn.apply(l[c].context,u)}}return!0},o.prototype.on=function(t,e,r){return n(this,t,e,r,!1)},o.prototype.once=function(t,e,r){return n(this,t,e,r,!0)},o.prototype.removeListener=function(t,e,r,n){var o=s?s+t:t;if(!this._events[o])return this;if(!e)return i(this,o),this;var a=this._events[o];if(a.fn)a.fn!==e||n&&!a.once||r&&a.context!==r||i(this,o);else{for(var u=0,c=[],l=a.length;u<l;u++)(a[u].fn!==e||n&&!a[u].once||r&&a[u].context!==r)&&c.push(a[u]);c.length?this._events[o]=1===c.length?c[0]:c:i(this,o)}return this},o.prototype.removeAllListeners=function(t){var r;return t?(r=s?s+t:t,this._events[r]&&i(this,r)):(this._events=new e,this._eventsCount=0),this},o.prototype.off=o.prototype.removeListener,o.prototype.addListener=o.prototype.on,o.prefixed=s,o.EventEmitter=o,t.exports=o}),rq=function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.url,n=e.method,i=void 0===n?"GET":n,o=e.type,a=void 0===o?"arraybuffer":o,s=e.timeout,u=void 0===s?1e4:s,c=e.data,l=void 0===c?{}:c,f=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return J(this,t),new rU(function(t,e){var n=new window.XMLHttpRequest,o=i.toUpperCase(),s=[];for(var c in a&&(n.responseType=a),u&&(n.timeout=u),l)s.push("k="+l[c]);if(n.onload=function(){200===n.status||206===n.status?t({context:f,res:n}):e(Error({context:f,res:n,type:"error"}))},n.onerror=function(t){e(Error({context:f,res:n,type:"error"}))},n.ontimeout=function(t){e(Error({context:f,res:n,type:"error"}))},n.onabort=function(){e(Error({context:f,res:n,type:"error"}))},"GET"===o)n.open(o,""+r),n.send();else{if("post"!==o)throw Error("xhr "+o+" is not supported");n.open(o,r),n.setRequestHeader("Content-type","application/x-www-form-urlencoded"),n.send(s.join("&"))}})},rG=/^WEBVTT/,rV=/^STYLE+$/,rY=/^\:\:cue/,rJ=/^}+$/,rX=/^\[Script Info\].*/,rZ=[/[0-9]{1,3}:[0-9]{2}:[0-9]{2}\.[0-9]{1,3}-->[0-9]{1,3}:[0-9]{2}:[0-9]{2}\.[0-9]{1,3}/,/[0-9]{1,2}:[0-9]{2}\.[0-9]{1,3}-->[0-9]{1,2}:[0-9]{2}\.[0-9]{1,3}/,/[0-9]{1,2}\.[0-9]{1,3}-->[0-9]{1,2}\.[0-9]{1,3}/],rK=/^Format:\s/,rQ=/^Style:\s/,r$=/^Dialogue:\s/,r0=function(){function t(){J(this,t)}return eL(t,null,[{key:"parseJson",value:function(t){for(var e=[],r=0,n=0;n<t.length;n++){if(r>=50&&(r=0),0===r){var i={start:t[n].start,list:[t[n]],end:t[n].end};e.push(i)}else e[e.length-1].list.push(t[n]),e[e.length-1].end=t[n].end;r++}return e}},{key:"parse",value:function(e,r){var n=t.checkFormat(e);n||r({format:n});try{var i=[];"ass"===n?i=t.parseASS(e):"vtt"===n&&(i=t.parseVTT(e)),r({format:n,list:i.list,styles:i.styles})}catch(t){r({format:n},t)}}},{key:"parseASSItem",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=t.split(","),i={},o="";try{var a=r.length-e.length;return o=o=(o=a>0?r.splice(e.length-1,a+1).join(",")+"":r[r.length-1]+"").replace(/\\n+/g,""),r[e.length-1]=o,e.map(function(t,e){"end"===t||"start"===t?i[t]=n(r[e].split(":")):"text"===t?i[t]=[r[e]]:"layer"===t?(i[t]=[r[e]],i.textTag=[r[e]]):i[t]="style"===t?[r[e]]:Number(r[e])?Number(r[e]):r[e]}),i}catch(t){return{}}}},{key:"parseASS",value:function(e){for(var r=e.split("\n"),n=[],i=0,o=0,a=[],s=[],u=null;i<r.length;){if(rK.test(r[i]))s=(s=r[i].replace(rK,"").replace(/\s+/g,"").split(",")).map(function(t){return t.toLocaleLowerCase()});else if(rQ.test(r[i]))a.push(r[i].replace(rQ,"").replace(/\s+/g,""));else if(r$.test(r[i])){var c=t.parseASSItem(r[i].replace(r$,""),s);if(u&&c.start===u.start&&c.end===u.end)try{var l=u,f=l.text,h=l.textTag,d=l.style;f.push(c.text[0]),h.push(c.textTag[0]),d.push(c.style[0])}catch(t){}else{u=c;var p=null;o%50==0?((p={start:u.start,end:u.end,list:[]}).list.push(u),n.push(p)):((p=n[n.length-1]).end=u.end,p.list.push(u)),o++}}i++}return{list:n,style:{}}}},{key:"parseVTTStyle",value:function(t,e){var r=t.split(":");if(r.length>1){var n=r[0].trim().split("-"),i="";n.length>1?n.map(function(t,e){i+=0===e?t:t.charAt(0).toUpperCase()+t.slice(1)}):i=n[0],e[i]=r[1].trim().replace(/;$/,"")}return e}},{key:"parseVTT",value:function(t){for(var e=(t=t.replace(rG,"")).split("\n"),r=[],n=0,i=0,a=null,s=!1,u=!1,c=null,l=null,f=[];n<e.length;){var h,d=o(n,e).trim();if(!d||s&&(h=d,/^(\-|\+)?\d+(\.\d+)?$/.test(h)))s=!d;else if(rY.test(d)&&rV.test(o(n-1,e).trim())){u=!0;var p=/\((.+?)\)/g.exec(d);l=p?p[1]:"",c=""}else if(u)rJ.test(d)?(f.push({key:l,style:c}),c=null,l=null,u=!1):c+=d;else if(d){s=!1;var g=this.checkIsTime(e[n]);if(g){var v=this.parseVttTime(g);if(!a||v.start!==a.start||v.end!==a.end){(a=v).text=[],a.textTag=[];var m=null;i%50==0?((m={start:a.start,end:a.end,list:[]}).list.push(a),r.push(m)):((m=r[r.length-1]).end=a.end,m.list.push(a)),i++}}else if(a){var _=a,y=_.text,b=_.textTag,x=this.parseVttText(e[n]);y.push(x.text),b.push(x.tag)}s=!1}n++}return{list:r,styles:f}}},{key:"checkIsTime",value:function(t){t=t.replace(/\s+/g,"");for(var e=0,r=null;e<rZ.length&&!(r=rZ[e].exec(t));)e++;return r?r[0]:null}},{key:"parseVttText",value:function(t){var e=/^(<?.+?>)/g.exec(t),r="",n="default";if(e){var i=RegExp("^<"+(n=e[0].replace(/\<|\>|\&/g,""))+">(([\\s\\S])*?)</"+n+">$").exec(t);i?r=i[1]:(r=t,n="")}else r=t;for(var o=/<(\w+).(\w+)>/g,a=o.exec(r);a&&a.length>2;)a=o.exec(r=r.replace(a[0],"<"+a[1]+' class="'+a[2]+'">'));return{tag:n,text:r.replace(/\\n+/g,"<br/>")}}},{key:"parseVttTime",value:function(t){var e=t.split("--\x3e"),r=void 0,i=0;if(2===e.length){var o=e[0].split(":"),a=e[1].split(":");r=n(o),i=n(a)}return{start:r,end:i,time:t}}},{key:"isVTT",value:function(t){return rG.test(t)}},{key:"isASS",value:function(t){return rX.test(t)}},{key:"checkFormat",value:function(t){return t?rG.test(t)?"vtt":rX.test(t)?"ass":null:null}}]),t}(),r1=function(){function t(){var e=this;J(this,t),this.__handlers=[],window.ResizeObserver&&(this.observer=new window.ResizeObserver(function(t){e.__trigger(t)}))}return eL(t,[{key:"addObserver",value:function(t,e){if(this.observer){this.observer&&this.observer.observe(t);for(var r=this.__handlers,n=-1,i=0;i<r.length;i++)r[i]&&t===r[i].target&&(n=i);n>-1?this.__handlers[n].handler.push(e):this.__handlers.push({target:t,handler:[e]})}}},{key:"unObserver",value:function(t){var e=-1;this.__handlers.map(function(r,n){t===r.target&&(e=n)}),this.observer&&this.observer.unobserve(t),e>-1&&this.__handlers.splice(e,1)}},{key:"destroyObserver",value:function(){this.observer&&this.observer.disconnect(),this.observer=null,this.__handlers=null}},{key:"__runHandler",value:function(t,e){for(var r=this.__handlers,n=0;n<r.length;n++)if(r[n]&&t===r[n].target){r[n].handler&&r[n].handler.map(function(r){try{r(t,e)}catch(t){}});break}}},{key:"__trigger",value:function(t){var e=this;t.map(function(t){var r=t.contentRect;e.__runHandler(t.target,r)})}}]),t}(),r2=null;!function(t,e){void 0===e&&(e={});var r=e.insertAt;if(t&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===r&&n.firstChild?n.insertBefore(i,n.firstChild):n.appendChild(i),i.styleSheet?i.styleSheet.cssText=t:i.appendChild(document.createTextNode(t))}}('xg-text-track.xg-text-track {\n font-family: "PingFang SC","SF Pro SC","SF Pro Text","SF Pro Icons","Helvetica Neue","Helvetica","Arial",sans-serif;\n -webkit-font-smoothing: antialiased;\n position: absolute;\n bottom: 0;\n color: #fff;\n left: 0;\n right: 0;\n pointer-events: none;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center; }\n xg-text-track.xg-text-track.text-track-no-fitvideo {\n margin-bottom: 2%; }\n xg-text-track.xg-text-track.text-track-hide {\n opacity: 0;\n visibility: hidden; }\n xg-text-track.xg-text-track.text-track-show {\n opacity: 1;\n visibility: visible; }\n xg-text-track.xg-text-track xg-text-track-inner {\n display: block;\n max-width: 92%; }\n xg-text-track.xg-text-track xg-text-track-span {\n display: -webkit-box;\n text-align: center;\n text-overflow: ellipsis;\n -webkit-box-orient: vertical;\n overflow: hidden;\n padding: 1px 4px;\n -webkit-line-clamp: 1;\n line-height: 120%;\n word-break: break-word; }\n xg-text-track.xg-text-track xg-text-track-span.text-track-deputy {\n font-size: 75%; }\n xg-text-track.xg-text-track xg-text-track-span.text-track-single {\n -webkit-line-clamp: 1; }\n xg-text-track.xg-text-track xg-text-track-span.text-track-double {\n -webkit-line-clamp: 2; }\n xg-text-track.xg-text-track xg-text-track-span.text-track-three {\n -webkit-line-clamp: 3; }\n xg-text-track.xg-text-track.text-track-bg xg-text-track-inner {\n background-color: rgba(0, 0, 0, .54);\n border-radius: 2px; }\n xg-text-track.xg-text-track.text-track-stroke xg-text-track-inner {\n background-color: none;\n border-radius: 0;\n text-shadow: -1px 1px 0 rgba(0, 0, 0, .7), 1px 1px 0 rgba(0, 0, 0, .7), 1px -1px 0 rgba(0, 0, 0, .7), -1px -1px 0 rgba(0, 0, 0, .7); }\n');var r3=[{code:0,msg:"SUCCESS"},{code:1,msg:"LOAD_ERROR"},{code:2,msg:"PARSER_ERROR"},{code:3,msg:"FORMAT_NOT_SUPPORTED"},{code:4,msg:"ID_OR_LANGUAGE_NOT_EXIST"},{code:5,msg:"PARAMETERS_ERROR"},{code:6,msg:"ABORT"},{code:7,msg:"UNKNOWN"},{code:8,msg:"DATA_ERROR:subtitle.url is null"}],r9="resize",r4=!1;return function(t){function e(t){J(this,e);var r,n,i,o,a,s,u,c=eO(this,(e.__proto__||Y(e)).call(this));return r=navigator.userAgent,n=/(?:Windows Phone)/.test(r),i=/(?:SymbianOS)/.test(r)||n,o=/(?:Android)/.test(r),a=/(?:Firefox)/.test(r),s=/(?:iPad|PlayBook)/.test(r)||o&&!/(?:Mobile)/.test(r)||a&&/(?:Tablet)/.test(r),r4=/(?:iPhone)/.test(r)&&!s||o||i||s,c.currentText=null,c.textTrack=[],c._cid=-1,c._gid=-1,c._cids=[],c._iId=null,c._iC=0,c.player=null,c.root=null,c.config={line:"double",bottom:0,mode:"stroke",defaultOpen:!1,baseSizeX:49,baseSizeY:28,minSize:16,minMobileSize:13,fitVideo:!0,offsetBottom:2,fontColor:"#fff"},c._ctime=0,c._loadingTrack={},rW(c.config).map(function(e){void 0!==t[e]&&null!==t[e]&&(c.config[e]=t[e])}),c._isOpen=!1,c._videoMeta={scale:0,videoHeight:0,videoWidth:0,lwidth:0,lheight:0,vWidth:0,vHeight:0,vBottom:0,vLeft:0,marginBottom:0},t.subTitles&&"Array"===(u=t.subTitles,Object.prototype.toString.call(u).match(/([^\s.*]+)(?=]$)/g)[0])?(t.player&&c.attachPlayer(t.player),c.setSubTitles(t.subTitles,c.config.defaultOpen),c):eO(c)}return ez(e,t),eL(e,[{key:"version",get:function(){return"1.0.12"}}]),eL(e,[{key:"setSubTitles",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=this,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=this._isOpen||r;n&&this.innerRoot&&this.switchOff(),this.currentText=null,this.textTrack=[],t.map(function(t){var r={};rW(t).map(function(e){r[e]=t[e]}),r.isDefault&&(e.currentText=r),e.textTrack.push(r)}),this.currentText&&l(this.currentText).then(function(t){e.addStyles(t),i&&e.switch()})}},{key:"addStyles",value:function(t){var e=t.styles,r=t.format;e&&"vtt"===r&&(e.map(function(t){t.key||(t.key="xg-text-track-span")}),function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r="";t.map(function(t){r+=" "+e+" "+t.key+" {"+t.style+"}"});var n=document.createElement("style"),i=document.head||document.getElementsByTagName("head")[0];if(n.type="text/css",n.id="ssss",n.styleSheet){var o=function(){try{n.styleSheet.cssText=r}catch(t){}};n.styleSheet.disabled?setTimeout(o,10):o()}else{var a=document.createTextNode(r);n.appendChild(a)}i.appendChild(n)}(e,"xg-text-track"))}},{key:"attachPlayer",value:function(t){var e=this;if(t){this.player&&this.detachPlayer();var r,n,i=this.config,o=i.fontColor,a=i.mode,u=i.fitVideo;this.player=t,this.root=document.createElement("xg-text-track"),this.root.className="xg-text-track",this._isOpen||s(this.root,"text-track-hide"),u||s(this.root,"text-track-no-fitvideo"),a&&s(this.root,"text-track-"+a),this.innerRoot=document.createElement("xg-text-track-inner"),this.root.appendChild(this.innerRoot),o&&(this.root.style.color=o),this.currentText&&["language","id","label"].map(function(t){e.root.setAttribute("data-"+t,e.currentText[t]||"")}),this.player.root.appendChild(this.root),["destroy","__onTimeupdate","_onResize"].map(function(t){e[t]=e[t].bind(e)}),this.player.on("destroy",this.destroy),this.player.on("timeupdate",this.__onTimeupdate),this._isOpen&&this.switch(),r=t.root,n=this._onResize,r2||(r2=new r1),r2.addObserver(r,n)}}},{key:"detachPlayer",value:function(){var t,e,r=this.player;r&&(r.off("destroy",this.destroy),r.off("timeupdate",this.__onTimeupdate),r.root&&(t=r.root,e=this._onResize,r2&&r2.unObserver(t,e),r.root.removeChild(this.root)),this.innerRoot=null,this.root=null,this.player=null)}},{key:"switch",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{id:"",language:""};return this._loadingTrack=e,new rU(function(r,n){if(!e.id&&!e.language)return t.currentText?(t._loadingTrack={},t._updateCurrent(t.currentText),t._isOpen=!0,t.show(),void r(u(0,{message:"switch default subtitle success"}))):void n(u(5,{message:"no default subtitle"}));if(t.currentText&&f(e,t.currentText))t._loadingTrack={},t._updateCurrent(t.currentText),t._isOpen=!0,t.show(),r(u(0));else{for(var i=null,o=0;o<t.textTrack.length;o++)if(f(e,t.textTrack[o])){i=t.textTrack[o];break}i?i.list?(t._loadingTrack={},t._updateCurrent(i),t._isOpen=!0,t.show(),r(u(0))):l(i).then(function(e){(t.addStyles(e),t._loadingTrack.id===i.id||t._loadingTrack.language===e.language)?(t._loadingTrack={},t._updateCurrent(e),t._isOpen=!0,t.show(),r(u(0))):n(u(6,{message:"check _loadingTrack fail id: "+t._loadingTrack.id+" nextSubtitle:"+e.id}))}).catch(function(t){n(t)}):n(u(4,Error("The is no subtitle with id:[{"+e.id+"}] or language:["+e.language+"]")))}})}},{key:"switchOff",value:function(){this._isOpen=!1,this.hide()}},{key:"_updateCurrent",value:function(t){var e=this;if(this.root){this.currentText=t,["language","id","label"].map(function(t){e.root.setAttribute("data-"+t,e.currentText[t]||"")}),this.__remove(this._cids);var r=this.player.currentTime;this._cids=[],this._gid=-1,this._cid=-1,this._update(r)}}},{key:"__loadAll",value:function(){this.textTrack.map(function(t){l(t)})}},{key:"getDelCid",value:function(t,e){for(var r=[],n=0;n<t.length;n++)e.includes(t[n])||r.push(t[n]);return r}},{key:"getNewCid",value:function(t,e){for(var r=[],n=0;n<e.length;n++)t.includes(e[n])||r.push(e[n]);return r}},{key:"_update",value:function(t){var e=this,r=function(t,e,r){var n=e.length;if(n<1)return -1;if(e[r=r<0?0:r>=n?n-1:r].start<=t&&t<e[r].end)return r;for(var i=e[r].end<=t?r+1:0;i<n;i++){if(e[i].start<=t&&t<e[i].end)return i;if(t>e[i].end&&i+1<n&&t<e[i+1].start||t>e[i].end&&i+1>=n)break}return -1}(t,this.currentText.list,this._gid),n=[];if(r>-1&&(n=function(t,e,r){var n=e.length;if(n<1)return[];var i=[];if((r=r<0?0:r>=n?n-1:r)<n)for(var o=e[r].end<=t?r:0;o<n&&(e[o].start<=t&&t<e[o].end&&i.push(o),!(t<e[o].start));o++);return i}(t,this.currentText.list[r].list,this._cid)),n.length<1)return this._cids.length>0&&this.__remove(this._cids),void(this._cids=[]);if(this._cids!==n||r!==this._gid){this._gid=r,this._cid=n[0];var i=this.getDelCid(this._cids,n),o=this.getNewCid(this._cids,n);this._cids=n,this.__remove(i);var a=[];o.map(function(t){var n=e.currentText.list[r].list[t];n.index=t,a.push(n)}),this.__render(a,t)}}},{key:"__onTimeupdate",value:function(){if(this._isOpen){var t=this.player.video,e=t.videoWidth,r=t.videoHeight;!this._videoMeta.scale&&e&&r&&this._onResize(this.player.root);var n=this.player.currentTime;200>Math.round(Math.abs(1e3*n-this._ctime))||(this._ctime=1e3*n,this.currentText&&this.currentText.list&&this._update(n))}}},{key:"_onResize",value:function(t){var e=this._videoMeta;if(t&&t instanceof window.Element||(t=this.player.root),this._iId&&(clearTimeout(this._iId),this._iId=null),!e.scale){if(!this.player.video)return;var r=this.player.video,n=r.videoWidth,i=r.videoHeight;if(!n||!i)return;e.videoWidth=n,e.videoHeight=i,e.scale=parseInt(i/n*100,10)}this.__startResize(t)}},{key:"resize",value:function(t,e){var r=this,n=this.config,i=n.baseSizeX,o=n.baseSizeY,a=n.minMobileSize,s=n.minSize,u=n.fitVideo,c=n.offsetBottom,l=this._videoMeta.scale;this._videoMeta.lwidth=t,this._videoMeta.lheight=e;var f=void 0,h=0;e/t*100>=l?(h=parseInt(l*t,10)/100,f=t):(h=e,f=parseInt(e/l*100,10)),this._videoMeta.vWidth=f,this._videoMeta.vHeight=h;var d=0,p=0;p=l>120?parseInt((d=o)*h/1080,10):parseInt((d=i)*f/1920,10);var g=r4?a:s,v={fontSize:p=p<g?g:p>d?d:p},m=parseInt((e-h)/2,10),_=parseInt((t-f)/2,10),y=parseInt(h*c,10)/100;this._videoMeta.vBottom=m,this._videoMeta.vLeft=_,this._videoMeta.marginBottom=y,u&&(v.bottom=m+y,v.left=v.right=_),rW(v).map(function(t){r.root.style[t]=v[t]+"px"}),this.emit(r9,{vLeft:_,vBottom:m,marginBottom:y,vWidth:f,vHeight:h,fontSize:p,scale:l})}},{key:"__startResize",value:function(t){var e=this,r=t.getBoundingClientRect(),n=this._videoMeta,i=r.width,o=r.height;if(this._iId&&(clearTimeout(this._iId),this._iId=null),i>0&&o>0&&(i!==n.lwidth||o!==n.lheight))this._iC=0,this.resize(i,o);else{if(this._iC>=5)return void(this._iC=0);this._iC++,this._iId=setTimeout(function(){e.__startResize(t)},50)}}},{key:"__remove",value:function(t){var e=this;if(t&&!(t.length<1)){for(var r=this.innerRoot.children,n=[],i=0;i<r.length;i++){var o=Number(r[i].getAttribute("data-index"));t.includes(o)&&n.push(r[i])}n.map(function(t){e.innerRoot.removeChild(t)})}}},{key:"__render",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];e.length>0&&e.map(function(e){var r="text-track-"+t.config.line;e.text.map(function(n,i){i>0&&(r+=" text-track-deputy");var o={"data-start":e.start,"data-end":e.end,"data-index":e.index};t.innerRoot.appendChild(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"div",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",i=document.createElement(t);return i.className=n,i.innerHTML=e,rW(r).forEach(function(e){var n=r[e];"video"===t||"audio"===t||"live-video"===t?n&&i.setAttribute(e,n):i.setAttribute(e,n)}),i}("xg-text-track-span",n,o,r))})})}},{key:"show",value:function(){var t,e;t=this.root,e="text-track-hide",t&&(t.classList?e.split(/\s+/g).forEach(function(e){t.classList.remove(e)}):a(t,e)&&e.split(/\s+/g).forEach(function(e){var r=RegExp("(\\s|^)"+e+"(\\s|$)");t.className&&"object"===eT(t.className)?t.setAttribute("class",t.getAttribute("class").replace(r," ")):t.className=t.className.replace(r," ")}))}},{key:"hide",value:function(){s(this.root,"text-track-hide"),this.innerRoot.innerHTML=""}},{key:"destroy",value:function(){this.detachPlayer(),this.removeAllListeners(),this.player=null,this.textTrack=null}},{key:"marginBottom",get:function(){var t=this._videoMeta,e=t.bottom,r=t.marginBottom;return this.config.fitVideo?e+r:r}}]),e}(rz)},t.exports=r()},881462:function(t,e,r){"use strict";r.d(e,{_:function(){return g}});var n=r(697946),i=r(176143),o=r(740427),a=r(279781),s=r(752822),u=r(249387),c=r(461449),l=r(578548),f=r(500395),h=r(107180),d=r(317024),p=["stts","stsc","stsz","stco","co64","stss","ctts"],g=function(){function t(e,r,a,s){var c,l,f=this;if((0,n.PA)(this,t),(0,n._x)(this,"_videoSamples",[]),(0,n._x)(this,"_audioSamples",[]),(0,n._x)(this,"_lastRemainBuffer",[]),(0,n._x)(this,"_lastRemainBufferStartPos",0),(0,n._x)(this,"videoMaxFrameIdx",-1),(0,n._x)(this,"audioMaxFrameIdx",-1),this.videoTrack=new i.q,this.audioTrack=new o.W,this.metadataTrack=a||new u.m$,this.videoSegmnents=e,this.audioSegmnents=r,this.log=new h.Y("MP4Demuxer",!s||!s.openLog||!s.openLog),this.memoryOpt=null==s?void 0:s.memoryOpt,!this.memoryOpt&&(e&&e.forEach(function(t){var e;(e=f._videoSamples).push.apply(e,(0,n.u)(t.frames))}),r&&r.forEach(function(t){var e;(e=f._audioSamples).push.apply(e,(0,n.u)(t.frames))})),(null===(c=this.videoSegmnents)||void 0===c?void 0:c.length)>0){var d=this.videoSegmnents[this.videoSegmnents.length-1].frames;this.videoMaxFrameIdx=d[d.length-1].index}if((null===(l=this.audioSegmnents)||void 0===l?void 0:l.length)>0){var p=this.audioSegmnents[this.audioSegmnents.length-1].frames;this.audioMaxFrameIdx=p[p.length-1].index}}return(0,n.qH)(t,[{key:"_markVideoSample",value:function(t){var e,r=(0,c.YW)({track:this.videoTrack});null==r||null===(e=r.markSample)||void 0===e||e.call(r,{sample:t,track:this.videoTrack,demuxer:this})}},{key:"parseSamples",value:function(t){if(!t)throw Error("moov is required");!this.videoTrack.codec&&!this.audioTrack.codec&&(f.I.moovToTrack(t,this.videoTrack,this.audioTrack),this.videoSenc=this.videoTrack.videoSenc,this.audioSenc=this.audioTrack.audioSenc,this.memoryOpt&&this.clearBoxEntries(t))}},{key:"demux",value:function(t,e,r,n,i){this.parseSamples(i);var o=this.videoTrack,u=this.audioTrack;o.samples=[],u.samples=[];var c={};if(r){var f,h,d,p,g=0;if(this.memoryOpt&&this.videoSegmnents&&!(c=this.getFramePosByIdx("video",r[0])))throw Error("cannot found video frame #".concat(r[0]));for(var v=c,m=v.frameIdx,_=v.segmentIdx,y=r[0],b=r[1];y<=b;y++){if(!this._videoSamples.length&&this.videoSegmnents){var x=this.getFrameInfo("video",_,m);f=x.sample,_=x.segmentIdx,m=x.frameIdx}else f=this._videoSamples[y];if(!f)throw Error("cannot found video frame #".concat(y));d=f.offset-e,h=t.subarray(d,d+f.size),(p=new a._("number"==typeof f.pts?f.pts:f.dts,f.dts)).duration=f.duration,p.gopId=f.gopId,f.keyframe&&p.setToKeyframe();for(var w=0,S=h.length-1;w<S;)g=(0,l.Bh)(h,w),w+=4,p.units.push(h.subarray(w,w+g)),w+=g;this._markVideoSample(p),o.samples.push(p)}o.baseMediaDecodeTime=o.samples[0].dts}if(c={},n){if(this.memoryOpt&&this.audioSegmnents&&!(c=this.getFramePosByIdx("audio",n[0])))throw Error("cannot found video frame #".concat(n[0]));for(var k=c,T=k.frameIdx,O=k.segmentIdx,E=n[0],R=n[1];E<=R;E++){if(!this._audioSamples.length&&this.audioSegmnents){var P=this.getFrameInfo("audio",O,T);f=P.sample,O=P.segmentIdx,T=P.frameIdx}else f=this._audioSamples[E];if(!f)throw Error("cannot found video frame #".concat(E));d=f.offset-e,h=t.subarray(d,d+f.size),u.samples.push(new s.X(f.dts,h,f.duration))}u.baseMediaDecodeTime=u.samples[0].dts}return{videoTrack:o,audioTrack:u,metadataTrack:this.metadataTrack}}},{key:"demuxPart",value:function(t,e,r,n,i,o,u,c){if(this.parseSamples(i),this.videoTrack.useEME=o,this.audioTrack.useEME=o,this._lastRemainBuffer&&this._lastRemainBuffer.byteLength>0&&e>this._lastRemainBufferStartPos&&e<=this._lastRemainBufferStartPos+this._lastRemainBuffer.byteLength){for(var f=0;f<20;)try{var h=this._lastRemainBuffer.subarray(0,e-this._lastRemainBufferStartPos),d=new Uint8Array(t.byteLength+h.byteLength);d.set(h,0),d.set(new Uint8Array(t),h.byteLength),t=d,e-=h.byteLength,this._lastRemainBuffer=null,this._lastRemainBufferStartPos=0;break}catch(t){if(f<20)f++;else throw Error("new Uint8Array error:,"+t.errorMessage)}}var p=this.videoTrack,g=this.audioTrack;p.samples=[],g.samples=[],p.videoSenc=null,g.audioSenc=null,(null==r?void 0:r[1])>this.videoMaxFrameIdx&&this.videoMaxFrameIdx>0&&(r[1]=this.videoMaxFrameIdx),(null==n?void 0:n[1])>this.audioMaxFrameIdx&&this.audioMaxFrameIdx>0&&(n[1]=this.audioMaxFrameIdx);var v=0,m=0,_={},y=t.byteLength+e;if((null==r?void 0:r.length)>0){if(this.memoryOpt&&this.videoSegmnents&&!(_=this.getFramePosByIdx("video",r[0])))throw Error("cannot found video frame #".concat(r[0]));for(var b,x,w,S,k=_,T=k.frameIdx,O=k.segmentIdx,E=r[0];E<=r[1];E++){if(!this._videoSamples.length&&this.videoSegmnents){var R=this.getFrameInfo("video",O,T);b=R.sample,O=R.segmentIdx,T=R.frameIdx}else b=this._videoSamples[E];if(!b)throw Error("cannot found video frame #".concat(E));if(this.memoryOpt&&b.offset+b.size>y)break;b.offset>=e&&b.offset+b.size<=y&&(v=(w=b.offset-e)+b.size,x=t.subarray(w,v),(S=new a._("number"==typeof b.pts?b.pts:b.dts,b.dts)).duration=b.duration,S.gopId=b.gopId,S.sampleOffset=b.index,b.keyframe&&S.setToKeyframe(),S.data=x,S.size=b.size,p.samples.push(S))}p.samples.length>0&&(p.gopId=p.samples[0].gopId,p.baseMediaDecodeTime=p.samples[0].dts,p.startPts=p.samples[0].pts/p.timescale,p.endPts=p.samples[p.samples.length-1].pts/p.timescale,p.startDts=p.samples[0].dts/p.timescale,p.endDts=p.samples[p.samples.length-1].dts/p.timescale,this.videoSenc&&(p.videoSenc=this.videoSenc.slice(p.samples[0].sampleOffset,p.samples[0].sampleOffset+p.samples.length),p.kidValue=u))}if((null==n?void 0:n.length)>0){if(this.memoryOpt&&this.audioSegmnents&&!(_=this.getFramePosByIdx("audio",n[0])))throw Error("cannot found video frame #".concat(n[0]));for(var P=_,L=P.frameIdx,I=P.segmentIdx,A=n[0];A<=n[1];A++){if(!this._audioSamples.length&&this.audioSegmnents){var B=this.getFrameInfo("audio",I,L);b=B.sample,I=B.segmentIdx,L=B.frameIdx}else b=this._audioSamples[A];if(!b)throw Error("cannot found video frame #".concat(A));if(this.memoryOpt&&b.offset+b.size>y)break;b.offset>=e&&b.offset+b.size<=y&&(m=(w=b.offset-e)+b.size,x=t.subarray(w,m),g.samples.push(new s.X(b.dts,x,b.duration,b.index)))}g.samples.length>0&&(g.gopId=g.samples[0].gopId||p.gopId,g.baseMediaDecodeTime=g.samples[0].dts,g.startPts=g.samples[0].pts/g.timescale,g.endPts=g.samples[g.samples.length-1].pts/g.timescale,this.audioSenc&&(g.audioSenc=this.audioSenc.slice(g.samples[0].sampleOffset,g.samples[0].sampleOffset+g.samples.length),g.kidValue=u))}this.decoderData(p,g,c);for(var C=0,M=0;M<p.samples.length;M++){for(var j=0,N=p.samples[M].data,F=N.length-1;j<F;)C=(0,l.Bh)(N,j),j+=4,p.samples[M].units.push(N.subarray(j,j+C)),j+=C;this._markVideoSample(p.samples[M])}var D=Math.max(v,m);return this._lastRemainBuffer=t.subarray(D),this._lastRemainBuffer.byteLength>0?this._lastRemainBufferStartPos=e+t.byteLength-this._lastRemainBuffer.byteLength:this._lastRemainBufferStartPos=0,{videoTrack:p,audioTrack:g,metadataTrack:this.metadataTrack,lastRemainBufferInfo:{data:this._lastRemainBuffer,pos:this._lastRemainBufferStartPos}}}},{key:"setLastRemainBufferInfo",value:function(t,e){this._lastRemainBuffer=t,this._lastRemainBufferStartPos=e}},{key:"reset",value:function(){this._lastRemainBuffer=null,this._lastRemainBufferStartPos=0,this.videoTrack.reset(),this.audioTrack.reset(),this.metadataTrack.reset()}},{key:"decoderData",value:function(t,e,r){!t.useEME&&!e.useEME&&d.Z.decoderAESCTRData(t,e,r)}},{key:"getFramePosByIdx",value:function(t,e){var r,n,i,o="video"===t?this.videoSegmnents:this.audioSegmnents;if(!o||!(null!=o&&o.length))return null;for(var a=0,s=0;s<o.length;s++)if(r=o[s].frames,e<=(null===(n=o[s].frames)||void 0===n?void 0:n[(null===(i=r)||void 0===i?void 0:i.length)-1].index)){a=s;break}return{frameIdx:r.findIndex(function(t){return t.index===e}),segmentIdx:a}}},{key:"getFrameInfo",value:function(t,e,r){var n,i,o,a,s="video"===t?this.videoSegmnents:this.audioSegmnents;return s?r<(null===(n=s[e])||void 0===n?void 0:null===(i=n.frames)||void 0===i?void 0:i.length)?{sample:null===(o=s[e])||void 0===o?void 0:o.frames[r],segmentIdx:e,frameIdx:r+1}:{sample:null===(a=s[e+1])||void 0===a?void 0:a.frames[0],segmentIdx:e+1,frameIdx:1}:{}}},{key:"clearBoxEntries",value:function(t){this.memoryOpt&&t.trak.forEach(function(t){p.forEach(function(e){var r=t.mdia.minf.stbl[e];r&&(r.entries&&(r.entries=null),r.entrySizes&&(r.entrySizes=null))})})}}],[{key:"probe",value:function(t){return f.I.probe(t)}}]),t}()},218147:function(t,e,r){"use strict";r.d(e,{Bh:function(){return o},_b:function(){return u},dB:function(){return c},e2:function(){return a},h9:function(){return s},i4:function(){return n},sV:function(){return i}});function n(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return(t[e]<<8)+(t[e+1]||0)}function i(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return(t[e]<<16)+(t[e+1]<<8)+(t[e+2]||0)}function o(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return(t[e]<<24>>>0)+(t[e+1]<<16)+(t[e+2]<<8)+(t[e+3]||0)}function a(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return new DataView(t.buffer,t.byteOffset,t.byteLength).getInt32(e)}function s(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return 4294967296*o(t,e)+o(t,e+4)}function u(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=new DataView(t.buffer,t.byteOffset,t.byteLength);return r.getUint32(e)<<32|r.getUint32(e+4)}function c(t){for(var e,r="avc1.",n=0;n<3;n++)(e=t[n].toString(16)).length<2&&(e="0".concat(e)),r+=e;return r}}}]); |